-
Notifications
You must be signed in to change notification settings - Fork 6
/
am_npc_invites.c4
6832 lines (6483 loc) · 163 KB
/
am_npc_invites.c4
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
// listener's C4 decompiler
void main() {
l_2 = 1;
l_3 = 134;
l_4 = 134;
l_5 = 1;
l_6 = 1;
l_7 = 1;
l_8 = 134;
l_9 = 1;
l_A = 12;
l_B = 12;
l_E = 0.001;
l_11 = -1;
l_12 = "NULL";
l_17 = 80.0;
l_18 = 140.0;
l_19 = 180.0;
l_1C = 3;
l_1D = 0.0;
l_21 = -0.0375;
l_22 = 0.17;
l_28 = 1;
l_29 = 65;
l_2A = 49;
l_2B = 64;
l_38 = (0.05 + 0.275) - 0.009999999999999998;
l_DC = -1;
sub_9927(l_3A9);
while (1) {
sub_991a();
if (sub_96d3()) {
sub_9345();
}
switch (sub_9334(NETWORK::PARTICIPANT_ID_TO_INT())) {
case 0:
if (sub_9328() == 2) {
sub_92cd();
l_272 = l_CD._f7;
l_277[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/]._f1 = 2;
} else if (sub_9328() == 6) {
l_277[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/]._f1 = 5;
}
break;
case 2:
if (sub_9328() == 2) {
sub_674();
} else if (sub_9328() == 6) {
l_277[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/]._f1 = 5;
}
break;
case 5:
sub_655(&l_CD._fC);
if (sub_62c(&l_CD._fC)) {
l_277[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/]._f1 = 6;
}
break;
case 3:
l_277[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/]._f1 = 6;
case 6:
sub_9345();
break;
}
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT()) {
switch (sub_9328()) {
case 0:
l_CD._f2 = 2;
break;
case 2:
sub_1c9();
if (sub_1a6()) {
l_CD._f2 = 6;
}
break;
case 6:
break;
}
}
}
}
auto sub_1a6() {
if (sub_1ba()) {
return 1;
}
return 0;
}
auto sub_1ba() {
return GAMEPLAY::IS_BIT_SET(l_CD, 0);
}
void sub_1c9() {
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT()) {
if (l_DB >= l_277) {
l_DB = 0;
l_2DE = 0;
l_DC = -1;
GAMEPLAY::CLEAR_BIT(&l_2DD, 0);
GAMEPLAY::CLEAR_BIT(&l_2DD, 1);
GAMEPLAY::CLEAR_BIT(&l_2DD, 3);
GAMEPLAY::CLEAR_BIT(&l_2DD, 4);
GAMEPLAY::CLEAR_BIT(&l_2DD, 5);
if ((!sub_620(&l_273)) || sub_5c2(&l_273, 5000, 0)) {
GAMEPLAY::SET_BIT(&l_2DD, 2);
}
}
v_2 = l_DB;
if (sub_5c2(&l_CD._f8, 20000, 0)) {
if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(v_2))) {
v_4 = NETWORK::NETWORK_GET_PLAYER_INDEX(PLAYER::INT_TO_PARTICIPANTINDEX(v_2));
if (sub_57e(v_4, 0, 1)) {
if (!GAMEPLAY::IS_BIT_SET(l_CD, 5)) {
if (!sub_52a(v_4, 1)) {
if (GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 2)) {
if (!GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 3)) {
l_2DE += 1;
if (l_CD._f5 != v_2) {
if (l_DC == -1) {
if (!GAMEPLAY::IS_BIT_SET(l_2DD, 1)) {
GAMEPLAY::SET_BIT(&l_2DD, 1);
}
if (!GAMEPLAY::IS_BIT_SET(l_2DD, 3)) {
if (!GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 0)) {
GAMEPLAY::SET_BIT(&l_2DD, 3);
}
}
if (!GAMEPLAY::IS_BIT_SET(l_2DD, 4)) {
if (!GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 1)) {
GAMEPLAY::SET_BIT(&l_2DD, 4);
}
}
l_DC = v_2;
}
}
}
}
}
}
}
}
}
if (GAMEPLAY::IS_BIT_SET(l_2DD, 2)) {
if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(v_2))) {
v_4 = NETWORK::NETWORK_GET_PLAYER_INDEX(PLAYER::INT_TO_PARTICIPANTINDEX(v_2));
if (sub_57e(v_4, 0, 1)) {}
}
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 1)) {
if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(v_2))) {
v_4 = NETWORK::NETWORK_GET_PLAYER_INDEX(PLAYER::INT_TO_PARTICIPANTINDEX(v_2));
if (sub_57e(v_4, 0, 1)) {
v_3 = v_4;
if (GAMEPLAY::IS_BIT_SET(g_258209._f650, v_3)) {
if (!sub_620(&l_CD._fA)) {
sub_4e5(&l_CD._fA, 0, 0);
} else if (sub_5c2(&l_CD._fA, 10000, 0)) {
if (!GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 0)) {
GAMEPLAY::SET_BIT(&l_2DD, 3);
}
if (!GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 1)) {
GAMEPLAY::SET_BIT(&l_2DD, 4);
}
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 1);
GAMEPLAY::SET_BIT(&l_2DD, 5);
sub_4d8(&l_CD._fA);
}
}
}
}
}
l_DB += 1;
if (l_DB >= l_277) {
GAMEPLAY::SET_BIT(&l_2DD, 0);
if (GAMEPLAY::IS_BIT_SET(l_2DD, 2)) {
GAMEPLAY::CLEAR_BIT(&l_2DD, 2);
sub_4d8(&l_273);
sub_4e5(&l_273, 0, 0);
}
if (!GAMEPLAY::IS_BIT_SET(l_CD, 5)) {
if (GAMEPLAY::IS_BIT_SET(l_2DD, 1) || GAMEPLAY::IS_BIT_SET(l_2DD, 5)) {
if ((l_2DE >= 1) || GAMEPLAY::IS_BIT_SET(l_2DD, 5)) {
GAMEPLAY::SET_BIT(&l_CD, 5);
if (GAMEPLAY::IS_BIT_SET(l_2DD, 3)) {
GAMEPLAY::SET_BIT(&l_CD, 7);
}
if (GAMEPLAY::IS_BIT_SET(l_2DD, 4)) {
GAMEPLAY::SET_BIT(&l_CD, 8);
}
if (l_DC > -1) {
l_CD._f5 = l_DC;
if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(l_CD._f5))) {}
}
if (GAMEPLAY::IS_BIT_SET(l_2DD, 5)) {
GAMEPLAY::SET_BIT(&l_CD, 9);
}
GAMEPLAY::CLEAR_BIT(&l_2DC, 0);
}
}
}
}
}
}
void sub_4d8(auto a_0) {
a_0._f1 = 0;
}
void sub_4e5(auto a_0, auto a_1, auto a_2) {
if (a_0._f1 == 0) {
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS() && (!a_1)) {
if (!a_2) {
a_0 = NETWORK::GET_NETWORK_TIME();
} else {
a_0 = NETWORK::_89023FBBF9200E9F();
}
} else {
a_0 = GAMEPLAY::GET_GAME_TIMER();
}
a_0._f1 = 1;
}
}
auto sub_52a(auto a_0, auto a_1) {
if (a_1) {
if (sub_556(a_0)) {
return 1;
}
}
if (g_1837E7[a_0/*410*/] == -1) {
return 0;
}
return 1;
}
auto sub_556(auto a_0) {
return sub_564(a_0);
}
auto sub_564(auto a_0) {
return GAMEPLAY::IS_BIT_SET(g_1837E7[a_0/*410*/]._fD._f1, 0);
}
auto sub_57e(auto a_0, auto a_1, auto a_2) {
v_5 = a_0;
if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(a_0)) {
if (a_1) {
if (!PLAYER::IS_PLAYER_PLAYING(a_0)) {
return 0;
}
}
if (a_2) {
if (!g_2507F3._f3[v_5/*1*/]) {
return 0;
}
}
return 1;
}
return 0;
}
auto sub_5c2(auto a_0, auto a_1, auto a_2) {
if (a_1 == -1) {
return 1;
}
sub_4e5(a_0, a_2, 0);
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS() && (!a_2)) {
if (GAMEPLAY::ABSI(NETWORK::GET_TIME_DIFFERENCE(NETWORK::GET_NETWORK_TIME(), a_0)) >= a_1) {
return 1;
}
} else if (GAMEPLAY::ABSI(NETWORK::GET_TIME_DIFFERENCE(GAMEPLAY::GET_GAME_TIMER(), a_0)) >= a_1) {
return 1;
}
return 0;
}
auto sub_620(auto a_0) {
return a_0._f1;
}
auto sub_62c(auto a_0) {
if (a_0._f1) {
if (GAMEPLAY::ABSI(NETWORK::GET_TIME_DIFFERENCE(NETWORK::GET_NETWORK_TIME(), a_0)) >= 1000) {
return 1;
}
}
return 0;
}
void sub_655(auto a_0) {
if (!a_0._f1) {
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT()) {
sub_4e5(a_0, 0, 0);
}
}
}
void sub_674() {
sub_699();
switch (l_277[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/]._f2) {
case 0:
break;
}
}
void sub_699() {
v_2 = NETWORK::PARTICIPANT_ID_TO_INT();
v_3 = 0;
if (sub_57e(PLAYER::PLAYER_ID(), 0, 1)) {
if ((!sub_52a(PLAYER::PLAYER_ID(), 1)) && (sub_92b8() == 0)) {
if (!GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 2)) {
if (!sub_620(&l_2D8)) {
sub_4e5(&l_2D8, 0, 0);
} else if (sub_5c2(&l_2D8, 570000, 0)) {
GAMEPLAY::SET_BIT(&l_277[v_2/*3*/], 2);
}
}
} else {
if (GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 2)) {
sub_4d8(&l_2D8);
GAMEPLAY::CLEAR_BIT(&l_277[v_2/*3*/], 2);
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f65E, 24)) {
GAMEPLAY::CLEAR_BIT(&g_258209._f65E, 24);
}
}
if ((!sub_620(&l_2DA)) || sub_5c2(&l_2DA, 600000, 0)) {
sub_92cd();
sub_4d8(&l_2DA);
sub_4e5(&l_2DA, 0, 0);
}
if (!GAMEPLAY::IS_BIT_SET(l_277[v_2/*3*/], 3)) {
if (sub_92a3()) {
GAMEPLAY::SET_BIT(&l_277[v_2/*3*/], 3);
}
} else if (!sub_92a3()) {
GAMEPLAY::CLEAR_BIT(&l_277[v_2/*3*/], 3);
}
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 2)) {
sub_84ec(86, &l_2E0, 0);
if (sub_1d69(86, &l_2DF, &l_2E1, &g_258209._f65F, 2)) {
if (!GAMEPLAY::IS_BIT_SET(g_258209._f65F, 2)) {
v_3 = sub_18b9(17);
if (v_3 > 0) {
if (NETWORKCASH::_IS_ITEM_AVAILABLE(v_3, 0, 1, 0, -1)) {
if (sub_18a5()) {
sub_113e(0x741dadd0, v_3, &v_4, 0, 1, 0);
} else {
sub_10aa(-v_3, 1, 1, 0.0);
NETWORKCASH::_8204DA7934DF3155(v_3, 0, 1);
}
}
}
}
sub_e43(97, 1);
l_2DF = 0;
sub_4d8(&l_2E1);
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 2);
}
} else if (l_2E0 != 0) {
l_2E0 = 0;
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 3)) {
sub_84ec(18, &l_2E4, 0);
if (sub_1d69(18, &l_2E3, &l_2E5, &g_258209._f65F, 8)) {
if (!GAMEPLAY::IS_BIT_SET(g_258209._f65F, 8)) {
v_3 = sub_18b9(18);
if (v_3 > 0) {
if (NETWORKCASH::_IS_ITEM_AVAILABLE(v_3, 0, 1, 0, -1)) {
if (sub_18a5()) {
sub_113e(0x741dadd0, v_3, &v_5, 0, 1, 0);
} else {
sub_10aa(-v_3, 1, 1, 0.0);
NETWORKCASH::_8204DA7934DF3155(v_3, 0, 1);
}
}
}
}
sub_e43(99, 1);
l_2E3 = 0;
sub_4d8(&l_2E5);
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 3);
}
} else if (l_2E4 != 0) {
l_2E4 = 0;
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 0)) {
sub_84ec(12, &l_2F5, 0);
if (sub_1d69(12, &l_2F4, &l_275, &g_258209._f65E, 24)) {
if (!GAMEPLAY::IS_BIT_SET(g_258209._f65E, 24)) {
v_3 = sub_18b9(15);
if (v_3 > 0) {
if (NETWORKCASH::_IS_ITEM_AVAILABLE(v_3, 0, 1, 0, -1)) {
if (sub_18a5()) {
sub_113e(0x741dadd0, v_3, &v_6, 0, 1, 0);
} else {
sub_10aa(-v_3, 1, 1, 0.0);
NETWORKCASH::_8204DA7934DF3155(v_3, 0, 1);
}
}
}
}
sub_e43(88, 1);
l_2F4 = 0;
sub_4d8(&l_275);
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 0);
}
} else if (l_2F5 != 0) {
l_2F5 = 0;
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 6)) {
sub_84ec(12, &l_2F0, 1);
if (sub_c08(12, &l_2EF, &l_2F1, &g_1A186C, 9)) {
if (!GAMEPLAY::IS_BIT_SET(g_1A186C, 9)) {
v_3 = sub_18b9(36);
if (NETWORKCASH::_IS_ITEM_AVAILABLE(v_3, 0, 1, 0, -1)) {
if (v_3 > 0) {
if (sub_18a5()) {
sub_113e(0x741dadd0, v_3, &v_7, 0, 1, 0);
} else {
sub_10aa(-v_3, 1, 1, 0.0);
NETWORKCASH::_8204DA7934DF3155(v_3, 0, 1);
}
}
}
}
l_2EF = 0;
sub_4d8(&l_2F1);
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 6);
}
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 4)) {
sub_84ec(31, &l_2E8, 0);
if (sub_1d69(31, &l_2E7, &l_2E9, &g_258209._f65F, 9)) {
if (!GAMEPLAY::IS_BIT_SET(g_258209._f65F, 9)) {
v_3 = sub_18b9(19);
if (v_3 > 0) {
if (NETWORKCASH::_IS_ITEM_AVAILABLE(v_3, 0, 1, 0, -1)) {
if (sub_18a5()) {
sub_113e(0x741dadd0, v_3, &v_8, 0, 1, 0);
} else {
sub_10aa(-v_3, 1, 1, 0.0);
NETWORKCASH::_8204DA7934DF3155(v_3, 0, 1);
}
}
}
}
sub_e43(100, 1);
l_2E7 = 0;
sub_4d8(&l_2E9);
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 4);
}
} else if (l_2E8 != 0) {
l_2E8 = 0;
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 5)) {
sub_84ec(20, &l_2EC, 0);
if (sub_1d69(20, &l_2EB, &l_2ED, &g_258209._f660, 18)) {
if (!GAMEPLAY::IS_BIT_SET(g_258209._f660, 18)) {
v_3 = sub_18b9(21);
if (v_3 > 0) {
if (NETWORKCASH::_IS_ITEM_AVAILABLE(v_3, 0, 1, 0, -1)) {
if (sub_18a5()) {
sub_113e(0x741dadd0, v_3, &v_9, 0, 1, 0);
} else {
sub_10aa(-v_3, 1, 1, 0.0);
NETWORKCASH::_8204DA7934DF3155(v_3, 0, 1);
}
}
}
}
sub_e43(106, 1);
l_2EB = 0;
sub_4d8(&l_2ED);
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 5);
}
} else if (l_2EC != 0) {
l_2EC = 0;
}
if (GAMEPLAY::IS_BIT_SET(g_258209._f64F, 1)) {
if (!NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT()) {
GAMEPLAY::CLEAR_BIT(&g_258209._f64F, 1);
}
}
}
auto sub_c08(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4) {
if (v_7 == v_7) {}
if (a_0 == a_0) {}
switch (a_1) {
case 0:
if (!sub_620(a_2)) {
sub_4e5(a_2, 0, 0);
} else if (sub_5c2(a_2, 10000, 0)) {
l_2F3 = -1;
a_1 += 1;
GAMEPLAY::CLEAR_BIT(a_3, a_4);
}
break;
case 1:
v_7 = sub_e2e(PLAYER::PLAYER_ID());
l_2F3 = g_258209._f651;
if (l_2F3 != -1) {
sub_cb6(l_2F3);
a_1 += 1;
} else {
GAMEPLAY::SET_BIT(a_3, a_4);
a_1 = 99;
}
break;
case 99:
return 1;
break;
}
return 0;
}
void sub_cb6(auto a_0) {
if (g_24B081 <= a_0) {
return ;
}
if ((sub_e22() != 0) && (sub_e22() != 1)) {
return ;
}
g_24B21A = sub_d7e(g_24AF22[a_0/*14*/]._fC);
g_24B21B = 0;
sub_d6e(g_24AF22[a_0/*14*/]._fC);
sub_d3d(2, 0);
if (GAMEPLAY::IS_BIT_SET(g_24B20F, 19)) {
GAMEPLAY::CLEAR_BIT(&g_24B20F, 19);
sub_d27();
}
}
void sub_d27() {
g_24B21C._f2 = 0;
g_24B21C._f3 = 0;
}
void sub_d3d(auto a_0, auto a_1) {
g_24B082 = a_0;
if (a_0 != 0) {
if (a_1 != 0) {}
return ;
}
if (a_1 == 0) {
a_1 = 120000;
}
g_24B082._f12 = a_1;
}
void sub_d6e(auto a_0) {
g_24B082._f2 = a_0;
}
auto sub_d7e(auto a_0) {
if (sub_e10(a_0)) {
return 0;
}
if (sub_dfe(a_0)) {
return 1;
}
if (sub_dec(a_0)) {
return 2;
}
if (sub_dda(a_0)) {
return 3;
}
if (sub_dc8(a_0)) {
return 4;
}
return -1;
}
auto sub_dc8(auto a_0) {
return a_0 == g_40001._f1B16;
}
auto sub_dda(auto a_0) {
return a_0 == g_40001._f1B10;
}
auto sub_dec(auto a_0) {
return a_0 == g_40001._f1B0A;
}
auto sub_dfe(auto a_0) {
return a_0 == g_40001._f1B03;
}
auto sub_e10(auto a_0) {
return a_0 == g_40001._f1AFE;
}
auto sub_e22() {
return g_24B082;
}
auto sub_e2e(auto a_0) {
return g_1837E7[a_0/*410*/]._fC0._f6;
}
void sub_e43(auto a_0, auto a_1) {
v_4 = 0;
if (a_1) {
v_4 = -1;
}
switch (a_0) {
case 59:
g_200000[sub_109d()/*10270*/]._f1E12._f13 = v_4;
break;
case 19:
g_200000[sub_109d()/*10270*/]._f1E12._f12 = v_4;
break;
case 74:
g_200000[sub_109d()/*10270*/]._f1E12._fC = v_4;
break;
case 20:
g_200000[sub_109d()/*10270*/]._f1E12._fD = v_4;
break;
case 29:
g_200000[sub_109d()/*10270*/]._f1E12._fE = v_4;
break;
case 8:
g_200000[sub_109d()/*10270*/]._f1E12._fF = v_4;
break;
case 31:
g_200000[sub_109d()/*10270*/]._f1E12._f10 = v_4;
break;
case 3:
g_200000[sub_109d()/*10270*/]._f1E12._f14 = v_4;
break;
case 6:
g_200000[sub_109d()/*10270*/]._f1E12._f11 = v_4;
break;
case 98:
case 103:
case 104:
case 105:
g_200000[sub_109d()/*10270*/]._f1E12._f17 = v_4;
break;
case 76:
g_200000[sub_109d()/*10270*/]._f1E12._f18 = v_4;
break;
case 93:
g_200000[sub_109d()/*10270*/]._f1E12._f19 = v_4;
break;
case 61:
case 62:
case 63:
case 64:
case 77:
case 81:
g_200000[sub_109d()/*10270*/]._f1E12._f1A = v_4;
break;
case 65:
case 75:
case 95:
g_200000[sub_109d()/*10270*/]._f1E12._f1B = v_4;
break;
break;
case 97:
g_200000[sub_109d()/*10270*/]._f1E12._f1D = v_4;
break;
case 88:
g_200000[sub_109d()/*10270*/]._f1E12._f1C = v_4;
break;
case 100:
g_200000[sub_109d()/*10270*/]._f1E12._f1F = v_4;
break;
case 106:
g_200000[sub_109d()/*10270*/]._f1E12._f20 = v_4;
break;
case 99:
g_200000[sub_109d()/*10270*/]._f1E12._f1E = v_4;
break;
}
}
auto sub_109d() {
v_2 = 0;
return v_2;
}
void sub_10aa(auto a_0, auto a_1, auto a_2, auto a_3) {
if (a_1 < 1) {
a_1 = 1;
}
v_6 = a_0 * a_1;
a_3 = 0.0;
if (v_6 > 0) {
v_8 = 100.0 - a_3;
v_7 = SYSTEM::FLOOR(((float)v_6) * (v_8 / 100.0));
} else {
v_7 = v_6;
}
g_1837E7[PLAYER::PLAYER_ID()/*410*/]._fC0._f4 = v_7;
g_1837E7[PLAYER::PLAYER_ID()/*410*/]._fC0._f3 += v_7;
if (a_2 == 1) {
sub_112d(v_7, 0);
}
}
void sub_112d(auto a_0, auto a_1) {
if (a_1) {}
a_0 = a_0;
}
void sub_113e(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5) {
if (!sub_18a5()) {
return ;
}
v_8 = 1;
if (a_4) {
v_8 = 4;
} else if (a_3) {
v_8 = 2;
} else if (a_5) {
v_8 = 8;
}
switch (a_0) {
case 0x8180486d:
case 0x847b5e8a:
case 0x8f9e64e9:
case 0x92aeab9c:
case 0x978b277b:
case 0x9defcb5b:
case 0xad32107e:
case 0xaef994e9:
case 0xb3e76d2c:
case 0xb62639d4:
case 0xc571db3d:
case 0xca5e1b40:
case 0xcbbc5d1e:
case 0xd30e80f5:
case 0xd80064a4:
case 0xd86d0371:
case 0xdb72fd6e:
case 0xdd16a585:
case 0xe1286116:
case 0xe13b1f5a:
case 0xe7ba9a2c:
case 0xf2beff3e:
case 0xf54343ef:
case 0xfa3e19a3:
case 0x40e0f34:
case 0x108cd6ee:
case 0x10e398b4:
case 0x11611c06:
case 0x15dafb97:
case 0x1b14f96b:
case 0x25cfceff:
case 0x26c85ca3:
case 0x2a6b291e:
case 0x2c41a631:
case 0x3cf098e4:
case 0x3dc70f44:
case 0x3f79e8b3:
case 0x421452ff:
case 0x45f48c05:
case 0x467e2916:
case 0x48090eba:
case 0x5a58e3bd:
case 0x5d40f1f0:
case 0x601646d2:
case 0x61f840eb:
case 0x62a4b6cc:
case 0x6597c63c:
case 0x6da50854:
case 0x7323dab3:
case 0x73af3590:
case 0x741dadd0:
case 0x79d2be32:
case 0x7a31f111:
case 0x7f096f7d:
if (a_1 > 0) {
sub_1460(a_2, 0xbc537e0d, 0x2005d9a9, 0x57de404e, a_0, a_1, v_8, 7);
}
break;
case 0x862fb02e:
case 0x89ad02ce:
case 0x8a91e076:
case 0x8b70731d:
case 0x8d682613:
case 0xa174f633:
case 0xa87819a3:
case 0xaca75aae:
case 0xaec77375:
case 0xb77dd8b4:
case 0xb8d124be:
case 0xb94ddb9b:
case 0xbcd304b8:
case 0xbfcbe6b6:
case 0xc2c5e339:
case 0xc4f96e65:
case 0xc84d30cc:
case 0xccfa5f2d:
case 0xcf63bf45:
case 0xd89979ee:
case 0xeaff75bd:
case 0xf353df93:
case 0xf6c6f8d3:
case 0xf97db87a:
case 0xfc71898e:
case 0xfc8d0020:
case 0xfd389995:
case 0xfe249573:
case 0x16b1cde:
case 0x6a679fe:
case 0xc92ecef:
case 0x129a5b6e:
case 0x176d9d54:
case 0x2183c4d7:
case 0x2195c3d1:
case 0x21ecda63:
case 0x267cbc1b:
case 0x29358006:
case 0x2ad8ed30:
case 0x2dc5587f:
case 0x3530c574:
case 0x381ae70b:
case 0x39b3a1a7:
case 0x3e7aa93e:
case 0x4cbac3aa:
case 0x4d8c639e:
case 0x506a6af5:
case 0x5841cc24:
case 0x5a26eaef:
case 0x5aef7c87:
case 0x5e0b0a1c:
case 0x60988977:
case 0x628502b3:
case 0x676706d3:
case 0x67878154:
case 0x6a22d039:
case 0x74ec47ce:
case 0x762d6bf6:
sub_1460(a_2, 0xbc537e0d, 0x562592bb, 0x57de404e, a_0, a_1, v_8, 7);
break;
}
}
auto sub_1460(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6, auto a_7) {
v_A = 0;
if (!sub_18a5()) {
v_A = 1;
}
if (!v_A) {
if ((!UNK3::_B24F0944DA203D9E(sub_1899())) || UNK3::_810E8431C0614BF9()) {
g_26FCCA = 1;
return 0;
}
if (g_254382) {
if ((a_3 == 0x3fa29128) || (a_3 == 0xb2491b6e)) {
g_26FCCB = 1;
return 0;
}
}
}
v_C = 0;
for (v_B = 0; v_B < 5; v_B += 1) {
if (g_26FAE6[v_B/*72*/]._f2 == 0) {
v_C = 1;
}
}
if (!v_C) {
return 0;
}
a_0 = 5;
v_D = 0x7fffffff;
if (v_A || UNK3::_3C5FD37B5499582E(&v_D, a_3, a_4, a_2, a_5, a_6)) {
if (v_A || UNK3::_39BE7CEA8D9CC8E6(v_D)) {
a_0 = sub_17c5(v_D, a_1, a_4, a_2, a_3, a_5, 0, a_6, a_7);
if (v_A) {
if (a_0 != -1) {
g_26FAE6[a_0/*72*/]._f41 = 1;
}
}
g_26FCC2 = 1;
return 1;
}
} else {
if ((a_7 & 2) != 0) {
g_26FCC9 = 1;
g_26FCCC = a_4;
g_26FCCE = a_3;
g_26FCCF = 1;
g_26FCCD = a_5;
}
if ((a_7 & 8) != 0) {
g_26FCCC = a_4;
g_26FCCE = a_3;
g_26FCCF = 1;
g_26FCCD = a_5;
}
v_E = 0;
if (v_E) {
sub_17b1(1, a_4);
g_26FCC9 = 0;
}
if ((a_7 & 4) != 0) {
sub_15d4(-1, a_4, a_6, a_5, -1);
}
}
return 0;
}
void sub_15d4(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4) {
switch (a_1) {
case 0x6597c63c:
GAMEPLAY::SET_BIT(&g_24E1AF[PLAYER::PLAYER_ID()/*306*/]._f79._f47, 0);
break;
}
if (a_0 != -1) {
sub_160c(a_0);
}
}
void sub_160c(auto a_0) {
v_3 = 0;
if (!sub_18a5()) {
v_3 = 1;
}
if (a_0 != -1) {
if (sub_1789(a_0)) {
if (!v_3) {
__678_$22A86DAAC9EDB234();
}
} else if (!v_3) {
UNK3::_E2A99A9B524BEFFF(g_26FAE6[a_0/*72*/]);
}
sub_165e(&g_26FAE6[a_0/*72*/]);
}
}
void sub_165e(auto a_0) {
a_0 = 0;
a_0 = 0x7fffffff;
a_0._f1 = 0;
a_0._f2 = 0;
a_0._f3 = 0xa10aed30;
a_0._f4 = 0x83b4a55b;
a_0._f5 = 0;
a_0._f6 = 0x492b4a93;
a_0._f7 = 0xbabfd2a5;
a_0._f8 = 0;
a_0._f8._f1 = 0;
a_0._f8._f2 = 0;
sub_1741(&a_0._f8._f3);
sub_1741(&a_0._f8._f10);
a_0._f8._f1D/*"32"*/ = "";
a_0._f8._f25/*"24"*/ = "";
a_0._f8._f2B/*"16"*/ = "";
a_0._f8._f2F/*"16"*/ = "";
a_0._f8._f33 = 0;
a_0._f8._f34 = 0;
a_0._f8._f35 = 0;
a_0._f8._f36 = 0;
a_0._f8._f37 = 0;
a_0._f8._f38 = 0;
a_0._f41 = 0;
a_0._f42 = 0;
a_0._f43 = 0;
a_0._f44 = 0;
a_0._f45 = 0;
a_0._f46 = 0;
a_0._f47 = 0;
}
void sub_1741(auto a_0) {
a_0 = 0;
a_0._f1 = 0;
a_0._f2 = 0;
a_0._f3 = 0;
a_0._f4 = 0;
a_0._f5 = 0;
a_0._f6 = 0;
a_0._f7 = 0;
a_0._f8 = 0;
a_0._f9 = 0;
a_0._fA = 0;
a_0._fB = 0;
a_0._fC = 0;
}
auto sub_1789(auto a_0) {
if ((a_0 >= 0) && (a_0 < 5)) {
return g_26FAE6[a_0/*72*/]._f5 == 1;
}
return 0;
}
void sub_17b1(auto a_0, auto a_1) {
g_254880 = a_1;
g_25487F = a_0;
}
auto sub_17c5(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6, auto a_7, auto a_8) {