Complete decompilation of the retail Asheron's Call client using Ghidra 12.0.4 + pyghidra headless. 22,225 of 22,226 functions successfully decompiled in 75 seconds. Output: docs/research/decompiled/ (54 files, 688,567 lines of C) Key findings already identified: - CLandBlockStruct::ConstructPolygons at chunk_00530000.c:2270 (split direction formula with 0x0CCAC033 constants) - Motion command handlers at chunk_00510000.c (0x45000005 etc) - Motion interpreter at chunk_00520000.c - Portal space UI at chunk_004D0000.c and chunk_00560000.c Next: identify CPhysicsObj, CMotionInterp, collision, and movement functions by cross-referencing against ACE's C# port. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9462 lines
254 KiB
C
9462 lines
254 KiB
C
// Decompiled from acclient.exe — chunk 0x004E0000
|
|
// Ghidra 12.0.4 + pyghidra headless
|
|
|
|
// --- FUN_004e0cd0 at 0x004E0CD0 (size: 3662) ---
|
|
|
|
|
|
void __thiscall
|
|
|
|
FUN_004e0cd0(int param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5,
|
|
|
|
undefined4 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9,
|
|
|
|
undefined4 param_10,undefined4 param_11,undefined4 param_12,undefined4 param_13,
|
|
|
|
undefined4 param_14,int param_15)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
char cVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int *piVar5;
|
|
|
|
int iVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
undefined1 *puVar8;
|
|
|
|
undefined *puVar9;
|
|
|
|
int *piVar10;
|
|
|
|
int **ppiVar11;
|
|
|
|
int *local_1fc;
|
|
|
|
undefined4 uStack_1f8;
|
|
|
|
undefined4 uStack_1f4;
|
|
|
|
undefined4 uStack_1f0;
|
|
|
|
undefined4 uStack_1ec;
|
|
|
|
undefined4 uStack_1e8;
|
|
|
|
undefined4 uStack_1e4;
|
|
|
|
int *piStack_1e0;
|
|
|
|
undefined4 uStack_1dc;
|
|
|
|
undefined4 uStack_1d8;
|
|
|
|
undefined4 uStack_1d4;
|
|
|
|
undefined4 uStack_1d0;
|
|
|
|
int local_1cc;
|
|
|
|
undefined4 local_1c8;
|
|
|
|
undefined4 local_1c4;
|
|
|
|
undefined4 local_1c0;
|
|
|
|
int iStack_1bc;
|
|
|
|
undefined4 local_1b8;
|
|
|
|
undefined1 local_1b4 [148];
|
|
|
|
undefined1 auStack_120 [136];
|
|
|
|
undefined1 auStack_98 [152];
|
|
|
|
|
|
|
|
uVar4 = FUN_0055e1d0();
|
|
|
|
*(undefined4 *)(param_1 + 0x5fc) = uVar4;
|
|
|
|
local_1cc = FUN_0055e1e0();
|
|
|
|
local_1b8 = *(undefined4 *)(local_1cc + 0x254);
|
|
|
|
FUN_005c7d60(1);
|
|
|
|
FUN_005c6330(0xffffffff);
|
|
|
|
ppiVar11 = &local_1fc;
|
|
|
|
puVar8 = local_1b4;
|
|
|
|
puVar9 = &DAT_007bfd28;
|
|
|
|
local_1fc = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar8,&DAT_007bfd28,ppiVar11);
|
|
|
|
FUN_00406570(puVar8,puVar9,ppiVar11);
|
|
|
|
piVar5 = local_1fc;
|
|
|
|
uVar4 = 0;
|
|
|
|
local_1c4 = 0;
|
|
|
|
local_1c0 = 0;
|
|
|
|
piVar10 = local_1fc;
|
|
|
|
if (local_1fc != (int *)0x0) {
|
|
|
|
(**(code **)(*local_1fc + 0x10))(local_1fc,0);
|
|
|
|
}
|
|
|
|
FUN_0048bb00(&local_1c8,piVar10,uVar4);
|
|
|
|
if (piVar5 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar5 + 0x14))();
|
|
|
|
}
|
|
|
|
uStack_1f4 = 0;
|
|
|
|
FUN_00590c20(0x71,&uStack_1f4,0,0);
|
|
|
|
FUN_005c7480(uStack_1f4);
|
|
|
|
uStack_1f8 = 0;
|
|
|
|
FUN_00590c20(0xbc,&uStack_1f8,0,0);
|
|
|
|
FUN_005c7780(uStack_1f8);
|
|
|
|
iStack_1bc = DAT_0084155c;
|
|
|
|
FUN_00590d20(6,&iStack_1bc);
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x1000059e);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = uVar4;
|
|
|
|
*(undefined4 *)(param_1 + 0x644) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x1000059f);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x60c) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005a0);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005a1);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x614) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005a2);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
iVar6 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar6 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x618) = iVar6;
|
|
|
|
if (iVar6 != 0) {
|
|
|
|
iVar6 = FUN_00463c00(0x1000030a);
|
|
|
|
if (iVar6 != 0) {
|
|
|
|
FUN_00460820(0xd,1);
|
|
|
|
}
|
|
|
|
iVar6 = FUN_00463c00(0x1000030b);
|
|
|
|
if (iVar6 != 0) {
|
|
|
|
FUN_00460820(0xd,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar4 = FUN_00463c00(0x1000059d);
|
|
|
|
*(undefined4 *)(param_1 + 0x634) = uVar4;
|
|
|
|
local_1fc = (int *)0x0;
|
|
|
|
uVar4 = local_1c8;
|
|
|
|
do {
|
|
|
|
switch(local_1fc) {
|
|
|
|
case (int *)0x0:
|
|
|
|
uVar4 = 0x1000030f;
|
|
|
|
local_1c8 = 0x10000318;
|
|
|
|
break;
|
|
|
|
case (int *)0x1:
|
|
|
|
uVar4 = 0x10000310;
|
|
|
|
local_1c8 = 0x10000319;
|
|
|
|
break;
|
|
|
|
case (int *)0x2:
|
|
|
|
uVar4 = 0x10000311;
|
|
|
|
local_1c8 = 0x1000031a;
|
|
|
|
break;
|
|
|
|
case (int *)0x3:
|
|
|
|
uVar4 = 0x10000312;
|
|
|
|
local_1c8 = 0x1000031b;
|
|
|
|
break;
|
|
|
|
case (int *)0x4:
|
|
|
|
uVar4 = 0x10000313;
|
|
|
|
local_1c8 = 0x1000031c;
|
|
|
|
break;
|
|
|
|
case (int *)0x5:
|
|
|
|
uVar4 = 0x10000314;
|
|
|
|
local_1c8 = 0x1000031d;
|
|
|
|
break;
|
|
|
|
case (int *)0x6:
|
|
|
|
uVar4 = 0x10000315;
|
|
|
|
local_1c8 = 0x1000031e;
|
|
|
|
break;
|
|
|
|
case (int *)0x7:
|
|
|
|
uVar4 = 0x10000316;
|
|
|
|
local_1c8 = 0x1000031f;
|
|
|
|
break;
|
|
|
|
case (int *)0x8:
|
|
|
|
uVar4 = 0x10000317;
|
|
|
|
local_1c8 = 0x10000320;
|
|
|
|
}
|
|
|
|
iVar6 = (int)local_1fc * 0x1c + param_1;
|
|
|
|
uVar7 = FUN_00463c00(uVar4);
|
|
|
|
*(undefined4 *)(iVar6 + 0x778) = uVar7;
|
|
|
|
uVar7 = FUN_00463c00(local_1c8);
|
|
|
|
*(undefined4 *)(iVar6 + 0x77c) = uVar7;
|
|
|
|
local_1fc = (int *)((int)local_1fc + 1);
|
|
|
|
} while ((int)local_1fc < 9);
|
|
|
|
uVar4 = FUN_00463c00(0x1000030e);
|
|
|
|
*(undefined4 *)(param_1 + 0x638) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x10000321);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(0xb);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x630) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x1000059b);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(0xd);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x648) = uVar4;
|
|
|
|
iVar6 = FUN_005df0f5(0x60);
|
|
|
|
if (iVar6 == 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = FUN_004ef310();
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x64c) = uVar4;
|
|
|
|
FUN_004ef3f0(*(undefined4 *)(param_1 + 0x648));
|
|
|
|
*(undefined4 *)(param_1 + 0x660) = 0x43340000;
|
|
|
|
FUN_004ef220(0x43340000);
|
|
|
|
uStack_1d8 = 0;
|
|
|
|
uStack_1d4 = 0;
|
|
|
|
uStack_1d0 = 0;
|
|
|
|
uStack_1ec = 0;
|
|
|
|
uStack_1e8 = 0xbf266666;
|
|
|
|
uStack_1e4 = 0x3fd9999a;
|
|
|
|
FUN_004ef240(&uStack_1ec,&uStack_1d8);
|
|
|
|
uStack_1ec = 0x3e99999a;
|
|
|
|
uStack_1e8 = 0x3ff33333;
|
|
|
|
uStack_1e4 = 0x3f266666;
|
|
|
|
FUN_0046be40(1,0x40000000,&uStack_1ec);
|
|
|
|
FUN_004523d0();
|
|
|
|
iVar6 = *(int *)(local_1cc + 0xd4);
|
|
|
|
if (iVar6 == 6) {
|
|
|
|
uStack_1ec = 0;
|
|
|
|
uStack_1e8 = 0;
|
|
|
|
uStack_1e4 = 0;
|
|
|
|
uStack_1d8 = 0;
|
|
|
|
uStack_1d4 = 0xbf4ccccd;
|
|
|
|
uStack_1d0 = 0x3fc00000;
|
|
|
|
FUN_004ef240(&uStack_1d8,&uStack_1ec);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x610) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x614) + 0x18))(0);
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar7 = 0x10000002;
|
|
|
|
uVar4 = FUN_004016b0("ID_CharGen_GearText_HairButton",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(&local_1b8,0,1);
|
|
|
|
uVar7 = 0x10000002;
|
|
|
|
uVar4 = FUN_004016b0("ID_CharGen_GearText_EyesButton",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(auStack_98,0,1);
|
|
|
|
if (*(int *)(param_1 + 0x60c) != 0) {
|
|
|
|
iVar6 = FUN_00463c00(0x1000030a);
|
|
|
|
if (iVar6 != 0) {
|
|
|
|
FUN_00460820(0xd,1);
|
|
|
|
}
|
|
|
|
iVar6 = FUN_00463c00(0x1000030b);
|
|
|
|
if (iVar6 != 0) {
|
|
|
|
FUN_00460820(0xd,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x618) + 0x2c))(0,0x58);
|
|
|
|
uVar7 = 0x10000002;
|
|
|
|
uVar4 = FUN_004016b0("ID_CharGen_GearText_SkinButton",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(auStack_120,0,1);
|
|
|
|
FUN_0042e590();
|
|
|
|
FUN_0042e590();
|
|
|
|
LAB_004e140d:
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
else if ((iVar6 == 0xc) || (iVar6 == 0xd)) {
|
|
|
|
uStack_1ec = 0;
|
|
|
|
uStack_1e8 = 0;
|
|
|
|
uStack_1e4 = 0;
|
|
|
|
uStack_1d8 = 0;
|
|
|
|
uStack_1d4 = 0xbf4ccccd;
|
|
|
|
uStack_1d0 = 0x3fc00000;
|
|
|
|
FUN_004ef240(&uStack_1d8,&uStack_1ec);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x610) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x614) + 0x18))(0);
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar7 = 0x10000002;
|
|
|
|
uVar4 = FUN_004016b0("ID_CharGen_OlthoiText_HairButton",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(auStack_98,0,1);
|
|
|
|
uVar7 = 0x10000002;
|
|
|
|
uVar4 = FUN_004016b0("ID_CharGen_OlthoiText_EyesButton",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(&local_1b8,0,1);
|
|
|
|
if (*(int *)(param_1 + 0x60c) != 0) {
|
|
|
|
iVar6 = FUN_00463c00(0x1000030a);
|
|
|
|
if (iVar6 != 0) {
|
|
|
|
FUN_00460820(0xd,1);
|
|
|
|
}
|
|
|
|
iVar6 = FUN_00463c00(0x1000030b);
|
|
|
|
if (iVar6 != 0) {
|
|
|
|
FUN_00460820(0xd,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x618) + 0x2c))(0,0x58);
|
|
|
|
uVar7 = 0x10000002;
|
|
|
|
uVar4 = FUN_004016b0("ID_CharGen_OlthoiText_SkinButton",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(auStack_120,0,1);
|
|
|
|
FUN_0042e590();
|
|
|
|
FUN_0042e590();
|
|
|
|
goto LAB_004e140d;
|
|
|
|
}
|
|
|
|
FUN_004df880();
|
|
|
|
uVar1 = 0;
|
|
|
|
if ((((param_15 == DAT_0081c8f8) || (param_15 == DAT_0081c8fc)) || (param_15 == DAT_0081c910)) ||
|
|
|
|
(param_15 == DAT_0081c914)) {
|
|
|
|
uVar1 = 1;
|
|
|
|
}
|
|
|
|
local_1fc = (int *)CONCAT31(local_1fc._1_3_,param_4 == DAT_0081c8d0);
|
|
|
|
iVar6 = FUN_005c3db0(uStack_1f8,uStack_1f4,param_3,param_4 == DAT_0081c8d0);
|
|
|
|
*(int *)(param_1 + 0x694) = iVar6;
|
|
|
|
if (iVar6 < *(int *)(param_1 + 0x690)) {
|
|
|
|
if (iVar6 < 0) {
|
|
|
|
*(int *)(param_1 + 0x694) = *(int *)(param_1 + 0x690) + -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x694) = 0;
|
|
|
|
}
|
|
|
|
iVar6 = FUN_0055e1e0();
|
|
|
|
*(undefined4 *)(iVar6 + 0xf0) = *(undefined4 *)(param_1 + 0x694);
|
|
|
|
FUN_004dfa80(1);
|
|
|
|
iVar6 = FUN_005c3ee0(uStack_1f8,uStack_1f4,param_6,uVar1,local_1fc);
|
|
|
|
*(int *)(param_1 + 0x6ac) = iVar6;
|
|
|
|
if (iVar6 < *(int *)(param_1 + 0x6a8)) {
|
|
|
|
if (iVar6 < 0) {
|
|
|
|
*(int *)(param_1 + 0x6ac) = *(int *)(param_1 + 0x6a8) + -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x6ac) = 0;
|
|
|
|
}
|
|
|
|
iVar6 = FUN_0055e1e0();
|
|
|
|
*(undefined4 *)(iVar6 + 0xdc) = *(undefined4 *)(param_1 + 0x6ac);
|
|
|
|
FUN_004dfa80(2);
|
|
|
|
iVar6 = FUN_005c4050(uStack_1f8,uStack_1f4,param_8,uVar1);
|
|
|
|
*(int *)(param_1 + 0x6c4) = iVar6;
|
|
|
|
if (iVar6 < *(int *)(param_1 + 0x6c0)) {
|
|
|
|
if (iVar6 < 0) {
|
|
|
|
*(int *)(param_1 + 0x6c4) = *(int *)(param_1 + 0x6c0) + -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x6c4) = 0;
|
|
|
|
}
|
|
|
|
iVar6 = FUN_0055e1e0();
|
|
|
|
*(undefined4 *)(iVar6 + 0xe0) = *(undefined4 *)(param_1 + 0x6c4);
|
|
|
|
FUN_004dfa80(3);
|
|
|
|
iVar6 = FUN_005c4170(uStack_1f8,uStack_1f4,param_10,uVar1);
|
|
|
|
*(int *)(param_1 + 0x6dc) = iVar6;
|
|
|
|
if (iVar6 < *(int *)(param_1 + 0x6d8)) {
|
|
|
|
if (iVar6 < 0) {
|
|
|
|
*(int *)(param_1 + 0x6dc) = *(int *)(param_1 + 0x6d8) + -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x6dc) = 0;
|
|
|
|
}
|
|
|
|
iVar6 = FUN_0055e1e0();
|
|
|
|
*(undefined4 *)(iVar6 + 0xe4) = *(undefined4 *)(param_1 + 0x6dc);
|
|
|
|
FUN_004dfa80(4);
|
|
|
|
uStack_1f0 = 0;
|
|
|
|
piStack_1e0 = (int *)0x0;
|
|
|
|
uStack_1dc = 0;
|
|
|
|
FUN_004dfa80(1);
|
|
|
|
FUN_005c4380(uStack_1f8,uStack_1f4,param_13,&uStack_1f0,&piStack_1e0);
|
|
|
|
iVar6 = local_1cc;
|
|
|
|
FUN_005c4890(uStack_1f0);
|
|
|
|
FUN_005c4860(piStack_1e0,uStack_1dc);
|
|
|
|
FUN_004df7d0(uStack_1f0);
|
|
|
|
FUN_004df060(piStack_1e0,uStack_1dc);
|
|
|
|
FUN_005c4290(uStack_1f8,uStack_1f4,param_12,&piStack_1e0);
|
|
|
|
FUN_005c4830(piStack_1e0,uStack_1dc);
|
|
|
|
FUN_005c44e0(uStack_1f8,uStack_1f4,param_14,&uStack_1f0);
|
|
|
|
FUN_005c48b0(uStack_1f0);
|
|
|
|
cVar3 = FUN_004603a0();
|
|
|
|
if (cVar3 != '\0') {
|
|
|
|
FUN_004ef660();
|
|
|
|
}
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005a4);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x600) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005a5);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x604) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005a6);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x61c) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005a7);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x620) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005c9);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x624) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005ca);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x628) = uVar4;
|
|
|
|
piVar5 = (int *)FUN_00463c00(0x100005cb);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar5 + 0x94))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x62c) = uVar4;
|
|
|
|
iVar6 = *(int *)(iVar6 + 0xd4);
|
|
|
|
if (iVar6 == 6) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x628) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x62c) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x61c) + 0x2c))(0x160,0x112);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x620) + 0x2c))(0xe8,0x112);
|
|
|
|
goto LAB_004e1b04;
|
|
|
|
}
|
|
|
|
if (iVar6 == 9) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x18))(1);
|
|
|
|
uVar7 = 0x10000001;
|
|
|
|
uVar4 = FUN_004016b0("ID_Barber_Empyrean_Earthbound",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(local_1b4,0,1);
|
|
|
|
piVar5 = *(int **)(param_1 + 0x624);
|
|
|
|
if (param_15 == 0) {
|
|
|
|
LAB_004e195e:
|
|
|
|
(**(code **)(*piVar5 + 0x9c))(1);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
(**(code **)(*piVar5 + 0x9c))(6);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (iVar6 == 0xb) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
if (param_15 != DAT_0084155c) {
|
|
|
|
*(int *)(*(int *)(param_1 + 0x64c) + 0x3c) = param_15;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x18))(1);
|
|
|
|
uVar7 = 0x10000001;
|
|
|
|
uVar4 = FUN_004016b0("ID_Barber_Undead_NoFlame",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(local_1b4,0,1);
|
|
|
|
if ((param_15 != DAT_0081c914) &&
|
|
|
|
(iVar6 = DAT_0081c904, iVar2 = DAT_0081c8fc, param_15 != DAT_0081c91c))
|
|
|
|
goto joined_r0x004e1a8d;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (iVar6 == 5) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
if (param_15 != DAT_0084155c) {
|
|
|
|
*(int *)(*(int *)(param_1 + 0x64c) + 0x3c) = param_15;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x18))(1);
|
|
|
|
uVar7 = 0x10000001;
|
|
|
|
uVar4 = FUN_004016b0("ID_Barber_Shadow_NoCrown",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(local_1b4,0,1);
|
|
|
|
iVar6 = DAT_0081c938;
|
|
|
|
iVar2 = DAT_0081c928;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (iVar6 != 10) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x628) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x62c) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x61c) + 0x2c))(0x160,0x112);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x620) + 0x2c))(0xe8,0x112);
|
|
|
|
goto LAB_004e1b04;
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
if (param_15 != DAT_0084155c) {
|
|
|
|
*(int *)(*(int *)(param_1 + 0x64c) + 0x3c) = param_15;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x18))(1);
|
|
|
|
uVar7 = 0x10000001;
|
|
|
|
uVar4 = FUN_004016b0("ID_Barber_Shadow_NoCrown",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar4,uVar7);
|
|
|
|
FUN_0046a370(local_1b4,0,1);
|
|
|
|
iVar6 = DAT_0081c958;
|
|
|
|
iVar2 = DAT_0081c948;
|
|
|
|
}
|
|
|
|
joined_r0x004e1a8d:
|
|
|
|
if ((param_15 != iVar2) && (param_15 != iVar6)) {
|
|
|
|
piVar5 = *(int **)(param_1 + 0x624);
|
|
|
|
goto LAB_004e195e;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x9c))(6);
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x628) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x62c) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x61c) + 0x2c))(0x160,0x12a);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x620) + 0x2c))(0xe8,0x12a);
|
|
|
|
FUN_0042e590();
|
|
|
|
LAB_004e1b04:
|
|
|
|
if (piStack_1e0 != (int *)0x0) {
|
|
|
|
(**(code **)(*piStack_1e0 + 0x14))();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1bd0 at 0x004E1BD0 (size: 361) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e1bd0(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
*param_1 = &PTR_FUN_007c0498;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x17f] = 0;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
param_1[0x183] = 0;
|
|
|
|
param_1[0x184] = 0;
|
|
|
|
param_1[0x185] = 0;
|
|
|
|
param_1[0x186] = 0;
|
|
|
|
param_1[0x187] = 0;
|
|
|
|
param_1[0x188] = 0;
|
|
|
|
param_1[0x189] = 0;
|
|
|
|
param_1[0x18a] = 0;
|
|
|
|
param_1[0x18b] = 0;
|
|
|
|
param_1[0x18e] = 0;
|
|
|
|
param_1[399] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 400) = 1;
|
|
|
|
param_1[0x191] = 0xffffffff;
|
|
|
|
param_1[0x192] = 0xffffffff;
|
|
|
|
*(undefined1 *)(param_1 + 0x193) = 0;
|
|
|
|
param_1[0x194] = 0xffffffff;
|
|
|
|
param_1[0x195] = 0;
|
|
|
|
param_1[0x196] = 0;
|
|
|
|
param_1[0x197] = 0x3ff00000;
|
|
|
|
param_1[0x198] = 0;
|
|
|
|
param_1[0x199] = 0;
|
|
|
|
param_1[0x19a] = 0;
|
|
|
|
param_1[0x19b] = 0;
|
|
|
|
param_1[0x19c] = 0;
|
|
|
|
param_1[0x19d] = 0;
|
|
|
|
param_1[0x19e] = 0;
|
|
|
|
param_1[0x19f] = 0;
|
|
|
|
param_1[0x1a0] = 0;
|
|
|
|
param_1[0x1a1] = 0;
|
|
|
|
param_1[0x1a2] = 0;
|
|
|
|
param_1[0x1a3] = 0;
|
|
|
|
param_1[0x1a4] = 0;
|
|
|
|
param_1[0x1a5] = 0;
|
|
|
|
param_1[0x1a6] = 0;
|
|
|
|
param_1[0x1a7] = 0;
|
|
|
|
param_1[0x1a8] = 0;
|
|
|
|
param_1[0x1a9] = 0;
|
|
|
|
param_1[0x1aa] = 0;
|
|
|
|
param_1[0x1ab] = 0;
|
|
|
|
param_1[0x1ac] = 0;
|
|
|
|
param_1[0x1ad] = 0;
|
|
|
|
param_1[0x1ae] = 0;
|
|
|
|
param_1[0x1af] = 0;
|
|
|
|
param_1[0x1b0] = 0;
|
|
|
|
param_1[0x1b1] = 0;
|
|
|
|
FUN_0043c680();
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1da0 at 0x004E1DA0 (size: 37) ---
|
|
|
|
|
|
void __thiscall FUN_004e1da0(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x5fc) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x600) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x604) = param_3;
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1dd0 at 0x004E1DD0 (size: 33) ---
|
|
|
|
|
|
void __thiscall FUN_004e1dd0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x5fc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x600) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x604) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1e00 at 0x004E1E00 (size: 27) ---
|
|
|
|
|
|
void __fastcall FUN_004e1e00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x5fc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x600) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x604) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1e20 at 0x004E1E20 (size: 18) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004e1e20(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0x668) == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return *(undefined4 *)(*(int *)(param_1 + 0x668) + 0x400);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1e40 at 0x004E1E40 (size: 65) ---
|
|
|
|
|
|
void __thiscall FUN_004e1e40(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((*(int *)(param_1 + 0x608) != 0) && (FUN_0058cf00(param_2), *(int *)(param_1 + 0x62c) == 0))
|
|
|
|
&& (*(int **)(param_1 + 0x674) != (int *)0x0)) {
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004e1e79. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x674) + 0x18))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1e90 at 0x004E1E90 (size: 46) ---
|
|
|
|
|
|
void __thiscall FUN_004e1e90(int param_1,char param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x684) != 0) {
|
|
|
|
cVar1 = FUN_004603a0();
|
|
|
|
if (cVar1 != param_2) {
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004e1eb7. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x684) + 0x18))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1ec0 at 0x004E1EC0 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_004e1ec0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x648) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1ed0 at 0x004E1ED0 (size: 51) ---
|
|
|
|
|
|
void __thiscall FUN_004e1ed0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((param_2 == 0) || (*(char *)(param_1 + 0x640) != '\0')) {
|
|
|
|
*(int *)(param_1 + 0x614) = param_2;
|
|
|
|
if (*(int **)(param_1 + 0x670) != (int *)0x0) {
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004e1efd. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x670) + 0x18))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1f10 at 0x004E1F10 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_004e1f10(int param_1,undefined1 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined1 *)(param_1 + 0x640) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1f20 at 0x004E1F20 (size: 37) ---
|
|
|
|
|
|
void __thiscall FUN_004e1f20(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
piVar1 = *(int **)(param_1 + 0x688);
|
|
|
|
if ((piVar1 != (int *)0x0) && (param_2 != piVar1[0x100])) {
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004e1f3c. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(*piVar1 + 0x9c))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1f50 at 0x004E1F50 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_004e1f50(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x650) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e1fa0 at 0x004E1FA0 (size: 91) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e1fa0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x17e;
|
|
|
|
*param_1 = &PTR_FUN_007c0498;
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2000 at 0x004E2000 (size: 19) ---
|
|
|
|
|
|
void FUN_004e2000(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000032,&LAB_004e1d70);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2020 at 0x004E2020 (size: 355) ---
|
|
|
|
|
|
void __thiscall FUN_004e2020(int *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
iVar3 = *(int *)(param_2 + 8);
|
|
|
|
if (iVar3 == 0x3e) {
|
|
|
|
if (*(int *)(param_2 + 0xc) == 0) {
|
|
|
|
piVar1 = (int *)param_1[0x1a2];
|
|
|
|
if ((piVar1 != (int *)0x0) && (piVar1[0x100] != 0x1000003f)) {
|
|
|
|
(**(code **)(*piVar1 + 0x9c))(0x1000003f);
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = *(int *)(DAT_0083e03c + 0x31c);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
piVar1 = (int *)param_1[0x1a2];
|
|
|
|
if ((piVar1 != (int *)0x0) && (piVar1[0x100] != 0x1000003f)) {
|
|
|
|
(**(code **)(*piVar1 + 0x9c))(0x1000003f);
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
piVar1 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000031);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_004e4090(iVar3,param_1);
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (iVar3 == 0x21) {
|
|
|
|
piVar1 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
iVar3 = (**(code **)(*piVar1 + 0x94))(0x10000031);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_004e3f60(*(undefined4 *)(param_2 + 0x14),*(undefined4 *)(param_2 + 0x18));
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((iVar3 == 0x15) && (param_1[0x182] != 0)) {
|
|
|
|
FUN_0058cf00(0);
|
|
|
|
if ((param_1[0x18b] == 0) && ((int *)param_1[0x19d] != (int *)0x0)) {
|
|
|
|
(**(code **)(*(int *)param_1[0x19d] + 0x18))(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2190 at 0x004E2190 (size: 137) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e2190(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int **)(param_1 + 0x668) == (int *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x668) + 0x9c))(param_2);
|
|
|
|
if (*(int **)(param_1 + 0x698) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x698) + 0x9c))(param_2);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x66c) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x66c) + 0x9c))(param_2);
|
|
|
|
}
|
|
|
|
if (param_2 == 0x1000001c) {
|
|
|
|
*(uint *)(param_1 + 0xa4) = *(uint *)(param_1 + 0xa4) & 0xffffffdf;
|
|
|
|
*(undefined4 *)(param_1 + 0x61c) = 0;
|
|
|
|
FUN_004626c0();
|
|
|
|
*(undefined4 *)(param_1 + 0x614) = 0;
|
|
|
|
if (*(int **)(param_1 + 0x670) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x670) + 0x18))(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2220 at 0x004E2220 (size: 333) ---
|
|
|
|
|
|
void __thiscall FUN_004e2220(int param_1,int param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
char cVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
undefined4 *local_10;
|
|
|
|
int *local_c;
|
|
|
|
undefined4 uStack_8;
|
|
|
|
int *piStack_4;
|
|
|
|
|
|
|
|
iVar3 = param_2;
|
|
|
|
piVar1 = *(int **)(param_1 + 0x678);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
if (param_2 < 0) {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(0);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_10 = (undefined4 *)0x0;
|
|
|
|
local_c = (int *)0x0;
|
|
|
|
if ((*(int *)(param_1 + 0x668) == 0) ||
|
|
|
|
(*(int *)(*(int *)(param_1 + 0x668) + 0x400) != 0x1000001c)) {
|
|
|
|
if ((char)param_3 == '\0') {
|
|
|
|
uVar5 = 0x10000042;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = 0x10000043;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = 0x1000005e;
|
|
|
|
}
|
|
|
|
cVar4 = (**(code **)(*piVar1 + 0xd0))(uVar5,&local_10);
|
|
|
|
if (cVar4 != '\0') {
|
|
|
|
uStack_8 = 0;
|
|
|
|
piStack_4 = (int *)0x0;
|
|
|
|
if (local_c != (int *)0x0) {
|
|
|
|
cVar4 = (**(code **)(*local_c + 0xf4))(iVar3,&uStack_8);
|
|
|
|
if (cVar4 != '\0') {
|
|
|
|
param_2 = DAT_00841614;
|
|
|
|
if (piStack_4 != (int *)0x0) {
|
|
|
|
(**(code **)(*piStack_4 + 0xb0))(¶m_2);
|
|
|
|
}
|
|
|
|
FUN_00463c80(param_2,3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x678) + 0x18))(1);
|
|
|
|
FUN_004234d0();
|
|
|
|
}
|
|
|
|
if (local_10 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_10[1];
|
|
|
|
local_10[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_10)(1);
|
|
|
|
}
|
|
|
|
local_10 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if ((local_c != (int *)0x0) && (iVar2 = local_c[1], local_c[1] = iVar2 + -1, iVar2 + -1 == 0))
|
|
|
|
{
|
|
|
|
(**(code **)*local_c)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x644) = iVar3;
|
|
|
|
*(char *)(param_1 + 0x64c) = (char)param_3;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x608) != 0) {
|
|
|
|
FUN_0058cf30(iVar3,param_3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2370 at 0x004E2370 (size: 192) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e2370(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
double dVar2;
|
|
|
|
int iVar3;
|
|
|
|
float10 fVar4;
|
|
|
|
undefined4 local_8;
|
|
|
|
|
|
|
|
if ((*(int **)(param_1 + 0x68c) != (int *)0x0) && (*(int *)(param_1 + 0x608) != 0)) {
|
|
|
|
if ((*(int *)(param_1 + 0x61c) == 0) ||
|
|
|
|
(iVar1 = *(int *)(*(int *)(param_1 + 0x608) + 200), iVar1 < 1)) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x68c) + 0x18))(0);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = FUN_0058cce0();
|
|
|
|
dVar2 = (double)iVar3 / (double)iVar1;
|
|
|
|
if (dVar2 == _DAT_00795610) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x68c) + 0x18))(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x68c) + 0x18))(1);
|
|
|
|
if (*(int *)(param_1 + 0x68c) != 0) {
|
|
|
|
local_8 = SUB84(dVar2,0);
|
|
|
|
fVar4 = (float10)FUN_0047cf80(iVar3,local_8,0,0,0,0x3ff00000);
|
|
|
|
FUN_00460760(0x69,(float)fVar4);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2430 at 0x004E2430 (size: 197) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e2430(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
double dVar4;
|
|
|
|
double dVar5;
|
|
|
|
undefined4 unaff_ESI;
|
|
|
|
float10 fVar6;
|
|
|
|
undefined4 local_8;
|
|
|
|
|
|
|
|
piVar1 = *(int **)(param_1 + 0x690);
|
|
|
|
if ((piVar1 != (int *)0x0) && (iVar2 = *(int *)(param_1 + 0x608), iVar2 != 0)) {
|
|
|
|
iVar3 = *(int *)(iVar2 + 0xf4);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(0);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
dVar4 = (double)*(int *)(iVar2 + 0xf0);
|
|
|
|
if (*(int *)(iVar2 + 0xf0) < 0) {
|
|
|
|
dVar4 = dVar4 + _DAT_00795518;
|
|
|
|
}
|
|
|
|
dVar5 = (double)iVar3;
|
|
|
|
if (iVar3 < 0) {
|
|
|
|
dVar5 = dVar5 + _DAT_00795518;
|
|
|
|
}
|
|
|
|
if (dVar4 / dVar5 == _DAT_007938c0) {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 0x18))(1);
|
|
|
|
if (*(int *)(param_1 + 0x690) != 0) {
|
|
|
|
local_8 = SUB84(dVar4 / dVar5,0);
|
|
|
|
fVar6 = (float10)FUN_0047cf80(unaff_ESI,local_8,0,0,0,0x3ff00000);
|
|
|
|
FUN_00460760(0x69,(float)fVar6);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2a30 at 0x004E2A30 (size: 120) ---
|
|
|
|
|
|
void __fastcall FUN_004e2a30(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
int unaff_ESI;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
if (*(int **)(param_1 + 0x694) != (int *)0x0) {
|
|
|
|
local_4 = param_1;
|
|
|
|
if (*(int *)(param_1 + 0x650) < 0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x694) + 0x18))(0);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_00480980(&local_4,0,&DAT_007a11d4,*(int *)(param_1 + 0x650));
|
|
|
|
FUN_0046a740(&local_4);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x694) + 0x18))(1);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(unaff_ESI + -0x10));
|
|
|
|
if ((LVar1 == 0) && ((undefined4 *)(unaff_ESI + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(unaff_ESI + -0x14))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2ab0 at 0x004E2AB0 (size: 584) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e2ab0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
bool bVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iVar5;
|
|
|
|
uint3 uVar6;
|
|
|
|
int iVar7;
|
|
|
|
int local_24;
|
|
|
|
undefined4 local_20;
|
|
|
|
undefined4 local_1c;
|
|
|
|
undefined4 local_18;
|
|
|
|
undefined4 local_14;
|
|
|
|
int *local_10;
|
|
|
|
int local_c;
|
|
|
|
int *local_8 [2];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x690) != 0) {
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
bVar3 = false;
|
|
|
|
local_20 = 0;
|
|
|
|
local_1c = 0;
|
|
|
|
local_24 = 0;
|
|
|
|
iVar7 = 0;
|
|
|
|
if (iVar5 != 0) {
|
|
|
|
local_18 = *(undefined4 *)(iVar5 + 0x138);
|
|
|
|
local_14 = *(undefined4 *)(iVar5 + 0x13c);
|
|
|
|
iVar1 = *(int *)(iVar5 + 0x134);
|
|
|
|
if (0 < iVar1) {
|
|
|
|
uVar4 = FUN_00485200(local_8,&DAT_007c0350);
|
|
|
|
iVar5 = FUN_0048bc80(uVar4);
|
|
|
|
if (local_8[0] != (int *)0x0) {
|
|
|
|
iVar5 = (**(code **)(*local_8[0] + 0x14))();
|
|
|
|
}
|
|
|
|
iVar7 = local_24;
|
|
|
|
if (local_10 != (int *)0x0) {
|
|
|
|
if (((-1 < local_c) && (iVar5 = FUN_0058fd30(), iVar5 != 0)) &&
|
|
|
|
(iVar5 = FUN_00595230(iVar1 + 0x8000,&local_20), iVar5 != 0)) {
|
|
|
|
if (_DAT_00795610 < (double)CONCAT44(local_14,local_18)) {
|
|
|
|
local_24 = FUN_005df4c4();
|
|
|
|
}
|
|
|
|
bVar3 = true;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(*local_10 + 0x14))();
|
|
|
|
iVar7 = local_24;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6a0) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 1)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6a0) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6a4) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 2)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6a4) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6a8) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 3)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6a8) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6ac) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 4)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6ac) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6b0) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 5)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6b0) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6b4) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 6)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6b4) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6b8) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 7)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6b8) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6bc) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 8)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6bc) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x6c0) != (int *)0x0) {
|
|
|
|
if ((bVar3) && (iVar7 == 9)) {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
iVar5 = (**(code **)(**(int **)(param_1 + 0x6c0) + 0x18))(uVar4);
|
|
|
|
}
|
|
|
|
piVar2 = *(int **)(param_1 + 0x6c4);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
uVar6 = (uint3)((uint)iVar5 >> 8);
|
|
|
|
if ((bVar3) && (9 < iVar7)) {
|
|
|
|
(**(code **)(*piVar2 + 0x18))(CONCAT31(uVar6,1));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0x18))((uint)uVar6 << 8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2d10 at 0x004E2D10 (size: 325) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004e2d10(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
undefined1 local_4 [4];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x668) == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x600) == 0) {
|
|
|
|
iVar1 = FUN_005583f0(*(undefined4 *)(param_1 + 0x5fc));
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_006a0660();
|
|
|
|
FUN_006a0570(0);
|
|
|
|
iVar1 = FUN_005df0f5(0xc);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_0058f480();
|
|
|
|
uVar3 = FUN_00694a00(uVar3);
|
|
|
|
}
|
|
|
|
FUN_006a0610(uVar3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_006a0660();
|
|
|
|
iVar1 = FUN_00567c00();
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = FUN_00569990(*(undefined4 *)(param_1 + 0x600));
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_006a0570(1);
|
|
|
|
iVar2 = FUN_005df0f5(0xc);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_00694a00(iVar1);
|
|
|
|
}
|
|
|
|
FUN_006a0610(uVar3);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x698) != 0) {
|
|
|
|
piVar4 = (int *)FUN_00567ef0(local_4,*(undefined4 *)(param_1 + 0x600));
|
|
|
|
uVar3 = FUN_00404a40(0,*piVar4 + 0x14);
|
|
|
|
FUN_0046a740(uVar3);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_005abb30();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e2e60 at 0x004E2E60 (size: 932) ---
|
|
|
|
|
|
void __fastcall FUN_004e2e60(uint param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 unaff_ESI;
|
|
|
|
int iStack_94;
|
|
|
|
undefined1 auStack_90 [120];
|
|
|
|
undefined4 uStack_18;
|
|
|
|
int iStack_14;
|
|
|
|
uint uStack_10;
|
|
|
|
uint uStack_4;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x5fc) == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uStack_10 = 0x4e2e74;
|
|
|
|
uVar4 = FUN_005583f0();
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = uVar4;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x608) == 0) {
|
|
|
|
if (*(int *)(param_1 + 0x600) == 0) {
|
|
|
|
uStack_10 = 0x4e310f;
|
|
|
|
FUN_004e2190();
|
|
|
|
*(uint *)(param_1 + 0xa4) = *(uint *)(param_1 + 0xa4) & 0xffffffdf;
|
|
|
|
FUN_004626c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
uStack_10 = 0x4e30fa;
|
|
|
|
FUN_004e2190();
|
|
|
|
FUN_004e2d10();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x668) != (int *)0x0) {
|
|
|
|
uStack_10 = 0x4e2eae;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x668) + 0x9c))();
|
|
|
|
if (*(int **)(param_1 + 0x698) != (int *)0x0) {
|
|
|
|
uStack_10 = 0x4e2ec5;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x698) + 0x9c))();
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x66c) != (int *)0x0) {
|
|
|
|
uStack_10 = 0x4e2edc;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x66c) + 0x9c))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_004e2d10();
|
|
|
|
iVar1 = *(int *)(*(int *)(param_1 + 0x608) + 0x6c);
|
|
|
|
if ((*(int *)(param_1 + 0x614) != iVar1) &&
|
|
|
|
((*(int *)(param_1 + 0x614) = iVar1, iVar1 == 0 || (*(char *)(param_1 + 0x640) != '\0')))) {
|
|
|
|
*(int *)(param_1 + 0x614) = iVar1;
|
|
|
|
if (*(int **)(param_1 + 0x670) != (int *)0x0) {
|
|
|
|
uStack_10 = 0x4e2f23;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x670) + 0x18))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x608);
|
|
|
|
if (*(int *)(param_1 + 0x60c) != *(int *)(iVar1 + 0xe4)) {
|
|
|
|
*(int *)(param_1 + 0x60c) = *(int *)(iVar1 + 0xe4);
|
|
|
|
}
|
|
|
|
if (((((*(uint *)(iVar1 + 0x100) & 0x800000) == 0) && (*(int *)(iVar1 + 200) == 0)) &&
|
|
|
|
(*(int *)(iVar1 + 0xcc) == 0)) || ((*(byte *)(iVar1 + 0x100) & 1) == 0)) {
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
iVar5 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = *(int *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x5fc) != iVar5) {
|
|
|
|
*(undefined4 *)(param_1 + 0x618) = 0;
|
|
|
|
goto LAB_004e2f9c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x618) = 1;
|
|
|
|
LAB_004e2f9c:
|
|
|
|
if ((((*(uint *)(iVar1 + 0x100) & 0x800000) == 0) && (*(int *)(iVar1 + 200) == 0)) &&
|
|
|
|
(*(int *)(iVar1 + 0xcc) == 0)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x61c) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x61c) = 1;
|
|
|
|
}
|
|
|
|
*(uint *)(param_1 + 0x620) = (uint)(*(int *)(iVar1 + 0xcc) != 0);
|
|
|
|
uStack_10 = 0x4e2fe4;
|
|
|
|
FUN_004e2370();
|
|
|
|
uStack_10 = 0x4e2feb;
|
|
|
|
FUN_004e2430();
|
|
|
|
uStack_10 = 0x4e2ff2;
|
|
|
|
FUN_004e2a30();
|
|
|
|
uStack_10 = 0x4e2ff9;
|
|
|
|
FUN_004e2ab0();
|
|
|
|
uVar2 = *(uint *)(*(int *)(param_1 + 0x608) + 0x70);
|
|
|
|
if (*(uint *)(param_1 + 0x610) != uVar2) {
|
|
|
|
*(uint *)(param_1 + 0x610) = uVar2;
|
|
|
|
iStack_14 = 0x4e3018;
|
|
|
|
uStack_10 = uVar2;
|
|
|
|
FUN_004e1e40();
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x648) != -1) {
|
|
|
|
uStack_10 = 0;
|
|
|
|
uStack_18 = 0x4e3031;
|
|
|
|
iStack_14 = *(int *)(param_1 + 0x648);
|
|
|
|
FUN_0058cf30();
|
|
|
|
*(undefined4 *)(param_1 + 0x648) = 0xffffffff;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x608);
|
|
|
|
if ((*(int *)(param_1 + 0x644) != *(int *)(iVar1 + 0x7c)) ||
|
|
|
|
(*(char *)(param_1 + 0x64c) != *(char *)(iVar1 + 0x80))) {
|
|
|
|
uStack_10 = (uint)*(byte *)(iVar1 + 0x80);
|
|
|
|
uStack_18 = 0x4e306a;
|
|
|
|
iStack_14 = *(int *)(iVar1 + 0x7c);
|
|
|
|
FUN_004e2220();
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(*(int *)(param_1 + 0x608) + 0x74);
|
|
|
|
uStack_4 = param_1;
|
|
|
|
if (*(int *)(param_1 + 0x638) != iVar1) {
|
|
|
|
uStack_4._1_3_ = (undefined3)(param_1 >> 8);
|
|
|
|
uStack_4 = CONCAT31(uStack_4._1_3_,iVar1 != 0);
|
|
|
|
if (*(int **)(param_1 + 0x67c) != (int *)0x0) {
|
|
|
|
uStack_10 = uStack_4;
|
|
|
|
iStack_14 = 0x4e3098;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x67c) + 0x18))();
|
|
|
|
}
|
|
|
|
*(uint *)(param_1 + 0x638) = (uint)(iVar1 != 0);
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(*(int *)(param_1 + 0x608) + 0x78);
|
|
|
|
if (*(int *)(param_1 + 0x63c) != iVar1) {
|
|
|
|
uStack_4 = CONCAT31(uStack_4._1_3_,iVar1 != 0);
|
|
|
|
if (*(int **)(param_1 + 0x680) != (int *)0x0) {
|
|
|
|
uStack_10 = uStack_4;
|
|
|
|
iStack_14 = 0x4e30cf;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x680) + 0x18))();
|
|
|
|
}
|
|
|
|
*(uint *)(param_1 + 0x63c) = (uint)(iVar1 != 0);
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0x5fc) != 0) &&
|
|
|
|
(iVar1 = FUN_005583f0(*(int *)(param_1 + 0x5fc),unaff_ESI), iVar1 != 0)) {
|
|
|
|
uVar2 = *(uint *)(iVar1 + 0xf8);
|
|
|
|
if (uVar2 == 0) {
|
|
|
|
uVar2 = 1;
|
|
|
|
}
|
|
|
|
FUN_0058f8b0(&iStack_94,2 - (uint)(1 < uVar2),0);
|
|
|
|
uVar2 = *(uint *)(iVar1 + 0xf8);
|
|
|
|
if ((uVar2 != 0) && (1 < uVar2)) {
|
|
|
|
FUN_004027b0(&iStack_94,L"%d %s",uVar2,iStack_94);
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042cbe0(&iStack_94,1);
|
|
|
|
FUN_004618a0(auStack_90);
|
|
|
|
*(uint *)(param_1 + 0xa4) = *(uint *)(param_1 + 0xa4) | 0x20;
|
|
|
|
FUN_0042e590();
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(iStack_94 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(iStack_94 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_94 + -0x14))(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3130 at 0x004E3130 (size: 39) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004e3130(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((*(char *)(param_1 + 0x681) == '\0') && (*(char *)(param_1 + 0x683) == '\0')) &&
|
|
|
|
(*(char *)(param_1 + 0x682) == '\0')) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3160 at 0x004E3160 (size: 82) ---
|
|
|
|
|
|
void FUN_004e3160(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
|
|
|
|
if (param_1 != 0) {
|
|
|
|
iVar1 = FUN_00564d30();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar1 = FUN_00564d30();
|
|
|
|
uVar2 = *(undefined4 *)(iVar1 + 0x2c);
|
|
|
|
iVar1 = *(int *)(param_1 + 0x600);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_00564d30(iVar1,uVar2);
|
|
|
|
FUN_00565910(iVar1,uVar2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x5fc);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_00564d30(iVar1,uVar2);
|
|
|
|
FUN_005658d0(iVar1,uVar2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e31c0 at 0x004E31C0 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_004e31c0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x678) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e31d0 at 0x004E31D0 (size: 71) ---
|
|
|
|
|
|
void __thiscall FUN_004e31d0(int param_1,int param_2,int param_3,char param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((*(char *)(param_1 + 0x3d) != '\0') && (param_2 != 0)) && (param_4 == '\0')) {
|
|
|
|
FUN_00465f90(3);
|
|
|
|
}
|
|
|
|
if ((*(char *)(param_1 + 0x3e) != '\0') && (param_3 != 0)) {
|
|
|
|
FUN_00465f90(3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3220 at 0x004E3220 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_004e3220(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x6a0) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3230 at 0x004E3230 (size: 11) ---
|
|
|
|
|
|
void __fastcall FUN_004e3230(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x6a0) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3240 at 0x004E3240 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_004e3240(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x684) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3250 at 0x004E3250 (size: 46) ---
|
|
|
|
|
|
void __fastcall FUN_004e3250(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0x684) != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
*(undefined4 *)(param_1 + 0x684) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3280 at 0x004E3280 (size: 256) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e3280(int param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
cVar1 = FUN_004603a0();
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x6a7) != '\0') {
|
|
|
|
iVar2 = FUN_0069fe00();
|
|
|
|
if (iVar2 <= param_2) {
|
|
|
|
iVar2 = FUN_006a0190();
|
|
|
|
if (param_2 <= iVar2) {
|
|
|
|
iVar2 = FUN_0069fe30();
|
|
|
|
if (param_3 < iVar2) {
|
|
|
|
iVar2 = FUN_0069fe30();
|
|
|
|
if (iVar2 - *(int *)(param_1 + 0x6b0) <= param_3) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = FUN_006a01e0();
|
|
|
|
if (iVar2 < param_3) {
|
|
|
|
iVar2 = FUN_006a01e0();
|
|
|
|
if (param_3 <= iVar2 + *(int *)(param_1 + 0x6b0)) {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x6a8) != '\0') {
|
|
|
|
iVar2 = FUN_0069fe30();
|
|
|
|
if (iVar2 <= param_3) {
|
|
|
|
iVar2 = FUN_006a01e0();
|
|
|
|
if (param_3 <= iVar2) {
|
|
|
|
iVar2 = FUN_0069fe00();
|
|
|
|
if (param_2 < iVar2) {
|
|
|
|
iVar2 = FUN_0069fe00();
|
|
|
|
if (iVar2 - *(int *)(param_1 + 0x6ac) <= param_2) {
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = FUN_006a0190();
|
|
|
|
if (iVar2 < param_2) {
|
|
|
|
iVar2 = FUN_006a0190();
|
|
|
|
if (param_2 <= iVar2 + *(int *)(param_1 + 0x6ac)) {
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3380 at 0x004E3380 (size: 862) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3610) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3621) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3627) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3633) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3644) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e364a) */
|
|
|
|
|
|
|
|
void FUN_004e3380(int *param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
char cVar3;
|
|
|
|
undefined4 *unaff_EBX;
|
|
|
|
undefined4 unaff_EBP;
|
|
|
|
undefined4 unaff_ESI;
|
|
|
|
uint3 unaff_EDI;
|
|
|
|
char cVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
undefined4 *puStack_58;
|
|
|
|
undefined4 uStack_54;
|
|
|
|
uint *puStack_50;
|
|
|
|
int *piVar6;
|
|
|
|
int *piStack_3c;
|
|
|
|
undefined4 *local_38;
|
|
|
|
undefined4 *local_34;
|
|
|
|
int *piStack_2c;
|
|
|
|
undefined4 uStack_28;
|
|
|
|
undefined4 uStack_24;
|
|
|
|
uint *puStack_20;
|
|
|
|
int *piStack_1c;
|
|
|
|
undefined4 uStack_18;
|
|
|
|
undefined4 auStack_14 [2];
|
|
|
|
int *piStack_c;
|
|
|
|
uint local_8;
|
|
|
|
uint local_4;
|
|
|
|
|
|
|
|
*param_2 = 0;
|
|
|
|
*param_3 = 0;
|
|
|
|
*param_4 = 0;
|
|
|
|
if (param_1 != (int *)0x0) {
|
|
|
|
puStack_50 = &local_8;
|
|
|
|
uStack_54 = (undefined4 *)0x1000000f;
|
|
|
|
local_38 = (undefined4 *)0x0;
|
|
|
|
local_34 = (undefined4 *)0x0;
|
|
|
|
local_8 = 0;
|
|
|
|
local_4 = 0;
|
|
|
|
puStack_58 = (undefined4 *)0x4e33cc;
|
|
|
|
cVar3 = (**(code **)(*param_1 + 0xd0))();
|
|
|
|
if ((cVar3 != '\0') && (piStack_c != (int *)0x0)) {
|
|
|
|
puStack_58 = (undefined4 *)&stack0xffffffc0;
|
|
|
|
(**(code **)(*piStack_c + 0x78))();
|
|
|
|
}
|
|
|
|
puStack_58 = &uStack_18;
|
|
|
|
uStack_18 = 0;
|
|
|
|
auStack_14[0] = 0;
|
|
|
|
cVar3 = (**(code **)(*param_1 + 0xd0))();
|
|
|
|
if ((cVar3 != '\0') && (piStack_1c != (int *)0x0)) {
|
|
|
|
(**(code **)(*piStack_1c + 0x78))(&stack0xffffffbc);
|
|
|
|
}
|
|
|
|
*param_2 = unaff_ESI;
|
|
|
|
puVar5 = &uStack_28;
|
|
|
|
*param_3 = unaff_EBP;
|
|
|
|
piVar6 = (int *)(uint)unaff_EDI;
|
|
|
|
piStack_c = (int *)((uint)piStack_c & 0xffffff00);
|
|
|
|
local_4 = local_4 & 0xffffff00;
|
|
|
|
local_8 = local_8 & 0xffffff00;
|
|
|
|
uStack_28 = 0;
|
|
|
|
uStack_24 = 0;
|
|
|
|
cVar3 = (**(code **)(*param_1 + 0xd0))(0x10000011);
|
|
|
|
if ((cVar3 != '\0') && (piStack_2c != (int *)0x0)) {
|
|
|
|
(**(code **)(*piStack_2c + 0x70))((int)&uStack_54 + 3);
|
|
|
|
}
|
|
|
|
cVar4 = '\x10';
|
|
|
|
local_38 = (undefined4 *)0x0;
|
|
|
|
local_34 = (undefined4 *)0x0;
|
|
|
|
cVar3 = (**(code **)(*param_1 + 0xd0))(0x10000013,&local_38);
|
|
|
|
if ((cVar3 != '\0') && (piStack_3c != (int *)0x0)) {
|
|
|
|
(**(code **)(*piStack_3c + 0x70))(auStack_14);
|
|
|
|
}
|
|
|
|
cVar3 = (**(code **)(*param_1 + 0xd0))(0x10000012,&stack0xffffffb8);
|
|
|
|
if ((cVar3 != '\0') && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)(*piVar6 + 0x70))(&uStack_24);
|
|
|
|
}
|
|
|
|
puStack_58 = (undefined4 *)0x0;
|
|
|
|
uStack_54 = (undefined4 *)0x0;
|
|
|
|
cVar3 = (**(code **)(*param_1 + 0xd0))(0x10000014,&puStack_58);
|
|
|
|
if (cVar3 != '\0') {
|
|
|
|
(*(code *)puRam10000010[0x1c])(&uStack_28);
|
|
|
|
}
|
|
|
|
*puStack_20 = -(uint)((char)uStack_28 != '\0') & 8 | -(uint)((char)uStack_24 != '\0') & 2 |
|
|
|
|
-(uint)((char)piStack_2c != '\0') & 4 | (uint)(cVar4 != '\0');
|
|
|
|
if ((puVar5 != (undefined4 *)0x0) &&
|
|
|
|
(iVar1 = puVar5[1], puVar5[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
iRam10000014 = iRam10000014 + -1;
|
|
|
|
if (iRam10000014 == 0) {
|
|
|
|
(*(code *)*puRam10000010)(1);
|
|
|
|
}
|
|
|
|
if (puStack_58 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = puStack_58[1];
|
|
|
|
puStack_58[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_58)(1);
|
|
|
|
}
|
|
|
|
puStack_58 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (uStack_54 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = uStack_54[1];
|
|
|
|
uStack_54[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*uStack_54)(1);
|
|
|
|
}
|
|
|
|
uStack_54 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (puStack_50 != (uint *)0x0) {
|
|
|
|
uVar2 = puStack_50[1];
|
|
|
|
puStack_50[1] = uVar2 - 1;
|
|
|
|
if (uVar2 - 1 == 0) {
|
|
|
|
(**(code **)*puStack_50)(1);
|
|
|
|
}
|
|
|
|
puStack_50 = (uint *)0x0;
|
|
|
|
}
|
|
|
|
if ((piVar6 != (int *)0x0) && (iVar1 = piVar6[1], piVar6[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*piVar6)(1);
|
|
|
|
}
|
|
|
|
if ((unaff_EBX != (undefined4 *)0x0) &&
|
|
|
|
(iVar1 = unaff_EBX[1], unaff_EBX[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*unaff_EBX)(1);
|
|
|
|
}
|
|
|
|
if ((piStack_3c != (int *)0x0) &&
|
|
|
|
(iVar1 = piStack_3c[1], piStack_3c[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*piStack_3c)(1);
|
|
|
|
}
|
|
|
|
if (local_38 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_38[1];
|
|
|
|
local_38[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_38)(1);
|
|
|
|
}
|
|
|
|
local_38 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if ((local_34 != (undefined4 *)0x0) &&
|
|
|
|
(iVar1 = local_34[1], local_34[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*local_34)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e36e0 at 0x004E36E0 (size: 1150) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3909) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e391a) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3920) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e38b8) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e392c) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e393d) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004e3943) */
|
|
|
|
|
|
|
|
undefined4 __thiscall FUN_004e36e0(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iVar5;
|
|
|
|
int unaff_EBX;
|
|
|
|
undefined4 unaff_ESI;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
int iStack_3c;
|
|
|
|
undefined4 *local_34;
|
|
|
|
int *piStack_30;
|
|
|
|
undefined4 *puStack_2c;
|
|
|
|
undefined4 *puStack_28;
|
|
|
|
int *piStack_24;
|
|
|
|
undefined4 *puStack_20;
|
|
|
|
undefined4 uStack_1c;
|
|
|
|
int *local_18;
|
|
|
|
int *local_14;
|
|
|
|
int *local_10;
|
|
|
|
int *local_c;
|
|
|
|
|
|
|
|
piVar2 = *(int **)(param_2 + 0x69c);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
if (*(int *)(param_2 + 0x5fc) != 0) {
|
|
|
|
FUN_006a0660();
|
|
|
|
iVar3 = FUN_005583f0(*(undefined4 *)(param_2 + 0x5fc));
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_006a0570(1);
|
|
|
|
local_34 = (undefined4 *)FUN_005df0f5(0xc);
|
|
|
|
if (local_34 == (undefined4 *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = FUN_0058f490();
|
|
|
|
uVar4 = FUN_00694a00(uVar4);
|
|
|
|
}
|
|
|
|
FUN_006a0610(uVar4);
|
|
|
|
}
|
|
|
|
local_10 = (int *)0x0;
|
|
|
|
local_c = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x1000000f);
|
|
|
|
uVar4 = *(undefined4 *)(param_2 + 0x5fc);
|
|
|
|
if (local_c != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_c + 0x7c))(uVar4);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0xd4))(&local_10);
|
|
|
|
uStack_1c = 0;
|
|
|
|
local_18 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000011);
|
|
|
|
iVar3 = *(int *)(param_2 + 0x61c);
|
|
|
|
if (local_18 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_18 + 0x74))(iVar3 != 0);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0xd4))(&uStack_1c);
|
|
|
|
puStack_28 = (undefined4 *)0x0;
|
|
|
|
piStack_24 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000013);
|
|
|
|
uVar1 = *(undefined1 *)(unaff_EBX + 0x681);
|
|
|
|
if (piStack_24 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_24 + 0x74))(uVar1);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0xd4))(&puStack_28);
|
|
|
|
local_34 = (undefined4 *)0x0;
|
|
|
|
piStack_30 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000012);
|
|
|
|
uVar1 = *(undefined1 *)(unaff_EBX + 0x682);
|
|
|
|
if (piStack_30 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_30 + 0x74))(uVar1);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0xd4))(&local_34);
|
|
|
|
FUN_0042a2d0(0x10000014);
|
|
|
|
puVar6 = (undefined4 *)
|
|
|
|
CONCAT31((int3)((uint)unaff_ESI >> 8),*(undefined1 *)(unaff_EBX + 0x683));
|
|
|
|
(**(code **)(*piVar2 + 0xd4))(&stack0xffffffc0);
|
|
|
|
if ((puVar6 != (undefined4 *)0x0) &&
|
|
|
|
(iVar3 = puVar6[1], puVar6[1] = iVar3 + -1, iVar3 + -1 == 0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
if ((param_1 != (undefined4 *)0x0) &&
|
|
|
|
(iVar3 = param_1[1], param_1[1] = iVar3 + -1, iVar3 + -1 == 0)) {
|
|
|
|
(**(code **)*param_1)(1);
|
|
|
|
}
|
|
|
|
if (local_34 != (undefined4 *)0x0) {
|
|
|
|
iVar3 = local_34[1];
|
|
|
|
local_34[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*local_34)(1);
|
|
|
|
}
|
|
|
|
local_34 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (piStack_30 != (int *)0x0) {
|
|
|
|
iVar3 = piStack_30[1];
|
|
|
|
piStack_30[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*piStack_30)(1);
|
|
|
|
}
|
|
|
|
piStack_30 = (int *)0x0;
|
|
|
|
}
|
|
|
|
if (puStack_2c != (undefined4 *)0x0) {
|
|
|
|
iVar3 = puStack_2c[1];
|
|
|
|
puStack_2c[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_2c)(1);
|
|
|
|
}
|
|
|
|
puStack_2c = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (puStack_28 != (undefined4 *)0x0) {
|
|
|
|
iVar3 = puStack_28[1];
|
|
|
|
puStack_28[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_28)(1);
|
|
|
|
}
|
|
|
|
puStack_28 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (piStack_24 != (int *)0x0) {
|
|
|
|
iVar3 = piStack_24[1];
|
|
|
|
piStack_24[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*piStack_24)(1);
|
|
|
|
}
|
|
|
|
piStack_24 = (int *)0x0;
|
|
|
|
}
|
|
|
|
if (puStack_20 != (undefined4 *)0x0) {
|
|
|
|
iVar3 = puStack_20[1];
|
|
|
|
puStack_20[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_20)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_2 + 0x600) != 0) {
|
|
|
|
FUN_006a0660();
|
|
|
|
uVar4 = *(undefined4 *)(param_2 + 0x600);
|
|
|
|
FUN_00567c00(uVar4);
|
|
|
|
iVar3 = FUN_00569990(uVar4);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_006a0570(1);
|
|
|
|
iVar5 = FUN_005df0f5(0xc);
|
|
|
|
if (iVar5 == 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = FUN_00694a00(iVar3);
|
|
|
|
}
|
|
|
|
FUN_006a0610(uVar4);
|
|
|
|
}
|
|
|
|
local_18 = (int *)0x0;
|
|
|
|
local_14 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000010);
|
|
|
|
uVar4 = *(undefined4 *)(param_2 + 0x600);
|
|
|
|
if (local_14 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_14 + 0x7c))(uVar4);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0xd4))(&local_18);
|
|
|
|
local_14 = (int *)0x0;
|
|
|
|
local_10 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000012);
|
|
|
|
uVar1 = *(undefined1 *)(iStack_3c + 0x682);
|
|
|
|
if (local_10 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_10 + 0x74))(uVar1);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0xd4))(&local_14);
|
|
|
|
FUN_004234d0();
|
|
|
|
FUN_004234d0();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3b60 at 0x004E3B60 (size: 89) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e3b60(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x610) != 0) {
|
|
|
|
do {
|
|
|
|
piVar1 = *(int **)(*(int *)(param_1 + 0x608) + uVar3 * 4);
|
|
|
|
if (((piVar1 != (int *)0x0) && (iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 != 0)
|
|
|
|
) && (*(int *)(iVar2 + 0x5fc) == param_2)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x610));
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3bc0 at 0x004E3BC0 (size: 78) ---
|
|
|
|
|
|
int __thiscall FUN_004e3bc0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x610) != 0) {
|
|
|
|
do {
|
|
|
|
piVar1 = *(int **)(*(int *)(param_1 + 0x608) + uVar3 * 4);
|
|
|
|
if (((piVar1 != (int *)0x0) && (iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 != 0)
|
|
|
|
) && (*(int *)(iVar2 + 0x5fc) == param_2)) {
|
|
|
|
return iVar2;
|
|
|
|
}
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x610));
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3c10 at 0x004E3C10 (size: 82) ---
|
|
|
|
|
|
int __fastcall FUN_004e3c10(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
iVar3 = 0;
|
|
|
|
iVar4 = 0;
|
|
|
|
if (0 < *(int *)(param_1 + 0x610)) {
|
|
|
|
do {
|
|
|
|
piVar1 = (int *)FUN_0046dc50(iVar4);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar2 = FUN_004e1e20();
|
|
|
|
if (iVar2 != 0x1000001c) {
|
|
|
|
iVar3 = iVar3 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar4 = iVar4 + 1;
|
|
|
|
} while (iVar4 < *(int *)(param_1 + 0x610));
|
|
|
|
}
|
|
|
|
return iVar3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3d00 at 0x004E3D00 (size: 93) ---
|
|
|
|
|
|
void __thiscall FUN_004e3d00(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x610) != 0) {
|
|
|
|
do {
|
|
|
|
piVar1 = *(int **)(*(int *)(param_1 + 0x608) + uVar3 * 4);
|
|
|
|
if ((piVar1 != (int *)0x0) && (iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 != 0))
|
|
|
|
{
|
|
|
|
if ((param_2 == 0) || (*(int *)(iVar2 + 0x5fc) != param_2)) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
FUN_004e1e90(uVar4);
|
|
|
|
}
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x610));
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3d60 at 0x004E3D60 (size: 158) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e3d60(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
uVar1 = (**(code **)(*DAT_00837ff4 + 0x18))();
|
|
|
|
uVar2 = (**(code **)(*DAT_00837ff4 + 0x1c))();
|
|
|
|
iVar3 = FUN_004e3280(uVar1,uVar2);
|
|
|
|
if (*(char *)(param_1 + 0x6b4) == '\0') {
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
*(undefined1 *)(param_1 + 0x6b4) = 1;
|
|
|
|
*(double *)(param_1 + 0x6c0) = (double)(*(float *)(param_1 + 0x6bc) + (float)_DAT_008379a8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
*(undefined1 *)(param_1 + 0x6b4) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(double *)(param_1 + 0x6c0) < _DAT_008379a8) {
|
|
|
|
*(double *)(param_1 + 0x6c0) = (double)(*(float *)(param_1 + 0x6bc) + (float)_DAT_008379a8);
|
|
|
|
switch(iVar3) {
|
|
|
|
case 1:
|
|
|
|
FUN_0046d930(*(int *)(param_1 + 0x5fc) - *(int *)(param_1 + 0x6b8));
|
|
|
|
return;
|
|
|
|
case 2:
|
|
|
|
FUN_0046d930(*(int *)(param_1 + 0x6b8) + *(int *)(param_1 + 0x5fc));
|
|
|
|
return;
|
|
|
|
case 3:
|
|
|
|
FUN_0046d950(*(int *)(param_1 + 0x5f8) - *(int *)(param_1 + 0x6b8));
|
|
|
|
return;
|
|
|
|
case 4:
|
|
|
|
FUN_0046d950(*(int *)(param_1 + 0x6b8) + *(int *)(param_1 + 0x5f8));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3ee0 at 0x004E3EE0 (size: 126) ---
|
|
|
|
|
|
void FUN_004e3ee0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
iVar1 = FUN_004e3c10();
|
|
|
|
iVar4 = 0;
|
|
|
|
if (0 < iVar1) {
|
|
|
|
do {
|
|
|
|
piVar2 = (int *)FUN_0046dc50(iVar4);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
iVar3 = (**(code **)(*piVar2 + 0x94))(0x10000032);
|
|
|
|
if (((iVar3 != 0) && (*(int *)(iVar3 + 0x5fc) == *(int *)(param_1 + 0x5fc))) &&
|
|
|
|
(iVar3 != param_1)) {
|
|
|
|
FUN_004e1f10(0);
|
|
|
|
FUN_004e1ed0(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar4 = iVar4 + 1;
|
|
|
|
} while (iVar4 < iVar1);
|
|
|
|
}
|
|
|
|
FUN_004e1f10(1);
|
|
|
|
FUN_004e1ed0(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e3f60 at 0x004E3F60 (size: 290) ---
|
|
|
|
|
|
void __thiscall FUN_004e3f60(int param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
int *piVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 uStack_4;
|
|
|
|
|
|
|
|
uStack_4 = param_1;
|
|
|
|
FUN_00460cc0(0x10000016,(int)&uStack_4 + 3);
|
|
|
|
if (uStack_4._3_1_ != '\0') {
|
|
|
|
iVar2 = FUN_0069fe30();
|
|
|
|
param_3 = param_3 - iVar2;
|
|
|
|
iVar2 = FUN_0069fe00(param_3);
|
|
|
|
piVar3 = (int *)FUN_0046e360(param_2 - iVar2,param_3);
|
|
|
|
if (((piVar3 != (int *)0x0) && (iVar2 = (**(code **)(*piVar3 + 0x94))(0x10000032), iVar2 != 0))
|
|
|
|
&& (cVar1 = FUN_004e36e0(iVar2), cVar1 != '\0')) {
|
|
|
|
if (*(int *)(iVar2 + 0x614) == 0) {
|
|
|
|
FUN_0058d110(*(undefined4 *)(iVar2 + 0x5fc),0);
|
|
|
|
}
|
|
|
|
if (((*(char *)(param_1 + 0x681) == '\0') && (*(char *)(param_1 + 0x683) == '\0')) &&
|
|
|
|
(*(char *)(param_1 + 0x682) == '\0')) {
|
|
|
|
FUN_004e1e40(1);
|
|
|
|
}
|
|
|
|
FUN_0045e120(*(undefined4 *)(iVar2 + 0x69c),0x10,0x10);
|
|
|
|
if (((*(char *)(param_1 + 0x681) == '\0') && (*(char *)(param_1 + 0x683) == '\0')) &&
|
|
|
|
(*(char *)(param_1 + 0x682) == '\0')) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
FUN_006a9640(*(undefined4 *)(iVar2 + 0x5fc),*(undefined4 *)(iVar2 + 0x600),uVar4);
|
|
|
|
uVar4 = FUN_00480780(iVar2);
|
|
|
|
FUN_006a96f0(param_1,uVar4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4090 at 0x004E4090 (size: 291) ---
|
|
|
|
|
|
void __thiscall FUN_004e4090(int param_1,uint param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
char cVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
iVar4 = param_3;
|
|
|
|
if ((param_2 != 0) && (param_3 != 0)) {
|
|
|
|
local_4 = param_1;
|
|
|
|
FUN_004e3380(param_2,¶m_3,&local_4,¶m_2);
|
|
|
|
iVar3 = param_3;
|
|
|
|
uVar1 = param_2;
|
|
|
|
if (((*(undefined4 **)(param_1 + 0x6a0) == (undefined4 *)0x0) ||
|
|
|
|
(cVar2 = (**(code **)**(undefined4 **)(param_1 + 0x6a0))(iVar4,param_3,local_4,param_2),
|
|
|
|
cVar2 == '\0')) &&
|
|
|
|
((((*(char *)(param_1 + 0x681) == '\0' && (*(char *)(param_1 + 0x683) == '\0')) &&
|
|
|
|
(*(char *)(param_1 + 0x682) == '\0')) && ((iVar3 != 0 && ((uVar1 & 0xe) == 0)))))) {
|
|
|
|
if ((uVar1 & 1) == 0) {
|
|
|
|
if (*(char *)(param_1 + 0x680) != '\0') {
|
|
|
|
iVar3 = FUN_004e1e20();
|
|
|
|
if (((iVar3 != 0x1000001c) &&
|
|
|
|
(iVar4 = FUN_005583f0(*(undefined4 *)(iVar4 + 0x5fc)), iVar4 != 0)) &&
|
|
|
|
(iVar4 = FUN_0058cd00(), iVar4 != 0)) {
|
|
|
|
FUN_004e1f20(0x10000046);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_004e1f20(0x10000041);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (*(char *)(param_1 + 0x680) == '\0') {
|
|
|
|
FUN_004e1f20(0x10000041);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_004e1f20(0x10000040);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e41c0 at 0x004E41C0 (size: 46) ---
|
|
|
|
|
|
bool FUN_004e41c0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_0046e3a0(param_1);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_006bbc10(¶m_1);
|
|
|
|
}
|
|
|
|
return iVar1 != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4200 at 0x004E4200 (size: 220) ---
|
|
|
|
|
|
int __fastcall FUN_004e4200(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
piVar1 = *(int **)(param_1 + 0x694);
|
|
|
|
local_4 = param_1;
|
|
|
|
if ((piVar1 != (int *)0x0) && (piVar1 != (int *)0x0)) {
|
|
|
|
iVar3 = piVar1[1];
|
|
|
|
*(int *)(param_1 + 0x694) = iVar3;
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x698) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(iVar3 + 8) = 0;
|
|
|
|
}
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
operator_delete(piVar1);
|
|
|
|
*(int *)(param_1 + 0x69c) = *(int *)(param_1 + 0x69c) + -1;
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
FUN_004e1f20(0x1000003f);
|
|
|
|
return iVar3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00460990(0x1000000e,&local_4);
|
|
|
|
piVar1 = (int *)FUN_00415730(0x10000038,5,0x23);
|
|
|
|
if (piVar1 == (int *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
piVar2 = (int *)FUN_0045d8b0(param_1,piVar1,local_4);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
iVar3 = (**(code **)(*piVar2 + 0x94))(0x10000032);
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return iVar3;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e42e0 at 0x004E42E0 (size: 84) ---
|
|
|
|
|
|
void __thiscall FUN_004e42e0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0x67c);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
*(int *)(param_1 + 0x67c) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (iVar1 != param_1) {
|
|
|
|
if (iVar1 != param_2) {
|
|
|
|
*(undefined4 *)(iVar1 + 0x670) = 0;
|
|
|
|
FUN_004e3d00(0);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x67c) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x67c) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4340 at 0x004E4340 (size: 68) ---
|
|
|
|
|
|
void FUN_004e4340(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_004e4200();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
if (param_1 == -1) {
|
|
|
|
FUN_0046f130(iVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_0046eb20(iVar1,param_1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4390 at 0x004E4390 (size: 523) ---
|
|
|
|
|
|
void __fastcall FUN_004e4390(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
int *piVar5;
|
|
|
|
int iVar6;
|
|
|
|
char local_d;
|
|
|
|
int local_c;
|
|
|
|
int local_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
cVar1 = FUN_004603a0();
|
|
|
|
if ((cVar1 != '\0') && (FUN_00460b30(0x10000015,&local_c), local_c == -1)) {
|
|
|
|
iVar2 = FUN_0069fe60();
|
|
|
|
FUN_0069fe70();
|
|
|
|
FUN_00460b30(0x5f,&local_8);
|
|
|
|
FUN_00460b30(0x60,&local_4);
|
|
|
|
if (local_8 == -1) {
|
|
|
|
iVar3 = *(int *)(param_1 + 0x688);
|
|
|
|
iVar6 = *(int *)(param_1 + 0x610) * iVar3;
|
|
|
|
if (iVar6 < iVar2) {
|
|
|
|
iVar3 = (iVar2 - iVar6) / iVar3;
|
|
|
|
if (0 < iVar3) {
|
|
|
|
do {
|
|
|
|
iVar2 = FUN_004e4200();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
FUN_0046f130(iVar2);
|
|
|
|
iVar3 = iVar3 + -1;
|
|
|
|
} while (iVar3 != 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (iVar6 - iVar2 != 0 && iVar2 <= iVar6) {
|
|
|
|
iVar3 = ((iVar3 - iVar2) + -1 + iVar6) / iVar3;
|
|
|
|
iVar2 = 0;
|
|
|
|
if (0 < iVar3) {
|
|
|
|
do {
|
|
|
|
piVar5 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1);
|
|
|
|
if (((piVar5 == (int *)0x0) ||
|
|
|
|
(iVar6 = (**(code **)(*piVar5 + 0x94))(0x10000032), iVar6 == 0)) ||
|
|
|
|
(iVar4 = FUN_004e1e20(), iVar4 != 0x1000001c)) break;
|
|
|
|
FUN_004e41c0(iVar6);
|
|
|
|
iVar2 = iVar2 + 1;
|
|
|
|
} while (iVar2 < iVar3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local_d = '\0';
|
|
|
|
FUN_00460cc0(0x10000017,&local_d);
|
|
|
|
if (((local_d != '\0') &&
|
|
|
|
(piVar5 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1), piVar5 != (int *)0x0)) &&
|
|
|
|
((iVar2 = (**(code **)(*piVar5 + 0x94))(0x10000032), iVar2 != 0 &&
|
|
|
|
(iVar2 = FUN_004e1e20(), iVar2 != 0x1000001c)))) {
|
|
|
|
iVar2 = FUN_004e4200();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
FUN_0046f130(iVar2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (local_4 == -1) {
|
|
|
|
iVar2 = *(int *)(param_1 + 0x610);
|
|
|
|
iVar3 = 0;
|
|
|
|
if (0 < iVar2) {
|
|
|
|
do {
|
|
|
|
piVar5 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar6 = (**(code **)(*piVar5 + 0x94))(0x10000032);
|
|
|
|
if (iVar6 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar4 = FUN_004e1e20();
|
|
|
|
if (iVar4 != 0x1000001c) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_004e41c0(iVar6);
|
|
|
|
iVar3 = iVar3 + 1;
|
|
|
|
} while (iVar3 < iVar2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4670 at 0x004E4670 (size: 344) ---
|
|
|
|
|
|
void __fastcall FUN_004e4670(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
int local_8;
|
|
|
|
|
|
|
|
local_8 = *(int *)(param_1 + 0x66c);
|
|
|
|
if ((local_8 == 0) || (iVar3 = FUN_005583f0(), iVar3 == 0)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x680) == '\0') {
|
|
|
|
local_8 = *(int *)(iVar3 + 200);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_8 = *(int *)(iVar3 + 0xcc);
|
|
|
|
}
|
|
|
|
if ((*(byte *)(iVar3 + 0x100) & 1) == 0) {
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
iVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = *(int *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x66c) != iVar3) {
|
|
|
|
local_8 = 0;
|
|
|
|
goto LAB_004e46c8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (local_8 < 0) {
|
|
|
|
local_8 = -1;
|
|
|
|
FUN_004606b0(0x10000015);
|
|
|
|
FUN_004e4390();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
LAB_004e46c8:
|
|
|
|
FUN_004606b0(0x10000015);
|
|
|
|
FUN_00460b30(0x10000015,&local_8);
|
|
|
|
if (local_8 != -1) {
|
|
|
|
iVar3 = *(int *)(param_1 + 0x610);
|
|
|
|
if (iVar3 < local_8) {
|
|
|
|
iVar3 = local_8 - iVar3;
|
|
|
|
if (0 < iVar3) {
|
|
|
|
do {
|
|
|
|
iVar1 = FUN_004e4200();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
FUN_0046f130(iVar1);
|
|
|
|
iVar3 = iVar3 + -1;
|
|
|
|
} while (iVar3 != 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((local_8 < iVar3) && (iVar3 = iVar3 - local_8, 0 < iVar3)) {
|
|
|
|
do {
|
|
|
|
piVar2 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1);
|
|
|
|
if ((piVar2 != (int *)0x0) &&
|
|
|
|
((iVar1 = (**(code **)(*piVar2 + 0x94))(0x10000032), iVar1 != 0 &&
|
|
|
|
(iVar1 = FUN_0046e3a0(iVar1), iVar1 != 0)))) {
|
|
|
|
FUN_006bbc10(&stack0xfffffffc);
|
|
|
|
}
|
|
|
|
iVar3 = iVar3 + -1;
|
|
|
|
} while (iVar3 != 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4700 at 0x004E4700 (size: 36) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e4700(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007c07bc;
|
|
|
|
FUN_0049f850();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4730 at 0x004E4730 (size: 245) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e4730(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_0046e070(param_2,param_3);
|
|
|
|
param_1[0x19a] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x19b] = 0;
|
|
|
|
param_1[0x19c] = 0;
|
|
|
|
param_1[0x19d] = 0;
|
|
|
|
param_1[0x19e] = 0;
|
|
|
|
param_1[0x19f] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x1a0) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x681) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x682) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x683) = 0;
|
|
|
|
param_1[0x1a1] = 0;
|
|
|
|
*param_1 = &PTR_FUN_007c0a68;
|
|
|
|
param_1[0x19a] = &PTR_FUN_007c07c0;
|
|
|
|
param_1[0x1a2] = 0x20;
|
|
|
|
param_1[0x1a3] = 0x20;
|
|
|
|
param_1[0x1a5] = 0;
|
|
|
|
param_1[0x1a6] = 0;
|
|
|
|
param_1[0x1a7] = 0;
|
|
|
|
param_1[0x1a4] = &PTR_FUN_007c07bc;
|
|
|
|
param_1[0x1a8] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x1a9) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x6a5) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x6a6) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x6a7) = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x1aa) = 0;
|
|
|
|
param_1[0x1ab] = 0;
|
|
|
|
param_1[0x1ac] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x1ad) = 0;
|
|
|
|
param_1[0x1b0] = 0;
|
|
|
|
param_1[0x1b1] = 0;
|
|
|
|
param_1[0x1ae] = 1;
|
|
|
|
param_1[0x1af] = 0x3f800000;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4870 at 0x004E4870 (size: 239) ---
|
|
|
|
|
|
void __fastcall FUN_004e4870(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
void *pvVar2;
|
|
|
|
int iVar3;
|
|
|
|
int *piVar4;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x19a;
|
|
|
|
*param_1 = &PTR_FUN_007c0a68;
|
|
|
|
*puVar1 = &PTR_FUN_007c07c0;
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
piVar4 = (int *)FUN_0043c680();
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar4 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
for (piVar4 = (int *)param_1[0x1a5]; piVar4 != (int *)0x0; piVar4 = (int *)piVar4[1]) {
|
|
|
|
if (*piVar4 != 0) {
|
|
|
|
FUN_00460250();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while (pvVar2 = (void *)param_1[0x1a5], pvVar2 != (void *)0x0) {
|
|
|
|
iVar3 = *(int *)((int)pvVar2 + 4);
|
|
|
|
param_1[0x1a5] = iVar3;
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
param_1[0x1a6] = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(iVar3 + 8) = 0;
|
|
|
|
}
|
|
|
|
if (pvVar2 != (void *)0x0) {
|
|
|
|
operator_delete(pvVar2);
|
|
|
|
}
|
|
|
|
param_1[0x1a7] = param_1[0x1a7] + -1;
|
|
|
|
}
|
|
|
|
FUN_0046e460();
|
|
|
|
param_1[0x1a4] = &PTR_FUN_007c07bc;
|
|
|
|
while (pvVar2 = (void *)param_1[0x1a5], pvVar2 != (void *)0x0) {
|
|
|
|
iVar3 = *(int *)((int)pvVar2 + 4);
|
|
|
|
param_1[0x1a5] = iVar3;
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
param_1[0x1a6] = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(iVar3 + 8) = 0;
|
|
|
|
}
|
|
|
|
if (pvVar2 != (void *)0x0) {
|
|
|
|
operator_delete(pvVar2);
|
|
|
|
}
|
|
|
|
param_1[0x1a7] = param_1[0x1a7] + -1;
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_0046e140();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4990 at 0x004E4990 (size: 43) ---
|
|
|
|
|
|
void __thiscall FUN_004e4990(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00463830(param_2);
|
|
|
|
if (((*(uint *)(param_1 + 0x554) >> 0x11 & 1) != 0) && ((char)param_2 != '\0')) {
|
|
|
|
FUN_004e4390();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e49f0 at 0x004E49F0 (size: 156) ---
|
|
|
|
|
|
void __fastcall FUN_004e49f0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x684) != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
*(undefined4 *)(param_1 + 0x684) = 0;
|
|
|
|
}
|
|
|
|
if (0 < *(int *)(param_1 + 0x610)) {
|
|
|
|
iVar3 = 0;
|
|
|
|
do {
|
|
|
|
piVar1 = (int *)FUN_0046dc50(iVar3);
|
|
|
|
if ((piVar1 != (int *)0x0) && (iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 != 0))
|
|
|
|
{
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
iVar3 = iVar3 + 1;
|
|
|
|
} while (iVar3 < *(int *)(param_1 + 0x610));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x670) = 0;
|
|
|
|
FUN_004e3d00(0);
|
|
|
|
FUN_004e4390();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4a90 at 0x004E4A90 (size: 320) ---
|
|
|
|
|
|
int __thiscall FUN_004e4a90(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
int *piVar4;
|
|
|
|
uint uVar5;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
uVar5 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x610) != 0) {
|
|
|
|
do {
|
|
|
|
piVar4 = *(int **)(*(int *)(param_1 + 0x608) + uVar5 * 4);
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar4 + 0x94))(0x10000032);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar3 = FUN_004e1e20();
|
|
|
|
if (iVar3 == 0x1000001c) goto LAB_004e4b5f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar5 = uVar5 + 1;
|
|
|
|
} while (uVar5 < *(uint *)(param_1 + 0x610));
|
|
|
|
}
|
|
|
|
FUN_00460b30(0x10000015,&local_4);
|
|
|
|
if (local_4 == -1) {
|
|
|
|
iVar2 = FUN_004e4200();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
FUN_0046f130(iVar2);
|
|
|
|
piVar4 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1);
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar4 + 0x94))(0x10000032);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar3 = FUN_004e1e20();
|
|
|
|
if (iVar3 == 0x1000001c) {
|
|
|
|
LAB_004e4b5f:
|
|
|
|
cVar1 = '\x01';
|
|
|
|
if (*(char *)(param_1 + 0x6a4) != '\0') {
|
|
|
|
iVar3 = FUN_004e3b60(param_2);
|
|
|
|
cVar1 = '\x01' - (iVar3 != 0);
|
|
|
|
}
|
|
|
|
FUN_004e1da0(param_2,*(undefined1 *)(param_1 + 0x680));
|
|
|
|
FUN_004e2190(0x1000001d);
|
|
|
|
FUN_004e1f10(cVar1);
|
|
|
|
FUN_004e2e60();
|
|
|
|
FUN_004e4390();
|
|
|
|
return iVar2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4bd0 at 0x004E4BD0 (size: 157) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e4bd0(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iStack_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
piVar1 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar3 = FUN_004e1e20();
|
|
|
|
if (iVar3 == 0x1000001c) {
|
|
|
|
iStack_8 = iVar2;
|
|
|
|
iVar2 = FUN_0046e3a0(iVar2);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_006bbc10(&iStack_8);
|
|
|
|
}
|
|
|
|
goto LAB_004e4c2b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00460b30(0x10000015,&local_4);
|
|
|
|
if (local_4 != -1) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
LAB_004e4c2b:
|
|
|
|
FUN_004e4340(param_3);
|
|
|
|
uVar4 = FUN_004e4a90(param_2);
|
|
|
|
return uVar4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4c70 at 0x004E4C70 (size: 184) ---
|
|
|
|
|
|
void __thiscall FUN_004e4c70(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
uint uVar4;
|
|
|
|
|
|
|
|
iVar3 = param_2;
|
|
|
|
if (*(int *)(param_1 + 0x610) != 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
while (((piVar1 = *(int **)(*(int *)(param_1 + 0x608) + uVar4 * 4), piVar1 == (int *)0x0 ||
|
|
|
|
(iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 == 0)) ||
|
|
|
|
(*(int *)(iVar2 + 0x5fc) != iVar3))) {
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
if (*(uint *)(param_1 + 0x610) <= uVar4) {
|
|
|
|
FUN_004e4390();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (((*(char *)(param_1 + 0x6a4) != '\0') && (*(char *)(iVar2 + 0x640) != '\0')) &&
|
|
|
|
(iVar3 = FUN_004e3bc0(iVar3), iVar3 != 0)) {
|
|
|
|
FUN_004e1f10(1);
|
|
|
|
}
|
|
|
|
param_2 = iVar2;
|
|
|
|
iVar3 = FUN_0046e3a0(iVar2);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_006bbc10(¶m_2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_004e4390();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4d30 at 0x004E4D30 (size: 257) ---
|
|
|
|
|
|
int __thiscall FUN_004e4d30(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int *piVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
uVar4 = 0;
|
|
|
|
local_4 = param_1;
|
|
|
|
if (*(int *)(param_1 + 0x610) != 0) {
|
|
|
|
do {
|
|
|
|
piVar3 = *(int **)(*(int *)(param_1 + 0x608) + uVar4 * 4);
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
iVar1 = (**(code **)(*piVar3 + 0x94))(0x10000032);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar2 = FUN_004e1e20();
|
|
|
|
if (iVar2 == 0x1000001c) goto LAB_004e4df9;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
} while (uVar4 < *(uint *)(param_1 + 0x610));
|
|
|
|
}
|
|
|
|
FUN_00460b30(0x10000015,&local_4);
|
|
|
|
if (local_4 == -1) {
|
|
|
|
iVar1 = FUN_004e4200();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
FUN_0046f130(iVar1);
|
|
|
|
piVar3 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1);
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
iVar1 = (**(code **)(*piVar3 + 0x94))(0x10000032);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar2 = FUN_004e1e20();
|
|
|
|
if (iVar2 == 0x1000001c) {
|
|
|
|
LAB_004e4df9:
|
|
|
|
FUN_004e1dd0(param_2);
|
|
|
|
FUN_004e2190(0x1000001d);
|
|
|
|
FUN_004e2e60();
|
|
|
|
FUN_004e4390();
|
|
|
|
return iVar1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4e40 at 0x004E4E40 (size: 157) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e4e40(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iStack_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
piVar1 = (int *)FUN_0046dc50(*(int *)(param_1 + 0x610) + -1);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar3 = FUN_004e1e20();
|
|
|
|
if (iVar3 == 0x1000001c) {
|
|
|
|
iStack_8 = iVar2;
|
|
|
|
iVar2 = FUN_0046e3a0(iVar2);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_006bbc10(&iStack_8);
|
|
|
|
}
|
|
|
|
goto LAB_004e4e9b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00460b30(0x10000015,&local_4);
|
|
|
|
if (local_4 != -1) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
LAB_004e4e9b:
|
|
|
|
FUN_004e4340(param_3);
|
|
|
|
uVar4 = FUN_004e4d30(param_2);
|
|
|
|
return uVar4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e4ee0 at 0x004E4EE0 (size: 1276) ---
|
|
|
|
|
|
uint __thiscall FUN_004e4ee0(int param_1,char param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
uint uVar6;
|
|
|
|
uint uVar7;
|
|
|
|
int iVar8;
|
|
|
|
uint unaff_ESI;
|
|
|
|
int unaff_retaddr;
|
|
|
|
uint local_9c;
|
|
|
|
uint3 uStack_98;
|
|
|
|
undefined1 uStack_95;
|
|
|
|
undefined1 auStack_94 [148];
|
|
|
|
|
|
|
|
uStack_98 = (uint3)(ushort)uStack_98;
|
|
|
|
piVar1 = (int *)FUN_0046e5e0();
|
|
|
|
if ((piVar1 == (int *)0x0) || (iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 == 0)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
piVar1 = (int *)FUN_005583f0(unaff_retaddr);
|
|
|
|
if (((*(int *)(param_1 + 0x66c) == unaff_retaddr) && (piVar1 != (int *)0x0)) &&
|
|
|
|
(iVar3 = (**(code **)(*piVar1 + 0x14))(), iVar3 != 0)) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(L"You cannot place yourself in your inventory!");
|
|
|
|
FUN_0042cbe0(&stack0xffffff60,1);
|
|
|
|
FUN_004011b0();
|
|
|
|
goto LAB_004e4f82;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x680) == '\0') {
|
|
|
|
LAB_004e4ffe:
|
|
|
|
if (param_2 != '\0') {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(L"Cannot place container in item list");
|
|
|
|
FUN_0042cbe0(&stack0xffffff60,1);
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(unaff_ESI - 0x10));
|
|
|
|
if ((LVar4 == 0) && ((undefined4 *)(unaff_ESI - 0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(unaff_ESI - 0x14))(1);
|
|
|
|
}
|
|
|
|
LAB_004e4f82:
|
|
|
|
FUN_00693500(0x1a,auStack_94);
|
|
|
|
FUN_0042e590();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ((param_2 == '\0') && (*(int *)(iVar2 + 0x61c) == 0)) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(L"Cannot place item in container list");
|
|
|
|
FUN_0042cbe0(&stack0xffffff60,1);
|
|
|
|
FUN_004011b0();
|
|
|
|
goto LAB_004e4f82;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x680) == '\0') goto LAB_004e4ffe;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x684) != 0) {
|
|
|
|
puVar5 = (undefined4 *)
|
|
|
|
FUN_0058f8e0(&uStack_98,*(undefined4 *)(*(int *)(param_1 + 0x684) + 0x5fc),2,0);
|
|
|
|
FUN_00480980(&stack0xffffff60,0,L"Already attempting to place %s here",*puVar5);
|
|
|
|
puVar5 = (undefined4 *)(_uStack_98 + -0x14);
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(_uStack_98 + -0x10));
|
|
|
|
if ((LVar4 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042cbe0(&stack0xffffff60,1);
|
|
|
|
FUN_00693500(0x1a,auStack_94);
|
|
|
|
FUN_0042e590();
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(unaff_ESI - 0x10));
|
|
|
|
if (LVar4 != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if ((undefined4 *)(unaff_ESI - 0x14) == (undefined4 *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
(*(code *)**(undefined4 **)(unaff_ESI - 0x14))(1);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar3 = FUN_00588720(unaff_retaddr,*(undefined4 *)(iVar2 + 0x5fc),1);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar6 = FUN_00480780(iVar2);
|
|
|
|
uVar7 = FUN_004e3c10();
|
|
|
|
if ((int)uVar7 < (int)uVar6) {
|
|
|
|
uVar6 = uVar7;
|
|
|
|
}
|
|
|
|
iVar8 = FUN_005583f0(*(undefined4 *)(iVar2 + 0x5fc));
|
|
|
|
iVar3 = *(int *)(param_1 + 0x66c);
|
|
|
|
local_9c = 0xffffff;
|
|
|
|
if (iVar8 != 0) {
|
|
|
|
if (param_2 == '\0') {
|
|
|
|
if (*(int *)(iVar8 + 200) == 0) {
|
|
|
|
iVar8 = FUN_004a48a0();
|
|
|
|
if (iVar8 != 0) {
|
|
|
|
puVar5 = (undefined4 *)FUN_0058f8e0(&uStack_98,*(undefined4 *)(iVar2 + 0x5fc),2,0);
|
|
|
|
FUN_00480980(&stack0xffffff60,0,L"The %s cannot accept items",*puVar5);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042cbe0(&stack0xffffff60,1);
|
|
|
|
FUN_00693500(0x1a,auStack_94);
|
|
|
|
FUN_0042e590();
|
|
|
|
FUN_004011b0();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = *(int *)(iVar2 + 0x5fc);
|
|
|
|
local_9c = 0x1ffffff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (*(int *)(iVar8 + 0xcc) != 0) {
|
|
|
|
iVar3 = *(int *)(iVar2 + 0x5fc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = FUN_005583f0(iVar3);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
if (param_2 == '\0') {
|
|
|
|
unaff_ESI = FUN_0058cec0(unaff_retaddr);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
unaff_ESI = FUN_0058cee0(unaff_retaddr);
|
|
|
|
}
|
|
|
|
if (unaff_ESI != 0xffffffff) {
|
|
|
|
if (uVar6 == unaff_ESI) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if ((uVar6 == unaff_ESI + 1) && (DAT_0081d7ec == DAT_0081d7f0)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = FUN_005583f0(unaff_retaddr);
|
|
|
|
if (((iVar2 != 0) && (*(int *)(iVar2 + 0x78) == 1)) && (DAT_0081d7ec != DAT_0081d7f0)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (((iVar3 != 0) && (iVar2 = FUN_00588cc0(unaff_retaddr,iVar3), iVar2 != 0)) &&
|
|
|
|
(iVar3 == *(int *)(param_1 + 0x66c))) {
|
|
|
|
iVar2 = FUN_004e4bd0(unaff_retaddr,uVar6);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
iVar2 = FUN_004e3c10();
|
|
|
|
piVar1 = (int *)FUN_0046dc50(iVar2 + -1);
|
|
|
|
if ((piVar1 != (int *)0x0) &&
|
|
|
|
(iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 != 0)) {
|
|
|
|
FUN_004e1e00();
|
|
|
|
FUN_004e2190(0x1000001c);
|
|
|
|
}
|
|
|
|
iVar2 = FUN_004e4bd0(unaff_retaddr,uVar6);
|
|
|
|
if (iVar2 == 0) goto LAB_004e537c;
|
|
|
|
}
|
|
|
|
FUN_004e1e40(1);
|
|
|
|
*(int *)(param_1 + 0x684) = iVar2;
|
|
|
|
}
|
|
|
|
LAB_004e537c:
|
|
|
|
if (((unaff_ESI != 0xffffffff) && ((int)unaff_ESI < (int)uVar6)) &&
|
|
|
|
(DAT_0081d7ec == DAT_0081d7f0)) {
|
|
|
|
uVar6 = uVar6 - 1;
|
|
|
|
}
|
|
|
|
if ((iVar3 == 0) ||
|
|
|
|
(iVar2 = FUN_00588f70(unaff_retaddr,iVar3,0,local_9c >> 0x18,
|
|
|
|
(iVar3 != *(int *)(param_1 + 0x66c)) - 1 & uVar6), iVar2 == 0))
|
|
|
|
goto LAB_004e53cb;
|
|
|
|
}
|
|
|
|
local_9c = 0x10000;
|
|
|
|
LAB_004e53cb:
|
|
|
|
return local_9c >> 0x10 & 0xff;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e53e0 at 0x004E53E0 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004e53e0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004e4870();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5400 at 0x004E5400 (size: 19) ---
|
|
|
|
|
|
void FUN_004e5400(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000031,&LAB_004e4960);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5420 at 0x004E5420 (size: 156) ---
|
|
|
|
|
|
void __thiscall FUN_004e5420(int param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
char cVar2;
|
|
|
|
int iVar3;
|
|
|
|
int local_8;
|
|
|
|
undefined1 local_4 [4];
|
|
|
|
|
|
|
|
iVar1 = *(int *)(*(int *)(param_2 + 0xc) + 0x10);
|
|
|
|
iVar3 = *(int *)(*(int *)(param_2 + 0xc) + 8);
|
|
|
|
if ((((((iVar3 != 0) && (iVar1 != 0)) &&
|
|
|
|
((cVar2 = FUN_0045fbb0(param_1), cVar2 != '\0' || (iVar1 == param_1)))) &&
|
|
|
|
((FUN_004e3380(iVar3,&local_8,local_4,¶m_2), local_8 != 0 && ((param_2 & 0xe) == 0)))) &&
|
|
|
|
((iVar3 = FUN_005583f0(local_8), iVar1 == param_1 ||
|
|
|
|
((cVar2 = FUN_004e3130(), cVar2 != '\0' ||
|
|
|
|
(cVar2 = FUN_004e4ee0(local_8,param_2 & 0xffffff01), cVar2 == '\0')))))) && (iVar3 != 0)) {
|
|
|
|
FUN_0058cf00(0);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5660 at 0x004E5660 (size: 260) ---
|
|
|
|
|
|
void __thiscall FUN_004e5660(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
bool bVar4;
|
|
|
|
|
|
|
|
iVar1 = FUN_005583f0(param_2);
|
|
|
|
if ((iVar1 == 0) ||
|
|
|
|
((((*(uint *)(iVar1 + 0x100) & 0x800000) == 0 && (*(int *)(iVar1 + 200) == 0)) &&
|
|
|
|
(*(int *)(iVar1 + 0xcc) == 0)))) {
|
|
|
|
*(undefined4 *)(param_1 + 0x66c) = 0;
|
|
|
|
FUN_004e49f0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
bVar4 = *(int *)(param_1 + 0x66c) != param_2;
|
|
|
|
if (bVar4) {
|
|
|
|
*(int *)(param_1 + 0x66c) = param_2;
|
|
|
|
}
|
|
|
|
FUN_004e4670();
|
|
|
|
FUN_004e49f0();
|
|
|
|
if ((*(byte *)(iVar1 + 0x100) & 1) == 0) {
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
iVar1 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = *(int *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
if (param_2 != iVar1) goto LAB_004e5739;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x680) == '\0') {
|
|
|
|
iVar1 = FUN_0058cd20();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = FUN_0058cd30();
|
|
|
|
}
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_005aefc0(0);
|
|
|
|
iVar3 = 0;
|
|
|
|
if (0 < *(int *)(iVar1 + 0x10)) {
|
|
|
|
do {
|
|
|
|
iVar2 = FUN_005aece0();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_004e4a90(iVar2);
|
|
|
|
}
|
|
|
|
FUN_005aecb0();
|
|
|
|
iVar3 = iVar3 + 1;
|
|
|
|
} while (iVar3 < *(int *)(iVar1 + 0x10));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LAB_004e5739:
|
|
|
|
if (!bVar4) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_0047a160(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5770 at 0x004E5770 (size: 124) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e5770(int param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if (param_2 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x670) != param_2) {
|
|
|
|
if ((param_3 != 0) && (iVar1 = FUN_004e3b60(param_2), iVar1 == 0)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x678) != 0) {
|
|
|
|
FUN_004e42e0(param_1);
|
|
|
|
FUN_004e5660(param_2,0,1);
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0x678) + 0x610) != 0) {
|
|
|
|
FUN_0046ed00(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x670) = param_2;
|
|
|
|
FUN_004e3d00(param_2);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e57f0 at 0x004E57F0 (size: 159) ---
|
|
|
|
|
|
void __fastcall FUN_004e57f0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
if (((int *)**(int **)(param_1 + 0x608) == (int *)0x0) ||
|
|
|
|
(iVar1 = (**(code **)(*(int *)**(int **)(param_1 + 0x608) + 0x94))(0x10000032), iVar1 == 0)) {
|
|
|
|
if (*(int *)(param_1 + 0x678) != 0) {
|
|
|
|
FUN_004e5660(0,0,1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(iVar1 + 0x5fc);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x670) == iVar1) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_004e3b60(iVar1);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x678) != 0) {
|
|
|
|
FUN_004e42e0(param_1);
|
|
|
|
FUN_004e5660(iVar1,0,1);
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0x678) + 0x610) != 0) {
|
|
|
|
FUN_0046ed00(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x670) = iVar1;
|
|
|
|
FUN_004e3d00(iVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5890 at 0x004E5890 (size: 17) ---
|
|
|
|
|
|
void __fastcall FUN_004e5890(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004e5660(*(undefined4 *)(param_1 + 0x66c),1,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e58b0 at 0x004E58B0 (size: 114) ---
|
|
|
|
|
|
void __thiscall FUN_004e58b0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
iVar2 = *(int *)(param_1 + 0x66c);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
if (iVar2 != param_2) {
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x610) == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
while (((piVar1 = *(int **)(*(int *)(param_1 + 0x608) + uVar3 * 4), piVar1 == (int *)0x0 ||
|
|
|
|
(iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 == 0)) ||
|
|
|
|
(*(int *)(iVar2 + 0x5fc) != param_2))) {
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
if (*(uint *)(param_1 + 0x610) <= uVar3) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x66c);
|
|
|
|
}
|
|
|
|
FUN_004e5660(iVar2,1,1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5930 at 0x004E5930 (size: 583) ---
|
|
|
|
|
|
void __fastcall FUN_004e5930(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
FUN_00474870();
|
|
|
|
piVar3 = (int *)FUN_0043c680();
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = param_1 + 0x668;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar3 + 4))(0x186ab,iVar4);
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = param_1 + 0x668;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar3 + 4))(0x186aa,iVar4);
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = param_1 + 0x668;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar3 + 4))(0x186a8,iVar4);
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = param_1 + 0x668;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar3 + 4))(0x186a9,iVar4);
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = param_1 + 0x668;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar3 + 4))(0x4dd263,iVar4);
|
|
|
|
}
|
|
|
|
FUN_00460cc0(0x10000011,param_1 + 0x680);
|
|
|
|
FUN_00460cc0(0x10000013,param_1 + 0x681);
|
|
|
|
FUN_00460cc0(0x10000012,param_1 + 0x682);
|
|
|
|
FUN_00460cc0(0x10000014,param_1 + 0x683);
|
|
|
|
FUN_00460cc0(0x10000052,param_1 + 0x6a4);
|
|
|
|
FUN_00460cc0(0x1000005c,param_1 + 0x6a5);
|
|
|
|
FUN_00460cc0(0x1000005d,param_1 + 0x6a6);
|
|
|
|
FUN_00460cc0(0x10000054,param_1 + 0x6a7);
|
|
|
|
FUN_00460cc0(0x10000053,param_1 + 0x6a8);
|
|
|
|
FUN_00460b30(0x10000059,param_1 + 0x6ac);
|
|
|
|
FUN_00460b30(0x1000005a,param_1 + 0x6b0);
|
|
|
|
FUN_00460b30(0x10000057,param_1 + 0x6b8);
|
|
|
|
FUN_00460bf0(0x1000005b,param_1 + 0x6bc);
|
|
|
|
FUN_00460b30(0x10000015,&stack0xfffffffc);
|
|
|
|
if (param_1 < 0) {
|
|
|
|
iVar4 = FUN_004e4200();
|
|
|
|
if (iVar4 != 0) {
|
|
|
|
uVar2 = FUN_0069fe60();
|
|
|
|
*(undefined4 *)(param_1 + 0x688) = uVar2;
|
|
|
|
uVar2 = FUN_0069fe70();
|
|
|
|
*(undefined4 *)(param_1 + 0x68c) = uVar2;
|
|
|
|
FUN_0046f130(iVar4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (0 < param_1) {
|
|
|
|
iVar4 = 0;
|
|
|
|
do {
|
|
|
|
iVar1 = FUN_004e4200();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
uVar2 = FUN_0069fe60();
|
|
|
|
*(undefined4 *)(param_1 + 0x688) = uVar2;
|
|
|
|
uVar2 = FUN_0069fe70();
|
|
|
|
*(undefined4 *)(param_1 + 0x68c) = uVar2;
|
|
|
|
FUN_0046f130(iVar1);
|
|
|
|
}
|
|
|
|
iVar4 = iVar4 + 1;
|
|
|
|
} while (iVar4 < param_1);
|
|
|
|
FUN_004e49f0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_004e49f0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5db0 at 0x004E5DB0 (size: 161) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e5db0(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
*param_1 = &PTR_FUN_007c11e0;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007c0f38;
|
|
|
|
param_1[0x17f] = 0;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
param_1[0x183] = 0;
|
|
|
|
param_1[0x184] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x185) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x615) = 0;
|
|
|
|
param_1[0x186] = 10;
|
|
|
|
param_1[0x187] = 0;
|
|
|
|
param_1[0x188] = 0;
|
|
|
|
param_1[0x189] = 0;
|
|
|
|
FUN_00465f90(3);
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
(**(code **)(*piVar1 + 4))(0x186a7,param_1 + 0x17e);
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5e90 at 0x004E5E90 (size: 68) ---
|
|
|
|
|
|
void __fastcall FUN_004e5e90(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x17e;
|
|
|
|
*param_1 = &PTR_FUN_007c11e0;
|
|
|
|
*puVar1 = &PTR_FUN_007c0f38;
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5f10 at 0x004E5F10 (size: 71) ---
|
|
|
|
|
|
void FUN_004e5f10(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
|
|
|
|
FUN_00463d60(param_1,param_2);
|
|
|
|
uVar1 = FUN_0069fe70();
|
|
|
|
uVar2 = FUN_0069fe60(uVar1);
|
|
|
|
uVar3 = FUN_0069fe30(uVar2);
|
|
|
|
uVar4 = FUN_0069fe00(uVar3);
|
|
|
|
FUN_00451d90(uVar4,uVar3,uVar2,uVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5f60 at 0x004E5F60 (size: 71) ---
|
|
|
|
|
|
void FUN_004e5f60(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
|
|
|
|
FUN_004634c0(param_1,param_2);
|
|
|
|
uVar1 = FUN_0069fe70();
|
|
|
|
uVar2 = FUN_0069fe60(uVar1);
|
|
|
|
uVar3 = FUN_0069fe30(uVar2);
|
|
|
|
uVar4 = FUN_0069fe00(uVar3);
|
|
|
|
FUN_00451d90(uVar4,uVar3,uVar2,uVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e5fb0 at 0x004E5FB0 (size: 93) ---
|
|
|
|
|
|
void FUN_004e5fb0(undefined4 param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_00508890(param_1);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
if (param_2 == 0) {
|
|
|
|
FUN_00512580();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (param_2 == 1) {
|
|
|
|
FUN_00512550();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (param_2 == 2) {
|
|
|
|
FUN_00512550();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6010 at 0x004E6010 (size: 40) ---
|
|
|
|
|
|
void FUN_004e6010(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if (param_1 != 0) {
|
|
|
|
iVar1 = FUN_00564d30();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_00564d30(param_1,param_2);
|
|
|
|
FUN_005658d0(param_1,param_2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6040 at 0x004E6040 (size: 89) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e6040(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x17e;
|
|
|
|
*param_1 = &PTR_FUN_007c11e0;
|
|
|
|
*puVar1 = &PTR_FUN_007c0f38;
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e60a0 at 0x004E60A0 (size: 19) ---
|
|
|
|
|
|
void FUN_004e60a0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000030,&LAB_004e5ee0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e60c0 at 0x004E60C0 (size: 77) ---
|
|
|
|
|
|
void FUN_004e60c0(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if ((DAT_0083e03c != 0) && (*(int **)(DAT_0083e03c + 0x244) != (int *)0x0)) {
|
|
|
|
iVar1 = (**(code **)(**(int **)(DAT_0083e03c + 0x244) + 0x94))(0x10000032);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_00451d30(*(undefined4 *)(iVar1 + 0x5fc),0xffffffff);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00451ca0(param_1,param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6110 at 0x004E6110 (size: 144) ---
|
|
|
|
|
|
void __thiscall FUN_004e6110(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
byte local_8 [4];
|
|
|
|
undefined1 local_4 [4];
|
|
|
|
|
|
|
|
iVar1 = *(int *)(*(int *)(param_2 + 0xc) + 8);
|
|
|
|
iVar2 = *(int *)(*(int *)(param_2 + 0xc) + 0x10);
|
|
|
|
if (((iVar1 != 0) && (iVar2 != 0)) && (*(int *)(iVar2 + 0x2e4) == *(int *)(param_1 + 0x2e4))) {
|
|
|
|
FUN_004e3380(iVar1,¶m_2,local_4,local_8);
|
|
|
|
if ((param_2 != 0) && ((local_8[0] & 0xe) == 0)) {
|
|
|
|
uVar3 = (**(code **)(*DAT_00837ff4 + 0x18))();
|
|
|
|
uVar4 = (**(code **)(*DAT_00837ff4 + 0x1c))();
|
|
|
|
*(int *)(param_1 + 0x61c) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = 5;
|
|
|
|
FUN_004e60c0(uVar3,uVar4,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e61a0 at 0x004E61A0 (size: 93) ---
|
|
|
|
|
|
void __fastcall FUN_004e61a0(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
FUN_004639a0();
|
|
|
|
piVar1 = (int *)FUN_00415730(0x10000038,5,0x23);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
piVar2 = (int *)FUN_0045d8b0(param_1,piVar1,0x10000345);
|
|
|
|
param_1[0x189] = (int)piVar2;
|
|
|
|
(**(code **)(*piVar2 + 0x18))(0);
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x110))(1);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004e61f7. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6200 at 0x004E6200 (size: 80) ---
|
|
|
|
|
|
bool FUN_004e6200(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
char cVar2;
|
|
|
|
|
|
|
|
cVar1 = FUN_00472890(param_1);
|
|
|
|
FUN_00425ba0();
|
|
|
|
if (param_1 == (int *)0x0) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
cVar2 = FUN_00427240(0x10000003,param_1);
|
|
|
|
(**(code **)(*param_1 + 0x14))();
|
|
|
|
return cVar2 != '\0' && cVar1 != '\0';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e62b0 at 0x004E62B0 (size: 158) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e62b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
char cVar5;
|
|
|
|
undefined4 uVar6;
|
|
|
|
|
|
|
|
if ((*(int *)(param_1 + 0x5fc) != 0) && (*(double *)(param_1 + 0x600) <= _DAT_008379a8)) {
|
|
|
|
uVar1 = *(int *)(param_1 + 0x5fc) + 1;
|
|
|
|
cVar5 = '\0';
|
|
|
|
*(uint *)(param_1 + 0x5fc) = uVar1;
|
|
|
|
if (uVar1 < 5) {
|
|
|
|
*(double *)(param_1 + 0x600) = _DAT_008379a8 + _DAT_007c0d50;
|
|
|
|
cVar5 = ((uVar1 & 1) != 0) + '\x01';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x5fc) = 0;
|
|
|
|
}
|
|
|
|
FUN_004e5fb0(*(undefined4 *)(param_1 + 0x60c),cVar5);
|
|
|
|
}
|
|
|
|
piVar2 = DAT_00837ff4;
|
|
|
|
if ((DAT_00837ff4 != (int *)0x0) && (*(int *)(param_1 + 0x610) < 1)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = 1;
|
|
|
|
uVar6 = 0;
|
|
|
|
uVar3 = (**(code **)(*piVar2 + 0x1c))(0);
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x18))(uVar3);
|
|
|
|
FUN_004e60c0(uVar4,uVar3,uVar6);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6350 at 0x004E6350 (size: 58) ---
|
|
|
|
|
|
void __thiscall FUN_004e6350(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004633f0(param_2,param_3);
|
|
|
|
if (*(int *)(param_1 + 0x610) < 1) {
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = 1;
|
|
|
|
FUN_004e60c0(param_2,param_3,0);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6390 at 0x004E6390 (size: 279) ---
|
|
|
|
|
|
void __thiscall FUN_004e6390(int param_1,undefined4 param_2,undefined4 param_3,int param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
FUN_00460ff0(param_2,param_3,param_4);
|
|
|
|
if (param_4 == 7) {
|
|
|
|
iVar1 = (**(code **)(**(int **)(DAT_0083da58 + 0xb8) + 0xd8))(1);
|
|
|
|
if ((iVar1 == 0) && (*(int *)(param_1 + 0x610) < 2)) {
|
|
|
|
iVar1 = FUN_00564d30();
|
|
|
|
if (*(int *)(iVar1 + 0x2c) != 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = 7;
|
|
|
|
iVar1 = FUN_00564d30();
|
|
|
|
*(undefined4 *)(param_1 + 0x620) = *(undefined4 *)(iVar1 + 0x2c);
|
|
|
|
FUN_004e60c0(param_2,param_3,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = 2;
|
|
|
|
FUN_004e60c0(param_2,param_3,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (param_4 == 8) {
|
|
|
|
if (*(char *)(DAT_00837ff4 + 0x89) != '\0') {
|
|
|
|
FUN_00456280(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (param_4 == 10) {
|
|
|
|
iVar1 = (**(code **)(**(int **)(DAT_0083da58 + 0xb8) + 0xd4))();
|
|
|
|
if ((iVar1 == 0) && (*(int *)(param_1 + 0x610) < 4)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = 4;
|
|
|
|
FUN_004e60c0(param_2,param_3,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e64b0 at 0x004E64B0 (size: 199) ---
|
|
|
|
|
|
void __thiscall FUN_004e64b0(int param_1,undefined4 param_2,undefined4 param_3,int param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00463a70(param_2,param_3,param_4);
|
|
|
|
if (param_4 == 7) {
|
|
|
|
(**(code **)(**(int **)(DAT_0083da58 + 0xb8) + 0xd8))(0);
|
|
|
|
}
|
|
|
|
else if (param_4 == 8) {
|
|
|
|
if (*(char *)(param_1 + 0x614) != '\0') {
|
|
|
|
if (*(char *)(param_1 + 0x615) != '\0') {
|
|
|
|
*(undefined1 *)(param_1 + 0x615) = 0;
|
|
|
|
}
|
|
|
|
FUN_00564d30();
|
|
|
|
FUN_005653d0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(char *)(DAT_00837ff4 + 0x89) != '\0') {
|
|
|
|
FUN_00456280(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x610) < 3) {
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = 3;
|
|
|
|
FUN_004e60c0(param_2,param_3,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6580 at 0x004E6580 (size: 458) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e6580(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 *unaff_EBX;
|
|
|
|
undefined4 *local_14;
|
|
|
|
int *piStack_10;
|
|
|
|
undefined4 *puStack_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
int *local_4;
|
|
|
|
|
|
|
|
if (param_2 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
local_14 = (undefined4 *)((uint)local_14 & 0xffffff00);
|
|
|
|
FUN_006a0660();
|
|
|
|
iVar2 = FUN_005583f0(param_2);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_006a0570(1);
|
|
|
|
iVar3 = FUN_005df0f5(0xc);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = FUN_0058f490();
|
|
|
|
uVar4 = FUN_00694a00(uVar4);
|
|
|
|
}
|
|
|
|
FUN_006a0610(uVar4);
|
|
|
|
if ((((*(uint *)(iVar2 + 0x100) & 0x800000) == 0) && (*(int *)(iVar2 + 200) == 0)) &&
|
|
|
|
(*(int *)(iVar2 + 0xcc) == 0)) {
|
|
|
|
uVar1 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar1 = 1;
|
|
|
|
}
|
|
|
|
local_14 = (undefined4 *)CONCAT31(local_14._1_3_,uVar1);
|
|
|
|
}
|
|
|
|
local_8 = 0;
|
|
|
|
local_4 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x1000000f);
|
|
|
|
if (local_4 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_4 + 0x7c))(param_2);
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0xd4))(&local_8);
|
|
|
|
local_14 = (undefined4 *)0x0;
|
|
|
|
piStack_10 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000011);
|
|
|
|
if (piStack_10 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_10 + 0x74))(unaff_EBX);
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0xd4))(&local_14);
|
|
|
|
if ((unaff_EBX != (undefined4 *)0x0) &&
|
|
|
|
(iVar2 = unaff_EBX[1], unaff_EBX[1] = iVar2 + -1, iVar2 + -1 == 0)) {
|
|
|
|
(**(code **)*unaff_EBX)(1);
|
|
|
|
}
|
|
|
|
if (local_14 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_14[1];
|
|
|
|
local_14[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_14)(1);
|
|
|
|
}
|
|
|
|
local_14 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (piStack_10 != (int *)0x0) {
|
|
|
|
iVar2 = piStack_10[1];
|
|
|
|
piStack_10[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*piStack_10)(1);
|
|
|
|
}
|
|
|
|
piStack_10 = (int *)0x0;
|
|
|
|
}
|
|
|
|
if (puStack_c != (undefined4 *)0x0) {
|
|
|
|
iVar2 = puStack_c[1];
|
|
|
|
puStack_c[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_c)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6750 at 0x004E6750 (size: 15) ---
|
|
|
|
|
|
void FUN_004e6750(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_1 == 3) {
|
|
|
|
FUN_004e62b0();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6b30 at 0x004E6B30 (size: 87) ---
|
|
|
|
|
|
void __fastcall FUN_004e6b30(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
FUN_004722f0();
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = param_1 + 0x720;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1f0,iVar2);
|
|
|
|
if (param_1 != 0) {
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd215,param_1 + 0x720);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd215,0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6bf0 at 0x004E6BF0 (size: 92) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e6bf0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x1c8;
|
|
|
|
*param_1 = &PTR_FUN_007c1638;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
*puVar1 = &PTR_FUN_007c1390;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_00471f80();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6c50 at 0x004E6C50 (size: 19) ---
|
|
|
|
|
|
void FUN_004e6c50(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000006,&LAB_004e6b90);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6c70 at 0x004E6C70 (size: 241) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e6c70(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined1 *puVar4;
|
|
|
|
undefined *puVar5;
|
|
|
|
int **ppiVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
int *local_64;
|
|
|
|
undefined1 local_60 [4];
|
|
|
|
undefined1 local_5c [4];
|
|
|
|
int *local_58;
|
|
|
|
undefined **local_54;
|
|
|
|
undefined1 auStack_50 [60];
|
|
|
|
undefined **ppuStack_14;
|
|
|
|
float fStack_4;
|
|
|
|
|
|
|
|
ppiVar6 = &local_64;
|
|
|
|
puVar4 = local_60;
|
|
|
|
puVar5 = &DAT_007c1360;
|
|
|
|
local_64 = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar4,&DAT_007c1360,ppiVar6);
|
|
|
|
FUN_00406570(puVar4,puVar5,ppiVar6);
|
|
|
|
piVar1 = local_64;
|
|
|
|
uVar7 = 0;
|
|
|
|
local_58 = (int *)0x0;
|
|
|
|
local_54 = (undefined **)0x0;
|
|
|
|
piVar2 = local_64;
|
|
|
|
if (local_64 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_64 + 0x10))(local_64,0);
|
|
|
|
}
|
|
|
|
piVar2 = (int *)FUN_0048bb00(local_5c,piVar2,uVar7);
|
|
|
|
iVar3 = *piVar2;
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
}
|
|
|
|
piVar1 = local_58;
|
|
|
|
if (local_58 != (int *)0x0) {
|
|
|
|
if (-1 < iVar3) {
|
|
|
|
iVar3 = FUN_0058fd30();
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_005cbdd0();
|
|
|
|
iVar3 = FUN_00594770(auStack_50);
|
|
|
|
if ((iVar3 != 0) && (fStack_4 < _DAT_007938b0)) {
|
|
|
|
(**(code **)(*param_1 + 0x9c))(1);
|
|
|
|
ppuStack_14 = &PTR_FUN_0079385c;
|
|
|
|
local_54 = &PTR_FUN_0079385c;
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0xd);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6d90 at 0x004E6D90 (size: 76) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e6d90(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00471f10(param_2,param_3);
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x1ca] = 0;
|
|
|
|
param_1[0x1cb] = 0;
|
|
|
|
*param_1 = &PTR_FUN_007c1a80;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007c17d8;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6e20 at 0x004E6E20 (size: 55) ---
|
|
|
|
|
|
void __fastcall FUN_004e6e20(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
FUN_004722f0();
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (param_1 != 0) {
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd21b,param_1 + 0x720);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd21b,0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6e60 at 0x004E6E60 (size: 78) ---
|
|
|
|
|
|
void __fastcall FUN_004e6e60(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x1c8;
|
|
|
|
*param_1 = &PTR_FUN_007c1a80;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
*puVar1 = &PTR_FUN_007c17d8;
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_00471f80();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6ee0 at 0x004E6EE0 (size: 102) ---
|
|
|
|
|
|
void __thiscall FUN_004e6ee0(int *param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if (DAT_00796344 < param_2) {
|
|
|
|
(**(code **)(*param_1 + 0x9c))(1);
|
|
|
|
iVar1 = DAT_008379ac;
|
|
|
|
param_1[0x1ca] = DAT_008379a8;
|
|
|
|
param_1[0x1cb] = iVar1;
|
|
|
|
FUN_00465f90(3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0xd);
|
|
|
|
param_1[0x1ca] = 0;
|
|
|
|
param_1[0x1cb] = 0;
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6f50 at 0x004E6F50 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004e6f50(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004e6e60();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e6f70 at 0x004E6F70 (size: 19) ---
|
|
|
|
|
|
void FUN_004e6f70(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000005,&LAB_004e6eb0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7020 at 0x004E7020 (size: 87) ---
|
|
|
|
|
|
void __fastcall FUN_004e7020(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
FUN_004722f0();
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = param_1 + 0x720;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd219,iVar2);
|
|
|
|
if (param_1 != 0) {
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd21a,param_1 + 0x720);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd21a,0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7120 at 0x004E7120 (size: 92) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e7120(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x1c8;
|
|
|
|
*param_1 = &PTR_FUN_007c1eb8;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
*puVar1 = &PTR_FUN_007c1c10;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_00471f80();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7180 at 0x004E7180 (size: 19) ---
|
|
|
|
|
|
void FUN_004e7180(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000004,&LAB_004e7080);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e71a0 at 0x004E71A0 (size: 94) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e71a0(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00471f10(param_2,param_3);
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x1c9] = 0;
|
|
|
|
param_1[0x1ca] = 0;
|
|
|
|
param_1[0x1cb] = 0;
|
|
|
|
param_1[0x1cc] = 0;
|
|
|
|
param_1[0x1cd] = 0;
|
|
|
|
*param_1 = &PTR_FUN_007c2138;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007ccb60;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7270 at 0x004E7270 (size: 122) ---
|
|
|
|
|
|
void __thiscall FUN_004e7270(int *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if (param_1[0x1c9] != param_2) {
|
|
|
|
param_1[0x1c9] = param_2;
|
|
|
|
switch(param_2) {
|
|
|
|
case 1:
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x11);
|
|
|
|
return;
|
|
|
|
case 2:
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x12);
|
|
|
|
return;
|
|
|
|
case 3:
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x13);
|
|
|
|
iVar1 = DAT_008379ac;
|
|
|
|
param_1[0x1cc] = DAT_008379a8;
|
|
|
|
param_1[0x1cd] = iVar1;
|
|
|
|
return;
|
|
|
|
case 4:
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x14);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7300 at 0x004E7300 (size: 82) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e7300(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007c2138;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_00471f80();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7360 at 0x004E7360 (size: 52) ---
|
|
|
|
|
|
void __fastcall FUN_004e7360(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004722f0();
|
|
|
|
FUN_00465f90(3);
|
|
|
|
if (param_1[0x1c9] != 1) {
|
|
|
|
param_1[0x1c9] = 1;
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x11);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e73a0 at 0x004E73A0 (size: 19) ---
|
|
|
|
|
|
void FUN_004e73a0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000003,&LAB_004e7240);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e73c0 at 0x004E73C0 (size: 142) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void FUN_004e73c0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
float10 fVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
piVar3 = &local_4;
|
|
|
|
local_4 = 0;
|
|
|
|
FUN_004114c0(&local_4);
|
|
|
|
fVar2 = (float10)FUN_004116e0(piVar3);
|
|
|
|
uVar1 = 1;
|
|
|
|
if (((float10)_DAT_007c2108 < fVar2) || (local_4 == 0)) {
|
|
|
|
if (((float10)_DAT_007c2110 < fVar2) || (local_4 == 0)) {
|
|
|
|
if ((fVar2 <= (float10)_DAT_007c2118) && (local_4 != 0)) {
|
|
|
|
FUN_004e7270(3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_004e7270(4);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
uVar1 = 2;
|
|
|
|
}
|
|
|
|
FUN_004e7270(uVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7450 at 0x004E7450 (size: 165) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e7450(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int unaff_ESI;
|
|
|
|
|
|
|
|
iVar2 = DAT_008379ac;
|
|
|
|
iVar1 = DAT_008379a8;
|
|
|
|
if (_DAT_007c20f8 < (double)CONCAT44(DAT_008379ac,DAT_008379a8) - *(double *)(param_1 + 0x1ca)) {
|
|
|
|
FUN_004e73c0();
|
|
|
|
param_1[0x1ca] = iVar1;
|
|
|
|
param_1[0x1cb] = iVar2;
|
|
|
|
}
|
|
|
|
if ((param_1[0x1c9] == 3) &&
|
|
|
|
(_DAT_007c2100 <= (double)CONCAT44(iVar2,iVar1) - *(double *)(param_1 + 0x1cc))) {
|
|
|
|
if (param_1[0x100] == 0x12) {
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x13);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x12);
|
|
|
|
}
|
|
|
|
param_1[0x1cc] = unaff_ESI;
|
|
|
|
param_1[0x1cd] = iVar1;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7530 at 0x004E7530 (size: 72) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e7530(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00471f10(param_2,param_3);
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007ccb60;
|
|
|
|
*param_1 = &PTR_FUN_007c2598;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
param_1[0x1c8] = &PTR_FUN_007c22f0;
|
|
|
|
param_1[0x1c9] = 0;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e75c0 at 0x004E75C0 (size: 106) ---
|
|
|
|
|
|
void __fastcall FUN_004e75c0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
FUN_004722f0();
|
|
|
|
FUN_00460990(0x1000000c,param_1 + 0x724);
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = param_1 + 0x720;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1f0,iVar2);
|
|
|
|
if (param_1 != 0) {
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd201,param_1 + 0x720);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd201,0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7660 at 0x004E7660 (size: 92) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e7660(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x1c8;
|
|
|
|
*param_1 = &PTR_FUN_007c2598;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
*puVar1 = &PTR_FUN_007c22f0;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_00471f80();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e76c0 at 0x004E76C0 (size: 19) ---
|
|
|
|
|
|
void FUN_004e76c0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000002,&LAB_004e7630);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e76e0 at 0x004E76E0 (size: 206) ---
|
|
|
|
|
|
void __fastcall FUN_004e76e0(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined1 *puVar6;
|
|
|
|
undefined *puVar7;
|
|
|
|
int **ppiVar8;
|
|
|
|
undefined4 uVar9;
|
|
|
|
int *local_14;
|
|
|
|
undefined1 local_10 [4];
|
|
|
|
undefined1 local_c [4];
|
|
|
|
int *local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
ppiVar8 = &local_14;
|
|
|
|
puVar6 = local_10;
|
|
|
|
puVar7 = &DAT_007c22c0;
|
|
|
|
local_14 = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar6,&DAT_007c22c0,ppiVar8);
|
|
|
|
FUN_00406570(puVar6,puVar7,ppiVar8);
|
|
|
|
piVar2 = local_14;
|
|
|
|
uVar9 = 0;
|
|
|
|
local_8 = (int *)0x0;
|
|
|
|
local_4 = 0;
|
|
|
|
piVar3 = local_14;
|
|
|
|
if (local_14 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_14 + 0x10))(local_14,0);
|
|
|
|
}
|
|
|
|
piVar3 = (int *)FUN_0048bb00(local_c,piVar3,uVar9);
|
|
|
|
iVar4 = *piVar3;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
piVar2 = local_8;
|
|
|
|
if (local_8 != (int *)0x0) {
|
|
|
|
if (-1 < iVar4) {
|
|
|
|
iVar4 = FUN_0058fd30();
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
iVar4 = 0xd;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = param_1[0x1c9];
|
|
|
|
iVar1 = piVar2[0x1c];
|
|
|
|
iVar5 = 0;
|
|
|
|
if ((iVar4 == 1) || (iVar4 == 0)) {
|
|
|
|
iVar5 = *(int *)(iVar1 + 0x14);
|
|
|
|
}
|
|
|
|
if ((iVar4 == 2) || (iVar4 == 0)) {
|
|
|
|
iVar5 = iVar5 + *(int *)(iVar1 + 0x18);
|
|
|
|
}
|
|
|
|
iVar4 = (-(uint)(iVar5 != 0) & 0xfffffff4) + 0xd;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x9c))(iVar4);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7810 at 0x004E7810 (size: 87) ---
|
|
|
|
|
|
void __fastcall FUN_004e7810(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
FUN_004722f0();
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = param_1 + 0x720;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1f0,iVar2);
|
|
|
|
if (param_1 != 0) {
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd220,param_1 + 0x720);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd220,0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e78f0 at 0x004E78F0 (size: 92) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e78f0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x1c8;
|
|
|
|
*param_1 = &PTR_FUN_007c29f8;
|
|
|
|
param_1[0x182] = &PTR_FUN_0079d180;
|
|
|
|
*puVar1 = &PTR_FUN_007c2750;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_00471f80();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7950 at 0x004E7950 (size: 19) ---
|
|
|
|
|
|
void FUN_004e7950(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000001,&LAB_004e7870);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7970 at 0x004E7970 (size: 268) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e7970(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined1 *puVar4;
|
|
|
|
undefined *puVar5;
|
|
|
|
int **ppiVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
int *local_18;
|
|
|
|
float fStack_14;
|
|
|
|
undefined1 local_10 [4];
|
|
|
|
undefined1 local_c [4];
|
|
|
|
int *local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
ppiVar6 = &local_18;
|
|
|
|
puVar4 = local_10;
|
|
|
|
puVar5 = &DAT_007c2720;
|
|
|
|
local_18 = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar4,&DAT_007c2720,ppiVar6);
|
|
|
|
FUN_00406570(puVar4,puVar5,ppiVar6);
|
|
|
|
piVar1 = local_18;
|
|
|
|
uVar7 = 0;
|
|
|
|
local_8 = (int *)0x0;
|
|
|
|
local_4 = 0;
|
|
|
|
piVar2 = local_18;
|
|
|
|
if (local_18 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_18 + 0x10))(local_18,0);
|
|
|
|
}
|
|
|
|
piVar2 = (int *)FUN_0048bb00(local_c,piVar2,uVar7);
|
|
|
|
iVar3 = *piVar2;
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
}
|
|
|
|
piVar1 = local_8;
|
|
|
|
if (local_8 != (int *)0x0) {
|
|
|
|
if (iVar3 < 0) {
|
|
|
|
(**(code **)(*local_8 + 0x14))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar3 = FUN_0058ff60(&fStack_14);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar7 = 0xe;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (fStack_14 < _DAT_007938b0) {
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0xe);
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((float)_DAT_00795ee0 <= fStack_14) {
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x10);
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
uVar7 = 0xf;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x9c))(uVar7);
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7aa0 at 0x004E7AA0 (size: 36) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e7aa0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007c2b50;
|
|
|
|
FUN_006a1ae0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7b00 at 0x004E7B00 (size: 330) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004e7b00(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
char cVar2;
|
|
|
|
undefined4 uStack_c;
|
|
|
|
undefined4 *local_8;
|
|
|
|
int *local_4;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xb0) == 0) {
|
|
|
|
*param_2 = DAT_00841914;
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
local_8 = (undefined4 *)0x0;
|
|
|
|
local_4 = (int *)0x0;
|
|
|
|
if ((*(int **)(param_1 + 0xac) == (int *)0x0) ||
|
|
|
|
(cVar2 = (**(code **)(**(int **)(param_1 + 0xac) + 0xf4))
|
|
|
|
(*(undefined4 *)(param_1 + 0x9c),&local_8), cVar2 == '\0')) {
|
|
|
|
*param_2 = DAT_00841914;
|
|
|
|
if (local_8 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_8[1];
|
|
|
|
local_8[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_8)(1);
|
|
|
|
}
|
|
|
|
local_8 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if ((local_4 != (int *)0x0) && (iVar1 = local_4[1], local_4[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*local_4)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uStack_c = DAT_00841914;
|
|
|
|
if (local_4 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_4 + 0xb0))(&uStack_c);
|
|
|
|
}
|
|
|
|
*(uint *)(param_1 + 0x9c) = (*(int *)(param_1 + 0x9c) + 1U) % *(uint *)(param_1 + 0xb0);
|
|
|
|
*param_2 = uStack_c;
|
|
|
|
if (local_8 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_8[1];
|
|
|
|
local_8[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_8)(1);
|
|
|
|
}
|
|
|
|
local_8 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if ((local_4 != (int *)0x0) && (iVar1 = local_4[1], local_4[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*local_4)(1);
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7c50 at 0x004E7C50 (size: 177) ---
|
|
|
|
|
|
void __fastcall FUN_004e7c50(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_007c2b98;
|
|
|
|
FUN_006a1a60(param_1 + 0x33);
|
|
|
|
FUN_006a1a60(param_1 + 0x34);
|
|
|
|
FUN_0044dcb0();
|
|
|
|
FUN_00478560(param_1[0x26]);
|
|
|
|
param_1[0x26] = 0;
|
|
|
|
if ((param_1[0x31] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0x30]);
|
|
|
|
}
|
|
|
|
puVar2 = (undefined4 *)param_1[0x2a];
|
|
|
|
if (puVar2 != (undefined4 *)0x0) {
|
|
|
|
piVar1 = puVar2 + 1;
|
|
|
|
*piVar1 = *piVar1 + -1;
|
|
|
|
if (*piVar1 == 0) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
param_1[0x2a] = 0;
|
|
|
|
}
|
|
|
|
puVar2 = (undefined4 *)param_1[0x2b];
|
|
|
|
if (puVar2 != (undefined4 *)0x0) {
|
|
|
|
piVar1 = puVar2 + 1;
|
|
|
|
*piVar1 = *piVar1 + -1;
|
|
|
|
if (*piVar1 == 0) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
param_1[0x2b] = 0;
|
|
|
|
}
|
|
|
|
*param_1 = &PTR_FUN_007c2b50;
|
|
|
|
FUN_006a1ae0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7d10 at 0x004E7D10 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004e7d10(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004e7c50();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e7d30 at 0x004E7D30 (size: 610) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004e7d30(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
char cVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
int iVar5;
|
|
|
|
int iVar6;
|
|
|
|
float unaff_EDI;
|
|
|
|
undefined4 *puVar7;
|
|
|
|
float10 fVar8;
|
|
|
|
float fVar9;
|
|
|
|
undefined *local_a0;
|
|
|
|
int local_9c;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if ((*(int *)(param_1 + 0xd0) != 0) && (*(int *)(param_1 + 0xd4) != 0)) {
|
|
|
|
FUN_00465f90();
|
|
|
|
local_9c = DAT_00841914;
|
|
|
|
FUN_00460d80();
|
|
|
|
if (local_9c != DAT_00841914) {
|
|
|
|
iVar6 = 1;
|
|
|
|
while( true ) {
|
|
|
|
local_a0 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
FUN_00402710(&local_a0,"ID_Credits%d",iVar6);
|
|
|
|
FUN_0042dc80();
|
|
|
|
if (local_a0 == (undefined *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_004016b0(local_a0);
|
|
|
|
}
|
|
|
|
FUN_0042ca10(uVar3,local_9c);
|
|
|
|
cVar2 = FUN_0042ce00(1);
|
|
|
|
if (cVar2 == '\0') break;
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
puVar7 = (undefined4 *)(local_a0 + -0x14);
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(local_a0 + -0x10));
|
|
|
|
if ((LVar4 == 0) && (puVar7 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar7)(1);
|
|
|
|
}
|
|
|
|
iVar6 = iVar6 + 1;
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
puVar7 = (undefined4 *)(local_a0 + -0x14);
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(local_a0 + -0x10));
|
|
|
|
if ((LVar4 == 0) && (puVar7 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar7)(1);
|
|
|
|
}
|
|
|
|
iVar5 = **(int **)(param_1 + 0xd4);
|
|
|
|
uVar3 = FUN_0069fe70();
|
|
|
|
(**(code **)(iVar5 + 0x2c))(0,uVar3);
|
|
|
|
iVar5 = **(int **)(param_1 + 0xd4);
|
|
|
|
uVar3 = FUN_0069fe60(0);
|
|
|
|
(**(code **)(iVar5 + 0x30))(uVar3);
|
|
|
|
FUN_004686b0();
|
|
|
|
iVar5 = **(int **)(param_1 + 0xd4);
|
|
|
|
uVar3 = FUN_0069fe60((*(int **)(param_1 + 0xd4))[0x181]);
|
|
|
|
(**(code **)(iVar5 + 0x30))(uVar3);
|
|
|
|
cVar2 = FUN_00460bf0(0x10000004,&stack0xffffff50);
|
|
|
|
if (cVar2 == '\0') {
|
|
|
|
unaff_EDI = 1.0;
|
|
|
|
}
|
|
|
|
iVar5 = FUN_0069fe70();
|
|
|
|
fVar9 = (float)iVar5;
|
|
|
|
iVar5 = FUN_0069fe70();
|
|
|
|
fVar1 = (float)iVar6;
|
|
|
|
if (iVar6 < 0) {
|
|
|
|
fVar1 = fVar1 + _DAT_0079920c;
|
|
|
|
}
|
|
|
|
*(float *)(param_1 + 0xb4) =
|
|
|
|
(fVar9 + (float)iVar5) / (((float)iVar5 / fVar1 + fVar9) / unaff_EDI);
|
|
|
|
fVar8 = (float10)FUN_0040faa0();
|
|
|
|
*(double *)(param_1 + 0xb8) = (double)(fVar8 + (float10)*(float *)(param_1 + 0xb4));
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xcc) + 0xd0))(0x10000005,param_1 + 0xa8);
|
|
|
|
if (*(int **)(param_1 + 0xac) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0xf0))(param_1 + 0xb0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e8190 at 0x004E8190 (size: 19) ---
|
|
|
|
|
|
void FUN_004e8190(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004e8170);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e81b0 at 0x004E81B0 (size: 235) ---
|
|
|
|
|
|
void __fastcall FUN_004e81b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 unaff_EBX;
|
|
|
|
int *local_1d0 [3];
|
|
|
|
undefined1 local_1c4 [168];
|
|
|
|
undefined4 local_11c;
|
|
|
|
undefined4 local_118;
|
|
|
|
|
|
|
|
FUN_004e7b00(local_1d0);
|
|
|
|
piVar1 = local_1d0[0];
|
|
|
|
if (local_1d0[0] != DAT_00841914) {
|
|
|
|
FUN_0069c1a0();
|
|
|
|
local_118 = 3;
|
|
|
|
local_11c = 0x10000415;
|
|
|
|
piVar2 = (int *)FUN_0045d160(*(int *)(param_1 + 0xcc),
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0xcc) + 0x238),local_1c4);
|
|
|
|
local_1d0[0] = piVar2;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
iVar3 = FUN_0069fe70();
|
|
|
|
if (*(int *)(param_1 + 200) != 0) {
|
|
|
|
iVar3 = FUN_006a01e0();
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0x2c))(0,iVar3 + 1);
|
|
|
|
FUN_00463c80(piVar1,1);
|
|
|
|
FUN_00460090(local_1d0,&stack0xfffffe2c);
|
|
|
|
(**(code **)(*piVar2 + 0x30))(local_1d0[0],unaff_EBX);
|
|
|
|
FUN_004637a0(local_1d0);
|
|
|
|
}
|
|
|
|
FUN_0069c0c0();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e82a0 at 0x004E82A0 (size: 222) ---
|
|
|
|
|
|
void __thiscall FUN_004e82a0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
uint uVar4;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xcc) != 0) {
|
|
|
|
if (*(int *)(param_1 + 200) == 0) {
|
|
|
|
FUN_004e81b0();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = 0;
|
|
|
|
if (*(int *)(param_1 + 200) != 0) {
|
|
|
|
do {
|
|
|
|
piVar1 = *(int **)(*(int *)(param_1 + 0xc0) + uVar4 * 4);
|
|
|
|
iVar2 = FUN_0069fe30();
|
|
|
|
(**(code **)(*piVar1 + 0x2c))(0,iVar2 - param_2);
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
} while (uVar4 < *(uint *)(param_1 + 200));
|
|
|
|
}
|
|
|
|
iVar2 = FUN_006a01e0();
|
|
|
|
if (iVar2 < 0) {
|
|
|
|
if (*(int *)(param_1 + 200) != 0) {
|
|
|
|
iVar2 = *(int *)(param_1 + 200) + -1;
|
|
|
|
*(int *)(param_1 + 200) = iVar2;
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
**(undefined4 **)(param_1 + 0xc0) = (*(undefined4 **)(param_1 + 0xc0))[iVar2];
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0xc0) + *(int *)(param_1 + 200) * 4) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00460250();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 200) != 0) {
|
|
|
|
iVar2 = FUN_0069fe30();
|
|
|
|
iVar3 = FUN_0069fe70();
|
|
|
|
if (iVar2 < iVar3) {
|
|
|
|
FUN_004e81b0();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e8380 at 0x004E8380 (size: 348) ---
|
|
|
|
|
|
void __fastcall FUN_004e8380(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar3 = 0x10000001;
|
|
|
|
uVar2 = FUN_004016b0("ID_Wait_PleaseWait",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar2,uVar3);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(2);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
uVar2 = FUN_00478290(param_1,local_108);
|
|
|
|
*(undefined4 *)(param_1 + 0x98) = uVar2;
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_114[1];
|
|
|
|
local_114[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar1 = local_110[1];
|
|
|
|
local_110[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e84e0 at 0x004E84E0 (size: 333) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
int __fastcall FUN_004e84e0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
float *pfVar1;
|
|
|
|
float *pfVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iVar5;
|
|
|
|
float unaff_ESI;
|
|
|
|
float10 fVar6;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
if ((*(int *)(param_1 + 0xd4) != 0) && (*(int *)(param_1 + 0xd0) != 0)) {
|
|
|
|
fVar6 = (float10)FUN_0040faa0();
|
|
|
|
local_8 = 1.0;
|
|
|
|
if (*(float *)(param_1 + 0xb4) != DAT_00796344) {
|
|
|
|
local_8 = (float)((float10)_DAT_007938b0 -
|
|
|
|
((float10)*(double *)(param_1 + 0xb8) - fVar6) /
|
|
|
|
(float10)*(float *)(param_1 + 0xb4));
|
|
|
|
}
|
|
|
|
local_4 = 1.0;
|
|
|
|
pfVar1 = &local_8;
|
|
|
|
if (_DAT_007938b0 <= local_8) {
|
|
|
|
pfVar1 = &local_4;
|
|
|
|
}
|
|
|
|
local_8 = *pfVar1;
|
|
|
|
local_4 = 0.0;
|
|
|
|
pfVar2 = &local_8;
|
|
|
|
if (*pfVar1 <= DAT_00796344) {
|
|
|
|
pfVar2 = &local_4;
|
|
|
|
}
|
|
|
|
local_8 = *pfVar2;
|
|
|
|
FUN_004686b0();
|
|
|
|
iVar4 = *(int *)(*(int *)(param_1 + 0xd4) + 0x604);
|
|
|
|
iVar3 = FUN_0069fe70();
|
|
|
|
local_4 = (float)(iVar3 + iVar4);
|
|
|
|
iVar4 = FUN_005df4c4();
|
|
|
|
iVar3 = FUN_0069fe70();
|
|
|
|
iVar5 = FUN_0069fe30();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd4) + 0x2c))(0,iVar3 - iVar4);
|
|
|
|
if (unaff_ESI != _DAT_007938b0) {
|
|
|
|
return iVar5 - (iVar3 - iVar4);
|
|
|
|
}
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
FUN_004e8380();
|
|
|
|
FUN_006a1740(0x1000000a);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e8660 at 0x004E8660 (size: 18) ---
|
|
|
|
|
|
void FUN_004e8660(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
|
|
|
|
uVar1 = FUN_004e84e0();
|
|
|
|
FUN_004e82a0(uVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e86a0 at 0x004E86A0 (size: 833) ---
|
|
|
|
|
|
void __fastcall FUN_004e86a0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb0) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb4) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xbc) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xc0) + 0x18))();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xc4) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xe4) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xe8) + 0x18))(0);
|
|
|
|
iVar1 = *(int *)(param_1 + 0xf8);
|
|
|
|
*(undefined4 *)(param_1 + 0xf8) = 0;
|
|
|
|
(**(code **)(**(int **)(param_1 + 200) + 0x9c))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xcc) + 0x9c))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd0) + 0x9c))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd4) + 0x9c))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd8) + 0x9c))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xdc) + 0x9c))(1);
|
|
|
|
iVar2 = FUN_0055e1e0();
|
|
|
|
if ((*(int *)(iVar2 + 0xd4) != 0xc) && (*(int *)(iVar2 + 0xd4) != 0xd)) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xcc) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd0) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd8) + 0x18))(1);
|
|
|
|
goto LAB_004e8831;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xcc) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd0) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd8) + 0x18))(0);
|
|
|
|
iVar2 = *(int *)(param_1 + 0xf8);
|
|
|
|
if (iVar2 < iVar1) {
|
|
|
|
if ((iVar2 == 2) || (iVar2 == 3)) {
|
|
|
|
*(undefined4 *)(param_1 + 0xf8) = 1;
|
|
|
|
goto LAB_004e8831;
|
|
|
|
}
|
|
|
|
if (iVar2 != 5) goto LAB_004e8831;
|
|
|
|
}
|
|
|
|
else if ((iVar2 != 2) && (iVar2 != 3)) {
|
|
|
|
if (iVar2 == 5) {
|
|
|
|
*(undefined4 *)(param_1 + 0xf8) = 6;
|
|
|
|
}
|
|
|
|
goto LAB_004e8831;
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0xf8) = 4;
|
|
|
|
LAB_004e8831:
|
|
|
|
switch(*(undefined4 *)(param_1 + 0xf8)) {
|
|
|
|
case 1:
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x9c))(0x10000025);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb0) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 200) + 0x9c))(6);
|
|
|
|
FUN_004835d0();
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x9c))(0x10000026);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb4) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xcc) + 0x9c))(6);
|
|
|
|
FUN_00482bf0();
|
|
|
|
return;
|
|
|
|
case 3:
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x9c))(0x10000027);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd0) + 0x9c))(6);
|
|
|
|
FUN_00482180();
|
|
|
|
return;
|
|
|
|
case 4:
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x9c))(0x10000028);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xbc) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd4) + 0x9c))(6);
|
|
|
|
FUN_0047eca0();
|
|
|
|
return;
|
|
|
|
case 5:
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x9c))(0x10000029);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xc0) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xd8) + 0x9c))(6);
|
|
|
|
FUN_0047c810();
|
|
|
|
return;
|
|
|
|
case 6:
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x9c))(0x1000002a);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xc4) + 0x18))(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xdc) + 0x9c))(6);
|
|
|
|
FUN_0047be60();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xe4) + 0x18))(0);
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004e89de. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xe8) + 0x18))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e8a00 at 0x004E8A00 (size: 43) ---
|
|
|
|
|
|
void __fastcall FUN_004e8a00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
|
|
|
|
FUN_0055e1e0();
|
|
|
|
switch(*(undefined4 *)(param_1 + 0xf8)) {
|
|
|
|
case 1:
|
|
|
|
uVar2 = FUN_0055e470();
|
|
|
|
FUN_005c7a00(uVar2);
|
|
|
|
FUN_004835d0();
|
|
|
|
return;
|
|
|
|
case 2:
|
|
|
|
FUN_005c74e0();
|
|
|
|
FUN_00482c20();
|
|
|
|
return;
|
|
|
|
case 3:
|
|
|
|
FUN_005c67c0();
|
|
|
|
FUN_00482180();
|
|
|
|
return;
|
|
|
|
case 4:
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
cVar1 = FUN_0055e470();
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
uVar2 = 3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = 4;
|
|
|
|
}
|
|
|
|
uVar2 = FUN_00685400(uVar2);
|
|
|
|
FUN_005c4fe0(uVar2);
|
|
|
|
FUN_0047c810();
|
|
|
|
return;
|
|
|
|
case 6:
|
|
|
|
uVar2 = FUN_0055e470();
|
|
|
|
FUN_005c7d60(uVar2);
|
|
|
|
FUN_0047be60();
|
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0xbc) + 0x6f8) != 2) {
|
|
|
|
FUN_005c5ef0(0);
|
|
|
|
FUN_0047eca0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_005c7750(1);
|
|
|
|
FUN_0047eca0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e8b20 at 0x004E8B20 (size: 29) ---
|
|
|
|
|
|
int __thiscall FUN_004e8b20(int param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if ((*(uint *)(param_1 + 0x14) <= param_2) ||
|
|
|
|
(iVar1 = param_2 * 0x10 + *(int *)(param_1 + 0xc), *(int *)(iVar1 + 4) == 0)) {
|
|
|
|
iVar1 = 0;
|
|
|
|
}
|
|
|
|
return iVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e8b40 at 0x004E8B40 (size: 1217) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004e8b40(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
|
|
|
|
FUN_006a1ab0();
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
puVar1 = param_1 + 0x26;
|
|
|
|
*param_1 = &PTR_FUN_007c2f88;
|
|
|
|
*puVar1 = &PTR_FUN_007c2ce0;
|
|
|
|
param_1[0x27] = 0;
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
param_1[0x29] = 0;
|
|
|
|
param_1[0x2a] = 0;
|
|
|
|
param_1[0x2b] = 0;
|
|
|
|
param_1[0x2c] = 0;
|
|
|
|
param_1[0x2d] = 0;
|
|
|
|
param_1[0x2e] = 0;
|
|
|
|
param_1[0x2f] = 0;
|
|
|
|
param_1[0x30] = 0;
|
|
|
|
param_1[0x31] = 0;
|
|
|
|
param_1[0x38] = 0;
|
|
|
|
param_1[0x39] = 0;
|
|
|
|
param_1[0x3b] = 0;
|
|
|
|
param_1[0x3c] = 0;
|
|
|
|
param_1[0x3d] = 0;
|
|
|
|
param_1[0x3e] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x3f) = 0;
|
|
|
|
param_1[0x40] = 0;
|
|
|
|
param_1[0x41] = 0;
|
|
|
|
param_1[0x42] = 0;
|
|
|
|
param_1[0x43] = 0;
|
|
|
|
param_1[0x44] = 0;
|
|
|
|
param_1[0x45] = 0;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 4))(0x186a4,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd22c,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd1e1,puVar1);
|
|
|
|
FUN_00465f90(1);
|
|
|
|
iVar3 = FUN_006a1a20(0x10000039,0x100003cc);
|
|
|
|
param_1[0x28] = iVar3;
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
uVar4 = FUN_00463c00(0x100003ce);
|
|
|
|
param_1[0x29] = uVar4;
|
|
|
|
uVar4 = FUN_00463c00(0x100003cf);
|
|
|
|
param_1[0x2a] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003ef);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x32] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003f0);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x33] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003f1);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x34] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003f2);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x35] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003f3);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x36] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003f4);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x37] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003c6);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x38] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003c7);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x39] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003c8);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x3a] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003c9);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x3b] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003ca);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x3c] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003cb);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(1);
|
|
|
|
}
|
|
|
|
param_1[0x3d] = uVar4;
|
|
|
|
uVar4 = FUN_0055e1d0();
|
|
|
|
param_1[0x27] = uVar4;
|
|
|
|
uVar4 = FUN_0055e470();
|
|
|
|
FUN_0055e1e0(uVar4);
|
|
|
|
FUN_005c7d60(uVar4);
|
|
|
|
uVar4 = FUN_00463c00(0x100003d0);
|
|
|
|
param_1[0x2b] = uVar4;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003d1);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(0x10000039);
|
|
|
|
}
|
|
|
|
param_1[0x2c] = uVar4;
|
|
|
|
FUN_00483dd0(param_1);
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003d2);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(0x1000003a);
|
|
|
|
}
|
|
|
|
param_1[0x2d] = uVar4;
|
|
|
|
FUN_00483110(param_1);
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003d3);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(0x1000003b);
|
|
|
|
}
|
|
|
|
param_1[0x2e] = uVar4;
|
|
|
|
FUN_00482190(param_1);
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003d4);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(0x1000003c);
|
|
|
|
}
|
|
|
|
param_1[0x2f] = uVar4;
|
|
|
|
FUN_00480180(param_1);
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003d5);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(0x1000003d);
|
|
|
|
}
|
|
|
|
param_1[0x30] = uVar4;
|
|
|
|
FUN_0047ca80(param_1);
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100003d6);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar2 + 0x94))(0x1000003e);
|
|
|
|
}
|
|
|
|
param_1[0x31] = uVar4;
|
|
|
|
FUN_0047bfb0(param_1);
|
|
|
|
FUN_004e86a0(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9010 at 0x004E9010 (size: 85) ---
|
|
|
|
|
|
void __fastcall FUN_004e9010(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007c2f88;
|
|
|
|
param_1[0x26] = &PTR_FUN_007c2ce0;
|
|
|
|
FUN_00465fb0(1);
|
|
|
|
FUN_006a1a60(param_1 + 0x28);
|
|
|
|
param_1[0x41] = 0;
|
|
|
|
param_1[0x42] = 0;
|
|
|
|
param_1[0x40] = 0;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_006a1ae0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9090 at 0x004E9090 (size: 28) ---
|
|
|
|
|
|
undefined1 __thiscall FUN_004e9090(int param_1,char param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x110) = 0;
|
|
|
|
if (param_2 != '\0') {
|
|
|
|
FUN_004e8a00();
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e90b0 at 0x004E90B0 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004e90b0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004e9010();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e90d0 at 0x004E90D0 (size: 19) ---
|
|
|
|
|
|
void FUN_004e90d0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004e9070);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9280 at 0x004E9280 (size: 87) ---
|
|
|
|
|
|
int * __thiscall FUN_004e9280(int *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG *lpAddend;
|
|
|
|
|
|
|
|
lpAddend = (LONG *)(DAT_008ef11c + 4);
|
|
|
|
*param_1 = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(lpAddend);
|
|
|
|
FUN_004034c0(*param_2 + 0x14);
|
|
|
|
FUN_00411870();
|
|
|
|
_strlwr((char *)(*param_1 + 0x14));
|
|
|
|
param_1[1] = param_2[1];
|
|
|
|
param_1[2] = param_2[2];
|
|
|
|
param_1[3] = param_2[3];
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e92e0 at 0x004E92E0 (size: 537) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004e92e0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x100) == 0) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar3 = 0x10000002;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharGen_ExitWarning",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar1,uVar3);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
iVar2 = FUN_00478810(local_108);
|
|
|
|
*(int *)(param_1 + 0x100) = iVar2;
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_114[1];
|
|
|
|
local_114[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar2 = local_110[1];
|
|
|
|
local_110[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_114[1];
|
|
|
|
local_114[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar2 = local_110[1];
|
|
|
|
local_110[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9500 at 0x004E9500 (size: 537) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004e9500(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x10c) == 0) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar3 = 0x10000002;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharGen_CreditWarning",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar1,uVar3);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
iVar2 = FUN_00478810(local_108);
|
|
|
|
*(int *)(param_1 + 0x10c) = iVar2;
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_114[1];
|
|
|
|
local_114[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar2 = local_110[1];
|
|
|
|
local_110[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_114[1];
|
|
|
|
local_114[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar2 = local_110[1];
|
|
|
|
local_110[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9720 at 0x004E9720 (size: 537) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004e9720(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x110) == 0) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar3 = 0x10000002;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharGen_RandomizeWarning",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar1,uVar3);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
iVar2 = FUN_00478810(local_108);
|
|
|
|
*(int *)(param_1 + 0x110) = iVar2;
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_114[1];
|
|
|
|
local_114[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar2 = local_110[1];
|
|
|
|
local_110[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = local_114[1];
|
|
|
|
local_114[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar2 = local_110[1];
|
|
|
|
local_110[1] = iVar2 + -1;
|
|
|
|
if (iVar2 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9940 at 0x004E9940 (size: 392) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e9940(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *local_84;
|
|
|
|
int *local_80;
|
|
|
|
undefined4 uStack_7c;
|
|
|
|
undefined1 local_78 [120];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x108) != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_006823d0();
|
|
|
|
local_84 = (undefined4 *)0x0;
|
|
|
|
local_80 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0xac))(3);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0xc4))(param_2);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
uVar2 = FUN_00478290(param_1,local_78);
|
|
|
|
*(undefined4 *)(param_1 + 0x108) = uVar2;
|
|
|
|
if (local_84 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_84[1];
|
|
|
|
local_84[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_84)(1);
|
|
|
|
}
|
|
|
|
local_84 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
iVar1 = local_80[1];
|
|
|
|
local_80[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_80)(1);
|
|
|
|
}
|
|
|
|
local_80 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9ad0 at 0x004E9AD0 (size: 443) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004e9ad0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x114) != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar3 = 0x10000002;
|
|
|
|
uVar2 = FUN_004016b0("ID_CharGen_ToDRequiredWarning",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar2,uVar3);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(3);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
uVar2 = FUN_00478290(param_1,local_108);
|
|
|
|
*(undefined4 *)(param_1 + 0x114) = uVar2;
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_114[1];
|
|
|
|
local_114[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar1 = local_110[1];
|
|
|
|
local_110[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004e9e00 at 0x004E9E00 (size: 731) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004e9e00(int param_1,char param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 extraout_ECX;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 *local_118;
|
|
|
|
int *local_114;
|
|
|
|
int local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
iVar1 = FUN_0055e1e0();
|
|
|
|
FUN_00401340(iVar1 + 0x1d0);
|
|
|
|
uVar2 = extraout_ECX;
|
|
|
|
FUN_00401340(&DAT_007c30f8);
|
|
|
|
FUN_00435720(1,1,uVar2);
|
|
|
|
FUN_005c4cf0(local_110);
|
|
|
|
if ((*(char *)(*(int *)(param_1 + 0xc4) + 0x61c) == '\0') || (*(int *)(local_110 + -4) == 1)) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar4 = 0x10000002;
|
|
|
|
uVar2 = FUN_004016b0("ID_CharGen_NoNameWarning",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar2,uVar4);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_118 = (undefined4 *)0x0;
|
|
|
|
local_114 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_114 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_114 + 0xac))(3);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_118);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_114 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_114 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_118);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_114 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_114 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_118);
|
|
|
|
FUN_00478810(local_108);
|
|
|
|
if (local_118 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_118[1];
|
|
|
|
local_118[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_118)(1);
|
|
|
|
}
|
|
|
|
local_118 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_114 != (int *)0x0) {
|
|
|
|
iVar1 = local_114[1];
|
|
|
|
local_114[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ((param_2 != '\0') && (0 < *(int *)(iVar1 + 0x1a0))) {
|
|
|
|
FUN_004e9500();
|
|
|
|
FUN_004011b0();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = FUN_005c4790();
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_005c4780(2);
|
|
|
|
FUN_0055e1e0();
|
|
|
|
uVar2 = FUN_005c5010();
|
|
|
|
FUN_004e9280(*(int *)(param_1 + 0x9c) + 0x1c);
|
|
|
|
FUN_00547630(uVar2);
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_110 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(local_110 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_110 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_110 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(local_110 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_110 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea600 at 0x004EA600 (size: 80) ---
|
|
|
|
|
|
void __fastcall FUN_004ea600(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007c3168;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_00465f70(0x10000418,1);
|
|
|
|
FUN_006a1a60(param_1 + 0x27);
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_006a1ae0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea6a0 at 0x004EA6A0 (size: 131) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004ea6a0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
FUN_006a1ab0();
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
*param_1 = &PTR_FUN_007c3168;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x27] = 0;
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
iVar1 = FUN_006a1a20(0x10000003,0x10000416);
|
|
|
|
param_1[0x27] = iVar1;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x10000417);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
uVar3 = (**(code **)(*piVar2 + 0x94))(0xc);
|
|
|
|
param_1[0x28] = uVar3;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea730 at 0x004EA730 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004ea730(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004ea600();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea770 at 0x004EA770 (size: 19) ---
|
|
|
|
|
|
void FUN_004ea770(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004ea750);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea790 at 0x004EA790 (size: 131) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004ea790(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
FUN_006a1ab0();
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
*param_1 = &PTR_FUN_007c32b8;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x27] = 0;
|
|
|
|
FUN_00465f50(0x10000399,0x10000002);
|
|
|
|
uVar1 = FUN_006a1a20(0x10000037,0x10000399);
|
|
|
|
param_1[0x27] = uVar1;
|
|
|
|
FUN_00465f90(1);
|
|
|
|
iVar2 = FUN_0055e1d0();
|
|
|
|
if ((iVar2 != 0) && (*(short *)(DAT_00846f18 + 0x8a6e) != 0)) {
|
|
|
|
FUN_005642c0(1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea840 at 0x004EA840 (size: 92) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004ea840(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007c32b8;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_00465fb0(1);
|
|
|
|
FUN_006a1a60(param_1 + 0x27);
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
*param_1 = &PTR_FUN_007c2b50;
|
|
|
|
FUN_006a1ae0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea8a0 at 0x004EA8A0 (size: 19) ---
|
|
|
|
|
|
void FUN_004ea8a0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004ea820);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea8f0 at 0x004EA8F0 (size: 101) ---
|
|
|
|
|
|
void __thiscall FUN_004ea8f0(int *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
|
|
|
|
cVar1 = (**(code **)(*param_1 + 0x28))();
|
|
|
|
if (((char)param_2 != cVar1) && (*(undefined1 *)(param_1 + 0x32) = 1, DAT_0083e03c != 0)) {
|
|
|
|
FUN_00459440(param_2);
|
|
|
|
if ((param_1[0x2c] == 0) && ((char)param_1[0x31] == '\0')) {
|
|
|
|
FUN_006a1750(param_2);
|
|
|
|
*(undefined1 *)(param_1 + 0x32) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_006a1750(1);
|
|
|
|
*(undefined1 *)(param_1 + 0x32) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ea970 at 0x004EA970 (size: 129) ---
|
|
|
|
|
|
void FUN_004ea970(uint *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
if (param_1[2] == 0x18) {
|
|
|
|
uVar2 = *param_1;
|
|
|
|
if ((uVar2 == 0x10000505) || ((0x1000050d < uVar2 && (uVar2 < 0x10000511)))) {
|
|
|
|
FUN_0047a4a0(uVar2,*(uint *)(param_1[1] + 0xa4) >> 1 & 0xffffff01);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((((param_1[2] == 0x1c) && (DAT_0083e03c != 0)) &&
|
|
|
|
(piVar1 = *(int **)(DAT_0083e03c + 0x328), piVar1 != (int *)0x0)) &&
|
|
|
|
(piVar1 != (int *)param_1[1])) {
|
|
|
|
(**(code **)(*piVar1 + 0x108))();
|
|
|
|
FUN_006a1860(param_1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_006a1860(param_1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eaa80 at 0x004EAA80 (size: 131) ---
|
|
|
|
|
|
void __thiscall FUN_004eaa80(int *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
char cVar2;
|
|
|
|
|
|
|
|
FUN_0055e1d0();
|
|
|
|
if (param_2 < 0x10000027) {
|
|
|
|
if (param_2 == 0x10000026) {
|
|
|
|
*(undefined1 *)((int)param_1 + 0xc6) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 199) = 1;
|
|
|
|
*(undefined1 *)((int)param_1 + 0xc5) = 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (param_2 == 0x54) {
|
|
|
|
iVar1 = *param_1;
|
|
|
|
cVar2 = (**(code **)(iVar1 + 0x28))();
|
|
|
|
(**(code **)(iVar1 + 0x24))('\x01' - (cVar2 != '\0'));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (param_2 == 0x7b) {
|
|
|
|
FUN_00557c50(0,0x10000001);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (param_2 == 0x10000027) {
|
|
|
|
*(undefined1 *)((int)param_1 + 0xc6) = 1;
|
|
|
|
*(undefined1 *)((int)param_1 + 199) = 1;
|
|
|
|
*(undefined1 *)((int)param_1 + 0xc5) = 1;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eab10 at 0x004EAB10 (size: 57) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004eab10(int param_1,undefined1 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_006a2030(*(undefined4 *)(param_1 + 0xbc),*(undefined4 *)(param_1 + 0xc0),param_2);
|
|
|
|
*(undefined4 *)(param_1 + 0xb8) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xbc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xc0) = 0;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eab50 at 0x004EAB50 (size: 329) ---
|
|
|
|
|
|
void __fastcall FUN_004eab50(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
uint uVar3;
|
|
|
|
undefined4 uStack_b8;
|
|
|
|
undefined4 uStack_b0;
|
|
|
|
undefined4 uStack_ac;
|
|
|
|
undefined4 uStack_a8;
|
|
|
|
undefined4 uStack_a4;
|
|
|
|
undefined4 uStack_a0;
|
|
|
|
undefined4 uStack_9c;
|
|
|
|
undefined1 auStack_98 [152];
|
|
|
|
|
|
|
|
uStack_b8 = 0x10000495;
|
|
|
|
iVar1 = (**(code **)(*param_1 + 0x18))(0x10000006);
|
|
|
|
param_1[0x27] = iVar1;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar1 = FUN_00463c00(0x1000049a);
|
|
|
|
param_1[0x28] = iVar1;
|
|
|
|
iVar1 = FUN_00463c00(0x100006d2);
|
|
|
|
param_1[0x29] = iVar1;
|
|
|
|
iVar1 = FUN_00463c00(0x100005fa);
|
|
|
|
param_1[0x2a] = iVar1;
|
|
|
|
iVar1 = FUN_00463c00(0x100006d5);
|
|
|
|
param_1[0x2b] = iVar1;
|
|
|
|
uStack_b8 = 0x10000505;
|
|
|
|
uStack_b0 = 0x1000050f;
|
|
|
|
uStack_ac = 0x10000510;
|
|
|
|
uStack_a8 = FUN_004016b0("ID_Chat_Chat1_DefaultTitle");
|
|
|
|
uStack_a4 = FUN_004016b0("ID_Chat_Chat2_DefaultTitle");
|
|
|
|
uStack_a0 = FUN_004016b0("ID_Chat_Chat3_DefaultTitle");
|
|
|
|
uStack_9c = FUN_004016b0("ID_Chat_Chat4_DefaultTitle");
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar3 = 0;
|
|
|
|
do {
|
|
|
|
FUN_0042c9c0(*(undefined4 *)((int)&stack0xffffff58 + uVar3),0x10000001);
|
|
|
|
piVar2 = (int *)FUN_00463c00(*(undefined4 *)((int)&uStack_b8 + uVar3));
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
iVar1 = (**(code **)(*piVar2 + 0x94))(0x10000040);
|
|
|
|
if ((iVar1 != 0) && ((int *)(iVar1 + -4) != (int *)0x0)) {
|
|
|
|
(**(code **)(*(int *)(iVar1 + -4) + 0x2ac))(auStack_98);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar3 = uVar3 + 4;
|
|
|
|
} while (uVar3 < 0x10);
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eaca0 at 0x004EACA0 (size: 373) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004eaca0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
FUN_006a1bc0();
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
puVar1 = param_1 + 0x26;
|
|
|
|
*param_1 = &PTR_FUN_007c3828;
|
|
|
|
*puVar1 = &PTR_FUN_007c3580;
|
|
|
|
param_1[0x27] = 0;
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
param_1[0x29] = 0;
|
|
|
|
param_1[0x2c] = 0;
|
|
|
|
param_1[0x2d] = 0;
|
|
|
|
param_1[0x2e] = 0;
|
|
|
|
param_1[0x2f] = 0;
|
|
|
|
param_1[0x30] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x31) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0xc5) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0xc6) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 199) = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x32) = 0;
|
|
|
|
FUN_0043a990(0,800,600);
|
|
|
|
FUN_00465f90(1);
|
|
|
|
FUN_00465f90(3);
|
|
|
|
FUN_00465f90(0xe);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 4))(0x186a4,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd209,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd20a,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd20b,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd20c,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd20d,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd27a,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd1e2,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd1e3,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd21f,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd1f0,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd283,puVar1);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd284,puVar1);
|
|
|
|
}
|
|
|
|
FUN_004eab50();
|
|
|
|
FUN_004ea8f0(1);
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eae40 at 0x004EAE40 (size: 237) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004eae40(int param_1,char param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined1 local_94 [4];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (*(char *)(param_1 + 0xc4) == '\0') {
|
|
|
|
*(undefined1 *)(param_1 + 0xc4) = 1;
|
|
|
|
if ((param_2 == '\0') || (*(char *)(param_1 + 199) != '\0')) {
|
|
|
|
if ((*(char *)(param_1 + 0xc6) != '\0') && (param_2 != '\0')) {
|
|
|
|
FUN_006a1740(0x10000009);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if ((DAT_0083da58 != 0) && (*(int *)(DAT_0083da58 + 0xf8) != 0)) {
|
|
|
|
if ((*(byte *)(*(int *)(DAT_0083da58 + 0xf8) + 0xac) & 1) == 0) {
|
|
|
|
*(undefined1 *)(param_1 + 0xc4) = 0;
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(L"Cannot log off while in mid-air.");
|
|
|
|
FUN_0042cbe0(local_94,1);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_00693500(0x1a,local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = FUN_0055e1d0();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_005642c0(0);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eaf30 at 0x004EAF30 (size: 209) ---
|
|
|
|
|
|
void __fastcall FUN_004eaf30(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
piVar1 = param_1 + 0x26;
|
|
|
|
*param_1 = (int)&PTR_FUN_007c3828;
|
|
|
|
*piVar1 = (int)&PTR_FUN_007c3580;
|
|
|
|
FUN_004eae40(0);
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
FUN_00465fb0(1);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(piVar1);
|
|
|
|
}
|
|
|
|
FUN_00478560(param_1[0x2c]);
|
|
|
|
param_1[0x2c] = 0;
|
|
|
|
FUN_00478560(param_1[0x2d]);
|
|
|
|
param_1[0x2d] = 0;
|
|
|
|
FUN_00478560(param_1[0x2e]);
|
|
|
|
param_1[0x2e] = 0;
|
|
|
|
(**(code **)(*param_1 + 0x20))(param_1 + 0x27);
|
|
|
|
FUN_0055b310();
|
|
|
|
if (DAT_00838194 == '\0') {
|
|
|
|
FUN_0043a990(1,800,600);
|
|
|
|
}
|
|
|
|
*piVar1 = (int)&PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_006a1be0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eb010 at 0x004EB010 (size: 19) ---
|
|
|
|
|
|
void FUN_004eb010(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004eae20);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eb030 at 0x004EB030 (size: 294) ---
|
|
|
|
|
|
void __fastcall FUN_004eb030(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined1 local_94 [4];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_00564d30();
|
|
|
|
iVar1 = FUN_00564f90();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
uVar2 = 0x3f8ccccd;
|
|
|
|
FUN_00564d30(0x3f8ccccd);
|
|
|
|
FUN_00564f90();
|
|
|
|
FUN_00457960(uVar2);
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0xc5) != '\0') {
|
|
|
|
if ((*(char *)(param_1 + 0xc4) == '\0') &&
|
|
|
|
(*(undefined1 *)(param_1 + 0xc4) = 1, *(char *)(param_1 + 199) != '\0')) {
|
|
|
|
if (*(char *)(param_1 + 0xc6) != '\0') {
|
|
|
|
FUN_006a1740(0x10000009);
|
|
|
|
*(undefined1 *)(param_1 + 0xc5) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((DAT_0083da58 != 0) && (*(int *)(DAT_0083da58 + 0xf8) != 0)) {
|
|
|
|
if ((*(byte *)(*(int *)(DAT_0083da58 + 0xf8) + 0xac) & 1) == 0) {
|
|
|
|
*(undefined1 *)(param_1 + 0xc4) = 0;
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(L"Cannot log off while in mid-air.");
|
|
|
|
FUN_0042cbe0(local_94,1);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_00693500(0x1a,local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = FUN_0055e1d0();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_005642c0(0);
|
|
|
|
*(undefined1 *)(param_1 + 0xc5) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(undefined1 *)(param_1 + 0xc5) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eb160 at 0x004EB160 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004eb160(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004eaf30();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eb320 at 0x004EB320 (size: 595) ---
|
|
|
|
|
|
void FUN_004eb320(int param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
char cVar4;
|
|
|
|
LONG LVar5;
|
|
|
|
undefined4 uVar6;
|
|
|
|
int *piVar7;
|
|
|
|
int iVar8;
|
|
|
|
LONG *lpAddend;
|
|
|
|
undefined4 *puVar9;
|
|
|
|
code *pcVar10;
|
|
|
|
undefined *puStack_14;
|
|
|
|
int iStack_10;
|
|
|
|
int local_c;
|
|
|
|
int iStack_8;
|
|
|
|
int iStack_4;
|
|
|
|
|
|
|
|
pcVar10 = InterlockedDecrement_exref;
|
|
|
|
puVar1 = (undefined *)*param_2;
|
|
|
|
if (puVar1 != PTR_DAT_00818344) {
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(puVar1 + -0x10));
|
|
|
|
if ((LVar5 == 0) && ((undefined4 *)(puVar1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(puVar1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
lpAddend = (LONG *)(PTR_DAT_00818344 + -0x10);
|
|
|
|
*param_2 = (int)PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement(lpAddend);
|
|
|
|
}
|
|
|
|
local_c = DAT_00838188;
|
|
|
|
InterlockedIncrement((LONG *)(DAT_00838188 + -0x10));
|
|
|
|
puStack_14 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
thunk_FUN_0040c780(&puStack_14,&local_c);
|
|
|
|
FUN_00401340("#auto");
|
|
|
|
cVar4 = FUN_00401920(&iStack_10);
|
|
|
|
puVar9 = (undefined4 *)(iStack_10 + -0x14);
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(iStack_10 + -0x10));
|
|
|
|
if ((LVar5 == 0) && (puVar9 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar9)(1);
|
|
|
|
}
|
|
|
|
if (cVar4 == '\0') {
|
|
|
|
if (*(int *)(param_1 + -4) == 1) {
|
|
|
|
FUN_00402710(param_2,"%sUI-Default.txt",puStack_14);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_00402710(param_2,"%s%s.txt",puStack_14,param_1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
uVar6 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar6 = *(undefined4 *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
uVar6 = FUN_0058f840(uVar6,0,0);
|
|
|
|
FUN_00401340(uVar6);
|
|
|
|
piVar7 = (int *)FUN_004114c0();
|
|
|
|
piVar7 = (int *)(**(code **)(*piVar7 + 0x54))();
|
|
|
|
iVar8 = *piVar7;
|
|
|
|
iStack_8 = iVar8;
|
|
|
|
InterlockedIncrement((LONG *)(iVar8 + -0x10));
|
|
|
|
FUN_00408fd0(&iStack_4,0);
|
|
|
|
iVar2 = iStack_10;
|
|
|
|
puVar1 = puStack_14;
|
|
|
|
uVar6 = FUN_0069fe70();
|
|
|
|
uVar6 = FUN_0069fe60(uVar6);
|
|
|
|
iVar3 = iStack_4;
|
|
|
|
FUN_00402710(param_2,"%sUI-%s-%s-%d-%d.txt",puVar1,iStack_4,iVar2,uVar6);
|
|
|
|
puVar9 = (undefined4 *)(iVar3 + -0x14);
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(iVar3 + -0x10));
|
|
|
|
if ((LVar5 == 0) && (puVar9 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar9)(1);
|
|
|
|
}
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(iVar8 + -0x10));
|
|
|
|
if ((LVar5 == 0) && ((undefined4 *)(iVar8 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iVar8 + -0x14))(1);
|
|
|
|
}
|
|
|
|
puVar9 = (undefined4 *)(iStack_10 + -0x14);
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(iStack_10 + -0x10));
|
|
|
|
pcVar10 = InterlockedDecrement_exref;
|
|
|
|
if ((LVar5 == 0) && (puVar9 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar9)(1);
|
|
|
|
pcVar10 = InterlockedDecrement_exref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
puVar9 = (undefined4 *)(puStack_14 + -0x14);
|
|
|
|
iVar8 = (*pcVar10)(puStack_14 + -0x10);
|
|
|
|
if ((iVar8 == 0) && (puVar9 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar9)(1);
|
|
|
|
}
|
|
|
|
iVar8 = (*pcVar10)(iStack_10 + -0x10);
|
|
|
|
if ((iVar8 == 0) && ((undefined4 *)(iStack_10 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_10 + -0x14))(1);
|
|
|
|
}
|
|
|
|
iVar8 = (*pcVar10)(iStack_4 + -0x10);
|
|
|
|
if ((iVar8 == 0) && ((undefined4 *)(iStack_4 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_4 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eb580 at 0x004EB580 (size: 1119) ---
|
|
|
|
|
|
undefined4 FUN_004eb580(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
FILE *_File;
|
|
|
|
LONG LVar2;
|
|
|
|
int iVar3;
|
|
|
|
int *piVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 unaff_EBX;
|
|
|
|
undefined4 unaff_EBP;
|
|
|
|
char *pcVar6;
|
|
|
|
byte *pbVar7;
|
|
|
|
byte *pbVar8;
|
|
|
|
bool bVar9;
|
|
|
|
bool bVar10;
|
|
|
|
char **ppcVar11;
|
|
|
|
undefined4 uVar12;
|
|
|
|
undefined4 local_86c;
|
|
|
|
undefined4 local_868;
|
|
|
|
undefined4 local_864;
|
|
|
|
undefined4 local_860;
|
|
|
|
char *local_85c;
|
|
|
|
byte local_858 [32];
|
|
|
|
undefined *local_838;
|
|
|
|
char local_834 [2100];
|
|
|
|
|
|
|
|
local_85c = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
ppcVar11 = &local_85c;
|
|
|
|
iVar3 = param_1;
|
|
|
|
InterlockedIncrement((LONG *)(param_1 + -0x10));
|
|
|
|
FUN_004eb320(iVar3,ppcVar11);
|
|
|
|
puVar1 = PTR_DAT_00818344;
|
|
|
|
local_838 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
local_86c = 0;
|
|
|
|
local_868 = 0;
|
|
|
|
local_860 = 0;
|
|
|
|
local_864 = 0;
|
|
|
|
_File = fopen(local_85c,"r");
|
|
|
|
if (_File == (FILE *)0x0) {
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(puVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(puVar1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(puVar1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
pcVar6 = local_85c + -0x14;
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_85c + -0x10));
|
|
|
|
if ((LVar2 == 0) && (pcVar6 != (char *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)pcVar6)(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(param_1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
pcVar6 = fgets(local_834,0x834,_File);
|
|
|
|
do {
|
|
|
|
if (pcVar6 == (char *)0x0) {
|
|
|
|
fclose(_File);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(puVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(puVar1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(puVar1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
pcVar6 = local_85c + -0x14;
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_85c + -0x10));
|
|
|
|
if ((LVar2 == 0) && (pcVar6 != (char *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)pcVar6)(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(param_1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
iVar3 = sscanf(local_834,"%s X:%d Y: %d W: %d H: %d",local_858,&local_86c,&local_868,&local_864,
|
|
|
|
&local_860);
|
|
|
|
if (iVar3 == 5) {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c396c;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x1000049a;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c3964;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x10000601;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c395c;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x10000505;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c3954;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x1000050e;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c394c;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x1000050f;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c3944;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x10000510;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c393c;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x100005f7;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c3934;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x100005fa;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c392c;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x100006d5;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c3924;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x100005fd;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c391c;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x100005ff;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c3914;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x10000603;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c390c;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x10000611;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c3904;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x10000613;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c38fc;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar12 = 0x100006b5;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = 7;
|
|
|
|
bVar9 = false;
|
|
|
|
iVar3 = 0;
|
|
|
|
bVar10 = true;
|
|
|
|
pbVar7 = local_858;
|
|
|
|
pbVar8 = &DAT_007c38f4;
|
|
|
|
do {
|
|
|
|
if (iVar5 == 0) break;
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
bVar9 = *pbVar7 < *pbVar8;
|
|
|
|
bVar10 = *pbVar7 == *pbVar8;
|
|
|
|
pbVar7 = pbVar7 + 1;
|
|
|
|
pbVar8 = pbVar8 + 1;
|
|
|
|
} while (bVar10);
|
|
|
|
if (!bVar10) {
|
|
|
|
iVar3 = (1 - (uint)bVar9) - (uint)(bVar9 != 0);
|
|
|
|
}
|
|
|
|
if (iVar3 != 0) goto LAB_004eb947;
|
|
|
|
uVar12 = 0x100006d2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_00463c00(uVar12);
|
|
|
|
(**(code **)(*piVar4 + 0x30))(local_864,local_860);
|
|
|
|
(**(code **)(*piVar4 + 0x2c))(unaff_EBP,unaff_EBX);
|
|
|
|
}
|
|
|
|
LAB_004eb947:
|
|
|
|
pcVar6 = fgets(local_834,0x834,_File);
|
|
|
|
puVar1 = local_838;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eb9e0 at 0x004EB9E0 (size: 2120) ---
|
|
|
|
|
|
void FUN_004eb9e0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
FILE *_File;
|
|
|
|
LONG LVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
char *pcVar6;
|
|
|
|
int iVar7;
|
|
|
|
char **ppcVar8;
|
|
|
|
undefined *local_18;
|
|
|
|
undefined4 local_14;
|
|
|
|
undefined4 local_10;
|
|
|
|
undefined4 local_c;
|
|
|
|
char *local_8;
|
|
|
|
undefined4 *local_4;
|
|
|
|
|
|
|
|
local_8 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
local_18 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
puVar1 = PTR_DAT_00818344;
|
|
|
|
puVar5 = (undefined4 *)(PTR_DAT_00818344 + -0x14);
|
|
|
|
local_4 = puVar5;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
ppcVar8 = &local_8;
|
|
|
|
iVar7 = param_1;
|
|
|
|
InterlockedIncrement((LONG *)(param_1 + -0x10));
|
|
|
|
FUN_004eb320(iVar7,ppcVar8);
|
|
|
|
_File = fopen(local_8,"w");
|
|
|
|
if ((_File != (FILE *)0x0) || (_File = fopen(local_8,"w+"), _File != (FILE *)0x0)) {
|
|
|
|
FUN_00463c00(0x1000049a);
|
|
|
|
uVar3 = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar4 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<SBOX> X:%d Y: %d W: %d H: %d\n",uVar3,local_10,uVar4,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x10000601);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<CHAT> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x10000505);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<FCH1> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x1000050e);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<FCH2> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x1000050f);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<FCH3> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x10000510);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<FCH4> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x100005f7);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<EXAM> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x100005fa);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<VITS> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x100006d5);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<SVIT> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x100005fd);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<ENVP> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x100005ff);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<PANS> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x10000603);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<TBAR> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x10000611);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<INDI> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x10000613);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<PBAR> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x100006b5);
|
|
|
|
local_c = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<COMB> X:%d Y: %d W: %d H: %d\n",local_c,local_10,uVar3,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
FUN_00463c00(0x100006d2);
|
|
|
|
uVar3 = FUN_0069fe00();
|
|
|
|
local_10 = FUN_0069fe30();
|
|
|
|
local_14 = FUN_0069fe70();
|
|
|
|
uVar4 = FUN_0069fe60();
|
|
|
|
FUN_00402710(&local_18,"<RADA> X:%d Y: %d W: %d H: %d\n",uVar3,local_10,uVar4,local_14);
|
|
|
|
fwrite(local_18,1,*(int *)(local_18 + -4) - 1,_File);
|
|
|
|
fclose(_File);
|
|
|
|
puVar5 = local_4;
|
|
|
|
LVar2 = InterlockedDecrement(local_4 + 1);
|
|
|
|
if ((LVar2 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
puVar5 = (undefined4 *)(local_18 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_18 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
pcVar6 = local_8 + -0x14;
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_8 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (pcVar6 != (char *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)pcVar6)(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(param_1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(puVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
puVar5 = (undefined4 *)(local_18 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_18 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
pcVar6 = local_8 + -0x14;
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_8 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (pcVar6 != (char *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)pcVar6)(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));
|
|
|
|
if (LVar2 != 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((undefined4 *)(param_1 + -0x14) == (undefined4 *)0x0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(*(code *)**(undefined4 **)(param_1 + -0x14))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ec2f0 at 0x004EC2F0 (size: 55) ---
|
|
|
|
|
|
void FUN_004ec2f0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 extraout_ECX;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
iVar1 = FUN_0055e1d0();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
uVar3 = extraout_ECX;
|
|
|
|
FUN_00401340("#auto");
|
|
|
|
iVar2 = FUN_004eb580(uVar3);
|
|
|
|
*(bool *)(iVar1 + 0x240) = iVar2 != 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ec330 at 0x004EC330 (size: 491) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec46f) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec480) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec486) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec4c7) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec4d8) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec4de) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec3c7) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec37c) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec412) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec4ea) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec4fb) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec501) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec492) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec4a3) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x004ec4a9) */
|
|
|
|
|
|
|
|
undefined4 __fastcall FUN_004ec330(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uStack_80;
|
|
|
|
undefined1 auStack_7c [124];
|
|
|
|
|
|
|
|
if (param_1[0x2d] == 0) {
|
|
|
|
*(undefined1 *)((int)param_1 + 199) = 0;
|
|
|
|
(**(code **)(*param_1 + 0x24))(1);
|
|
|
|
FUN_006823d0();
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
uStack_80 = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_80,&stack0xffffff78);
|
|
|
|
FUN_0042a2d0(0xc3);
|
|
|
|
uStack_80 = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_80,&stack0xffffff78);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
uStack_80 = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_80,&stack0xffffff78);
|
|
|
|
iVar1 = FUN_00478290(param_1,auStack_7c);
|
|
|
|
param_1[0x2d] = iVar1;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_00681f60();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ec520 at 0x004EC520 (size: 475) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004ec520(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 *local_84;
|
|
|
|
int *local_80;
|
|
|
|
undefined4 uStack_7c;
|
|
|
|
undefined1 local_78 [120];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xb8) == 0) {
|
|
|
|
FUN_006823d0();
|
|
|
|
local_84 = (undefined4 *)0x0;
|
|
|
|
local_80 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0xac))(1);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0xc4))(param_2);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
iVar1 = FUN_00478290(param_1,local_78);
|
|
|
|
*(int *)(param_1 + 0xb8) = iVar1;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
if (local_84 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_84[1];
|
|
|
|
local_84[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_84)(1);
|
|
|
|
}
|
|
|
|
local_84 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
iVar1 = local_80[1];
|
|
|
|
local_80[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_80)(1);
|
|
|
|
}
|
|
|
|
local_80 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (local_84 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_84[1];
|
|
|
|
local_84[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_84)(1);
|
|
|
|
}
|
|
|
|
local_84 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
iVar1 = local_80[1];
|
|
|
|
local_80[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_80)(1);
|
|
|
|
}
|
|
|
|
local_80 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ecc80 at 0x004ECC80 (size: 142) ---
|
|
|
|
|
|
void __fastcall FUN_004ecc80(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int iStack_4;
|
|
|
|
|
|
|
|
iStack_4 = param_1;
|
|
|
|
iVar1 = FUN_006a1730();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar2 = FUN_0046dc50(*(undefined4 *)(param_1 + 0xb4));
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iStack_4 = 0;
|
|
|
|
FUN_00460a60(0x10000009,&iStack_4);
|
|
|
|
if (*(int *)(param_1 + 0xb8) == iStack_4) {
|
|
|
|
FUN_00460820(0xe,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(undefined4 *)(iVar1 + 0x4c) = 0;
|
|
|
|
uVar3 = 0xffffffff;
|
|
|
|
*(undefined4 *)(param_1 + 0xb8) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xb4) = 0xffffffff;
|
|
|
|
FUN_0055e1d0(0xffffffff);
|
|
|
|
FUN_0055e1e0();
|
|
|
|
FUN_005c4d40(uVar3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ecd10 at 0x004ECD10 (size: 153) ---
|
|
|
|
|
|
void __fastcall FUN_004ecd10(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007c3fb0;
|
|
|
|
param_1[0x26] = &PTR_FUN_007c3d08;
|
|
|
|
FUN_006a1a60(param_1 + 0x27);
|
|
|
|
FUN_00478560(param_1[0x2f]);
|
|
|
|
param_1[0x2f] = 0;
|
|
|
|
FUN_00478560(param_1[0x30]);
|
|
|
|
param_1[0x30] = 0;
|
|
|
|
FUN_00478560(param_1[0x31]);
|
|
|
|
param_1[0x31] = 0;
|
|
|
|
FUN_00478560(param_1[0x32]);
|
|
|
|
param_1[0x32] = 0;
|
|
|
|
FUN_00478560(param_1[0x33]);
|
|
|
|
param_1[0x33] = 0;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_006a1ae0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ecdb0 at 0x004ECDB0 (size: 61) ---
|
|
|
|
|
|
void FUN_004ecdb0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x1000039b);
|
|
|
|
if ((piVar1 != (int *)0x0) && (iVar2 = (**(code **)(*piVar1 + 0x94))(0xc), iVar2 != 0)) {
|
|
|
|
piVar1 = (int *)FUN_004114c0();
|
|
|
|
uVar3 = (**(code **)(*piVar1 + 0x54))();
|
|
|
|
FUN_0046a740(uVar3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ecdf0 at 0x004ECDF0 (size: 207) ---
|
|
|
|
|
|
void __thiscall FUN_004ecdf0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
iVar1 = param_2;
|
|
|
|
if ((((*(int *)(param_1 + 0xb8) != param_2) && (iVar2 = FUN_006a1730(), iVar2 != 0)) &&
|
|
|
|
(iVar2 != -4)) &&
|
|
|
|
((FUN_004ecc80(), iVar1 != 0 && (iVar4 = 0, 0 < *(int *)(*(int *)(param_1 + 0xa0) + 0x610)))))
|
|
|
|
{
|
|
|
|
while( true ) {
|
|
|
|
FUN_0046dc50(iVar4);
|
|
|
|
FUN_00460a60(0x10000009,¶m_2);
|
|
|
|
if (param_2 == iVar1) break;
|
|
|
|
iVar4 = iVar4 + 1;
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0xa0) + 0x610) <= iVar4) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0xb8) = iVar1;
|
|
|
|
*(int *)(iVar2 + 0x4c) = iVar1;
|
|
|
|
*(int *)(param_1 + 0xb4) = iVar4;
|
|
|
|
uVar3 = FUN_004fe9e0(*(undefined4 *)(param_1 + 0xb8));
|
|
|
|
FUN_0055e1d0(uVar3);
|
|
|
|
FUN_0055e1e0();
|
|
|
|
FUN_005c4d40(uVar3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eced0 at 0x004ECED0 (size: 251) ---
|
|
|
|
|
|
void __fastcall FUN_004eced0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
|
|
|
|
iVar1 = FUN_006a1730();
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (iVar1 == -4) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_0046cf60();
|
|
|
|
if (iVar2 != -1) {
|
|
|
|
uVar3 = FUN_004fe9e0(*(undefined4 *)(param_1 + 0xb8));
|
|
|
|
iVar2 = FUN_004fea20(uVar3);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xa8) + 0x9c))(1);
|
|
|
|
uVar3 = 1;
|
|
|
|
goto LAB_004ecf3c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xa8) + 0x9c))(0xd);
|
|
|
|
uVar3 = 0xd;
|
|
|
|
LAB_004ecf3c:
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x9c))(uVar3);
|
|
|
|
uVar3 = FUN_004fe9e0(*(undefined4 *)(param_1 + 0xb8));
|
|
|
|
iVar2 = FUN_004fea20(uVar3);
|
|
|
|
if ((iVar2 == 0) || (iVar2 = FUN_0046cf60(), iVar2 == -1)) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb0) + 0x18))(0);
|
|
|
|
piVar4 = *(int **)(param_1 + 0xac);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x18))(0);
|
|
|
|
piVar4 = *(int **)(param_1 + 0xb0);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar4 + 0x18))(1);
|
|
|
|
if (*(int *)(iVar1 + 0x2c) <= *(int *)(iVar1 + 0x18)) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xa4) + 0x9c))(0xd);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xa4) + 0x9c))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ecfd0 at 0x004ECFD0 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004ecfd0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004ecd10();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ed030 at 0x004ED030 (size: 1344) ---
|
|
|
|
|
|
void __fastcall FUN_004ed030(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
bool bVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
int **ppiVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
int *piVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
LONG LVar9;
|
|
|
|
undefined4 uVar10;
|
|
|
|
int *piStack_4c;
|
|
|
|
int iStack_48;
|
|
|
|
int *piStack_44;
|
|
|
|
int *piStack_40;
|
|
|
|
int *piStack_3c;
|
|
|
|
int *piStack_38;
|
|
|
|
undefined4 *local_34;
|
|
|
|
undefined4 *puStack_30;
|
|
|
|
undefined4 *puStack_2c;
|
|
|
|
undefined4 uStack_28;
|
|
|
|
int *piStack_24;
|
|
|
|
undefined4 uStack_20;
|
|
|
|
int *piStack_1c;
|
|
|
|
undefined4 uStack_18;
|
|
|
|
undefined4 uStack_14;
|
|
|
|
undefined4 uStack_10;
|
|
|
|
undefined4 uStack_c;
|
|
|
|
|
|
|
|
local_34 = *(undefined4 **)(param_1 + 0xb8);
|
|
|
|
FUN_004ecc80();
|
|
|
|
FUN_0046e460();
|
|
|
|
iVar2 = FUN_006a1730();
|
|
|
|
if (((iVar2 != 0) && (*(char *)(iVar2 + 0x48) != '\0')) && (iStack_48 = iVar2 + 4, iStack_48 != 0)
|
|
|
|
) {
|
|
|
|
piStack_44 = *(int **)(iVar2 + 0x2c);
|
|
|
|
piStack_4c = *(int **)(iVar2 + 0x18);
|
|
|
|
piStack_40 = (int *)0x0;
|
|
|
|
piStack_3c = (int *)0x0;
|
|
|
|
ppiVar5 = &piStack_44;
|
|
|
|
if ((int)piStack_44 <= (int)piStack_4c) {
|
|
|
|
ppiVar5 = &piStack_4c;
|
|
|
|
}
|
|
|
|
iVar3 = FUN_0069fe70();
|
|
|
|
piVar7 = *ppiVar5;
|
|
|
|
piStack_44 = (int *)(iVar3 / (int)piVar7);
|
|
|
|
iVar4 = FUN_0069fe70();
|
|
|
|
piStack_4c = (int *)(iVar4 / 0x14);
|
|
|
|
ppiVar5 = &piStack_44;
|
|
|
|
if (iVar3 / (int)piVar7 <= iVar4 / 0x14) {
|
|
|
|
ppiVar5 = &piStack_4c;
|
|
|
|
}
|
|
|
|
piStack_38 = *ppiVar5;
|
|
|
|
piStack_4c = (int *)0x0;
|
|
|
|
if (0 < *(int *)(iVar2 + 0x18)) {
|
|
|
|
do {
|
|
|
|
puVar6 = (undefined4 *)FUN_004fe9b0(piStack_4c);
|
|
|
|
piVar7 = (int *)FUN_0046f670(0,0);
|
|
|
|
if ((piVar7 == (int *)0x0) ||
|
|
|
|
(piVar7 = (int *)(**(code **)(*piVar7 + 0x94))(0xc), piVar7 == (int *)0x0)) break;
|
|
|
|
iVar2 = *piVar7;
|
|
|
|
uVar8 = FUN_0069fe60(piStack_38);
|
|
|
|
(**(code **)(iVar2 + 0x30))(uVar8);
|
|
|
|
(**(code **)(*piVar7 + 0x110))(1);
|
|
|
|
piVar7[0x155] = piVar7[0x155] | 0x800000;
|
|
|
|
piStack_3c = (int *)0x0;
|
|
|
|
piStack_38 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000009);
|
|
|
|
if (piStack_38 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_38 + 0xcc))(puVar6);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar7 + 0xd4))(&piStack_3c);
|
|
|
|
iVar2 = iStack_48;
|
|
|
|
uVar8 = FUN_004fe980(piStack_4c);
|
|
|
|
FUN_00404a40(0,uVar8);
|
|
|
|
FUN_0046a740(&piStack_44);
|
|
|
|
uVar8 = FUN_004fe9e0(puVar6);
|
|
|
|
iVar3 = FUN_004fea20(uVar8);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
uStack_20 = 0;
|
|
|
|
piStack_1c = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x19);
|
|
|
|
uStack_18 = 0x3f800000;
|
|
|
|
uStack_14 = 0;
|
|
|
|
uStack_10 = 0;
|
|
|
|
uStack_c = 0x3f800000;
|
|
|
|
if (piStack_1c != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_1c + 0x9c))(&uStack_18);
|
|
|
|
}
|
|
|
|
uStack_28 = 0;
|
|
|
|
piStack_24 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x1b);
|
|
|
|
if (piStack_24 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_24 + 0xfc))(&uStack_20);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar7 + 0xd4))(&uStack_28);
|
|
|
|
FUN_004234d0();
|
|
|
|
FUN_004234d0();
|
|
|
|
}
|
|
|
|
if (puVar6 == local_34) {
|
|
|
|
piStack_3c = piVar7;
|
|
|
|
}
|
|
|
|
FUN_0055e1d0();
|
|
|
|
iVar3 = FUN_0055e1e0();
|
|
|
|
if (piStack_4c == *(int **)(iVar3 + 0x208)) {
|
|
|
|
piStack_40 = piVar7;
|
|
|
|
}
|
|
|
|
piVar7 = piStack_44 + -5;
|
|
|
|
LVar9 = InterlockedDecrement(piStack_44 + -4);
|
|
|
|
if ((LVar9 == 0) && (piVar7 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar7)(1);
|
|
|
|
}
|
|
|
|
if (puStack_30 != (undefined4 *)0x0) {
|
|
|
|
iVar3 = puStack_30[1];
|
|
|
|
puStack_30[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_30)(1);
|
|
|
|
}
|
|
|
|
puStack_30 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (puStack_2c != (undefined4 *)0x0) {
|
|
|
|
iVar3 = puStack_2c[1];
|
|
|
|
puStack_2c[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_2c)(1);
|
|
|
|
}
|
|
|
|
puStack_2c = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
piStack_4c = (int *)((int)piStack_4c + 1);
|
|
|
|
} while ((int)piStack_4c < *(int *)(iVar2 + 0x14));
|
|
|
|
}
|
|
|
|
piStack_44 = (int *)FUN_0046dc50(0);
|
|
|
|
iVar2 = 0;
|
|
|
|
piVar7 = piStack_44;
|
|
|
|
if (0 < *(int *)(*(int *)(param_1 + 0xa0) + 0x610)) {
|
|
|
|
do {
|
|
|
|
piVar7 = (int *)FUN_0046dc50(iVar2);
|
|
|
|
FUN_00460a60(0x10000009,&local_34);
|
|
|
|
if (local_34 != (undefined4 *)0x0) {
|
|
|
|
uVar8 = FUN_004fe9e0(local_34);
|
|
|
|
iVar3 = FUN_004fea20(uVar8);
|
|
|
|
if (iVar3 == 0) break;
|
|
|
|
}
|
|
|
|
iVar2 = iVar2 + 1;
|
|
|
|
piVar7 = piStack_44;
|
|
|
|
} while (iVar2 < *(int *)(*(int *)(param_1 + 0xa0) + 0x610));
|
|
|
|
}
|
|
|
|
piStack_44 = piVar7;
|
|
|
|
piStack_4c = (int *)(*(int *)(*(int *)(param_1 + 0xa0) + 0x610) + -1);
|
|
|
|
do {
|
|
|
|
bVar1 = false;
|
|
|
|
iVar2 = 0;
|
|
|
|
if (0 < (int)piStack_4c) {
|
|
|
|
do {
|
|
|
|
piVar7 = (int *)FUN_0046dc50(iVar2);
|
|
|
|
(**(code **)(*piVar7 + 0x94))(0xc);
|
|
|
|
iVar3 = iVar2 + 1;
|
|
|
|
piVar7 = (int *)FUN_0046dc50(iVar3);
|
|
|
|
(**(code **)(*piVar7 + 0x94))(0xc);
|
|
|
|
local_34 = (undefined4 *)FUN_00466830(&puStack_30);
|
|
|
|
puVar6 = (undefined4 *)FUN_00466830(&piStack_38);
|
|
|
|
iVar4 = wcscmp((wchar_t *)*puVar6,(wchar_t *)*local_34);
|
|
|
|
piVar7 = piStack_38 + -5;
|
|
|
|
LVar9 = InterlockedDecrement(piStack_38 + -4);
|
|
|
|
if ((LVar9 == 0) && (piVar7 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar7)(1);
|
|
|
|
}
|
|
|
|
puVar6 = puStack_30 + -5;
|
|
|
|
LVar9 = InterlockedDecrement(puStack_30 + -4);
|
|
|
|
if ((LVar9 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
if (0 < iVar4) {
|
|
|
|
uVar8 = FUN_0046de80(iVar3);
|
|
|
|
FUN_0046eb20(uVar8,iVar2);
|
|
|
|
bVar1 = true;
|
|
|
|
}
|
|
|
|
iVar2 = iVar3;
|
|
|
|
} while (iVar3 < (int)piStack_4c);
|
|
|
|
}
|
|
|
|
piStack_4c = (int *)((int)piStack_4c + -1);
|
|
|
|
} while (bVar1);
|
|
|
|
iVar3 = 0;
|
|
|
|
iVar2 = 0;
|
|
|
|
if (0 < *(int *)(*(int *)(param_1 + 0xa0) + 0x610)) {
|
|
|
|
do {
|
|
|
|
uVar8 = FUN_0046dc50(iVar3);
|
|
|
|
FUN_00460a60(0x10000009,&puStack_30);
|
|
|
|
if (puStack_30 != (undefined4 *)0x0) {
|
|
|
|
uVar10 = FUN_004fe9e0(puStack_30);
|
|
|
|
iVar4 = FUN_004fea20(uVar10);
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
iVar3 = iVar3 + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_0046e3a0(uVar8);
|
|
|
|
FUN_0046eb20(uVar8,*(undefined4 *)(*(int *)(param_1 + 0xa0) + 0x610));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = iVar2 + 1;
|
|
|
|
} while (iVar2 < *(int *)(*(int *)(param_1 + 0xa0) + 0x610));
|
|
|
|
}
|
|
|
|
piVar7 = piStack_40;
|
|
|
|
if ((piStack_40 == (int *)0x0) && (piVar7 = piStack_3c, piStack_3c == (int *)0x0)) {
|
|
|
|
piVar7 = piStack_44;
|
|
|
|
}
|
|
|
|
FUN_0046dc70(piVar7,1);
|
|
|
|
FUN_004eced0();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ed580 at 0x004ED580 (size: 413) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004ed580(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
int *piVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
|
|
|
|
FUN_006a1ab0();
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
puVar1 = param_1 + 0x26;
|
|
|
|
*param_1 = &PTR_FUN_007c3fb0;
|
|
|
|
*puVar1 = &PTR_FUN_007c3d08;
|
|
|
|
param_1[0x27] = 0;
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
param_1[0x29] = 0;
|
|
|
|
param_1[0x2a] = 0;
|
|
|
|
param_1[0x2b] = 0;
|
|
|
|
param_1[0x2c] = 0;
|
|
|
|
param_1[0x2d] = 0xffffffff;
|
|
|
|
param_1[0x2e] = 0;
|
|
|
|
param_1[0x2f] = 0;
|
|
|
|
param_1[0x30] = 0;
|
|
|
|
param_1[0x31] = 0;
|
|
|
|
param_1[0x32] = 0;
|
|
|
|
param_1[0x33] = 0;
|
|
|
|
iVar2 = FUN_006a1a20(0x10000005,0x1000039a);
|
|
|
|
param_1[0x27] = iVar2;
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
piVar3 = (int *)FUN_00463c00(0x1000039d);
|
|
|
|
if (piVar3 == (int *)0x0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = (**(code **)(*piVar3 + 0x94))(5);
|
|
|
|
}
|
|
|
|
param_1[0x28] = uVar4;
|
|
|
|
uVar4 = FUN_00463c00(0x100003a0);
|
|
|
|
param_1[0x29] = uVar4;
|
|
|
|
uVar4 = FUN_00463c00(0x100003a2);
|
|
|
|
param_1[0x2a] = uVar4;
|
|
|
|
uVar4 = FUN_00463c00(0x1000039f);
|
|
|
|
param_1[0x2b] = uVar4;
|
|
|
|
uVar4 = FUN_00463c00(0x1000039e);
|
|
|
|
param_1[0x2c] = uVar4;
|
|
|
|
piVar3 = (int *)FUN_0043c680();
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar3 + 4))(0x186a4,puVar1);
|
|
|
|
(**(code **)(*piVar3 + 4))(0x186a2,puVar1);
|
|
|
|
(**(code **)(*piVar3 + 4))(0x4dd1e1,puVar1);
|
|
|
|
(**(code **)(*piVar3 + 4))(0x4dd22c,puVar1);
|
|
|
|
FUN_004ecdb0();
|
|
|
|
iVar2 = FUN_006a1730();
|
|
|
|
if ((iVar2 != 0) && (*(char *)(iVar2 + 0x48) != '\0')) {
|
|
|
|
param_1[0x2e] = *(undefined4 *)(iVar2 + 0x4c);
|
|
|
|
FUN_004ed030();
|
|
|
|
}
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x34))(9,param_1,3000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ed740 at 0x004ED740 (size: 60) ---
|
|
|
|
|
|
void __fastcall FUN_004ed740(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_006a1730();
|
|
|
|
if ((iVar1 != 0) && (*(char *)(iVar1 + 0x48) != '\0')) {
|
|
|
|
FUN_004ecdb0();
|
|
|
|
FUN_004ed030();
|
|
|
|
FUN_00478560(*(undefined4 *)(param_1 + 200));
|
|
|
|
*(undefined4 *)(param_1 + 200) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ed780 at 0x004ED780 (size: 19) ---
|
|
|
|
|
|
void FUN_004ed780(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004ed720);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ed7a0 at 0x004ED7A0 (size: 392) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004ed7a0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *local_84;
|
|
|
|
int *local_80;
|
|
|
|
undefined4 uStack_7c;
|
|
|
|
undefined1 local_78 [120];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xbc) != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_006823d0();
|
|
|
|
local_84 = (undefined4 *)0x0;
|
|
|
|
local_80 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0xac))(3);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_80 + 0xc4))(param_2);
|
|
|
|
}
|
|
|
|
uStack_7c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_7c,&local_84);
|
|
|
|
uVar2 = FUN_00478290(param_1,local_78);
|
|
|
|
*(undefined4 *)(param_1 + 0xbc) = uVar2;
|
|
|
|
if (local_84 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_84[1];
|
|
|
|
local_84[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_84)(1);
|
|
|
|
}
|
|
|
|
local_84 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_80 != (int *)0x0) {
|
|
|
|
iVar1 = local_80[1];
|
|
|
|
local_80[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_80)(1);
|
|
|
|
}
|
|
|
|
local_80 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ed930 at 0x004ED930 (size: 558) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004ed930(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 *puStack_118;
|
|
|
|
int *piStack_114;
|
|
|
|
undefined4 uStack_110;
|
|
|
|
int iStack_10c;
|
|
|
|
undefined1 auStack_108 [120];
|
|
|
|
undefined1 auStack_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xc4) != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_006a1730();
|
|
|
|
uVar1 = FUN_004fe9e0(*(undefined4 *)(param_1 + 0xb8));
|
|
|
|
uVar1 = FUN_004fe980(uVar1);
|
|
|
|
FUN_00404a40(0,uVar1);
|
|
|
|
FUN_006823d0();
|
|
|
|
puStack_118 = (undefined4 *)0x0;
|
|
|
|
piStack_114 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (piStack_114 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_114 + 0xac))(5);
|
|
|
|
}
|
|
|
|
uStack_110 = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_110,&puStack_118);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (piStack_114 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_114 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_110 = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_110,&puStack_118);
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_00841bf0,0x10000002);
|
|
|
|
iVar3 = iStack_10c;
|
|
|
|
InterlockedIncrement((LONG *)(iStack_10c + -0x10));
|
|
|
|
FUN_0042e8e0(DAT_00841bfc,iVar3);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (piStack_114 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*piStack_114 + 0xc4))(auStack_90);
|
|
|
|
}
|
|
|
|
uStack_110 = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_110,&puStack_118);
|
|
|
|
uVar1 = FUN_00478290(param_1,auStack_108);
|
|
|
|
*(undefined4 *)(param_1 + 0xc4) = uVar1;
|
|
|
|
FUN_0042e590();
|
|
|
|
if (puStack_118 != (undefined4 *)0x0) {
|
|
|
|
iVar3 = puStack_118[1];
|
|
|
|
puStack_118[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*puStack_118)(1);
|
|
|
|
}
|
|
|
|
puStack_118 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (piStack_114 != (int *)0x0) {
|
|
|
|
iVar3 = piStack_114[1];
|
|
|
|
piStack_114[1] = iVar3 + -1;
|
|
|
|
if (iVar3 + -1 == 0) {
|
|
|
|
(**(code **)*piStack_114)(1);
|
|
|
|
}
|
|
|
|
piStack_114 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(iStack_10c + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(iStack_10c + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_10c + -0x14))(1);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004edb60 at 0x004EDB60 (size: 435) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004edb60(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 200) != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_00841bf8,0x10000002);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(2);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
uVar2 = FUN_00478290(param_1,local_108);
|
|
|
|
*(undefined4 *)(param_1 + 200) = uVar2;
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_114[1];
|
|
|
|
local_114[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar1 = local_110[1];
|
|
|
|
local_110[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004edd20 at 0x004EDD20 (size: 435) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004edd20(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xcc) != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_00841bec,0x10000002);
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(2);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(local_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
uVar2 = FUN_00478290(param_1,local_108);
|
|
|
|
*(undefined4 *)(param_1 + 0xcc) = uVar2;
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_114[1];
|
|
|
|
local_114[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar1 = local_110[1];
|
|
|
|
local_110[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004edee0 at 0x004EDEE0 (size: 443) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004edee0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 *local_114;
|
|
|
|
int *local_110;
|
|
|
|
undefined4 uStack_10c;
|
|
|
|
undefined1 local_108 [120];
|
|
|
|
undefined1 auStack_90 [144];
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xc0) != 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_006823d0();
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x8e);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xac))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042a2d0(0xac);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0x74))(1);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar3 = 0x10000002;
|
|
|
|
uVar2 = FUN_004016b0("ID_CharacterManagement_ConfirmExit",0x10000002);
|
|
|
|
FUN_0042c9c0(uVar2,uVar3);
|
|
|
|
FUN_0042a2d0(0xc5);
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_110 + 0xc4))(auStack_90);
|
|
|
|
}
|
|
|
|
uStack_10c = FUN_00429a00();
|
|
|
|
FUN_0042c290(&uStack_10c,&local_114);
|
|
|
|
uVar2 = FUN_00478290(param_1,local_108);
|
|
|
|
*(undefined4 *)(param_1 + 0xc0) = uVar2;
|
|
|
|
FUN_0042e590();
|
|
|
|
if (local_114 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_114[1];
|
|
|
|
local_114[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_114)(1);
|
|
|
|
}
|
|
|
|
local_114 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if (local_110 != (int *)0x0) {
|
|
|
|
iVar1 = local_110[1];
|
|
|
|
local_110[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_110)(1);
|
|
|
|
}
|
|
|
|
local_110 = (int *)0x0;
|
|
|
|
}
|
|
|
|
FUN_00681f60();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ee0d0 at 0x004EE0D0 (size: 89) ---
|
|
|
|
|
|
void __fastcall FUN_004ee0d0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
|
|
|
|
iVar1 = FUN_0055e1d0();
|
|
|
|
if ((iVar1 != 0) && (*(int *)(param_1 + 0xb8) != 0)) {
|
|
|
|
FUN_006a1730();
|
|
|
|
uVar2 = FUN_004fe9e0(*(undefined4 *)(param_1 + 0xb8));
|
|
|
|
iVar1 = FUN_004fea20(uVar2);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_004edd20();
|
|
|
|
FUN_00560600(*(undefined4 *)(param_1 + 0xb8));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ee130 at 0x004EE130 (size: 248) ---
|
|
|
|
|
|
void __thiscall FUN_004ee130(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int local_98;
|
|
|
|
char *local_94 [37];
|
|
|
|
|
|
|
|
*(undefined4 *)(param_1 + 0xc4) = 0;
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_00841bf4,0x10000002);
|
|
|
|
cVar1 = FUN_0042ce00(1);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
FUN_0042e980(&local_98,0);
|
|
|
|
FUN_00408fd0(local_94,0);
|
|
|
|
iVar2 = _stricmp((char *)*param_2,local_94[0]);
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_94[0] + -0x10));
|
|
|
|
if ((LVar3 == 0) && (local_94[0] + -0x14 != (char *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_94[0] + -0x14))(1);
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_98 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(local_98 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_98 + -0x14))(1);
|
|
|
|
}
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
iVar2 = FUN_006a1730();
|
|
|
|
uVar4 = *(undefined4 *)(iVar2 + 0x4c);
|
|
|
|
FUN_004edb60();
|
|
|
|
FUN_0055e1d0(uVar4);
|
|
|
|
FUN_005605a0(uVar4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ee230 at 0x004EE230 (size: 406) ---
|
|
|
|
|
|
void __thiscall FUN_004ee230(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
puVar1 = param_2;
|
|
|
|
switch(*param_2) {
|
|
|
|
case 0x1000039d:
|
|
|
|
if (param_2[2] == 4) {
|
|
|
|
FUN_004ecc80();
|
|
|
|
param_2 = (undefined4 *)0x0;
|
|
|
|
if (puVar1[4] != 0) {
|
|
|
|
FUN_00460820(0xe,1);
|
|
|
|
FUN_00460a60(0x10000009,¶m_2);
|
|
|
|
}
|
|
|
|
FUN_004ecdf0(param_2);
|
|
|
|
FUN_004eced0();
|
|
|
|
FUN_006a1860(puVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x1000039e:
|
|
|
|
if (((param_2[2] == 1) && (iVar2 = FUN_0055e1d0(), iVar2 != 0)) &&
|
|
|
|
(*(int *)(*(int *)(param_1 + 0xa0) + 0x614) != 0)) {
|
|
|
|
FUN_00460a60(0x10000009,¶m_2);
|
|
|
|
FUN_006a1730();
|
|
|
|
FUN_004edb60();
|
|
|
|
FUN_0055e480(param_2);
|
|
|
|
FUN_006a1860(puVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x1000039f:
|
|
|
|
if ((param_2[2] == 1) && (*(int *)(*(int *)(param_1 + 0xa0) + 0x614) != 0)) {
|
|
|
|
FUN_004ed930();
|
|
|
|
FUN_006a1860(puVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x100003a0:
|
|
|
|
if (param_2[2] == 1) {
|
|
|
|
uVar3 = 0x1000000b;
|
|
|
|
LAB_004ee3b1:
|
|
|
|
FUN_006a1740(uVar3);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x100003a1:
|
|
|
|
break;
|
|
|
|
case 0x100003a2:
|
|
|
|
if (param_2[2] == 1) {
|
|
|
|
FUN_004ee0d0();
|
|
|
|
FUN_006a1860(puVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x100003a3:
|
|
|
|
if (param_2[2] == 1) {
|
|
|
|
uVar3 = 0x10000005;
|
|
|
|
goto LAB_004ee3b1;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x100003a4:
|
|
|
|
if (param_2[2] == 1) {
|
|
|
|
FUN_004edee0();
|
|
|
|
FUN_006a1860(puVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x100003a5:
|
|
|
|
if (param_2[2] == 0x1a) {
|
|
|
|
FUN_004ee0d0();
|
|
|
|
FUN_006a1860(puVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
goto switchD_004ee249_default;
|
|
|
|
}
|
|
|
|
switchD_004ee249_default:
|
|
|
|
FUN_006a1860(puVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ee680 at 0x004EE680 (size: 96) ---
|
|
|
|
|
|
void __fastcall FUN_004ee680(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
puVar1 = *(undefined4 **)(param_1 + 0xa8);
|
|
|
|
if (puVar1 != (undefined4 *)0x0) {
|
|
|
|
iVar2 = puVar1[1];
|
|
|
|
*(int *)(param_1 + 0xa8) = iVar2;
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0xac) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(iVar2 + 8) = 0;
|
|
|
|
}
|
|
|
|
uVar3 = *puVar1;
|
|
|
|
operator_delete(puVar1);
|
|
|
|
*(int *)(param_1 + 0xb0) = *(int *)(param_1 + 0xb0) + -1;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xa0) + 0x9c))(uVar3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_006a1740(0x1000000a);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ee9d0 at 0x004EE9D0 (size: 131) ---
|
|
|
|
|
|
void __fastcall FUN_004ee9d0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_007c41d0;
|
|
|
|
param_1[0x26] = &PTR_FUN_007c41b8;
|
|
|
|
param_1[0x27] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_006a1a60(param_1 + 0x28);
|
|
|
|
piVar1 = DAT_00837ff4;
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x3c))(param_1);
|
|
|
|
(**(code **)(*piVar1 + 0xa8))(0);
|
|
|
|
(**(code **)(*piVar1 + 0x4c))(param_1 + 0x26,2);
|
|
|
|
}
|
|
|
|
param_1[0x29] = &PTR_FUN_007a3c34;
|
|
|
|
FUN_0049f850();
|
|
|
|
param_1[0x27] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_006a1ae0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eea80 at 0x004EEA80 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004eea80(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004ee9d0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eeaa0 at 0x004EEAA0 (size: 19) ---
|
|
|
|
|
|
void FUN_004eeaa0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004eea60);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eeaf0 at 0x004EEAF0 (size: 122) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_004eeaf0(int param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_2 == *(float *)(param_1 + 0xb8)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*(float *)(param_1 + 0xb8) = param_2;
|
|
|
|
FUN_00460760(0x66,param_2);
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004eeb60. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xa8) + 0x9c))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eeb70 at 0x004EEB70 (size: 46) ---
|
|
|
|
|
|
void __thiscall FUN_004eeb70(int param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_2 != *(float *)(param_1 + 0xbc)) {
|
|
|
|
*(float *)(param_1 + 0xbc) = param_2;
|
|
|
|
FUN_00460760(0x66,param_2);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eeba0 at 0x004EEBA0 (size: 209) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004eeba0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined1 local_8 [8];
|
|
|
|
|
|
|
|
if ((*(float *)(param_1 + 0xb8) < _DAT_007938b0) && (*(short *)(DAT_00846f18 + 0x8a6e) != 0)) {
|
|
|
|
FUN_004eeaf0(0x3f800000);
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0xc0) != 0) && (*(double *)(param_1 + 200) <= _DAT_008379a8)) {
|
|
|
|
FUN_0050a140();
|
|
|
|
FUN_005d69c0(0,local_8);
|
|
|
|
*(double *)(param_1 + 200) = _DAT_008379a8 + _DAT_007b2440;
|
|
|
|
FUN_00695670();
|
|
|
|
}
|
|
|
|
if ((((float)_DAT_007938c0 <= *(float *)(param_1 + 0xb8)) &&
|
|
|
|
((float)_DAT_007938c0 <= *(float *)(param_1 + 0xbc))) &&
|
|
|
|
((iVar1 = FUN_00541770(), iVar1 == 0 ||
|
|
|
|
(iVar1 = FUN_006a1730(), *(char *)(iVar1 + 0x48) != '\0')))) {
|
|
|
|
FUN_006a1740(0x10000001);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eeeb0 at 0x004EEEB0 (size: 124) ---
|
|
|
|
|
|
void __fastcall FUN_004eeeb0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x27;
|
|
|
|
*param_1 = &PTR_FUN_007c42e0;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
*puVar1 = &PTR_LAB_007c42d0;
|
|
|
|
piVar2 = (int *)FUN_004114c0();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x60))(puVar1);
|
|
|
|
}
|
|
|
|
FUN_00465fb0(3);
|
|
|
|
FUN_006a1a60(param_1 + 0x29);
|
|
|
|
*puVar1 = &PTR_FUN_00795538;
|
|
|
|
if (param_1[0x28] != 0) {
|
|
|
|
FUN_0040e340(puVar1);
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
}
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_006a1ae0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eef40 at 0x004EEF40 (size: 343) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004eef40(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
FUN_006a1ab0();
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x27] = &PTR_FUN_007959a8;
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
*param_1 = &PTR_FUN_007c42e0;
|
|
|
|
param_1[0x26] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x27] = &PTR_LAB_007c42d0;
|
|
|
|
param_1[0x29] = 0;
|
|
|
|
param_1[0x2a] = 0;
|
|
|
|
param_1[0x2b] = 0;
|
|
|
|
param_1[0x2c] = 0;
|
|
|
|
param_1[0x2d] = 0;
|
|
|
|
param_1[0x2e] = 0xbf800000;
|
|
|
|
param_1[0x2f] = 0xbf800000;
|
|
|
|
param_1[0x30] = 0xffffffff;
|
|
|
|
param_1[0x31] = 0;
|
|
|
|
iVar1 = FUN_006a1a20(0x10000001,0x1000041a);
|
|
|
|
param_1[0x29] = iVar1;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x10000420);
|
|
|
|
uVar3 = (**(code **)(*piVar2 + 0x94))(0xc);
|
|
|
|
param_1[0x2a] = uVar3;
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x10000421);
|
|
|
|
uVar3 = (**(code **)(*piVar2 + 0x94))(0xc);
|
|
|
|
param_1[0x2c] = uVar3;
|
|
|
|
uVar3 = FUN_00463c00(0x1000041e);
|
|
|
|
param_1[0x2b] = uVar3;
|
|
|
|
uVar3 = FUN_00463c00(0x1000041f);
|
|
|
|
param_1[0x2d] = uVar3;
|
|
|
|
}
|
|
|
|
piVar2 = (int *)FUN_004114c0();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x5c))(param_1 + 0x27);
|
|
|
|
}
|
|
|
|
FUN_00465f90(3);
|
|
|
|
FUN_004eeaf0(0);
|
|
|
|
if (DAT_00796344 != (float)param_1[0x2f]) {
|
|
|
|
param_1[0x2f] = 0;
|
|
|
|
FUN_00460760(0x66,0);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef0a0 at 0x004EF0A0 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004ef0a0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004eeeb0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef0e0 at 0x004EF0E0 (size: 19) ---
|
|
|
|
|
|
void FUN_004ef0e0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00479c50(param_1,&LAB_004ef0c0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef100 at 0x004EF100 (size: 152) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void FUN_004ef100(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined2 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iVar5;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
if (DAT_00841cac == 0) {
|
|
|
|
DAT_00841cac = thunk_FUN_005df0f5(200);
|
|
|
|
iVar5 = 0;
|
|
|
|
iVar4 = 0;
|
|
|
|
local_4 = 0;
|
|
|
|
do {
|
|
|
|
iVar2 = DAT_00841cac;
|
|
|
|
fsin((float10)local_4 * (float10)_DAT_007c4400 * (float10)_DAT_007c43f8);
|
|
|
|
uVar1 = FUN_005df4c4();
|
|
|
|
*(undefined2 *)(iVar2 + local_4 * 2) = uVar1;
|
|
|
|
iVar5 = iVar5 + *(short *)(DAT_00841cac + local_4 * 2);
|
|
|
|
local_4 = local_4 + 1;
|
|
|
|
} while (local_4 < 100);
|
|
|
|
iVar2 = 0;
|
|
|
|
do {
|
|
|
|
iVar4 = iVar4 + *(short *)(iVar2 + DAT_00841cac);
|
|
|
|
iVar3 = iVar2 + 2;
|
|
|
|
*(short *)(iVar2 + DAT_00841cac) = (short)((iVar4 * 0x400) / iVar5);
|
|
|
|
iVar2 = iVar3;
|
|
|
|
} while (iVar3 < 200);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef1b0 at 0x004EF1B0 (size: 25) ---
|
|
|
|
|
|
void FUN_004ef1b0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
operator_delete__(DAT_00841cac);
|
|
|
|
DAT_00841cac = (void *)0x0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef1d0 at 0x004EF1D0 (size: 71) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 FUN_004ef1d0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_005df4c4();
|
|
|
|
return CONCAT22((short)((uint)(iVar1 * 2) >> 0x10),*(undefined2 *)(DAT_00841cac + iVar1 * -2));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef220 at 0x004EF220 (size: 23) ---
|
|
|
|
|
|
void __thiscall FUN_004ef220(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x40) = param_2;
|
|
|
|
FUN_00514c60(param_2,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef240 at 0x004EF240 (size: 67) ---
|
|
|
|
|
|
void __thiscall FUN_004ef240(int param_1,undefined4 *param_2,undefined4 *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x48) = *param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x4c) = param_2[1];
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = param_2[2];
|
|
|
|
*(undefined4 *)(param_1 + 0x54) = *param_3;
|
|
|
|
*(undefined4 *)(param_1 + 0x58) = param_3[1];
|
|
|
|
*(undefined4 *)(param_1 + 0x5c) = param_3[2];
|
|
|
|
FUN_0046be10();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef290 at 0x004EF290 (size: 52) ---
|
|
|
|
|
|
void __fastcall FUN_004ef290(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
|
|
|
|
FUN_00510230();
|
|
|
|
FUN_005101c0(*(undefined4 *)(param_1 + 0x10),1,0,0x41f00000);
|
|
|
|
uVar1 = DAT_008379ac;
|
|
|
|
*(undefined4 *)(param_1 + 0x30) = DAT_008379a8;
|
|
|
|
*(undefined4 *)(param_1 + 0x34) = uVar1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef2d0 at 0x004EF2D0 (size: 31) ---
|
|
|
|
|
|
void __fastcall FUN_004ef2d0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00510230();
|
|
|
|
FUN_005101c0(*(undefined4 *)(param_1 + 0x14),1,0,0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef2f0 at 0x004EF2F0 (size: 29) ---
|
|
|
|
|
|
void FUN_004ef2f0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
|
|
|
|
uVar1 = FUN_004220b0(param_1,0x19);
|
|
|
|
FUN_00415430(uVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef310 at 0x004EF310 (size: 219) ---
|
|
|
|
|
|
int __fastcall FUN_004ef310(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
*(undefined4 *)(param_1 + 4) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 8) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x3c) = DAT_00841ccc;
|
|
|
|
*(undefined4 *)(param_1 + 0x40) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x48) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x4c) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x54) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x58) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x5c) = 0;
|
|
|
|
local_4 = param_1;
|
|
|
|
puVar1 = (undefined4 *)FUN_00415640(&local_4,0x10000006,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = *puVar1;
|
|
|
|
puVar1 = (undefined4 *)FUN_00415640(&local_4,0x10000005,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = *puVar1;
|
|
|
|
puVar1 = (undefined4 *)FUN_00415640(&local_4,0x10000007,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x18) = *puVar1;
|
|
|
|
puVar1 = (undefined4 *)FUN_00415640(&local_4,0x10000008,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x1c) = *puVar1;
|
|
|
|
puVar1 = (undefined4 *)FUN_00415640(&local_4,0x10000009,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = *puVar1;
|
|
|
|
puVar1 = (undefined4 *)FUN_00415640(&local_4,0x1000000a,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = *puVar1;
|
|
|
|
puVar1 = (undefined4 *)FUN_00415640(&local_4,0x1000000b,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = *puVar1;
|
|
|
|
*(undefined4 *)(param_1 + 0x44) = DAT_0081d1a8;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef3f0 at 0x004EF3F0 (size: 616) ---
|
|
|
|
|
|
void __thiscall FUN_004ef3f0(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
int *piVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
undefined4 *local_4;
|
|
|
|
|
|
|
|
param_1[1] = param_2;
|
|
|
|
local_4 = param_1;
|
|
|
|
uVar2 = FUN_0055e1d0();
|
|
|
|
*param_1 = uVar2;
|
|
|
|
iVar3 = FUN_0055e1e0();
|
|
|
|
FUN_005c6a70(¶m_2);
|
|
|
|
iVar1 = DAT_00841ccc;
|
|
|
|
piVar4 = (int *)FUN_005c6a70(&local_4);
|
|
|
|
if (*piVar4 == iVar1) {
|
|
|
|
param_2 = DAT_0081d1a8;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(iVar3 + 0xd4);
|
|
|
|
uVar2 = FUN_00514470(param_2,0,1);
|
|
|
|
param_1[2] = uVar2;
|
|
|
|
if (iVar1 == 0xc) {
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000011,7);
|
|
|
|
param_1[4] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000011,7);
|
|
|
|
param_1[5] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000012,7);
|
|
|
|
param_1[6] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000012,7);
|
|
|
|
param_1[7] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000012,7);
|
|
|
|
param_1[8] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000012,7);
|
|
|
|
param_1[9] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000012,7);
|
|
|
|
param_1[10] = *puVar5;
|
|
|
|
}
|
|
|
|
else if (iVar1 == 0xd) {
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000013,7);
|
|
|
|
param_1[4] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000013,7);
|
|
|
|
param_1[5] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000014,7);
|
|
|
|
param_1[6] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000014,7);
|
|
|
|
param_1[7] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000014,7);
|
|
|
|
param_1[8] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000014,7);
|
|
|
|
param_1[9] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000014,7);
|
|
|
|
param_1[10] = *puVar5;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000006,7);
|
|
|
|
param_1[4] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000005,7);
|
|
|
|
param_1[5] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000007,7);
|
|
|
|
param_1[6] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000008,7);
|
|
|
|
param_1[7] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x10000009,7);
|
|
|
|
param_1[8] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x1000000a,7);
|
|
|
|
param_1[9] = *puVar5;
|
|
|
|
puVar5 = (undefined4 *)FUN_00415640(&local_4,0x1000000b,7);
|
|
|
|
param_1[10] = *puVar5;
|
|
|
|
}
|
|
|
|
FUN_004523d0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004ef660 at 0x004EF660 (size: 2055) ---
|
|
|
|
|
|
void __fastcall FUN_004ef660(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
int *piVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
int iVar6;
|
|
|
|
int iVar7;
|
|
|
|
undefined4 *puVar8;
|
|
|
|
undefined1 *puVar9;
|
|
|
|
undefined4 local_214;
|
|
|
|
undefined4 uStack_210;
|
|
|
|
int local_20c;
|
|
|
|
undefined4 uStack_208;
|
|
|
|
undefined4 uStack_204;
|
|
|
|
undefined4 uStack_200;
|
|
|
|
undefined4 uStack_1fc;
|
|
|
|
undefined4 uStack_1f8;
|
|
|
|
undefined1 auStack_1f4 [4];
|
|
|
|
undefined4 uStack_1f0;
|
|
|
|
undefined1 local_1a8 [24];
|
|
|
|
undefined1 auStack_190 [56];
|
|
|
|
undefined4 uStack_158;
|
|
|
|
undefined4 uStack_154;
|
|
|
|
int iStack_150;
|
|
|
|
int iStack_144;
|
|
|
|
int iStack_138;
|
|
|
|
int iStack_12c;
|
|
|
|
int iStack_120;
|
|
|
|
int iStack_114;
|
|
|
|
int iStack_108;
|
|
|
|
int iStack_fc;
|
|
|
|
int iStack_f0;
|
|
|
|
int iStack_e4;
|
|
|
|
undefined1 local_c8 [16];
|
|
|
|
int iStack_b8;
|
|
|
|
|
|
|
|
local_20c = 0;
|
|
|
|
iVar1 = FUN_0055e1e0();
|
|
|
|
if ((*(int *)(iVar1 + 0xd4) != 0) && (*(int *)(iVar1 + 0xd8) != 0)) {
|
|
|
|
FUN_005c3380(local_c8,*(int *)(iVar1 + 0xd4));
|
|
|
|
FUN_005c2b30(local_1a8,*(undefined4 *)(iVar1 + 0xd8));
|
|
|
|
FUN_005c6a70(&local_20c);
|
|
|
|
if (*(int *)(param_1 + 0x3c) != DAT_00841ccc) {
|
|
|
|
local_20c = *(int *)(param_1 + 0x3c);
|
|
|
|
}
|
|
|
|
if (local_20c == DAT_00841ccc) {
|
|
|
|
local_20c = DAT_0081d1a8;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x44) != local_20c) {
|
|
|
|
FUN_004536e0(*(undefined4 *)(param_1 + 8));
|
|
|
|
*(int *)(param_1 + 0x44) = local_20c;
|
|
|
|
if (*(undefined4 **)(param_1 + 8) != (undefined4 *)0x0) {
|
|
|
|
(**(code **)**(undefined4 **)(param_1 + 8))(1);
|
|
|
|
}
|
|
|
|
uVar2 = FUN_00514470(*(undefined4 *)(param_1 + 0x44),0,1);
|
|
|
|
*(undefined4 *)(param_1 + 8) = uVar2;
|
|
|
|
FUN_004557f0(uVar2);
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0xd4) == 0xc) {
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000011,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000011,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000012,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x18) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000012,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x1c) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000012,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000012,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000012,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = *puVar3;
|
|
|
|
}
|
|
|
|
else if (*(int *)(iVar1 + 0xd4) == 0xd) {
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000013,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000013,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000014,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x18) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000014,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x1c) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000014,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000014,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000014,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = *puVar3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000006,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000005,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000007,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x18) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000008,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x1c) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x10000009,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x1000000a,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = *puVar3;
|
|
|
|
puVar3 = (undefined4 *)FUN_00415640(&local_214,0x1000000b,7);
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = *puVar3;
|
|
|
|
}
|
|
|
|
FUN_00454490();
|
|
|
|
uStack_200 = 0x3e99999a;
|
|
|
|
uStack_1fc = 0x3ff33333;
|
|
|
|
uStack_1f8 = 0x3f266666;
|
|
|
|
FUN_0046be40(1,0x40000000,&uStack_200);
|
|
|
|
FUN_00514c60(*(undefined4 *)(param_1 + 0x40),1);
|
|
|
|
*(undefined1 *)(*(int *)(param_1 + 8) + 0x2c) = 1;
|
|
|
|
if ((*(int *)(param_1 + 0x38) != iStack_b8) &&
|
|
|
|
(*(undefined4 **)(param_1 + 0xc) != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)**(undefined4 **)(param_1 + 0xc))(1);
|
|
|
|
*(undefined4 *)(param_1 + 0xc) = 0;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x38) = iStack_b8;
|
|
|
|
if (iStack_b8 != DAT_00841ccc) {
|
|
|
|
uVar2 = FUN_00514470(iStack_b8,0,1);
|
|
|
|
*(undefined4 *)(param_1 + 0xc) = uVar2;
|
|
|
|
FUN_004557f0(uVar2);
|
|
|
|
}
|
|
|
|
FUN_005ac9c0();
|
|
|
|
uStack_1f0 = uStack_158;
|
|
|
|
FUN_005ad150(auStack_190);
|
|
|
|
if (*(int *)(iVar1 + 0xf0) != -1) {
|
|
|
|
FUN_005ad150(*(int *)(iVar1 + 0xf0) * 0x3c + 0x10 + iStack_144);
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0xf4) != -1) {
|
|
|
|
uVar2 = FUN_004220b0(*(undefined4 *)(*(int *)(iVar1 + 0xf4) * 0x10 + 8 + iStack_108),0x19);
|
|
|
|
piVar4 = (int *)FUN_00415430(uVar2);
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
uVar2 = FUN_005c48d0(*(undefined4 *)(iVar1 + 0xf8));
|
|
|
|
local_214 = *(undefined4 *)(iVar1 + 0x158);
|
|
|
|
uStack_210 = *(undefined4 *)(iVar1 + 0x15c);
|
|
|
|
puVar9 = auStack_1f4;
|
|
|
|
uVar5 = FUN_005a9340(local_214,uStack_210);
|
|
|
|
FUN_005a89b0(*(undefined4 *)(param_1 + 0x44),uVar2,uVar5,puVar9);
|
|
|
|
(**(code **)(*piVar4 + 0x14))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0x104) != -1) {
|
|
|
|
uVar2 = FUN_004220b0(*(undefined4 *)(*(int *)(iVar1 + 0x104) * 0x10 + 8 + iStack_f0),0x19);
|
|
|
|
piVar4 = (int *)FUN_00415430(uVar2);
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
uVar2 = FUN_005c4930(*(undefined4 *)(iVar1 + 0x108));
|
|
|
|
local_214 = *(undefined4 *)(iVar1 + 0x168);
|
|
|
|
uStack_210 = *(undefined4 *)(iVar1 + 0x16c);
|
|
|
|
puVar9 = auStack_1f4;
|
|
|
|
uVar5 = FUN_005a9340(local_214,uStack_210);
|
|
|
|
FUN_005a89b0(*(undefined4 *)(param_1 + 0x44),uVar2,uVar5,puVar9);
|
|
|
|
(**(code **)(*piVar4 + 0x14))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0xfc) != -1) {
|
|
|
|
uVar2 = FUN_004220b0(*(undefined4 *)(*(int *)(iVar1 + 0xfc) * 0x10 + 8 + iStack_fc),0x19);
|
|
|
|
piVar4 = (int *)FUN_00415430(uVar2);
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
uVar2 = FUN_005c4900(*(undefined4 *)(iVar1 + 0x100));
|
|
|
|
local_214 = *(undefined4 *)(iVar1 + 0x160);
|
|
|
|
uStack_210 = *(undefined4 *)(iVar1 + 0x164);
|
|
|
|
puVar9 = auStack_1f4;
|
|
|
|
uVar5 = FUN_005a9340(local_214,uStack_210);
|
|
|
|
FUN_005a89b0(*(undefined4 *)(param_1 + 0x44),uVar2,uVar5,puVar9);
|
|
|
|
(**(code **)(*piVar4 + 0x14))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0x10c) != -1) {
|
|
|
|
uVar2 = FUN_004220b0(*(undefined4 *)(*(int *)(iVar1 + 0x10c) * 0x10 + 8 + iStack_e4),0x19);
|
|
|
|
piVar4 = (int *)FUN_00415430(uVar2);
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
uVar2 = FUN_005c4960(*(undefined4 *)(iVar1 + 0x110));
|
|
|
|
local_214 = *(undefined4 *)(iVar1 + 0x170);
|
|
|
|
uStack_210 = *(undefined4 *)(iVar1 + 0x174);
|
|
|
|
puVar9 = auStack_1f4;
|
|
|
|
uVar5 = FUN_005a9340(local_214,uStack_210);
|
|
|
|
FUN_005a89b0(*(undefined4 *)(param_1 + 0x44),uVar2,uVar5,puVar9);
|
|
|
|
(**(code **)(*piVar4 + 0x14))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0xdc) != -1) {
|
|
|
|
iVar6 = *(int *)(iVar1 + 0xdc) * 100 + iStack_12c;
|
|
|
|
iVar7 = FUN_005c6280();
|
|
|
|
if (iVar7 == 0) {
|
|
|
|
iVar6 = iVar6 + 0xc;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar6 = iVar6 + 0x38;
|
|
|
|
}
|
|
|
|
FUN_005ad150(iVar6);
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0xe0) != -1) {
|
|
|
|
FUN_005ad150(*(int *)(iVar1 + 0xe0) * 0x34 + 8 + iStack_120);
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0xe4) != -1) {
|
|
|
|
FUN_005ad150(*(int *)(iVar1 + 0xe4) * 0x34 + 8 + iStack_114);
|
|
|
|
}
|
|
|
|
uVar2 = FUN_004220b0(uStack_154,0x18);
|
|
|
|
piVar4 = (int *)FUN_00415430(uVar2);
|
|
|
|
puVar3 = (undefined4 *)FUN_005df0f5(0x18);
|
|
|
|
if (puVar3 == (undefined4 *)0x0) {
|
|
|
|
puVar3 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uStack_204 = *(undefined4 *)(iVar1 + 0x14c);
|
|
|
|
uStack_208 = *(undefined4 *)(iVar1 + 0x148);
|
|
|
|
puVar8 = (undefined4 *)FUN_005ad620(&local_214,uStack_208,uStack_204);
|
|
|
|
puVar3[1] = *puVar8;
|
|
|
|
*puVar3 = &PTR_LAB_007c4524;
|
|
|
|
puVar3[2] = 0;
|
|
|
|
puVar3[3] = 0xc0;
|
|
|
|
puVar3[4] = 0;
|
|
|
|
puVar3[5] = 0;
|
|
|
|
}
|
|
|
|
FUN_005aca20(puVar3);
|
|
|
|
(**(code **)(*piVar4 + 0x14))();
|
|
|
|
if (*(int *)(iVar1 + 0xe8) != -1) {
|
|
|
|
uVar2 = FUN_004220b0(*(undefined4 *)(iStack_150 + *(int *)(iVar1 + 0xe8) * 4),0x18);
|
|
|
|
piVar4 = (int *)FUN_00415430(uVar2);
|
|
|
|
puVar3 = (undefined4 *)FUN_005df0f5(0x18);
|
|
|
|
if (puVar3 == (undefined4 *)0x0) {
|
|
|
|
puVar3 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uStack_204 = *(undefined4 *)(iVar1 + 0x154);
|
|
|
|
uStack_208 = *(undefined4 *)(iVar1 + 0x150);
|
|
|
|
puVar8 = (undefined4 *)FUN_005ad620(&local_214,uStack_208,uStack_204);
|
|
|
|
puVar3[1] = *puVar8;
|
|
|
|
*puVar3 = &PTR_LAB_007c4524;
|
|
|
|
puVar3[2] = 0xc0;
|
|
|
|
puVar3[3] = 0x40;
|
|
|
|
puVar3[4] = 0;
|
|
|
|
puVar3[5] = 0;
|
|
|
|
}
|
|
|
|
FUN_005aca20(puVar3);
|
|
|
|
(**(code **)(*piVar4 + 0x14))();
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar1 + 0xec) != -1) {
|
|
|
|
uVar2 = *(undefined4 *)(iStack_138 + *(int *)(iVar1 + 0xec) * 4);
|
|
|
|
puVar3 = (undefined4 *)FUN_005df0f5(0x18);
|
|
|
|
if (puVar3 == (undefined4 *)0x0) {
|
|
|
|
puVar3 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar3 = &PTR_LAB_007c4524;
|
|
|
|
puVar3[1] = uVar2;
|
|
|
|
puVar3[2] = 0x100;
|
|
|
|
puVar3[3] = 0x40;
|
|
|
|
puVar3[4] = 0;
|
|
|
|
puVar3[5] = 0;
|
|
|
|
}
|
|
|
|
FUN_005aca20(puVar3);
|
|
|
|
}
|
|
|
|
FUN_00510480(auStack_1f4);
|
|
|
|
FUN_004557f0(*(undefined4 *)(param_1 + 8));
|
|
|
|
FUN_0046be10(param_1 + 0x48,param_1 + 0x54);
|
|
|
|
FUN_005aca00();
|
|
|
|
FUN_0047daa0();
|
|
|
|
FUN_0047e300();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004efe70 at 0x004EFE70 (size: 93) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004efe70(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_007c4720;
|
|
|
|
*(undefined1 *)(param_1 + 1) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 5) = 0;
|
|
|
|
param_1[2] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 3) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0xd) = 0;
|
|
|
|
param_1[4] = 0;
|
|
|
|
param_1[5] = 0;
|
|
|
|
param_1[6] = 0;
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 4))(0x186a4,param_1);
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd217,param_1);
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd216,param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004efed0 at 0x004EFED0 (size: 40) ---
|
|
|
|
|
|
void __fastcall FUN_004efed0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_007c4720;
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0xc))(param_1);
|
|
|
|
}
|
|
|
|
*param_1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eff00 at 0x004EFF00 (size: 77) ---
|
|
|
|
|
|
void __thiscall FUN_004eff00(int *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(param_2,param_3);
|
|
|
|
(**(code **)(*param_1 + 0x2b0))(local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004eff50 at 0x004EFF50 (size: 77) ---
|
|
|
|
|
|
void __thiscall FUN_004eff50(int *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(param_2,param_3);
|
|
|
|
(**(code **)(*param_1 + 0x2b4))(local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004effa0 at 0x004EFFA0 (size: 14) ---
|
|
|
|
|
|
void __thiscall FUN_004effa0(int param_1,undefined1 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined1 *)(param_1 + 4) = 1;
|
|
|
|
*(undefined1 *)(param_1 + 5) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004effc0 at 0x004EFFC0 (size: 10) ---
|
|
|
|
|
|
void __thiscall FUN_004effc0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x18) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004effd0 at 0x004EFFD0 (size: 61) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004effd0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_007c4720;
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0xc))(param_1);
|
|
|
|
}
|
|
|
|
*param_1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|