-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFastBoard.o.c++
12305 lines (10104 loc) · 427 KB
/
FastBoard.o.c++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
typedef unsigned char undefined;
typedef unsigned char bool;
typedef unsigned char byte;
typedef unsigned char dwfenc;
typedef unsigned int dword;
typedef unsigned long qword;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned long long ulonglong;
typedef unsigned char undefined1;
typedef unsigned int undefined4;
typedef unsigned long undefined8;
typedef unsigned short word;
typedef struct pair<int,int> pair<int,int>, *Ppair<int,int>;
struct pair<int,int> { // PlaceHolder Class Structure
};
typedef ulong size_t;
typedef struct array<FastBoard::square_t,12ul> array<FastBoard::square_t,12ul>, *Parray<FastBoard::square_t,12ul>;
struct array<FastBoard::square_t,12ul> { // PlaceHolder Class Structure
};
typedef struct array<FastBoard::square_t,8ul> array<FastBoard::square_t,8ul>, *Parray<FastBoard::square_t,8ul>;
struct array<FastBoard::square_t,8ul> { // PlaceHolder Class Structure
};
typedef struct array<int,8ul> array<int,8ul>, *Parray<int,8ul>;
struct array<int,8ul> { // PlaceHolder Class Structure
};
typedef struct array<int,2ul> array<int,2ul>, *Parray<int,2ul>;
struct array<int,2ul> { // PlaceHolder Class Structure
};
typedef struct array<int,3ul> array<int,3ul>, *Parray<int,3ul>;
struct array<int,3ul> { // PlaceHolder Class Structure
};
typedef struct array<FastBoard::square_t,441ul> array<FastBoard::square_t,441ul>, *Parray<FastBoard::square_t,441ul>;
struct array<FastBoard::square_t,441ul> { // PlaceHolder Class Structure
};
typedef struct array<unsigned_short,442ul> array<unsigned_short,442ul>, *Parray<unsigned_short,442ul>;
struct array<unsigned_short,442ul> { // PlaceHolder Class Structure
};
typedef struct array<unsigned_short,441ul> array<unsigned_short,441ul>, *Parray<unsigned_short,441ul>;
struct array<unsigned_short,441ul> { // PlaceHolder Class Structure
};
typedef struct array<int,4ul> array<int,4ul>, *Parray<int,4ul>;
struct array<int,4ul> { // PlaceHolder Class Structure
};
typedef struct array<int,24ul> array<int,24ul>, *Parray<int,24ul>;
struct array<int,24ul> { // PlaceHolder Class Structure
};
typedef struct array<unsigned_long_long,20ul> array<unsigned_long_long,20ul>, *Parray<unsigned_long_long,20ul>;
struct array<unsigned_long_long,20ul> { // PlaceHolder Class Structure
};
typedef struct array<FastBoard::square_t,4ul> array<FastBoard::square_t,4ul>, *Parray<FastBoard::square_t,4ul>;
struct array<FastBoard::square_t,4ul> { // PlaceHolder Class Structure
};
typedef struct FastBoard FastBoard, *PFastBoard;
struct FastBoard { // PlaceHolder Structure
};
typedef struct allocator<unsigned_long> allocator<unsigned_long>, *Pallocator<unsigned_long>;
struct allocator<unsigned_long> { // PlaceHolder Structure
};
typedef struct allocator<bool> allocator<bool>, *Pallocator<bool>;
struct allocator<bool> { // PlaceHolder Structure
};
typedef dword random_access_iterator_tag;
typedef dword back_insert_iterator;
typedef struct _Bit_iterator_base _Bit_iterator_base, *P_Bit_iterator_base;
struct _Bit_iterator_base { // PlaceHolder Structure
};
typedef struct allocator allocator, *Pallocator;
struct allocator { // PlaceHolder Structure
};
typedef struct _Bit_reference _Bit_reference, *P_Bit_reference;
struct _Bit_reference { // PlaceHolder Structure
};
typedef dword vector;
typedef struct basic_ostream basic_ostream, *Pbasic_ostream;
struct basic_ostream { // PlaceHolder Structure
};
typedef struct back_insert_iterator<std::vector<int,std::allocator<int>>> back_insert_iterator<std::vector<int,std::allocator<int>>>, *Pback_insert_iterator<std::vector<int,std::allocator<int>>>;
struct back_insert_iterator<std::vector<int,std::allocator<int>>> { // PlaceHolder Structure
};
typedef struct allocator<int> allocator<int>, *Pallocator<int>;
struct allocator<int> { // PlaceHolder Structure
};
typedef struct vector<bool,std::allocator<bool>> vector<bool,std::allocator<bool>>, *Pvector<bool,std::allocator<bool>>;
struct vector<bool,std::allocator<bool>> { // PlaceHolder Structure
};
typedef struct vector<int,std::allocator<int>> vector<int,std::allocator<int>>, *Pvector<int,std::allocator<int>>;
struct vector<int,std::allocator<int>> { // PlaceHolder Structure
};
typedef struct _Bit_const_iterator _Bit_const_iterator, *P_Bit_const_iterator;
struct _Bit_const_iterator { // PlaceHolder Structure
};
typedef dword pair;
typedef struct _Vector_base<int,std::allocator<int>> _Vector_base<int,std::allocator<int>>, *P_Vector_base<int,std::allocator<int>>;
struct _Vector_base<int,std::allocator<int>> { // PlaceHolder Structure
};
typedef struct _Bit_iterator _Bit_iterator, *P_Bit_iterator;
struct _Bit_iterator { // PlaceHolder Structure
};
typedef struct _Bvector_base<std::allocator<bool>> _Bvector_base<std::allocator<bool>>, *P_Bvector_base<std::allocator<bool>>;
struct _Bvector_base<std::allocator<bool>> { // PlaceHolder Structure
};
typedef struct basic_ostream<char,std::char_traits<char>> basic_ostream<char,std::char_traits<char>>, *Pbasic_ostream<char,std::char_traits<char>>;
struct basic_ostream<char,std::char_traits<char>> { // PlaceHolder Structure
};
typedef dword iterator_category;
typedef dword basic_string;
typedef struct basic_string.conflict basic_string.conflict, *Pbasic_string.conflict;
struct basic_string.conflict { // PlaceHolder Structure
};
typedef struct basic_ostringstream<char,std::char_traits<char>,std::allocator<char>> basic_ostringstream<char,std::char_traits<char>,std::allocator<char>>, *Pbasic_ostringstream<char,std::char_traits<char>,std::allocator<char>>;
struct basic_ostringstream<char,std::char_traits<char>,std::allocator<char>> { // PlaceHolder Structure
};
typedef struct basic_string<char,std::char_traits<char>,std::allocator<char>> basic_string<char,std::char_traits<char>,std::allocator<char>>, *Pbasic_string<char,std::char_traits<char>,std::allocator<char>>;
struct basic_string<char,std::char_traits<char>,std::allocator<char>> { // PlaceHolder Structure
};
typedef struct Init Init, *PInit;
struct Init { // PlaceHolder Structure
};
typedef struct _Vector_impl _Vector_impl, *P_Vector_impl;
struct _Vector_impl { // PlaceHolder Structure
};
typedef struct _Vector_impl_data _Vector_impl_data, *P_Vector_impl_data;
struct _Vector_impl_data { // PlaceHolder Structure
};
typedef struct _Bvector_impl _Bvector_impl, *P_Bvector_impl;
struct _Bvector_impl { // PlaceHolder Structure
};
typedef struct _Bvector_impl_data _Bvector_impl_data, *P_Bvector_impl_data;
struct _Bvector_impl_data { // PlaceHolder Structure
};
typedef struct array array, *Parray;
struct array { // PlaceHolder Structure
};
typedef struct new_allocator<unsigned_long> new_allocator<unsigned_long>, *Pnew_allocator<unsigned_long>;
struct new_allocator<unsigned_long> { // PlaceHolder Structure
};
typedef struct new_allocator new_allocator, *Pnew_allocator;
struct new_allocator { // PlaceHolder Structure
};
typedef dword __normal_iterator;
typedef struct __normal_iterator<int*,std::vector<int,std::allocator<int>>> __normal_iterator<int*,std::vector<int,std::allocator<int>>>, *P__normal_iterator<int*,std::vector<int,std::allocator<int>>>;
struct __normal_iterator<int*,std::vector<int,std::allocator<int>>> { // PlaceHolder Structure
};
typedef struct new_allocator<bool> new_allocator<bool>, *Pnew_allocator<bool>;
struct new_allocator<bool> { // PlaceHolder Structure
};
typedef struct new_allocator<int> new_allocator<int>, *Pnew_allocator<int>;
struct new_allocator<int> { // PlaceHolder Structure
};
typedef dword difference_type;
typedef dword __type;
typedef dword _Iter_equal_to_iter;
typedef dword _Iter_less_iter;
typedef struct _Iter_less_val _Iter_less_val, *P_Iter_less_val;
struct _Iter_less_val { // PlaceHolder Structure
};
typedef struct _Iter_equals_val<int_const> _Iter_equals_val<int_const>, *P_Iter_equals_val<int_const>;
struct _Iter_equals_val<int_const> { // PlaceHolder Structure
};
typedef dword _Iter_equals_val;
typedef struct _Val_less_iter _Val_less_iter, *P_Val_less_iter;
struct _Val_less_iter { // PlaceHolder Structure
};
typedef dword square_t;
typedef struct __normal_iterator<int_const*,std::vector<int,std::allocator<int>>> __normal_iterator<int_const*,std::vector<int,std::allocator<int>>>, *P__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>;
struct __normal_iterator<int_const*,std::vector<int,std::allocator<int>>> { // PlaceHolder Class Structure
};
// WARNING! conflicting data type names: /__gnu_cxx/__ops/_Iter_equal_to_iter - /Demangler/__gnu_cxx/__ops/_Iter_equal_to_iter
// WARNING! conflicting data type names: /__gnu_cxx/__ops/_Iter_less_iter - /Demangler/__gnu_cxx/__ops/_Iter_less_iter
typedef struct Elf64_Rela Elf64_Rela, *PElf64_Rela;
struct Elf64_Rela {
qword r_offset; // location to apply the relocation action
qword r_info; // the symbol table index and the type of relocation
qword r_addend; // a constant addend used to compute the relocatable field value
};
typedef struct Elf64_Ehdr Elf64_Ehdr, *PElf64_Ehdr;
struct Elf64_Ehdr {
byte e_ident_magic_num;
char e_ident_magic_str[3];
byte e_ident_class;
byte e_ident_data;
byte e_ident_version;
byte e_ident_osabi;
byte e_ident_abiversion;
byte e_ident_pad[7];
word e_type;
word e_machine;
dword e_version;
qword e_entry;
qword e_phoff;
qword e_shoff;
dword e_flags;
word e_ehsize;
word e_phentsize;
word e_phnum;
word e_shentsize;
word e_shnum;
word e_shstrndx;
};
typedef struct Elf64_Sym Elf64_Sym, *PElf64_Sym;
struct Elf64_Sym {
dword st_name;
byte st_info;
byte st_other;
word st_shndx;
qword st_value;
qword st_size;
};
typedef struct Elf64_Shdr Elf64_Shdr, *PElf64_Shdr;
typedef enum Elf_SectionHeaderType {
SHT_NULL=0,
SHT_PROGBITS=1,
SHT_SYMTAB=2,
SHT_STRTAB=3,
SHT_RELA=4,
SHT_HASH=5,
SHT_DYNAMIC=6,
SHT_NOTE=7,
SHT_NOBITS=8,
SHT_REL=9,
SHT_SHLIB=10,
SHT_DYNSYM=11,
SHT_INIT_ARRAY=14,
SHT_FINI_ARRAY=15,
SHT_PREINIT_ARRAY=16,
SHT_GROUP=17,
SHT_SYMTAB_SHNDX=18,
SHT_ANDROID_REL=1610612737,
SHT_ANDROID_RELA=1610612738,
SHT_GNU_ATTRIBUTES=1879048181,
SHT_GNU_HASH=1879048182,
SHT_GNU_LIBLIST=1879048183,
SHT_CHECKSUM=1879048184,
SHT_SUNW_move=1879048186,
SHT_SUNW_COMDAT=1879048187,
SHT_SUNW_syminfo=1879048188,
SHT_GNU_verdef=1879048189,
SHT_GNU_verneed=1879048190,
SHT_GNU_versym=1879048191
} Elf_SectionHeaderType;
struct Elf64_Shdr {
dword sh_name;
enum Elf_SectionHeaderType sh_type;
qword sh_flags;
qword sh_addr;
qword sh_offset;
qword sh_size;
dword sh_link;
dword sh_info;
qword sh_addralign;
qword sh_entsize;
};
// FastBoard::get_boardsize()
undefined4 __thiscall FastBoard::get_boardsize(FastBoard *this)
{
return *(undefined4 *)(this + 0x1f70);
}
// FastBoard::get_vertex(int, int)
int __thiscall FastBoard::get_vertex(FastBoard *this,int param_1,int param_2)
{
int iVar1;
iVar1 = get_boardsize(this);
return param_1 + 1 + (param_2 + 1) * (iVar1 + 2);
}
// FastBoard::get_square(int)
undefined4 __thiscall FastBoard::get_square(FastBoard *this,int param_1)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)
boost::array<FastBoard::square_t,441ul>::operator__
((array_FastBoard__square_t_441ul_ *)(this + 0x6f0),(long)param_1);
return *puVar1;
}
// FastBoard::set_square(int, FastBoard::square_t)
void __thiscall FastBoard::set_square(FastBoard *this,int param_1,square_t param_2)
{
square_t *psVar1;
psVar1 = (square_t *)
boost::array<FastBoard::square_t,441ul>::operator__
((array_FastBoard__square_t_441ul_ *)(this + 0x6f0),(long)param_1);
*psVar1 = param_2;
return;
}
// FastBoard::get_square(int, int)
void __thiscall FastBoard::get_square(FastBoard *this,int param_1,int param_2)
{
int iVar1;
iVar1 = get_vertex(this,param_1,param_2);
get_square(this,iVar1);
return;
}
// FastBoard::set_square(int, int, FastBoard::square_t)
void __thiscall FastBoard::set_square(FastBoard *this,int param_1,int param_2,square_t param_3)
{
int iVar1;
iVar1 = get_vertex(this,param_1,param_2);
set_square(this,iVar1,param_3);
return;
}
// FastBoard::reset_board(int)
void __thiscall FastBoard::reset_board(FastBoard *this,int param_1)
{
undefined4 uVar1;
int iVar2;
int iVar3;
undefined4 *puVar4;
int *piVar5;
uint *puVar6;
short *psVar7;
undefined2 *puVar8;
int local_24;
int local_20;
int local_1c;
*(int *)(this + 0x1f70) = param_1;
*(int *)(this + 0x6ec) = (param_1 + 2) * (param_1 + 2);
*(undefined4 *)(this + 0x6e8) = 0;
puVar4 = (undefined4 *)boost::array<int,2ul>::operator__((array_int_2ul_ *)(this + 0x1f48),0);
*puVar4 = 0;
puVar4 = (undefined4 *)boost::array<int,2ul>::operator__((array_int_2ul_ *)(this + 0x1f48),1);
*puVar4 = 0;
puVar4 = (undefined4 *)boost::array<int,2ul>::operator__((array_int_2ul_ *)(this + 0x1f50),0);
*puVar4 = 0;
puVar4 = (undefined4 *)boost::array<int,2ul>::operator__((array_int_2ul_ *)(this + 0x1f50),1);
*puVar4 = 0;
*(undefined4 *)(this + 0x6e4) = 0;
piVar5 = (int *)boost::array<int,4ul>::operator__((array_int_4ul_ *)(this + 0x1f18),0);
*piVar5 = -2 - param_1;
puVar4 = (undefined4 *)boost::array<int,4ul>::operator__((array_int_4ul_ *)(this + 0x1f18),1);
*puVar4 = 1;
piVar5 = (int *)boost::array<int,4ul>::operator__((array_int_4ul_ *)(this + 0x1f18),2);
*piVar5 = param_1 + 2;
puVar4 = (undefined4 *)boost::array<int,4ul>::operator__((array_int_4ul_ *)(this + 0x1f18),3);
*puVar4 = 0xffffffff;
piVar5 = (int *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),0);
*piVar5 = -3 - param_1;
piVar5 = (int *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),1);
*piVar5 = -2 - param_1;
puVar6 = (uint *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),2);
*puVar6 = ~param_1;
puVar4 = (undefined4 *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),3);
*puVar4 = 0xffffffff;
puVar4 = (undefined4 *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),4);
*puVar4 = 1;
piVar5 = (int *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),5);
*piVar5 = param_1 + 1;
piVar5 = (int *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),6);
*piVar5 = param_1 + 2;
piVar5 = (int *)boost::array<int,8ul>::operator__((array_int_8ul_ *)(this + 0x1f28),7);
*piVar5 = param_1 + 3;
for (local_1c = 0; local_1c < *(int *)(this + 0x6ec); local_1c = local_1c + 1) {
puVar4 = (undefined4 *)
boost::array<FastBoard::square_t,441ul>::operator__
((array_FastBoard__square_t_441ul_ *)(this + 0x6f0),(long)local_1c);
*puVar4 = 3;
puVar8 = (undefined2 *)
boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)local_1c);
*puVar8 = 0;
puVar8 = (undefined2 *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)local_1c);
*puVar8 = 0x1b9;
}
for (local_20 = 0; local_20 < param_1; local_20 = local_20 + 1) {
for (local_24 = 0; local_24 < param_1; local_24 = local_24 + 1) {
iVar3 = get_vertex(this,local_20,local_24);
puVar4 = (undefined4 *)
boost::array<FastBoard::square_t,441ul>::operator__
((array_FastBoard__square_t_441ul_ *)(this + 0x6f0),(long)iVar3);
*puVar4 = 2;
uVar1 = *(undefined4 *)(this + 0x6e4);
puVar8 = (undefined2 *)
boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x372),(long)iVar3);
*puVar8 = (short)uVar1;
iVar2 = *(int *)(this + 0x6e4);
*(int *)(this + 0x6e4) = iVar2 + 1;
puVar8 = (undefined2 *)
boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)this,(long)iVar2);
*puVar8 = (short)iVar3;
if ((local_20 == 0) || (local_20 == param_1 + -1)) {
psVar7 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)iVar3);
*psVar7 = *psVar7 + 0x11;
psVar7 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)iVar3);
*psVar7 = *psVar7 + 0x100;
}
else {
psVar7 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)iVar3);
*psVar7 = *psVar7 + 0x200;
}
if ((local_24 == 0) || (local_24 == param_1 + -1)) {
psVar7 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)iVar3);
*psVar7 = *psVar7 + 0x11;
psVar7 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)iVar3);
*psVar7 = *psVar7 + 0x100;
}
else {
psVar7 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)iVar3);
*psVar7 = *psVar7 + 0x200;
}
}
}
puVar8 = (undefined2 *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),0x1b9);
*puVar8 = 0x1b9;
puVar8 = (undefined2 *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),0x1b9);
*puVar8 = 999;
puVar8 = (undefined2 *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0xdd4),0x1b9);
*puVar8 = 0x1b9;
return;
}
// FastBoard::is_suicide(int, int)
char __thiscall FastBoard::is_suicide(FastBoard *this,int param_1,int param_2)
{
ushort uVar1;
short sVar2;
bool bVar3;
bool bVar4;
bool bVar5;
int iVar6;
int iVar7;
int *piVar8;
ushort *puVar9;
short *psVar10;
int local_18;
char local_11;
int local_10;
iVar6 = count_pliberties(this,param_1);
if (iVar6 == 0) {
bVar4 = false;
for (local_10 = 0; local_10 < 4; local_10 = local_10 + 1) {
piVar8 = (int *)boost::array<int,4ul>::operator__
((array_int_4ul_ *)(this + 0x1f18),(long)local_10);
iVar6 = *piVar8;
puVar9 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)(param_1 + iVar6));
puVar9 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar9);
uVar1 = *puVar9;
iVar6 = get_square(this,param_1 + iVar6);
if (param_2 == iVar6) {
if (1 < uVar1) {
return '\0';
}
bVar4 = true;
}
else if (uVar1 < 2) {
return '\0';
}
}
add_neighbour(this,param_1,param_2);
local_11 = '\x01';
bVar5 = true;
for (local_18 = 0; local_18 < 4; local_18 = local_18 + 1) {
piVar8 = (int *)boost::array<int,4ul>::operator__
((array_int_4ul_ *)(this + 0x1f18),(long)local_18);
iVar6 = param_1 + *piVar8;
puVar9 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)iVar6);
psVar10 = (short *)boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar9);
sVar2 = *psVar10;
if ((sVar2 == 0) && (iVar7 = get_square(this,iVar6), param_2 != iVar7)) {
bVar3 = true;
}
else {
bVar3 = false;
}
if (bVar3) {
local_11 = '\0';
}
else {
if ((sVar2 == 0) || (iVar6 = get_square(this,iVar6), param_2 != iVar6)) {
bVar3 = false;
}
else {
bVar3 = true;
}
if (bVar3) {
bVar5 = false;
}
}
}
remove_neighbour(this,param_1,param_2);
if (bVar4) {
if ((local_11 == '\0') || (!bVar5)) {
local_11 = '\0';
}
else {
local_11 = '\x01';
}
}
}
else {
local_11 = '\0';
}
return local_11;
}
// FastBoard::count_pliberties(int)
void __thiscall FastBoard::count_pliberties(FastBoard *this,int param_1)
{
count_neighbours(this,2,param_1);
return;
}
// FastBoard::count_neighbours(int, int)
uint __thiscall FastBoard::count_neighbours(FastBoard *this,int param_1,int param_2)
{
ushort *puVar1;
puVar1 = (ushort *)
boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)param_2);
return (int)(uint)*puVar1 >> ((byte)(param_1 << 2) & 0x1f) & 7;
}
// FastBoard::fast_ss_suicide(int, int)
undefined8 __thiscall FastBoard::fast_ss_suicide(FastBoard *this,int param_1,int param_2)
{
ushort uVar1;
ushort *puVar2;
uint *puVar3;
undefined8 uVar4;
puVar2 = (ushort *)
boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)param_2);
uVar1 = *puVar2;
puVar3 = (uint *)boost::array<int,2ul>::operator__
((array_int_2ul_ *)&s_eyemask,(ulong)(param_1 == 0));
if ((*puVar3 & (uint)uVar1) == 0) {
uVar4 = 0;
}
else {
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)(param_2 + -1));
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar2);
if (*puVar2 < 2) {
uVar4 = 0;
}
else {
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)(param_2 + 1));
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar2);
if (*puVar2 < 2) {
uVar4 = 0;
}
else {
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),
(long)(param_2 + *(int *)(this + 0x1f70) + 2));
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar2);
if (*puVar2 < 2) {
uVar4 = 0;
}
else {
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),
(long)((param_2 - *(int *)(this + 0x1f70)) + -2));
puVar2 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar2);
if (*puVar2 < 2) {
uVar4 = 0;
}
else {
uVar4 = 1;
}
}
}
}
}
return uVar4;
}
// FastBoard::add_neighbour(int, int)
void __thiscall FastBoard::add_neighbour(FastBoard *this,int param_1,int param_2)
{
ushort uVar1;
uint uVar2;
int *piVar3;
short *psVar4;
ushort *puVar5;
uint *puVar6;
ulong uVar7;
array_int_4ul_ local_48 [28];
int local_2c;
int local_28;
char local_21;
int local_20;
int local_1c;
local_1c = 0;
local_20 = 0;
do {
if (3 < local_20) {
return;
}
piVar3 = (int *)boost::array<int,4ul>::operator__
((array_int_4ul_ *)(this + 0x1f18),(long)local_20);
local_2c = param_1 + *piVar3;
psVar4 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)local_2c);
*psVar4 = (short)(1 << ((byte)(param_2 << 2) & 0x1f)) + *psVar4 + -0x100;
local_21 = '\0';
for (local_28 = 0; local_28 < local_1c; local_28 = local_28 + 1) {
puVar6 = (uint *)boost::array<int,4ul>::operator__(local_48,(long)local_28);
uVar2 = *puVar6;
puVar5 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)local_2c);
if (uVar2 == *puVar5) {
local_21 = '\x01';
break;
}
}
if (local_21 != '\x01') {
puVar5 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)local_2c);
psVar4 = (short *)boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar5);
*psVar4 = *psVar4 + -1;
puVar5 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)local_2c);
uVar1 = *puVar5;
uVar7 = (ulong)local_1c;
local_1c = local_1c + 1;
puVar6 = (uint *)boost::array<int,4ul>::operator__(local_48,uVar7);
*puVar6 = (uint)uVar1;
}
local_20 = local_20 + 1;
} while( true );
}
// FastBoard::remove_neighbour(int, int)
void __thiscall FastBoard::remove_neighbour(FastBoard *this,int param_1,int param_2)
{
ushort uVar1;
uint uVar2;
int *piVar3;
short *psVar4;
ushort *puVar5;
uint *puVar6;
ulong uVar7;
array_int_4ul_ local_48 [28];
int local_2c;
int local_28;
char local_21;
int local_20;
int local_1c;
local_1c = 0;
local_20 = 0;
do {
if (3 < local_20) {
return;
}
piVar3 = (int *)boost::array<int,4ul>::operator__
((array_int_4ul_ *)(this + 0x1f18),(long)local_20);
local_2c = param_1 + *piVar3;
psVar4 = (short *)boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x1ba4),(long)local_2c);
*psVar4 = (*psVar4 - (short)(1 << ((byte)(param_2 << 2) & 0x1f))) + 0x100;
local_21 = '\0';
for (local_28 = 0; local_28 < local_1c; local_28 = local_28 + 1) {
puVar6 = (uint *)boost::array<int,4ul>::operator__(local_48,(long)local_28);
uVar2 = *puVar6;
puVar5 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)local_2c);
if (uVar2 == *puVar5) {
local_21 = '\x01';
break;
}
}
if (local_21 != '\x01') {
puVar5 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)local_2c);
psVar4 = (short *)boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x14bc),(ulong)*puVar5);
*psVar4 = *psVar4 + 1;
puVar5 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)local_2c);
uVar1 = *puVar5;
uVar7 = (ulong)local_1c;
local_1c = local_1c + 1;
puVar6 = (uint *)boost::array<int,4ul>::operator__(local_48,uVar7);
*puVar6 = (uint)uVar1;
}
local_20 = local_20 + 1;
} while( true );
}
// FastBoard::remove_string_fast(int)
int __thiscall FastBoard::remove_string_fast(FastBoard *this,int param_1)
{
int iVar1;
undefined4 uVar2;
int *piVar3;
undefined4 *puVar4;
undefined2 *puVar5;
ushort *puVar6;
int local_20;
uint local_1c;
local_20 = 0;
piVar3 = (int *)boost::array<FastBoard::square_t,441ul>::operator__
((array_FastBoard__square_t_441ul_ *)(this + 0x6f0),(long)param_1);
iVar1 = *piVar3;
local_1c = param_1;
do {
puVar4 = (undefined4 *)
boost::array<FastBoard::square_t,441ul>::operator__
((array_FastBoard__square_t_441ul_ *)(this + 0x6f0),(long)(int)local_1c);
*puVar4 = 2;
puVar5 = (undefined2 *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0x1148),(long)(int)local_1c);
*puVar5 = 0x1b9;
piVar3 = (int *)boost::array<int,2ul>::operator__((array_int_2ul_ *)(this + 0x1f50),(long)iVar1)
;
*piVar3 = *piVar3 + -1;
remove_neighbour(this,local_1c,iVar1);
uVar2 = *(undefined4 *)(this + 0x6e4);
puVar5 = (undefined2 *)
boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)(this + 0x372),(long)(int)local_1c);
*puVar5 = (short)uVar2;
puVar5 = (undefined2 *)
boost::array<unsigned_short,441ul>::operator__
((array_unsigned_short_441ul_ *)this,(long)*(int *)(this + 0x6e4));
*puVar5 = (short)local_1c;
*(int *)(this + 0x6e4) = *(int *)(this + 0x6e4) + 1;
local_20 = local_20 + 1;
puVar6 = (ushort *)
boost::array<unsigned_short,442ul>::operator__
((array_unsigned_short_442ul_ *)(this + 0xdd4),(long)(int)local_1c);
local_1c = (uint)*puVar6;
} while (local_1c != param_1);
return local_20;
}
// WARNING: Could not reconcile some variable overlaps
// FastBoard::calc_reach_color(int)
vector * FastBoard::calc_reach_color(int param_1)
{
bool bVar1;
int *piVar2;
int in_EDX;
FastBoard *in_RSI;
undefined4 in_register_0000003c;
vector *this;
undefined auVar3 [16];
vector local_f8 [10];
allocator_bool_ local_cd;
allocator local_cc;
allocator_bool_ local_cb;
allocator local_ca;
undefined local_c9;
undefined local_c8 [16];
undefined local_b8 [31];
undefined local_99;
undefined local_98 [16];
undefined local_88 [16];
undefined local_78 [16];
undefined local_68 [16];
undefined local_58 [16];
undefined local_48 [28];
int local_2c;
int local_28;
int local_24;
int local_20;