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>
13095 lines
343 KiB
C
13095 lines
343 KiB
C
// Decompiled from acclient.exe — chunk 0x00450000
|
|
// Ghidra 12.0.4 + pyghidra headless
|
|
|
|
// --- FUN_00450120 at 0x00450120 (size: 607) ---
|
|
|
|
|
|
void __thiscall FUN_00450120(int param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
char cVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
ushort *puVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
uint *puVar7;
|
|
|
|
uint *puVar8;
|
|
|
|
uint uVar9;
|
|
|
|
uint uVar10;
|
|
|
|
ushort uVar11;
|
|
|
|
undefined4 *puVar12;
|
|
|
|
uint local_4;
|
|
|
|
|
|
|
|
iVar1 = param_2;
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar3 = (undefined4 *)FUN_0040acf0(4);
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 4) = *puVar3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar3 = *(undefined4 *)(param_1 + 4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar11 = *(ushort *)(param_1 + 8);
|
|
|
|
FUN_0040ad10(2);
|
|
|
|
puVar4 = (ushort *)FUN_0040acf0(2);
|
|
|
|
if (puVar4 != (ushort *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) == 0) {
|
|
|
|
uVar11 = *puVar4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar4 = uVar11;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(byte *)(param_2 + 4) & 5) == 0) {
|
|
|
|
*(uint *)(param_1 + 8) = (uint)uVar11;
|
|
|
|
}
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar3 = (undefined4 *)FUN_0040acf0(4);
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0xc) = *puVar3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar3 = *(undefined4 *)(param_1 + 0xc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((~*(byte *)(param_2 + 4) & 1) != 0) {
|
|
|
|
uVar5 = thunk_FUN_005df0f5(*(undefined4 *)(param_1 + 0xc));
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = uVar5;
|
|
|
|
}
|
|
|
|
uVar10 = *(uint *)(param_1 + 0xc);
|
|
|
|
puVar3 = *(undefined4 **)(param_1 + 0x10);
|
|
|
|
puVar6 = (undefined4 *)FUN_0040acf0(uVar10);
|
|
|
|
if (puVar6 != (undefined4 *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) == 0) {
|
|
|
|
puVar12 = puVar6;
|
|
|
|
for (uVar9 = uVar10 >> 2; uVar9 != 0; uVar9 = uVar9 - 1) {
|
|
|
|
*puVar3 = *puVar12;
|
|
|
|
puVar12 = puVar12 + 1;
|
|
|
|
puVar3 = puVar3 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puVar12 = puVar3;
|
|
|
|
puVar3 = puVar6;
|
|
|
|
for (uVar9 = uVar10 >> 2; uVar9 != 0; uVar9 = uVar9 - 1) {
|
|
|
|
*puVar3 = *puVar12;
|
|
|
|
puVar12 = puVar12 + 1;
|
|
|
|
puVar3 = puVar3 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (uVar10 = uVar10 & 3; uVar10 != 0; uVar10 = uVar10 - 1) {
|
|
|
|
*(undefined1 *)puVar3 = *(undefined1 *)puVar12;
|
|
|
|
puVar12 = (undefined4 *)((int)puVar12 + 1);
|
|
|
|
puVar3 = (undefined4 *)((int)puVar3 + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local_4 = *(uint *)(param_1 + 0x24);
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar7 = (uint *)FUN_0040acf0(4);
|
|
|
|
if (puVar7 != (uint *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) == 0) {
|
|
|
|
local_4 = *puVar7;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar7 = local_4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00422250(param_1 + 0x18,param_2);
|
|
|
|
param_2 = 0;
|
|
|
|
if (local_4 != 0) {
|
|
|
|
do {
|
|
|
|
if ((~*(byte *)(iVar1 + 4) & 1) == 0) {
|
|
|
|
puVar7 = *(uint **)(*(int *)(param_1 + 0x1c) + param_2 * 4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puVar7 = (uint *)FUN_005df0f5(0x10);
|
|
|
|
}
|
|
|
|
uVar11 = (ushort)*puVar7;
|
|
|
|
FUN_0040ad10(2);
|
|
|
|
puVar4 = (ushort *)FUN_0040acf0(2);
|
|
|
|
if (puVar4 != (ushort *)0x0) {
|
|
|
|
if ((*(byte *)(iVar1 + 4) & 1) == 0) {
|
|
|
|
uVar11 = *puVar4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar4 = uVar11;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(byte *)(iVar1 + 4) & 5) == 0) {
|
|
|
|
*puVar7 = (uint)uVar11;
|
|
|
|
}
|
|
|
|
uVar11 = (ushort)puVar7[1];
|
|
|
|
FUN_0040ad10(2);
|
|
|
|
puVar4 = (ushort *)FUN_0040acf0(2);
|
|
|
|
if (puVar4 != (ushort *)0x0) {
|
|
|
|
if ((*(byte *)(iVar1 + 4) & 1) == 0) {
|
|
|
|
uVar11 = *puVar4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar4 = uVar11;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(byte *)(iVar1 + 4) & 5) == 0) {
|
|
|
|
puVar7[1] = (uint)uVar11;
|
|
|
|
}
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar8 = (uint *)FUN_0040acf0(4);
|
|
|
|
if (puVar8 != (uint *)0x0) {
|
|
|
|
if ((*(byte *)(iVar1 + 4) & 1) == 0) {
|
|
|
|
puVar7[2] = *puVar8;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar8 = puVar7[2];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar8 = (uint *)FUN_0040acf0(4);
|
|
|
|
if (puVar8 != (uint *)0x0) {
|
|
|
|
if ((*(byte *)(iVar1 + 4) & 1) == 0) {
|
|
|
|
puVar7[3] = *puVar8;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar8 = puVar7[3];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((~*(byte *)(iVar1 + 4) & 1) != 0) {
|
|
|
|
uVar10 = *(uint *)(param_1 + 0x20) & 0x7fffffff;
|
|
|
|
if (uVar10 <= *(uint *)(param_1 + 0x24)) {
|
|
|
|
uVar5 = FUN_00453850(uVar10 + 1);
|
|
|
|
cVar2 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar2 == '\0') goto LAB_00450362;
|
|
|
|
}
|
|
|
|
*(uint **)(*(int *)(param_1 + 0x1c) + *(int *)(param_1 + 0x24) * 4) = puVar7;
|
|
|
|
*(int *)(param_1 + 0x24) = *(int *)(param_1 + 0x24) + 1;
|
|
|
|
}
|
|
|
|
LAB_00450362:
|
|
|
|
param_2 = param_2 + 1;
|
|
|
|
} while (param_2 < local_4);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450380 at 0x00450380 (size: 110) ---
|
|
|
|
|
|
uint FUN_00450380(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
LONG *pLVar3;
|
|
|
|
|
|
|
|
puVar2 = (undefined4 *)FUN_005df0f5(0x2c);
|
|
|
|
if (puVar2 != (undefined4 *)0x0) {
|
|
|
|
pLVar3 = (LONG *)(PTR_DAT_00818344 + -0x10);
|
|
|
|
*puVar2 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement(pLVar3);
|
|
|
|
pLVar3 = (LONG *)(PTR_DAT_00818344 + -0x10);
|
|
|
|
puVar2[5] = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement(pLVar3);
|
|
|
|
puVar2[7] = 0;
|
|
|
|
puVar2[8] = 0;
|
|
|
|
puVar2[9] = 0;
|
|
|
|
FUN_0044fa50();
|
|
|
|
cVar1 = FUN_0044ff90(puVar2);
|
|
|
|
return -(uint)(cVar1 != '\0') & (uint)puVar2;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004503f0 at 0x004503F0 (size: 44) ---
|
|
|
|
|
|
void __thiscall FUN_004503f0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
|
|
|
|
uVar1 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x38) != 0) {
|
|
|
|
do {
|
|
|
|
FUN_0044fee0(param_2);
|
|
|
|
uVar1 = uVar1 + 1;
|
|
|
|
} while (uVar1 < *(uint *)(param_1 + 0x38));
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450420 at 0x00450420 (size: 47) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_00450420(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
char cVar2;
|
|
|
|
uint uVar3;
|
|
|
|
undefined1 uVar4;
|
|
|
|
uint uVar5;
|
|
|
|
|
|
|
|
uVar5 = 0;
|
|
|
|
uVar4 = 1;
|
|
|
|
uVar3 = 0;
|
|
|
|
uVar1 = 1;
|
|
|
|
if (*(int *)(param_1 + 0x38) != 0) {
|
|
|
|
do {
|
|
|
|
uVar4 = uVar1;
|
|
|
|
cVar2 = FUN_0044fd50();
|
|
|
|
if (cVar2 == '\0') {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
uVar3 = *(uint *)(param_1 + 0x38);
|
|
|
|
uVar5 = uVar5 + 1;
|
|
|
|
uVar1 = uVar4;
|
|
|
|
} while (uVar5 < uVar3);
|
|
|
|
}
|
|
|
|
return CONCAT31((int3)(uVar3 >> 8),uVar4);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450450 at 0x00450450 (size: 47) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_00450450(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
char cVar2;
|
|
|
|
uint uVar3;
|
|
|
|
undefined1 uVar4;
|
|
|
|
uint uVar5;
|
|
|
|
|
|
|
|
uVar5 = 0;
|
|
|
|
uVar4 = 1;
|
|
|
|
uVar3 = 0;
|
|
|
|
uVar1 = 1;
|
|
|
|
if (*(int *)(param_1 + 0x38) != 0) {
|
|
|
|
do {
|
|
|
|
uVar4 = uVar1;
|
|
|
|
cVar2 = FUN_0044fa30();
|
|
|
|
if (cVar2 == '\0') {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
uVar3 = *(uint *)(param_1 + 0x38);
|
|
|
|
uVar5 = uVar5 + 1;
|
|
|
|
uVar1 = uVar4;
|
|
|
|
} while (uVar5 < uVar3);
|
|
|
|
}
|
|
|
|
return CONCAT31((int3)(uVar3 >> 8),uVar4);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450480 at 0x00450480 (size: 35) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_00450480(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00415460(DAT_0083d2b8);
|
|
|
|
*param_1 = &PTR_LAB_0079c458;
|
|
|
|
param_1[0xc] = 0;
|
|
|
|
param_1[0xd] = 0;
|
|
|
|
param_1[0xe] = 0;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004504c0 at 0x004504C0 (size: 180) ---
|
|
|
|
|
|
void __fastcall FUN_004504c0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
void *pvVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x38) != 0) {
|
|
|
|
do {
|
|
|
|
FUN_0044fa30();
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x38));
|
|
|
|
}
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x38) != 0) {
|
|
|
|
do {
|
|
|
|
pvVar1 = *(void **)(*(int *)(param_1 + 0x30) + uVar3 * 4);
|
|
|
|
if (pvVar1 != (void *)0x0) {
|
|
|
|
FUN_0044ff20();
|
|
|
|
operator_delete(pvVar1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x30) + uVar3 * 4) = 0;
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x38));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x38) = 0;
|
|
|
|
if ((*(uint *)(param_1 + 0x34) & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__(*(void **)(param_1 + 0x30));
|
|
|
|
*(undefined4 *)(param_1 + 0x30) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x34) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x30) != 0) {
|
|
|
|
iVar2 = (*(uint *)(param_1 + 0x34) & 0x7fffffff) - 1;
|
|
|
|
while (-1 < iVar2) {
|
|
|
|
iVar2 = iVar2 + -1;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x30) + 4 + iVar2 * 4) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004505f0 at 0x004505F0 (size: 49) ---
|
|
|
|
|
|
void __fastcall FUN_004505f0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_0079c458;
|
|
|
|
FUN_004504c0();
|
|
|
|
if ((param_1[0xd] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0xc]);
|
|
|
|
}
|
|
|
|
FUN_004154b0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450630 at 0x00450630 (size: 70) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00450630(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_0079c458;
|
|
|
|
FUN_004504c0();
|
|
|
|
if ((param_1[0xd] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0xc]);
|
|
|
|
}
|
|
|
|
FUN_004154b0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004507e0 at 0x004507E0 (size: 58) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004507e0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_0079c4b4;
|
|
|
|
FUN_005b2250();
|
|
|
|
FUN_005b2250();
|
|
|
|
param_1[1] = 0;
|
|
|
|
FUN_005b1fe0();
|
|
|
|
FUN_005b1fe0();
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004508b0 at 0x004508B0 (size: 39) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004508b0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_0079c4dc;
|
|
|
|
FUN_005b2250();
|
|
|
|
param_1[1] = 0;
|
|
|
|
FUN_005b1fe0();
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450950 at 0x00450950 (size: 69) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_00450950(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_0079c508;
|
|
|
|
FUN_005b2250();
|
|
|
|
FUN_005b2250();
|
|
|
|
param_1[1] = 0;
|
|
|
|
FUN_005b1fe0();
|
|
|
|
param_1[3] = 0x3f800000;
|
|
|
|
FUN_005b1fe0();
|
|
|
|
param_1[0xe] = 0x3f800000;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004509a0 at 0x004509A0 (size: 147) ---
|
|
|
|
|
|
void __thiscall FUN_004509a0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 4) = *(undefined4 *)(param_2 + 4);
|
|
|
|
*(undefined4 *)(param_1 + 8) = *(undefined4 *)(param_2 + 8);
|
|
|
|
*(undefined4 *)(param_1 + 0xc) = *(undefined4 *)(param_2 + 0xc);
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = *(undefined4 *)(param_2 + 0x10);
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = *(undefined4 *)(param_2 + 0x14);
|
|
|
|
*(undefined4 *)(param_1 + 0x18) = *(undefined4 *)(param_2 + 0x18);
|
|
|
|
*(undefined4 *)(param_1 + 0x1c) = *(undefined4 *)(param_2 + 0x1c);
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = *(undefined4 *)(param_2 + 0x20);
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = *(undefined4 *)(param_2 + 0x24);
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = *(undefined4 *)(param_2 + 0x28);
|
|
|
|
*(undefined4 *)(param_1 + 0x2c) = *(undefined4 *)(param_2 + 0x2c);
|
|
|
|
*(undefined4 *)(param_1 + 0x30) = *(undefined4 *)(param_2 + 0x30);
|
|
|
|
*(undefined4 *)(param_1 + 0x34) = *(undefined4 *)(param_2 + 0x34);
|
|
|
|
*(undefined4 *)(param_1 + 0x38) = *(undefined4 *)(param_2 + 0x38);
|
|
|
|
*(undefined4 *)(param_1 + 0x3c) = *(undefined4 *)(param_2 + 0x3c);
|
|
|
|
*(undefined4 *)(param_1 + 0x40) = *(undefined4 *)(param_2 + 0x40);
|
|
|
|
*(undefined4 *)(param_1 + 0x44) = *(undefined4 *)(param_2 + 0x44);
|
|
|
|
*(undefined4 *)(param_1 + 0x48) = *(undefined4 *)(param_2 + 0x48);
|
|
|
|
*(undefined4 *)(param_1 + 0x4c) = *(undefined4 *)(param_2 + 0x4c);
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = *(undefined4 *)(param_2 + 0x50);
|
|
|
|
*(undefined4 *)(param_1 + 0x54) = *(undefined4 *)(param_2 + 0x54);
|
|
|
|
*(undefined4 *)(param_1 + 0x58) = *(undefined4 *)(param_2 + 0x58);
|
|
|
|
*(undefined4 *)(param_1 + 0x5c) = *(undefined4 *)(param_2 + 0x5c);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450ac0 at 0x00450AC0 (size: 67) ---
|
|
|
|
|
|
void __fastcall FUN_00450ac0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079c530;
|
|
|
|
param_1[1] = 0;
|
|
|
|
param_1[5] = 0;
|
|
|
|
param_1[4] = 0;
|
|
|
|
param_1[3] = 0;
|
|
|
|
param_1[9] = 0;
|
|
|
|
param_1[8] = 0;
|
|
|
|
param_1[6] = 0;
|
|
|
|
param_1[0xd] = 0;
|
|
|
|
param_1[0xb] = 0;
|
|
|
|
param_1[10] = 0;
|
|
|
|
param_1[0x10] = 0;
|
|
|
|
param_1[0xf] = 0;
|
|
|
|
param_1[0xe] = 0;
|
|
|
|
param_1[0x11] = 0x3f800000;
|
|
|
|
param_1[0xc] = 0x3f800000;
|
|
|
|
param_1[7] = 0x3f800000;
|
|
|
|
param_1[2] = 0x3f800000;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450cb0 at 0x00450CB0 (size: 109) ---
|
|
|
|
|
|
void __thiscall FUN_00450cb0(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
undefined1 *puVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
|
|
|
|
uVar1 = (**(code **)*param_1)();
|
|
|
|
FUN_0040ad10(1);
|
|
|
|
puVar2 = (undefined1 *)FUN_0040acf0(1);
|
|
|
|
if ((puVar2 != (undefined1 *)0x0) && ((*(byte *)(param_2 + 4) & 1) != 0)) {
|
|
|
|
*puVar2 = uVar1;
|
|
|
|
}
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar3 = (undefined4 *)FUN_0040acf0(4);
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) == 0) {
|
|
|
|
param_1[1] = *puVar3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar3 = param_1[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_005b22c0(param_2);
|
|
|
|
FUN_005b22c0(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00450f70 at 0x00450F70 (size: 113) ---
|
|
|
|
|
|
void __thiscall FUN_00450f70(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
undefined1 *puVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
|
|
|
|
uVar1 = (**(code **)*param_1)();
|
|
|
|
FUN_0040ad10(1);
|
|
|
|
puVar2 = (undefined1 *)FUN_0040acf0(1);
|
|
|
|
if ((puVar2 != (undefined1 *)0x0) && ((*(byte *)(param_2 + 4) & 1) != 0)) {
|
|
|
|
*puVar2 = uVar1;
|
|
|
|
}
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar3 = (undefined4 *)FUN_0040acf0(4);
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) != 0) {
|
|
|
|
*puVar3 = param_1[1];
|
|
|
|
FUN_005b22c0(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
param_1[1] = *puVar3;
|
|
|
|
}
|
|
|
|
FUN_005b22c0(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451410 at 0x00451410 (size: 143) ---
|
|
|
|
|
|
void __thiscall FUN_00451410(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
undefined1 *puVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
uVar1 = (**(code **)*param_1)();
|
|
|
|
FUN_0040ad10(1);
|
|
|
|
puVar2 = (undefined1 *)FUN_0040acf0(1);
|
|
|
|
if ((puVar2 != (undefined1 *)0x0) && ((*(byte *)(param_2 + 4) & 1) != 0)) {
|
|
|
|
*puVar2 = uVar1;
|
|
|
|
}
|
|
|
|
FUN_0040ad10(4);
|
|
|
|
puVar3 = (undefined4 *)FUN_0040acf0(4);
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) == 0) {
|
|
|
|
param_1[1] = *puVar3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar3 = param_1[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
param_1 = param_1 + 2;
|
|
|
|
FUN_0040ad10(0x40);
|
|
|
|
puVar3 = (undefined4 *)FUN_0040acf0(0x40);
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
iVar4 = 0x10;
|
|
|
|
if ((*(byte *)(param_2 + 4) & 1) != 0) {
|
|
|
|
for (; iVar4 != 0; iVar4 = iVar4 + -1) {
|
|
|
|
*puVar3 = *param_1;
|
|
|
|
param_1 = param_1 + 1;
|
|
|
|
puVar3 = puVar3 + 1;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
for (; iVar4 != 0; iVar4 = iVar4 + -1) {
|
|
|
|
*param_1 = *puVar3;
|
|
|
|
puVar3 = puVar3 + 1;
|
|
|
|
param_1 = param_1 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451a60 at 0x00451A60 (size: 114) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x00451aa0) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x00451a7b) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x00451ac0) */
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00451a60(float *param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = (float)(param_2 >> 0x10 & 0xff) * _DAT_00799208;
|
|
|
|
param_1[1] = (float)(param_2 >> 8 & 0xff) * _DAT_00799208;
|
|
|
|
param_1[2] = (float)(param_2 & 0xff) * _DAT_00799208;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451ae0 at 0x00451AE0 (size: 33) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00451ae0(float *param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
param_2 = _DAT_007938b0 / param_2;
|
|
|
|
*param_1 = param_2 * *param_1;
|
|
|
|
param_1[1] = param_2 * param_1[1];
|
|
|
|
param_1[2] = param_2 * param_1[2];
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451b10 at 0x00451B10 (size: 49) ---
|
|
|
|
|
|
bool FUN_00451b10(ushort param_1,ushort param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
|
|
|
|
uVar1 = (int)((uint)param_2 - (uint)param_1) >> 0x1f;
|
|
|
|
if ((int)(((uint)param_2 - (uint)param_1 ^ uVar1) - uVar1) < 0x8000) {
|
|
|
|
return param_1 < param_2;
|
|
|
|
}
|
|
|
|
return param_2 < param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451b50 at 0x00451B50 (size: 83) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00451b50(int param_1,int param_2,ushort param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
bool bVar3;
|
|
|
|
|
|
|
|
uVar1 = *(ushort *)(param_1 + 0x164 + param_2 * 2);
|
|
|
|
uVar2 = (int)((uint)param_3 - (uint)uVar1) >> 0x1f;
|
|
|
|
if ((int)(((uint)param_3 - (uint)uVar1 ^ uVar2) - uVar2) < 0x8000) {
|
|
|
|
bVar3 = uVar1 < param_3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar3 = param_3 < uVar1;
|
|
|
|
}
|
|
|
|
if (bVar3) {
|
|
|
|
*(ushort *)(param_1 + 0x164 + param_2 * 2) = param_3;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451bc0 at 0x00451BC0 (size: 11) ---
|
|
|
|
|
|
void __fastcall FUN_00451bc0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
/* WARNING: Could not recover jumptable at 0x00451bc8. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x34))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451bd0 at 0x00451BD0 (size: 11) ---
|
|
|
|
|
|
void FUN_00451bd0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00509da0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451be0 at 0x00451BE0 (size: 10) ---
|
|
|
|
|
|
void FUN_00451be0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
DAT_00844bfc = param_1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451bf0 at 0x00451BF0 (size: 11) ---
|
|
|
|
|
|
undefined4 FUN_00451bf0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
return CONCAT31((int3)((uint)DAT_00844c00 >> 8),DAT_00844c00 != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451c00 at 0x00451C00 (size: 23) ---
|
|
|
|
|
|
void __thiscall FUN_00451c00(int param_1,undefined1 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined1 *)(param_1 + 200) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0xc4) = param_3;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451c20 at 0x00451C20 (size: 57) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
float10 __fastcall FUN_00451c20(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
float10 fVar1;
|
|
|
|
|
|
|
|
if (*(char *)(param_1 + 200) != '\0') {
|
|
|
|
return (float10)*(float *)(param_1 + 0xc4);
|
|
|
|
}
|
|
|
|
fVar1 = (float10)fptan(((float10)*(float *)(param_1 + 0xc0) /
|
|
|
|
((float10)*(float *)(DAT_00870340 + 0xa8) - (float10)_DAT_007958cc)) *
|
|
|
|
(float10)_DAT_00799088);
|
|
|
|
return (float10)_DAT_007938c0 / fVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451c60 at 0x00451C60 (size: 29) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_00451c60(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((*(int *)(param_1 + 0xf8) != 0) && (*(int *)(param_1 + 0xdc) == 0)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451c80 at 0x00451C80 (size: 17) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_00451c80(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
|
|
|
|
uVar1 = *(undefined4 *)(param_1 + 0xe4);
|
|
|
|
*(undefined4 *)(param_1 + 0xe4) = 0;
|
|
|
|
return uVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451ca0 at 0x00451CA0 (size: 113) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 FUN_00451ca0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
DAT_0083da4c = param_1;
|
|
|
|
_DAT_0083da50 = param_2;
|
|
|
|
DAT_0083da44 = 0;
|
|
|
|
_DAT_00819618 = 0xffffffff;
|
|
|
|
uVar1 = param_1 - *(int *)(DAT_00870340 + 0x8c);
|
|
|
|
uVar2 = param_2 - *(int *)(DAT_00870340 + 0x90);
|
|
|
|
if ((uVar1 < *(uint *)(DAT_00870340 + 0x94)) && (uVar2 < *(uint *)(DAT_00870340 + 0x98))) {
|
|
|
|
FUN_0054c360(uVar1,uVar2,1);
|
|
|
|
DAT_00844c00 = 0;
|
|
|
|
DAT_0083da48 = 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_0054c3a0();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451d20 at 0x00451D20 (size: 6) ---
|
|
|
|
|
|
undefined4 FUN_00451d20(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
return DAT_0083da44;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451d30 at 0x00451D30 (size: 27) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void FUN_00451d30(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
DAT_0083da44 = param_1;
|
|
|
|
_DAT_00819618 = param_2;
|
|
|
|
FUN_006935e0(param_1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451d50 at 0x00451D50 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_00451d50(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x100) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451d60 at 0x00451D60 (size: 13) ---
|
|
|
|
|
|
void __thiscall FUN_00451d60(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0xfc) = param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451d70 at 0x00451D70 (size: 11) ---
|
|
|
|
|
|
void __fastcall FUN_00451d70(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0xd8) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451d80 at 0x00451D80 (size: 11) ---
|
|
|
|
|
|
void __fastcall FUN_00451d80(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0xd8) = 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451d90 at 0x00451D90 (size: 74) ---
|
|
|
|
|
|
undefined4 FUN_00451d90(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_0054be30(param_1,param_2,param_3,param_4);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
if (DAT_0083da48 != '\0') {
|
|
|
|
FUN_00451ca0(DAT_0083da4c,DAT_0083da4c);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451de0 at 0x00451DE0 (size: 10) ---
|
|
|
|
|
|
void FUN_00451de0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
DAT_008452f4 = param_1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451df0 at 0x00451DF0 (size: 22) ---
|
|
|
|
|
|
void FUN_00451df0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_005a3fe0(param_1 != 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451e10 at 0x00451E10 (size: 17) ---
|
|
|
|
|
|
void FUN_00451e10(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
DAT_0081dbf9 = param_1 != 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451e30 at 0x00451E30 (size: 35) ---
|
|
|
|
|
|
uint __thiscall FUN_00451e30(int param_1,undefined1 param_2,undefined1 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint in_EAX;
|
|
|
|
uint uVar1;
|
|
|
|
|
|
|
|
uVar1 = in_EAX & 0xffffff00;
|
|
|
|
if (*(int *)(param_1 + 0xb0) != 0) {
|
|
|
|
uVar1 = FUN_005075a0(param_2,param_3,param_3,0);
|
|
|
|
}
|
|
|
|
return uVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451e60 at 0x00451E60 (size: 49) ---
|
|
|
|
|
|
bool FUN_00451e60(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 *param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
|
|
|
|
*param_3 = 0;
|
|
|
|
*param_4 = 0;
|
|
|
|
cVar1 = FUN_00455d50(param_1,param_2,param_3,param_4);
|
|
|
|
return cVar1 != '\0';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451ea0 at 0x00451EA0 (size: 19) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00451ea0(int param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(float *)(param_1 + 0xc0) = param_2 * (float)_DAT_0079c6b0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451ec0 at 0x00451EC0 (size: 31) ---
|
|
|
|
|
|
bool __fastcall FUN_00451ec0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0xf8) != 0) {
|
|
|
|
return (*(uint *)(*(int *)(param_1 + 0xf8) + 0x4c) & 0xffff) < 0x100;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00451f80 at 0x00451F80 (size: 120) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00451f80(int param_1,int param_2,undefined4 param_3,ushort param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
bool bVar3;
|
|
|
|
|
|
|
|
uVar1 = *(ushort *)(param_2 + 0x172);
|
|
|
|
uVar2 = (int)((uint)param_4 - (uint)uVar1) >> 0x1f;
|
|
|
|
if ((int)(((uint)param_4 - (uint)uVar1 ^ uVar2) - uVar2) < 0x8000) {
|
|
|
|
bVar3 = uVar1 < param_4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar3 = param_4 < uVar1;
|
|
|
|
}
|
|
|
|
if (bVar3) {
|
|
|
|
*(ushort *)(param_2 + 0x172) = param_4;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x24))(param_2,param_3);
|
|
|
|
if (param_2 == *(int *)(param_1 + 0xf8)) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x30))(param_3);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452000 at 0x00452000 (size: 83) ---
|
|
|
|
|
|
int FUN_00452000(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_00508890(param_2);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_00509da0(param_2,param_1);
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
iVar1 = FUN_0050ff30(param_3,param_4);
|
|
|
|
return (-(uint)(iVar1 != 0) & 0xfffffffe) + 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452060 at 0x00452060 (size: 78) ---
|
|
|
|
|
|
int FUN_00452060(undefined4 param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_00508890(param_2);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_00509da0(param_2,param_1);
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
iVar1 = FUN_00511800(param_3);
|
|
|
|
return (-(uint)(iVar1 != 0) & 0xfffffffe) + 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004520b0 at 0x004520B0 (size: 83) ---
|
|
|
|
|
|
int FUN_004520b0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_00508890(param_2);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_00509da0(param_2,param_1);
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
iVar1 = FUN_00513d60(param_3,param_4);
|
|
|
|
return (-(uint)(iVar1 != 0) & 0xfffffffe) + 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452110 at 0x00452110 (size: 123) ---
|
|
|
|
|
|
void __thiscall FUN_00452110(int param_1,int param_2,undefined4 param_3,ushort param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
bool bVar3;
|
|
|
|
|
|
|
|
uVar1 = *(ushort *)(param_2 + 0x168);
|
|
|
|
uVar2 = (int)((uint)param_4 - (uint)uVar1) >> 0x1f;
|
|
|
|
if ((int)(((uint)param_4 - (uint)uVar1 ^ uVar2) - uVar2) < 0x8000) {
|
|
|
|
bVar3 = uVar1 < param_4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar3 = param_4 < uVar1;
|
|
|
|
}
|
|
|
|
if (bVar3) {
|
|
|
|
*(ushort *)(param_2 + 0x168) = param_4;
|
|
|
|
FUN_005158d0(param_3,1);
|
|
|
|
if (((param_2 == *(int *)(param_1 + 0xf8)) && (*(int *)(param_1 + 0xe0) != 0)) &&
|
|
|
|
((*(uint *)(param_2 + 0xa8) & 0x4000) == 0)) {
|
|
|
|
*(undefined4 *)(param_1 + 0xe0) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452190 at 0x00452190 (size: 104) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00452190(int param_1,undefined4 param_2,ushort param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
bool bVar3;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xf8) != 0) {
|
|
|
|
uVar1 = *(ushort *)(*(int *)(param_1 + 0xf8) + 0x16c);
|
|
|
|
uVar2 = (int)((uint)uVar1 - (uint)param_3) >> 0x1f;
|
|
|
|
if ((int)(((uint)uVar1 - (uint)param_3 ^ uVar2) - uVar2) < 0x8000) {
|
|
|
|
bVar3 = param_3 < uVar1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar3 = uVar1 < param_3;
|
|
|
|
}
|
|
|
|
if (!bVar3) {
|
|
|
|
*(undefined4 *)(param_1 + 0xdc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xe4) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xe0) = 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452200 at 0x00452200 (size: 119) ---
|
|
|
|
|
|
void __thiscall
|
|
|
|
FUN_00452200(int param_1,int param_2,undefined4 param_3,undefined4 param_4,ushort param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
bool bVar4;
|
|
|
|
|
|
|
|
uVar1 = *(ushort *)(param_2 + 0x16a);
|
|
|
|
uVar3 = (int)((uint)param_5 - (uint)uVar1) >> 0x1f;
|
|
|
|
if ((int)(((uint)param_5 - (uint)uVar1 ^ uVar3) - uVar3) < 0x8000) {
|
|
|
|
bVar4 = uVar1 < param_5;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar4 = param_5 < uVar1;
|
|
|
|
}
|
|
|
|
if (bVar4) {
|
|
|
|
*(ushort *)(param_2 + 0x16a) = param_5;
|
|
|
|
if ((param_2 == *(int *)(param_1 + 0xf8)) &&
|
|
|
|
(iVar2 = (**(code **)(**(int **)(param_1 + 0xb8) + 0x60))(), iVar2 == 0)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_00511ec0(param_3,1);
|
|
|
|
FUN_005101a0(param_4,1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452280 at 0x00452280 (size: 80) ---
|
|
|
|
|
|
void FUN_00452280(int param_1,ushort param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
bool bVar3;
|
|
|
|
|
|
|
|
uVar1 = *(ushort *)(param_1 + 0x164);
|
|
|
|
uVar2 = (int)((uint)param_2 - (uint)uVar1) >> 0x1f;
|
|
|
|
if ((int)(((uint)param_2 - (uint)uVar1 ^ uVar2) - uVar2) < 0x8000) {
|
|
|
|
bVar3 = uVar1 < param_2;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar3 = param_2 < uVar1;
|
|
|
|
}
|
|
|
|
if (bVar3) {
|
|
|
|
*(ushort *)(param_1 + 0x164) = param_2;
|
|
|
|
FUN_00513f70();
|
|
|
|
FUN_005160a0();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004522d0 at 0x004522D0 (size: 142) ---
|
|
|
|
|
|
void __thiscall
|
|
|
|
FUN_004522d0(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5,
|
|
|
|
ushort param_6)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
uint uVar3;
|
|
|
|
bool bVar4;
|
|
|
|
|
|
|
|
uVar1 = *(ushort *)(param_2 + 0x164);
|
|
|
|
uVar3 = (int)((uint)param_6 - (uint)uVar1) >> 0x1f;
|
|
|
|
if ((int)(((uint)param_6 - (uint)uVar1 ^ uVar3) - uVar3) < 0x8000) {
|
|
|
|
bVar4 = uVar1 < param_6;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar4 = param_6 < uVar1;
|
|
|
|
}
|
|
|
|
if (bVar4) {
|
|
|
|
*(ushort *)(param_2 + 0x164) = param_6;
|
|
|
|
if ((*(int *)(param_2 + 0x40) == 0) && (*(int *)(param_3 + 8) != *(int *)(param_1 + 0xf4))) {
|
|
|
|
piVar2 = (int *)FUN_005088e0(*(int *)(param_3 + 8));
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00516590(param_3,param_4);
|
|
|
|
FUN_00511e50(param_5,1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452360 at 0x00452360 (size: 57) ---
|
|
|
|
|
|
bool __fastcall FUN_00452360(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_005df0f5(0x148);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar1 = FUN_0052ce50();
|
|
|
|
*(int *)(param_1 + 0x18) = iVar1;
|
|
|
|
return iVar1 != 0;
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x18) = 0;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004523a0 at 0x004523A0 (size: 26) ---
|
|
|
|
|
|
void __thiscall FUN_004523a0(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = *param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x54) = param_2[1];
|
|
|
|
*(undefined4 *)(param_1 + 0x58) = param_2[2];
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004523c0 at 0x004523C0 (size: 5) ---
|
|
|
|
|
|
void __fastcall FUN_004523c0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined1 *)(param_1 + 0x6c) = 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004523d0 at 0x004523D0 (size: 5) ---
|
|
|
|
|
|
void __fastcall FUN_004523d0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined1 *)(param_1 + 0x6d) = 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004523e0 at 0x004523E0 (size: 45) ---
|
|
|
|
|
|
float10 FUN_004523e0(float param_1,float param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_3 < param_1) {
|
|
|
|
return (float10)param_3;
|
|
|
|
}
|
|
|
|
if (param_1 < param_2) {
|
|
|
|
return (float10)param_2;
|
|
|
|
}
|
|
|
|
return (float10)param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452410 at 0x00452410 (size: 33) ---
|
|
|
|
|
|
float10 __fastcall FUN_00452410(float *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
return SQRT((float10)param_1[2] * (float10)param_1[2] +
|
|
|
|
(float10)param_1[1] * (float10)param_1[1] + (float10)*param_1 * (float10)*param_1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452440 at 0x00452440 (size: 81) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00452440(float *param_1,float *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
|
|
|
|
fVar2 = _DAT_007938b0 /
|
|
|
|
SQRT(param_1[2] * param_1[2] + param_1[1] * param_1[1] + *param_1 * *param_1);
|
|
|
|
fVar1 = *param_1;
|
|
|
|
*param_1 = fVar2 * fVar1;
|
|
|
|
param_1[1] = fVar2 * param_1[1];
|
|
|
|
param_1[2] = fVar2 * param_1[2];
|
|
|
|
*param_2 = fVar2 * fVar1;
|
|
|
|
param_2[1] = param_1[1];
|
|
|
|
param_2[2] = param_1[2];
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004524a0 at 0x004524A0 (size: 82) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __fastcall FUN_004524a0(float *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
|
|
|
|
fVar1 = SQRT(param_1[2] * param_1[2] + param_1[1] * param_1[1] + *param_1 * *param_1);
|
|
|
|
if (fVar1 < _DAT_0079c6ac) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
fVar1 = _DAT_007938b0 / fVar1;
|
|
|
|
*param_1 = fVar1 * *param_1;
|
|
|
|
param_1[1] = fVar1 * param_1[1];
|
|
|
|
param_1[2] = fVar1 * param_1[2];
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452500 at 0x00452500 (size: 35) ---
|
|
|
|
|
|
void __thiscall FUN_00452500(float *param_1,float *param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
|
|
|
|
fVar1 = param_1[2];
|
|
|
|
fVar2 = param_3[2];
|
|
|
|
fVar3 = param_1[1];
|
|
|
|
fVar4 = param_3[1];
|
|
|
|
*param_2 = *param_1 - *param_3;
|
|
|
|
param_2[1] = fVar3 - fVar4;
|
|
|
|
param_2[2] = fVar1 - fVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452530 at 0x00452530 (size: 82) ---
|
|
|
|
|
|
void __thiscall FUN_00452530(int param_1,float *param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
float fVar10;
|
|
|
|
float fVar11;
|
|
|
|
float fVar12;
|
|
|
|
|
|
|
|
fVar1 = *(float *)(param_1 + 0x30);
|
|
|
|
fVar2 = param_3[2];
|
|
|
|
fVar3 = *(float *)(param_1 + 0x18);
|
|
|
|
fVar4 = *param_3;
|
|
|
|
fVar5 = *(float *)(param_1 + 0x24);
|
|
|
|
fVar6 = param_3[1];
|
|
|
|
fVar7 = *(float *)(param_1 + 0x2c);
|
|
|
|
fVar8 = param_3[2];
|
|
|
|
fVar9 = *(float *)(param_1 + 0x14);
|
|
|
|
fVar10 = *param_3;
|
|
|
|
fVar11 = *(float *)(param_1 + 0x20);
|
|
|
|
fVar12 = param_3[1];
|
|
|
|
*param_2 = *(float *)(param_1 + 0x1c) * param_3[1] +
|
|
|
|
*(float *)(param_1 + 0x10) * *param_3 + *(float *)(param_1 + 0x28) * param_3[2];
|
|
|
|
param_2[1] = fVar11 * fVar12 + fVar9 * fVar10 + fVar7 * fVar8;
|
|
|
|
param_2[2] = fVar5 * fVar6 + fVar3 * fVar4 + fVar1 * fVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452590 at 0x00452590 (size: 82) ---
|
|
|
|
|
|
void __thiscall FUN_00452590(int param_1,float *param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
float fVar10;
|
|
|
|
float fVar11;
|
|
|
|
float fVar12;
|
|
|
|
|
|
|
|
fVar1 = *(float *)(param_1 + 0x30);
|
|
|
|
fVar2 = param_3[2];
|
|
|
|
fVar3 = *(float *)(param_1 + 0x28);
|
|
|
|
fVar4 = *param_3;
|
|
|
|
fVar5 = *(float *)(param_1 + 0x2c);
|
|
|
|
fVar6 = param_3[1];
|
|
|
|
fVar7 = *(float *)(param_1 + 0x24);
|
|
|
|
fVar8 = param_3[2];
|
|
|
|
fVar9 = *(float *)(param_1 + 0x1c);
|
|
|
|
fVar10 = *param_3;
|
|
|
|
fVar11 = *(float *)(param_1 + 0x20);
|
|
|
|
fVar12 = param_3[1];
|
|
|
|
*param_2 = *(float *)(param_1 + 0x14) * param_3[1] +
|
|
|
|
*(float *)(param_1 + 0x10) * *param_3 + *(float *)(param_1 + 0x18) * param_3[2];
|
|
|
|
param_2[1] = fVar11 * fVar12 + fVar9 * fVar10 + fVar7 * fVar8;
|
|
|
|
param_2[2] = fVar5 * fVar6 + fVar3 * fVar4 + fVar1 * fVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004525f0 at 0x004525F0 (size: 98) ---
|
|
|
|
|
|
void __thiscall FUN_004525f0(int param_1,float *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
local_c = *(float *)(param_1 + 0x1c) * param_2[1] +
|
|
|
|
*(float *)(param_1 + 0x10) * *param_2 + *(float *)(param_1 + 0x28) * param_2[2];
|
|
|
|
local_8 = *(float *)(param_1 + 0x20) * param_2[1] +
|
|
|
|
*(float *)(param_1 + 0x14) * *param_2 + *(float *)(param_1 + 0x2c) * param_2[2];
|
|
|
|
local_4 = *(float *)(param_1 + 0x24) * param_2[1] +
|
|
|
|
*(float *)(param_1 + 0x18) * *param_2 + *(float *)(param_1 + 0x30) * param_2[2];
|
|
|
|
FUN_005364e0(&local_c);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452660 at 0x00452660 (size: 91) ---
|
|
|
|
|
|
void __thiscall FUN_00452660(int param_1,float *param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
float fVar10;
|
|
|
|
float fVar11;
|
|
|
|
float fVar12;
|
|
|
|
float fVar13;
|
|
|
|
float fVar14;
|
|
|
|
|
|
|
|
fVar1 = *(float *)(param_1 + 0x30);
|
|
|
|
fVar2 = param_3[2];
|
|
|
|
fVar3 = *(float *)(param_1 + 0x18);
|
|
|
|
fVar4 = *param_3;
|
|
|
|
fVar5 = *(float *)(param_1 + 0x24);
|
|
|
|
fVar6 = param_3[1];
|
|
|
|
fVar7 = *(float *)(param_1 + 0x3c);
|
|
|
|
fVar8 = *(float *)(param_1 + 0x2c);
|
|
|
|
fVar9 = param_3[2];
|
|
|
|
fVar10 = *(float *)(param_1 + 0x14);
|
|
|
|
fVar11 = *param_3;
|
|
|
|
fVar12 = *(float *)(param_1 + 0x20);
|
|
|
|
fVar13 = param_3[1];
|
|
|
|
fVar14 = *(float *)(param_1 + 0x38);
|
|
|
|
*param_2 = *(float *)(param_1 + 0x1c) * param_3[1] +
|
|
|
|
*(float *)(param_1 + 0x10) * *param_3 + *(float *)(param_1 + 0x28) * param_3[2] +
|
|
|
|
*(float *)(param_1 + 0x34);
|
|
|
|
param_2[1] = fVar12 * fVar13 + fVar10 * fVar11 + fVar8 * fVar9 + fVar14;
|
|
|
|
param_2[2] = fVar5 * fVar6 + fVar3 * fVar4 + fVar1 * fVar2 + fVar7;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004526c0 at 0x004526C0 (size: 125) ---
|
|
|
|
|
|
void __thiscall FUN_004526c0(int param_1,float *param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
|
|
|
|
fVar7 = *param_3 - *(float *)(param_1 + 0x34);
|
|
|
|
fVar8 = param_3[1] - *(float *)(param_1 + 0x38);
|
|
|
|
fVar9 = param_3[2] - *(float *)(param_1 + 0x3c);
|
|
|
|
fVar1 = *(float *)(param_1 + 0x30);
|
|
|
|
fVar2 = *(float *)(param_1 + 0x28);
|
|
|
|
fVar3 = *(float *)(param_1 + 0x2c);
|
|
|
|
fVar4 = *(float *)(param_1 + 0x24);
|
|
|
|
fVar5 = *(float *)(param_1 + 0x1c);
|
|
|
|
fVar6 = *(float *)(param_1 + 0x20);
|
|
|
|
*param_2 = fVar8 * *(float *)(param_1 + 0x14) +
|
|
|
|
fVar7 * *(float *)(param_1 + 0x10) + fVar9 * *(float *)(param_1 + 0x18);
|
|
|
|
param_2[1] = fVar8 * fVar6 + fVar7 * fVar5 + fVar9 * fVar4;
|
|
|
|
param_2[2] = fVar8 * fVar3 + fVar7 * fVar2 + fVar9 * fVar1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452740 at 0x00452740 (size: 114) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00452740(int *param_1,float *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
if ((*param_1 == 1) || (*param_1 == 2)) {
|
|
|
|
local_c = *param_2;
|
|
|
|
local_8 = param_2[1];
|
|
|
|
fVar1 = param_2[2];
|
|
|
|
local_4 = _DAT_007938b0 / SQRT(local_8 * local_8 + fVar1 * fVar1 + local_c * local_c);
|
|
|
|
local_c = local_4 * local_c;
|
|
|
|
local_8 = local_4 * local_8;
|
|
|
|
local_4 = local_4 * fVar1;
|
|
|
|
FUN_00536af0(&local_c);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004527c0 at 0x004527C0 (size: 35) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004527c0(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_00797910;
|
|
|
|
param_1[1] = param_2;
|
|
|
|
FUN_00425f10(param_3);
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004527f0 at 0x004527F0 (size: 60) ---
|
|
|
|
|
|
uint __fastcall FUN_004527f0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint local_10;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
local_c = *(undefined4 *)(param_1 + 0x3c);
|
|
|
|
local_8 = *(undefined4 *)(param_1 + 0x40);
|
|
|
|
local_4 = *(undefined4 *)(param_1 + 0x44);
|
|
|
|
local_10 = *(uint *)(param_1 + 4);
|
|
|
|
iVar1 = FUN_005aac70(&local_10,&local_c);
|
|
|
|
return -(uint)(iVar1 != 0) & local_10;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452830 at 0x00452830 (size: 194) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00452830(int param_1,undefined4 param_2,int param_3,float *param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
float fVar10;
|
|
|
|
float fVar11;
|
|
|
|
float fVar12;
|
|
|
|
float fVar13;
|
|
|
|
float fVar14;
|
|
|
|
float fVar15;
|
|
|
|
float fVar16;
|
|
|
|
float fVar17;
|
|
|
|
float fVar18;
|
|
|
|
float fVar19;
|
|
|
|
float fVar20;
|
|
|
|
float fVar21;
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
fVar1 = *(float *)(param_3 + 0x24);
|
|
|
|
fVar2 = param_4[1];
|
|
|
|
fVar3 = *(float *)(param_3 + 0x18);
|
|
|
|
fVar4 = *param_4;
|
|
|
|
fVar5 = *(float *)(param_3 + 0x30);
|
|
|
|
fVar6 = param_4[2];
|
|
|
|
fVar7 = *(float *)(param_3 + 0x3c);
|
|
|
|
fVar8 = *(float *)(param_3 + 0x28);
|
|
|
|
fVar9 = param_4[1];
|
|
|
|
fVar10 = *(float *)(param_3 + 0x1c);
|
|
|
|
fVar11 = *param_4;
|
|
|
|
fVar12 = *(float *)(param_3 + 0x34);
|
|
|
|
fVar13 = param_4[2];
|
|
|
|
fVar14 = *(float *)(param_3 + 0x40);
|
|
|
|
fVar15 = *(float *)(param_3 + 0x2c);
|
|
|
|
fVar16 = param_4[1];
|
|
|
|
fVar17 = *(float *)(param_3 + 0x20);
|
|
|
|
fVar18 = *param_4;
|
|
|
|
fVar19 = *(float *)(param_3 + 0x38);
|
|
|
|
fVar20 = param_4[2];
|
|
|
|
fVar21 = *(float *)(param_3 + 0x44);
|
|
|
|
FUN_0043e7d0(&local_c,*(undefined4 *)(param_1 + 4),*(undefined4 *)(param_3 + 4));
|
|
|
|
local_c = local_c + fVar5 * fVar6 + fVar3 * fVar4 + fVar1 * fVar2 + fVar7;
|
|
|
|
local_8 = local_8 + fVar12 * fVar13 + fVar10 * fVar11 + fVar8 * fVar9 + fVar14;
|
|
|
|
local_4 = local_4 + fVar19 * fVar20 + fVar17 * fVar18 + fVar15 * fVar16 + fVar21;
|
|
|
|
FUN_004526c0(param_2,&local_c);
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452900 at 0x00452900 (size: 71) ---
|
|
|
|
|
|
void __thiscall FUN_00452900(int param_1,float *param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
FUN_0043e7d0(&local_c,*(undefined4 *)(param_1 + 4),*(undefined4 *)(param_3 + 4));
|
|
|
|
fVar1 = *(float *)(param_3 + 0x40);
|
|
|
|
fVar2 = *(float *)(param_3 + 0x44);
|
|
|
|
*param_2 = local_c + *(float *)(param_3 + 0x3c);
|
|
|
|
param_2[1] = local_8 + fVar1;
|
|
|
|
param_2[2] = local_4 + fVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452950 at 0x00452950 (size: 4) ---
|
|
|
|
|
|
int __fastcall FUN_00452950(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
return param_1 + 0x50;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452960 at 0x00452960 (size: 78) ---
|
|
|
|
|
|
void __fastcall FUN_00452960(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
uVar2 = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x48) = 0;
|
|
|
|
if (*(int *)(param_1 + 0x4c) != 0) {
|
|
|
|
do {
|
|
|
|
(**(code **)**(undefined4 **)(*(int *)(param_1 + 0x50) + uVar2 * 4))();
|
|
|
|
iVar1 = *(int *)(*(int *)(*(int *)(param_1 + 0x50) + uVar2 * 4) + 0xc);
|
|
|
|
if ((*(int **)(iVar1 + 0x14) != (int *)0x0) && (*(int *)(iVar1 + 0x18) == 0)) {
|
|
|
|
(**(code **)(**(int **)(iVar1 + 0x14) + 0x14))();
|
|
|
|
*(undefined4 *)(iVar1 + 0x14) = 0;
|
|
|
|
}
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
} while (uVar2 < *(uint *)(param_1 + 0x4c));
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004529b0 at 0x004529B0 (size: 33) ---
|
|
|
|
|
|
void __thiscall FUN_004529b0(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_2 = *(undefined4 *)(param_1 + 0x8c);
|
|
|
|
param_2[1] = *(undefined4 *)(param_1 + 0x90);
|
|
|
|
param_2[2] = *(undefined4 *)(param_1 + 0x94);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004529e0 at 0x004529E0 (size: 37) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004529e0(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_00797910;
|
|
|
|
param_1[1] = *(undefined4 *)(param_2 + 4);
|
|
|
|
FUN_00425f10(param_2 + 8);
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452a10 at 0x00452A10 (size: 623) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_00452a10(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
bool bVar2;
|
|
|
|
uint uVar3;
|
|
|
|
float fVar4;
|
|
|
|
undefined4 local_d0;
|
|
|
|
undefined4 local_cc;
|
|
|
|
undefined4 local_c8;
|
|
|
|
undefined4 local_c4;
|
|
|
|
undefined4 local_9c;
|
|
|
|
undefined4 local_98;
|
|
|
|
undefined4 local_94;
|
|
|
|
undefined **local_90;
|
|
|
|
undefined4 local_8c;
|
|
|
|
undefined **local_48;
|
|
|
|
undefined4 local_44;
|
|
|
|
|
|
|
|
puVar1 = (undefined4 *)(DAT_0083da58 + 0xbc);
|
|
|
|
if (*(int *)(DAT_0083da58 + 0xbc) == 0) {
|
|
|
|
*(undefined4 *)(DAT_0083da58 + 0xd4) = DAT_008452f4;
|
|
|
|
DAT_008452f4 = 1;
|
|
|
|
*puVar1 = 1;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x18) == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
bVar2 = false;
|
|
|
|
if ((*(char *)(param_1 + 0x6d) != '\0') && (DAT_0081ffa0 < 2)) {
|
|
|
|
FUN_005a0d60(0xbfb33333);
|
|
|
|
bVar2 = true;
|
|
|
|
}
|
|
|
|
local_48 = &PTR_LAB_00797910;
|
|
|
|
local_44 = DAT_008200f4;
|
|
|
|
FUN_00425f10(&DAT_008200f8);
|
|
|
|
local_90 = &PTR_LAB_00797910;
|
|
|
|
local_8c = 0;
|
|
|
|
FUN_00425f10(param_1 + 0x1c);
|
|
|
|
FUN_00550fd0(&local_90);
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 8) != 0) {
|
|
|
|
do {
|
|
|
|
FUN_00515020();
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 8));
|
|
|
|
}
|
|
|
|
FUN_00550fd0(&local_48);
|
|
|
|
_DAT_008682b0 = *(undefined4 *)(param_1 + 0x5c);
|
|
|
|
_DAT_008682b4 = *(undefined4 *)(param_1 + 0x60);
|
|
|
|
_DAT_008682b8 = *(undefined4 *)(param_1 + 100);
|
|
|
|
FUN_0054e060(1);
|
|
|
|
DAT_008683b4 = 0;
|
|
|
|
DAT_0086b838 = 0;
|
|
|
|
FUN_0054e060(0);
|
|
|
|
if (*(char *)(param_1 + 0x6c) == '\0') {
|
|
|
|
fVar4 = *(float *)(param_1 + 0x68);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (*(char *)(DAT_0083da58 + 200) != '\0') {
|
|
|
|
FUN_0054be50(*(undefined4 *)(DAT_0083da58 + 0xc4));
|
|
|
|
goto LAB_00452b74;
|
|
|
|
}
|
|
|
|
fVar4 = *(float *)(DAT_0083da58 + 0xc0) / ((float)DAT_00870340[0x2a] - _DAT_007958cc);
|
|
|
|
}
|
|
|
|
FUN_0054bee0(fVar4);
|
|
|
|
LAB_00452b74:
|
|
|
|
local_d0 = 0x3f800000;
|
|
|
|
local_cc = 0;
|
|
|
|
local_c8 = 0;
|
|
|
|
local_c4 = 0;
|
|
|
|
local_9c = 0;
|
|
|
|
local_98 = 0;
|
|
|
|
local_94 = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x14) != 0) {
|
|
|
|
do {
|
|
|
|
FUN_0054dff0(*(undefined4 *)(*(int *)(param_1 + 0xc) + uVar3 * 4),0,&local_d0);
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x14));
|
|
|
|
}
|
|
|
|
FUN_0052c560();
|
|
|
|
if ((char)DAT_00870340[0x2b] != '\0') {
|
|
|
|
FUN_0054e830(param_1 + 0x1c);
|
|
|
|
FUN_0054fb60();
|
|
|
|
FUN_0054dd60(3,&local_d0,(DAT_00867338 - _DAT_0086733c) + -1);
|
|
|
|
(**(code **)(*DAT_00870340 + 100))(*(undefined4 *)(param_1 + 0x18));
|
|
|
|
FUN_0054c9e0();
|
|
|
|
FUN_0059e3f0(0);
|
|
|
|
}
|
|
|
|
if (bVar2) {
|
|
|
|
FUN_005a0d60(*(undefined4 *)(DAT_0086734c + 0x98));
|
|
|
|
}
|
|
|
|
FUN_0054e060(1);
|
|
|
|
DAT_008683b4 = 0;
|
|
|
|
DAT_0086b838 = 0;
|
|
|
|
FUN_0054e060(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452c80 at 0x00452C80 (size: 285) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00452c80(int param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
|
|
|
|
iVar1 = param_1 + 8;
|
|
|
|
*(undefined4 *)(param_1 + 0xc) = *(undefined4 *)(param_2 + 4);
|
|
|
|
FUN_00425f10(param_2 + 8);
|
|
|
|
if (param_3 != 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x5c) = *(undefined4 *)(param_2 + 4);
|
|
|
|
FUN_00425f10(param_2 + 8);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = 0;
|
|
|
|
_DAT_008196e0 = DAT_00819610;
|
|
|
|
DAT_0086b838 = 0;
|
|
|
|
_DAT_008196dc = DAT_0083dc10;
|
|
|
|
if (*(int *)(param_1 + 0xf8) == 0) {
|
|
|
|
if ((DAT_00819680 == 0) || (DAT_00819680 == 2)) {
|
|
|
|
_DAT_008196b8 = 0;
|
|
|
|
_DAT_008196bc = 0;
|
|
|
|
_DAT_008196c0 = 0;
|
|
|
|
}
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xc);
|
|
|
|
param_1 = param_1 + 0x10;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ((DAT_00819680 == 0) || (DAT_00819680 == 2)) {
|
|
|
|
_DAT_008196b8 = 0;
|
|
|
|
_DAT_008196bc = 0;
|
|
|
|
_DAT_008196c0 = 0x40000000;
|
|
|
|
}
|
|
|
|
uVar2 = *(undefined4 *)(*(int *)(param_1 + 0xf8) + 0x4c);
|
|
|
|
param_1 = *(int *)(param_1 + 0xf8) + 0x50;
|
|
|
|
}
|
|
|
|
FUN_0054e030(&DAT_00819680,uVar2,param_1);
|
|
|
|
thunk_FUN_0052e070();
|
|
|
|
FUN_00550fd0(iVar1);
|
|
|
|
FUN_00505690(iVar1);
|
|
|
|
FUN_0043e8e0(iVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452da0 at 0x00452DA0 (size: 49) ---
|
|
|
|
|
|
void __fastcall FUN_00452da0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined1 local_48 [72];
|
|
|
|
|
|
|
|
iVar1 = FUN_00456780(local_48,param_1 + 8);
|
|
|
|
*(undefined4 *)(param_1 + 0x5c) = *(undefined4 *)(iVar1 + 4);
|
|
|
|
FUN_00425f10(iVar1 + 8);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452de0 at 0x00452DE0 (size: 116) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00452de0(int param_1,int param_2,undefined4 *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
undefined4 local_18;
|
|
|
|
undefined4 local_14;
|
|
|
|
undefined4 local_10;
|
|
|
|
undefined1 local_c [12];
|
|
|
|
|
|
|
|
if (((*(int *)(param_1 + 0xf8) != 0) && (param_2 != 0)) && (*(int *)(param_2 + 0x90) != 0)) {
|
|
|
|
local_18 = 0;
|
|
|
|
local_14 = 0;
|
|
|
|
local_10 = 0;
|
|
|
|
puVar1 = (undefined4 *)FUN_00452830(local_c,param_2 + 0x48,&local_18);
|
|
|
|
*param_3 = *puVar1;
|
|
|
|
param_3[1] = puVar1[1];
|
|
|
|
param_3[2] = puVar1[2];
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00452e60 at 0x00452E60 (size: 590) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 FUN_00452e60(undefined4 param_1,undefined4 *param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
float *pfVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
float10 fVar6;
|
|
|
|
undefined1 local_48 [8];
|
|
|
|
float local_40;
|
|
|
|
float local_3c;
|
|
|
|
float local_38;
|
|
|
|
undefined1 local_34 [4];
|
|
|
|
undefined1 auStack_30 [8];
|
|
|
|
undefined1 local_28 [12];
|
|
|
|
undefined1 local_1c [12];
|
|
|
|
undefined4 local_10;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
iVar1 = FUN_00508890();
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
uVar5 = 0;
|
|
|
|
FUN_0054fb60();
|
|
|
|
local_40 = 1.0;
|
|
|
|
local_3c = 1.0;
|
|
|
|
local_38 = 1.0;
|
|
|
|
DAT_0081fec0 = 0x3f800000;
|
|
|
|
DAT_0081fec4 = 0x3f800000;
|
|
|
|
DAT_0081fec8 = 0x3f800000;
|
|
|
|
DAT_0081fc84 = 0x3f800000;
|
|
|
|
FUN_0054c9c0(3,iVar1 + 0x48);
|
|
|
|
iVar2 = FUN_0050f510(&local_10);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
local_38 = 0.1;
|
|
|
|
local_8 = 0x3dcccccd;
|
|
|
|
local_4 = 0x3dcccccd;
|
|
|
|
local_40 = 0.0;
|
|
|
|
local_3c = 0.0;
|
|
|
|
local_10 = 0;
|
|
|
|
local_c = 0;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_0054ce60(&local_10);
|
|
|
|
FUN_0050a140();
|
|
|
|
FUN_0050a140();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_0054c010(&local_10,local_34,local_28);
|
|
|
|
iVar3 = (**(code **)(*DAT_0086734c + 0x44))(local_34,local_48);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
iVar3 = (**(code **)(*DAT_0086734c + 0x44))(auStack_30,&stack0xffffffa8);
|
|
|
|
if ((iVar3 != 0) && (iVar2 != 0)) {
|
|
|
|
if ((0 < iVar2) && (iVar2 < 3)) {
|
|
|
|
uVar5 = FUN_005df4c4();
|
|
|
|
*param_2 = uVar5;
|
|
|
|
uVar5 = FUN_005df4c4();
|
|
|
|
param_2[2] = uVar5;
|
|
|
|
uVar5 = FUN_005df4c4();
|
|
|
|
param_2[1] = uVar5;
|
|
|
|
uVar5 = FUN_005df4c4();
|
|
|
|
param_2[3] = uVar5;
|
|
|
|
uVar5 = 1;
|
|
|
|
}
|
|
|
|
goto LAB_0045308c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pfVar4 = (float *)FUN_00452830(local_1c,iVar1 + 0x48,&local_10);
|
|
|
|
local_40 = *pfVar4;
|
|
|
|
local_3c = pfVar4[1];
|
|
|
|
local_38 = pfVar4[2];
|
|
|
|
iVar1 = FUN_004524a0();
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
if (local_3c <= DAT_00796344) {
|
|
|
|
fpatan((float10)_DAT_00795610,(float10)local_40);
|
|
|
|
fVar6 = (float10)_CIfmod();
|
|
|
|
*param_3 = (float)fVar6;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
fpatan((float10)local_38,(float10)local_40);
|
|
|
|
fVar6 = (float10)_CIfmod();
|
|
|
|
*param_3 = (float)fVar6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*param_3 = 0.0;
|
|
|
|
}
|
|
|
|
uVar5 = 2;
|
|
|
|
LAB_0045308c:
|
|
|
|
FUN_0054c9e0();
|
|
|
|
FUN_00695670();
|
|
|
|
FUN_00695670();
|
|
|
|
return uVar5;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004530e0 at 0x004530E0 (size: 114) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_004530e0(int param_1,float param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
*(float *)(param_1 + 0xcc) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0xd0) = param_3;
|
|
|
|
if (*(int *)(param_1 + 0xbc) == 0) {
|
|
|
|
FUN_00451a60(param_3);
|
|
|
|
_DAT_008682b0 = local_c * param_2;
|
|
|
|
_DAT_008682b4 = local_8 * param_2;
|
|
|
|
_DAT_008682b8 = local_4 * param_2;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453160 at 0x00453160 (size: 81) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_00453160(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0xbc) != 0) {
|
|
|
|
DAT_008452f4 = *(undefined4 *)(param_1 + 0xd4);
|
|
|
|
*(undefined4 *)(param_1 + 0xbc) = 0;
|
|
|
|
FUN_004530e0(*(undefined4 *)(param_1 + 0xcc),*(undefined4 *)(param_1 + 0xd0));
|
|
|
|
DAT_008683b4 = 0;
|
|
|
|
DAT_0086b838 = 0;
|
|
|
|
FUN_0052eb50();
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004531c0 at 0x004531C0 (size: 97) ---
|
|
|
|
|
|
undefined1 __thiscall FUN_004531c0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined1 unaff_BL;
|
|
|
|
undefined1 uVar3;
|
|
|
|
|
|
|
|
cVar1 = *(char *)(*(int *)(param_1 + 0xa4) + 0x18);
|
|
|
|
FUN_00455a50();
|
|
|
|
iVar2 = FUN_00505660(param_2);
|
|
|
|
uVar3 = iVar2 != 0;
|
|
|
|
if (((((bool)uVar3) && (cVar1 != '\0')) && (iVar2 = *(int *)(param_1 + 0xf8), iVar2 != 0)) &&
|
|
|
|
(*(int *)(iVar2 + 0x4c) != 0)) {
|
|
|
|
FUN_00455ad0(iVar2 + 0x48,1);
|
|
|
|
uVar3 = unaff_BL;
|
|
|
|
}
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453230 at 0x00453230 (size: 67) ---
|
|
|
|
|
|
char FUN_00453230(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
|
|
|
|
FUN_00455a50();
|
|
|
|
cVar1 = FUN_004ff370(param_1);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
FUN_00507710();
|
|
|
|
FUN_004531c0(DAT_0081ffb4);
|
|
|
|
}
|
|
|
|
return cVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453280 at 0x00453280 (size: 247) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_00453280(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
float fVar2;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xf8) != 0) {
|
|
|
|
FUN_00455fc0(*(undefined4 *)(*(int *)(param_1 + 0xf8) + 8),0xffffffff);
|
|
|
|
iVar1 = *(int *)(param_1 + 0xa0);
|
|
|
|
local_c = 0;
|
|
|
|
*(undefined4 *)(iVar1 + 0x18) = 0;
|
|
|
|
local_8 = 0;
|
|
|
|
*(undefined4 *)(iVar1 + 0x1c) = 0;
|
|
|
|
local_4 = 0x3fc00000;
|
|
|
|
*(undefined4 *)(iVar1 + 0x20) = 0x3fc00000;
|
|
|
|
FUN_00455fa0();
|
|
|
|
FUN_00455fb0(4);
|
|
|
|
local_c = 0;
|
|
|
|
local_8 = 0x3f800000;
|
|
|
|
local_4 = 0;
|
|
|
|
FUN_004564c0(&local_c);
|
|
|
|
FUN_00455fb0(1);
|
|
|
|
FUN_00455fb0(0x10);
|
|
|
|
iVar1 = *(int *)(param_1 + 0xa0);
|
|
|
|
fVar2 = _DAT_0079a1ec * *(float *)(iVar1 + 0x6c);
|
|
|
|
*(undefined4 *)(iVar1 + 0x48) = 0;
|
|
|
|
*(float *)(iVar1 + 0x4c) = fVar2;
|
|
|
|
*(float *)(iVar1 + 0x50) = *(float *)(iVar1 + 0x6c) * _DAT_0079c6dc;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004534c0 at 0x004534C0 (size: 164) ---
|
|
|
|
|
|
undefined4
|
|
|
|
FUN_004534c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int param_5
|
|
|
|
)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined2 uVar1;
|
|
|
|
ushort uVar2;
|
|
|
|
ushort uVar3;
|
|
|
|
int iVar4;
|
|
|
|
uint uVar5;
|
|
|
|
bool bVar6;
|
|
|
|
|
|
|
|
uVar1 = *(undefined2 *)(param_5 + 6);
|
|
|
|
uVar2 = *(ushort *)(param_5 + 4);
|
|
|
|
iVar4 = FUN_00508890(param_2);
|
|
|
|
if (iVar4 != 0) {
|
|
|
|
uVar3 = *(ushort *)(iVar4 + 0x174);
|
|
|
|
uVar5 = (int)((uint)uVar2 - (uint)uVar3) >> 0x1f;
|
|
|
|
if ((int)(((uint)uVar2 - (uint)uVar3 ^ uVar5) - uVar5) < 0x8000) {
|
|
|
|
bVar6 = uVar3 < uVar2;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar6 = uVar2 < uVar3;
|
|
|
|
}
|
|
|
|
if (!bVar6) {
|
|
|
|
if (uVar3 == uVar2) {
|
|
|
|
FUN_00452200(iVar4,param_3,param_4,uVar1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00509da0(param_2,param_1);
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004536e0 at 0x004536E0 (size: 110) ---
|
|
|
|
|
|
uint __thiscall FUN_004536e0(int *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *in_EAX;
|
|
|
|
uint uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
if (param_2 != 0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
in_EAX = (int *)0x0;
|
|
|
|
if (param_1[2] != 0) {
|
|
|
|
in_EAX = (int *)*param_1;
|
|
|
|
do {
|
|
|
|
if (*in_EAX == param_2) {
|
|
|
|
FUN_00513ef0(param_1[6]);
|
|
|
|
uVar1 = param_1[2];
|
|
|
|
if (uVar2 < uVar1) {
|
|
|
|
uVar1 = uVar1 - 1;
|
|
|
|
param_1[2] = uVar1;
|
|
|
|
if (uVar2 != uVar1) {
|
|
|
|
*(undefined4 *)(*param_1 + uVar2 * 4) = *(undefined4 *)(*param_1 + uVar1 * 4);
|
|
|
|
uVar1 = param_1[2];
|
|
|
|
*(undefined4 *)(*param_1 + uVar1 * 4) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return CONCAT31((int3)(uVar1 >> 8),1);
|
|
|
|
}
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
in_EAX = in_EAX + 1;
|
|
|
|
} while (uVar2 < (uint)param_1[2]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (uint)in_EAX & 0xffffff00;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453750 at 0x00453750 (size: 22) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00453750(int *param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((uint)param_1[2] <= param_2) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return *(undefined4 *)(*param_1 + param_2 * 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453770 at 0x00453770 (size: 35) ---
|
|
|
|
|
|
void FUN_00453770(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00536930(0,0,0,0);
|
|
|
|
FUN_004525f0(param_1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004537a0 at 0x004537A0 (size: 93) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void FUN_004537a0(float *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
float local_18;
|
|
|
|
float local_14;
|
|
|
|
float local_10;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
FUN_00536930(0,0,0,0);
|
|
|
|
local_18 = *param_1 * _DAT_0079c504;
|
|
|
|
local_14 = param_1[1] * _DAT_0079c504;
|
|
|
|
local_10 = param_1[2] * _DAT_0079c504;
|
|
|
|
local_4 = local_10;
|
|
|
|
FUN_004525f0(&local_18);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453800 at 0x00453800 (size: 66) ---
|
|
|
|
|
|
void __thiscall FUN_00453800(int *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
|
|
|
|
puVar1 = (undefined4 *)FUN_005df0f5(8);
|
|
|
|
if (puVar1 == (undefined4 *)0x0) {
|
|
|
|
puVar1 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar1 = param_2;
|
|
|
|
puVar1[1] = 0;
|
|
|
|
}
|
|
|
|
if (param_1[1] == 0) {
|
|
|
|
*param_1 = (int)puVar1;
|
|
|
|
param_1[1] = (int)puVar1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*(undefined4 **)(param_1[1] + 4) = puVar1;
|
|
|
|
param_1[1] = *(int *)(param_1[1] + 4);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453850 at 0x00453850 (size: 87) ---
|
|
|
|
|
|
uint FUN_00453850(uint param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
if (param_1 < 9) {
|
|
|
|
return 8;
|
|
|
|
}
|
|
|
|
if (param_1 < 0x4001) {
|
|
|
|
iVar1 = 0x1f;
|
|
|
|
if (param_1 != 0) {
|
|
|
|
for (; param_1 >> iVar1 == 0; iVar1 = iVar1 + -1) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar2 = 1 << ((byte)iVar1 & 0x1f);
|
|
|
|
if (uVar2 < param_1) {
|
|
|
|
param_1 = uVar2 * 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((param_1 & 0x3fff) != 0) {
|
|
|
|
return param_1 + (0x4000 - (param_1 & 0x3fff));
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004538b0 at 0x004538B0 (size: 35) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004538b0(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_2 = &PTR_LAB_00797910;
|
|
|
|
param_2[1] = *(undefined4 *)(param_1 + 0x1c);
|
|
|
|
FUN_00425f10(param_1 + 0x20);
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004538e0 at 0x004538E0 (size: 40) ---
|
|
|
|
|
|
void FUN_004538e0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_0054e370(&LAB_004530b0);
|
|
|
|
if (DAT_0083da58 != (undefined4 *)0x0) {
|
|
|
|
(**(code **)*DAT_0083da58)(1);
|
|
|
|
}
|
|
|
|
DAT_0083da58 = (undefined4 *)0x0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453910 at 0x00453910 (size: 158) ---
|
|
|
|
|
|
void __thiscall FUN_00453910(int param_1,int param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
float10 fVar2;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0xf8);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (param_2 == 0) {
|
|
|
|
fVar2 = (float10)FUN_0050f640();
|
|
|
|
if ((float10)param_3 <= fVar2) goto LAB_00453987;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0xdc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xe0) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xe4) = 0;
|
|
|
|
FUN_005159d0(1);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0x74))();
|
|
|
|
}
|
|
|
|
FUN_00452c80(iVar1 + 0x48,1);
|
|
|
|
FUN_00506d30(0);
|
|
|
|
LAB_00453987:
|
|
|
|
iVar1 = *(int *)(param_1 + 0xf8);
|
|
|
|
if ((iVar1 != 0) && (*(int *)(iVar1 + 0x4c) != 0)) {
|
|
|
|
FUN_00455ad0(iVar1 + 0x48,param_2);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004539b0 at 0x004539B0 (size: 43) ---
|
|
|
|
|
|
void __thiscall FUN_004539b0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0xf8) != 0) {
|
|
|
|
FUN_00516db0(param_2,1);
|
|
|
|
FUN_00453910(1,0x7f7fffff);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004539e0 at 0x004539E0 (size: 64) ---
|
|
|
|
|
|
void __thiscall FUN_004539e0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
float10 fVar1;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xf8) != 0) {
|
|
|
|
fVar1 = (float10)FUN_005aa560(param_2);
|
|
|
|
FUN_00516db0(param_2,1);
|
|
|
|
FUN_00453910(0,(float)fVar1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453a20 at 0x00453A20 (size: 131) ---
|
|
|
|
|
|
void __thiscall FUN_00453a20(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
int *piVar3;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0xec) == 0) {
|
|
|
|
puVar2 = (undefined4 *)FUN_005df0f5(8);
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
puVar2 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar2 = 0;
|
|
|
|
puVar2[1] = 0;
|
|
|
|
}
|
|
|
|
*(undefined4 **)(param_1 + 0xec) = puVar2;
|
|
|
|
}
|
|
|
|
InterlockedIncrement((LONG *)(param_2 + 4));
|
|
|
|
piVar1 = *(int **)(param_1 + 0xec);
|
|
|
|
piVar3 = (int *)FUN_005df0f5(8);
|
|
|
|
if (piVar3 == (int *)0x0) {
|
|
|
|
piVar3 = (int *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*piVar3 = param_2;
|
|
|
|
piVar3[1] = 0;
|
|
|
|
}
|
|
|
|
if (piVar1[1] == 0) {
|
|
|
|
*piVar1 = (int)piVar3;
|
|
|
|
piVar1[1] = (int)piVar3;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*(int **)(piVar1[1] + 4) = piVar3;
|
|
|
|
piVar1[1] = *(int *)(piVar1[1] + 4);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453ab0 at 0x00453AB0 (size: 144) ---
|
|
|
|
|
|
void __fastcall FUN_00453ab0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
void *pvVar4;
|
|
|
|
LONG LVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
if (*(int **)(param_1 + 0xec) != (int *)0x0) {
|
|
|
|
iVar1 = **(int **)(param_1 + 0xec);
|
|
|
|
while (iVar1 != 0) {
|
|
|
|
piVar2 = *(int **)(param_1 + 0xec);
|
|
|
|
puVar3 = (undefined4 *)*piVar2;
|
|
|
|
if (puVar3 == (undefined4 *)0x0) {
|
|
|
|
puVar6 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = puVar3[1];
|
|
|
|
*piVar2 = iVar1;
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
piVar2[1] = 0;
|
|
|
|
}
|
|
|
|
puVar6 = (undefined4 *)*puVar3;
|
|
|
|
operator_delete(puVar3);
|
|
|
|
}
|
|
|
|
LVar5 = InterlockedDecrement(puVar6 + 1);
|
|
|
|
if ((LVar5 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
iVar1 = **(int **)(param_1 + 0xec);
|
|
|
|
}
|
|
|
|
pvVar4 = *(void **)(param_1 + 0xec);
|
|
|
|
if (pvVar4 != (void *)0x0) {
|
|
|
|
FUN_004c65a0();
|
|
|
|
operator_delete(pvVar4);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0xec) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453b40 at 0x00453B40 (size: 325) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_00453b40(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
bool bVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
bool bVar3;
|
|
|
|
undefined4 local_14;
|
|
|
|
undefined1 local_10 [16];
|
|
|
|
|
|
|
|
if ((char)DAT_00870340[0x2b] != '\0') {
|
|
|
|
bVar3 = (*(uint *)(param_1 + 0xc) & 0xffff) < 0x100;
|
|
|
|
if ((bVar3) || (*(int *)(*(int *)(param_1 + 0x50) + 0xe8) != 0)) {
|
|
|
|
bVar1 = true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar1 = false;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 200) == '\0') {
|
|
|
|
FUN_0054bee0(*(float *)(param_1 + 0xc0) / ((float)DAT_00870340[0x2a] - _DAT_007958cc));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_0054be50(*(undefined4 *)(param_1 + 0xc4));
|
|
|
|
}
|
|
|
|
if (bVar3) {
|
|
|
|
FUN_00506d30(*(undefined4 *)(param_1 + 0xc));
|
|
|
|
FUN_0054d9e0(param_1 + 8);
|
|
|
|
FUN_0054fb60();
|
|
|
|
FUN_0054e060(1);
|
|
|
|
FUN_00506d90();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (bVar1) {
|
|
|
|
uVar2 = FUN_004527f0();
|
|
|
|
FUN_00506d30(uVar2);
|
|
|
|
}
|
|
|
|
FUN_0054d9e0(param_1 + 8);
|
|
|
|
(**(code **)(*DAT_00870340 + 0x48))(*(undefined4 *)(param_1 + 0x50));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0059e3f0(0);
|
|
|
|
if ((*(int *)(param_1 + 0xfc) != 0) && (*(int *)(param_1 + 0x100) != 0)) {
|
|
|
|
uVar2 = FUN_00452e60(*(int *)(param_1 + 0xfc),local_10,&local_14);
|
|
|
|
(**(code **)(param_1 + 0x100))(*(undefined4 *)(param_1 + 0xfc),uVar2,local_10,local_14);
|
|
|
|
}
|
|
|
|
if (*(code **)(param_1 + 0x114) != (code *)0x0) {
|
|
|
|
(**(code **)(param_1 + 0x114))();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453c90 at 0x00453C90 (size: 131) ---
|
|
|
|
|
|
void __thiscall FUN_00453c90(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
DAT_008452f4 = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xf8) = 0;
|
|
|
|
if (*(int *)(param_1 + 0xa8) != 0) {
|
|
|
|
FUN_0050a150(0);
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0xb8) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0x5c))(param_1);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0xa4) != 0) {
|
|
|
|
FUN_00455a50();
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xdc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0xe4) = 0;
|
|
|
|
if (param_2 != 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0xf4) = 0;
|
|
|
|
if (*(int **)(param_1 + 0xac) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x30))(0);
|
|
|
|
FUN_00509700();
|
|
|
|
}
|
|
|
|
FUN_00453ab0();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453d20 at 0x00453D20 (size: 86) ---
|
|
|
|
|
|
void __thiscall FUN_00453d20(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0xf8) = param_2;
|
|
|
|
FUN_00453280();
|
|
|
|
FUN_0050a150(*(undefined4 *)(param_1 + 0xf8));
|
|
|
|
FUN_0050ff90(*(undefined4 *)(param_1 + 0xf8));
|
|
|
|
DAT_00844c08 = *(undefined4 *)(*(int *)(param_1 + 0xf8) + 8);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0x6c))(param_3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00453d80 at 0x00453D80 (size: 745) ---
|
|
|
|
|
|
void __fastcall FUN_00453d80(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
float *pfVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
undefined4 unaff_EBX;
|
|
|
|
int iVar5;
|
|
|
|
undefined ***pppuStack_188;
|
|
|
|
int local_174 [2];
|
|
|
|
undefined **local_16c [13];
|
|
|
|
float local_138;
|
|
|
|
float local_134;
|
|
|
|
float local_130;
|
|
|
|
undefined1 local_12c [12];
|
|
|
|
undefined **local_120;
|
|
|
|
undefined4 local_11c;
|
|
|
|
undefined **local_118 [13];
|
|
|
|
undefined4 local_e4;
|
|
|
|
undefined4 local_e0;
|
|
|
|
undefined4 local_dc;
|
|
|
|
undefined **local_d8;
|
|
|
|
undefined4 local_d4;
|
|
|
|
undefined **local_90;
|
|
|
|
undefined4 local_8c;
|
|
|
|
undefined1 auStack_54 [12];
|
|
|
|
undefined **local_48;
|
|
|
|
undefined4 local_44;
|
|
|
|
|
|
|
|
iVar3 = *(int *)(param_1 + 0xf8);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar3 + 0x90) == 0) {
|
|
|
|
FUN_00516d50();
|
|
|
|
iVar3 = *(int *)(param_1 + 0xf8);
|
|
|
|
if (*(int *)(iVar3 + 0x90) == 0) {
|
|
|
|
pppuStack_188 = (undefined ***)0x453dc2;
|
|
|
|
FUN_00452c80();
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DAT_0081ff5c = *(undefined4 *)(iVar3 + 0x4c);
|
|
|
|
FUN_00425f10();
|
|
|
|
if (DAT_0083da40 != 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
local_11c = *(undefined4 *)(param_1 + 0x5c);
|
|
|
|
pppuStack_188 = (undefined ***)(param_1 + 0x60);
|
|
|
|
local_120 = &PTR_LAB_00797910;
|
|
|
|
FUN_00425f10();
|
|
|
|
iVar3 = *(int *)(param_1 + 0xa0);
|
|
|
|
local_174[0] = 0;
|
|
|
|
iVar4 = *(int *)(iVar3 + 0x14);
|
|
|
|
if (iVar4 != -1) {
|
|
|
|
iVar5 = *(int *)(param_1 + 0xf8);
|
|
|
|
if (iVar4 < *(int *)(*(int *)(iVar5 + 0x10) + 0x58)) {
|
|
|
|
pppuStack_188 =
|
|
|
|
(undefined ***)(*(int *)(*(int *)(*(int *)(iVar5 + 0x10) + 0x5c) + iVar4 * 4) + 0x38);
|
|
|
|
goto LAB_00453e45;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar5 = *(int *)(param_1 + 0xf8);
|
|
|
|
pppuStack_188 = (undefined ***)(iVar5 + 0x50);
|
|
|
|
LAB_00453e45:
|
|
|
|
FUN_00425f10();
|
|
|
|
pppuStack_188 = (undefined ***)(iVar3 + 0x18);
|
|
|
|
pfVar1 = (float *)FUN_00452530(local_12c);
|
|
|
|
local_138 = local_138 + *pfVar1;
|
|
|
|
local_134 = local_134 + pfVar1[1];
|
|
|
|
local_130 = local_130 + pfVar1[2];
|
|
|
|
if ((*(uint *)(iVar5 + 0x4c) & 0xffff) < 0x100) {
|
|
|
|
local_174[0] = *(int *)(iVar5 + 0x90);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_8c = *(undefined4 *)(iVar5 + 0x4c);
|
|
|
|
pppuStack_188 = local_16c;
|
|
|
|
local_90 = &PTR_LAB_00797910;
|
|
|
|
FUN_00425f10();
|
|
|
|
pppuStack_188 = (undefined ***)0x1;
|
|
|
|
iVar3 = FUN_00512850(&local_90,&DAT_0083dc14,local_174,0);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
local_174[0] = *(int *)(*(int *)(param_1 + 0xf8) + 0x90);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar3 = local_174[0];
|
|
|
|
local_d4 = *(undefined4 *)(local_174[0] + 0x28);
|
|
|
|
pppuStack_188 = local_16c;
|
|
|
|
local_d8 = &PTR_LAB_00797910;
|
|
|
|
FUN_00425f10();
|
|
|
|
pppuStack_188 = &local_120;
|
|
|
|
puVar2 = (undefined4 *)FUN_00452900(local_12c);
|
|
|
|
local_e4 = *puVar2;
|
|
|
|
local_e0 = puVar2[1];
|
|
|
|
local_dc = puVar2[2];
|
|
|
|
pppuStack_188 = local_118;
|
|
|
|
local_44 = *(undefined4 *)(iVar3 + 0x28);
|
|
|
|
local_48 = &PTR_LAB_00797910;
|
|
|
|
FUN_00425f10();
|
|
|
|
pppuStack_188 = (undefined ***)0x453f73;
|
|
|
|
iVar3 = FUN_0050bc20();
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
pppuStack_188 = (undefined ***)0x5c;
|
|
|
|
thunk_FUN_0050da00(*(undefined4 *)(param_1 + 0xf8));
|
|
|
|
pppuStack_188 = (undefined ***)0x3f800000;
|
|
|
|
FUN_0050a920(1,&DAT_0083dc14);
|
|
|
|
FUN_0050a930(unaff_EBX,&local_e4,auStack_54);
|
|
|
|
iVar4 = FUN_0050cde0();
|
|
|
|
if (iVar4 != 0) {
|
|
|
|
FUN_00452c80(iVar3 + 0xc0,0);
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = *(undefined4 *)(iVar3 + 0xbc);
|
|
|
|
FUN_0050a890(iVar3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
pppuStack_188 = (undefined ***)0x0;
|
|
|
|
iVar4 = FUN_00512850(&local_138,&DAT_0083dc14,&pppuStack_188,0,1);
|
|
|
|
if (iVar4 != 0) {
|
|
|
|
FUN_00452c80(&local_138,0);
|
|
|
|
*(undefined ****)(param_1 + 0x50) = pppuStack_188;
|
|
|
|
FUN_0050a890(iVar3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_00452c80(*(int *)(param_1 + 0xf8) + 0x48,1);
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = 0;
|
|
|
|
FUN_0050a890(iVar3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454070 at 0x00454070 (size: 748) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall
|
|
|
|
FUN_00454070(int param_1,int param_2,int param_3,undefined4 param_4,int param_5,undefined4 param_6,
|
|
|
|
undefined4 param_7,uint param_8,undefined4 param_9)
|
|
|
|
|
|
|
|
{
|
|
|
|
ushort uVar1;
|
|
|
|
undefined2 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int *piVar5;
|
|
|
|
uint uVar6;
|
|
|
|
ushort uVar7;
|
|
|
|
bool bVar8;
|
|
|
|
float10 fVar9;
|
|
|
|
float fVar10;
|
|
|
|
undefined4 uStack_54;
|
|
|
|
undefined4 uStack_50;
|
|
|
|
undefined4 uStack_4c;
|
|
|
|
undefined **local_48;
|
|
|
|
undefined4 local_44;
|
|
|
|
|
|
|
|
local_44 = *(undefined4 *)(param_3 + 4);
|
|
|
|
local_48 = &PTR_LAB_00797910;
|
|
|
|
FUN_00425f10(param_3 + 8);
|
|
|
|
uVar7 = (ushort)param_8;
|
|
|
|
if (param_2 == *(int *)(param_1 + 0xf8)) {
|
|
|
|
iVar3 = FUN_00451b50(6,param_9);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
uVar1 = *(ushort *)(*(int *)(param_1 + 0xf8) + 0x16c);
|
|
|
|
uVar4 = (uint)uVar1 - (param_8 & 0xffff);
|
|
|
|
uVar6 = (int)uVar4 >> 0x1f;
|
|
|
|
if ((int)((uVar4 ^ uVar6) - uVar6) < 0x8000) {
|
|
|
|
bVar8 = uVar7 < uVar1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar8 = uVar1 < uVar7;
|
|
|
|
}
|
|
|
|
if (!bVar8) {
|
|
|
|
fVar9 = (float10)FUN_00512010();
|
|
|
|
FUN_00536b80((float)fVar9);
|
|
|
|
FUN_004539e0(&local_48);
|
|
|
|
*(undefined2 *)(*(int *)(param_1 + 0xf8) + 0x164) = (undefined2)param_7;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0x58))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar2 = *(undefined2 *)(param_2 + 0x164);
|
|
|
|
iVar3 = FUN_00451b50(0,param_7);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar1 = *(ushort *)(param_2 + 0x16c);
|
|
|
|
uVar4 = (param_8 & 0xffff) - (uint)uVar1;
|
|
|
|
uVar6 = (int)uVar4 >> 0x1f;
|
|
|
|
if ((int)((uVar4 ^ uVar6) - uVar6) < 0x8000) {
|
|
|
|
bVar8 = uVar1 < uVar7;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar8 = uVar7 < uVar1;
|
|
|
|
}
|
|
|
|
if (bVar8) {
|
|
|
|
_DAT_0083dc24 = _DAT_0083dc24 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar1 = *(ushort *)(param_2 + 0x16c);
|
|
|
|
uVar4 = (uint)uVar1 - (param_8 & 0xffff);
|
|
|
|
uVar6 = (int)uVar4 >> 0x1f;
|
|
|
|
if ((int)((uVar4 ^ uVar6) - uVar6) < 0x8000) {
|
|
|
|
bVar8 = uVar7 < uVar1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar8 = uVar1 < uVar7;
|
|
|
|
}
|
|
|
|
if (bVar8) {
|
|
|
|
*(undefined2 *)(param_2 + 0x164) = uVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_2 + 0x40) != 0) &&
|
|
|
|
(*(int *)(*(int *)(param_2 + 0x40) + 8) != *(int *)(param_1 + 0xf4))) {
|
|
|
|
piVar5 = (int *)FUN_005088e0(*(undefined4 *)(param_2 + 8));
|
|
|
|
if (piVar5 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar5 + 0xc))(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00513f70();
|
|
|
|
iVar3 = FUN_00510240();
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
FUN_00511e50(param_4,1);
|
|
|
|
}
|
|
|
|
if (param_2 == *(int *)(param_1 + 0xf8)) {
|
|
|
|
iVar3 = FUN_00451b50(4,param_8);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_004539b0(&local_48);
|
|
|
|
fVar9 = (float10)FUN_0050f6e0();
|
|
|
|
fVar10 = (float)fVar9;
|
|
|
|
fVar9 = (float10)FUN_0050f690(fVar10);
|
|
|
|
FUN_00510ff0(&local_48,(float)fVar9,fVar10);
|
|
|
|
uStack_54 = 0;
|
|
|
|
uStack_50 = 0;
|
|
|
|
uStack_4c = 0;
|
|
|
|
FUN_00511ec0(&uStack_54,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
fVar9 = (float10)FUN_0050f6e0();
|
|
|
|
fVar10 = (float)fVar9;
|
|
|
|
fVar9 = (float10)FUN_0050f690(fVar10);
|
|
|
|
FUN_00510ff0(&local_48,(float)fVar9,fVar10);
|
|
|
|
iVar3 = (**(code **)(**(int **)(param_1 + 0xb8) + 0x60))();
|
|
|
|
if ((iVar3 != 0) && (param_5 != 0)) {
|
|
|
|
iVar3 = (**(code **)(**(int **)(param_1 + 0xb8) + 0xb4))();
|
|
|
|
FUN_00510fc0(&local_48,iVar3 != 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = FUN_00516e30(&local_48,param_8,param_5,param_6);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
fVar9 = (float10)FUN_0050f6e0();
|
|
|
|
fVar10 = (float)fVar9;
|
|
|
|
fVar9 = (float10)FUN_0050f690(fVar10);
|
|
|
|
FUN_00510ff0(param_2 + 0x48,(float)fVar9,fVar10);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454430 at 0x00454430 (size: 90) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_00454430(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = 0;
|
|
|
|
param_1[1] = 0;
|
|
|
|
param_1[2] = 0;
|
|
|
|
param_1[3] = 0;
|
|
|
|
param_1[4] = 0;
|
|
|
|
param_1[5] = 0;
|
|
|
|
param_1[6] = 0;
|
|
|
|
param_1[7] = 0x3f800000;
|
|
|
|
param_1[8] = 0;
|
|
|
|
param_1[9] = 0;
|
|
|
|
param_1[10] = 0;
|
|
|
|
param_1[0x14] = 0;
|
|
|
|
param_1[0x15] = 0;
|
|
|
|
param_1[0x16] = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
param_1[0x17] = 0x3e99999a;
|
|
|
|
param_1[0x18] = 0x3e99999a;
|
|
|
|
param_1[0x19] = 0x3e99999a;
|
|
|
|
*(undefined1 *)(param_1 + 0x1b) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x6d) = 0;
|
|
|
|
param_1[0x1a] = 0x3f490fdb;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454490 at 0x00454490 (size: 64) ---
|
|
|
|
|
|
void __fastcall FUN_00454490(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x18) != 0) {
|
|
|
|
uVar1 = 0;
|
|
|
|
if (*(int *)(param_1 + 8) != 0) {
|
|
|
|
do {
|
|
|
|
FUN_00513ef0(*(undefined4 *)(param_1 + 0x18));
|
|
|
|
uVar1 = uVar1 + 1;
|
|
|
|
} while (uVar1 < *(uint *)(param_1 + 8));
|
|
|
|
}
|
|
|
|
FUN_0052f310(1);
|
|
|
|
}
|
|
|
|
FUN_0044dcb0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004544d0 at 0x004544D0 (size: 130) ---
|
|
|
|
|
|
void __fastcall FUN_004544d0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
void *pvVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x14) != 0) {
|
|
|
|
do {
|
|
|
|
pvVar1 = *(void **)(*(int *)(param_1 + 0xc) + uVar3 * 4);
|
|
|
|
if (pvVar1 != (void *)0x0) {
|
|
|
|
operator_delete(pvVar1);
|
|
|
|
}
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x14));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = 0;
|
|
|
|
if ((*(uint *)(param_1 + 0x10) & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__(*(void **)(param_1 + 0xc));
|
|
|
|
*(undefined4 *)(param_1 + 0xc) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0xc) != 0) {
|
|
|
|
iVar2 = (*(uint *)(param_1 + 0x10) & 0x7fffffff) - 1;
|
|
|
|
while (-1 < iVar2) {
|
|
|
|
iVar2 = iVar2 + -1;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0xc) + 4 + iVar2 * 4) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454560 at 0x00454560 (size: 35) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00454560(int param_1,uint param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_2 < *(uint *)(param_1 + 0x14)) {
|
|
|
|
FUN_00452740(param_3);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454590 at 0x00454590 (size: 162) ---
|
|
|
|
|
|
int * __thiscall FUN_00454590(int *param_1,int *param_2,int *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int iVar4;
|
|
|
|
int *local_4;
|
|
|
|
|
|
|
|
piVar1 = param_3;
|
|
|
|
local_4 = param_1;
|
|
|
|
if (param_3 == (int *)0x0) {
|
|
|
|
piVar3 = (int *)*param_1;
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
*param_1 = 0;
|
|
|
|
(**(code **)(*piVar3 + 0x14))();
|
|
|
|
param_1[1] = 0;
|
|
|
|
}
|
|
|
|
iVar4 = -0x7fffbffe;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = *param_3;
|
|
|
|
param_3 = (int *)0x0;
|
|
|
|
piVar3 = (int *)(**(code **)(iVar4 + 0xc))(&local_4,&DAT_0079c5e8,¶m_3);
|
|
|
|
piVar2 = param_3;
|
|
|
|
iVar4 = *piVar3;
|
|
|
|
piVar3 = (int *)*param_1;
|
|
|
|
if (iVar4 < 0) {
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar3 + 0x14))();
|
|
|
|
}
|
|
|
|
*param_1 = 0;
|
|
|
|
param_1[1] = 0;
|
|
|
|
*param_2 = iVar4;
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar3 + 0x14))();
|
|
|
|
}
|
|
|
|
*param_1 = (int)piVar2;
|
|
|
|
param_1[1] = 0;
|
|
|
|
}
|
|
|
|
*param_2 = iVar4;
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
}
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454640 at 0x00454640 (size: 724) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 * __thiscall FUN_00454640(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
int local_50 [17];
|
|
|
|
undefined4 uStack_c;
|
|
|
|
undefined4 uStack_8;
|
|
|
|
undefined4 uStack_4;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_0079c76c;
|
|
|
|
param_1[1] = 0;
|
|
|
|
param_1[3] = 0;
|
|
|
|
param_1[2] = &PTR_LAB_00797910;
|
|
|
|
param_1[4] = 0x3f800000;
|
|
|
|
param_1[5] = 0;
|
|
|
|
param_1[6] = 0;
|
|
|
|
param_1[7] = 0;
|
|
|
|
param_1[0x11] = 0;
|
|
|
|
param_1[0x12] = 0;
|
|
|
|
param_1[0x13] = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
param_1[0x14] = 0;
|
|
|
|
param_1[0x15] = 0x10;
|
|
|
|
param_1[0x16] = &PTR_LAB_00797910;
|
|
|
|
param_1[0x17] = 0;
|
|
|
|
param_1[0x18] = 0x3f800000;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x25] = 0;
|
|
|
|
param_1[0x26] = 0;
|
|
|
|
param_1[0x27] = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
param_1[0x3a] = param_2;
|
|
|
|
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] = 0x3fc90fdb;
|
|
|
|
param_1[0x31] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x32) = 0;
|
|
|
|
param_1[0x33] = 0;
|
|
|
|
param_1[0x35] = 0;
|
|
|
|
param_1[0x36] = 0;
|
|
|
|
param_1[0x37] = 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;
|
|
|
|
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;
|
|
|
|
_DAT_0083dc14 = 0;
|
|
|
|
local_50[1] = 0;
|
|
|
|
local_50[2] = 0;
|
|
|
|
local_50[3] = 0;
|
|
|
|
_DAT_0083dc18 = 0;
|
|
|
|
_DAT_0083dc1c = 0;
|
|
|
|
_DAT_0083dc20 = 0x3e99999a;
|
|
|
|
FUN_00401340("The intensity of the player light");
|
|
|
|
FUN_00401340("SmartBox.ViewerLightIntensity");
|
|
|
|
FUN_004369a0(&DAT_0083dc10,9,¶m_2,local_50,0,0,0,0);
|
|
|
|
puVar2 = (undefined4 *)(param_2 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(param_2 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
puVar2 = (undefined4 *)(local_50[0] + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_50[0] + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
FUN_00401340("The falloff distance of the player light");
|
|
|
|
FUN_00401340("SmartBox.ViewerLightFalloff");
|
|
|
|
FUN_004369a0(&DAT_00819610,9,¶m_2,local_50,0,0,0,0);
|
|
|
|
puVar2 = (undefined4 *)(param_2 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(param_2 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_50[0] + -0x10));
|
|
|
|
if ((LVar1 == 0) && ((undefined4 *)(local_50[0] + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_50[0] + -0x14))(1);
|
|
|
|
}
|
|
|
|
DAT_00819680 = 0;
|
|
|
|
local_50[4] = 0x3f800000;
|
|
|
|
local_50[5] = 0;
|
|
|
|
local_50[6] = 0;
|
|
|
|
local_50[7] = 0;
|
|
|
|
uStack_c = 0;
|
|
|
|
uStack_8 = 0;
|
|
|
|
uStack_4 = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
FUN_00425f10(local_50 + 4);
|
|
|
|
FUN_00451a60(0xffffffff);
|
|
|
|
_DAT_008196dc = DAT_0083dc10;
|
|
|
|
_DAT_008196e0 = DAT_00819610;
|
|
|
|
_DAT_008196e4 = 0x43b40000;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454920 at 0x00454920 (size: 489) ---
|
|
|
|
|
|
void __fastcall FUN_00454920(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
void *pvVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
undefined4 *local_4;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_0079c76c;
|
|
|
|
local_4 = param_1;
|
|
|
|
FUN_00453c90(1);
|
|
|
|
FUN_00401340("SmartBox.ViewerLightIntensity");
|
|
|
|
FUN_00436cf0(&local_4);
|
|
|
|
puVar3 = local_4 + -5;
|
|
|
|
LVar2 = InterlockedDecrement(local_4 + -4);
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
FUN_00401340("SmartBox.ViewerLightFalloff");
|
|
|
|
FUN_00436cf0(&local_4);
|
|
|
|
puVar3 = local_4 + -5;
|
|
|
|
LVar2 = InterlockedDecrement(local_4 + -4);
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
if (param_1[0x28] != 0) {
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x4c))(param_1[0x28],4);
|
|
|
|
}
|
|
|
|
if (param_1[0x28] != 0) {
|
|
|
|
(*(code *)**(undefined4 **)(param_1[0x28] + 4))(1);
|
|
|
|
}
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
}
|
|
|
|
if (param_1[0x29] != 0) {
|
|
|
|
*(undefined4 *)(param_1[0x29] + 4) = 0;
|
|
|
|
pvVar1 = (void *)param_1[0x29];
|
|
|
|
if (pvVar1 != (void *)0x0) {
|
|
|
|
FUN_00455930();
|
|
|
|
operator_delete(pvVar1);
|
|
|
|
}
|
|
|
|
param_1[0x29] = 0;
|
|
|
|
}
|
|
|
|
if ((int *)param_1[0x2e] != (int *)0x0) {
|
|
|
|
(**(code **)(*(int *)param_1[0x2e] + 0x5c))(0);
|
|
|
|
if ((undefined4 *)param_1[0x2e] != (undefined4 *)0x0) {
|
|
|
|
(*(code *)**(undefined4 **)param_1[0x2e])(1);
|
|
|
|
}
|
|
|
|
param_1[0x2e] = 0;
|
|
|
|
}
|
|
|
|
FUN_0052b980(0);
|
|
|
|
FUN_0050ff80(0);
|
|
|
|
DAT_00842b98 = 0;
|
|
|
|
DAT_008456f0 = 0;
|
|
|
|
if (param_1[0x2d] != 0) {
|
|
|
|
FUN_00452960();
|
|
|
|
pvVar1 = (void *)param_1[0x2d];
|
|
|
|
if (pvVar1 != (void *)0x0) {
|
|
|
|
FUN_00552380();
|
|
|
|
operator_delete(pvVar1);
|
|
|
|
}
|
|
|
|
param_1[0x2d] = 0;
|
|
|
|
}
|
|
|
|
pvVar1 = (void *)param_1[0x2c];
|
|
|
|
if (pvVar1 != (void *)0x0) {
|
|
|
|
FUN_00505e70();
|
|
|
|
operator_delete(pvVar1);
|
|
|
|
param_1[0x2c] = 0;
|
|
|
|
}
|
|
|
|
pvVar1 = (void *)param_1[0x2a];
|
|
|
|
if (pvVar1 != (void *)0x0) {
|
|
|
|
FUN_0050a3e0();
|
|
|
|
operator_delete(pvVar1);
|
|
|
|
param_1[0x2a] = 0;
|
|
|
|
}
|
|
|
|
if ((int *)param_1[0x2b] != (int *)0x0) {
|
|
|
|
(**(code **)(*(int *)param_1[0x2b] + 0x14))();
|
|
|
|
param_1[0x2b] = 0;
|
|
|
|
}
|
|
|
|
FUN_004ff3b0();
|
|
|
|
pvVar1 = DAT_008ee9c8;
|
|
|
|
if (DAT_008ee9c8 != (void *)0x0) {
|
|
|
|
FUN_005a7f80();
|
|
|
|
operator_delete(pvVar1);
|
|
|
|
DAT_008ee9c8 = (void *)0x0;
|
|
|
|
}
|
|
|
|
param_1[0x16] = &PTR_FUN_0079385c;
|
|
|
|
param_1[2] = &PTR_FUN_0079385c;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454b10 at 0x00454B10 (size: 171) ---
|
|
|
|
|
|
void __fastcall FUN_00454b10(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
void *pvVar3;
|
|
|
|
int iVar4;
|
|
|
|
LONG LVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
if ((int *)param_1[0x3b] != (int *)0x0) {
|
|
|
|
iVar4 = *(int *)param_1[0x3b];
|
|
|
|
while (iVar4 != 0) {
|
|
|
|
piVar1 = (int *)param_1[0x3b];
|
|
|
|
puVar2 = (undefined4 *)*piVar1;
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
puVar6 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = puVar2[1];
|
|
|
|
*piVar1 = iVar4;
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
piVar1[1] = 0;
|
|
|
|
}
|
|
|
|
puVar6 = (undefined4 *)*puVar2;
|
|
|
|
operator_delete(puVar2);
|
|
|
|
}
|
|
|
|
iVar4 = (**(code **)(*param_1 + 4))(puVar6);
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
FUN_00453a20(puVar6);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
(**(code **)(*param_1 + 8))(puVar6);
|
|
|
|
}
|
|
|
|
LVar5 = InterlockedDecrement(puVar6 + 1);
|
|
|
|
if ((LVar5 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
iVar4 = *(int *)param_1[0x3b];
|
|
|
|
}
|
|
|
|
pvVar3 = (void *)param_1[0x3b];
|
|
|
|
if (pvVar3 != (void *)0x0) {
|
|
|
|
FUN_004c65a0();
|
|
|
|
operator_delete(pvVar3);
|
|
|
|
}
|
|
|
|
param_1[0x3b] = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454bc0 at 0x00454BC0 (size: 250) ---
|
|
|
|
|
|
void __thiscall FUN_00454bc0(int *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
void *pvVar2;
|
|
|
|
void *pvVar3;
|
|
|
|
int *piVar4;
|
|
|
|
int *piVar5;
|
|
|
|
LONG LVar6;
|
|
|
|
int *piVar7;
|
|
|
|
int iVar8;
|
|
|
|
int *piVar9;
|
|
|
|
int *piVar10;
|
|
|
|
bool bVar11;
|
|
|
|
|
|
|
|
if (*(int **)(param_2 + 300) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_2 + 300) + 8))();
|
|
|
|
}
|
|
|
|
piVar4 = *(int **)(param_2 + 0xc);
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
piVar7 = (int *)0x0;
|
|
|
|
piVar9 = (int *)0x0;
|
|
|
|
if (*piVar4 != 0) {
|
|
|
|
do {
|
|
|
|
piVar5 = (int *)*piVar4;
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
iVar8 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar8 = piVar5[1];
|
|
|
|
*piVar4 = iVar8;
|
|
|
|
if (iVar8 == 0) {
|
|
|
|
piVar4[1] = 0;
|
|
|
|
}
|
|
|
|
iVar8 = *piVar5;
|
|
|
|
operator_delete(piVar5);
|
|
|
|
}
|
|
|
|
piVar5 = (int *)FUN_005df0f5(8);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
piVar5 = (int *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*piVar5 = iVar8;
|
|
|
|
piVar5[1] = 0;
|
|
|
|
}
|
|
|
|
piVar10 = piVar5;
|
|
|
|
if (piVar7 != (int *)0x0) {
|
|
|
|
piVar7[1] = (int)piVar5;
|
|
|
|
piVar10 = piVar9;
|
|
|
|
}
|
|
|
|
piVar4 = *(int **)(param_2 + 0xc);
|
|
|
|
piVar7 = piVar5;
|
|
|
|
piVar9 = piVar10;
|
|
|
|
} while (*piVar4 != 0);
|
|
|
|
while (piVar10 != (int *)0x0) {
|
|
|
|
piVar4 = (int *)piVar10[1];
|
|
|
|
puVar1 = (undefined4 *)*piVar10;
|
|
|
|
operator_delete(piVar10);
|
|
|
|
iVar8 = (**(code **)(*param_1 + 4))(puVar1);
|
|
|
|
if (iVar8 == 0) {
|
|
|
|
FUN_00453a20(puVar1);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
(**(code **)(*param_1 + 8))(puVar1);
|
|
|
|
}
|
|
|
|
LVar6 = InterlockedDecrement(puVar1 + 1);
|
|
|
|
piVar10 = piVar4;
|
|
|
|
if ((LVar6 == 0) && (puVar1 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar1)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bVar11 = false;
|
|
|
|
pvVar3 = (void *)0x0;
|
|
|
|
while (bVar11) {
|
|
|
|
pvVar2 = *(void **)((int)pvVar3 + 4);
|
|
|
|
operator_delete(pvVar3);
|
|
|
|
bVar11 = pvVar2 != (void *)0x0;
|
|
|
|
pvVar3 = pvVar2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454cc0 at 0x00454CC0 (size: 93) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_00454cc0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
|
|
|
|
FUN_00453160();
|
|
|
|
if (*(int *)(param_1 + 0xf8) != 0) {
|
|
|
|
FUN_00453d80();
|
|
|
|
if (*(int *)(param_1 + 0x50) != 0) {
|
|
|
|
FUN_00453b40();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (DAT_0083da48 != '\0') {
|
|
|
|
uVar1 = FUN_0054d590();
|
|
|
|
DAT_0083da44 = FUN_0054d560();
|
|
|
|
_DAT_00819618 = uVar1;
|
|
|
|
FUN_006935e0(DAT_0083da44);
|
|
|
|
DAT_0083da48 = '\0';
|
|
|
|
}
|
|
|
|
FUN_0054c3a0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00454d20 at 0x00454D20 (size: 1167) ---
|
|
|
|
|
|
undefined4 __thiscall
|
|
|
|
FUN_00454d20(int param_1,undefined4 param_2,int param_3,undefined4 param_4,int param_5,
|
|
|
|
undefined4 param_6,int param_7)
|
|
|
|
|
|
|
|
{
|
|
|
|
short sVar1;
|
|
|
|
short sVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
undefined4 uVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
undefined4 uVar9;
|
|
|
|
undefined ***pppuVar10;
|
|
|
|
int local_bc;
|
|
|
|
int local_b8;
|
|
|
|
undefined4 local_b4;
|
|
|
|
int local_b0;
|
|
|
|
undefined **local_ac;
|
|
|
|
int local_a8;
|
|
|
|
undefined4 local_a4;
|
|
|
|
undefined1 local_a0 [4];
|
|
|
|
undefined1 local_9c [4];
|
|
|
|
int local_98;
|
|
|
|
undefined **ppuStack_58;
|
|
|
|
undefined4 local_54 [21];
|
|
|
|
|
|
|
|
local_b0 = 0;
|
|
|
|
local_bc = 0;
|
|
|
|
local_b8 = 0;
|
|
|
|
iVar3 = FUN_0051df90();
|
|
|
|
if ((iVar3 != 0) && (local_b0 = FUN_00508890(iVar3), local_b0 == 0)) {
|
|
|
|
FUN_00509da0(iVar3,param_2);
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
iVar4 = FUN_00508a40(param_3,&local_bc,&local_b8);
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
LAB_00455046:
|
|
|
|
if (local_bc == 0) goto LAB_0045504a;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (local_bc != 0) {
|
|
|
|
if (param_7 == 0) {
|
|
|
|
local_b4 = CONCAT22(local_b4._2_2_,*(undefined2 *)(local_bc + 0x174));
|
|
|
|
uVar5 = FUN_0051df80(8);
|
|
|
|
iVar4 = FUN_00451b10(local_b4,uVar5);
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
FUN_0050f430(&local_b4);
|
|
|
|
FUN_0051e280(local_a0);
|
|
|
|
sVar1 = *(short *)(local_bc + 0x174);
|
|
|
|
sVar2 = FUN_0051df80(8);
|
|
|
|
if (sVar1 != sVar2) {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
uVar5 = FUN_0051df80(7);
|
|
|
|
FUN_00451f80(local_bc,param_4,uVar5);
|
|
|
|
uVar5 = FUN_0051df80(0);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar6 = FUN_0051df80(4);
|
|
|
|
local_b4 = FUN_0051df80(6);
|
|
|
|
FUN_004538b0(local_9c);
|
|
|
|
if (local_98 == 0) {
|
|
|
|
FUN_00452280(local_bc,uVar5);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_ac = *(undefined ***)(param_5 + 0x74);
|
|
|
|
local_a8 = *(int *)(param_5 + 0x78);
|
|
|
|
local_a4 = *(undefined4 *)(param_5 + 0x7c);
|
|
|
|
pppuVar10 = &local_ac;
|
|
|
|
uVar9 = 1;
|
|
|
|
uVar8 = local_b4;
|
|
|
|
uVar7 = FUN_004f32b0(1,pppuVar10,uVar5,uVar6,local_b4);
|
|
|
|
FUN_00454070(local_bc,local_9c,uVar7,uVar9,pppuVar10,uVar5,uVar6,uVar8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar6 = FUN_004f32b0(uVar5);
|
|
|
|
uVar8 = FUN_0051dfa0(uVar6);
|
|
|
|
FUN_004522d0(local_bc,local_b0,uVar8,uVar6,uVar5);
|
|
|
|
}
|
|
|
|
iVar3 = FUN_004f8da0();
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
uVar5 = FUN_0051df70();
|
|
|
|
uVar6 = FUN_0051df80(5);
|
|
|
|
uVar8 = FUN_0051df80(1);
|
|
|
|
uVar7 = FUN_004f8da0(uVar8,uVar6,uVar5);
|
|
|
|
uVar9 = FUN_004f8d90(uVar7);
|
|
|
|
FUN_0050a160(local_bc,uVar9,uVar7,uVar8,uVar6,uVar5);
|
|
|
|
}
|
|
|
|
uVar5 = FUN_0051df80(2);
|
|
|
|
FUN_00452110(local_bc,*(undefined4 *)(param_5 + 0x60),uVar5);
|
|
|
|
uVar5 = FUN_0051df80(3);
|
|
|
|
local_ac = *(undefined ***)(param_5 + 0x74);
|
|
|
|
local_a8 = *(undefined4 *)(param_5 + 0x78);
|
|
|
|
local_a4 = *(undefined4 *)(param_5 + 0x7c);
|
|
|
|
uVar6 = FUN_004529b0(local_54);
|
|
|
|
FUN_00452200(local_bc,&local_ac,uVar6,uVar5);
|
|
|
|
if (local_b8 != 0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x28))(local_b8,param_6,1);
|
|
|
|
}
|
|
|
|
if (*(int *)(local_bc + 0x4c) == 0) {
|
|
|
|
if (local_b8 != 0) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_00509a40(*(undefined4 *)(local_bc + 8));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (*(int *)(local_bc + 0x90) != 0) {
|
|
|
|
FUN_00508f10(*(undefined4 *)(local_bc + 8));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_00509a40(*(undefined4 *)(local_bc + 8));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
goto LAB_00455046;
|
|
|
|
}
|
|
|
|
LAB_0045504a:
|
|
|
|
if (local_b8 == 0) goto LAB_0045505e;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x1c))(param_3);
|
|
|
|
LAB_0045505e:
|
|
|
|
iVar3 = (**(code **)(**(int **)(param_1 + 0xac) + 0x2c))(param_3,param_4,param_5,param_6);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
if (param_3 == *(int *)(param_1 + 0xf4)) {
|
|
|
|
uVar5 = FUN_0051df70();
|
|
|
|
FUN_00453d20(iVar3,uVar5);
|
|
|
|
local_54[0] = *(undefined4 *)(param_5 + 0x1c);
|
|
|
|
ppuStack_58 = &PTR_LAB_00797910;
|
|
|
|
FUN_00425f10(param_5 + 0x20);
|
|
|
|
FUN_00514ca0(&ppuStack_58);
|
|
|
|
iVar4 = *(int *)(param_1 + 0xf8);
|
|
|
|
if ((iVar4 != 0) && (*(int *)(iVar4 + 0x4c) != 0)) {
|
|
|
|
FUN_00455ad0(iVar4 + 0x48,1);
|
|
|
|
}
|
|
|
|
local_a8 = *(int *)(param_5 + 0x1c);
|
|
|
|
local_ac = &PTR_LAB_00797910;
|
|
|
|
FUN_00425f10(param_5 + 0x20);
|
|
|
|
if (*(int *)(param_1 + 0xf8) != 0) {
|
|
|
|
FUN_00516e10(&local_ac);
|
|
|
|
FUN_00453910(1,0x7f7fffff);
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xac) + 0x30))(param_4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar4 = FUN_0051df90();
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
local_a8 = *(int *)(param_5 + 0x1c);
|
|
|
|
FUN_00425f10(param_5 + 0x20);
|
|
|
|
if (local_a8 != 0) {
|
|
|
|
uVar5 = FUN_004538b0(&local_ac);
|
|
|
|
FUN_00516e10(uVar5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00454bc0(iVar3);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004551b0 at 0x004551B0 (size: 62) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004551b0(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0xf4) != 0) {
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0xf4) = param_3;
|
|
|
|
FUN_00454b10();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0x88))();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004551f0 at 0x004551F0 (size: 86) ---
|
|
|
|
|
|
void __fastcall FUN_004551f0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00454490();
|
|
|
|
if ((int *)param_1[6] != (int *)0x0) {
|
|
|
|
(**(code **)(*(int *)param_1[6] + 0x18))(1);
|
|
|
|
}
|
|
|
|
param_1[6] = 0;
|
|
|
|
if ((param_1[4] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[3]);
|
|
|
|
}
|
|
|
|
if ((param_1[1] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)*param_1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455250 at 0x00455250 (size: 62) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00455250(undefined4 *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
*param_1 = 0;
|
|
|
|
param_1[1] = 0;
|
|
|
|
piVar2 = (int *)*param_2;
|
|
|
|
uVar3 = 0;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x10))(piVar2,0);
|
|
|
|
}
|
|
|
|
puVar1 = (undefined4 *)FUN_00454590(¶m_2,piVar2,uVar3);
|
|
|
|
param_1[1] = *puVar1;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455290 at 0x00455290 (size: 533) ---
|
|
|
|
|
|
uint __fastcall FUN_00455290(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
uint uVar4;
|
|
|
|
undefined1 *puVar5;
|
|
|
|
undefined *puVar6;
|
|
|
|
undefined *puVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
int *piVar9;
|
|
|
|
int **ppiVar10;
|
|
|
|
int *local_14;
|
|
|
|
undefined1 local_10 [4];
|
|
|
|
undefined1 local_c [4];
|
|
|
|
int local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
ppiVar10 = &local_14;
|
|
|
|
uVar8 = 0;
|
|
|
|
puVar7 = &DAT_0079c69c;
|
|
|
|
puVar5 = local_10;
|
|
|
|
puVar6 = &DAT_0079c5f8;
|
|
|
|
local_14 = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar5,&DAT_0079c5f8,&DAT_0079c69c,0,ppiVar10);
|
|
|
|
FUN_00406650(puVar5,puVar6,puVar7,uVar8,ppiVar10);
|
|
|
|
piVar2 = local_14;
|
|
|
|
uVar8 = 0;
|
|
|
|
local_8 = 0;
|
|
|
|
local_4 = 0;
|
|
|
|
piVar9 = local_14;
|
|
|
|
if (local_14 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_14 + 0x10))(local_14,0);
|
|
|
|
}
|
|
|
|
FUN_00454590(local_c,piVar9,uVar8);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
uVar4 = 0;
|
|
|
|
if (local_8 != 0) {
|
|
|
|
*(int *)(param_1 + 0xac) = local_8;
|
|
|
|
if (*(int *)(param_1 + 4) != 0) {
|
|
|
|
*(undefined4 *)(local_8 + 0x10) = 0;
|
|
|
|
}
|
|
|
|
iVar1 = FUN_005df0f5(0x10);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
iVar1 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = FUN_0050a530(*(undefined4 *)(param_1 + 0xac),param_1);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0xa8) = iVar1;
|
|
|
|
uVar4 = 0;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar1 = FUN_005df0f5(0x34);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
iVar1 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = FUN_00505dd0();
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0xb0) = iVar1;
|
|
|
|
uVar4 = 0;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar1 = FUN_005df0f5(0x74);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
iVar1 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = FUN_00552300();
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0xb4) = iVar1;
|
|
|
|
uVar4 = 0;
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
(**(code **)(*DAT_00870340 + 0x44))(*(undefined4 *)(param_1 + 0xb0));
|
|
|
|
FUN_0052b980(*(undefined4 *)(param_1 + 0xac));
|
|
|
|
FUN_0050ff80(*(undefined4 *)(param_1 + 0xac));
|
|
|
|
DAT_00842b98 = *(undefined4 *)(param_1 + 0xac);
|
|
|
|
DAT_008456f0 = *(undefined4 *)(param_1 + 0xb0);
|
|
|
|
piVar2 = (int *)FUN_0054bad0();
|
|
|
|
*(int **)(param_1 + 0xb8) = piVar2;
|
|
|
|
uVar4 = 0;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x5c))(DAT_0083da58);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0xb8) + 0xb0))(DAT_00819614);
|
|
|
|
iVar1 = FUN_005df0f5(0x78);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
puVar3 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puVar3 = (undefined4 *)FUN_004558d0();
|
|
|
|
}
|
|
|
|
*(undefined4 **)(param_1 + 0xa4) = puVar3;
|
|
|
|
uVar4 = 0;
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
*puVar3 = *(undefined4 *)(param_1 + 0xb0);
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0xa4) + 4) = *(undefined4 *)(param_1 + 0xb4);
|
|
|
|
iVar1 = FUN_005df0f5(0xc0);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = FUN_004571b0();
|
|
|
|
}
|
|
|
|
*(uint *)(param_1 + 0xa0) = uVar4;
|
|
|
|
if ((uVar4 != 0) && (DAT_00837ff4 != (int *)0x0)) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x48))(uVar4,4);
|
|
|
|
FUN_00453280();
|
|
|
|
*(undefined4 *)(param_1 + 0xd8) = 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return uVar4 & 0xffffff00;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004554b0 at 0x004554B0 (size: 337) ---
|
|
|
|
|
|
void __fastcall FUN_004554b0(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
int iVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
|
|
|
|
if (*(char *)(param_1[0x29] + 0x18) == '\0') {
|
|
|
|
if ((*(char *)(param_1[0x29] + 0x19) == '\0') && (iVar3 = FUN_00455d00(), iVar3 != 0)) {
|
|
|
|
FUN_00455830();
|
|
|
|
}
|
|
|
|
iVar3 = param_1[0x3e];
|
|
|
|
if ((iVar3 != 0) && (*(int *)(iVar3 + 0x4c) != 0)) {
|
|
|
|
FUN_00455ad0(iVar3 + 0x48,0);
|
|
|
|
}
|
|
|
|
if (((param_1[0x3e] != 0) && (param_1[0x38] == 0)) && (param_1[0x37] == 0)) {
|
|
|
|
param_1[0x37] = 1;
|
|
|
|
param_1[0x39] = 1;
|
|
|
|
}
|
|
|
|
FUN_00509480();
|
|
|
|
FUN_0050a420();
|
|
|
|
if (DAT_008ee9c8 != 0) {
|
|
|
|
FUN_005a7800();
|
|
|
|
FUN_005062e0();
|
|
|
|
}
|
|
|
|
FUN_005524a0();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_00455d00();
|
|
|
|
}
|
|
|
|
FUN_0043f7b0();
|
|
|
|
if (param_1[0x3a] != 0) {
|
|
|
|
while( true ) {
|
|
|
|
piVar1 = (int *)param_1[0x3a];
|
|
|
|
puVar2 = (undefined4 *)*piVar1;
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
puVar5 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = puVar2[1];
|
|
|
|
*piVar1 = iVar3;
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
piVar1[1] = 0;
|
|
|
|
}
|
|
|
|
puVar5 = (undefined4 *)*puVar2;
|
|
|
|
operator_delete(puVar2);
|
|
|
|
}
|
|
|
|
if (puVar5 == (undefined4 *)0x0) break;
|
|
|
|
iVar3 = (**(code **)(*param_1 + 4))(puVar5);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
FUN_00453a20(puVar5);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
(**(code **)(*param_1 + 8))(puVar5);
|
|
|
|
}
|
|
|
|
LVar4 = InterlockedDecrement(puVar5 + 1);
|
|
|
|
if (LVar4 == 0) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (param_1[1] == 0) {
|
|
|
|
(**(code **)(*(int *)param_1[0x2e] + 0xa8))();
|
|
|
|
}
|
|
|
|
FUN_0054d700();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455610 at 0x00455610 (size: 16) ---
|
|
|
|
|
|
void __fastcall FUN_00455610(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0xd8) == 0) {
|
|
|
|
FUN_00454cc0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455620 at 0x00455620 (size: 35) ---
|
|
|
|
|
|
void FUN_00455620(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
|
|
|
|
undefined4 param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00454d20(param_1,param_2,param_3,param_4,param_5,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455650 at 0x00455650 (size: 192) ---
|
|
|
|
|
|
void __thiscall FUN_00455650(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
uint uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
puVar2 = (undefined4 *)FUN_005df0f5(0x68);
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
puVar2 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puVar2[1] = 0x3f800000;
|
|
|
|
puVar2[2] = 0;
|
|
|
|
puVar2[3] = 0;
|
|
|
|
puVar2[4] = 0;
|
|
|
|
puVar2[0xe] = 0;
|
|
|
|
puVar2[0xf] = 0;
|
|
|
|
puVar2[0x10] = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
}
|
|
|
|
*puVar2 = param_2;
|
|
|
|
local_c = 0x3f800000;
|
|
|
|
local_8 = 0x3f800000;
|
|
|
|
local_4 = 0x3f800000;
|
|
|
|
FUN_00452740(&local_c);
|
|
|
|
puVar2[0x17] = param_3;
|
|
|
|
FUN_00451a60(0xffffffff);
|
|
|
|
puVar2[0x18] = 0x7f7fffff;
|
|
|
|
puVar2[0x19] = 0x43b40000;
|
|
|
|
uVar3 = *(uint *)(param_1 + 0x10) & 0x7fffffff;
|
|
|
|
if (uVar3 <= *(uint *)(param_1 + 0x14)) {
|
|
|
|
uVar4 = FUN_00453850(uVar3 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar4);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(undefined4 **)(*(int *)(param_1 + 0xc) + *(int *)(param_1 + 0x14) * 4) = puVar2;
|
|
|
|
*(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455710 at 0x00455710 (size: 91) ---
|
|
|
|
|
|
undefined4 * FUN_00455710(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
|
|
|
|
DAT_0083da58 = (undefined4 *)FUN_0054bbf0(param_1);
|
|
|
|
if (DAT_0083da58 != (undefined4 *)0x0) {
|
|
|
|
DAT_0083da58[1] = param_2;
|
|
|
|
cVar1 = FUN_00455290(param_1);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
FUN_0054fc10(&LAB_004530b0);
|
|
|
|
return DAT_0083da58;
|
|
|
|
}
|
|
|
|
if (DAT_0083da58 != (undefined4 *)0x0) {
|
|
|
|
(**(code **)*DAT_0083da58)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DAT_0083da58 = (undefined4 *)0x0;
|
|
|
|
return (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455770 at 0x00455770 (size: 113) ---
|
|
|
|
|
|
uint __thiscall FUN_00455770(int *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
|
|
|
|
uVar2 = 0;
|
|
|
|
if (param_1[2] != 0) {
|
|
|
|
piVar4 = (int *)*param_1;
|
|
|
|
do {
|
|
|
|
if (*piVar4 == *param_2) {
|
|
|
|
if (uVar2 != 0xffffffff) goto LAB_004557be;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
piVar4 = piVar4 + 1;
|
|
|
|
} while (uVar2 < (uint)param_1[2]);
|
|
|
|
}
|
|
|
|
if ((param_1[1] & 0x7fffffffU) <= (uint)param_1[2]) {
|
|
|
|
uVar3 = FUN_00453850((param_1[1] & 0x7fffffffU) + 1);
|
|
|
|
uVar2 = FUN_004180a0(uVar3);
|
|
|
|
if ((char)uVar2 == '\0') {
|
|
|
|
LAB_004557be:
|
|
|
|
return uVar2 & 0xffffff00;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(int *)(*param_1 + param_1[2] * 4) = *param_2;
|
|
|
|
iVar1 = param_1[2];
|
|
|
|
param_1[2] = iVar1 + 1;
|
|
|
|
return CONCAT31((int3)((uint)(iVar1 + 1) >> 8),1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004557f0 at 0x004557F0 (size: 62) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004557f0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
|
|
|
|
if (param_2 != 0) {
|
|
|
|
cVar1 = FUN_00455770(¶m_2);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
FUN_005154e0(*(undefined4 *)(param_1 + 0x18));
|
|
|
|
FUN_00511e50(0,1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455830 at 0x00455830 (size: 32) ---
|
|
|
|
|
|
void __fastcall FUN_00455830(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
|
|
|
|
uVar1 = *(uint *)(param_1 + 0x2c);
|
|
|
|
if ((uVar1 != 0) && ((uVar1 & 0xffff) < 0x100)) {
|
|
|
|
FUN_00507730(uVar1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455850 at 0x00455850 (size: 55) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
float10 FUN_00455850(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
return SQRT((float10)DAT_00842950 * (float10)DAT_00842950 +
|
|
|
|
(float10)DAT_00842954 * (float10)DAT_00842954 +
|
|
|
|
(float10)DAT_00842958 * (float10)DAT_00842958) * (float10)_DAT_0079a1e8 +
|
|
|
|
(float10)DAT_00842780;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455890 at 0x00455890 (size: 63) ---
|
|
|
|
|
|
void __fastcall FUN_00455890(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x4c) != 0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
do {
|
|
|
|
iVar1 = *(int *)(*(int *)(*(int *)(param_1 + 0x50) + uVar2 * 4) + 0xc);
|
|
|
|
if ((*(int **)(iVar1 + 0x14) != (int *)0x0) && (*(int *)(iVar1 + 0x18) == 0)) {
|
|
|
|
(**(code **)(**(int **)(iVar1 + 0x14) + 0x14))();
|
|
|
|
*(undefined4 *)(iVar1 + 0x14) = 0;
|
|
|
|
}
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
} while (uVar2 < *(uint *)(param_1 + 0x4c));
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004558d0 at 0x004558D0 (size: 83) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004558d0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = 0;
|
|
|
|
param_1[2] = 0;
|
|
|
|
param_1[4] = 0;
|
|
|
|
param_1[5] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 6) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x19) = 1;
|
|
|
|
param_1[7] = 0;
|
|
|
|
param_1[8] = 0;
|
|
|
|
param_1[9] = 0;
|
|
|
|
param_1[10] = &PTR_LAB_00797910;
|
|
|
|
param_1[0xb] = 0;
|
|
|
|
param_1[0xc] = 0x3f800000;
|
|
|
|
param_1[0xd] = 0;
|
|
|
|
param_1[0xe] = 0;
|
|
|
|
param_1[0xf] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455930 at 0x00455930 (size: 8) ---
|
|
|
|
|
|
void __fastcall FUN_00455930(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined ***)(param_1 + 0x28) = &PTR_FUN_0079385c;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455940 at 0x00455940 (size: 266) ---
|
|
|
|
|
|
undefined1 __thiscall FUN_00455940(uint param_1,uint param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
uint uStack_4;
|
|
|
|
|
|
|
|
uStack_4 = param_1;
|
|
|
|
cVar1 = (**(code **)(*DAT_00837bac + 0x3c))();
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
uStack_4 = 0;
|
|
|
|
if ((param_2 & 0xffff) < 0x100) {
|
|
|
|
if (((param_3 != 0) || (*(char *)(param_1 + 0x19) == '\0')) ||
|
|
|
|
(((*(uint *)(param_1 + 8) ^ param_2) & 0xffff0000) != 0)) {
|
|
|
|
iVar2 = FUN_005060c0(param_2 | 0xffff,&uStack_4);
|
|
|
|
goto LAB_004559af;
|
|
|
|
}
|
|
|
|
*(undefined1 *)(param_1 + 0x19) = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = FUN_0052de40(param_2,&uStack_4);
|
|
|
|
LAB_004559af:
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
*(undefined1 *)(param_1 + 0x19) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined1 *)(param_1 + 0x19) = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(uint *)(param_1 + 8) = param_2;
|
|
|
|
if (param_3 == 0) {
|
|
|
|
if (*(char *)(param_1 + 0x19) == '\0') goto LAB_00455a3e;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (uStack_4 != 0) {
|
|
|
|
if (*(uint *)(param_1 + 0x20) == 0) {
|
|
|
|
*(uint *)(param_1 + 0x20) = uStack_4;
|
|
|
|
iVar2 = 0;
|
|
|
|
uVar3 = uStack_4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (*(uint *)(param_1 + 0x20) < uStack_4) {
|
|
|
|
*(uint *)(param_1 + 0x20) = uStack_4;
|
|
|
|
}
|
|
|
|
uVar3 = *(uint *)(param_1 + 0x20);
|
|
|
|
iVar2 = uVar3 - uStack_4;
|
|
|
|
*(int *)(param_1 + 0x1c) = iVar2;
|
|
|
|
}
|
|
|
|
FUN_006937c0(1,iVar2,uVar3);
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x19) == '\0') {
|
|
|
|
if (*(char *)(param_1 + 0x18) == '\0') {
|
|
|
|
*(undefined1 *)(param_1 + 0x18) = 1;
|
|
|
|
return *(undefined1 *)(param_1 + 0x19);
|
|
|
|
}
|
|
|
|
goto LAB_00455a3e;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x18) != '\0') {
|
|
|
|
*(undefined1 *)(param_1 + 0x18) = 0;
|
|
|
|
FUN_006937c0(0,0,0);
|
|
|
|
*(undefined4 *)(param_1 + 0x1c) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = 0;
|
|
|
|
}
|
|
|
|
LAB_00455a3e:
|
|
|
|
return *(undefined1 *)(param_1 + 0x19);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455a50 at 0x00455A50 (size: 122) ---
|
|
|
|
|
|
void __fastcall FUN_00455a50(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
bool bVar1;
|
|
|
|
|
|
|
|
bVar1 = (*(uint *)(param_1 + 0x2c) & 0xffff) < 0x100;
|
|
|
|
if (*(int **)(param_1 + 0x24) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x24) + 0x74))();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x24) + 0x14))();
|
|
|
|
bVar1 = *(int *)(*(int *)(param_1 + 0x24) + 0xe8) != 0 || bVar1;
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = 0;
|
|
|
|
FUN_0052eb50();
|
|
|
|
}
|
|
|
|
if (bVar1) {
|
|
|
|
FUN_005055c0();
|
|
|
|
}
|
|
|
|
FUN_00452960();
|
|
|
|
*(undefined4 *)(param_1 + 0x2c) = 0;
|
|
|
|
if (*(char *)(param_1 + 0x18) != '\0') {
|
|
|
|
*(undefined1 *)(param_1 + 0x18) = 0;
|
|
|
|
FUN_006937c0(0,0,0);
|
|
|
|
*(undefined4 *)(param_1 + 0x1c) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = 0;
|
|
|
|
}
|
|
|
|
*(undefined1 *)(param_1 + 0x19) = 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455ad0 at 0x00455AD0 (size: 16) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00455ad0(int param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
int iVar5;
|
|
|
|
bool bVar6;
|
|
|
|
float10 fVar7;
|
|
|
|
float fVar8;
|
|
|
|
undefined4 uVar9;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_2 + 4);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_00455a50();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar5 = 1;
|
|
|
|
if (*(char *)(param_1 + 0x18) == '\0') {
|
|
|
|
iVar5 = param_3;
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0x2c) == iVar1) && (*(int *)(param_1 + 0x24) != 0)) goto LAB_00455c55;
|
|
|
|
FUN_00455940(iVar1,iVar5);
|
|
|
|
if (*(int **)(param_1 + 0x24) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x24) + 0x74))();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x24) + 0x14))();
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = 0;
|
|
|
|
}
|
|
|
|
bVar6 = (*(uint *)(param_2 + 4) & 0xffff) < 0x100;
|
|
|
|
if (iVar5 == 0) {
|
|
|
|
if (bVar6) {
|
|
|
|
FUN_00507730(*(uint *)(param_2 + 4));
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_0052bd90(*(undefined4 *)(param_2 + 4));
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
if (!bVar6) {
|
|
|
|
if ((piVar4[0x3a] == 0) && (*(int *)(param_1 + 0x70) == 0)) {
|
|
|
|
FUN_005055c0();
|
|
|
|
(**(code **)(*piVar4 + 0x70))();
|
|
|
|
*(int **)(param_1 + 0x24) = piVar4;
|
|
|
|
goto LAB_00455bb3;
|
|
|
|
}
|
|
|
|
uVar9 = FUN_004527f0();
|
|
|
|
FUN_00507730(uVar9);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar4 + 0x70))();
|
|
|
|
*(int **)(param_1 + 0x24) = piVar4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_005055c0();
|
|
|
|
}
|
|
|
|
LAB_00455bb3:
|
|
|
|
if (*(int *)(param_1 + 0x24) != 0) {
|
|
|
|
_DAT_0081ecc8 = _DAT_0081ecc8 + 1;
|
|
|
|
DAT_008683b4 = 0;
|
|
|
|
DAT_0086b838 = 0;
|
|
|
|
DAT_0081ff5c = *(undefined4 *)(*(int *)(param_1 + 0x24) + 0x58);
|
|
|
|
FUN_00425f10(*(int *)(param_1 + 0x24) + 0x5c);
|
|
|
|
}
|
|
|
|
FUN_0052eb50();
|
|
|
|
uVar3 = DAT_00842958;
|
|
|
|
uVar2 = DAT_00842954;
|
|
|
|
uVar9 = DAT_00842950;
|
|
|
|
if (*(int *)(param_1 + 0x24) == 0) goto LAB_00455c55;
|
|
|
|
if ((bVar6) || (*(int *)(*(int *)(param_1 + 0x24) + 0xe8) != 0)) {
|
|
|
|
_DAT_008682c8 = DAT_00842950;
|
|
|
|
_DAT_008682d0 = DAT_00842958;
|
|
|
|
bVar6 = true;
|
|
|
|
_DAT_008682cc = DAT_00842954;
|
|
|
|
FUN_00451a60(DAT_00842778);
|
|
|
|
_DAT_008682bc = uVar9;
|
|
|
|
_DAT_008682c0 = uVar2;
|
|
|
|
_DAT_008682c4 = uVar3;
|
|
|
|
DAT_008682d4 = 0;
|
|
|
|
if (DAT_0083da58 != 0) {
|
|
|
|
uVar9 = DAT_0084277c;
|
|
|
|
fVar7 = (float10)FUN_00455850(DAT_0084277c);
|
|
|
|
fVar8 = (float)fVar7;
|
|
|
|
goto LAB_00455c14;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar6 = false;
|
|
|
|
if (DAT_0083da58 != 0) {
|
|
|
|
uVar9 = 0xffffffff;
|
|
|
|
fVar8 = DAT_0079c7fc;
|
|
|
|
LAB_00455c14:
|
|
|
|
FUN_004530e0(fVar8,uVar9);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_005521f0(param_2);
|
|
|
|
FUN_00695670(*(undefined4 *)(param_1 + 4));
|
|
|
|
if (bVar6) {
|
|
|
|
FUN_00506270(*(undefined4 *)(param_1 + 4));
|
|
|
|
}
|
|
|
|
FUN_00552670();
|
|
|
|
FUN_00455890();
|
|
|
|
LAB_00455c55:
|
|
|
|
*(undefined4 *)(param_1 + 0x2c) = *(undefined4 *)(param_2 + 4);
|
|
|
|
FUN_00425f10(param_2 + 8);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455ae0 at 0x00455AE0 (size: 539) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00455ae0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int in_EAX;
|
|
|
|
int *piVar4;
|
|
|
|
char cVar5;
|
|
|
|
int *unaff_EBX;
|
|
|
|
int unaff_EBP;
|
|
|
|
bool in_ZF;
|
|
|
|
float10 fVar6;
|
|
|
|
int in_stack_00000018;
|
|
|
|
int *in_stack_0000001c;
|
|
|
|
float fVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
|
|
|
|
if (in_ZF) {
|
|
|
|
FUN_00455a50();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
cVar5 = (char)unaff_EBX;
|
|
|
|
piVar4 = (int *)0x1;
|
|
|
|
if (*(char *)(param_1 + 0x18) == cVar5) {
|
|
|
|
piVar4 = in_stack_0000001c;
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0x2c) == in_EAX) && (*(int **)(param_1 + 0x24) != unaff_EBX))
|
|
|
|
goto LAB_00455c55;
|
|
|
|
FUN_00455940(in_EAX,piVar4);
|
|
|
|
if (*(int **)(param_1 + 0x24) != unaff_EBX) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x24) + 0x74))();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x24) + 0x14))();
|
|
|
|
*(int **)(param_1 + 0x24) = unaff_EBX;
|
|
|
|
}
|
|
|
|
piVar1 = (int *)(uint)((*(uint *)(unaff_EBP + 4) & 0xffff) < 0x100);
|
|
|
|
if (piVar4 == unaff_EBX) {
|
|
|
|
if (piVar1 != unaff_EBX) {
|
|
|
|
FUN_00507730(*(uint *)(unaff_EBP + 4));
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_0052bd90(*(undefined4 *)(in_stack_00000018 + 4));
|
|
|
|
if (piVar4 != unaff_EBX) {
|
|
|
|
if (piVar1 == unaff_EBX) {
|
|
|
|
if (((int *)piVar4[0x3a] == unaff_EBX) && (*(int **)(param_1 + 0x70) == unaff_EBX)) {
|
|
|
|
FUN_005055c0();
|
|
|
|
(**(code **)(*piVar4 + 0x70))();
|
|
|
|
*(int **)(param_1 + 0x24) = piVar4;
|
|
|
|
goto LAB_00455bb3;
|
|
|
|
}
|
|
|
|
uVar8 = FUN_004527f0();
|
|
|
|
FUN_00507730(uVar8);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar4 + 0x70))();
|
|
|
|
*(int **)(param_1 + 0x24) = piVar4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_005055c0();
|
|
|
|
}
|
|
|
|
LAB_00455bb3:
|
|
|
|
if (*(int **)(param_1 + 0x24) != unaff_EBX) {
|
|
|
|
_DAT_0081ecc8 = _DAT_0081ecc8 + 1;
|
|
|
|
DAT_0081ff5c = *(undefined4 *)(*(int *)(param_1 + 0x24) + 0x58);
|
|
|
|
DAT_008683b4 = unaff_EBX;
|
|
|
|
DAT_0086b838 = unaff_EBX;
|
|
|
|
FUN_00425f10(*(int *)(param_1 + 0x24) + 0x5c);
|
|
|
|
}
|
|
|
|
FUN_0052eb50();
|
|
|
|
uVar3 = DAT_00842958;
|
|
|
|
uVar2 = DAT_00842954;
|
|
|
|
uVar8 = DAT_00842950;
|
|
|
|
unaff_EBP = in_stack_00000018;
|
|
|
|
if (*(int **)(param_1 + 0x24) == unaff_EBX) goto LAB_00455c55;
|
|
|
|
if ((piVar1 == unaff_EBX) && ((int *)(*(int **)(param_1 + 0x24))[0x3a] == unaff_EBX)) {
|
|
|
|
piVar4 = (int *)0x0;
|
|
|
|
if (DAT_0083da58 != unaff_EBX) {
|
|
|
|
uVar8 = 0xffffffff;
|
|
|
|
fVar7 = DAT_0079c7fc;
|
|
|
|
LAB_00455c14:
|
|
|
|
FUN_004530e0(fVar7,uVar8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
_DAT_008682c8 = DAT_00842950;
|
|
|
|
_DAT_008682d0 = DAT_00842958;
|
|
|
|
piVar4 = (int *)0x1;
|
|
|
|
_DAT_008682cc = DAT_00842954;
|
|
|
|
FUN_00451a60(DAT_00842778);
|
|
|
|
_DAT_008682bc = uVar8;
|
|
|
|
_DAT_008682c0 = uVar2;
|
|
|
|
_DAT_008682c4 = uVar3;
|
|
|
|
DAT_008682d4 = cVar5;
|
|
|
|
if (DAT_0083da58 != unaff_EBX) {
|
|
|
|
uVar8 = DAT_0084277c;
|
|
|
|
fVar6 = (float10)FUN_00455850(DAT_0084277c);
|
|
|
|
fVar7 = (float)fVar6;
|
|
|
|
goto LAB_00455c14;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_005521f0(in_stack_00000018);
|
|
|
|
FUN_00695670(*(undefined4 *)(param_1 + 4));
|
|
|
|
if (piVar4 != unaff_EBX) {
|
|
|
|
FUN_00506270(*(undefined4 *)(param_1 + 4));
|
|
|
|
}
|
|
|
|
FUN_00552670();
|
|
|
|
FUN_00455890();
|
|
|
|
LAB_00455c55:
|
|
|
|
*(undefined4 *)(param_1 + 0x2c) = *(undefined4 *)(unaff_EBP + 4);
|
|
|
|
FUN_00425f10(unaff_EBP + 8);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455d00 at 0x00455D00 (size: 73) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
bool __fastcall FUN_00455d00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
if (_DAT_0079a1b0 < (double)CONCAT44(DAT_008379ac,DAT_008379a8) - *(double *)(param_1 + 0x10)) {
|
|
|
|
iVar2 = FUN_00455940(*(undefined4 *)(param_1 + 0x2c),*(undefined1 *)(param_1 + 0x18));
|
|
|
|
uVar1 = DAT_008379ac;
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = DAT_008379a8;
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = uVar1;
|
|
|
|
return iVar2 != 0;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455d50 at 0x00455D50 (size: 309) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 FUN_00455d50(int param_1,int param_2,undefined4 *param_3,undefined4 *param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
if (param_1 < 2) {
|
|
|
|
*param_4 =
|
|
|
|
"Usage:\n@render <option> <value>\n radius # : set landscape radius (between 5 and 25)\n fov # : set field of view (between 10 and 160)\n"
|
|
|
|
;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar2 = _stricmp(*(char **)(param_2 + 4),"usage");
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
*param_4 =
|
|
|
|
"Usage:\n@render <option> <value>\n radius # : set landscape radius (between 5 and 25)\n fov # : set field of view (between 10 and 160)\n"
|
|
|
|
;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar2 = _stricmp(*(char **)(param_2 + 4),"radius");
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
if (param_1 < 3) {
|
|
|
|
*param_3 = "Must specify a radius";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
uVar3 = atoi(*(char **)(param_2 + 8));
|
|
|
|
if ((4 < uVar3) && (uVar3 < 0x1a)) {
|
|
|
|
FUN_005dec10(&DAT_0083de44,uVar3);
|
|
|
|
*param_3 = "Landscape radius set";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
*param_3 = "Radius must be between 5 and 25";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
iVar2 = _stricmp(*(char **)(param_2 + 4),"fov");
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
if (param_1 < 3) {
|
|
|
|
*param_3 = "Must specify a field of view";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
uVar3 = atoi(*(char **)(param_2 + 8));
|
|
|
|
if ((9 < uVar3) && (uVar3 < 0xa1)) {
|
|
|
|
fVar1 = (float)(int)uVar3;
|
|
|
|
if ((int)uVar3 < 0) {
|
|
|
|
fVar1 = fVar1 + _DAT_0079920c;
|
|
|
|
}
|
|
|
|
FUN_005dec50(&DAT_0083de34,fVar1);
|
|
|
|
*param_3 = "Field of view set";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
*param_3 = "Field of view must be between 10 and 160";
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455e90 at 0x00455E90 (size: 99) ---
|
|
|
|
|
|
undefined4 FUN_00455e90(float *param_1,float *param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((((ABS(*param_1 - *param_2) < param_3) && (ABS(param_1[1] - param_2[1]) < param_3)) &&
|
|
|
|
(ABS(param_1[2] - param_2[2]) < param_3)) && (ABS(param_1[3] - param_2[3]) < param_3)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455f00 at 0x00455F00 (size: 47) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00455f00(float *param_1,float *param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
|
|
|
|
param_3 = _DAT_007938b0 / param_3;
|
|
|
|
fVar1 = param_1[1];
|
|
|
|
fVar2 = param_1[2];
|
|
|
|
*param_2 = param_3 * *param_1;
|
|
|
|
param_2[1] = param_3 * fVar1;
|
|
|
|
param_2[2] = param_3 * fVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455f30 at 0x00455F30 (size: 39) ---
|
|
|
|
|
|
void FUN_00455f30(float *param_1,float param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
|
|
|
|
fVar1 = param_3[1];
|
|
|
|
fVar2 = param_3[2];
|
|
|
|
*param_1 = param_2 * *param_3;
|
|
|
|
param_1[1] = param_2 * fVar1;
|
|
|
|
param_1[2] = param_2 * fVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455f60 at 0x00455F60 (size: 17) ---
|
|
|
|
|
|
void __fastcall FUN_00455f60(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00458110(*(int *)(param_1 + 0x10) == 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455f80 at 0x00455F80 (size: 17) ---
|
|
|
|
|
|
void __fastcall FUN_00455f80(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004582f0(*(int *)(param_1 + 0x14) == 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455fa0 at 0x00455FA0 (size: 8) ---
|
|
|
|
|
|
void __fastcall FUN_00455fa0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x44) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455fb0 at 0x00455FB0 (size: 15) ---
|
|
|
|
|
|
void __thiscall FUN_00455fb0(int param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x44) = *(uint *)(param_1 + 0x44) | param_2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455fc0 at 0x00455FC0 (size: 17) ---
|
|
|
|
|
|
void __thiscall FUN_00455fc0(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = param_3;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00455fe0 at 0x00455FE0 (size: 54) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __thiscall FUN_00455fe0(int param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((float)_DAT_00795610 <= param_2) && (param_2 <= (float)_DAT_007938c0)) {
|
|
|
|
*(float *)(param_1 + 8) = param_2;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00456020 at 0x00456020 (size: 54) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __thiscall FUN_00456020(int param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((float)_DAT_00795610 <= param_2) && (param_2 <= (float)_DAT_007938c0)) {
|
|
|
|
*(float *)(param_1 + 0xc) = param_2;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00456280 at 0x00456280 (size: 18) ---
|
|
|
|
|
|
void __fastcall FUN_00456280(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0xbc) != 0) {
|
|
|
|
FUN_004575b0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004562a0 at 0x004562A0 (size: 157) ---
|
|
|
|
|
|
void __thiscall FUN_004562a0(int param_1,float *param_2,int param_3,float *param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
float fVar10;
|
|
|
|
float fVar11;
|
|
|
|
float fVar12;
|
|
|
|
float fVar13;
|
|
|
|
float fVar14;
|
|
|
|
float fVar15;
|
|
|
|
float fVar16;
|
|
|
|
float fVar17;
|
|
|
|
float fVar18;
|
|
|
|
float fVar19;
|
|
|
|
float fVar20;
|
|
|
|
float fVar21;
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
fVar1 = *(float *)(param_3 + 0x24);
|
|
|
|
fVar2 = param_4[1];
|
|
|
|
fVar3 = *(float *)(param_3 + 0x18);
|
|
|
|
fVar4 = *param_4;
|
|
|
|
fVar5 = *(float *)(param_3 + 0x30);
|
|
|
|
fVar6 = param_4[2];
|
|
|
|
fVar7 = *(float *)(param_3 + 0x3c);
|
|
|
|
fVar8 = *(float *)(param_3 + 0x28);
|
|
|
|
fVar9 = param_4[1];
|
|
|
|
fVar10 = *(float *)(param_3 + 0x1c);
|
|
|
|
fVar11 = *param_4;
|
|
|
|
fVar12 = *(float *)(param_3 + 0x34);
|
|
|
|
fVar13 = param_4[2];
|
|
|
|
fVar14 = *(float *)(param_3 + 0x40);
|
|
|
|
fVar15 = *(float *)(param_3 + 0x2c);
|
|
|
|
fVar16 = param_4[1];
|
|
|
|
fVar17 = *(float *)(param_3 + 0x20);
|
|
|
|
fVar18 = *param_4;
|
|
|
|
fVar19 = *(float *)(param_3 + 0x38);
|
|
|
|
fVar20 = param_4[2];
|
|
|
|
fVar21 = *(float *)(param_3 + 0x44);
|
|
|
|
FUN_0043e7d0(&local_c,*(undefined4 *)(param_1 + 4),*(undefined4 *)(param_3 + 4));
|
|
|
|
*param_2 = local_c + fVar5 * fVar6 + fVar3 * fVar4 + fVar1 * fVar2 + fVar7;
|
|
|
|
param_2[1] = local_8 + fVar12 * fVar13 + fVar10 * fVar11 + fVar8 * fVar9 + fVar14;
|
|
|
|
param_2[2] = local_4 + fVar19 * fVar20 + fVar17 * fVar18 + fVar15 * fVar16 + fVar21;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00456340 at 0x00456340 (size: 82) ---
|
|
|
|
|
|
void __thiscall FUN_00456340(int param_1,float *param_2,float *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
float fVar10;
|
|
|
|
float fVar11;
|
|
|
|
float fVar12;
|
|
|
|
|
|
|
|
fVar1 = *(float *)(param_1 + 0x2c);
|
|
|
|
fVar2 = param_3[1];
|
|
|
|
fVar3 = *(float *)(param_1 + 0x20);
|
|
|
|
fVar4 = *param_3;
|
|
|
|
fVar5 = *(float *)(param_1 + 0x38);
|
|
|
|
fVar6 = param_3[2];
|
|
|
|
fVar7 = *(float *)(param_1 + 0x28);
|
|
|
|
fVar8 = param_3[1];
|
|
|
|
fVar9 = *(float *)(param_1 + 0x1c);
|
|
|
|
fVar10 = *param_3;
|
|
|
|
fVar11 = *(float *)(param_1 + 0x34);
|
|
|
|
fVar12 = param_3[2];
|
|
|
|
*param_2 = *(float *)(param_1 + 0x30) * param_3[2] +
|
|
|
|
*(float *)(param_1 + 0x18) * *param_3 + *(float *)(param_1 + 0x24) * param_3[1];
|
|
|
|
param_2[1] = fVar11 * fVar12 + fVar9 * fVar10 + fVar7 * fVar8;
|
|
|
|
param_2[2] = fVar5 * fVar6 + fVar3 * fVar4 + fVar1 * fVar2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004563a0 at 0x004563A0 (size: 130) ---
|
|
|
|
|
|
void __fastcall FUN_004563a0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
|
|
|
|
puVar1 = (undefined4 *)param_1[0x2e];
|
|
|
|
param_1[-1] = &PTR_FUN_0079caac;
|
|
|
|
*param_1 = &PTR_FUN_0079caa0;
|
|
|
|
if (puVar1 != (undefined4 *)0x0) {
|
|
|
|
LVar2 = InterlockedDecrement(puVar1 + 1);
|
|
|
|
if ((LVar2 == 0) && (puVar1 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar1)(1);
|
|
|
|
}
|
|
|
|
param_1[0x2e] = 0;
|
|
|
|
}
|
|
|
|
thunk_FUN_00436cf0(&DAT_0083df54);
|
|
|
|
thunk_FUN_00436cf0(&DAT_0083df58);
|
|
|
|
thunk_FUN_00436cf0(&DAT_0083df5c);
|
|
|
|
param_1 = (undefined4 *)(-(uint)(param_1 != (undefined4 *)0x4) & (uint)param_1);
|
|
|
|
*param_1 = &PTR_FUN_00795824;
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x3c))(param_1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00456430 at 0x00456430 (size: 103) ---
|
|
|
|
|
|
void __thiscall FUN_00456430(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
|
|
|
|
puVar1 = *(undefined4 **)(param_1 + 0xbc);
|
|
|
|
if (puVar1 != (undefined4 *)0x0) {
|
|
|
|
LVar2 = InterlockedDecrement(puVar1 + 1);
|
|
|
|
if ((LVar2 == 0) && (puVar1 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar1)(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0xbc) = 0;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0xbc) = param_2;
|
|
|
|
if (param_2 != 0) {
|
|
|
|
InterlockedIncrement((LONG *)(param_2 + 4));
|
|
|
|
if (*(int *)(param_1 + 0xbc) != 0) {
|
|
|
|
FUN_00457910();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004564a0 at 0x004564A0 (size: 24) ---
|
|
|
|
|
|
void __thiscall FUN_004564a0(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = param_3;
|
|
|
|
*(undefined4 *)(param_1 + 0x44) = 2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004564c0 at 0x004564C0 (size: 73) ---
|
|
|
|
|
|
void __thiscall FUN_004564c0(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
uVar1 = param_2[1];
|
|
|
|
uVar2 = *param_2;
|
|
|
|
uVar3 = param_2[2];
|
|
|
|
iVar4 = FUN_004524a0();
|
|
|
|
if (iVar4 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x38) = uVar2;
|
|
|
|
*(undefined4 *)(param_1 + 0x3c) = uVar1;
|
|
|
|
*(undefined4 *)(param_1 + 0x40) = uVar3;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00456510 at 0x00456510 (size: 150) ---
|
|
|
|
|
|
void __thiscall FUN_00456510(int param_1,float *param_2,uint param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
|
|
|
|
local_c = 0.0;
|
|
|
|
local_8 = 0.0;
|
|
|
|
if ((param_3 & 3) == 2) {
|
|
|
|
local_c = *(float *)(param_1 + 0x68);
|
|
|
|
}
|
|
|
|
else if ((param_3 & 3) == 1) {
|
|
|
|
local_c = -*(float *)(param_1 + 0x68);
|
|
|
|
}
|
|
|
|
if ((param_3 & 0xc) == 4) {
|
|
|
|
local_8 = *(float *)(param_1 + 0x68);
|
|
|
|
}
|
|
|
|
else if ((param_3 & 0xc) == 8) {
|
|
|
|
local_8 = -*(float *)(param_1 + 0x68);
|
|
|
|
}
|
|
|
|
if ((param_3 & 0x30) == 0x10) {
|
|
|
|
fVar1 = *(float *)(param_1 + 0x68);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
fVar1 = DAT_00796344;
|
|
|
|
if ((param_3 & 0x30) == 0x20) {
|
|
|
|
fVar1 = -*(float *)(param_1 + 0x68);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*param_2 = local_c;
|
|
|
|
param_2[1] = local_8;
|
|
|
|
param_2[2] = fVar1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004565e0 at 0x004565E0 (size: 34) ---
|
|
|
|
|
|
int __thiscall FUN_004565e0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004563a0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete((void *)(param_1 + -4));
|
|
|
|
}
|
|
|
|
return param_1 + -4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00456610 at 0x00456610 (size: 365) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00456610(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
float fVar5;
|
|
|
|
float fVar6;
|
|
|
|
float fVar7;
|
|
|
|
float fVar8;
|
|
|
|
float fVar9;
|
|
|
|
float fVar10;
|
|
|
|
float fVar11;
|
|
|
|
float fVar12;
|
|
|
|
float fVar13;
|
|
|
|
float fVar14;
|
|
|
|
int iVar15;
|
|
|
|
int iVar16;
|
|
|
|
undefined4 *puVar17;
|
|
|
|
undefined1 local_54 [12];
|
|
|
|
undefined **local_48;
|
|
|
|
undefined4 local_44;
|
|
|
|
undefined4 local_40;
|
|
|
|
undefined4 local_3c;
|
|
|
|
undefined4 local_38;
|
|
|
|
undefined4 local_34;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
local_48 = &PTR_LAB_00797910;
|
|
|
|
local_44 = 0;
|
|
|
|
local_40 = 0x3f800000;
|
|
|
|
local_3c = 0;
|
|
|
|
local_38 = 0;
|
|
|
|
local_34 = 0;
|
|
|
|
local_c = 0;
|
|
|
|
local_8 = 0;
|
|
|
|
local_4 = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
*(undefined4 *)(param_2 + 4) = local_44;
|
|
|
|
FUN_00425f10(&local_40);
|
|
|
|
iVar16 = FUN_0050ff60(*(undefined4 *)(param_1 + 0x10));
|
|
|
|
if (iVar16 != 0) {
|
|
|
|
*(undefined4 *)(param_2 + 4) = *(undefined4 *)(iVar16 + 0x4c);
|
|
|
|
iVar15 = *(int *)(param_1 + 0x14);
|
|
|
|
if ((iVar15 == -1) || (*(int *)(*(int *)(iVar16 + 0x10) + 0x58) <= iVar15)) {
|
|
|
|
fVar1 = *(float *)(iVar16 + 0x70);
|
|
|
|
fVar2 = *(float *)(param_1 + 0x1c);
|
|
|
|
fVar3 = *(float *)(iVar16 + 100);
|
|
|
|
fVar4 = *(float *)(param_1 + 0x18);
|
|
|
|
fVar5 = *(float *)(iVar16 + 0x7c);
|
|
|
|
fVar6 = *(float *)(param_1 + 0x20);
|
|
|
|
fVar7 = *(float *)(iVar16 + 0x88);
|
|
|
|
fVar8 = *(float *)(iVar16 + 0x74);
|
|
|
|
fVar9 = *(float *)(param_1 + 0x1c);
|
|
|
|
fVar10 = *(float *)(iVar16 + 0x68);
|
|
|
|
fVar11 = *(float *)(param_1 + 0x18);
|
|
|
|
fVar12 = *(float *)(iVar16 + 0x80);
|
|
|
|
fVar13 = *(float *)(param_1 + 0x20);
|
|
|
|
fVar14 = *(float *)(iVar16 + 0x8c);
|
|
|
|
*(float *)(param_2 + 0x3c) =
|
|
|
|
*(float *)(iVar16 + 0x78) * *(float *)(param_1 + 0x20) +
|
|
|
|
*(float *)(iVar16 + 0x60) * *(float *)(param_1 + 0x18) +
|
|
|
|
*(float *)(iVar16 + 0x6c) * *(float *)(param_1 + 0x1c) + *(float *)(iVar16 + 0x84);
|
|
|
|
*(float *)(param_2 + 0x40) = fVar5 * fVar6 + fVar3 * fVar4 + fVar1 * fVar2 + fVar7;
|
|
|
|
*(float *)(param_2 + 0x44) = fVar12 * fVar13 + fVar10 * fVar11 + fVar8 * fVar9 + fVar14;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (*(int *)(*(int *)(*(int *)(iVar16 + 0x10) + 0x5c) + iVar15 * 4) != 0) {
|
|
|
|
puVar17 = (undefined4 *)FUN_00452660(local_54,param_1 + 0x18);
|
|
|
|
*(undefined4 *)(param_2 + 0x3c) = *puVar17;
|
|
|
|
*(undefined4 *)(param_2 + 0x40) = puVar17[1];
|
|
|
|
*(undefined4 *)(param_2 + 0x44) = puVar17[2];
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00456780 at 0x00456780 (size: 2596) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 * __thiscall FUN_00456780(int param_1,undefined4 *param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float *pfVar1;
|
|
|
|
float *pfVar2;
|
|
|
|
float fVar3;
|
|
|
|
byte bVar4;
|
|
|
|
int iVar5;
|
|
|
|
bool bVar6;
|
|
|
|
bool bVar7;
|
|
|
|
int iVar8;
|
|
|
|
int iVar9;
|
|
|
|
float *pfVar10;
|
|
|
|
undefined1 *puVar11;
|
|
|
|
double *pdVar12;
|
|
|
|
undefined4 *puVar13;
|
|
|
|
undefined4 uVar14;
|
|
|
|
float10 fVar15;
|
|
|
|
float local_1c0;
|
|
|
|
float local_1bc;
|
|
|
|
float local_1b8;
|
|
|
|
float local_1b4;
|
|
|
|
float local_1b0;
|
|
|
|
float local_1ac;
|
|
|
|
undefined8 local_1a8;
|
|
|
|
float local_1a0;
|
|
|
|
undefined8 local_19c;
|
|
|
|
float local_194;
|
|
|
|
float local_190;
|
|
|
|
float local_18c;
|
|
|
|
float local_188;
|
|
|
|
undefined4 local_184;
|
|
|
|
undefined4 local_180;
|
|
|
|
float local_17c;
|
|
|
|
double local_178;
|
|
|
|
float local_170;
|
|
|
|
float local_16c;
|
|
|
|
float local_168;
|
|
|
|
float local_164;
|
|
|
|
float local_160;
|
|
|
|
float local_15c;
|
|
|
|
undefined **local_158;
|
|
|
|
undefined4 local_154;
|
|
|
|
undefined4 local_150;
|
|
|
|
undefined4 local_14c;
|
|
|
|
undefined4 local_148;
|
|
|
|
undefined4 local_144;
|
|
|
|
undefined4 local_11c;
|
|
|
|
undefined4 local_118;
|
|
|
|
undefined4 local_114;
|
|
|
|
undefined **local_110;
|
|
|
|
undefined4 local_10c;
|
|
|
|
undefined4 local_108;
|
|
|
|
undefined4 local_104;
|
|
|
|
undefined4 local_100;
|
|
|
|
undefined4 local_fc;
|
|
|
|
undefined4 local_d4;
|
|
|
|
undefined4 local_d0;
|
|
|
|
undefined4 local_cc;
|
|
|
|
undefined1 local_c8 [52];
|
|
|
|
float local_94;
|
|
|
|
float local_90;
|
|
|
|
float local_8c;
|
|
|
|
undefined1 local_88 [40];
|
|
|
|
float local_60;
|
|
|
|
float local_5c;
|
|
|
|
float local_58;
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
uVar14 = DAT_008379a8;
|
|
|
|
if (*(char *)(param_1 + 0xb8) == '\0') {
|
|
|
|
*param_2 = &PTR_LAB_00797910;
|
|
|
|
param_2[1] = *(undefined4 *)(param_3 + 4);
|
|
|
|
FUN_00425f10(param_3 + 8);
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
local_178 = (double)CONCAT44(DAT_008379ac,DAT_008379a8) - *(double *)(param_1 + 0x70);
|
|
|
|
*(undefined4 *)(param_1 + 0x74) = DAT_008379ac;
|
|
|
|
*(undefined4 *)(param_1 + 0x70) = uVar14;
|
|
|
|
if (*(int *)(param_1 + 100) != 0) {
|
|
|
|
FUN_00456510(&local_190,*(int *)(param_1 + 100));
|
|
|
|
fVar3 = (float)local_178;
|
|
|
|
local_18c = local_18c * fVar3;
|
|
|
|
local_188 = local_188 * fVar3;
|
|
|
|
*(float *)(param_1 + 0x48) = local_190 * fVar3 + *(float *)(param_1 + 0x48);
|
|
|
|
*(float *)(param_1 + 0x4c) = local_18c + *(float *)(param_1 + 0x4c);
|
|
|
|
*(float *)(param_1 + 0x50) = local_188 + *(float *)(param_1 + 0x50);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x60) != 0) {
|
|
|
|
FUN_00456510(&local_190,*(int *)(param_1 + 0x60));
|
|
|
|
fVar3 = (float)local_178;
|
|
|
|
local_18c = local_18c * fVar3;
|
|
|
|
local_188 = local_188 * fVar3;
|
|
|
|
*(float *)(param_1 + 0x18) = local_190 * fVar3 + *(float *)(param_1 + 0x18);
|
|
|
|
*(float *)(param_1 + 0x1c) = local_18c + *(float *)(param_1 + 0x1c);
|
|
|
|
*(float *)(param_1 + 0x20) = local_188 + *(float *)(param_1 + 0x20);
|
|
|
|
}
|
|
|
|
iVar8 = FUN_0050ff60(*(undefined4 *)(param_1 + 0x10));
|
|
|
|
if (iVar8 != 0) {
|
|
|
|
local_110 = &PTR_LAB_00797910;
|
|
|
|
local_10c = 0;
|
|
|
|
local_108 = 0x3f800000;
|
|
|
|
local_104 = 0;
|
|
|
|
local_100 = 0;
|
|
|
|
local_fc = 0;
|
|
|
|
local_d4 = 0;
|
|
|
|
local_d0 = 0;
|
|
|
|
local_cc = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
iVar9 = FUN_00456610(&local_110);
|
|
|
|
if (iVar9 != 0) {
|
|
|
|
pfVar10 = (float *)FUN_00452900(&local_184,&local_110);
|
|
|
|
local_190 = *pfVar10;
|
|
|
|
local_18c = pfVar10[1];
|
|
|
|
local_188 = pfVar10[2];
|
|
|
|
local_1c0 = 0.0;
|
|
|
|
local_1bc = 0.0;
|
|
|
|
local_1b8 = 0.0;
|
|
|
|
if (((*(byte *)(param_1 + 0x44) & 2) != 0) &&
|
|
|
|
(iVar9 = FUN_0050ff60(*(undefined4 *)(param_1 + 0x24)), iVar9 != 0)) {
|
|
|
|
iVar5 = *(int *)(param_1 + 0x28);
|
|
|
|
if ((iVar5 == -1) || (*(int *)(*(int *)(iVar9 + 0x10) + 0x58) <= iVar5)) {
|
|
|
|
puVar11 = (undefined1 *)(iVar9 + 0x48);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_004527c0(*(undefined4 *)(iVar9 + 0x4c),
|
|
|
|
*(int *)(*(int *)(*(int *)(iVar9 + 0x10) + 0x5c) + iVar5 * 4) + 0x38);
|
|
|
|
puVar11 = local_88;
|
|
|
|
}
|
|
|
|
pdVar12 = (double *)FUN_004562a0(&local_184,puVar11,param_1 + 0x2c);
|
|
|
|
local_19c = *pdVar12;
|
|
|
|
local_194 = *(float *)(pdVar12 + 1);
|
|
|
|
local_170 = *(float *)pdVar12 - local_190;
|
|
|
|
local_16c = *(float *)((int)pdVar12 + 4) - local_18c;
|
|
|
|
local_168 = local_194 - local_188;
|
|
|
|
iVar9 = FUN_004524a0();
|
|
|
|
if (iVar9 == 0) {
|
|
|
|
local_1c0 = local_170 + local_1c0;
|
|
|
|
local_1bc = local_16c + local_1bc;
|
|
|
|
local_1b8 = local_168 + local_1b8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(char *)(param_1 + 0x54) == '\0') || ((*(byte *)(param_1 + 0x44) & 0x10) == 0)) {
|
|
|
|
if ((*(byte *)(param_1 + 0x44) & 1) != 0) {
|
|
|
|
pfVar10 = (float *)FUN_00456340(&local_184,param_1 + 0x38);
|
|
|
|
local_1c0 = local_1c0 + *pfVar10;
|
|
|
|
local_1bc = local_1bc + pfVar10[1];
|
|
|
|
local_1b8 = local_1b8 + pfVar10[2];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_00511e90(&local_19c);
|
|
|
|
pfVar10 = (float *)(param_1 + 0x84);
|
|
|
|
*(float *)(param_1 + 0x78) = *pfVar10;
|
|
|
|
*(undefined4 *)(param_1 + 0x7c) = *(undefined4 *)(param_1 + 0x88);
|
|
|
|
*(undefined4 *)(param_1 + 0x80) = *(undefined4 *)(param_1 + 0x8c);
|
|
|
|
local_1a0 = local_194 + *(float *)(param_1 + 0x80);
|
|
|
|
pfVar1 = (float *)(param_1 + 0x90);
|
|
|
|
*pfVar10 = *pfVar1;
|
|
|
|
*(undefined4 *)(param_1 + 0x88) = *(undefined4 *)(param_1 + 0x94);
|
|
|
|
*(undefined4 *)(param_1 + 0x8c) = *(undefined4 *)(param_1 + 0x98);
|
|
|
|
pfVar2 = (float *)(param_1 + 0x9c);
|
|
|
|
*pfVar1 = *pfVar2;
|
|
|
|
*(undefined4 *)(param_1 + 0x94) = *(undefined4 *)(param_1 + 0xa0);
|
|
|
|
*(undefined4 *)(param_1 + 0x98) = *(undefined4 *)(param_1 + 0xa4);
|
|
|
|
*pfVar2 = *(float *)(param_1 + 0xa8);
|
|
|
|
*(undefined4 *)(param_1 + 0xa0) = *(undefined4 *)(param_1 + 0xac);
|
|
|
|
*(undefined4 *)(param_1 + 0xa4) = *(undefined4 *)(param_1 + 0xb0);
|
|
|
|
local_1b4 = (float)local_19c + *(float *)(param_1 + 0x78) + *pfVar10 + *pfVar1 + *pfVar2;
|
|
|
|
local_1b0 = local_19c._4_4_ + *(float *)(param_1 + 0x7c) + *(float *)(param_1 + 0x88) +
|
|
|
|
*(float *)(param_1 + 0x94) + *(float *)(param_1 + 0xa0);
|
|
|
|
local_1a8 = (double)CONCAT44(local_1b0,local_1b4);
|
|
|
|
if (*(int *)(param_1 + 0xb4) < 5) {
|
|
|
|
*(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;
|
|
|
|
}
|
|
|
|
*(float *)(param_1 + 0xa8) = (float)local_19c;
|
|
|
|
local_1ac = _DAT_007938b0 / (float)*(int *)(param_1 + 0xb4);
|
|
|
|
*(float *)(param_1 + 0xac) = local_19c._4_4_;
|
|
|
|
*(float *)(param_1 + 0xb0) = local_194;
|
|
|
|
local_1b4 = local_1b4 * local_1ac;
|
|
|
|
local_1b0 = local_1b0 * local_1ac;
|
|
|
|
local_1ac = (local_1a0 + *(float *)(param_1 + 0x8c) + *(float *)(param_1 + 0x98) +
|
|
|
|
*(float *)(param_1 + 0xa4)) * local_1ac;
|
|
|
|
local_19c = (double)CONCAT44(local_1b0,local_1b4);
|
|
|
|
local_194 = local_1ac;
|
|
|
|
local_17c = local_1ac;
|
|
|
|
iVar9 = FUN_004524a0();
|
|
|
|
if (((iVar9 != 0) || (ABS((float)local_19c) < DAT_0079ca84)) ||
|
|
|
|
(ABS(local_19c._4_4_) < DAT_0079ca84)) {
|
|
|
|
bVar4 = *(byte *)(param_1 + 0x44);
|
|
|
|
joined_r0x00456ede:
|
|
|
|
if ((bVar4 & 1) == 0) goto LAB_00456da1;
|
|
|
|
pfVar10 = (float *)FUN_00456340(&local_184,param_1 + 0x38);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ((*(byte *)(iVar8 + 0xac) & 1) == 0) {
|
|
|
|
local_194 = local_194 * _DAT_007958cc;
|
|
|
|
iVar8 = FUN_004524a0();
|
|
|
|
if (iVar8 == 0) {
|
|
|
|
FUN_00424ce0();
|
|
|
|
FUN_00536af0(&local_19c);
|
|
|
|
local_1b4 = local_60;
|
|
|
|
local_1b0 = local_5c;
|
|
|
|
local_1ac = local_58;
|
|
|
|
local_1a8 = (double)CONCAT44(local_5c,local_60);
|
|
|
|
local_1a0 = local_58;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_1b4 = 0.0;
|
|
|
|
local_1b0 = 0.0;
|
|
|
|
local_1ac = 1.0;
|
|
|
|
local_1a8 = 0.0;
|
|
|
|
local_1a0 = 1.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_1a8 = *(double *)(iVar8 + 0x130);
|
|
|
|
local_1a0 = *(float *)(iVar8 + 0x138);
|
|
|
|
}
|
|
|
|
local_184 = 0;
|
|
|
|
local_180 = 0x3f800000;
|
|
|
|
local_17c = 0.0;
|
|
|
|
FUN_00456340(&local_1b4,&local_184);
|
|
|
|
pfVar10 = (float *)FUN_00455f30(&local_184,
|
|
|
|
local_1a8._4_4_ * local_1b0 +
|
|
|
|
local_1a0 * local_1ac + local_1b4 * (float)local_1a8,
|
|
|
|
&local_1a8);
|
|
|
|
local_17c = pfVar10[2];
|
|
|
|
local_170 = local_1b4 - *pfVar10;
|
|
|
|
local_16c = local_1b0 - pfVar10[1];
|
|
|
|
local_168 = local_1ac - local_17c;
|
|
|
|
iVar8 = FUN_004524a0();
|
|
|
|
bVar4 = *(byte *)(param_1 + 0x44);
|
|
|
|
if (iVar8 != 0) goto joined_r0x00456ede;
|
|
|
|
if ((bVar4 & 1) == 0) {
|
|
|
|
local_1c0 = local_170 + local_1c0;
|
|
|
|
local_1bc = local_16c + local_1bc;
|
|
|
|
local_1b8 = local_168 + local_1b8;
|
|
|
|
goto LAB_00456da1;
|
|
|
|
}
|
|
|
|
FUN_00424ce0();
|
|
|
|
FUN_00536af0(&local_170);
|
|
|
|
pfVar10 = (float *)FUN_00452530(&local_184,param_1 + 0x38);
|
|
|
|
}
|
|
|
|
local_1c0 = local_1c0 + *pfVar10;
|
|
|
|
local_1bc = local_1bc + pfVar10[1];
|
|
|
|
local_1b8 = local_1b8 + pfVar10[2];
|
|
|
|
}
|
|
|
|
LAB_00456da1:
|
|
|
|
local_160 = local_1bc;
|
|
|
|
local_164 = local_1c0;
|
|
|
|
local_15c = local_1b8;
|
|
|
|
iVar8 = FUN_004524a0();
|
|
|
|
if (iVar8 != 0) {
|
|
|
|
pfVar10 = (float *)FUN_00456340(&local_184,param_1 + 0x38);
|
|
|
|
local_164 = *pfVar10;
|
|
|
|
local_160 = pfVar10[1];
|
|
|
|
local_15c = pfVar10[2];
|
|
|
|
}
|
|
|
|
local_c = local_190;
|
|
|
|
local_8 = local_18c;
|
|
|
|
local_4 = local_188;
|
|
|
|
FUN_00536af0(&local_164);
|
|
|
|
pfVar10 = (float *)FUN_00452660(&local_184,param_1 + 0x48);
|
|
|
|
local_94 = *pfVar10;
|
|
|
|
local_90 = pfVar10[1];
|
|
|
|
local_8c = pfVar10[2];
|
|
|
|
if ((*(byte *)(param_1 + 0x44) & 4) != 0) {
|
|
|
|
local_1b4 = local_190 - local_94;
|
|
|
|
local_1b0 = local_18c - local_90;
|
|
|
|
local_1ac = local_188 - local_8c;
|
|
|
|
local_164 = local_1b4;
|
|
|
|
local_160 = local_1b0;
|
|
|
|
local_15c = local_1ac;
|
|
|
|
iVar8 = FUN_004524a0();
|
|
|
|
local_1c0 = local_164;
|
|
|
|
local_1bc = local_160;
|
|
|
|
local_1b8 = local_15c;
|
|
|
|
if (iVar8 != 0) {
|
|
|
|
local_1b4 = 0.0;
|
|
|
|
local_1c0 = 0.0;
|
|
|
|
local_1b0 = 0.0;
|
|
|
|
local_1bc = 0.0;
|
|
|
|
local_1ac = 0.0;
|
|
|
|
local_1b8 = 0.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar8 = FUN_004524a0();
|
|
|
|
if (iVar8 != 0) {
|
|
|
|
pfVar10 = (float *)FUN_00456340(&local_184,param_1 + 0x38);
|
|
|
|
local_1c0 = *pfVar10;
|
|
|
|
local_1bc = pfVar10[1];
|
|
|
|
local_1b8 = pfVar10[2];
|
|
|
|
}
|
|
|
|
FUN_00536af0(&local_1c0);
|
|
|
|
fVar3 = *(float *)(param_1 + 8);
|
|
|
|
local_1a8 = (double)fVar3;
|
|
|
|
if (fVar3 <= (float)_DAT_007938c0 - DAT_0079ca84) {
|
|
|
|
bVar6 = false;
|
|
|
|
fVar3 = fVar3 * (float)local_178 * (float)_DAT_0079cac8;
|
|
|
|
local_1a8._4_4_ = (float)((ulonglong)local_1a8 >> 0x20);
|
|
|
|
local_1a8 = (double)CONCAT44(local_1a8._4_4_,fVar3);
|
|
|
|
if ((float)_DAT_007938c0 < fVar3) goto LAB_00456ff9;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar6 = true;
|
|
|
|
LAB_00456ff9:
|
|
|
|
local_1a8 = (double)CONCAT44(local_1a8._4_4_,0x3f800000);
|
|
|
|
}
|
|
|
|
fVar3 = *(float *)(param_1 + 0xc);
|
|
|
|
local_19c = (double)fVar3;
|
|
|
|
if (fVar3 <= (float)_DAT_007938c0 - DAT_0079ca84) {
|
|
|
|
bVar7 = false;
|
|
|
|
fVar3 = fVar3 * (float)local_178 * (float)_DAT_0079cac8;
|
|
|
|
local_178 = (double)CONCAT44(local_178._4_4_,fVar3);
|
|
|
|
if ((float)_DAT_007938c0 < fVar3) goto LAB_0045703b;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bVar7 = true;
|
|
|
|
LAB_0045703b:
|
|
|
|
local_178 = (double)CONCAT44(local_178._4_4_,0x3f800000);
|
|
|
|
}
|
|
|
|
local_158 = &PTR_LAB_00797910;
|
|
|
|
local_154 = 0;
|
|
|
|
local_150 = 0x3f800000;
|
|
|
|
local_14c = 0;
|
|
|
|
local_148 = 0;
|
|
|
|
local_144 = 0;
|
|
|
|
local_11c = 0;
|
|
|
|
local_118 = 0;
|
|
|
|
local_114 = 0;
|
|
|
|
FUN_00535b30();
|
|
|
|
local_154 = *(undefined4 *)(param_3 + 4);
|
|
|
|
iVar8 = param_3 + 8;
|
|
|
|
FUN_00536030(iVar8,local_c8,(float)local_1a8);
|
|
|
|
FUN_005360d0(iVar8,local_c8,local_178._0_4_);
|
|
|
|
local_1a8 = (double)CONCAT44(local_1a8._4_4_,DAT_0079ca84);
|
|
|
|
local_178 = (double)CONCAT44(local_178._4_4_,DAT_0079ca84 + DAT_0079ca84);
|
|
|
|
if (!bVar6) {
|
|
|
|
fVar15 = (float10)FUN_005aa560(param_3);
|
|
|
|
if ((fVar15 < (float10)local_178._0_4_) && (!bVar7)) {
|
|
|
|
iVar8 = FUN_00455e90(&local_150,iVar8,(float)local_1a8);
|
|
|
|
if (iVar8 != 0) {
|
|
|
|
FUN_004529e0(param_3);
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
puVar13 = &local_150;
|
|
|
|
*param_2 = &PTR_LAB_00797910;
|
|
|
|
uVar14 = local_154;
|
|
|
|
goto LAB_0045718b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*param_2 = &PTR_LAB_00797910;
|
|
|
|
uVar14 = *(undefined4 *)(param_3 + 4);
|
|
|
|
puVar13 = (undefined4 *)(param_3 + 8);
|
|
|
|
LAB_0045718b:
|
|
|
|
param_2[1] = uVar14;
|
|
|
|
FUN_00425f10(puVar13);
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004571b0 at 0x004571B0 (size: 815) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_004571b0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
int local_14;
|
|
|
|
int *local_10;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
param_1[1] = &PTR_FUN_00795824;
|
|
|
|
*param_1 = &PTR_FUN_0079caac;
|
|
|
|
param_1[1] = &PTR_FUN_0079caa0;
|
|
|
|
param_1[2] = 0x3ee66666;
|
|
|
|
param_1[3] = 0x3ee66666;
|
|
|
|
param_1[4] = 0;
|
|
|
|
param_1[5] = 0xffffffff;
|
|
|
|
param_1[6] = 0;
|
|
|
|
param_1[7] = 0;
|
|
|
|
param_1[8] = 0;
|
|
|
|
param_1[10] = 0xffffffff;
|
|
|
|
param_1[9] = 0;
|
|
|
|
param_1[0xb] = 0;
|
|
|
|
param_1[0xc] = 0;
|
|
|
|
param_1[0xd] = 0;
|
|
|
|
param_1[0xe] = 0;
|
|
|
|
param_1[0x10] = 0;
|
|
|
|
param_1[0xf] = 0x3f800000;
|
|
|
|
param_1[0x11] = 1;
|
|
|
|
param_1[0x12] = 0;
|
|
|
|
param_1[0x13] = 0xc0400000;
|
|
|
|
param_1[0x14] = 0;
|
|
|
|
param_1[0x16] = 0x3ee66666;
|
|
|
|
param_1[0x1a] = 0x3f800000;
|
|
|
|
param_1[0x1b] = 0x3f800000;
|
|
|
|
*(undefined1 *)(param_1 + 0x15) = 1;
|
|
|
|
param_1[0x17] = 0x42200000;
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
param_1[0x1d] = 0;
|
|
|
|
param_1[0x2d] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x2e) = 1;
|
|
|
|
param_1[0x2f] = 0;
|
|
|
|
param_1[0x1e] = 0;
|
|
|
|
param_1[0x1f] = 0;
|
|
|
|
param_1[0x20] = 0;
|
|
|
|
param_1[0x21] = 0;
|
|
|
|
param_1[0x22] = 0;
|
|
|
|
param_1[0x23] = 0;
|
|
|
|
param_1[0x24] = 0;
|
|
|
|
param_1[0x25] = 0;
|
|
|
|
param_1[0x26] = 0;
|
|
|
|
param_1[0x27] = 0;
|
|
|
|
param_1[0x28] = 0;
|
|
|
|
param_1[0x29] = 0;
|
|
|
|
local_c = 0;
|
|
|
|
local_8 = 0;
|
|
|
|
local_4 = 0;
|
|
|
|
param_1[0x2a] = 0;
|
|
|
|
param_1[0x2b] = 0;
|
|
|
|
param_1[0x2c] = 0;
|
|
|
|
FUN_00401340("Whether the camera should align to slope");
|
|
|
|
if (param_1 + 0x15 != (undefined4 *)0x0) {
|
|
|
|
FUN_004369a0(param_1 + 0x15,2,&DAT_0083df54,&local_14,0,0,0,0);
|
|
|
|
}
|
|
|
|
if (DAT_008380c8 == 0) {
|
|
|
|
iVar2 = FUN_005df0f5(0x8100);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
DAT_008380c8 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
DAT_008380c8 = FUN_00433d20();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cVar1 = FUN_00433710(&DAT_0083df54,&local_10);
|
|
|
|
if ((cVar1 != '\0') && (iVar2 = (**(code **)(*local_10 + 0x44))(), iVar2 != 0)) {
|
|
|
|
*(undefined1 *)(iVar2 + 0x28) = 1;
|
|
|
|
}
|
|
|
|
puVar4 = (undefined4 *)(local_14 + -0x14);
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_14 + -0x10));
|
|
|
|
if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
FUN_00401340("How quickly the camera responds to player movement");
|
|
|
|
if (param_1 + 0x16 != (undefined4 *)0x0) {
|
|
|
|
FUN_004369a0(param_1 + 0x16,9,&DAT_0083df58,&local_14,&LAB_004565b0,0,0,0);
|
|
|
|
}
|
|
|
|
if (DAT_008380c8 == 0) {
|
|
|
|
iVar2 = FUN_005df0f5(0x8100);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
DAT_008380c8 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
DAT_008380c8 = FUN_00433d20();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cVar1 = FUN_00433710(&DAT_0083df58,&local_10);
|
|
|
|
if ((cVar1 != '\0') && (iVar2 = (**(code **)(*local_10 + 0x44))(), iVar2 != 0)) {
|
|
|
|
*(undefined1 *)(iVar2 + 0x28) = 1;
|
|
|
|
}
|
|
|
|
puVar4 = (undefined4 *)(local_14 + -0x14);
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_14 + -0x10));
|
|
|
|
if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
FUN_00401340("How quickly the camera moves in response to keyboard movement commands");
|
|
|
|
if (param_1 + 0x17 != (undefined4 *)0x0) {
|
|
|
|
FUN_004369a0(param_1 + 0x17,9,&DAT_0083df5c,&local_14,0,0,0,0);
|
|
|
|
}
|
|
|
|
if (DAT_008380c8 == 0) {
|
|
|
|
iVar2 = FUN_005df0f5(0x8100);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
DAT_008380c8 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
DAT_008380c8 = FUN_00433d20();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cVar1 = FUN_00433710(&DAT_0083df5c,&local_10);
|
|
|
|
if ((cVar1 != '\0') && (iVar2 = (**(code **)(*local_10 + 0x44))(), iVar2 != 0)) {
|
|
|
|
*(undefined1 *)(iVar2 + 0x28) = 1;
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_14 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(local_14 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_14 + -0x14))(1);
|
|
|
|
}
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x34))(5,param_1 + 1,1000);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004574e0 at 0x004574E0 (size: 44) ---
|
|
|
|
|
|
undefined4 FUN_004574e0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_00455fe0(param_1);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
iVar1 = FUN_00456020(param_1);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457510 at 0x00457510 (size: 17) ---
|
|
|
|
|
|
void __fastcall FUN_00457510(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x60) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 100) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457530 at 0x00457530 (size: 12) ---
|
|
|
|
|
|
void __fastcall FUN_00457530(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x30) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457540 at 0x00457540 (size: 12) ---
|
|
|
|
|
|
void __fastcall FUN_00457540(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x2c) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457550 at 0x00457550 (size: 12) ---
|
|
|
|
|
|
void __fastcall FUN_00457550(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x38) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x70) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x74) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457560 at 0x00457560 (size: 12) ---
|
|
|
|
|
|
void __fastcall FUN_00457560(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined4 *)(param_1 + 0x34) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x70) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x74) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457570 at 0x00457570 (size: 64) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 FUN_00457570(float param_1,float param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((param_1 == DAT_00796344) && (param_2 == _DAT_0079cc1c)) && (param_3 == _DAT_0079cc20)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004575b0 at 0x004575B0 (size: 160) ---
|
|
|
|
|
|
void __thiscall FUN_004575b0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
piVar1 = DAT_00837ff4;
|
|
|
|
if (*(int *)(param_1 + 0x18) != param_2) {
|
|
|
|
*(int *)(param_1 + 0x18) = param_2;
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0xd0))(param_2);
|
|
|
|
if (*(int *)(param_1 + 0x18) != 0) {
|
|
|
|
*(undefined2 *)(param_1 + 0x40) = 0;
|
|
|
|
*(undefined2 *)(param_1 + 0x42) = 0;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 100))(param_2 != 0);
|
|
|
|
if (*(char *)((int)piVar1 + 0x89) != '\0') {
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0xa0))
|
|
|
|
(0xc0000c1,param_2,0x3f800000,1,1);
|
|
|
|
if (param_2 == 0) {
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0x1c))();
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0x4c))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457650 at 0x00457650 (size: 145) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void FUN_00457650(float param_1,float param_2,float param_3,float *param_4,float *param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float10 fVar4;
|
|
|
|
|
|
|
|
fVar4 = (float10)FUN_0040fad0();
|
|
|
|
fVar1 = param_1;
|
|
|
|
fVar3 = param_2;
|
|
|
|
if (fVar4 - (float10)_DAT_0083df90 <= (float10)_DAT_007994a8) {
|
|
|
|
fVar1 = (_DAT_0083df88 + param_1) * _DAT_007938b8;
|
|
|
|
fVar3 = (_DAT_0083df84 + param_2) * _DAT_007938b8;
|
|
|
|
}
|
|
|
|
fVar2 = _DAT_007938b0 - param_3;
|
|
|
|
*param_4 = fVar1 * param_3 + param_1 * fVar2;
|
|
|
|
_DAT_0083df84 = fVar3 * param_3 + fVar2 * param_2;
|
|
|
|
*param_5 = _DAT_0083df84;
|
|
|
|
_DAT_0083df88 = *param_4;
|
|
|
|
_DAT_0083df90 = (double)fVar4;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004576f0 at 0x004576F0 (size: 88) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
float10 __fastcall FUN_004576f0(float *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
float10 fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
|
|
|
|
fVar3 = *param_1;
|
|
|
|
fVar4 = param_1[1];
|
|
|
|
uVar5 = 0;
|
|
|
|
iVar1 = FUN_004524a0();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
return (float10)DAT_00796344;
|
|
|
|
}
|
|
|
|
fVar2 = (float10)fpatan((float10)fVar4,(float10)fVar3);
|
|
|
|
fVar2 = (float10)_CIfmod((float)((float10)_DAT_0079c6c0 - fVar2 * (float10)_DAT_0079c6c8),fVar3,
|
|
|
|
fVar4,uVar5);
|
|
|
|
return fVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457750 at 0x00457750 (size: 65) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
float10 __fastcall FUN_00457750(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
float10 fVar2;
|
|
|
|
|
|
|
|
iVar1 = FUN_004524a0(*param_1,param_1[1],param_1[2]);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
return (float10)DAT_00796344;
|
|
|
|
}
|
|
|
|
fVar2 = (float10)_CIasin();
|
|
|
|
return fVar2 * (float10)_DAT_0079c6c8;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004577a0 at 0x004577A0 (size: 88) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __fastcall FUN_004577a0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
if (((*(float *)(iVar1 + 0x48) == DAT_00796344) && (*(float *)(iVar1 + 0x4c) == _DAT_0079cc1c)) &&
|
|
|
|
(*(float *)(iVar1 + 0x50) == _DAT_0079cc20)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457800 at 0x00457800 (size: 267) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00457800(int param_1,float param_2,float param_3,float param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00455fa0();
|
|
|
|
if (*(int *)(param_1 + 0x10) == 0) {
|
|
|
|
if (((param_2 != DAT_00796344) || (param_3 != _DAT_0079cc1c)) || (param_4 != _DAT_0079cc20)) {
|
|
|
|
if (*(int *)(param_1 + 0x20) != 0) {
|
|
|
|
FUN_00455fb0(6);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (((param_2 < (float)_DAT_007938c0 != (param_2 == (float)_DAT_007938c0)) &&
|
|
|
|
((float)_DAT_0079cc48 <= param_2)) &&
|
|
|
|
(param_3 < (float)_DAT_00795610 != (param_3 == (float)_DAT_00795610))) {
|
|
|
|
FUN_00455fb0(0x10);
|
|
|
|
if ((param_3 < _DAT_0079cc44 != (param_3 == _DAT_0079cc44)) && (_DAT_0079cc44 <= param_4)) {
|
|
|
|
FUN_00455fb0(1);
|
|
|
|
}
|
|
|
|
if ((param_4 <= _DAT_0079c6dc) && (_DAT_0079cc44 <= param_4)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00455fb0(4);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_00455fb0(0x10);
|
|
|
|
}
|
|
|
|
FUN_00455fb0(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457910 at 0x00457910 (size: 70) ---
|
|
|
|
|
|
void __thiscall FUN_00457910(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
*(undefined4 *)(param_1 + 0x3c) = param_2;
|
|
|
|
iVar1 = FUN_004577a0();
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
iVar1 = FUN_00455fe0(param_2);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_00456020(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_00456020(param_2);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457960 at 0x00457960 (size: 312) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00457960(int param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
float local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
iVar3 = FUN_004577a0();
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
fVar1 = *(float *)(iVar3 + 0x6c);
|
|
|
|
if (fVar1 == param_2) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
local_c = *(float *)(iVar3 + 0x48);
|
|
|
|
local_8 = *(float *)(iVar3 + 0x4c);
|
|
|
|
local_4 = *(float *)(iVar3 + 0x50);
|
|
|
|
if (fVar1 != _DAT_007938b0) {
|
|
|
|
fVar1 = _DAT_007938b0 / fVar1;
|
|
|
|
local_c = local_c * fVar1;
|
|
|
|
local_8 = local_8 * fVar1;
|
|
|
|
local_4 = local_4 * fVar1;
|
|
|
|
if (param_2 == _DAT_007938b0) goto LAB_00457a10;
|
|
|
|
}
|
|
|
|
local_c = local_c * param_2;
|
|
|
|
local_8 = local_8 * param_2;
|
|
|
|
local_4 = local_4 * param_2;
|
|
|
|
LAB_00457a10:
|
|
|
|
iVar3 = FUN_00455fe0(0x3f800000);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_00456020(0x3f800000);
|
|
|
|
}
|
|
|
|
*(float *)(*(int *)(param_1 + 8) + 0x6c) = param_2;
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
*(float *)(iVar3 + 0x48) = local_c;
|
|
|
|
*(float *)(iVar3 + 0x4c) = local_8;
|
|
|
|
*(float *)(iVar3 + 0x50) = local_4;
|
|
|
|
FUN_00457800(local_c,local_8,local_4);
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0x3c);
|
|
|
|
iVar3 = FUN_00455fe0(uVar2);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_00456020(uVar2);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457aa0 at 0x00457AA0 (size: 875) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00457aa0(int param_1,int param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
double dVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
int iVar5;
|
|
|
|
float10 fVar6;
|
|
|
|
float10 fVar7;
|
|
|
|
float10 fVar8;
|
|
|
|
float10 fVar9;
|
|
|
|
float10 fVar10;
|
|
|
|
double local_28;
|
|
|
|
undefined4 local_20;
|
|
|
|
float local_14;
|
|
|
|
float local_10;
|
|
|
|
float local_c;
|
|
|
|
|
|
|
|
*(int *)(param_1 + 0x30) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x2c) = 0;
|
|
|
|
dVar2 = _DAT_008379a8;
|
|
|
|
local_28 = _DAT_008379a8;
|
|
|
|
if (*(double *)(param_1 + 0x68) == _DAT_00795610) {
|
|
|
|
*(double *)(param_1 + 0x68) = _DAT_008379a8 - _DAT_007938c0 / (double)DAT_00838418;
|
|
|
|
}
|
|
|
|
if ((double)_DAT_0079cc40 <= dVar2 - *(double *)(param_1 + 0x68)) {
|
|
|
|
iVar5 = *(int *)(param_1 + 8);
|
|
|
|
local_14 = *(float *)(iVar5 + 0x48);
|
|
|
|
local_10 = *(float *)(iVar5 + 0x4c);
|
|
|
|
local_c = *(float *)(iVar5 + 0x50);
|
|
|
|
if (*(int *)(param_1 + 0x10) == 0) {
|
|
|
|
iVar5 = FUN_00457570(local_14,local_10,local_c);
|
|
|
|
fVar4 = local_10;
|
|
|
|
fVar3 = local_14;
|
|
|
|
dVar2 = local_28;
|
|
|
|
if (iVar5 == 0) {
|
|
|
|
local_28 = (local_28 - *(double *)(param_1 + 0x68)) *
|
|
|
|
(double)*(float *)(*(int *)(param_1 + 8) + 0x5c);
|
|
|
|
if (param_3 != _DAT_007938b0) {
|
|
|
|
local_28 = (double)param_3;
|
|
|
|
}
|
|
|
|
if (*(char *)(DAT_00837ff4 + 0x89) != '\0') {
|
|
|
|
local_28 = local_28 * _DAT_007994a8;
|
|
|
|
}
|
|
|
|
*(double *)(param_1 + 0x68) = dVar2;
|
|
|
|
fVar1 = SQRT(local_10 * local_10 + local_14 * local_14 + local_c * local_c);
|
|
|
|
fVar6 = (float10)FUN_004576f0();
|
|
|
|
fVar9 = (float10)_DAT_0079c504;
|
|
|
|
fVar7 = (float10)FUN_00457750();
|
|
|
|
fVar8 = (float10)local_28;
|
|
|
|
local_28 = (double)CONCAT44(local_28._4_4_,(float)((float10)_DAT_0083e034 * fVar8));
|
|
|
|
fVar10 = (float10)_DAT_0083e034 * fVar8 + fVar7 * (float10)_DAT_0079c504;
|
|
|
|
fVar8 = (float10)fcos(fVar10);
|
|
|
|
fVar7 = (float10)fsin((float10)(float)(fVar6 * fVar9));
|
|
|
|
local_14 = (float)(fVar7 * (float10)fVar1 * fVar8);
|
|
|
|
fVar9 = (float10)fcos((float10)(float)(fVar6 * fVar9));
|
|
|
|
local_10 = (float)(fVar9 * (float10)fVar1 * fVar8);
|
|
|
|
fVar9 = (float10)fsin(fVar10);
|
|
|
|
local_c = (float)(fVar9 * (float10)fVar1);
|
|
|
|
if (DAT_00796344 <= fVar4) {
|
|
|
|
if ((DAT_00796344 < fVar4) && (local_10 < DAT_00796344 != (local_10 == DAT_00796344))) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (DAT_00796344 <= local_10) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (DAT_00796344 <= fVar3) {
|
|
|
|
if ((DAT_00796344 < fVar3) && (local_14 < DAT_00796344 != (local_14 == DAT_00796344))) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (DAT_00796344 <= local_14) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (_DAT_0079cc50 < local_c) {
|
|
|
|
FUN_004574e0(*(undefined4 *)(param_1 + 0x3c));
|
|
|
|
}
|
|
|
|
local_28 = 0.0078125;
|
|
|
|
local_20 = 0;
|
|
|
|
FUN_004564c0(&local_28);
|
|
|
|
iVar5 = *(int *)(param_1 + 8);
|
|
|
|
*(float *)(iVar5 + 0x48) = local_14;
|
|
|
|
*(float *)(iVar5 + 0x4c) = local_10;
|
|
|
|
*(float *)(iVar5 + 0x50) = local_c;
|
|
|
|
FUN_00457800(local_14,local_10,local_c);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = *(int *)(param_1 + 8);
|
|
|
|
local_14 = *(float *)(iVar5 + 0x38);
|
|
|
|
local_10 = *(float *)(iVar5 + 0x3c);
|
|
|
|
local_c = *(float *)(iVar5 + 0x40) - _DAT_0079cc04;
|
|
|
|
if (local_c <= DAT_0079cc08) {
|
|
|
|
if (-DAT_0079cc08 <= local_c) {
|
|
|
|
FUN_004564c0(&local_14);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_c = -DAT_0079cc08;
|
|
|
|
FUN_004564c0(&local_14);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_c = DAT_0079cc08;
|
|
|
|
FUN_004564c0(&local_14);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (-(_DAT_0079cc0c - _DAT_0079cc04) < local_10 !=
|
|
|
|
(-(_DAT_0079cc0c - _DAT_0079cc04) == local_10)) {
|
|
|
|
local_10 = local_10 - _DAT_0079cc04;
|
|
|
|
*(float *)(iVar5 + 0x48) = local_14;
|
|
|
|
*(float *)(iVar5 + 0x4c) = local_10;
|
|
|
|
*(float *)(iVar5 + 0x50) = local_c;
|
|
|
|
}
|
|
|
|
if (param_2 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x30) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00457e10 at 0x00457E10 (size: 757) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00457e10(int param_1,int param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
double dVar2;
|
|
|
|
int iVar3;
|
|
|
|
float10 fVar4;
|
|
|
|
float10 fVar5;
|
|
|
|
float10 fVar6;
|
|
|
|
float10 fVar7;
|
|
|
|
float10 fVar8;
|
|
|
|
double local_28;
|
|
|
|
undefined4 local_20;
|
|
|
|
float local_14;
|
|
|
|
float local_10;
|
|
|
|
float local_c;
|
|
|
|
|
|
|
|
*(int *)(param_1 + 0x2c) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x30) = 0;
|
|
|
|
dVar2 = _DAT_008379a8;
|
|
|
|
local_28 = _DAT_008379a8;
|
|
|
|
if (*(double *)(param_1 + 0x68) == _DAT_00795610) {
|
|
|
|
*(double *)(param_1 + 0x68) = _DAT_008379a8 - _DAT_007938c0 / (double)DAT_00838418;
|
|
|
|
}
|
|
|
|
if ((double)_DAT_0079cc40 <= dVar2 - *(double *)(param_1 + 0x68)) {
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
local_14 = *(float *)(iVar3 + 0x48);
|
|
|
|
local_10 = *(float *)(iVar3 + 0x4c);
|
|
|
|
local_c = *(float *)(iVar3 + 0x50);
|
|
|
|
if (*(int *)(param_1 + 0x10) == 0) {
|
|
|
|
iVar3 = FUN_00457570(local_14,local_10,local_c);
|
|
|
|
dVar2 = local_28;
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
local_28 = (local_28 - *(double *)(param_1 + 0x68)) *
|
|
|
|
(double)*(float *)(*(int *)(param_1 + 8) + 0x5c);
|
|
|
|
if (param_3 != _DAT_007938b0) {
|
|
|
|
local_28 = (double)param_3;
|
|
|
|
}
|
|
|
|
if (*(char *)(DAT_00837ff4 + 0x89) != '\0') {
|
|
|
|
local_28 = local_28 * _DAT_007994a8;
|
|
|
|
}
|
|
|
|
*(double *)(param_1 + 0x68) = dVar2;
|
|
|
|
fVar1 = SQRT(local_10 * local_10 + local_14 * local_14 + local_c * local_c);
|
|
|
|
fVar4 = (float10)FUN_004576f0();
|
|
|
|
fVar7 = (float10)_DAT_0079c504;
|
|
|
|
fVar5 = (float10)FUN_00457750();
|
|
|
|
fVar6 = (float10)local_28;
|
|
|
|
local_28 = (double)CONCAT44(local_28._4_4_,(float)((float10)_DAT_0083e034 * fVar6));
|
|
|
|
fVar8 = fVar5 * (float10)_DAT_0079c504 - (float10)_DAT_0083e034 * fVar6;
|
|
|
|
fVar6 = (float10)fcos(fVar8);
|
|
|
|
fVar5 = (float10)fsin((float10)(float)(fVar4 * fVar7));
|
|
|
|
local_14 = (float)(fVar5 * (float10)fVar1 * fVar6);
|
|
|
|
fVar7 = (float10)fcos((float10)(float)(fVar4 * fVar7));
|
|
|
|
local_10 = (float)(fVar7 * (float10)fVar1 * fVar6);
|
|
|
|
fVar7 = (float10)fsin(fVar8);
|
|
|
|
local_c = (float)(fVar7 * (float10)fVar1);
|
|
|
|
if ((local_10 * local_10 + local_14 * local_14 < _DAT_0079cc3c * _DAT_0079cc3c) &&
|
|
|
|
(local_c < DAT_00796344)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (local_c < _DAT_0079cc50 != (local_c == _DAT_0079cc50)) {
|
|
|
|
FUN_004574e0(0x3f800000);
|
|
|
|
}
|
|
|
|
local_28 = 0.0078125;
|
|
|
|
local_20 = 0;
|
|
|
|
FUN_004564c0(&local_28);
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
*(float *)(iVar3 + 0x48) = local_14;
|
|
|
|
*(float *)(iVar3 + 0x4c) = local_10;
|
|
|
|
*(float *)(iVar3 + 0x50) = local_c;
|
|
|
|
FUN_00457800(local_14,local_10,local_c);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
local_14 = *(float *)(iVar3 + 0x38);
|
|
|
|
local_10 = *(float *)(iVar3 + 0x3c);
|
|
|
|
local_c = *(float *)(iVar3 + 0x40) + _DAT_0079cc04;
|
|
|
|
if (local_c <= DAT_0079cc08) {
|
|
|
|
if (-DAT_0079cc08 <= local_c) {
|
|
|
|
FUN_004564c0(&local_14);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_c = -DAT_0079cc08;
|
|
|
|
FUN_004564c0(&local_14);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_c = DAT_0079cc08;
|
|
|
|
FUN_004564c0(&local_14);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (local_10 < (float)_DAT_0079cc58 != (local_10 == (float)_DAT_0079cc58)) {
|
|
|
|
local_10 = _DAT_0079cc04 + local_10;
|
|
|
|
*(float *)(iVar3 + 0x48) = local_14;
|
|
|
|
*(float *)(iVar3 + 0x4c) = local_10;
|
|
|
|
*(float *)(iVar3 + 0x50) = local_c;
|
|
|
|
}
|
|
|
|
if (param_2 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x2c) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00458110 at 0x00458110 (size: 479) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00458110(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 local_c;
|
|
|
|
float local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
if (param_2 != *(int *)(param_1 + 0x10)) {
|
|
|
|
*(int *)(param_1 + 0x10) = param_2;
|
|
|
|
if (param_2 == 0) {
|
|
|
|
if (*(int *)(param_1 + 0x14) == 0) {
|
|
|
|
iVar1 = FUN_00457570(*(undefined4 *)(param_1 + 0x44),*(undefined4 *)(param_1 + 0x48),
|
|
|
|
*(undefined4 *)(param_1 + 0x4c));
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_004574e0(0x3f800000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = 0;
|
|
|
|
iVar1 = FUN_00457570(*(undefined4 *)(param_1 + 0x44),*(undefined4 *)(param_1 + 0x48),
|
|
|
|
*(undefined4 *)(param_1 + 0x4c));
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_004574e0(*(undefined4 *)(param_1 + 0x3c));
|
|
|
|
}
|
|
|
|
FUN_00451de0(0);
|
|
|
|
FUN_00451df0(0);
|
|
|
|
}
|
|
|
|
FUN_004564c0(param_1 + 0x50);
|
|
|
|
local_c = *(undefined4 *)(param_1 + 0x44);
|
|
|
|
local_8 = *(float *)(param_1 + 0x48);
|
|
|
|
local_4 = *(undefined4 *)(param_1 + 0x4c);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
*(undefined4 *)(param_1 + 0x44) = *(undefined4 *)(iVar1 + 0x48);
|
|
|
|
*(undefined4 *)(param_1 + 0x48) = *(undefined4 *)(iVar1 + 0x4c);
|
|
|
|
*(undefined4 *)(param_1 + 0x4c) = *(undefined4 *)(iVar1 + 0x50);
|
|
|
|
*(undefined4 *)(param_1 + 0x50) = *(undefined4 *)(iVar1 + 0x38);
|
|
|
|
*(undefined4 *)(param_1 + 0x54) = *(undefined4 *)(iVar1 + 0x3c);
|
|
|
|
*(undefined4 *)(param_1 + 0x58) = *(undefined4 *)(iVar1 + 0x40);
|
|
|
|
local_c = 0;
|
|
|
|
local_8 = 0.5;
|
|
|
|
local_4 = 0xbfe66666;
|
|
|
|
FUN_004564c0(&local_c);
|
|
|
|
local_4 = 0x3f400000;
|
|
|
|
local_c = 0;
|
|
|
|
if (*(int *)(param_1 + 0x14) == 0) {
|
|
|
|
iVar1 = FUN_00457570(*(undefined4 *)(param_1 + 0x44),*(undefined4 *)(param_1 + 0x48),
|
|
|
|
*(undefined4 *)(param_1 + 0x4c));
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_004574e0(*(undefined4 *)(param_1 + 0x3c));
|
|
|
|
}
|
|
|
|
local_8 = -2.0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_8 = -_DAT_0079cc18;
|
|
|
|
iVar1 = FUN_00455fe0(0x3f800000);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_00456020(0x3f800000);
|
|
|
|
}
|
|
|
|
FUN_00451de0(1);
|
|
|
|
FUN_00451df0(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
*(undefined4 *)(iVar1 + 0x48) = local_c;
|
|
|
|
*(float *)(iVar1 + 0x4c) = local_8;
|
|
|
|
*(undefined4 *)(iVar1 + 0x50) = local_4;
|
|
|
|
FUN_00457800(local_c,local_8,local_4);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004582f0 at 0x004582F0 (size: 165) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_004582f0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
float fVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
if (param_2 != *(int *)(param_1 + 0x14)) {
|
|
|
|
if (param_2 != 0) {
|
|
|
|
*(int *)(param_1 + 0x14) = param_2;
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0x14) != 0) && (iVar4 = FUN_00455fe0(0x3f800000), iVar4 != 0)) {
|
|
|
|
FUN_00456020(0x3f800000);
|
|
|
|
}
|
|
|
|
FUN_00458110(param_2);
|
|
|
|
if (*(int *)(param_1 + 0x14) != 0) {
|
|
|
|
uVar1 = *(undefined4 *)(*(int *)(param_1 + 8) + 0x48);
|
|
|
|
fVar3 = -_DAT_0079cc18;
|
|
|
|
uVar2 = *(undefined4 *)(*(int *)(param_1 + 8) + 0x50);
|
|
|
|
FUN_00451de0(1);
|
|
|
|
FUN_00451df0(1);
|
|
|
|
iVar4 = *(int *)(param_1 + 8);
|
|
|
|
*(undefined4 *)(iVar4 + 0x48) = uVar1;
|
|
|
|
*(float *)(iVar4 + 0x4c) = fVar3;
|
|
|
|
*(undefined4 *)(iVar4 + 0x50) = uVar2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004583a0 at 0x004583A0 (size: 129) ---
|
|
|
|
|
|
void __thiscall FUN_004583a0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if (param_2 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(param_1 + 0x20) = 1;
|
|
|
|
FUN_004564a0(param_2,0xffffffff);
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
*(undefined4 *)(iVar1 + 0x2c) = 0;
|
|
|
|
*(undefined4 *)(iVar1 + 0x30) = 0;
|
|
|
|
*(undefined4 *)(iVar1 + 0x34) = 0x3f000000;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
FUN_00457800(*(undefined4 *)(iVar1 + 0x48),*(undefined4 *)(iVar1 + 0x4c),
|
|
|
|
*(undefined4 *)(iVar1 + 0x50));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00458430 at 0x00458430 (size: 945) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00458430(int param_1,int param_2,int param_3,float param_4,int param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
double dVar4;
|
|
|
|
float fVar5;
|
|
|
|
undefined4 uVar6;
|
|
|
|
float10 fVar7;
|
|
|
|
float10 fVar8;
|
|
|
|
float10 fVar9;
|
|
|
|
float local_54;
|
|
|
|
undefined4 local_50;
|
|
|
|
undefined4 uStack_4c;
|
|
|
|
undefined4 local_48;
|
|
|
|
float local_3c;
|
|
|
|
float local_38;
|
|
|
|
float local_34;
|
|
|
|
|
|
|
|
iVar3 = DAT_00837ff4;
|
|
|
|
uStack_4c = DAT_008379ac;
|
|
|
|
local_50 = DAT_008379a8;
|
|
|
|
uVar6 = FUN_005108d0();
|
|
|
|
FUN_0051fc90(uVar6);
|
|
|
|
if (*(double *)(param_1 + 0x60) == _DAT_00795610) {
|
|
|
|
*(double *)(param_1 + 0x60) =
|
|
|
|
(double)((float)(double)CONCAT44(uStack_4c,local_50) - (float)_DAT_007938c0 / DAT_00838418)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
if ((double)_DAT_0079cc40 <= (double)CONCAT44(uStack_4c,local_50) - *(double *)(param_1 + 0x60)) {
|
|
|
|
if (*(int *)(param_1 + 0x10) != 0) {
|
|
|
|
FUN_00458110(0);
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 8);
|
|
|
|
local_3c = *(float *)(iVar2 + 0x48);
|
|
|
|
local_38 = *(float *)(iVar2 + 0x4c);
|
|
|
|
local_34 = *(float *)(iVar2 + 0x50);
|
|
|
|
if ((*(char *)(iVar3 + 0x89) == '\0') || (param_5 != 0)) {
|
|
|
|
if ((local_3c == DAT_00796344) && ((local_38 == _DAT_0079cc1c && (local_34 == _DAT_0079cc20)))
|
|
|
|
) {
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0xc) + 0xf8) != 0) {
|
|
|
|
fVar7 = (float10)FUN_00512010();
|
|
|
|
fVar5 = _DAT_0079cc14;
|
|
|
|
fVar1 = (float)fVar7;
|
|
|
|
if (param_2 == 0) {
|
|
|
|
*(int *)(param_1 + 0x28) = param_3;
|
|
|
|
fVar5 = fVar1 - _DAT_0079cc14;
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = 0;
|
|
|
|
if (fVar5 < DAT_00796344) {
|
|
|
|
fVar5 = (_DAT_0079cc60 - _DAT_0079cc14) + fVar1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(int *)(param_1 + 0x24) = param_3;
|
|
|
|
fVar5 = fVar5 + fVar1;
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = 0;
|
|
|
|
if (_DAT_0079cc60 <= fVar5) {
|
|
|
|
fVar5 = fVar1 - (_DAT_0079cc60 - _DAT_0079cc14);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0xc4))(fVar5,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
fVar7 = ((float10)(double)CONCAT44(uStack_4c,local_50) -
|
|
|
|
(float10)*(double *)(param_1 + 0x60)) * (float10)*(float *)(iVar2 + 0x5c);
|
|
|
|
if (param_2 == 0) {
|
|
|
|
if (param_4 != _DAT_007938b0) {
|
|
|
|
fVar7 = (float10)param_4;
|
|
|
|
}
|
|
|
|
fVar9 = (float10)_DAT_0083e034;
|
|
|
|
*(int *)(param_1 + 0x28) = param_3;
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = 0;
|
|
|
|
fVar8 = (float10)fsin(fVar7 * fVar9);
|
|
|
|
fVar7 = (float10)fcos(fVar7 * fVar9);
|
|
|
|
fVar9 = (float10)local_3c * fVar7 - fVar8 * (float10)local_38;
|
|
|
|
fVar7 = fVar8 * (float10)local_3c + fVar7 * (float10)local_38;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (param_4 != _DAT_007938b0) {
|
|
|
|
fVar7 = (float10)param_4;
|
|
|
|
}
|
|
|
|
fVar9 = (float10)_DAT_0083e034;
|
|
|
|
*(int *)(param_1 + 0x24) = param_3;
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = 0;
|
|
|
|
fVar8 = (float10)fsin(fVar7 * fVar9);
|
|
|
|
fVar7 = (float10)fcos(fVar7 * fVar9);
|
|
|
|
fVar9 = (float10)local_3c * fVar7 - -(fVar8 * (float10)local_38);
|
|
|
|
fVar7 = fVar7 * (float10)local_38 - fVar8 * (float10)local_3c;
|
|
|
|
}
|
|
|
|
local_3c = (float)fVar9;
|
|
|
|
local_38 = (float)fVar7;
|
|
|
|
*(undefined4 *)(param_1 + 0x60) = local_50;
|
|
|
|
*(undefined4 *)(param_1 + 100) = uStack_4c;
|
|
|
|
local_50 = 0;
|
|
|
|
uStack_4c = 0x3f800000;
|
|
|
|
local_48 = 0;
|
|
|
|
FUN_004564c0(&local_50);
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
*(float *)(iVar3 + 0x48) = local_3c;
|
|
|
|
*(float *)(iVar3 + 0x4c) = local_38;
|
|
|
|
*(float *)(iVar3 + 0x50) = local_34;
|
|
|
|
FUN_00457800(local_3c,local_38,local_34);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = *(int *)(param_1 + 0xc);
|
|
|
|
if (*(int *)(iVar3 + 0xf8) != 0) {
|
|
|
|
fVar7 = ((float10)(double)CONCAT44(uStack_4c,local_50) -
|
|
|
|
(float10)*(double *)(param_1 + 0x60)) * (float10)*(float *)(iVar2 + 0x5c);
|
|
|
|
if (param_4 != _DAT_007938b0) {
|
|
|
|
fVar7 = (float10)param_4;
|
|
|
|
}
|
|
|
|
if ((fVar7 < (float10)_DAT_0079cc78) && ((float10)_DAT_0079cc70 < fVar7)) {
|
|
|
|
(**(code **)(**(int **)(iVar3 + 0xb8) + 0xa4))();
|
|
|
|
FUN_0051fcc0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
local_54 = (float)(fVar7 + fVar7);
|
|
|
|
if ((float10)_DAT_0079cc68 < fVar7 + fVar7) {
|
|
|
|
local_54 = 1.5;
|
|
|
|
}
|
|
|
|
if (param_2 == 0) {
|
|
|
|
uVar6 = 0x6500000e;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar6 = 0x6500000d;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(iVar3 + 0xb8) + 0xa0))(uVar6,1,local_54,1,1);
|
|
|
|
dVar4 = (double)CONCAT44(uStack_4c,local_50);
|
|
|
|
*(double *)(param_1 + 0x60) = dVar4;
|
|
|
|
if (*(double *)(param_1 + 0x78) + _DAT_00799088 < dVar4) {
|
|
|
|
*(double *)(param_1 + 0x78) = dVar4;
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0x4c))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (param_3 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x24) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x28) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x60) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 100) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0051fcc0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004587f0 at 0x004587F0 (size: 442) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_004587f0(int param_1,int param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
float fVar2;
|
|
|
|
float fVar3;
|
|
|
|
float fVar4;
|
|
|
|
double dVar5;
|
|
|
|
float10 fVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
|
|
|
|
if (param_3 != DAT_00796344) {
|
|
|
|
*(int *)(param_1 + 0x38) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x34) = 0;
|
|
|
|
if (*(int *)(param_1 + 0x10) != 0) {
|
|
|
|
FUN_00458110(0);
|
|
|
|
}
|
|
|
|
dVar5 = _DAT_008379a8;
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
fVar2 = *(float *)(iVar1 + 0x48);
|
|
|
|
fVar3 = *(float *)(iVar1 + 0x4c);
|
|
|
|
fVar4 = *(float *)(iVar1 + 0x50);
|
|
|
|
if (((fVar2 != DAT_00796344) || (fVar3 != _DAT_0079cc1c)) || (fVar4 != _DAT_0079cc20)) {
|
|
|
|
fVar6 = (float10)_DAT_008379a8;
|
|
|
|
if (*(double *)(param_1 + 0x70) == _DAT_00795610) {
|
|
|
|
*(double *)(param_1 + 0x70) =
|
|
|
|
(double)(fVar6 - (float10)_DAT_007938c0 / (float10)DAT_00838418);
|
|
|
|
}
|
|
|
|
fVar6 = fVar6 - (float10)*(double *)(param_1 + 0x70);
|
|
|
|
if ((float10)_DAT_0079cc40 <= fVar6) {
|
|
|
|
fVar6 = fVar6 * (float10)*(float *)(iVar1 + 0x5c);
|
|
|
|
if (param_3 != _DAT_007938b0) {
|
|
|
|
fVar6 = (float10)_DAT_007938b0 / (float10)param_3;
|
|
|
|
}
|
|
|
|
fVar6 = (float10)_DAT_007938c0 - fVar6 * (float10)_DAT_0079cc04;
|
|
|
|
fVar2 = (float)((float10)fVar2 * fVar6);
|
|
|
|
fVar3 = (float)((float10)fVar3 * fVar6);
|
|
|
|
fVar4 = (float)(fVar6 * (float10)fVar4);
|
|
|
|
*(double *)(param_1 + 0x70) = dVar5;
|
|
|
|
if (_DAT_0079cc30 <= SQRT(fVar4 * fVar4 + fVar2 * fVar2 + fVar3 * fVar3)) {
|
|
|
|
if (fVar4 <= _DAT_0079cc50) {
|
|
|
|
uVar7 = 0x3f800000;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar7 = *(undefined4 *)(param_1 + 0x3c);
|
|
|
|
}
|
|
|
|
FUN_004574e0(uVar7);
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
*(float *)(iVar1 + 0x48) = fVar2;
|
|
|
|
*(float *)(iVar1 + 0x4c) = fVar3;
|
|
|
|
*(float *)(iVar1 + 0x50) = fVar4;
|
|
|
|
FUN_00457800(fVar2,fVar3,fVar4);
|
|
|
|
if (param_2 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x38) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x70) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x74) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004589b0 at 0x004589B0 (size: 586) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_004589b0(int param_1,int param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
double dVar2;
|
|
|
|
int iVar3;
|
|
|
|
float10 fVar4;
|
|
|
|
float local_18;
|
|
|
|
float local_14;
|
|
|
|
float local_10;
|
|
|
|
|
|
|
|
*(int *)(param_1 + 0x34) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x38) = 0;
|
|
|
|
if (*(int *)(param_1 + 0x10) != 0) {
|
|
|
|
FUN_00458110(0);
|
|
|
|
}
|
|
|
|
dVar2 = _DAT_008379a8;
|
|
|
|
fVar4 = (float10)_DAT_008379a8;
|
|
|
|
if (*(double *)(param_1 + 0x70) == _DAT_00795610) {
|
|
|
|
*(double *)(param_1 + 0x70) = (double)(fVar4 - (float10)_DAT_007938c0 / (float10)DAT_00838418);
|
|
|
|
}
|
|
|
|
fVar4 = fVar4 - (float10)*(double *)(param_1 + 0x70);
|
|
|
|
if ((float10)_DAT_0079cc40 <= fVar4) {
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
local_18 = *(float *)(iVar3 + 0x48);
|
|
|
|
if (((local_18 == DAT_00796344) && (*(float *)(iVar3 + 0x4c) == _DAT_0079cc1c)) &&
|
|
|
|
(*(float *)(iVar3 + 0x50) == _DAT_0079cc20)) {
|
|
|
|
*(double *)(param_1 + 0x70) = dVar2;
|
|
|
|
iVar3 = *(int *)(*(int *)(param_1 + 0xc) + 0xf4);
|
|
|
|
local_14 = -0.6;
|
|
|
|
local_10 = 0.5;
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_00455fc0(iVar3,0xffffffff);
|
|
|
|
uVar1 = DAT_0079cc2c;
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
*(undefined4 *)(iVar3 + 0x18) = 0;
|
|
|
|
*(undefined4 *)(iVar3 + 0x1c) = 0;
|
|
|
|
*(undefined4 *)(iVar3 + 0x20) = uVar1;
|
|
|
|
}
|
|
|
|
uVar1 = *(undefined4 *)(param_1 + 0x3c);
|
|
|
|
iVar3 = FUN_00455fe0(uVar1);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_00456020(uVar1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
fVar4 = fVar4 * (float10)*(float *)(iVar3 + 0x5c);
|
|
|
|
if (param_3 != _DAT_007938b0) {
|
|
|
|
fVar4 = (float10)param_3;
|
|
|
|
}
|
|
|
|
fVar4 = fVar4 * (float10)_DAT_0079cc04 + (float10)_DAT_007938c0;
|
|
|
|
local_18 = (float)((float10)local_18 * fVar4);
|
|
|
|
local_14 = (float)((float10)*(float *)(iVar3 + 0x4c) * fVar4);
|
|
|
|
local_10 = (float)(fVar4 * (float10)*(float *)(iVar3 + 0x50));
|
|
|
|
*(double *)(param_1 + 0x70) = dVar2;
|
|
|
|
if (_DAT_0079cc0c < ABS(local_18)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (_DAT_0079cc0c < ABS(local_14)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (_DAT_0079cc18 < local_10) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (local_10 <= _DAT_0079cc50) {
|
|
|
|
FUN_004574e0(0x3f800000);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_004574e0(*(undefined4 *)(param_1 + 0x3c));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
*(float *)(iVar3 + 0x48) = local_18;
|
|
|
|
*(float *)(iVar3 + 0x4c) = local_14;
|
|
|
|
*(float *)(iVar3 + 0x50) = local_10;
|
|
|
|
FUN_00457800(local_18,local_14,local_10);
|
|
|
|
if (param_2 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x34) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x70) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x74) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00458c00 at 0x00458C00 (size: 509) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_00458c00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
float10 fVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined1 auStack_48 [72];
|
|
|
|
|
|
|
|
iVar1 = (**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0xd4))();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x24) == 0) {
|
|
|
|
if (*(int *)(param_1 + 0x28) == 0) goto LAB_00458c4c;
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = 1;
|
|
|
|
}
|
|
|
|
FUN_00458430(uVar3,1,0x3f800000,1);
|
|
|
|
LAB_00458c4c:
|
|
|
|
if (*(int *)(param_1 + 0x38) == 0) {
|
|
|
|
if (*(int *)(param_1 + 0x34) != 0) {
|
|
|
|
FUN_004589b0(1,0x3f800000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_004587f0(1,0x3f800000);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x30) == 0) {
|
|
|
|
if (*(int *)(param_1 + 0x2c) != 0) {
|
|
|
|
FUN_00457e10(1,0x3f800000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_00457aa0(1,0x3f800000);
|
|
|
|
}
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0xc) + 0xf8) != 0) {
|
|
|
|
iVar1 = FUN_004577a0();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
DAT_0083df98 = 1.0;
|
|
|
|
FUN_00512190(0x3f800000);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_00424d10();
|
|
|
|
iVar1 = FUN_00456610(auStack_48);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
if (DAT_00796344 < DAT_0083df98) {
|
|
|
|
DAT_0083df98 = 0.0;
|
|
|
|
FUN_00512190(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
fVar2 = (float10)FUN_005aa560(*(int *)(param_1 + 0xc) + 8);
|
|
|
|
if (fVar2 < (float10)_DAT_0079cc34) {
|
|
|
|
DAT_0083df98 = (float)((float10)_DAT_007938b0 -
|
|
|
|
((float10)_DAT_0079cc38 - fVar2) /
|
|
|
|
((float10)_DAT_0079cc38 - (float10)_DAT_0079cc34));
|
|
|
|
if (DAT_00796344 <= DAT_0083df98) {
|
|
|
|
if (_DAT_007938b0 < DAT_0083df98) {
|
|
|
|
DAT_0083df98 = 1.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
DAT_0083df98 = 0.0;
|
|
|
|
}
|
|
|
|
FUN_00512190(DAT_0083df98);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (DAT_00796344 < DAT_0083df98) {
|
|
|
|
DAT_0083df98 = 0.0;
|
|
|
|
FUN_00512190(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00458e00 at 0x00458E00 (size: 155) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_00458e00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x10) != 0) {
|
|
|
|
FUN_00458110(0);
|
|
|
|
}
|
|
|
|
FUN_00455fe0(0x3f800000);
|
|
|
|
local_c = 0;
|
|
|
|
local_8 = 0x3f800000;
|
|
|
|
local_4 = 0;
|
|
|
|
FUN_004564c0(&local_c);
|
|
|
|
uVar3 = _DAT_0079cc20;
|
|
|
|
uVar2 = _DAT_0079cc1c;
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
local_8 = _DAT_0079cc1c;
|
|
|
|
local_4 = _DAT_0079cc20;
|
|
|
|
local_c = 0;
|
|
|
|
*(undefined4 *)(iVar1 + 0x48) = 0;
|
|
|
|
*(undefined4 *)(iVar1 + 0x4c) = uVar2;
|
|
|
|
*(undefined4 *)(iVar1 + 0x50) = uVar3;
|
|
|
|
FUN_00457800(0,uVar2,uVar3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00458ea0 at 0x00458EA0 (size: 507) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_00458ea0(int param_1,float param_2,float param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
float fVar5;
|
|
|
|
|
|
|
|
iVar3 = DAT_00837ff4;
|
|
|
|
uVar2 = DAT_008379ac;
|
|
|
|
uVar1 = DAT_008379a8;
|
|
|
|
uVar4 = *(undefined4 *)(DAT_00837ff4 + 0x84);
|
|
|
|
if ((param_2 == 0.0) && (param_3 == 0.0)) {
|
|
|
|
if (*(char *)(DAT_00837ff4 + 0x89) == '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0xa4))();
|
|
|
|
if (*(double *)(param_1 + 0x78) + _DAT_00799088 < (double)CONCAT44(uVar2,uVar1)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x78) = uVar1;
|
|
|
|
*(undefined4 *)(param_1 + 0x7c) = uVar2;
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0xc) + 0xb8) + 0x4c))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00457650((float)(int)param_2,(float)(int)param_3,uVar4,¶m_3,¶m_2);
|
|
|
|
fVar5 = *(float *)(iVar3 + 0x80);
|
|
|
|
param_3 = param_3 * fVar5 * _DAT_0079cc80;
|
|
|
|
param_2 = fVar5 * param_2 * _DAT_0079cc80;
|
|
|
|
if (*(char *)(iVar3 + 0x88) != '\0') {
|
|
|
|
param_2 = -param_2;
|
|
|
|
param_3 = -param_3;
|
|
|
|
}
|
|
|
|
if (param_3 == DAT_00796344) {
|
|
|
|
*(undefined2 *)(param_1 + 0x40) = 0;
|
|
|
|
goto LAB_0045901e;
|
|
|
|
}
|
|
|
|
*(short *)(param_1 + 0x40) = *(short *)(param_1 + 0x40) + 1;
|
|
|
|
if (*(short *)(param_1 + 0x40) < 6) goto LAB_0045901e;
|
|
|
|
if (param_3 <= DAT_00796344) {
|
|
|
|
if (DAT_00796344 <= param_3) goto LAB_0045901e;
|
|
|
|
iVar3 = FUN_004577a0();
|
|
|
|
fVar5 = ABS(param_3);
|
|
|
|
if (iVar3 == 0) goto LAB_00459017;
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = FUN_004577a0();
|
|
|
|
fVar5 = ABS(param_3);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
LAB_00459017:
|
|
|
|
uVar4 = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00458430(uVar4,0,fVar5,0);
|
|
|
|
LAB_0045901e:
|
|
|
|
if (param_2 == DAT_00796344) {
|
|
|
|
*(undefined2 *)(param_1 + 0x42) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*(short *)(param_1 + 0x42) = *(short *)(param_1 + 0x42) + 1;
|
|
|
|
if (5 < *(short *)(param_1 + 0x42)) {
|
|
|
|
if (DAT_00796344 < param_2) {
|
|
|
|
FUN_00457e10(0,param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (param_2 < DAT_00796344) {
|
|
|
|
FUN_00457aa0(0,ABS(param_2));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004590a0 at 0x004590A0 (size: 307) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_004590a0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
float fVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 local_c;
|
|
|
|
float local_8;
|
|
|
|
float local_4;
|
|
|
|
|
|
|
|
if (param_2 != 0) {
|
|
|
|
if (*(int *)(param_1 + 0x10) != 0) {
|
|
|
|
FUN_00458110(0);
|
|
|
|
}
|
|
|
|
iVar3 = FUN_004577a0();
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_004589b0(0,0x3f800000);
|
|
|
|
}
|
|
|
|
fVar1 = *(float *)(*(int *)(param_1 + 8) + 0x6c);
|
|
|
|
iVar3 = *(int *)(*(int *)(param_1 + 0xc) + 0xf4);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_00455fc0(iVar3,0xffffffff);
|
|
|
|
uVar2 = DAT_0079cc2c;
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
*(undefined4 *)(iVar3 + 0x18) = 0;
|
|
|
|
*(undefined4 *)(iVar3 + 0x1c) = 0;
|
|
|
|
*(undefined4 *)(iVar3 + 0x20) = uVar2;
|
|
|
|
}
|
|
|
|
local_c = 0;
|
|
|
|
local_8 = 1.0;
|
|
|
|
local_4 = 0.0;
|
|
|
|
FUN_004564c0(&local_c);
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0x3c);
|
|
|
|
iVar3 = FUN_00455fe0(uVar2);
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_00456020(uVar2);
|
|
|
|
}
|
|
|
|
iVar3 = *(int *)(param_1 + 8);
|
|
|
|
local_8 = _DAT_0079cc24 * fVar1;
|
|
|
|
local_c = 0;
|
|
|
|
local_4 = _DAT_0079cc28 * fVar1;
|
|
|
|
*(undefined4 *)(iVar3 + 0x48) = 0;
|
|
|
|
*(float *)(iVar3 + 0x4c) = local_8;
|
|
|
|
*(float *)(iVar3 + 0x50) = local_4;
|
|
|
|
FUN_00457800(0,local_8,local_4);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004591e0 at 0x004591E0 (size: 141) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004591e0(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
param_1[1] = 1;
|
|
|
|
*param_1 = &PTR_LAB_0079cc84;
|
|
|
|
param_1[3] = param_2;
|
|
|
|
param_1[4] = 0;
|
|
|
|
param_1[5] = 0;
|
|
|
|
param_1[6] = 0;
|
|
|
|
param_1[7] = 0;
|
|
|
|
param_1[8] = 0;
|
|
|
|
param_1[9] = 0;
|
|
|
|
param_1[10] = 0;
|
|
|
|
param_1[0xb] = 0;
|
|
|
|
param_1[0xc] = 0;
|
|
|
|
param_1[0xd] = 0;
|
|
|
|
param_1[0xe] = 0;
|
|
|
|
*(undefined2 *)(param_1 + 0x10) = 0;
|
|
|
|
*(undefined2 *)((int)param_1 + 0x42) = 0;
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
param_1[0x1d] = 0;
|
|
|
|
param_1[0x1e] = 0;
|
|
|
|
param_1[0x1f] = 0;
|
|
|
|
param_1[0x20] = 0;
|
|
|
|
param_1[0x21] = 0;
|
|
|
|
param_1[2] = *(undefined4 *)(param_2 + 0xa0);
|
|
|
|
FUN_00456430(param_1);
|
|
|
|
param_1[0xf] = *(undefined4 *)(param_1[2] + 8);
|
|
|
|
FUN_004590a0(1);
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004592b0 at 0x004592B0 (size: 28) ---
|
|
|
|
|
|
int __fastcall FUN_004592b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
do {
|
|
|
|
if (*(int *)(param_1 + 0xb0) != 0) {
|
|
|
|
return *(int *)(param_1 + 0xb0);
|
|
|
|
}
|
|
|
|
param_1 = *(int *)(param_1 + 0xac);
|
|
|
|
} while (param_1 != 0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004592d0 at 0x004592D0 (size: 30) ---
|
|
|
|
|
|
void __thiscall FUN_004592d0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 2 ^ *(uint *)(param_1 + 0x554)) & 4;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004592f0 at 0x004592F0 (size: 32) ---
|
|
|
|
|
|
void __thiscall FUN_004592f0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 0xf ^ *(uint *)(param_1 + 0x554)) & 0x8000;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459310 at 0x00459310 (size: 29) ---
|
|
|
|
|
|
void FUN_00459310(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (DAT_0083e03c != 0) {
|
|
|
|
(*(code *)**(undefined4 **)(DAT_0083e03c + 4))(1);
|
|
|
|
}
|
|
|
|
DAT_0083e03c = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459370 at 0x00459370 (size: 44) ---
|
|
|
|
|
|
void __thiscall FUN_00459370(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 uVar1;
|
|
|
|
|
|
|
|
if (*(char *)(param_1 + 0x325) == '\0') {
|
|
|
|
uVar1 = (**(code **)(**(int **)(param_1 + 0x248) + 0x58))(param_2,param_3);
|
|
|
|
*(undefined1 *)(param_1 + 0x325) = uVar1;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004593a0 at 0x004593A0 (size: 62) ---
|
|
|
|
|
|
void __fastcall FUN_004593a0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(char *)(param_1 + 0x325) != '\0') {
|
|
|
|
*(undefined1 *)(param_1 + 0x325) = 0;
|
|
|
|
if (*(int **)(param_1 + 0x248) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x248) + 0x5c))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x2f8) != 0) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004593e0 at 0x004593E0 (size: 25) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __thiscall FUN_004593e0(int param_1,float param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(double *)(param_1 + 0x2e0) =
|
|
|
|
(double)(((float)_DAT_008379b0 - *(float *)(param_1 + 0x2f0)) + param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459400 at 0x00459400 (size: 63) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_00459400(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((*(int *)(param_1 + 0x31c) != 0) &&
|
|
|
|
((*(uint *)(*(int *)(param_1 + 0x31c) + 0x554) >> 0xf & 1) != 0)) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x31c) = 0;
|
|
|
|
}
|
|
|
|
*(undefined1 *)(param_1 + 0x324) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 800) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x318) = 0;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459440 at 0x00459440 (size: 68) ---
|
|
|
|
|
|
void __thiscall FUN_00459440(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0x33c) != 0) {
|
|
|
|
FUN_00474ff0(param_2);
|
|
|
|
}
|
|
|
|
if (((char)param_2 == '\0') &&
|
|
|
|
(*(undefined4 *)(param_1 + 0x2f4) = 0, *(int *)(param_1 + 0x2f8) != 0)) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459490 at 0x00459490 (size: 156) ---
|
|
|
|
|
|
undefined4 FUN_00459490(int param_1,int param_2,int param_3,int *param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
if ((*(uint *)(param_1 + 0xa4) >> 1 & 1) != 0) {
|
|
|
|
for (iVar2 = FUN_00463690(); iVar2 != 0; iVar2 = FUN_004644f0(iVar2)) {
|
|
|
|
cVar1 = FUN_0069fcc0(param_2,param_3);
|
|
|
|
if ((cVar1 != '\0') &&
|
|
|
|
(cVar1 = FUN_00459490(iVar2,param_2 - *(int *)(iVar2 + 0x7c),
|
|
|
|
param_3 - *(int *)(iVar2 + 0x80),param_4), cVar1 != '\0')) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(char *)(param_1 + 0x545) != '\0') || ((*(uint *)(param_1 + 0xa4) >> 6 & 1) != 0)) {
|
|
|
|
*param_4 = param_1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459530 at 0x00459530 (size: 82) ---
|
|
|
|
|
|
uint __thiscall FUN_00459530(int *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int *piVar4;
|
|
|
|
|
|
|
|
piVar3 = (int *)*param_1;
|
|
|
|
piVar4 = piVar3 + param_1[2];
|
|
|
|
if (piVar3 < piVar4) {
|
|
|
|
do {
|
|
|
|
if (*piVar3 == *param_2) {
|
|
|
|
if (piVar3 < piVar4 + -1) {
|
|
|
|
iVar2 = ((uint)((int)(piVar4 + -1) + (-1 - (int)piVar3)) >> 2) + 1;
|
|
|
|
piVar4 = piVar3;
|
|
|
|
for (; piVar3 = piVar3 + 1, iVar2 != 0; iVar2 = iVar2 + -1) {
|
|
|
|
*piVar4 = *piVar3;
|
|
|
|
piVar4 = piVar4 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = param_1[2];
|
|
|
|
param_1[2] = iVar2 + -1;
|
|
|
|
iVar1 = *param_1;
|
|
|
|
*(undefined4 *)(iVar1 + (iVar2 + -1) * 4) = 0;
|
|
|
|
return CONCAT31((int3)((uint)iVar1 >> 8),1);
|
|
|
|
}
|
|
|
|
piVar3 = piVar3 + 1;
|
|
|
|
} while (piVar3 < piVar4);
|
|
|
|
}
|
|
|
|
return (uint)param_1 & 0xffffff00;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459590 at 0x00459590 (size: 68) ---
|
|
|
|
|
|
uint __thiscall FUN_00459590(int *param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
|
|
|
|
uVar1 = param_1[2];
|
|
|
|
if (param_2 < uVar1) {
|
|
|
|
puVar3 = (undefined4 *)(*param_1 + param_2 * 4);
|
|
|
|
puVar4 = (undefined4 *)(*param_1 + (uVar1 - 1) * 4);
|
|
|
|
param_1[2] = uVar1 - 1;
|
|
|
|
if (puVar3 < puVar4) {
|
|
|
|
iVar2 = ((uint)((int)puVar4 + (-1 - (int)puVar3)) >> 2) + 1;
|
|
|
|
puVar4 = puVar3;
|
|
|
|
for (; puVar3 = puVar3 + 1, iVar2 != 0; iVar2 = iVar2 + -1) {
|
|
|
|
*puVar4 = *puVar3;
|
|
|
|
puVar4 = puVar4 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar2 = param_1[2];
|
|
|
|
*(undefined4 *)(*param_1 + iVar2 * 4) = 0;
|
|
|
|
return CONCAT31((int3)((uint)iVar2 >> 8),1);
|
|
|
|
}
|
|
|
|
return uVar1 & 0xffffff00;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004595e0 at 0x004595E0 (size: 116) ---
|
|
|
|
|
|
void __fastcall FUN_004595e0(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 local_10 [4];
|
|
|
|
|
|
|
|
param_1[2] = 0;
|
|
|
|
if ((param_1[1] & 0x80000000U) != 0x80000000) {
|
|
|
|
if (*param_1 != 0) {
|
|
|
|
uVar1 = param_1[1] & 0x7fffffff;
|
|
|
|
if (-1 < (int)(uVar1 - 1)) {
|
|
|
|
iVar3 = (uVar1 - 1) * 0x10;
|
|
|
|
do {
|
|
|
|
puVar2 = (undefined4 *)(*param_1 + iVar3);
|
|
|
|
if (puVar2 != local_10) {
|
|
|
|
*puVar2 = 0;
|
|
|
|
puVar2[2] = 0;
|
|
|
|
puVar2[1] = 0;
|
|
|
|
puVar2[3] = 0;
|
|
|
|
}
|
|
|
|
iVar3 = iVar3 + -0x10;
|
|
|
|
uVar1 = uVar1 - 1;
|
|
|
|
} while (uVar1 != 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
operator_delete__((void *)*param_1);
|
|
|
|
*param_1 = 0;
|
|
|
|
param_1[1] = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459660 at 0x00459660 (size: 74) ---
|
|
|
|
|
|
void __thiscall
|
|
|
|
FUN_00459660(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
|
|
|
|
undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8,
|
|
|
|
undefined4 param_9,undefined4 param_10)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = param_2;
|
|
|
|
param_1[1] = param_3;
|
|
|
|
param_1[2] = param_4;
|
|
|
|
param_1[3] = param_5;
|
|
|
|
param_1[4] = param_6;
|
|
|
|
param_1[9] = 0;
|
|
|
|
param_1[5] = param_7;
|
|
|
|
param_1[6] = param_8;
|
|
|
|
param_1[7] = param_9;
|
|
|
|
param_1[8] = param_10;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004596b0 at 0x004596B0 (size: 178) ---
|
|
|
|
|
|
void __fastcall FUN_004596b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
uint uVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iVar5;
|
|
|
|
uint uVar6;
|
|
|
|
int *piVar7;
|
|
|
|
uint local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
local_8 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x19c) == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x19c) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
do {
|
|
|
|
piVar1 = *(int **)(*(int *)(param_1 + 0x194) + local_8 * 8 + 4);
|
|
|
|
uVar2 = piVar1[2];
|
|
|
|
uVar6 = 0;
|
|
|
|
if (uVar2 != 0) {
|
|
|
|
piVar3 = (int *)*piVar1;
|
|
|
|
piVar7 = piVar3;
|
|
|
|
do {
|
|
|
|
if (*piVar7 == *(int *)(*(int *)(param_1 + 0x194) + local_8 * 8)) {
|
|
|
|
if ((piVar7[1] == 0) && (uVar6 < uVar2)) {
|
|
|
|
uVar2 = uVar2 - 1;
|
|
|
|
piVar1[2] = uVar2;
|
|
|
|
if (uVar6 != uVar2) {
|
|
|
|
piVar3[uVar6 * 2] = piVar3[uVar2 * 2];
|
|
|
|
piVar3[uVar6 * 2 + 1] = piVar3[uVar2 * 2 + 1];
|
|
|
|
iVar4 = piVar1[2];
|
|
|
|
iVar5 = *piVar1;
|
|
|
|
*(uint *)(iVar5 + iVar4 * 8) = local_8;
|
|
|
|
*(undefined4 *)(iVar5 + 4 + iVar4 * 8) = local_4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
uVar6 = uVar6 + 1;
|
|
|
|
piVar7 = piVar7 + 2;
|
|
|
|
} while (uVar6 < (uint)piVar1[2]);
|
|
|
|
}
|
|
|
|
local_8 = local_8 + 1;
|
|
|
|
if (*(uint *)(param_1 + 0x19c) <= local_8) {
|
|
|
|
*(undefined4 *)(param_1 + 0x19c) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459770 at 0x00459770 (size: 269) ---
|
|
|
|
|
|
void __thiscall FUN_00459770(int param_1,undefined4 param_2,int *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iVar5;
|
|
|
|
int *piVar6;
|
|
|
|
int iStack_c;
|
|
|
|
int iStack_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
piVar2 = param_3;
|
|
|
|
iVar3 = FUN_0069fe60();
|
|
|
|
local_4 = FUN_0069fe70();
|
|
|
|
iVar4 = (**(code **)(*DAT_00837ff4 + 0x18))();
|
|
|
|
param_3 = (int *)(iVar4 + 0x20);
|
|
|
|
iVar5 = (**(code **)(*DAT_00837ff4 + 0x1c))();
|
|
|
|
iStack_c = iVar5 + 0x20;
|
|
|
|
iStack_8 = 0;
|
|
|
|
param_3 = &iStack_8;
|
|
|
|
if (-1 < iVar4 + 0x20) {
|
|
|
|
param_3 = (int *)¶m_3;
|
|
|
|
}
|
|
|
|
param_3 = (int *)*param_3;
|
|
|
|
iStack_8 = 0;
|
|
|
|
piVar6 = &iStack_8;
|
|
|
|
if (-1 < iVar5 + 0x20) {
|
|
|
|
piVar6 = &iStack_c;
|
|
|
|
}
|
|
|
|
iVar4 = *piVar6;
|
|
|
|
iStack_c = iVar4;
|
|
|
|
iVar5 = FUN_0054fd20();
|
|
|
|
iStack_8 = iVar5 - iVar3;
|
|
|
|
piVar6 = &iStack_8;
|
|
|
|
if ((int)param_3 <= iVar5 - iVar3) {
|
|
|
|
piVar6 = (int *)¶m_3;
|
|
|
|
}
|
|
|
|
iVar3 = *piVar6;
|
|
|
|
iVar5 = FUN_0054fd30();
|
|
|
|
param_3 = (int *)(iVar5 - local_4);
|
|
|
|
piVar6 = (int *)¶m_3;
|
|
|
|
if (iVar4 <= (int)param_3) {
|
|
|
|
piVar6 = &iStack_c;
|
|
|
|
}
|
|
|
|
iVar4 = *piVar6;
|
|
|
|
piVar2[0x155] = piVar2[0x155] | 0x8000;
|
|
|
|
FUN_00461cb0(1);
|
|
|
|
FUN_004601e0(1);
|
|
|
|
(**(code **)(*piVar2 + 0x2c))(iVar3,iVar4);
|
|
|
|
*(int **)(param_1 + 0x2f8) = piVar2;
|
|
|
|
uVar1 = DAT_008379b4;
|
|
|
|
*(undefined4 *)(param_1 + 0x2e0) = DAT_008379b0;
|
|
|
|
*(undefined4 *)(param_1 + 0x2e4) = uVar1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459960 at 0x00459960 (size: 27) ---
|
|
|
|
|
|
void FUN_00459960(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_1 != 0) {
|
|
|
|
FUN_00459530(¶m_1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459980 at 0x00459980 (size: 87) ---
|
|
|
|
|
|
void __fastcall FUN_00459980(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
int *piVar3;
|
|
|
|
|
|
|
|
piVar3 = *(int **)(*(int *)(param_1 + 0x330) + -4 + *(int *)(param_1 + 0x338) * 4);
|
|
|
|
if (piVar3 != (int *)0x0) {
|
|
|
|
iVar2 = (*(int *)(param_1 + 0x338) + -1) * 4;
|
|
|
|
while( true ) {
|
|
|
|
cVar1 = FUN_004603a0();
|
|
|
|
if (cVar1 != '\0') break;
|
|
|
|
piVar3 = *(int **)(iVar2 + -4 + *(int *)(param_1 + 0x330));
|
|
|
|
iVar2 = iVar2 + -4;
|
|
|
|
if ((piVar3 == *(int **)(param_1 + 0x9c)) || (piVar3 == (int *)0x0)) break;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar3 + 0xfc))();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459a00 at 0x00459A00 (size: 57) ---
|
|
|
|
|
|
int __thiscall FUN_00459a00(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
int *piVar3;
|
|
|
|
|
|
|
|
uVar2 = 0;
|
|
|
|
iVar1 = 0;
|
|
|
|
if (*(uint *)(param_1 + 0x1c) != 0) {
|
|
|
|
piVar3 = *(int **)(param_1 + 0x14);
|
|
|
|
while ((iVar1 = *piVar3, iVar1 == 0 || (*(int *)(iVar1 + 0x2e4) != param_2))) {
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
piVar3 = piVar3 + 1;
|
|
|
|
if (*(uint *)(param_1 + 0x1c) <= uVar2) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return iVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459a40 at 0x00459A40 (size: 61) ---
|
|
|
|
|
|
bool __thiscall FUN_00459a40(int *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
piVar1 = (int *)*param_1;
|
|
|
|
uVar2 = FUN_004220b0(param_2,0x23);
|
|
|
|
iVar3 = FUN_00415430(uVar2);
|
|
|
|
*param_1 = iVar3;
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
}
|
|
|
|
return *param_1 != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459a80 at 0x00459A80 (size: 64) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00459a80(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cd98;
|
|
|
|
if ((undefined4 *)param_1[0x18] != param_1 + 1) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x18]);
|
|
|
|
}
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459ac0 at 0x00459AC0 (size: 64) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00459ac0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cd9c;
|
|
|
|
if ((undefined4 *)param_1[0x18] != param_1 + 1) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x18]);
|
|
|
|
}
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459b00 at 0x00459B00 (size: 64) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00459b00(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cda0;
|
|
|
|
if ((undefined4 *)param_1[0x18] != param_1 + 1) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x18]);
|
|
|
|
}
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459b40 at 0x00459B40 (size: 64) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00459b40(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cda4;
|
|
|
|
if ((undefined4 *)param_1[0x18] != param_1 + 1) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x18]);
|
|
|
|
}
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459b80 at 0x00459B80 (size: 64) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00459b80(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cda8;
|
|
|
|
if ((undefined4 *)param_1[0x18] != param_1 + 1) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x18]);
|
|
|
|
}
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459bc0 at 0x00459BC0 (size: 164) ---
|
|
|
|
|
|
void * __thiscall FUN_00459bc0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
int iVar4;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
if ((param_2 & 2) == 0) {
|
|
|
|
puVar3 = (undefined4 *)(*(int *)((int)param_1 + 4) + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(*(int *)((int)param_1 + 4) + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
local_4 = *(int *)((int)param_1 + -4);
|
|
|
|
if (-1 < local_4 + -1) {
|
|
|
|
iVar4 = (int)param_1 + local_4 * 0x18 + 4;
|
|
|
|
do {
|
|
|
|
piVar1 = (int *)(iVar4 + -0x18);
|
|
|
|
iVar4 = iVar4 + -0x18;
|
|
|
|
puVar3 = (undefined4 *)(*piVar1 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(*piVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
local_4 = local_4 + -1;
|
|
|
|
} while (local_4 != 0);
|
|
|
|
}
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete__((void *)((int)param_1 + -4));
|
|
|
|
}
|
|
|
|
return (void *)((int)param_1 + -4);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459c70 at 0x00459C70 (size: 98) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_00459c70(undefined4 *param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
|
|
|
|
*param_1 = *param_2;
|
|
|
|
iVar1 = param_1[1];
|
|
|
|
if (iVar1 != param_2[1]) {
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(iVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(iVar1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iVar1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
iVar1 = param_2[1];
|
|
|
|
param_1[1] = iVar1;
|
|
|
|
InterlockedIncrement((LONG *)(iVar1 + -0x10));
|
|
|
|
}
|
|
|
|
param_1[2] = param_2[2];
|
|
|
|
param_1[3] = param_2[3];
|
|
|
|
param_1[4] = param_2[4];
|
|
|
|
param_1[5] = param_2[5];
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459ce0 at 0x00459CE0 (size: 67) ---
|
|
|
|
|
|
void __thiscall FUN_00459ce0(undefined4 *param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = *param_2;
|
|
|
|
param_1[1] = param_2[1];
|
|
|
|
param_1[2] = param_2[2];
|
|
|
|
param_1[3] = param_2[3];
|
|
|
|
param_1[4] = param_2[4];
|
|
|
|
param_1[5] = param_2[5];
|
|
|
|
param_1[6] = param_2[6];
|
|
|
|
param_1[7] = param_2[7];
|
|
|
|
param_1[8] = param_2[8];
|
|
|
|
param_1[9] = param_2[9];
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459d30 at 0x00459D30 (size: 234) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00459d30(int *param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
|
|
|
|
uVar1 = param_2;
|
|
|
|
if (param_2 < (uint)param_1[2]) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if ((param_1[1] & 0x7fffffffU) < param_2) {
|
|
|
|
if (param_2 == 0) {
|
|
|
|
FUN_004595e0();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
iVar2 = thunk_FUN_005df0f5(param_2 << 4);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_00401000(iVar2,0x10,param_2,FUN_00502f40);
|
|
|
|
if (*param_1 != 0) {
|
|
|
|
param_2 = param_1[2];
|
|
|
|
if (-1 < (int)(param_2 + -1)) {
|
|
|
|
puVar4 = (undefined4 *)((param_2 + -1) * 0x10 + 4 + iVar2);
|
|
|
|
do {
|
|
|
|
puVar3 = (undefined4 *)((int)puVar4 + *param_1 + (-4 - iVar2));
|
|
|
|
if (puVar4 + -1 != puVar3) {
|
|
|
|
puVar4[-1] = *puVar3;
|
|
|
|
puVar4[1] = puVar3[2];
|
|
|
|
*puVar4 = puVar3[1];
|
|
|
|
puVar4[2] = puVar3[3];
|
|
|
|
}
|
|
|
|
puVar4 = puVar4 + -4;
|
|
|
|
param_2 = param_2 + -1;
|
|
|
|
} while (param_2 != 0);
|
|
|
|
}
|
|
|
|
if ((param_1[1] & 0x80000000U) == 0x80000000) {
|
|
|
|
operator_delete__((void *)*param_1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*param_1 = iVar2;
|
|
|
|
param_1[1] = uVar1 | 0x80000000;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459e20 at 0x00459E20 (size: 154) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00459e20(int *param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
if (param_2 < (uint)param_1[2]) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if ((param_1[1] & 0x7fffffffU) < param_2) {
|
|
|
|
if (param_2 == 0) {
|
|
|
|
FUN_005d8570();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
iVar2 = thunk_FUN_005df0f5(param_2 * 8);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (*param_1 != 0) {
|
|
|
|
iVar3 = param_1[2] + -1;
|
|
|
|
while (-1 < iVar3) {
|
|
|
|
iVar3 = iVar3 + -1;
|
|
|
|
iVar1 = *param_1;
|
|
|
|
*(undefined4 *)(iVar2 + 8 + iVar3 * 8) = *(undefined4 *)(iVar1 + 8 + iVar3 * 8);
|
|
|
|
*(undefined4 *)(iVar2 + 0xc + iVar3 * 8) = *(undefined4 *)(iVar1 + 0xc + iVar3 * 8);
|
|
|
|
}
|
|
|
|
if ((param_1[1] & 0x80000000U) == 0x80000000) {
|
|
|
|
operator_delete__((void *)*param_1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*param_1 = iVar2;
|
|
|
|
param_1[1] = param_2 | 0x80000000;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459ec0 at 0x00459EC0 (size: 120) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_00459ec0(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
puVar1 = *(undefined4 **)(param_1 + 4);
|
|
|
|
if (puVar1 == (undefined4 *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar2 = puVar1[10];
|
|
|
|
*(int *)(param_1 + 4) = iVar2;
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 8) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(iVar2 + 0x2c) = 0;
|
|
|
|
}
|
|
|
|
*param_2 = *puVar1;
|
|
|
|
param_2[1] = puVar1[1];
|
|
|
|
param_2[2] = puVar1[2];
|
|
|
|
param_2[3] = puVar1[3];
|
|
|
|
param_2[4] = puVar1[4];
|
|
|
|
param_2[5] = puVar1[5];
|
|
|
|
param_2[6] = puVar1[6];
|
|
|
|
param_2[7] = puVar1[7];
|
|
|
|
param_2[8] = puVar1[8];
|
|
|
|
param_2[9] = puVar1[9];
|
|
|
|
operator_delete(puVar1);
|
|
|
|
iVar2 = *(int *)(param_1 + 0xc) + -1;
|
|
|
|
*(int *)(param_1 + 0xc) = iVar2;
|
|
|
|
return CONCAT31((int3)((uint)iVar2 >> 8),1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_00459f40 at 0x00459F40 (size: 172) ---
|
|
|
|
|
|
void __fastcall FUN_00459f40(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
uint local_1c;
|
|
|
|
undefined1 local_18 [4];
|
|
|
|
undefined *local_14;
|
|
|
|
|
|
|
|
param_1[2] = 0;
|
|
|
|
if ((param_1[1] & 0x80000000U) != 0x80000000) {
|
|
|
|
if ((*param_1 != 0) && (local_1c = param_1[1] & 0x7fffffff, -1 < (int)(local_1c - 1))) {
|
|
|
|
do {
|
|
|
|
local_14 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
FUN_00459c70(local_18);
|
|
|
|
puVar2 = (undefined4 *)(local_14 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_14 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
local_1c = local_1c - 1;
|
|
|
|
} while (local_1c != 0);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*param_1 != 0) {
|
|
|
|
FUN_00459bc0(3);
|
|
|
|
}
|
|
|
|
*param_1 = 0;
|
|
|
|
param_1[1] = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a000 at 0x0045A000 (size: 123) ---
|
|
|
|
|
|
void FUN_0045a000(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 local_18;
|
|
|
|
int local_14;
|
|
|
|
undefined4 local_10;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
local_18 = *param_1;
|
|
|
|
local_14 = param_1[1];
|
|
|
|
InterlockedIncrement((LONG *)(local_14 + -0x10));
|
|
|
|
local_10 = param_1[2];
|
|
|
|
local_c = param_1[3];
|
|
|
|
local_8 = param_1[4];
|
|
|
|
local_4 = param_1[5];
|
|
|
|
FUN_00459c70(param_2);
|
|
|
|
FUN_00459c70(&local_18);
|
|
|
|
puVar2 = (undefined4 *)(local_14 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_14 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a080 at 0x0045A080 (size: 229) ---
|
|
|
|
|
|
void FUN_0045a080(uint *param_1,uint param_2,byte *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
byte bVar1;
|
|
|
|
uint uVar2;
|
|
|
|
byte *pbVar3;
|
|
|
|
int iVar4;
|
|
|
|
LONG LVar5;
|
|
|
|
uint uVar6;
|
|
|
|
byte *pbVar7;
|
|
|
|
bool bVar8;
|
|
|
|
|
|
|
|
uVar6 = param_2;
|
|
|
|
do {
|
|
|
|
uVar2 = param_1[-6];
|
|
|
|
if (uVar2 <= uVar6) {
|
|
|
|
if (uVar6 != uVar2) {
|
|
|
|
LAB_0045a133:
|
|
|
|
FUN_00459c70(¶m_2);
|
|
|
|
pbVar7 = param_3 + -0x14;
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(param_3 + -0x10));
|
|
|
|
if ((LVar5 == 0) && (pbVar7 != (byte *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)pbVar7)(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
pbVar7 = (byte *)param_1[-5];
|
|
|
|
pbVar3 = param_3;
|
|
|
|
do {
|
|
|
|
bVar1 = *pbVar3;
|
|
|
|
bVar8 = bVar1 < *pbVar7;
|
|
|
|
if (bVar1 != *pbVar7) {
|
|
|
|
LAB_0045a0c7:
|
|
|
|
iVar4 = (1 - (uint)bVar8) - (uint)(bVar8 != 0);
|
|
|
|
goto LAB_0045a0cc;
|
|
|
|
}
|
|
|
|
if (bVar1 == 0) break;
|
|
|
|
bVar1 = pbVar3[1];
|
|
|
|
bVar8 = bVar1 < pbVar7[1];
|
|
|
|
if (bVar1 != pbVar7[1]) goto LAB_0045a0c7;
|
|
|
|
pbVar3 = pbVar3 + 2;
|
|
|
|
pbVar7 = pbVar7 + 2;
|
|
|
|
} while (bVar1 != 0);
|
|
|
|
iVar4 = 0;
|
|
|
|
LAB_0045a0cc:
|
|
|
|
uVar6 = param_2;
|
|
|
|
if (-1 < iVar4) goto LAB_0045a133;
|
|
|
|
}
|
|
|
|
*param_1 = uVar2;
|
|
|
|
uVar2 = param_1[1];
|
|
|
|
if (uVar2 != param_1[-5]) {
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(uVar2 - 0x10));
|
|
|
|
if ((LVar5 == 0) && ((undefined4 *)(uVar2 - 0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(uVar2 - 0x14))(1);
|
|
|
|
}
|
|
|
|
param_1[1] = param_1[-5];
|
|
|
|
InterlockedIncrement((LONG *)(param_1[-5] - 0x10));
|
|
|
|
}
|
|
|
|
param_1[2] = param_1[-4];
|
|
|
|
param_1[3] = param_1[-3];
|
|
|
|
param_1[4] = param_1[-2];
|
|
|
|
param_1[5] = param_1[-1];
|
|
|
|
param_1 = param_1 + -6;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a170 at 0x0045A170 (size: 304) ---
|
|
|
|
|
|
void FUN_0045a170(int param_1,int param_2,int param_3,uint param_4,byte *param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
uint *puVar2;
|
|
|
|
byte bVar3;
|
|
|
|
uint uVar4;
|
|
|
|
byte *pbVar5;
|
|
|
|
int iVar6;
|
|
|
|
LONG LVar7;
|
|
|
|
int iVar8;
|
|
|
|
byte *pbVar9;
|
|
|
|
bool bVar10;
|
|
|
|
|
|
|
|
while (param_3 < param_2) {
|
|
|
|
iVar8 = (param_2 + -1) / 2;
|
|
|
|
puVar1 = (uint *)(param_1 + iVar8 * 0x18);
|
|
|
|
if (param_4 <= *puVar1) {
|
|
|
|
if (*puVar1 != param_4) break;
|
|
|
|
pbVar5 = (byte *)puVar1[1];
|
|
|
|
pbVar9 = param_5;
|
|
|
|
do {
|
|
|
|
bVar3 = *pbVar5;
|
|
|
|
bVar10 = bVar3 < *pbVar9;
|
|
|
|
if (bVar3 != *pbVar9) {
|
|
|
|
LAB_0045a1e5:
|
|
|
|
iVar6 = (1 - (uint)bVar10) - (uint)(bVar10 != 0);
|
|
|
|
goto LAB_0045a1ea;
|
|
|
|
}
|
|
|
|
if (bVar3 == 0) break;
|
|
|
|
bVar3 = pbVar5[1];
|
|
|
|
bVar10 = bVar3 < pbVar9[1];
|
|
|
|
if (bVar3 != pbVar9[1]) goto LAB_0045a1e5;
|
|
|
|
pbVar5 = pbVar5 + 2;
|
|
|
|
pbVar9 = pbVar9 + 2;
|
|
|
|
} while (bVar3 != 0);
|
|
|
|
iVar6 = 0;
|
|
|
|
LAB_0045a1ea:
|
|
|
|
if (-1 < iVar6) break;
|
|
|
|
}
|
|
|
|
puVar2 = (uint *)(param_1 + param_2 * 0x18);
|
|
|
|
*puVar2 = *puVar1;
|
|
|
|
uVar4 = puVar2[1];
|
|
|
|
if (uVar4 != puVar1[1]) {
|
|
|
|
LVar7 = InterlockedDecrement((LONG *)(uVar4 - 0x10));
|
|
|
|
if ((LVar7 == 0) && ((undefined4 *)(uVar4 - 0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(uVar4 - 0x14))(1);
|
|
|
|
}
|
|
|
|
uVar4 = puVar1[1];
|
|
|
|
puVar2[1] = uVar4;
|
|
|
|
InterlockedIncrement((LONG *)(uVar4 - 0x10));
|
|
|
|
}
|
|
|
|
puVar2[2] = puVar1[2];
|
|
|
|
puVar2[3] = puVar1[3];
|
|
|
|
puVar2[4] = puVar1[4];
|
|
|
|
puVar2[5] = puVar1[5];
|
|
|
|
param_2 = iVar8;
|
|
|
|
}
|
|
|
|
FUN_00459c70(¶m_4);
|
|
|
|
pbVar5 = param_5 + -0x14;
|
|
|
|
LVar7 = InterlockedDecrement((LONG *)(param_5 + -0x10));
|
|
|
|
if ((LVar7 == 0) && (pbVar5 != (byte *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)pbVar5)(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a2b0 at 0x0045A2B0 (size: 160) ---
|
|
|
|
|
|
undefined4 * FUN_0045a2b0(int param_1,int param_2,undefined4 *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
|
|
|
|
iVar1 = (param_2 - param_1) / 0x18;
|
|
|
|
iVar3 = param_2;
|
|
|
|
param_2 = iVar1;
|
|
|
|
if (iVar1 < 1) {
|
|
|
|
return param_3;
|
|
|
|
}
|
|
|
|
do {
|
|
|
|
puVar4 = param_3 + -6;
|
|
|
|
*puVar4 = *(undefined4 *)(iVar3 + -0x18);
|
|
|
|
iVar1 = param_3[-5];
|
|
|
|
if (iVar1 != *(int *)(iVar3 + -0x14)) {
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(iVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(iVar1 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iVar1 + -0x14))(1);
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(iVar3 + -0x14);
|
|
|
|
param_3[-5] = iVar1;
|
|
|
|
InterlockedIncrement((LONG *)(iVar1 + -0x10));
|
|
|
|
}
|
|
|
|
param_3[-4] = *(undefined4 *)(iVar3 + -0x10);
|
|
|
|
param_3[-3] = *(undefined4 *)(iVar3 + -0xc);
|
|
|
|
param_3[-2] = *(undefined4 *)(iVar3 + -8);
|
|
|
|
param_2 = param_2 + -1;
|
|
|
|
param_3[-1] = *(undefined4 *)(iVar3 + -4);
|
|
|
|
iVar3 = iVar3 + -0x18;
|
|
|
|
param_3 = puVar4;
|
|
|
|
} while (param_2 != 0);
|
|
|
|
return puVar4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a350 at 0x0045A350 (size: 85) ---
|
|
|
|
|
|
void __fastcall FUN_0045a350(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
iVar2 = *(int *)(param_1 + 0x10);
|
|
|
|
while (iVar2 != 0) {
|
|
|
|
piVar1 = (int *)**(int **)(param_1 + 8);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x44))(0);
|
|
|
|
if (*(int *)(param_1 + 0x10) != 0) {
|
|
|
|
iVar2 = *(int *)(param_1 + 0x10) + -1;
|
|
|
|
*(int *)(param_1 + 0x10) = iVar2;
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
**(undefined4 **)(param_1 + 8) = (*(undefined4 **)(param_1 + 8))[iVar2];
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 8) + *(int *)(param_1 + 0x10) * 4) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(**(code **)*piVar1)(1);
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x10);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a3b0 at 0x0045A3B0 (size: 99) ---
|
|
|
|
|
|
uint __thiscall FUN_0045a3b0(int param_1,void *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
|
|
|
|
uVar2 = 0;
|
|
|
|
if ((param_2 == (void *)0x0) || (*(void **)(param_1 + 4) == (void *)0x0)) {
|
|
|
|
return (uint)param_2 & 0xffffff00;
|
|
|
|
}
|
|
|
|
if (param_2 == *(void **)(param_1 + 4)) {
|
|
|
|
iVar1 = *(int *)((int)param_2 + 0x28);
|
|
|
|
*(int *)(param_1 + 4) = iVar1;
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 8) = 0;
|
|
|
|
goto LAB_0045a3fd;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(*(int *)((int)param_2 + 0x2c) + 0x28) = *(undefined4 *)((int)param_2 + 0x28);
|
|
|
|
iVar1 = *(int *)((int)param_2 + 0x28);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 8) = *(undefined4 *)((int)param_2 + 0x2c);
|
|
|
|
goto LAB_0045a3fd;
|
|
|
|
}
|
|
|
|
uVar2 = *(undefined4 *)((int)param_2 + 0x2c);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(iVar1 + 0x2c) = uVar2;
|
|
|
|
LAB_0045a3fd:
|
|
|
|
operator_delete(param_2);
|
|
|
|
iVar1 = *(int *)(param_1 + 0xc) + -1;
|
|
|
|
*(int *)(param_1 + 0xc) = iVar1;
|
|
|
|
return CONCAT31((int3)((uint)iVar1 >> 8),1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a420 at 0x0045A420 (size: 181) ---
|
|
|
|
|
|
int * __thiscall FUN_0045a420(int *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
uint uVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
int iVar6;
|
|
|
|
undefined4 local_10 [4];
|
|
|
|
|
|
|
|
if ((param_1[1] & 0x7fffffffU) < (param_2[1] & 0x7fffffffU)) {
|
|
|
|
param_1[2] = 0;
|
|
|
|
cVar1 = FUN_00459d30(param_2[1] & 0x7fffffff);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
puVar2 = (undefined4 *)*param_2;
|
|
|
|
puVar3 = (undefined4 *)*param_1;
|
|
|
|
puVar5 = puVar2 + param_2[2] * 4;
|
|
|
|
for (; puVar2 < puVar5; puVar2 = puVar2 + 4) {
|
|
|
|
if (puVar3 != puVar2) {
|
|
|
|
*puVar3 = *puVar2;
|
|
|
|
puVar3[2] = puVar2[2];
|
|
|
|
puVar3[1] = puVar2[1];
|
|
|
|
puVar3[3] = puVar2[3];
|
|
|
|
}
|
|
|
|
puVar3 = puVar3 + 4;
|
|
|
|
}
|
|
|
|
uVar4 = param_2[2];
|
|
|
|
if (uVar4 < (uint)param_1[2]) {
|
|
|
|
iVar6 = uVar4 << 4;
|
|
|
|
do {
|
|
|
|
puVar2 = (undefined4 *)(*param_1 + iVar6);
|
|
|
|
if (puVar2 != local_10) {
|
|
|
|
*puVar2 = 0;
|
|
|
|
puVar2[2] = 0;
|
|
|
|
puVar2[1] = 0;
|
|
|
|
puVar2[3] = 0;
|
|
|
|
}
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
iVar6 = iVar6 + 0x10;
|
|
|
|
} while (uVar4 < (uint)param_1[2]);
|
|
|
|
}
|
|
|
|
param_1[2] = param_2[2];
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a4e0 at 0x0045A4E0 (size: 147) ---
|
|
|
|
|
|
int * __thiscall FUN_0045a4e0(int *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
char cVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
uint uVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
if ((param_1[1] & 0x7fffffffU) < (param_2[1] & 0x7fffffffU)) {
|
|
|
|
param_1[2] = 0;
|
|
|
|
cVar3 = FUN_00459e20(param_2[1] & 0x7fffffff);
|
|
|
|
if (cVar3 == '\0') {
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
puVar4 = (undefined4 *)*param_2;
|
|
|
|
puVar1 = puVar4 + param_2[2] * 2;
|
|
|
|
puVar6 = (undefined4 *)*param_1;
|
|
|
|
for (; puVar4 < puVar1; puVar4 = puVar4 + 2) {
|
|
|
|
*puVar6 = *puVar4;
|
|
|
|
puVar6[1] = puVar4[1];
|
|
|
|
puVar6 = puVar6 + 2;
|
|
|
|
}
|
|
|
|
uVar5 = param_2[2];
|
|
|
|
if (uVar5 < (uint)param_1[2]) {
|
|
|
|
do {
|
|
|
|
iVar2 = *param_1;
|
|
|
|
*(undefined4 *)(iVar2 + uVar5 * 8) = local_8;
|
|
|
|
*(undefined4 *)(iVar2 + 4 + uVar5 * 8) = local_4;
|
|
|
|
uVar5 = uVar5 + 1;
|
|
|
|
} while (uVar5 < (uint)param_1[2]);
|
|
|
|
}
|
|
|
|
param_1[2] = param_2[2];
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a580 at 0x0045A580 (size: 213) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045a580(int *param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
uint uVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
int iVar4;
|
|
|
|
|
|
|
|
uVar2 = param_2;
|
|
|
|
if ((uint)param_1[2] <= param_2) {
|
|
|
|
if (param_2 <= (param_1[1] & 0x7fffffffU)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (param_2 == 0) {
|
|
|
|
FUN_00459f40();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
puVar3 = (uint *)thunk_FUN_005df0f5(param_2 * 0x18 + 4);
|
|
|
|
if (puVar3 != (uint *)0x0) {
|
|
|
|
puVar1 = puVar3 + 1;
|
|
|
|
*puVar3 = param_2;
|
|
|
|
FUN_00401000(puVar1,0x18,param_2,&LAB_004599e0);
|
|
|
|
if (puVar1 != (uint *)0x0) {
|
|
|
|
if (*param_1 != 0) {
|
|
|
|
param_2 = param_1[2];
|
|
|
|
if (-1 < (int)(param_2 + -1)) {
|
|
|
|
iVar4 = (param_2 + -1) * 0x18;
|
|
|
|
do {
|
|
|
|
FUN_00459c70(*param_1 + iVar4);
|
|
|
|
iVar4 = iVar4 + -0x18;
|
|
|
|
param_2 = param_2 + -1;
|
|
|
|
} while (param_2 != 0);
|
|
|
|
}
|
|
|
|
if (((param_1[1] & 0x80000000U) == 0x80000000) && (*param_1 != 0)) {
|
|
|
|
FUN_00459bc0(3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*param_1 = (int)puVar1;
|
|
|
|
param_1[1] = uVar2 | 0x80000000;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a660 at 0x0045A660 (size: 181) ---
|
|
|
|
|
|
uint * FUN_0045a660(uint *param_1,uint *param_2,uint *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
uint uVar3;
|
|
|
|
char cVar4;
|
|
|
|
|
|
|
|
uVar1 = *param_1;
|
|
|
|
uVar2 = *param_2;
|
|
|
|
if ((uVar1 < uVar2) || ((uVar1 == uVar2 && (cVar4 = FUN_0042fb60(param_2 + 1), cVar4 != '\0')))) {
|
|
|
|
uVar3 = *param_3;
|
|
|
|
if ((uVar2 < uVar3) || ((uVar2 == uVar3 && (cVar4 = FUN_0042fb60(param_3 + 1), cVar4 != '\0'))))
|
|
|
|
{
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
if ((uVar1 < uVar3) || ((uVar1 == uVar3 && (cVar4 = FUN_0042fb60(param_3 + 1), cVar4 != '\0'))))
|
|
|
|
{
|
|
|
|
return param_3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = *param_3;
|
|
|
|
if ((uVar3 <= uVar1) && ((uVar1 != uVar3 || (cVar4 = FUN_0042fb60(param_3 + 1), cVar4 == '\0')))
|
|
|
|
) {
|
|
|
|
if (uVar2 < uVar3) {
|
|
|
|
return param_3;
|
|
|
|
}
|
|
|
|
if (uVar2 != uVar3) {
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
cVar4 = FUN_0042fb60(param_3 + 1);
|
|
|
|
if (cVar4 == '\0') {
|
|
|
|
return param_2;
|
|
|
|
}
|
|
|
|
return param_3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a720 at 0x0045A720 (size: 102) ---
|
|
|
|
|
|
void FUN_0045a720(undefined4 *param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int iVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
|
|
|
|
if (param_1 != param_2) {
|
|
|
|
puVar2 = param_1 + 2;
|
|
|
|
do {
|
|
|
|
uVar3 = puVar2[-2];
|
|
|
|
iVar4 = puVar2[-1];
|
|
|
|
uVar5 = param_4;
|
|
|
|
InterlockedIncrement((LONG *)(iVar4 + -0x10));
|
|
|
|
FUN_0045a080(puVar2 + -2,uVar3,iVar4,*puVar2,puVar2[1],puVar2[2],puVar2[3],uVar5);
|
|
|
|
puVar1 = puVar2 + 4;
|
|
|
|
puVar2 = puVar2 + 6;
|
|
|
|
} while (puVar1 != param_2);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a790 at 0x0045A790 (size: 382) ---
|
|
|
|
|
|
void FUN_0045a790(int param_1,int param_2,int param_3,undefined4 param_4,int param_5,
|
|
|
|
undefined4 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9,
|
|
|
|
undefined4 param_10)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
byte bVar4;
|
|
|
|
uint uVar5;
|
|
|
|
int iVar6;
|
|
|
|
LONG LVar7;
|
|
|
|
int iVar8;
|
|
|
|
int iVar9;
|
|
|
|
byte *pbVar10;
|
|
|
|
byte *pbVar11;
|
|
|
|
bool bVar12;
|
|
|
|
|
|
|
|
iVar9 = param_2;
|
|
|
|
do {
|
|
|
|
iVar2 = iVar9 * 2;
|
|
|
|
iVar8 = iVar2 + 2;
|
|
|
|
if (param_3 <= iVar8) {
|
|
|
|
if (iVar8 == param_3) {
|
|
|
|
FUN_00459c70(param_1 + -0x18 + iVar8 * 0x18);
|
|
|
|
iVar9 = iVar2 + 1;
|
|
|
|
}
|
|
|
|
iVar8 = param_5;
|
|
|
|
InterlockedIncrement((LONG *)(param_5 + -0x10));
|
|
|
|
FUN_0045a170(param_1,iVar9,param_2,param_4,iVar8,param_6,param_7,param_8,param_9,param_10);
|
|
|
|
LVar7 = InterlockedDecrement((LONG *)(param_5 + -0x10));
|
|
|
|
if ((LVar7 == 0) && ((undefined4 *)(param_5 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_5 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
uVar5 = *(uint *)(param_1 + -0x18 + iVar8 * 0x18);
|
|
|
|
puVar1 = (uint *)(param_1 + iVar8 * 0x18);
|
|
|
|
if (*puVar1 < uVar5) {
|
|
|
|
LAB_0045a806:
|
|
|
|
iVar8 = iVar2 + 1;
|
|
|
|
}
|
|
|
|
else if (*puVar1 == uVar5) {
|
|
|
|
pbVar11 = (byte *)puVar1[-5];
|
|
|
|
pbVar10 = (byte *)puVar1[1];
|
|
|
|
do {
|
|
|
|
bVar4 = *pbVar10;
|
|
|
|
bVar12 = bVar4 < *pbVar11;
|
|
|
|
if (bVar4 != *pbVar11) {
|
|
|
|
LAB_0045a7f8:
|
|
|
|
iVar6 = (1 - (uint)bVar12) - (uint)(bVar12 != 0);
|
|
|
|
goto LAB_0045a7fd;
|
|
|
|
}
|
|
|
|
if (bVar4 == 0) break;
|
|
|
|
bVar4 = pbVar10[1];
|
|
|
|
bVar12 = bVar4 < pbVar11[1];
|
|
|
|
if (bVar4 != pbVar11[1]) goto LAB_0045a7f8;
|
|
|
|
pbVar10 = pbVar10 + 2;
|
|
|
|
pbVar11 = pbVar11 + 2;
|
|
|
|
} while (bVar4 != 0);
|
|
|
|
iVar6 = 0;
|
|
|
|
LAB_0045a7fd:
|
|
|
|
if (iVar6 < 0) goto LAB_0045a806;
|
|
|
|
}
|
|
|
|
iVar2 = param_1 + iVar8 * 0x18;
|
|
|
|
puVar3 = (undefined4 *)(param_1 + iVar9 * 0x18);
|
|
|
|
*puVar3 = *(undefined4 *)(param_1 + iVar8 * 0x18);
|
|
|
|
iVar9 = puVar3[1];
|
|
|
|
if (iVar9 != *(int *)(iVar2 + 4)) {
|
|
|
|
LVar7 = InterlockedDecrement((LONG *)(iVar9 + -0x10));
|
|
|
|
if ((LVar7 == 0) && ((undefined4 *)(iVar9 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iVar9 + -0x14))(1);
|
|
|
|
}
|
|
|
|
iVar9 = *(int *)(iVar2 + 4);
|
|
|
|
puVar3[1] = iVar9;
|
|
|
|
InterlockedIncrement((LONG *)(iVar9 + -0x10));
|
|
|
|
}
|
|
|
|
puVar3[2] = *(undefined4 *)(iVar2 + 8);
|
|
|
|
puVar3[3] = *(undefined4 *)(iVar2 + 0xc);
|
|
|
|
puVar3[4] = *(undefined4 *)(iVar2 + 0x10);
|
|
|
|
puVar3[5] = *(undefined4 *)(iVar2 + 0x14);
|
|
|
|
iVar9 = iVar8;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a910 at 0x0045A910 (size: 148) ---
|
|
|
|
|
|
void __thiscall FUN_0045a910(int param_1,int param_2,int param_3,int param_4,char param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
if (param_5 != '\0') {
|
|
|
|
*(int *)(param_1 + 0x228) = param_2;
|
|
|
|
*(int *)(param_1 + 0x22c) = param_3;
|
|
|
|
*(int *)(param_1 + 0x230) = param_4;
|
|
|
|
}
|
|
|
|
if ((param_2 != DAT_0083e0a8) &&
|
|
|
|
(((param_2 != *(int *)(param_1 + 0x234) || (param_3 != *(int *)(param_1 + 0x238))) ||
|
|
|
|
(param_4 != *(int *)(param_1 + 0x23c))))) {
|
|
|
|
*(int *)(param_1 + 0x234) = param_2;
|
|
|
|
*(int *)(param_1 + 0x238) = param_3;
|
|
|
|
*(int *)(param_1 + 0x23c) = param_4;
|
|
|
|
uVar1 = FUN_004220b0(param_2,0xc);
|
|
|
|
piVar2 = (int *)FUN_00415430(uVar1);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
FUN_00439f30(param_3,param_4,piVar2);
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045a9b0 at 0x0045A9B0 (size: 136) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045a9b0(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
|
|
|
|
puVar2 = (undefined4 *)FUN_005df0f5(0x30);
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
*puVar2 = *param_2;
|
|
|
|
puVar2[1] = param_2[1];
|
|
|
|
puVar2[2] = param_2[2];
|
|
|
|
puVar2[3] = param_2[3];
|
|
|
|
puVar2[4] = param_2[4];
|
|
|
|
puVar2[5] = param_2[5];
|
|
|
|
puVar2[6] = param_2[6];
|
|
|
|
puVar2[7] = param_2[7];
|
|
|
|
puVar2[8] = param_2[8];
|
|
|
|
puVar2[9] = param_2[9];
|
|
|
|
puVar2[10] = 0;
|
|
|
|
puVar2[0xb] = 0;
|
|
|
|
if (*(int *)(param_1 + 4) == 0) {
|
|
|
|
*(undefined4 **)(param_1 + 4) = puVar2;
|
|
|
|
*(undefined4 **)(param_1 + 8) = puVar2;
|
|
|
|
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
*(undefined4 **)(iVar1 + 0x28) = puVar2;
|
|
|
|
puVar2[0xb] = iVar1;
|
|
|
|
*(undefined4 **)(param_1 + 8) = puVar2;
|
|
|
|
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045aa40 at 0x0045AA40 (size: 224) ---
|
|
|
|
|
|
uint * FUN_0045aa40(uint *param_1,uint *param_2,uint param_3,byte *param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
byte bVar1;
|
|
|
|
byte *pbVar2;
|
|
|
|
int iVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
uint *puVar5;
|
|
|
|
byte *pbVar6;
|
|
|
|
bool bVar7;
|
|
|
|
|
|
|
|
do {
|
|
|
|
for (; *param_1 < param_3; param_1 = param_1 + 6) {
|
|
|
|
LAB_0045aa92:
|
|
|
|
}
|
|
|
|
if (*param_1 == param_3) {
|
|
|
|
pbVar2 = (byte *)param_1[1];
|
|
|
|
pbVar6 = param_4;
|
|
|
|
do {
|
|
|
|
bVar1 = *pbVar2;
|
|
|
|
bVar7 = bVar1 < *pbVar6;
|
|
|
|
if (bVar1 != *pbVar6) {
|
|
|
|
LAB_0045aa84:
|
|
|
|
iVar3 = (1 - (uint)bVar7) - (uint)(bVar7 != 0);
|
|
|
|
goto LAB_0045aa89;
|
|
|
|
}
|
|
|
|
if (bVar1 == 0) break;
|
|
|
|
bVar1 = pbVar2[1];
|
|
|
|
bVar7 = bVar1 < pbVar6[1];
|
|
|
|
if (bVar1 != pbVar6[1]) goto LAB_0045aa84;
|
|
|
|
pbVar2 = pbVar2 + 2;
|
|
|
|
pbVar6 = pbVar6 + 2;
|
|
|
|
} while (bVar1 != 0);
|
|
|
|
iVar3 = 0;
|
|
|
|
LAB_0045aa89:
|
|
|
|
if (iVar3 < 0) goto LAB_0045aa92;
|
|
|
|
}
|
|
|
|
do {
|
|
|
|
do {
|
|
|
|
puVar5 = param_2;
|
|
|
|
param_2 = puVar5 + -6;
|
|
|
|
} while (param_3 < puVar5[-6]);
|
|
|
|
if (param_3 != puVar5[-6]) break;
|
|
|
|
pbVar2 = (byte *)puVar5[-5];
|
|
|
|
pbVar6 = param_4;
|
|
|
|
do {
|
|
|
|
bVar1 = *pbVar6;
|
|
|
|
bVar7 = bVar1 < *pbVar2;
|
|
|
|
if (bVar1 != *pbVar2) {
|
|
|
|
LAB_0045aad4:
|
|
|
|
iVar3 = (1 - (uint)bVar7) - (uint)(bVar7 != 0);
|
|
|
|
goto LAB_0045aad9;
|
|
|
|
}
|
|
|
|
if (bVar1 == 0) break;
|
|
|
|
bVar1 = pbVar6[1];
|
|
|
|
bVar7 = bVar1 < pbVar2[1];
|
|
|
|
if (bVar1 != pbVar2[1]) goto LAB_0045aad4;
|
|
|
|
pbVar6 = pbVar6 + 2;
|
|
|
|
pbVar2 = pbVar2 + 2;
|
|
|
|
} while (bVar1 != 0);
|
|
|
|
iVar3 = 0;
|
|
|
|
LAB_0045aad9:
|
|
|
|
} while (iVar3 < 0);
|
|
|
|
if (param_2 <= param_1) {
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(param_4 + -0x10));
|
|
|
|
if ((LVar4 == 0) && (param_4 + -0x14 != (byte *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_4 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
FUN_0045a000(param_1,param_2);
|
|
|
|
param_1 = param_1 + 6;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ab20 at 0x0045AB20 (size: 146) ---
|
|
|
|
|
|
void FUN_0045ab20(int param_1,int param_2,undefined4 param_3,undefined4 param_4,int param_5,
|
|
|
|
undefined4 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9,
|
|
|
|
undefined4 param_10)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
FUN_00459c70(param_1);
|
|
|
|
iVar2 = param_5;
|
|
|
|
InterlockedIncrement((LONG *)(param_5 + -0x10));
|
|
|
|
FUN_0045a790(param_1,0,(param_2 - param_1) / 0x18,param_4,iVar2,param_6,param_7,param_8,param_9,
|
|
|
|
param_10);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(param_5 + -0x10));
|
|
|
|
if ((LVar1 == 0) && ((undefined4 *)(param_5 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_5 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045abc0 at 0x0045ABC0 (size: 139) ---
|
|
|
|
|
|
void FUN_0045abc0(int param_1,int param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 uVar6;
|
|
|
|
|
|
|
|
iVar1 = (param_2 - param_1) / 0x18;
|
|
|
|
if (1 < iVar1) {
|
|
|
|
iVar2 = (iVar1 + -2) / 2;
|
|
|
|
puVar3 = (undefined4 *)(param_1 + 8 + iVar2 * 0x18);
|
|
|
|
while( true ) {
|
|
|
|
uVar4 = puVar3[-2];
|
|
|
|
iVar5 = puVar3[-1];
|
|
|
|
uVar6 = param_3;
|
|
|
|
InterlockedIncrement((LONG *)(iVar5 + -0x10));
|
|
|
|
FUN_0045a790(param_1,iVar2,iVar1,uVar4,iVar5,*puVar3,puVar3[1],puVar3[2],puVar3[3],uVar6);
|
|
|
|
if (iVar2 == 0) break;
|
|
|
|
iVar2 = iVar2 + -1;
|
|
|
|
puVar3 = puVar3 + -6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ac50 at 0x0045AC50 (size: 165) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined1 __thiscall FUN_0045ac50(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined1 uVar3;
|
|
|
|
|
|
|
|
if ((_DAT_0083e1a4 & 1) == 0) {
|
|
|
|
_DAT_0083e1a4 = _DAT_0083e1a4 | 1;
|
|
|
|
DAT_0083e1a0 = 0;
|
|
|
|
}
|
|
|
|
DAT_0083e1a0 = DAT_0083e1a0 + 1;
|
|
|
|
*(int *)(param_2 + 0x24) = DAT_0083e1a0;
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(char *)(param_1 + 0x224) != '\0') {
|
|
|
|
FUN_0045a9b0(param_2);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
*(undefined1 *)(param_1 + 0x224) = 1;
|
|
|
|
if ((*(int **)(param_2 + 4) != (int *)0x0) &&
|
|
|
|
(iVar2 = (**(code **)(**(int **)(param_2 + 4) + 0xc))(param_2), iVar2 != 0)) {
|
|
|
|
uVar3 = 1;
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x218);
|
|
|
|
while (iVar2 != 0) {
|
|
|
|
if (*(int **)(iVar2 + 4) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(iVar2 + 4) + 0xc))(iVar2);
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(iVar2 + 0x28);
|
|
|
|
FUN_0045a3b0(iVar2);
|
|
|
|
iVar2 = iVar1;
|
|
|
|
}
|
|
|
|
*(undefined1 *)(param_1 + 0x224) = 0;
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ad00 at 0x0045AD00 (size: 123) ---
|
|
|
|
|
|
void __fastcall FUN_0045ad00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
if (*(int **)(param_1 + 0x24c) == (int *)0x0) {
|
|
|
|
LAB_0045ad1e:
|
|
|
|
if (*(int **)(param_1 + 0x248) == (int *)0x0) goto LAB_0045ad5b;
|
|
|
|
cVar1 = (**(code **)(**(int **)(param_1 + 0x248) + 0x68))();
|
|
|
|
if (cVar1 == '\0') goto LAB_0045ad5b;
|
|
|
|
iVar2 = *(int *)(param_1 + 0x248);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
cVar1 = (**(code **)(**(int **)(param_1 + 0x24c) + 0x68))();
|
|
|
|
if (cVar1 == '\0') goto LAB_0045ad1e;
|
|
|
|
iVar2 = *(int *)(param_1 + 0x24c);
|
|
|
|
}
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_0045a910(*(undefined4 *)(iVar2 + 0x550),*(undefined4 *)(iVar2 + 0x548),
|
|
|
|
*(undefined4 *)(iVar2 + 0x54c),0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
LAB_0045ad5b:
|
|
|
|
FUN_0045a910(*(undefined4 *)(param_1 + 0x228),*(undefined4 *)(param_1 + 0x22c),
|
|
|
|
*(undefined4 *)(param_1 + 0x230),1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ad80 at 0x0045AD80 (size: 226) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045ae4c) */
|
|
|
|
|
|
|
|
void FUN_0045ad80(int *param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uStack_14;
|
|
|
|
undefined1 auStack_10 [16];
|
|
|
|
|
|
|
|
piVar1 = (int *)param_1[0x2c];
|
|
|
|
if (((piVar1 != (int *)0x0) ||
|
|
|
|
((param_1[0x2b] != 0 && (piVar1 = (int *)FUN_004592b0(), piVar1 != (int *)0x0)))) &&
|
|
|
|
(iVar2 = (**(code **)(*param_1 + 0xa0))(), iVar2 != 0)) {
|
|
|
|
FUN_00448f20(piVar1);
|
|
|
|
FUN_004493d0(piVar1,*param_2);
|
|
|
|
*param_2 = piVar1;
|
|
|
|
if (piVar1[0x12] != 0) {
|
|
|
|
uStack_14 = 0;
|
|
|
|
FUN_0045a420(piVar1 + 0x10);
|
|
|
|
piVar1[0x12] = 0;
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0x1c))();
|
|
|
|
if ((iVar2 != 0) && (iVar2 = *(int *)(iVar2 + 0x110), iVar2 != 0)) {
|
|
|
|
(**(code **)(*param_1 + 0x34))(auStack_10);
|
|
|
|
(**(code **)(*param_1 + 0x3c))(&uStack_14,&uStack_14,&stack0xffffffe0,iVar2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ae70 at 0x0045AE70 (size: 68) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045ae70(int param_1,uint *param_2,uint *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
|
|
|
|
puVar1 = *(uint **)(*(int *)(param_1 + 100) + (*param_2 % *(uint *)(param_1 + 0x6c)) * 4);
|
|
|
|
while( true ) {
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (*puVar1 == *param_2) break;
|
|
|
|
puVar1 = (uint *)puVar1[1];
|
|
|
|
}
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
*param_3 = puVar1[2];
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045aec0 at 0x0045AEC0 (size: 502) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045b088) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045af0c) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045af28) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045af31) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045af43) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045af14) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045af1d) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045afa0) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045afbc) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045afc5) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045afd7) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045afa8) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045afb1) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045b0a5) */
|
|
|
|
|
|
|
|
void FUN_0045aec0(int *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int iVar4;
|
|
|
|
int local_10;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
local_10 = 0;
|
|
|
|
local_4 = 0;
|
|
|
|
for (piVar2 = param_1; piVar3 = param_2, piVar2 != (int *)0x0;
|
|
|
|
piVar2 = (int *)(**(code **)(*piVar2 + 0xa0))()) {
|
|
|
|
cVar1 = FUN_004180a0(8);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
*(int **)(local_4 * 4) = piVar2;
|
|
|
|
local_4 = local_4 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (; piVar3 != (int *)0x0; piVar3 = (int *)(**(code **)(*piVar3 + 0xa0))()) {
|
|
|
|
cVar1 = FUN_004180a0(8);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
*(int **)(local_10 * 4) = piVar3;
|
|
|
|
local_10 = local_10 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
do {
|
|
|
|
local_4 = local_4 + -1;
|
|
|
|
local_10 = local_10 + -1;
|
|
|
|
if ((local_4 < 1) || (local_10 < 1)) break;
|
|
|
|
} while (*(int *)(local_4 * 4) == *(int *)(local_10 * 4));
|
|
|
|
if ((param_1 != (int *)0x0) && (iVar4 = 0, -1 < local_4)) {
|
|
|
|
do {
|
|
|
|
(**(code **)(**(int **)(iVar4 * 4) + 0x50))(0);
|
|
|
|
iVar4 = iVar4 + 1;
|
|
|
|
} while (iVar4 <= local_4);
|
|
|
|
}
|
|
|
|
if ((param_2 != (int *)0x0) && (iVar4 = 0, -1 < local_10)) {
|
|
|
|
do {
|
|
|
|
(**(code **)(**(int **)(iVar4 * 4) + 0x50))(1);
|
|
|
|
iVar4 = iVar4 + 1;
|
|
|
|
} while (iVar4 <= local_10);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b0c0 at 0x0045B0C0 (size: 73) ---
|
|
|
|
|
|
void __fastcall FUN_0045b0c0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
local_4 = *(undefined4 *)(param_1 + 0x68);
|
|
|
|
puVar2 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,local_4,0);
|
|
|
|
if ((puVar2 != (undefined4 *)puVar1) || (puVar2 = puVar2 + -1, puVar2 != (undefined4 *)puVar1)) {
|
|
|
|
puVar2 = puVar2 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045bdf0(*puVar2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b110 at 0x0045B110 (size: 50) ---
|
|
|
|
|
|
void __fastcall FUN_0045b110(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined1 local_28 [36];
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_0079cd90;
|
|
|
|
while (param_1[1] != 0) {
|
|
|
|
local_4 = 0;
|
|
|
|
FUN_00459ec0(local_28);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b150 at 0x0045B150 (size: 45) ---
|
|
|
|
|
|
void __thiscall FUN_0045b150(int param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((*(int *)(param_1 + 0x6c) != 0) && (*(int *)(param_1 + 0x70) != 0)) {
|
|
|
|
*param_2 = *(int *)(param_1 + 0x70) + -8;
|
|
|
|
param_2[1] = param_1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*param_2 = 0;
|
|
|
|
param_2[1] = param_1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b180 at 0x0045B180 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_0045b180(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_0045b110();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b1a0 at 0x0045B1A0 (size: 423) ---
|
|
|
|
|
|
int * __thiscall FUN_0045b1a0(int param_1,undefined4 param_2,int *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
char cVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
code *pcVar4;
|
|
|
|
int *piVar5;
|
|
|
|
int iVar6;
|
|
|
|
int *piVar7;
|
|
|
|
int *piVar8;
|
|
|
|
int iVar9;
|
|
|
|
undefined1 auStack_c [12];
|
|
|
|
|
|
|
|
puVar3 = *(uint **)(*(int *)(param_1 + 0x84) +
|
|
|
|
(*(uint *)((int)param_3 + 0xac) % *(uint *)(param_1 + 0x8c)) * 4);
|
|
|
|
do {
|
|
|
|
if (puVar3 == (uint *)0x0) {
|
|
|
|
LAB_0045b1e8:
|
|
|
|
uVar1 = *(uint *)((int)param_3 + 0xb0);
|
|
|
|
if ((uVar1 != 0) &&
|
|
|
|
(puVar3 = *(uint **)(*(int *)(param_1 + 0x84) + (uVar1 % *(uint *)(param_1 + 0x8c)) * 4),
|
|
|
|
puVar3 != (uint *)0x0)) {
|
|
|
|
while (*puVar3 != uVar1) {
|
|
|
|
puVar3 = (uint *)puVar3[1];
|
|
|
|
if (puVar3 == (uint *)0x0) {
|
|
|
|
return (int *)0x0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((puVar3 != (uint *)0x0) && (pcVar4 = (code *)puVar3[2], pcVar4 != (code *)0x0)) {
|
|
|
|
LAB_0045b238:
|
|
|
|
piVar5 = (int *)(*pcVar4)(param_2,param_3);
|
|
|
|
if (piVar5 == (int *)0x0) {
|
|
|
|
return (int *)0x0;
|
|
|
|
}
|
|
|
|
param_3 = piVar5;
|
|
|
|
FUN_004637a0(¶m_3);
|
|
|
|
param_3 = (int *)piVar5[0xb9];
|
|
|
|
iVar6 = FUN_00477380(¶m_3);
|
|
|
|
if ((iVar6 != 0) &&
|
|
|
|
((((cVar2 = FUN_004636c0(&DAT_0079ccec), cVar2 != '\0' ||
|
|
|
|
(cVar2 = FUN_004636c0(&DAT_0079ccf0), cVar2 != '\0')) ||
|
|
|
|
(cVar2 = FUN_004636c0(&DAT_0079cce8), cVar2 != '\0')) ||
|
|
|
|
(cVar2 = FUN_004636c0(&DAT_0079ccf4), cVar2 != '\0')))) {
|
|
|
|
(**(code **)(*piVar5 + 0x110))(1);
|
|
|
|
}
|
|
|
|
piVar7 = (int *)FUN_0052dcf0(auStack_c);
|
|
|
|
iVar9 = piVar7[2];
|
|
|
|
iVar6 = *piVar7;
|
|
|
|
piVar7 = (int *)piVar7[1];
|
|
|
|
do {
|
|
|
|
if (iVar9 == 0) {
|
|
|
|
return piVar5;
|
|
|
|
}
|
|
|
|
do {
|
|
|
|
piVar8 = (int *)FUN_0045ccf0(param_2,iVar9 + 8);
|
|
|
|
if (piVar8 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar8 + 0x44))(piVar5);
|
|
|
|
}
|
|
|
|
iVar9 = *(int *)(iVar9 + 4);
|
|
|
|
} while (iVar9 != 0);
|
|
|
|
do {
|
|
|
|
piVar7 = piVar7 + 1;
|
|
|
|
if (piVar7 == (int *)(*(int *)(iVar6 + 0x60) + *(int *)(iVar6 + 0x68) * 4)) {
|
|
|
|
return piVar5;
|
|
|
|
}
|
|
|
|
iVar9 = *piVar7;
|
|
|
|
} while (iVar9 == 0);
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (int *)0x0;
|
|
|
|
}
|
|
|
|
if (*puVar3 == *(uint *)((int)param_3 + 0xac)) {
|
|
|
|
if ((puVar3 != (uint *)0x0) && (pcVar4 = (code *)puVar3[2], pcVar4 != (code *)0x0))
|
|
|
|
goto LAB_0045b238;
|
|
|
|
goto LAB_0045b1e8;
|
|
|
|
}
|
|
|
|
puVar3 = (uint *)puVar3[1];
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b350 at 0x0045B350 (size: 68) ---
|
|
|
|
|
|
void FUN_0045b350(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
char cVar2;
|
|
|
|
|
|
|
|
piVar1 = param_1;
|
|
|
|
if (param_1 != (int *)0x0) {
|
|
|
|
cVar2 = FUN_00455770(¶m_1);
|
|
|
|
if (cVar2 != '\0') {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(0);
|
|
|
|
cVar2 = FUN_004601d0();
|
|
|
|
if (cVar2 != '\0') {
|
|
|
|
FUN_00461cb0(0);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 0x44))(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b3a0 at 0x0045B3A0 (size: 169) ---
|
|
|
|
|
|
char __thiscall
|
|
|
|
FUN_0045b3a0(int param_1,uint param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
int *piVar4;
|
|
|
|
int iVar5;
|
|
|
|
char cVar6;
|
|
|
|
uint uVar7;
|
|
|
|
|
|
|
|
cVar6 = '\0';
|
|
|
|
puVar3 = *(uint **)(*(int *)(param_1 + 0x110) + (param_2 % *(uint *)(param_1 + 0x118)) * 4);
|
|
|
|
if (puVar3 != (uint *)0x0) {
|
|
|
|
while (*puVar3 != param_2) {
|
|
|
|
puVar3 = (uint *)puVar3[1];
|
|
|
|
if (puVar3 == (uint *)0x0) {
|
|
|
|
return '\0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((((puVar3 != (uint *)0x0) && (puVar3 != (uint *)0xfffffff8)) &&
|
|
|
|
(piVar4 = (int *)FUN_00477380(¶m_4), uVar2 = param_5, piVar4 != (int *)0x0)) &&
|
|
|
|
(uVar7 = 0, piVar4[2] != 0)) {
|
|
|
|
do {
|
|
|
|
piVar1 = *(int **)(*piVar4 + uVar7 * 8);
|
|
|
|
if ((piVar1 != (int *)0x0) && (0 < *(int *)(*piVar4 + uVar7 * 8 + 4))) {
|
|
|
|
iVar5 = (**(code **)(*piVar1 + 0x10))(param_2,param_3,param_4,uVar2);
|
|
|
|
if ((cVar6 == '\0') && (iVar5 != 0)) {
|
|
|
|
cVar6 = '\x01';
|
|
|
|
}
|
|
|
|
if (iVar5 == 2) {
|
|
|
|
return cVar6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar7 = uVar7 + 1;
|
|
|
|
} while (uVar7 < (uint)piVar4[2]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return cVar6;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b450 at 0x0045B450 (size: 97) ---
|
|
|
|
|
|
undefined4 FUN_0045b450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 local_28;
|
|
|
|
int local_24;
|
|
|
|
undefined4 local_20;
|
|
|
|
undefined4 local_1c;
|
|
|
|
undefined4 local_18;
|
|
|
|
undefined4 local_14;
|
|
|
|
undefined4 local_10;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
if (param_1 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
local_28 = *(undefined4 *)(param_1 + 0x2e4);
|
|
|
|
local_24 = param_1;
|
|
|
|
local_20 = param_2;
|
|
|
|
local_4 = 0;
|
|
|
|
local_14 = 0;
|
|
|
|
local_10 = 0;
|
|
|
|
local_c = 0;
|
|
|
|
local_8 = 0;
|
|
|
|
local_1c = param_3;
|
|
|
|
local_18 = param_4;
|
|
|
|
uVar1 = FUN_0045ac50(&local_28);
|
|
|
|
return uVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b4c0 at 0x0045B4C0 (size: 120) ---
|
|
|
|
|
|
void __thiscall FUN_0045b4c0(int param_1,uint param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
uint uVar4;
|
|
|
|
|
|
|
|
puVar3 = *(uint **)(*(int *)(param_1 + 0x184) + (param_2 % *(uint *)(param_1 + 0x18c)) * 4);
|
|
|
|
if (puVar3 != (uint *)0x0) {
|
|
|
|
while (*puVar3 != param_2) {
|
|
|
|
puVar3 = (uint *)puVar3[1];
|
|
|
|
if (puVar3 == (uint *)0x0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (((puVar3 != (uint *)0x0) && (puVar3 + 2 != (uint *)0x0)) && (uVar4 = 0, puVar3[4] != 0)) {
|
|
|
|
do {
|
|
|
|
piVar1 = (int *)(puVar3[2] + uVar4 * 8);
|
|
|
|
piVar2 = (int *)*piVar1;
|
|
|
|
if ((piVar2 != (int *)0x0) && (0 < piVar1[1])) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))(param_2,param_3);
|
|
|
|
}
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
} while (uVar4 < puVar3[4]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b540 at 0x0045B540 (size: 140) ---
|
|
|
|
|
|
void FUN_0045b540(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int *piVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int *piVar5;
|
|
|
|
int local_8;
|
|
|
|
undefined4 *local_4;
|
|
|
|
|
|
|
|
iVar2 = param_1;
|
|
|
|
if (((param_1 != 0) && (param_2 != 0)) &&
|
|
|
|
(local_4 = (undefined4 *)FUN_00477380(&stack0x0000000c), local_4 != (undefined4 *)0x0)) {
|
|
|
|
uVar4 = 0;
|
|
|
|
if (local_4[2] != 0) {
|
|
|
|
piVar3 = (int *)*local_4;
|
|
|
|
while (*piVar3 != iVar2) {
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
piVar3 = piVar3 + 2;
|
|
|
|
if ((uint)local_4[2] <= uVar4) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
param_1 = piVar3[1] + -1;
|
|
|
|
param_2 = 0;
|
|
|
|
piVar5 = ¶m_1;
|
|
|
|
if (piVar3[1] + -1 < 1) {
|
|
|
|
piVar5 = ¶m_2;
|
|
|
|
}
|
|
|
|
iVar1 = *piVar5;
|
|
|
|
piVar3[1] = iVar1;
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
local_8 = iVar2;
|
|
|
|
FUN_00699280(&local_8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b5d0 at 0x0045B5D0 (size: 110) ---
|
|
|
|
|
|
void __thiscall FUN_0045b5d0(int param_1,int param_2,undefined4 *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
char cVar3;
|
|
|
|
int *piVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
uint uVar6;
|
|
|
|
|
|
|
|
uVar6 = 0;
|
|
|
|
if (param_3[2] != 0) {
|
|
|
|
piVar4 = (int *)*param_3;
|
|
|
|
while (*piVar4 != param_2) {
|
|
|
|
uVar6 = uVar6 + 1;
|
|
|
|
piVar4 = piVar4 + 2;
|
|
|
|
if ((uint)param_3[2] <= uVar6) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
piVar4[1] = 0;
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x198) & 0x7fffffff;
|
|
|
|
if (uVar6 <= *(uint *)(param_1 + 0x19c)) {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar3 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar3 == '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x19c);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x194);
|
|
|
|
*(int *)(iVar2 + iVar1 * 8) = param_2;
|
|
|
|
*(undefined4 **)(iVar2 + 4 + iVar1 * 8) = param_3;
|
|
|
|
*(int *)(param_1 + 0x19c) = *(int *)(param_1 + 0x19c) + 1;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b640 at 0x0045B640 (size: 254) ---
|
|
|
|
|
|
void __thiscall FUN_0045b640(int param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
piVar2 = (int *)0x0;
|
|
|
|
if (param_2 != *(int **)(param_1 + 0x244)) {
|
|
|
|
*(int **)(param_1 + 0x244) = param_2;
|
|
|
|
}
|
|
|
|
if (param_2 != (int *)0x0) {
|
|
|
|
if (*(int **)(param_1 + 0x24c) == (int *)0x0) {
|
|
|
|
if (*(char *)((int)param_2 + 0x545) == '\0') goto LAB_0045b67b;
|
|
|
|
}
|
|
|
|
else if (*(int **)(param_1 + 0x24c) != param_2) goto LAB_0045b67b;
|
|
|
|
piVar2 = param_2;
|
|
|
|
}
|
|
|
|
LAB_0045b67b:
|
|
|
|
if (piVar2 != *(int **)(param_1 + 0x248)) {
|
|
|
|
FUN_0045aec0(*(int **)(param_1 + 0x248),piVar2);
|
|
|
|
if (*(int *)(param_1 + 0x248) != 0) {
|
|
|
|
FUN_004593a0();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x248) + 0x54))(0);
|
|
|
|
}
|
|
|
|
if ((piVar2 == (int *)0x0) || (*(char *)((int)piVar2 + 0x545) == '\0')) {
|
|
|
|
*(undefined4 *)(param_1 + 0x248) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(int **)(param_1 + 0x248) = piVar2;
|
|
|
|
(**(code **)(*piVar2 + 0x54))(1);
|
|
|
|
}
|
|
|
|
FUN_0045ad00();
|
|
|
|
}
|
|
|
|
iVar3 = 0;
|
|
|
|
if (((param_2 != (int *)0x0) && (*(char *)(param_1 + 0x324) != '\0')) &&
|
|
|
|
(*(int *)(param_1 + 0x31c) != 0)) {
|
|
|
|
iVar3 = (**(code **)(*param_2 + 0xec))(*(int *)(param_1 + 0x31c));
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x250);
|
|
|
|
if (iVar3 != iVar1) {
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_0045b450(iVar1,0x3e,0,0);
|
|
|
|
}
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
FUN_0045b450(iVar3,0x3e,1,0);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x250) = iVar3;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b740 at 0x0045B740 (size: 119) ---
|
|
|
|
|
|
uint __thiscall FUN_0045b740(int param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
|
|
|
|
puVar1 = *(uint **)(*(int *)(param_1 + 0x204) + (param_2 % *(uint *)(param_1 + 0x20c)) * 4);
|
|
|
|
do {
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
LAB_0045b76d:
|
|
|
|
return (uint)puVar1 & 0xffffff00;
|
|
|
|
}
|
|
|
|
if (*puVar1 == param_2) {
|
|
|
|
if ((puVar1 != (uint *)0x0) && (puVar1 + 2 != (uint *)0x0)) {
|
|
|
|
uVar4 = 0;
|
|
|
|
uVar3 = 0;
|
|
|
|
if (puVar1[4] != 0) {
|
|
|
|
do {
|
|
|
|
iVar2 = *(int *)(puVar1[2] + uVar4 * 4);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_0045b450(iVar2,0x31,param_2,0);
|
|
|
|
}
|
|
|
|
uVar3 = puVar1[4];
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
} while (uVar4 < uVar3);
|
|
|
|
}
|
|
|
|
return CONCAT31((int3)(uVar3 >> 8),1);
|
|
|
|
}
|
|
|
|
goto LAB_0045b76d;
|
|
|
|
}
|
|
|
|
puVar1 = (uint *)puVar1[1];
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b7c0 at 0x0045B7C0 (size: 220) ---
|
|
|
|
|
|
void __fastcall FUN_0045b7c0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
double dVar1;
|
|
|
|
int *piVar2;
|
|
|
|
char cVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
float local_c;
|
|
|
|
undefined4 local_8;
|
|
|
|
undefined4 uStack_4;
|
|
|
|
|
|
|
|
local_8 = DAT_008379b0;
|
|
|
|
uStack_4 = DAT_008379b4;
|
|
|
|
if ((*(char *)(param_1 + 0x325) == '\0') && (*(char *)(param_1 + 0x2d4) == '\0')) {
|
|
|
|
if ((*(int *)(param_1 + 0x24c) == 0) && (*(int *)(param_1 + 0x248) != 0)) {
|
|
|
|
cVar3 = FUN_00460bf0(0x50,&local_c);
|
|
|
|
piVar2 = DAT_00837ff4;
|
|
|
|
if (cVar3 == '\0') {
|
|
|
|
local_c = *(float *)(param_1 + 0x2ec);
|
|
|
|
}
|
|
|
|
if (local_c + (float)*(double *)(param_1 + 0x2d8) < (float)(double)CONCAT44(uStack_4,local_8))
|
|
|
|
{
|
|
|
|
uVar4 = (**(code **)(*DAT_00837ff4 + 0x1c))();
|
|
|
|
uVar5 = (**(code **)(*piVar2 + 0x18))(uVar4);
|
|
|
|
FUN_00459370(uVar5,uVar4);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*(int *)(param_1 + 0x2f8) != 0) &&
|
|
|
|
(dVar1 = (double)CONCAT44(DAT_008379b4,DAT_008379b0) - *(double *)(param_1 + 0x2e0),
|
|
|
|
(double)*(float *)(param_1 + 0x2f0) < dVar1 !=
|
|
|
|
((double)*(float *)(param_1 + 0x2f0) == dVar1))) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
FUN_0045b640(0);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b8a0 at 0x0045B8A0 (size: 85) ---
|
|
|
|
|
|
void FUN_0045b8a0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if ((*(uint *)(param_1 + 0xa4) >> 1 & 1) != 0) {
|
|
|
|
if ((*(byte *)(param_1 + 0x556) & 1) != 0) {
|
|
|
|
FUN_0045ad80(param_1,param_2);
|
|
|
|
}
|
|
|
|
for (iVar1 = FUN_00464110(); iVar1 != 0; iVar1 = FUN_00464490(iVar1)) {
|
|
|
|
FUN_0045b8a0(iVar1,param_2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b900 at 0x0045B900 (size: 100) ---
|
|
|
|
|
|
void __fastcall FUN_0045b900(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 local_c [2];
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0x9c);
|
|
|
|
local_4 = iVar1 + 0xb4;
|
|
|
|
local_c[0] = 0;
|
|
|
|
iVar2 = 0;
|
|
|
|
if (*(int *)(iVar1 + 0x120) != 0) {
|
|
|
|
if (*(int *)(iVar1 + 0x124) == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = *(int *)(iVar1 + 0x124) + -8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while( true ) {
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_0045b8a0(*(undefined4 *)(iVar2 + 0x10),local_c);
|
|
|
|
if (*(int *)(iVar2 + 8) == 0) break;
|
|
|
|
iVar2 = *(int *)(iVar2 + 8) + -8;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b970 at 0x0045B970 (size: 101) ---
|
|
|
|
|
|
void __thiscall FUN_0045b970(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0x328);
|
|
|
|
if (iVar1 != param_2) {
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_0045b450(iVar1,0x2f,0,0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x328) + 0xb4))();
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x328) = param_2;
|
|
|
|
if (param_2 != 0) {
|
|
|
|
FUN_0045b450(param_2,0x2f,1,0);
|
|
|
|
/* WARNING: Could not recover jumptable at 0x0045b9ca. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x328) + 0xb0))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045b9e0 at 0x0045B9E0 (size: 73) ---
|
|
|
|
|
|
undefined1 __thiscall FUN_0045b9e0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
uint uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
uVar2 = *(uint *)(param_1 + 4) & 0x7fffffff;
|
|
|
|
if (uVar2 <= *(uint *)(param_1 + 8)) {
|
|
|
|
uVar3 = FUN_00453850(uVar2 + 1);
|
|
|
|
cVar1 = FUN_0045a580(uVar3);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00459c70(param_2);
|
|
|
|
*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ba30 at 0x0045BA30 (size: 143) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045ba30(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
uint *puVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
*param_1 = &PTR_FUN_0079cda4;
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
puVar2 = (uint *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,¶m_2,param_2,0);
|
|
|
|
if (puVar2 == (uint *)puVar1) {
|
|
|
|
puVar2 = puVar2 + -1;
|
|
|
|
}
|
|
|
|
uVar4 = *puVar2;
|
|
|
|
param_1[0x1a] = uVar4;
|
|
|
|
if (uVar4 < 0x18) {
|
|
|
|
param_1[0x18] = param_1 + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = thunk_FUN_005df0f5(uVar4 << 2);
|
|
|
|
param_1[0x18] = uVar3;
|
|
|
|
}
|
|
|
|
param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];
|
|
|
|
puVar6 = (undefined4 *)param_1[0x18];
|
|
|
|
for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {
|
|
|
|
*puVar6 = 0;
|
|
|
|
puVar6 = puVar6 + 1;
|
|
|
|
}
|
|
|
|
for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {
|
|
|
|
*(undefined1 *)puVar6 = 0;
|
|
|
|
puVar6 = (undefined4 *)((int)puVar6 + 1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bac0 at 0x0045BAC0 (size: 143) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045bac0(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
uint *puVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
*param_1 = &PTR_FUN_0079cda8;
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
puVar2 = (uint *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,¶m_2,param_2,0);
|
|
|
|
if (puVar2 == (uint *)puVar1) {
|
|
|
|
puVar2 = puVar2 + -1;
|
|
|
|
}
|
|
|
|
uVar4 = *puVar2;
|
|
|
|
param_1[0x1a] = uVar4;
|
|
|
|
if (uVar4 < 0x18) {
|
|
|
|
param_1[0x18] = param_1 + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = thunk_FUN_005df0f5(uVar4 << 2);
|
|
|
|
param_1[0x18] = uVar3;
|
|
|
|
}
|
|
|
|
param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];
|
|
|
|
puVar6 = (undefined4 *)param_1[0x18];
|
|
|
|
for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {
|
|
|
|
*puVar6 = 0;
|
|
|
|
puVar6 = puVar6 + 1;
|
|
|
|
}
|
|
|
|
for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {
|
|
|
|
*(undefined1 *)puVar6 = 0;
|
|
|
|
puVar6 = (undefined4 *)((int)puVar6 + 1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bb50 at 0x0045BB50 (size: 143) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045bb50(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
uint *puVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
*param_1 = &PTR_FUN_0079cd98;
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
puVar2 = (uint *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,¶m_2,param_2,0);
|
|
|
|
if (puVar2 == (uint *)puVar1) {
|
|
|
|
puVar2 = puVar2 + -1;
|
|
|
|
}
|
|
|
|
uVar4 = *puVar2;
|
|
|
|
param_1[0x1a] = uVar4;
|
|
|
|
if (uVar4 < 0x18) {
|
|
|
|
param_1[0x18] = param_1 + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = thunk_FUN_005df0f5(uVar4 << 2);
|
|
|
|
param_1[0x18] = uVar3;
|
|
|
|
}
|
|
|
|
param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];
|
|
|
|
puVar6 = (undefined4 *)param_1[0x18];
|
|
|
|
for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {
|
|
|
|
*puVar6 = 0;
|
|
|
|
puVar6 = puVar6 + 1;
|
|
|
|
}
|
|
|
|
for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {
|
|
|
|
*(undefined1 *)puVar6 = 0;
|
|
|
|
puVar6 = (undefined4 *)((int)puVar6 + 1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bbe0 at 0x0045BBE0 (size: 143) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045bbe0(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
uint *puVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
*param_1 = &PTR_FUN_0079cd9c;
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
puVar2 = (uint *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,¶m_2,param_2,0);
|
|
|
|
if (puVar2 == (uint *)puVar1) {
|
|
|
|
puVar2 = puVar2 + -1;
|
|
|
|
}
|
|
|
|
uVar4 = *puVar2;
|
|
|
|
param_1[0x1a] = uVar4;
|
|
|
|
if (uVar4 < 0x18) {
|
|
|
|
param_1[0x18] = param_1 + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = thunk_FUN_005df0f5(uVar4 << 2);
|
|
|
|
param_1[0x18] = uVar3;
|
|
|
|
}
|
|
|
|
param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];
|
|
|
|
puVar6 = (undefined4 *)param_1[0x18];
|
|
|
|
for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {
|
|
|
|
*puVar6 = 0;
|
|
|
|
puVar6 = puVar6 + 1;
|
|
|
|
}
|
|
|
|
for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {
|
|
|
|
*(undefined1 *)puVar6 = 0;
|
|
|
|
puVar6 = (undefined4 *)((int)puVar6 + 1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bc70 at 0x0045BC70 (size: 143) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045bc70(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
uint *puVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
int iVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
param_1[0x18] = 0;
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
*param_1 = &PTR_FUN_0079cda0;
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
puVar2 = (uint *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,¶m_2,param_2,0);
|
|
|
|
if (puVar2 == (uint *)puVar1) {
|
|
|
|
puVar2 = puVar2 + -1;
|
|
|
|
}
|
|
|
|
uVar4 = *puVar2;
|
|
|
|
param_1[0x1a] = uVar4;
|
|
|
|
if (uVar4 < 0x18) {
|
|
|
|
param_1[0x18] = param_1 + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = thunk_FUN_005df0f5(uVar4 << 2);
|
|
|
|
param_1[0x18] = uVar3;
|
|
|
|
}
|
|
|
|
param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];
|
|
|
|
puVar6 = (undefined4 *)param_1[0x18];
|
|
|
|
for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {
|
|
|
|
*puVar6 = 0;
|
|
|
|
puVar6 = puVar6 + 1;
|
|
|
|
}
|
|
|
|
for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {
|
|
|
|
*(undefined1 *)puVar6 = 0;
|
|
|
|
puVar6 = (undefined4 *)((int)puVar6 + 1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bd00 at 0x0045BD00 (size: 73) ---
|
|
|
|
|
|
void __fastcall FUN_0045bd00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
local_4 = *(undefined4 *)(param_1 + 0x68);
|
|
|
|
puVar2 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,local_4,0);
|
|
|
|
if ((puVar2 != (undefined4 *)puVar1) || (puVar2 = puVar2 + -1, puVar2 != (undefined4 *)puVar1)) {
|
|
|
|
puVar2 = puVar2 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045c7c0(*puVar2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bd50 at 0x0045BD50 (size: 73) ---
|
|
|
|
|
|
void __fastcall FUN_0045bd50(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
local_4 = *(undefined4 *)(param_1 + 0x68);
|
|
|
|
puVar2 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,local_4,0);
|
|
|
|
if ((puVar2 != (undefined4 *)puVar1) || (puVar2 = puVar2 + -1, puVar2 != (undefined4 *)puVar1)) {
|
|
|
|
puVar2 = puVar2 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045c900(*puVar2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bda0 at 0x0045BDA0 (size: 73) ---
|
|
|
|
|
|
void __fastcall FUN_0045bda0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
local_4 = *(undefined4 *)(param_1 + 0x68);
|
|
|
|
puVar2 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,local_4,0);
|
|
|
|
if ((puVar2 != (undefined4 *)puVar1) || (puVar2 = puVar2 + -1, puVar2 != (undefined4 *)puVar1)) {
|
|
|
|
puVar2 = puVar2 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045ca40(*puVar2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bdf0 at 0x0045BDF0 (size: 310) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045bdf0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
int *piVar5;
|
|
|
|
uint *puVar6;
|
|
|
|
uint *puVar7;
|
|
|
|
undefined4 *puVar8;
|
|
|
|
uint *puVar9;
|
|
|
|
uint uVar10;
|
|
|
|
uint *puVar11;
|
|
|
|
|
|
|
|
iVar2 = param_2;
|
|
|
|
if (param_2 == *(int *)(param_1 + 0x68)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = (uint *)0x0;
|
|
|
|
do {
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
if (*(void **)(param_1 + 0x60) != (void *)(param_1 + 4)) {
|
|
|
|
operator_delete__(*(void **)(param_1 + 0x60));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x60) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 100) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
FUN_00693b20(iVar2);
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
while (puVar3 != (uint *)0x0) {
|
|
|
|
param_2 = *(int *)(param_1 + 0x68);
|
|
|
|
puVar11 = (uint *)puVar3[1];
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
if (param_2 * 2 < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
puVar8 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,puVar4,¶m_2,param_2,0);
|
|
|
|
if ((puVar8 != puVar4) || (puVar8 = puVar8 + -1, puVar8 != puVar4)) {
|
|
|
|
puVar8 = puVar8 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045bdf0(*puVar8);
|
|
|
|
}
|
|
|
|
uVar10 = *puVar3 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
puVar3[1] = *(uint *)(iVar2 + uVar10 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar10 * 4) = puVar3;
|
|
|
|
uVar10 = iVar2 + uVar10 * 4;
|
|
|
|
if (uVar10 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar10;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
puVar3 = puVar11;
|
|
|
|
}
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100);
|
|
|
|
while (piVar5 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {
|
|
|
|
if (**(int **)(param_1 + 100) != 0) {
|
|
|
|
puVar11 = *(uint **)(param_1 + 100);
|
|
|
|
puVar9 = (uint *)*puVar11;
|
|
|
|
goto LAB_0045be3f;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100) + 1;
|
|
|
|
*(int **)(param_1 + 100) = piVar5;
|
|
|
|
}
|
|
|
|
puVar11 = (uint *)0x0;
|
|
|
|
puVar9 = (uint *)0x0;
|
|
|
|
LAB_0045be3f:
|
|
|
|
puVar7 = (uint *)*puVar11;
|
|
|
|
if (puVar7 == puVar9) {
|
|
|
|
LAB_0045be52:
|
|
|
|
*puVar11 = puVar7[1];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
do {
|
|
|
|
puVar6 = puVar7;
|
|
|
|
puVar7 = (uint *)puVar6[1];
|
|
|
|
} while (puVar7 != puVar9);
|
|
|
|
if (puVar6 == (uint *)0x0) goto LAB_0045be52;
|
|
|
|
puVar6[1] = puVar7[1];
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;
|
|
|
|
puVar9[1] = (uint)puVar3;
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = puVar9;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bf30 at 0x0045BF30 (size: 180) ---
|
|
|
|
|
|
void FUN_0045bf30(uint *param_1,int param_2,uint param_3,int param_4,undefined4 param_5,
|
|
|
|
undefined4 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
char cVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
int iVar4;
|
|
|
|
uint uVar5;
|
|
|
|
int iVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
|
|
|
|
uVar5 = param_3;
|
|
|
|
puVar1 = param_1;
|
|
|
|
if (param_3 < *param_1) {
|
|
|
|
LAB_0045bf53:
|
|
|
|
FUN_0045a2b0(puVar1,param_2,param_2 + 0x18,¶m_1,0);
|
|
|
|
FUN_00459c70(¶m_3);
|
|
|
|
iVar4 = param_4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (param_3 == *param_1) {
|
|
|
|
cVar2 = FUN_0042fb60(param_1 + 1);
|
|
|
|
if (cVar2 != '\0') goto LAB_0045bf53;
|
|
|
|
}
|
|
|
|
iVar4 = param_4;
|
|
|
|
iVar6 = param_4;
|
|
|
|
uVar7 = param_9;
|
|
|
|
InterlockedIncrement((LONG *)(param_4 + -0x10));
|
|
|
|
FUN_0045a080(param_2,uVar5,iVar6,param_5,param_6,param_7,param_8,uVar7);
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(iVar4 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(iVar4 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iVar4 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045bff0 at 0x0045BFF0 (size: 158) ---
|
|
|
|
|
|
void FUN_0045bff0(int param_1,int param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
|
|
|
|
if (1 < (param_2 - param_1) / 0x18) {
|
|
|
|
puVar1 = (undefined4 *)(param_2 + -0x10);
|
|
|
|
do {
|
|
|
|
uVar2 = puVar1[-2];
|
|
|
|
uVar5 = 0;
|
|
|
|
iVar3 = puVar1[-1];
|
|
|
|
uVar4 = param_3;
|
|
|
|
InterlockedIncrement((LONG *)(iVar3 + -0x10));
|
|
|
|
FUN_0045ab20(param_1,puVar1 + -2,puVar1 + -2,uVar2,iVar3,*puVar1,puVar1[1],puVar1[2],puVar1[3]
|
|
|
|
,uVar4,uVar5);
|
|
|
|
puVar1 = puVar1 + -6;
|
|
|
|
} while (1 < ((0x10 - param_1) + (int)puVar1) / 0x18);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c090 at 0x0045C090 (size: 208) ---
|
|
|
|
|
|
undefined4 FUN_0045c090(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int local_1d0;
|
|
|
|
uint local_1cc;
|
|
|
|
undefined4 local_1c8;
|
|
|
|
undefined1 local_1c4 [452];
|
|
|
|
|
|
|
|
FUN_0069c1a0();
|
|
|
|
local_1d0 = 0;
|
|
|
|
local_1cc = 0;
|
|
|
|
local_1c8 = 0;
|
|
|
|
cVar1 = FUN_0069b400(param_2,local_1c4,&local_1d0);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
if (((local_1cc & 0x80000000) == 0x80000000) && (local_1d0 != 0)) {
|
|
|
|
operator_delete__((void *)(local_1d0 + -4));
|
|
|
|
}
|
|
|
|
FUN_0069c0c0();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
uVar2 = FUN_0045b1a0(param_1,local_1c4);
|
|
|
|
if (((local_1cc & 0x80000000) == 0x80000000) && (local_1d0 != 0)) {
|
|
|
|
operator_delete__((void *)(local_1d0 + -4));
|
|
|
|
}
|
|
|
|
FUN_0069c0c0();
|
|
|
|
return uVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c160 at 0x0045C160 (size: 72) ---
|
|
|
|
|
|
void FUN_0045c160(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
char cVar2;
|
|
|
|
|
|
|
|
piVar1 = param_1;
|
|
|
|
if (param_1 != (int *)0x0) {
|
|
|
|
cVar2 = FUN_00455770(¶m_1);
|
|
|
|
if (cVar2 != '\0') {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(0);
|
|
|
|
cVar2 = FUN_004601d0();
|
|
|
|
if (cVar2 != '\0') {
|
|
|
|
FUN_00461cb0(0);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 0x44))(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c1b0 at 0x0045C1B0 (size: 51) ---
|
|
|
|
|
|
void FUN_0045c1b0(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if (param_1 != 0) {
|
|
|
|
iVar1 = FUN_00477380(¶m_2);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_0045b540(param_1,iVar1,param_3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c1f0 at 0x0045C1F0 (size: 29) ---
|
|
|
|
|
|
void __thiscall FUN_0045c1f0(int param_1,int param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_2 != 0) {
|
|
|
|
FUN_0045b540(param_2,param_1 + 0x120,param_3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c210 at 0x0045C210 (size: 355) ---
|
|
|
|
|
|
void __thiscall FUN_0045c210(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iVar5;
|
|
|
|
int iVar6;
|
|
|
|
undefined1 local_c [12];
|
|
|
|
|
|
|
|
if (param_2 != 0) {
|
|
|
|
piVar1 = (int *)FUN_0052dcf0(local_c);
|
|
|
|
iVar4 = piVar1[2];
|
|
|
|
iVar6 = *piVar1;
|
|
|
|
piVar1 = (int *)piVar1[1];
|
|
|
|
while (piVar3 = piVar1, iVar4 != 0) {
|
|
|
|
do {
|
|
|
|
piVar2 = *(int **)(iVar4 + 0x70);
|
|
|
|
while (piVar2 != (int *)(*(int *)(iVar4 + 0x6c) + *(int *)(iVar4 + 0x74) * 4)) {
|
|
|
|
if (**(int **)(iVar4 + 0x70) != 0) {
|
|
|
|
piVar2 = *(int **)(iVar4 + 0x70);
|
|
|
|
iVar5 = *piVar2;
|
|
|
|
goto joined_r0x0045c281;
|
|
|
|
}
|
|
|
|
piVar2 = *(int **)(iVar4 + 0x70) + 1;
|
|
|
|
*(int **)(iVar4 + 0x70) = piVar2;
|
|
|
|
}
|
|
|
|
piVar2 = (int *)0x0;
|
|
|
|
iVar5 = 0;
|
|
|
|
joined_r0x0045c281:
|
|
|
|
while (iVar5 != 0) {
|
|
|
|
do {
|
|
|
|
FUN_0045b5d0(param_2,iVar5 + 8);
|
|
|
|
iVar5 = *(int *)(iVar5 + 4);
|
|
|
|
} while (iVar5 != 0);
|
|
|
|
do {
|
|
|
|
piVar2 = piVar2 + 1;
|
|
|
|
piVar3 = piVar1;
|
|
|
|
if (piVar2 == (int *)(*(int *)(iVar4 + 0x6c) + *(int *)(iVar4 + 0x74) * 4))
|
|
|
|
goto LAB_0045c2ba;
|
|
|
|
iVar5 = *piVar2;
|
|
|
|
} while (iVar5 == 0);
|
|
|
|
}
|
|
|
|
LAB_0045c2ba:
|
|
|
|
iVar4 = *(int *)(iVar4 + 4);
|
|
|
|
} while (iVar4 != 0);
|
|
|
|
do {
|
|
|
|
piVar3 = piVar3 + 1;
|
|
|
|
if (piVar3 == (int *)(*(int *)(iVar6 + 0x60) + *(int *)(iVar6 + 0x68) * 4))
|
|
|
|
goto LAB_0045c2eb;
|
|
|
|
iVar4 = *piVar3;
|
|
|
|
piVar1 = piVar3;
|
|
|
|
} while (iVar4 == 0);
|
|
|
|
}
|
|
|
|
LAB_0045c2eb:
|
|
|
|
piVar1 = *(int **)(param_1 + 0x188);
|
|
|
|
while (piVar1 != (int *)(*(int *)(param_1 + 0x184) + *(int *)(param_1 + 0x18c) * 4)) {
|
|
|
|
if (**(int **)(param_1 + 0x188) != 0) {
|
|
|
|
piVar1 = *(int **)(param_1 + 0x188);
|
|
|
|
iVar6 = *piVar1;
|
|
|
|
goto joined_r0x0045c32e;
|
|
|
|
}
|
|
|
|
piVar1 = *(int **)(param_1 + 0x188) + 1;
|
|
|
|
*(int **)(param_1 + 0x188) = piVar1;
|
|
|
|
}
|
|
|
|
piVar1 = (int *)0x0;
|
|
|
|
iVar6 = 0;
|
|
|
|
joined_r0x0045c32e:
|
|
|
|
while (iVar6 != 0) {
|
|
|
|
do {
|
|
|
|
FUN_0045b5d0(param_2,iVar6 + 8);
|
|
|
|
iVar6 = *(int *)(iVar6 + 4);
|
|
|
|
} while (iVar6 != 0);
|
|
|
|
do {
|
|
|
|
piVar1 = piVar1 + 1;
|
|
|
|
if (piVar1 == (int *)(*(int *)(param_1 + 0x184) + *(int *)(param_1 + 0x18c) * 4)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar6 = *piVar1;
|
|
|
|
} while (iVar6 == 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c380 at 0x0045C380 (size: 15) ---
|
|
|
|
|
|
void __fastcall FUN_0045c380(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(undefined1 *)(param_1 + 0x2d4) = 1;
|
|
|
|
FUN_0045b640(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c390 at 0x0045C390 (size: 67) ---
|
|
|
|
|
|
void __thiscall FUN_0045c390(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
iVar1 = 0;
|
|
|
|
local_4 = param_1;
|
|
|
|
if (*(char *)(param_1 + 0x2d4) == '\0') {
|
|
|
|
local_4 = 0;
|
|
|
|
FUN_00459490(*(undefined4 *)(param_1 + 0x9c),param_2,param_3,&local_4);
|
|
|
|
iVar1 = local_4;
|
|
|
|
}
|
|
|
|
FUN_0045b640(iVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c3e0 at 0x0045C3E0 (size: 81) ---
|
|
|
|
|
|
void __thiscall FUN_0045c3e0(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
if (*(char *)(DAT_00838468 + 0x1a) == '\0') {
|
|
|
|
piVar2 = *(int **)(param_1 + 0x328);
|
|
|
|
if (((piVar2 == (int *)0x0) && (piVar2 = *(int **)(param_1 + 0x32c), piVar2 == (int *)0x0)) ||
|
|
|
|
(cVar1 = (**(code **)(*piVar2 + 0xac))(param_2,param_3), cVar1 == '\0')) {
|
|
|
|
FUN_0045b4c0(1,param_2);
|
|
|
|
}
|
|
|
|
FUN_0045b740(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c440 at 0x0045C440 (size: 93) ---
|
|
|
|
|
|
void __fastcall FUN_0045c440(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0x2f8) != 0) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x325) != '\0') {
|
|
|
|
*(undefined1 *)(param_1 + 0x325) = 0;
|
|
|
|
if (*(int **)(param_1 + 0x248) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x248) + 0x5c))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x2f8) != 0) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
}
|
|
|
|
FUN_0045b7c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c4a0 at 0x0045C4A0 (size: 145) ---
|
|
|
|
|
|
void __thiscall FUN_0045c4a0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
char cVar2;
|
|
|
|
uint uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iVar5;
|
|
|
|
int *piVar6;
|
|
|
|
undefined4 *puVar7;
|
|
|
|
undefined4 *puVar8;
|
|
|
|
|
|
|
|
piVar1 = (int *)(param_1 + 0x330);
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(uint *)(param_1 + 0x338) != 0) {
|
|
|
|
piVar6 = (int *)*piVar1;
|
|
|
|
do {
|
|
|
|
if (*piVar6 == param_2) {
|
|
|
|
if ((uVar3 != 0xffffffff) && (uVar3 < *(uint *)(param_1 + 0x338))) {
|
|
|
|
iVar5 = *(uint *)(param_1 + 0x338) - 1;
|
|
|
|
*(int *)(param_1 + 0x338) = iVar5;
|
|
|
|
puVar7 = (undefined4 *)(*piVar1 + uVar3 * 4);
|
|
|
|
puVar8 = (undefined4 *)(*piVar1 + iVar5 * 4);
|
|
|
|
if (puVar7 < puVar8) {
|
|
|
|
iVar5 = ((uint)((int)puVar8 + (-1 - (int)puVar7)) >> 2) + 1;
|
|
|
|
puVar8 = puVar7;
|
|
|
|
for (; puVar7 = puVar7 + 1, iVar5 != 0; iVar5 = iVar5 + -1) {
|
|
|
|
*puVar8 = *puVar7;
|
|
|
|
puVar8 = puVar8 + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(undefined4 *)(*piVar1 + *(int *)(param_1 + 0x338) * 4) = 0;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
piVar6 = piVar6 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x338));
|
|
|
|
}
|
|
|
|
uVar3 = *(uint *)(param_1 + 0x334) & 0x7fffffff;
|
|
|
|
if (uVar3 <= *(uint *)(param_1 + 0x338)) {
|
|
|
|
uVar4 = FUN_00453850(uVar3 + 1);
|
|
|
|
cVar2 = FUN_004180a0(uVar4);
|
|
|
|
if (cVar2 == '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*(int *)(*piVar1 + *(int *)(param_1 + 0x338) * 4) = param_2;
|
|
|
|
*(int *)(param_1 + 0x338) = *(int *)(param_1 + 0x338) + 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c540 at 0x0045C540 (size: 205) ---
|
|
|
|
|
|
void __thiscall FUN_0045c540(int param_1,int param_2,char param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
char cVar2;
|
|
|
|
|
|
|
|
if (param_2 != 0) {
|
|
|
|
if (param_3 == '\0') {
|
|
|
|
if (*(int *)(param_1 + 0x32c) == param_2) {
|
|
|
|
*(undefined4 *)(param_1 + 0x32c) = 0;
|
|
|
|
if (*(int *)(param_1 + 0x328) != 0) {
|
|
|
|
FUN_0045b450(*(int *)(param_1 + 0x328),0x2f,0,0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x328) + 0xb4))();
|
|
|
|
*(undefined4 *)(param_1 + 0x328) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (param_2 != *(int *)(param_1 + 0x32c)) {
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x78))();
|
|
|
|
}
|
|
|
|
piVar1 = *(int **)(param_1 + 0x32c);
|
|
|
|
*(int *)(param_1 + 0x32c) = param_2;
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x100))();
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x32c) != (int *)0x0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x32c) + 0xb0))(2000);
|
|
|
|
cVar2 = (**(code **)(**(int **)(param_1 + 0x32c) + 0x10c))();
|
|
|
|
if (cVar2 == '\0') {
|
|
|
|
FUN_00460820(0x33,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c6a0 at 0x0045C6A0 (size: 120) ---
|
|
|
|
|
|
uint __thiscall FUN_0045c6a0(int param_1,uint *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
puVar1 = *(uint **)(*(int *)(param_1 + 0x60) + (*param_2 % *(uint *)(param_1 + 0x68)) * 4);
|
|
|
|
do {
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
LAB_0045c6cb:
|
|
|
|
if ((int)(*(uint *)(param_1 + 0x68) * 2) < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
FUN_0045b0c0();
|
|
|
|
}
|
|
|
|
uVar3 = *param_2 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
param_2[1] = *(uint *)(iVar2 + uVar3 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar3 * 4) = param_2;
|
|
|
|
uVar3 = iVar2 + uVar3 * 4;
|
|
|
|
if (uVar3 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar3;
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
*(int *)(param_1 + 0x6c) = iVar2;
|
|
|
|
return CONCAT31((int3)((uint)iVar2 >> 8),1);
|
|
|
|
}
|
|
|
|
if (*puVar1 == *param_2) {
|
|
|
|
if (puVar1 != (uint *)0x0) {
|
|
|
|
return (uint)puVar1 & 0xffffff00;
|
|
|
|
}
|
|
|
|
goto LAB_0045c6cb;
|
|
|
|
}
|
|
|
|
puVar1 = (uint *)puVar1[1];
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c720 at 0x0045C720 (size: 156) ---
|
|
|
|
|
|
void __fastcall FUN_0045c720(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
void *pvVar2;
|
|
|
|
void *pvVar3;
|
|
|
|
int *piVar4;
|
|
|
|
void *pvVar5;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
do {
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
piVar4 = *(int **)(param_1 + 100);
|
|
|
|
while (piVar4 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {
|
|
|
|
if (**(int **)(param_1 + 100) != 0) {
|
|
|
|
piVar4 = *(int **)(param_1 + 100);
|
|
|
|
pvVar5 = (void *)*piVar4;
|
|
|
|
goto LAB_0045c75f;
|
|
|
|
}
|
|
|
|
piVar4 = *(int **)(param_1 + 100) + 1;
|
|
|
|
*(int **)(param_1 + 100) = piVar4;
|
|
|
|
}
|
|
|
|
piVar4 = (int *)0x0;
|
|
|
|
pvVar5 = (void *)0x0;
|
|
|
|
LAB_0045c75f:
|
|
|
|
pvVar3 = (void *)*piVar4;
|
|
|
|
if (pvVar3 == pvVar5) {
|
|
|
|
LAB_0045c772:
|
|
|
|
*piVar4 = *(int *)((int)pvVar3 + 4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
do {
|
|
|
|
pvVar2 = pvVar3;
|
|
|
|
pvVar3 = *(void **)((int)pvVar2 + 4);
|
|
|
|
} while (pvVar3 != pvVar5);
|
|
|
|
if (pvVar2 == (void *)0x0) goto LAB_0045c772;
|
|
|
|
*(undefined4 *)((int)pvVar2 + 4) = *(undefined4 *)((int)pvVar3 + 4);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;
|
|
|
|
if (pvVar5 != (void *)0x0) {
|
|
|
|
if ((*(uint *)((int)pvVar5 + 0xc) & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__(*(void **)((int)pvVar5 + 8));
|
|
|
|
}
|
|
|
|
operator_delete(pvVar5);
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c7c0 at 0x0045C7C0 (size: 310) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045c7c0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
int *piVar5;
|
|
|
|
uint *puVar6;
|
|
|
|
uint *puVar7;
|
|
|
|
undefined4 *puVar8;
|
|
|
|
uint *puVar9;
|
|
|
|
uint uVar10;
|
|
|
|
uint *puVar11;
|
|
|
|
|
|
|
|
iVar2 = param_2;
|
|
|
|
if (param_2 == *(int *)(param_1 + 0x68)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = (uint *)0x0;
|
|
|
|
do {
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
if (*(void **)(param_1 + 0x60) != (void *)(param_1 + 4)) {
|
|
|
|
operator_delete__(*(void **)(param_1 + 0x60));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x60) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 100) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
FUN_00693b20(iVar2);
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
while (puVar3 != (uint *)0x0) {
|
|
|
|
param_2 = *(int *)(param_1 + 0x68);
|
|
|
|
puVar11 = (uint *)puVar3[1];
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
if (param_2 * 2 < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
puVar8 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,puVar4,¶m_2,param_2,0);
|
|
|
|
if ((puVar8 != puVar4) || (puVar8 = puVar8 + -1, puVar8 != puVar4)) {
|
|
|
|
puVar8 = puVar8 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045c7c0(*puVar8);
|
|
|
|
}
|
|
|
|
uVar10 = *puVar3 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
puVar3[1] = *(uint *)(iVar2 + uVar10 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar10 * 4) = puVar3;
|
|
|
|
uVar10 = iVar2 + uVar10 * 4;
|
|
|
|
if (uVar10 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar10;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
puVar3 = puVar11;
|
|
|
|
}
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100);
|
|
|
|
while (piVar5 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {
|
|
|
|
if (**(int **)(param_1 + 100) != 0) {
|
|
|
|
puVar11 = *(uint **)(param_1 + 100);
|
|
|
|
puVar9 = (uint *)*puVar11;
|
|
|
|
goto LAB_0045c80f;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100) + 1;
|
|
|
|
*(int **)(param_1 + 100) = piVar5;
|
|
|
|
}
|
|
|
|
puVar11 = (uint *)0x0;
|
|
|
|
puVar9 = (uint *)0x0;
|
|
|
|
LAB_0045c80f:
|
|
|
|
puVar7 = (uint *)*puVar11;
|
|
|
|
if (puVar7 == puVar9) {
|
|
|
|
LAB_0045c822:
|
|
|
|
*puVar11 = puVar7[1];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
do {
|
|
|
|
puVar6 = puVar7;
|
|
|
|
puVar7 = (uint *)puVar6[1];
|
|
|
|
} while (puVar7 != puVar9);
|
|
|
|
if (puVar6 == (uint *)0x0) goto LAB_0045c822;
|
|
|
|
puVar6[1] = puVar7[1];
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;
|
|
|
|
puVar9[1] = (uint)puVar3;
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = puVar9;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045c900 at 0x0045C900 (size: 310) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045c900(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
int *piVar5;
|
|
|
|
uint *puVar6;
|
|
|
|
uint *puVar7;
|
|
|
|
undefined4 *puVar8;
|
|
|
|
uint *puVar9;
|
|
|
|
uint uVar10;
|
|
|
|
uint *puVar11;
|
|
|
|
|
|
|
|
iVar2 = param_2;
|
|
|
|
if (param_2 == *(int *)(param_1 + 0x68)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = (uint *)0x0;
|
|
|
|
do {
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
if (*(void **)(param_1 + 0x60) != (void *)(param_1 + 4)) {
|
|
|
|
operator_delete__(*(void **)(param_1 + 0x60));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x60) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 100) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
FUN_00693b20(iVar2);
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
while (puVar3 != (uint *)0x0) {
|
|
|
|
param_2 = *(int *)(param_1 + 0x68);
|
|
|
|
puVar11 = (uint *)puVar3[1];
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
if (param_2 * 2 < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
puVar8 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,puVar4,¶m_2,param_2,0);
|
|
|
|
if ((puVar8 != puVar4) || (puVar8 = puVar8 + -1, puVar8 != puVar4)) {
|
|
|
|
puVar8 = puVar8 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045c900(*puVar8);
|
|
|
|
}
|
|
|
|
uVar10 = *puVar3 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
puVar3[1] = *(uint *)(iVar2 + uVar10 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar10 * 4) = puVar3;
|
|
|
|
uVar10 = iVar2 + uVar10 * 4;
|
|
|
|
if (uVar10 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar10;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
puVar3 = puVar11;
|
|
|
|
}
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100);
|
|
|
|
while (piVar5 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {
|
|
|
|
if (**(int **)(param_1 + 100) != 0) {
|
|
|
|
puVar11 = *(uint **)(param_1 + 100);
|
|
|
|
puVar9 = (uint *)*puVar11;
|
|
|
|
goto LAB_0045c94f;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100) + 1;
|
|
|
|
*(int **)(param_1 + 100) = piVar5;
|
|
|
|
}
|
|
|
|
puVar11 = (uint *)0x0;
|
|
|
|
puVar9 = (uint *)0x0;
|
|
|
|
LAB_0045c94f:
|
|
|
|
puVar7 = (uint *)*puVar11;
|
|
|
|
if (puVar7 == puVar9) {
|
|
|
|
LAB_0045c962:
|
|
|
|
*puVar11 = puVar7[1];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
do {
|
|
|
|
puVar6 = puVar7;
|
|
|
|
puVar7 = (uint *)puVar6[1];
|
|
|
|
} while (puVar7 != puVar9);
|
|
|
|
if (puVar6 == (uint *)0x0) goto LAB_0045c962;
|
|
|
|
puVar6[1] = puVar7[1];
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;
|
|
|
|
puVar9[1] = (uint)puVar3;
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = puVar9;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ca40 at 0x0045CA40 (size: 310) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045ca40(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint *puVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
int *piVar5;
|
|
|
|
uint *puVar6;
|
|
|
|
uint *puVar7;
|
|
|
|
undefined4 *puVar8;
|
|
|
|
uint *puVar9;
|
|
|
|
uint uVar10;
|
|
|
|
uint *puVar11;
|
|
|
|
|
|
|
|
iVar2 = param_2;
|
|
|
|
if (param_2 == *(int *)(param_1 + 0x68)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = (uint *)0x0;
|
|
|
|
do {
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
if (*(void **)(param_1 + 0x60) != (void *)(param_1 + 4)) {
|
|
|
|
operator_delete__(*(void **)(param_1 + 0x60));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x60) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 100) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x68) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x6c) = 0;
|
|
|
|
FUN_00693b20(iVar2);
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
while (puVar3 != (uint *)0x0) {
|
|
|
|
param_2 = *(int *)(param_1 + 0x68);
|
|
|
|
puVar11 = (uint *)puVar3[1];
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
if (param_2 * 2 < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
puVar8 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,puVar4,¶m_2,param_2,0);
|
|
|
|
if ((puVar8 != puVar4) || (puVar8 = puVar8 + -1, puVar8 != puVar4)) {
|
|
|
|
puVar8 = puVar8 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045ca40(*puVar8);
|
|
|
|
}
|
|
|
|
uVar10 = *puVar3 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
puVar3[1] = *(uint *)(iVar2 + uVar10 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar10 * 4) = puVar3;
|
|
|
|
uVar10 = iVar2 + uVar10 * 4;
|
|
|
|
if (uVar10 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar10;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
puVar4 = (undefined4 *)PTR_DAT_00818558;
|
|
|
|
puVar3 = puVar11;
|
|
|
|
}
|
|
|
|
PTR_DAT_00818558 = (undefined *)puVar4;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100);
|
|
|
|
while (piVar5 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {
|
|
|
|
if (**(int **)(param_1 + 100) != 0) {
|
|
|
|
puVar11 = *(uint **)(param_1 + 100);
|
|
|
|
puVar9 = (uint *)*puVar11;
|
|
|
|
goto LAB_0045ca8f;
|
|
|
|
}
|
|
|
|
piVar5 = *(int **)(param_1 + 100) + 1;
|
|
|
|
*(int **)(param_1 + 100) = piVar5;
|
|
|
|
}
|
|
|
|
puVar11 = (uint *)0x0;
|
|
|
|
puVar9 = (uint *)0x0;
|
|
|
|
LAB_0045ca8f:
|
|
|
|
puVar7 = (uint *)*puVar11;
|
|
|
|
if (puVar7 == puVar9) {
|
|
|
|
LAB_0045caa2:
|
|
|
|
*puVar11 = puVar7[1];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
do {
|
|
|
|
puVar6 = puVar7;
|
|
|
|
puVar7 = (uint *)puVar6[1];
|
|
|
|
} while (puVar7 != puVar9);
|
|
|
|
if (puVar6 == (uint *)0x0) goto LAB_0045caa2;
|
|
|
|
puVar6[1] = puVar7[1];
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;
|
|
|
|
puVar9[1] = (uint)puVar3;
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
puVar3 = puVar9;
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045cb80 at 0x0045CB80 (size: 99) ---
|
|
|
|
|
|
void FUN_0045cb80(undefined4 *param_1,undefined4 *param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int iVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
|
|
|
|
puVar2 = param_1;
|
|
|
|
if (param_1 != param_2) {
|
|
|
|
while (puVar1 = puVar2 + 6, puVar1 != param_2) {
|
|
|
|
uVar3 = *puVar1;
|
|
|
|
iVar4 = puVar2[7];
|
|
|
|
uVar5 = param_3;
|
|
|
|
InterlockedIncrement((LONG *)(iVar4 + -0x10));
|
|
|
|
FUN_0045bf30(param_1,puVar1,uVar3,iVar4,puVar2[8],puVar2[9],puVar2[10],puVar2[0xb],uVar5);
|
|
|
|
puVar2 = puVar1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045cbf0 at 0x0045CBF0 (size: 244) ---
|
|
|
|
|
|
void FUN_0045cbf0(uint *param_1,uint param_2,uint param_3,undefined4 param_4,undefined4 param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
byte bVar1;
|
|
|
|
byte *pbVar2;
|
|
|
|
int iVar3;
|
|
|
|
byte *pbVar4;
|
|
|
|
int *piVar5;
|
|
|
|
bool bVar6;
|
|
|
|
uint uVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
undefined4 uVar9;
|
|
|
|
|
|
|
|
FUN_0045abc0(param_1,param_2,param_5,0,0);
|
|
|
|
if (param_2 < param_3) {
|
|
|
|
param_3 = ((param_3 - param_2) - 1) / 0x18 + 1;
|
|
|
|
piVar5 = (int *)(param_2 + 4);
|
|
|
|
do {
|
|
|
|
uVar7 = piVar5[-1];
|
|
|
|
if (uVar7 < *param_1) {
|
|
|
|
LAB_0045cc7b:
|
|
|
|
uVar9 = 0;
|
|
|
|
iVar3 = *piVar5;
|
|
|
|
uVar8 = param_5;
|
|
|
|
InterlockedIncrement((LONG *)(iVar3 + -0x10));
|
|
|
|
FUN_0045ab20(param_1,param_2,piVar5 + -1,uVar7,iVar3,piVar5[1],piVar5[2],piVar5[3],piVar5[4]
|
|
|
|
,uVar8,uVar9);
|
|
|
|
}
|
|
|
|
else if (uVar7 == *param_1) {
|
|
|
|
pbVar4 = (byte *)param_1[1];
|
|
|
|
pbVar2 = (byte *)*piVar5;
|
|
|
|
do {
|
|
|
|
bVar1 = *pbVar2;
|
|
|
|
bVar6 = bVar1 < *pbVar4;
|
|
|
|
if (bVar1 != *pbVar4) {
|
|
|
|
LAB_0045cc69:
|
|
|
|
iVar3 = (1 - (uint)bVar6) - (uint)(bVar6 != 0);
|
|
|
|
goto LAB_0045cc6e;
|
|
|
|
}
|
|
|
|
if (bVar1 == 0) break;
|
|
|
|
bVar1 = pbVar2[1];
|
|
|
|
bVar6 = bVar1 < pbVar4[1];
|
|
|
|
if (bVar1 != pbVar4[1]) goto LAB_0045cc69;
|
|
|
|
pbVar2 = pbVar2 + 2;
|
|
|
|
pbVar4 = pbVar4 + 2;
|
|
|
|
} while (bVar1 != 0);
|
|
|
|
iVar3 = 0;
|
|
|
|
LAB_0045cc6e:
|
|
|
|
if (iVar3 < 0) goto LAB_0045cc7b;
|
|
|
|
}
|
|
|
|
piVar5 = piVar5 + 6;
|
|
|
|
param_3 = param_3 + -1;
|
|
|
|
} while (param_3 != 0);
|
|
|
|
}
|
|
|
|
FUN_0045bff0(param_1,param_2,param_5);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ccf0 at 0x0045CCF0 (size: 38) ---
|
|
|
|
|
|
int * FUN_0045ccf0(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
|
|
|
|
piVar1 = (int *)FUN_0045c090(param_1,param_2);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0xbc))();
|
|
|
|
}
|
|
|
|
return piVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045cde0 at 0x0045CDE0 (size: 94) ---
|
|
|
|
|
|
void __fastcall FUN_0045cde0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iStack_4;
|
|
|
|
|
|
|
|
*(undefined1 *)(param_1 + 0x240) = 0;
|
|
|
|
piVar1 = DAT_00837ff4;
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
iStack_4 = param_1;
|
|
|
|
uVar2 = (**(code **)(*DAT_00837ff4 + 0x18))();
|
|
|
|
uVar3 = (**(code **)(*piVar1 + 0x1c))();
|
|
|
|
iVar4 = 0;
|
|
|
|
if (*(char *)(param_1 + 0x2d4) == '\0') {
|
|
|
|
iStack_4 = 0;
|
|
|
|
FUN_00459490(*(undefined4 *)(param_1 + 0x9c),uVar2,uVar3,&iStack_4);
|
|
|
|
iVar4 = iStack_4;
|
|
|
|
}
|
|
|
|
FUN_0045b640(iVar4);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ce60 at 0x0045CE60 (size: 111) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045ce60(int param_1,uint *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
|
|
|
|
puVar1 = *(uint **)(*(int *)(param_1 + 100) + (*param_2 % *(uint *)(param_1 + 0x6c)) * 4);
|
|
|
|
do {
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
LAB_0045ce8b:
|
|
|
|
puVar1 = (uint *)FUN_005df0f5(8);
|
|
|
|
if (puVar1 != (uint *)0x0) {
|
|
|
|
*puVar1 = *param_2;
|
|
|
|
puVar1[1] = 0;
|
|
|
|
FUN_0045c6a0(puVar1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_0045c6a0(0);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (*puVar1 == *param_2) {
|
|
|
|
if (puVar1 != (uint *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
goto LAB_0045ce8b;
|
|
|
|
}
|
|
|
|
puVar1 = (uint *)puVar1[1];
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ced0 at 0x0045CED0 (size: 120) ---
|
|
|
|
|
|
uint __thiscall FUN_0045ced0(int param_1,uint *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
puVar1 = *(uint **)(*(int *)(param_1 + 0x60) + (*param_2 % *(uint *)(param_1 + 0x68)) * 4);
|
|
|
|
do {
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
LAB_0045cefb:
|
|
|
|
if ((int)(*(uint *)(param_1 + 0x68) * 2) < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
FUN_0045bd00();
|
|
|
|
}
|
|
|
|
uVar3 = *param_2 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
param_2[1] = *(uint *)(iVar2 + uVar3 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar3 * 4) = param_2;
|
|
|
|
uVar3 = iVar2 + uVar3 * 4;
|
|
|
|
if (uVar3 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar3;
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
*(int *)(param_1 + 0x6c) = iVar2;
|
|
|
|
return CONCAT31((int3)((uint)iVar2 >> 8),1);
|
|
|
|
}
|
|
|
|
if (*puVar1 == *param_2) {
|
|
|
|
if (puVar1 != (uint *)0x0) {
|
|
|
|
return (uint)puVar1 & 0xffffff00;
|
|
|
|
}
|
|
|
|
goto LAB_0045cefb;
|
|
|
|
}
|
|
|
|
puVar1 = (uint *)puVar1[1];
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045cf50 at 0x0045CF50 (size: 120) ---
|
|
|
|
|
|
uint __thiscall FUN_0045cf50(int param_1,uint *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
puVar1 = *(uint **)(*(int *)(param_1 + 0x60) + (*param_2 % *(uint *)(param_1 + 0x68)) * 4);
|
|
|
|
do {
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
LAB_0045cf7b:
|
|
|
|
if ((int)(*(uint *)(param_1 + 0x68) * 2) < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
FUN_0045bd50();
|
|
|
|
}
|
|
|
|
uVar3 = *param_2 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
param_2[1] = *(uint *)(iVar2 + uVar3 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar3 * 4) = param_2;
|
|
|
|
uVar3 = iVar2 + uVar3 * 4;
|
|
|
|
if (uVar3 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar3;
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
*(int *)(param_1 + 0x6c) = iVar2;
|
|
|
|
return CONCAT31((int3)((uint)iVar2 >> 8),1);
|
|
|
|
}
|
|
|
|
if (*puVar1 == *param_2) {
|
|
|
|
if (puVar1 != (uint *)0x0) {
|
|
|
|
return (uint)puVar1 & 0xffffff00;
|
|
|
|
}
|
|
|
|
goto LAB_0045cf7b;
|
|
|
|
}
|
|
|
|
puVar1 = (uint *)puVar1[1];
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045cfd0 at 0x0045CFD0 (size: 120) ---
|
|
|
|
|
|
uint __thiscall FUN_0045cfd0(int param_1,uint *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
puVar1 = *(uint **)(*(int *)(param_1 + 0x60) + (*param_2 % *(uint *)(param_1 + 0x68)) * 4);
|
|
|
|
do {
|
|
|
|
if (puVar1 == (uint *)0x0) {
|
|
|
|
LAB_0045cffb:
|
|
|
|
if ((int)(*(uint *)(param_1 + 0x68) * 2) < *(int *)(param_1 + 0x6c) + 1) {
|
|
|
|
FUN_0045bda0();
|
|
|
|
}
|
|
|
|
uVar3 = *param_2 % *(uint *)(param_1 + 0x68);
|
|
|
|
iVar2 = *(int *)(param_1 + 0x60);
|
|
|
|
param_2[1] = *(uint *)(iVar2 + uVar3 * 4);
|
|
|
|
*(uint **)(iVar2 + uVar3 * 4) = param_2;
|
|
|
|
uVar3 = iVar2 + uVar3 * 4;
|
|
|
|
if (uVar3 < *(uint *)(param_1 + 100)) {
|
|
|
|
*(uint *)(param_1 + 100) = uVar3;
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x6c) + 1;
|
|
|
|
*(int *)(param_1 + 0x6c) = iVar2;
|
|
|
|
return CONCAT31((int3)((uint)iVar2 >> 8),1);
|
|
|
|
}
|
|
|
|
if (*puVar1 == *param_2) {
|
|
|
|
if (puVar1 != (uint *)0x0) {
|
|
|
|
return (uint)puVar1 & 0xffffff00;
|
|
|
|
}
|
|
|
|
goto LAB_0045cffb;
|
|
|
|
}
|
|
|
|
puVar1 = (uint *)puVar1[1];
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d050 at 0x0045D050 (size: 92) ---
|
|
|
|
|
|
void FUN_0045d050(int param_1,int param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (0x10 < (param_2 - param_1) / 0x18) {
|
|
|
|
FUN_0045cb80(param_1,param_1 + 0x180,param_3);
|
|
|
|
FUN_0045a720(param_1 + 0x180,param_2,0,param_3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_0045cb80(param_1,param_2,param_3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d0b0 at 0x0045D0B0 (size: 71) ---
|
|
|
|
|
|
void __fastcall FUN_0045d0b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_0045a350();
|
|
|
|
FUN_004596b0();
|
|
|
|
if (*(char *)(param_1 + 0x240) != '\0') {
|
|
|
|
FUN_0045cde0();
|
|
|
|
}
|
|
|
|
FUN_0045b7c0();
|
|
|
|
FUN_0045b4c0(3,0);
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x10))();
|
|
|
|
}
|
|
|
|
FUN_0045b900();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d100 at 0x0045D100 (size: 89) ---
|
|
|
|
|
|
int * FUN_0045d100(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
piVar2 = (int *)FUN_0045c090(param_1,param_2);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xbc))();
|
|
|
|
FUN_00461cb0(1);
|
|
|
|
FUN_004601e0(1);
|
|
|
|
(**(code **)(*piVar2 + 0xc0))();
|
|
|
|
cVar1 = FUN_004603a0();
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
(**(code **)(*piVar2 + 0xf8))(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return piVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d160 at 0x0045D160 (size: 89) ---
|
|
|
|
|
|
int * FUN_0045d160(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
piVar2 = (int *)FUN_0045c090(param_2,param_3);
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xbc))();
|
|
|
|
(**(code **)(*piVar2 + 0x44))(param_1);
|
|
|
|
(**(code **)(*piVar2 + 0xc0))();
|
|
|
|
if (param_1 != 0) {
|
|
|
|
cVar1 = FUN_004603a0();
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
(**(code **)(*piVar2 + 0xf8))(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return piVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d1c0 at 0x0045D1C0 (size: 327) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045d1c0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
|
|
|
|
uVar5 = 800;
|
|
|
|
uVar4 = 600;
|
|
|
|
if (DAT_00870340 != 0) {
|
|
|
|
uVar5 = FUN_0054fd20();
|
|
|
|
uVar4 = FUN_0054fd30();
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x94) == 0) {
|
|
|
|
puVar3 = (undefined4 *)FUN_005df0f5(0xc0);
|
|
|
|
if (puVar3 == (undefined4 *)0x0) {
|
|
|
|
puVar3 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_0069b060();
|
|
|
|
*puVar3 = &PTR_LAB_0079cd38;
|
|
|
|
}
|
|
|
|
*(undefined4 **)(param_1 + 0x94) = puVar3;
|
|
|
|
puVar3[0xc] = uVar5;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x94) + 0x34) = uVar4;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x98) == 0) {
|
|
|
|
puVar3 = (undefined4 *)FUN_005df0f5(0x1c4);
|
|
|
|
if (puVar3 == (undefined4 *)0x0) {
|
|
|
|
puVar3 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_0069c1a0();
|
|
|
|
*puVar3 = &PTR_FUN_00801f74;
|
|
|
|
}
|
|
|
|
*(undefined4 **)(param_1 + 0x98) = puVar3;
|
|
|
|
puVar3[0x2a] = 8;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x98) + 0xac) = 3;
|
|
|
|
iVar2 = *(int *)(param_1 + 0x98);
|
|
|
|
*(undefined4 *)(iVar2 + 0x18) = uVar5;
|
|
|
|
puVar1 = (uint *)(iVar2 + 4);
|
|
|
|
*puVar1 = *puVar1 | 8;
|
|
|
|
iVar2 = *(int *)(param_1 + 0x98);
|
|
|
|
*(undefined4 *)(iVar2 + 0x1c) = uVar4;
|
|
|
|
puVar1 = (uint *)(iVar2 + 4);
|
|
|
|
*puVar1 = *puVar1 | 0x10;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x98) + 0xc0) = 1;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x98) + 200) = 1;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x98) + 0xc4) = 1;
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x98) + 0xcc) = 1;
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0x94) != 0) && (*(int *)(param_1 + 0x98) != 0)) {
|
|
|
|
uVar5 = FUN_0045d160(param_2,*(int *)(param_1 + 0x94),*(int *)(param_1 + 0x98));
|
|
|
|
return uVar5;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d310 at 0x0045D310 (size: 64) ---
|
|
|
|
|
|
void FUN_0045d310(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined1 local_4 [4];
|
|
|
|
|
|
|
|
if (((param_1 != 0) && (param_2 != 0)) && (cVar1 = FUN_0045ae70(¶m_1,local_4), cVar1 == '\0'))
|
|
|
|
{
|
|
|
|
FUN_006891f0(¶m_1,¶m_2);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d350 at 0x0045D350 (size: 62) ---
|
|
|
|
|
|
void __thiscall FUN_0045d350(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0x24c) != param_2) {
|
|
|
|
*(undefined4 *)(param_1 + 0x2c8) = 0;
|
|
|
|
*(int *)(param_1 + 0x24c) = param_2;
|
|
|
|
FUN_005870f0();
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x24c) != 0) {
|
|
|
|
*(int *)(param_1 + 0x2c8) = *(int *)(param_1 + 0x2c8) + 1;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d390 at 0x0045D390 (size: 75) ---
|
|
|
|
|
|
void __thiscall FUN_0045d390(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
|
|
|
|
uVar2 = DAT_008379b0;
|
|
|
|
if ((*(int *)(param_1 + 0x24c) != 0) && (*(int *)(param_1 + 0x24c) == param_2)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x2dc) = DAT_008379b4;
|
|
|
|
*(undefined4 *)(param_1 + 0x2d8) = uVar2;
|
|
|
|
FUN_005870f0();
|
|
|
|
piVar1 = (int *)(param_1 + 0x2c8);
|
|
|
|
*piVar1 = *piVar1 + -1;
|
|
|
|
if (*piVar1 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x24c) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d3e0 at 0x0045D3E0 (size: 139) ---
|
|
|
|
|
|
undefined4 FUN_0045d3e0(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
|
|
|
|
puVar2 = (undefined4 *)FUN_005df0f5(0x14);
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
puVar2 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar2 = *param_1;
|
|
|
|
puVar2[1] = 0;
|
|
|
|
puVar2[2] = 0;
|
|
|
|
puVar2[3] = 0;
|
|
|
|
puVar2[4] = 0;
|
|
|
|
FUN_0045a4e0(param_2);
|
|
|
|
}
|
|
|
|
cVar1 = FUN_0045cf50(puVar2);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
if (puVar2 != (undefined4 *)0x0) {
|
|
|
|
if ((puVar2[3] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)puVar2[2]);
|
|
|
|
}
|
|
|
|
operator_delete(puVar2);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d470 at 0x0045D470 (size: 139) ---
|
|
|
|
|
|
undefined4 FUN_0045d470(undefined4 *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
|
|
|
|
puVar2 = (undefined4 *)FUN_005df0f5(0x14);
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
puVar2 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar2 = *param_1;
|
|
|
|
puVar2[1] = 0;
|
|
|
|
puVar2[2] = 0;
|
|
|
|
puVar2[3] = 0;
|
|
|
|
puVar2[4] = 0;
|
|
|
|
FUN_005c0220(param_2);
|
|
|
|
}
|
|
|
|
cVar1 = FUN_0045cfd0(puVar2);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
if (puVar2 != (undefined4 *)0x0) {
|
|
|
|
if ((puVar2[3] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)puVar2[2]);
|
|
|
|
}
|
|
|
|
operator_delete(puVar2);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d500 at 0x0045D500 (size: 82) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045d500(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cdbc;
|
|
|
|
FUN_0045c720();
|
|
|
|
param_1[1] = &PTR_FUN_0079cda0;
|
|
|
|
if ((undefined4 *)param_1[0x19] != param_1 + 2) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x19]);
|
|
|
|
}
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d560 at 0x0045D560 (size: 82) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045d560(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cdac;
|
|
|
|
FUN_005870f0();
|
|
|
|
param_1[1] = &PTR_FUN_0079cda4;
|
|
|
|
if ((undefined4 *)param_1[0x19] != param_1 + 2) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x19]);
|
|
|
|
}
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d5c0 at 0x0045D5C0 (size: 82) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045d5c0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cdb0;
|
|
|
|
FUN_005870f0();
|
|
|
|
param_1[1] = &PTR_FUN_0079cda8;
|
|
|
|
if ((undefined4 *)param_1[0x19] != param_1 + 2) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x19]);
|
|
|
|
}
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d620 at 0x0045D620 (size: 333) ---
|
|
|
|
|
|
int __thiscall FUN_0045d620(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
int *piVar4;
|
|
|
|
uint uVar5;
|
|
|
|
uint uVar6;
|
|
|
|
uint *puVar7;
|
|
|
|
uint *puVar8;
|
|
|
|
uint *puVar9;
|
|
|
|
undefined1 local_18 [4];
|
|
|
|
undefined4 *local_14;
|
|
|
|
int local_c;
|
|
|
|
|
|
|
|
iVar2 = param_2;
|
|
|
|
if (param_1 != param_2) {
|
|
|
|
FUN_0045c720();
|
|
|
|
puVar1 = PTR_DAT_00818558;
|
|
|
|
param_2 = *(undefined4 *)(iVar2 + 0x6c);
|
|
|
|
puVar3 = (undefined4 *)FUN_00422d20(PTR_DAT_00818554,PTR_DAT_00818558,¶m_2,param_2,0);
|
|
|
|
if (puVar3 == (undefined4 *)puVar1) {
|
|
|
|
puVar3 = puVar3 + -1;
|
|
|
|
}
|
|
|
|
FUN_0045c900(*puVar3);
|
|
|
|
puVar7 = (uint *)0x0;
|
|
|
|
piVar4 = (int *)FUN_0052dcf0(local_18);
|
|
|
|
local_c = *piVar4;
|
|
|
|
puVar9 = (uint *)piVar4[2];
|
|
|
|
local_14 = (undefined4 *)piVar4[1];
|
|
|
|
while (puVar8 = puVar7, puVar9 != (uint *)0x0) {
|
|
|
|
do {
|
|
|
|
puVar7 = (uint *)FUN_005df0f5(0x14);
|
|
|
|
if (puVar7 == (uint *)0x0) {
|
|
|
|
puVar7 = (uint *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar7 = *puVar9;
|
|
|
|
puVar7[1] = 0;
|
|
|
|
puVar7[2] = 0;
|
|
|
|
puVar7[3] = 0;
|
|
|
|
puVar7[4] = 0;
|
|
|
|
FUN_0045a4e0(puVar9 + 2);
|
|
|
|
}
|
|
|
|
uVar5 = *puVar7 % *(uint *)(param_1 + 0x6c);
|
|
|
|
if (puVar8 == (uint *)0x0) {
|
|
|
|
LAB_0045d6ff:
|
|
|
|
puVar3 = (undefined4 *)(*(int *)(param_1 + 100) + uVar5 * 4);
|
|
|
|
*puVar3 = puVar7;
|
|
|
|
if (puVar8 == (uint *)0x0) {
|
|
|
|
*(undefined4 **)(param_1 + 0x68) = puVar3;
|
|
|
|
}
|
|
|
|
LAB_0045d715:
|
|
|
|
*(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar6 = *puVar8 % *(uint *)(param_1 + 0x6c);
|
|
|
|
if (uVar5 == uVar6) {
|
|
|
|
puVar8[1] = (uint)puVar7;
|
|
|
|
goto LAB_0045d715;
|
|
|
|
}
|
|
|
|
if (uVar6 < uVar5) goto LAB_0045d6ff;
|
|
|
|
}
|
|
|
|
puVar9 = (uint *)puVar9[1];
|
|
|
|
puVar8 = puVar7;
|
|
|
|
} while (puVar9 != (uint *)0x0);
|
|
|
|
do {
|
|
|
|
local_14 = local_14 + 1;
|
|
|
|
if (local_14 == (undefined4 *)(*(int *)(local_c + 0x60) + *(int *)(local_c + 0x68) * 4)) {
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
puVar9 = (uint *)*local_14;
|
|
|
|
} while (puVar9 == (uint *)0x0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d770 at 0x0045D770 (size: 259) ---
|
|
|
|
|
|
void FUN_0045d770(int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
if (0x10 < (param_2 - param_1) / 0x18) {
|
|
|
|
while (param_4 != 0) {
|
|
|
|
param_4 = param_4 + -1;
|
|
|
|
puVar1 = (undefined4 *)
|
|
|
|
FUN_0045a660(param_1,param_1 + ((param_2 - param_1) / 0x30) * 0x18,param_2 + -0x18,
|
|
|
|
param_5,param_5);
|
|
|
|
uVar3 = *puVar1;
|
|
|
|
iVar2 = puVar1[1];
|
|
|
|
InterlockedIncrement((LONG *)(iVar2 + -0x10));
|
|
|
|
iVar2 = FUN_0045aa40(param_1,param_2,uVar3,iVar2,puVar1[2],puVar1[3],puVar1[4],puVar1[5]);
|
|
|
|
FUN_0045d770(iVar2,param_2,0,param_4,param_5);
|
|
|
|
param_2 = iVar2;
|
|
|
|
if ((iVar2 - param_1) / 0x18 < 0x11) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0045cbf0(param_1,param_2,param_2,0,param_5);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d880 at 0x0045D880 (size: 43) ---
|
|
|
|
|
|
void FUN_0045d880(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_0069a850(param_2);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_0045d100(param_1,iVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d8b0 at 0x0045D8B0 (size: 48) ---
|
|
|
|
|
|
void FUN_0045d8b0(undefined4 param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = FUN_0069a850(param_3);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_0045d160(param_1,param_2,iVar1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d8e0 at 0x0045D8E0 (size: 137) ---
|
|
|
|
|
|
void FUN_0045d8e0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
void *local_c;
|
|
|
|
void *local_8;
|
|
|
|
void *local_4;
|
|
|
|
|
|
|
|
if ((param_1 != 0) && (param_2 != 0)) {
|
|
|
|
local_c = (void *)FUN_00477380(¶m_1);
|
|
|
|
if (local_c == (void *)0x0) {
|
|
|
|
local_8 = local_c;
|
|
|
|
local_4 = local_c;
|
|
|
|
FUN_004637a0(¶m_2);
|
|
|
|
FUN_0045d470(¶m_1,&local_c);
|
|
|
|
if (((uint)local_8 & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__(local_c);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_00455770(¶m_2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045d970 at 0x0045D970 (size: 548) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045da25) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045da41) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045da4a) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045da5c) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045da2d) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045da36) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045db84) */
|
|
|
|
|
|
|
|
void __thiscall FUN_0045d970(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint *puVar1;
|
|
|
|
uint *puVar2;
|
|
|
|
int *piVar3;
|
|
|
|
char cVar4;
|
|
|
|
int *piVar5;
|
|
|
|
uint *puVar6;
|
|
|
|
uint *puVar7;
|
|
|
|
int iVar8;
|
|
|
|
undefined4 *puVar9;
|
|
|
|
uint uVar10;
|
|
|
|
undefined4 *puVar11;
|
|
|
|
uint local_1c;
|
|
|
|
int *local_18;
|
|
|
|
uint local_14;
|
|
|
|
int local_10;
|
|
|
|
int local_c;
|
|
|
|
|
|
|
|
piVar5 = (int *)FUN_0052dcf0(&local_18);
|
|
|
|
puVar11 = (undefined4 *)piVar5[2];
|
|
|
|
local_c = *piVar5;
|
|
|
|
puVar9 = (undefined4 *)piVar5[1];
|
|
|
|
local_1c = 0;
|
|
|
|
while (puVar11 != (undefined4 *)0x0) {
|
|
|
|
do {
|
|
|
|
local_18 = (int *)0x0;
|
|
|
|
local_14 = 0;
|
|
|
|
local_10 = 0;
|
|
|
|
FUN_005c0220(puVar11 + 2);
|
|
|
|
piVar3 = local_18;
|
|
|
|
for (piVar5 = local_18; iVar8 = local_10, piVar5 < local_18 + local_10; piVar5 = piVar5 + 1) {
|
|
|
|
if (*piVar5 == param_2) {
|
|
|
|
iVar8 = local_10 + -1;
|
|
|
|
*piVar5 = local_18[local_10 + -1];
|
|
|
|
local_18[iVar8] = 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((iVar8 == 0) && (cVar4 = FUN_004180a0(8), cVar4 != '\0')) {
|
|
|
|
*(undefined4 *)(local_1c * 4) = *puVar11;
|
|
|
|
local_1c = local_1c + 1;
|
|
|
|
}
|
|
|
|
if ((local_14 & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__(piVar3);
|
|
|
|
}
|
|
|
|
puVar11 = (undefined4 *)puVar11[1];
|
|
|
|
} while (puVar11 != (undefined4 *)0x0);
|
|
|
|
do {
|
|
|
|
puVar9 = puVar9 + 1;
|
|
|
|
if (puVar9 == (undefined4 *)(*(int *)(local_c + 0x60) + *(int *)(local_c + 0x68) * 4))
|
|
|
|
goto LAB_0045dacc;
|
|
|
|
puVar11 = (undefined4 *)*puVar9;
|
|
|
|
} while (puVar11 == (undefined4 *)0x0);
|
|
|
|
}
|
|
|
|
LAB_0045dacc:
|
|
|
|
uVar10 = 0;
|
|
|
|
if (local_1c != 0) {
|
|
|
|
do {
|
|
|
|
puVar1 = (uint *)(*(int *)(param_1 + 0x204) +
|
|
|
|
(*(uint *)(uVar10 * 4) % *(uint *)(param_1 + 0x20c)) * 4);
|
|
|
|
puVar7 = (uint *)*puVar1;
|
|
|
|
for (puVar2 = puVar7; puVar2 != (uint *)0x0; puVar2 = (uint *)puVar2[1]) {
|
|
|
|
if (*puVar2 == *(uint *)(uVar10 * 4)) {
|
|
|
|
if (puVar2 != (uint *)0x0) {
|
|
|
|
if (puVar7 == puVar2) goto LAB_0045db2d;
|
|
|
|
do {
|
|
|
|
puVar6 = puVar7;
|
|
|
|
puVar7 = (uint *)puVar6[1];
|
|
|
|
} while (puVar7 != puVar2);
|
|
|
|
if (puVar6 == (uint *)0x0) {
|
|
|
|
LAB_0045db2d:
|
|
|
|
*puVar1 = puVar7[1];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puVar6[1] = puVar7[1];
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x210) = *(int *)(param_1 + 0x210) + -1;
|
|
|
|
if ((puVar2[3] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)puVar2[2]);
|
|
|
|
}
|
|
|
|
operator_delete(puVar2);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar10 = uVar10 + 1;
|
|
|
|
} while (uVar10 < local_1c);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045dba0 at 0x0045DBA0 (size: 155) ---
|
|
|
|
|
|
void FUN_0045dba0(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 *local_c;
|
|
|
|
undefined4 *local_8;
|
|
|
|
undefined4 *local_4;
|
|
|
|
|
|
|
|
if ((param_1 != (undefined4 *)0x0) && (param_2 != 0)) {
|
|
|
|
local_c = (undefined4 *)FUN_00477380(&stack0x0000000c);
|
|
|
|
if (local_c == (undefined4 *)0x0) {
|
|
|
|
local_8 = local_c;
|
|
|
|
local_4 = local_c;
|
|
|
|
FUN_0045d3e0(&stack0x0000000c,&local_c);
|
|
|
|
local_c = (undefined4 *)FUN_00477380(&stack0x0000000c);
|
|
|
|
if (local_c == (undefined4 *)0x0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar1 = 0;
|
|
|
|
if (local_c[2] != 0) {
|
|
|
|
piVar2 = (int *)*local_c;
|
|
|
|
do {
|
|
|
|
if ((undefined4 *)*piVar2 == param_1) {
|
|
|
|
piVar2[1] = piVar2[1] + 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
uVar1 = uVar1 + 1;
|
|
|
|
piVar2 = piVar2 + 2;
|
|
|
|
} while (uVar1 < (uint)local_c[2]);
|
|
|
|
}
|
|
|
|
local_c = param_1;
|
|
|
|
local_8 = (undefined4 *)0x1;
|
|
|
|
FUN_00699280(&local_c);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045df70 at 0x0045DF70 (size: 428) ---
|
|
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045dfd9) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045dfe9) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045dff8) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e009) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e015) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e02b) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e03f) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e055) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e0d3) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e0ed) */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0045e109) */
|
|
|
|
|
|
|
|
void __thiscall
|
|
|
|
FUN_0045df70(int param_1,undefined4 param_2,int param_3,undefined4 param_4,undefined4 param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x2f8) != 0) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
}
|
|
|
|
if ((param_3 != 0) && (cVar1 = FUN_0042ce00(1), cVar1 != '\0')) {
|
|
|
|
*(int *)(param_1 + 0x2f4) = param_3;
|
|
|
|
FUN_00459a40(param_5);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e120 at 0x0045E120 (size: 644) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045e120(int param_1,int *param_2,int param_3,int param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
char cVar3;
|
|
|
|
int iVar4;
|
|
|
|
int iVar5;
|
|
|
|
int iVar6;
|
|
|
|
int iVar7;
|
|
|
|
int *unaff_EBX;
|
|
|
|
undefined4 unaff_EBP;
|
|
|
|
undefined4 unaff_ESI;
|
|
|
|
int *piStack_34;
|
|
|
|
int iStack_30;
|
|
|
|
int *piStack_2c;
|
|
|
|
undefined1 auStack_28 [40];
|
|
|
|
|
|
|
|
piVar2 = param_2;
|
|
|
|
piVar1 = DAT_00837ff4;
|
|
|
|
if (((((param_2 != (int *)0x0) && (DAT_00870340 != 0)) && (DAT_00837ff4 != (int *)0x0)) &&
|
|
|
|
((cVar3 = FUN_00431af0(7), cVar3 != '\0' && (-1 < *(int *)(param_1 + 0x308))))) &&
|
|
|
|
((-1 < *(int *)(param_1 + 0x30c) &&
|
|
|
|
((iVar4 = FUN_0054fd20(), *(int *)(param_1 + 0x308) <= iVar4 &&
|
|
|
|
(iVar4 = FUN_0054fd30(), *(int *)(param_1 + 0x30c) <= iVar4)))))) {
|
|
|
|
iVar4 = (**(code **)(*piVar1 + 0x18))();
|
|
|
|
iVar5 = (**(code **)(*piVar1 + 0x1c))();
|
|
|
|
iVar6 = iVar4 - *(int *)(param_1 + 0x308);
|
|
|
|
iVar7 = iVar5 - *(int *)(param_1 + 0x30c);
|
|
|
|
if ((*(char *)(param_1 + 0x324) != '\0') || (0xf < (uint)(iVar7 * iVar7 + iVar6 * iVar6))) {
|
|
|
|
iStack_30 = iVar5;
|
|
|
|
FUN_00459400();
|
|
|
|
*(undefined1 *)(param_1 + 0x324) = 1;
|
|
|
|
param_2 = (int *)((uint)param_2 & 0xffffff00);
|
|
|
|
FUN_00460cc0(0x3a,¶m_2);
|
|
|
|
if ((char)param_2 == '\0') {
|
|
|
|
iVar4 = (**(code **)(*piVar2 + 0xa0))();
|
|
|
|
if ((iVar4 != 0) &&
|
|
|
|
(cVar3 = FUN_0045e120(iVar4,piVar2[0x1f] + param_3,piVar2[0x20] + param_4), cVar3 != '\0'
|
|
|
|
)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_00459660(piVar2[0xb9],piVar2,0x21,0,0,*(undefined4 *)(param_1 + 0x308),
|
|
|
|
*(undefined4 *)(param_1 + 0x30c),0,0);
|
|
|
|
FUN_0045ac50(auStack_28);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
piStack_34 = piVar2;
|
|
|
|
piStack_2c = (int *)(**(code **)(*piVar2 + 0xa0))();
|
|
|
|
if ((piStack_2c != (int *)0x0) &&
|
|
|
|
(cVar3 = (**(code **)(*piStack_2c + 0xe8))(&piStack_34), cVar3 == '\0')) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if ((piStack_34 != (int *)0x0) && (piVar2 != piStack_34)) {
|
|
|
|
FUN_004592f0(1);
|
|
|
|
FUN_00461cb0(1);
|
|
|
|
(**(code **)(*piStack_34 + 0x110))(0);
|
|
|
|
FUN_004601e0(1);
|
|
|
|
(**(code **)(*unaff_EBX + 0x2c))(iVar4 - (int)param_2,iVar5 - param_3);
|
|
|
|
FUN_00465610(unaff_ESI);
|
|
|
|
iVar5 = FUN_004592b0();
|
|
|
|
if (iVar5 != 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x30c) = unaff_EBP;
|
|
|
|
*(int *)(param_1 + 0x308) = iVar4;
|
|
|
|
iVar5 = FUN_004592b0();
|
|
|
|
*(undefined4 *)(param_1 + 0x310) = *(undefined4 *)(iVar5 + 0x20);
|
|
|
|
iVar5 = FUN_004592b0();
|
|
|
|
*(undefined4 *)(param_1 + 0x314) = *(undefined4 *)(iVar5 + 0x24);
|
|
|
|
*(undefined4 *)(param_1 + 0x31c) = unaff_ESI;
|
|
|
|
*(int **)(param_1 + 800) = unaff_EBX;
|
|
|
|
if (*(int **)(param_1 + 0x24c) == piVar2) {
|
|
|
|
FUN_0045d390(*(int **)(param_1 + 0x24c));
|
|
|
|
FUN_0045d350(*(undefined4 *)(param_1 + 0x31c));
|
|
|
|
}
|
|
|
|
FUN_0045c390(iVar4,unaff_EBP);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e3b0 at 0x0045E3B0 (size: 82) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045e3b0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045c720();
|
|
|
|
param_1[1] = &PTR_FUN_0079cd9c;
|
|
|
|
if ((undefined4 *)param_1[0x19] != param_1 + 2) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x19]);
|
|
|
|
}
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e410 at 0x0045E410 (size: 92) ---
|
|
|
|
|
|
void FUN_0045e410(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
if (param_1 != param_2) {
|
|
|
|
iVar1 = 0;
|
|
|
|
for (iVar2 = (param_2 - param_1) / 0x18; iVar2 != 1; iVar2 = iVar2 >> 1) {
|
|
|
|
iVar1 = iVar1 + 1;
|
|
|
|
}
|
|
|
|
FUN_0045d770(param_1,param_2,0,iVar1 * 2,param_1);
|
|
|
|
FUN_0045d050(param_1,param_2,param_1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e470 at 0x0045E470 (size: 58) ---
|
|
|
|
|
|
void __fastcall FUN_0045e470(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045c720();
|
|
|
|
param_1[1] = &PTR_FUN_0079cd9c;
|
|
|
|
if ((undefined4 *)param_1[0x19] != param_1 + 2) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x19]);
|
|
|
|
}
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e4b0 at 0x0045E4B0 (size: 103) ---
|
|
|
|
|
|
undefined4 FUN_0045e4b0(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
uVar1 = FUN_004220b0(param_1,0x23);
|
|
|
|
piVar2 = (int *)FUN_00415430(uVar1);
|
|
|
|
uVar1 = 0;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
iVar3 = FUN_0069a850(param_2);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
uVar1 = FUN_0045d100(piVar2,iVar3);
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
return uVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e520 at 0x0045E520 (size: 94) ---
|
|
|
|
|
|
undefined4 FUN_0045e520(undefined4 param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
piVar1 = (int *)FUN_00415730(param_2,5,0x23);
|
|
|
|
if (piVar1 == (int *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_0069a850(param_3);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
uVar3 = FUN_0045d160(param_1,piVar1,iVar2);
|
|
|
|
(**(code **)(*piVar1 + 0x14))();
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e580 at 0x0045E580 (size: 114) ---
|
|
|
|
|
|
undefined4 FUN_0045e580(undefined4 param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
uVar1 = FUN_004220b0(param_2,0x23);
|
|
|
|
piVar2 = (int *)FUN_00415430(uVar1);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar3 = FUN_0069a850(param_3);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
uVar1 = FUN_0045d160(param_1,piVar2,iVar3);
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
return uVar1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e600 at 0x0045E600 (size: 342) ---
|
|
|
|
|
|
void __thiscall FUN_0045e600(int param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
int *piVar4;
|
|
|
|
|
|
|
|
piVar4 = param_2;
|
|
|
|
if (param_2 != (int *)0x0) {
|
|
|
|
FUN_0045d970(param_2);
|
|
|
|
FUN_00693b70(¶m_2);
|
|
|
|
param_2 = piVar4;
|
|
|
|
FUN_00459530(¶m_2);
|
|
|
|
if (*(int **)(param_1 + 0x328) == piVar4) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x328) + 0x108))();
|
|
|
|
}
|
|
|
|
if ((*(int **)(param_1 + 0x32c) == piVar4) && (*(int **)(param_1 + 0x32c) != (int *)0x0)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x32c) = 0;
|
|
|
|
if (*(int *)(param_1 + 0x328) != 0) {
|
|
|
|
FUN_0045b450(*(int *)(param_1 + 0x328),0x2f,0,0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x328) + 0xb4))();
|
|
|
|
*(undefined4 *)(param_1 + 0x328) = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x24c) == piVar4) {
|
|
|
|
*(undefined4 *)(param_1 + 0x24c) = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x240) = 1;
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x244) == piVar4) {
|
|
|
|
FUN_0045b640(0);
|
|
|
|
*(undefined4 *)(param_1 + 0x248) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x244) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x250) = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x240) = 1;
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x318) == piVar4) {
|
|
|
|
*(undefined4 *)(param_1 + 0x318) = 0;
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 800) == piVar4) {
|
|
|
|
FUN_00459400();
|
|
|
|
}
|
|
|
|
if ((*(int **)(param_1 + 0x2f4) == piVar4) &&
|
|
|
|
(*(undefined4 *)(param_1 + 0x2f4) = 0, *(int *)(param_1 + 0x2f8) != 0)) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
}
|
|
|
|
puVar1 = *(undefined4 **)(param_1 + 0x33c);
|
|
|
|
if ((puVar1 != (undefined4 *)0x0) && ((int *)puVar1[0x22] == piVar4)) {
|
|
|
|
(**(code **)*puVar1)(1);
|
|
|
|
*(undefined4 *)(param_1 + 0x33c) = 0;
|
|
|
|
}
|
|
|
|
iVar3 = *(int *)(param_1 + 0x218);
|
|
|
|
while (iVar3 != 0) {
|
|
|
|
if (*(int **)(iVar3 + 4) == piVar4) {
|
|
|
|
iVar2 = *(int *)(iVar3 + 0x28);
|
|
|
|
FUN_0045a3b0(iVar3);
|
|
|
|
iVar3 = iVar2;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = *(int *)(iVar3 + 0x28);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e760 at 0x0045E760 (size: 29) ---
|
|
|
|
|
|
void __thiscall FUN_0045e760(int param_1,int param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_2 != 0) {
|
|
|
|
FUN_0045dba0(param_2,param_1 + 0x120,param_3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045e930 at 0x0045E930 (size: 1267) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 FUN_0045e930(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
void *pvVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
float fVar3;
|
|
|
|
int *piVar4;
|
|
|
|
int iVar5;
|
|
|
|
int iVar6;
|
|
|
|
undefined **ppuVar7;
|
|
|
|
LONG LVar8;
|
|
|
|
int *piVar9;
|
|
|
|
undefined *puVar10;
|
|
|
|
uint uVar11;
|
|
|
|
undefined4 *puVar12;
|
|
|
|
undefined *puStack_84;
|
|
|
|
undefined *local_80;
|
|
|
|
undefined *local_7c;
|
|
|
|
undefined *local_78;
|
|
|
|
undefined *local_74;
|
|
|
|
int *local_70;
|
|
|
|
int iStack_6c;
|
|
|
|
undefined *puStack_68;
|
|
|
|
int local_64;
|
|
|
|
uint local_60;
|
|
|
|
int *local_5c;
|
|
|
|
uint uStack_58;
|
|
|
|
undefined *puStack_54;
|
|
|
|
undefined4 uStack_50;
|
|
|
|
undefined4 uStack_4c;
|
|
|
|
undefined4 uStack_48;
|
|
|
|
undefined4 uStack_44;
|
|
|
|
|
|
|
|
if (DAT_0083e03c == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
local_70 = (int *)(DAT_0083e03c + 0x14);
|
|
|
|
local_64 = 0;
|
|
|
|
local_60 = 0;
|
|
|
|
local_5c = (int *)0x0;
|
|
|
|
puVar10 = *(undefined **)(DAT_0083e03c + 0x1c);
|
|
|
|
local_7c = (undefined *)0x0;
|
|
|
|
local_80 = (undefined *)0x0;
|
|
|
|
if (puVar10 != (undefined *)0x0) {
|
|
|
|
do {
|
|
|
|
iVar5 = *(int *)(*local_70 + -4 + (int)puVar10 * 4);
|
|
|
|
puVar10 = puVar10 + -1;
|
|
|
|
local_78 = puVar10;
|
|
|
|
if ((((*(byte *)(iVar5 + 0x556) & 1) != 0) &&
|
|
|
|
(((piVar4 = *(int **)(iVar5 + 0xb0), piVar4 != (int *)0x0 ||
|
|
|
|
((*(int *)(iVar5 + 0xac) != 0 && (piVar4 = (int *)FUN_004592b0(), piVar4 != (int *)0x0))
|
|
|
|
)) && (iVar5 = (**(code **)(*piVar4 + 0x1c))(), iVar5 != 0)))) &&
|
|
|
|
(iVar5 = *(int *)(iVar5 + 0x110), iVar5 != 0)) {
|
|
|
|
puStack_84 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
FUN_00402710(&puStack_84,"0x%08X");
|
|
|
|
iVar5 = *(int *)(iVar5 + 8);
|
|
|
|
puStack_68 = *(undefined **)(iVar5 + 0x88);
|
|
|
|
iStack_6c = *(int *)(iVar5 + 0x8c);
|
|
|
|
iVar6 = FUN_0043d7d0();
|
|
|
|
uVar11 = (uint)*(byte *)(iVar6 + 0xc) * iStack_6c * (int)puStack_68;
|
|
|
|
puStack_54 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
uStack_58 = uVar11 >> 3;
|
|
|
|
FUN_00402070();
|
|
|
|
uStack_4c = FUN_0069fe70();
|
|
|
|
uStack_50 = FUN_0069fe60();
|
|
|
|
uStack_44 = *(undefined4 *)(iVar5 + 0x8c);
|
|
|
|
uStack_48 = *(undefined4 *)(iVar5 + 0x88);
|
|
|
|
FUN_0045b9e0();
|
|
|
|
local_74 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
FUN_00402710(&local_74,&DAT_00795344);
|
|
|
|
puStack_68 = *(undefined **)(puStack_84 + -4);
|
|
|
|
ppuVar7 = &puStack_68;
|
|
|
|
if (*(undefined **)(puStack_84 + -4) <= local_7c) {
|
|
|
|
ppuVar7 = &local_7c;
|
|
|
|
}
|
|
|
|
local_7c = *ppuVar7;
|
|
|
|
puStack_68 = *(undefined **)(local_74 + -4);
|
|
|
|
ppuVar7 = &puStack_68;
|
|
|
|
if (*(undefined **)(local_74 + -4) <= local_80) {
|
|
|
|
ppuVar7 = &local_80;
|
|
|
|
}
|
|
|
|
local_80 = *ppuVar7;
|
|
|
|
puVar12 = (undefined4 *)(local_74 + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(local_74 + -0x10));
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
}
|
|
|
|
puVar12 = (undefined4 *)(puStack_54 + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(puStack_54 + -0x10));
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
}
|
|
|
|
puVar12 = (undefined4 *)(puStack_84 + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(puStack_84 + -0x10));
|
|
|
|
puVar10 = local_78;
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
puVar10 = local_78;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
piVar4 = local_5c;
|
|
|
|
} while (puVar10 != (undefined *)0x0);
|
|
|
|
if (local_5c != (int *)0x0) {
|
|
|
|
local_74 = PTR_DAT_00818344;
|
|
|
|
local_70 = local_5c;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
FUN_00402710(&local_74,&DAT_00795344);
|
|
|
|
uVar2 = *(undefined4 *)(local_74 + -4);
|
|
|
|
puStack_68 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
local_78 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
FUN_00402710(&local_78,"%s%d%s%d%s%d%s",&DAT_0079ce00,uVar2,"d.) %",local_7c,"s - %",local_80)
|
|
|
|
;
|
|
|
|
FUN_0045e410(local_64,local_64 + (int)local_5c * 0x18);
|
|
|
|
piVar9 = (int *)0x0;
|
|
|
|
iVar5 = 0;
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
local_80 = (undefined *)0x0;
|
|
|
|
do {
|
|
|
|
piVar4 = (int *)(local_80 + local_64);
|
|
|
|
local_7c = PTR_DAT_00818344;
|
|
|
|
iVar5 = iVar5 + *piVar4;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
iStack_6c = *piVar4;
|
|
|
|
piVar9 = (int *)((int)piVar9 + 1);
|
|
|
|
fVar3 = (float)iStack_6c;
|
|
|
|
if (iStack_6c < 0) {
|
|
|
|
fVar3 = fVar3 + _DAT_0079920c;
|
|
|
|
}
|
|
|
|
FUN_00402710(&local_7c,local_78,piVar9,piVar4[1],iStack_6c,(double)(fVar3 * _DAT_0079cdec)
|
|
|
|
,piVar4[2],piVar4[3],piVar4[4]);
|
|
|
|
FUN_004355a0(&local_7c);
|
|
|
|
puVar12 = (undefined4 *)(local_7c + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(local_7c + -0x10));
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
}
|
|
|
|
local_80 = local_80 + 0x18;
|
|
|
|
piVar4 = local_70;
|
|
|
|
} while (piVar9 < local_70);
|
|
|
|
}
|
|
|
|
puStack_84 = PTR_DAT_00818344;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));
|
|
|
|
fVar3 = (float)iVar5;
|
|
|
|
if (iVar5 < 0) {
|
|
|
|
fVar3 = fVar3 + _DAT_0079920c;
|
|
|
|
}
|
|
|
|
iStack_6c = iVar5;
|
|
|
|
FUN_00402710(&puStack_84," %d elements, %d bytes tot, %.02f MB tot\n",piVar4,iVar5,
|
|
|
|
(double)(fVar3 * _DAT_0079cdec));
|
|
|
|
FUN_004355a0(&puStack_84);
|
|
|
|
puVar12 = (undefined4 *)(puStack_84 + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(puStack_84 + -0x10));
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
}
|
|
|
|
puVar12 = (undefined4 *)(local_78 + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(local_78 + -0x10));
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
}
|
|
|
|
puVar12 = (undefined4 *)(puStack_68 + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(puStack_68 + -0x10));
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
}
|
|
|
|
puVar10 = local_74;
|
|
|
|
iVar5 = InterlockedDecrement((LONG *)(local_74 + -0x10));
|
|
|
|
goto joined_r0x0045eda3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00401340();
|
|
|
|
FUN_004355a0();
|
|
|
|
puVar10 = local_74;
|
|
|
|
iVar5 = InterlockedDecrement((LONG *)(local_74 + -0x10));
|
|
|
|
joined_r0x0045eda3:
|
|
|
|
if ((iVar5 == 0) && ((undefined4 *)(puVar10 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(puVar10 + -0x14))();
|
|
|
|
}
|
|
|
|
if (((local_60 & 0x80000000) == 0x80000000) && (local_64 != 0)) {
|
|
|
|
iVar5 = *(int *)(local_64 + -4);
|
|
|
|
pvVar1 = (void *)(local_64 + -4);
|
|
|
|
if (-1 < iVar5 + -1) {
|
|
|
|
iVar6 = local_64 + iVar5 * 0x18 + 4;
|
|
|
|
do {
|
|
|
|
piVar4 = (int *)(iVar6 + -0x18);
|
|
|
|
iVar6 = iVar6 + -0x18;
|
|
|
|
puVar12 = (undefined4 *)(*piVar4 + -0x14);
|
|
|
|
LVar8 = InterlockedDecrement((LONG *)(*piVar4 + -0x10));
|
|
|
|
if ((LVar8 == 0) && (puVar12 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar12)();
|
|
|
|
}
|
|
|
|
iVar5 = iVar5 + -1;
|
|
|
|
} while (iVar5 != 0);
|
|
|
|
}
|
|
|
|
operator_delete__(pvVar1);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ee30 at 0x0045EE30 (size: 183) ---
|
|
|
|
|
|
void __fastcall FUN_0045ee30(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
void *pvVar2;
|
|
|
|
void *pvVar3;
|
|
|
|
int *piVar4;
|
|
|
|
void *pvVar5;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
do {
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
piVar4 = *(int **)(param_1 + 100);
|
|
|
|
while (piVar4 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {
|
|
|
|
if (**(int **)(param_1 + 100) != 0) {
|
|
|
|
piVar4 = *(int **)(param_1 + 100);
|
|
|
|
pvVar5 = (void *)*piVar4;
|
|
|
|
goto LAB_0045ee6f;
|
|
|
|
}
|
|
|
|
piVar4 = *(int **)(param_1 + 100) + 1;
|
|
|
|
*(int **)(param_1 + 100) = piVar4;
|
|
|
|
}
|
|
|
|
piVar4 = (int *)0x0;
|
|
|
|
pvVar5 = (void *)0x0;
|
|
|
|
LAB_0045ee6f:
|
|
|
|
pvVar3 = (void *)*piVar4;
|
|
|
|
if (pvVar3 == pvVar5) {
|
|
|
|
LAB_0045ee82:
|
|
|
|
*piVar4 = *(int *)((int)pvVar3 + 4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
do {
|
|
|
|
pvVar2 = pvVar3;
|
|
|
|
pvVar3 = *(void **)((int)pvVar2 + 4);
|
|
|
|
} while (pvVar3 != pvVar5);
|
|
|
|
if (pvVar2 == (void *)0x0) goto LAB_0045ee82;
|
|
|
|
*(undefined4 *)((int)pvVar2 + 4) = *(undefined4 *)((int)pvVar3 + 4);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;
|
|
|
|
if (pvVar5 != (void *)0x0) {
|
|
|
|
*(undefined ***)((int)pvVar5 + 8) = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045c720();
|
|
|
|
*(undefined ***)((int)pvVar5 + 0xc) = &PTR_FUN_0079cd9c;
|
|
|
|
if (*(void **)((int)pvVar5 + 0x6c) != (void *)((int)pvVar5 + 0x10)) {
|
|
|
|
operator_delete__(*(void **)((int)pvVar5 + 0x6c));
|
|
|
|
}
|
|
|
|
*(undefined4 *)((int)pvVar5 + 0x6c) = 0;
|
|
|
|
*(undefined4 *)((int)pvVar5 + 0x70) = 0;
|
|
|
|
*(undefined4 *)((int)pvVar5 + 0x74) = 0;
|
|
|
|
*(undefined4 *)((int)pvVar5 + 0x78) = 0;
|
|
|
|
operator_delete(pvVar5);
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 0x6c);
|
|
|
|
} while( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045eef0 at 0x0045EEF0 (size: 587) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_0045eef0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
int iVar3;
|
|
|
|
uint uVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
int local_8;
|
|
|
|
int iStack_4;
|
|
|
|
|
|
|
|
FUN_00401340("Tooltip Delay");
|
|
|
|
FUN_00431090(&DAT_0083e05c,&local_8,&LAB_0045cd20,0,0,0);
|
|
|
|
puVar6 = (undefined4 *)(local_8 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_8 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
FUN_00401340("Tooltip Enable");
|
|
|
|
FUN_00411d90(&DAT_0083e058,&local_8,&LAB_0045cd20,0,0,0);
|
|
|
|
puVar6 = (undefined4 *)(local_8 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_8 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
FUN_0054fc10(&LAB_0045ce40);
|
|
|
|
FUN_0040fcd0();
|
|
|
|
FUN_00472880();
|
|
|
|
FUN_004722e0();
|
|
|
|
FUN_00468d20();
|
|
|
|
FUN_004708d0();
|
|
|
|
FUN_0046fb60();
|
|
|
|
FUN_0046e540();
|
|
|
|
FUN_0046cfa0();
|
|
|
|
FUN_0046cc20();
|
|
|
|
FUN_0046ca90();
|
|
|
|
FUN_0046bec0();
|
|
|
|
FUN_0046bbd0();
|
|
|
|
FUN_0046b8c0();
|
|
|
|
FUN_0046b400();
|
|
|
|
FUN_0046b060();
|
|
|
|
FUN_00476880();
|
|
|
|
FUN_00476260();
|
|
|
|
FUN_00475df0();
|
|
|
|
FUN_004758a0();
|
|
|
|
FUN_004756e0();
|
|
|
|
FUN_004752a0();
|
|
|
|
FUN_00475100();
|
|
|
|
iVar3 = FUN_0045d1c0(0);
|
|
|
|
*(int *)(param_1 + 0x9c) = iVar3;
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
*(uint *)(iVar3 + 0x554) = *(uint *)(iVar3 + 0x554) | 4;
|
|
|
|
FUN_0044dcb0();
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x334) & 0x7fffffff;
|
|
|
|
if (uVar4 <= *(uint *)(param_1 + 0x338)) {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 == '\0') goto LAB_0045f074;
|
|
|
|
}
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x330) + *(int *)(param_1 + 0x338) * 4) =
|
|
|
|
*(undefined4 *)(param_1 + 0x9c);
|
|
|
|
*(int *)(param_1 + 0x338) = *(int *)(param_1 + 0x338) + 1;
|
|
|
|
LAB_0045f074:
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x48))(param_1,0x11);
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x34))(3,param_1 + 4,0);
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x34))(0xd,param_1 + 4,4000);
|
|
|
|
}
|
|
|
|
FUN_00401340(
|
|
|
|
"The UIElementManager will tell you which root UIElements are using what UISurface Memory"
|
|
|
|
);
|
|
|
|
FUN_00401340("UIElementManager.PrintUISurfaceUsage");
|
|
|
|
FUN_00436580(FUN_0045e930,&local_8,&iStack_4);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_8 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(local_8 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_8 + -0x14))(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(iStack_4 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(iStack_4 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_4 + -0x14))(1);
|
|
|
|
}
|
|
|
|
puVar6 = (undefined4 *)FUN_00415640(&iStack_4,0x17,9);
|
|
|
|
*(undefined4 *)(param_1 + 0x2d0) = *puVar6;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f140 at 0x0045F140 (size: 184) ---
|
|
|
|
|
|
undefined4 FUN_0045f140(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
|
|
|
|
puVar2 = (undefined4 *)FUN_005df0f5(0x7c);
|
|
|
|
if (puVar2 == (undefined4 *)0x0) {
|
|
|
|
puVar2 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*puVar2 = *param_1;
|
|
|
|
puVar2[1] = 0;
|
|
|
|
puVar2[2] = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045bbe0(*(undefined4 *)(param_2 + 0x6c));
|
|
|
|
FUN_0045d620(param_2);
|
|
|
|
puVar2[2] = &PTR_FUN_0079cdb8;
|
|
|
|
}
|
|
|
|
cVar1 = FUN_0045ced0(puVar2);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
if (puVar2 != (undefined4 *)0x0) {
|
|
|
|
puVar2[2] = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045c720();
|
|
|
|
puVar2[3] = &PTR_FUN_0079cd9c;
|
|
|
|
if ((undefined4 *)puVar2[0x1b] != puVar2 + 4) {
|
|
|
|
operator_delete__((undefined4 *)puVar2[0x1b]);
|
|
|
|
}
|
|
|
|
puVar2[0x1b] = 0;
|
|
|
|
puVar2[0x1c] = 0;
|
|
|
|
puVar2[0x1d] = 0;
|
|
|
|
puVar2[0x1e] = 0;
|
|
|
|
operator_delete(puVar2);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f200 at 0x0045F200 (size: 382) ---
|
|
|
|
|
|
void __fastcall FUN_0045f200(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
int iStack_4;
|
|
|
|
|
|
|
|
iStack_4 = param_1;
|
|
|
|
if (*(undefined4 **)(param_1 + 0x33c) != (undefined4 *)0x0) {
|
|
|
|
(**(code **)**(undefined4 **)(param_1 + 0x33c))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x33c) = 0;
|
|
|
|
if ((*(int *)(param_1 + 0x31c) != 0) &&
|
|
|
|
((*(uint *)(*(int *)(param_1 + 0x31c) + 0x554) >> 0xf & 1) != 0)) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x31c) = 0;
|
|
|
|
}
|
|
|
|
*(undefined1 *)(param_1 + 0x324) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 800) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x318) = 0;
|
|
|
|
if (*(int *)(param_1 + 0x2f8) != 0) {
|
|
|
|
FUN_00460250();
|
|
|
|
*(undefined4 *)(param_1 + 0x2f8) = 0;
|
|
|
|
}
|
|
|
|
FUN_0045a350();
|
|
|
|
thunk_FUN_00436cf0(&DAT_0083e05c);
|
|
|
|
thunk_FUN_00436cf0(&DAT_0083e058);
|
|
|
|
if (*(undefined4 **)(param_1 + 0x9c) != (undefined4 *)0x0) {
|
|
|
|
(**(code **)**(undefined4 **)(param_1 + 0x9c))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x9c) = 0;
|
|
|
|
FUN_0045ee30();
|
|
|
|
FUN_0045c720();
|
|
|
|
FUN_005870f0();
|
|
|
|
FUN_0044dcb0();
|
|
|
|
FUN_0054e370(&LAB_0045ce40);
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x4c))(param_1,0x11);
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x38))(3,param_1 + 4);
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x38))(0xd,param_1 + 4);
|
|
|
|
}
|
|
|
|
FUN_00401340("UIElementManager.ShowDebggingWindow");
|
|
|
|
FUN_00436830(&iStack_4);
|
|
|
|
puVar2 = (undefined4 *)(iStack_4 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(iStack_4 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
FUN_00401340("UIElementManager.PrintUISurfaceUsage");
|
|
|
|
FUN_00436830(&iStack_4);
|
|
|
|
puVar2 = (undefined4 *)(iStack_4 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(iStack_4 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar2)(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f380 at 0x0045F380 (size: 209) ---
|
|
|
|
|
|
void __thiscall FUN_0045f380(int param_1,int param_2,int param_3,int param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined **local_74 [29];
|
|
|
|
|
|
|
|
if (param_2 != 0) {
|
|
|
|
iVar2 = FUN_00477380(¶m_3);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
local_74[0] = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045bbe0(0);
|
|
|
|
local_74[0] = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045f140(¶m_3,local_74);
|
|
|
|
FUN_0045e470();
|
|
|
|
iVar2 = FUN_00477380(¶m_3);
|
|
|
|
}
|
|
|
|
iVar3 = param_4;
|
|
|
|
FUN_0045dba0(param_2,iVar2,param_4);
|
|
|
|
iVar2 = param_3;
|
|
|
|
if ((((iVar3 == 0x1c) || (iVar3 == 0x1d)) || (iVar3 == 0x19)) || (iVar3 == 0x40)) {
|
|
|
|
iVar3 = *(int *)(param_1 + 0x1c);
|
|
|
|
while (iVar3 != 0) {
|
|
|
|
piVar1 = *(int **)(*(int *)(param_1 + 0x14) + -4 + iVar3 * 4);
|
|
|
|
iVar3 = iVar3 + -1;
|
|
|
|
if (piVar1[0xb9] == iVar2) {
|
|
|
|
(**(code **)(*piVar1 + 0x110))(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f460 at 0x0045F460 (size: 82) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_0045f460(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_0079cdb4;
|
|
|
|
FUN_0045ee30();
|
|
|
|
param_1[1] = &PTR_FUN_0079cd98;
|
|
|
|
if ((undefined4 *)param_1[0x19] != param_1 + 2) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x19]);
|
|
|
|
}
|
|
|
|
param_1[0x19] = 0;
|
|
|
|
param_1[0x1a] = 0;
|
|
|
|
param_1[0x1b] = 0;
|
|
|
|
param_1[0x1c] = 0;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f4c0 at 0x0045F4C0 (size: 486) ---
|
|
|
|
|
|
void __fastcall FUN_0045f4c0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
param_1[-1] = &PTR_LAB_0079cf34;
|
|
|
|
*param_1 = &PTR_FUN_0079cf28;
|
|
|
|
if ((param_1[0xcc] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0xcb]);
|
|
|
|
}
|
|
|
|
param_1[0x94] = &PTR_FUN_0079cdb0;
|
|
|
|
FUN_005870f0();
|
|
|
|
param_1[0x95] = &PTR_FUN_0079cda8;
|
|
|
|
if ((undefined4 *)param_1[0xad] != param_1 + 0x96) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0xad]);
|
|
|
|
}
|
|
|
|
param_1[0xad] = 0;
|
|
|
|
param_1[0xae] = 0;
|
|
|
|
param_1[0xaf] = 0;
|
|
|
|
param_1[0xb0] = 0;
|
|
|
|
FUN_0045b110();
|
|
|
|
param_1[0x67] = &PTR_FUN_0079cdbc;
|
|
|
|
FUN_0045c720();
|
|
|
|
param_1[0x68] = &PTR_FUN_0079cda0;
|
|
|
|
if ((undefined4 *)param_1[0x80] != param_1 + 0x69) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x80]);
|
|
|
|
}
|
|
|
|
param_1[0x80] = 0;
|
|
|
|
param_1[0x81] = 0;
|
|
|
|
param_1[0x82] = 0;
|
|
|
|
param_1[0x83] = 0;
|
|
|
|
if ((param_1[0x65] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[100]);
|
|
|
|
}
|
|
|
|
param_1[0x47] = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045c720();
|
|
|
|
param_1[0x48] = &PTR_FUN_0079cd9c;
|
|
|
|
if ((undefined4 *)param_1[0x60] != param_1 + 0x49) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x60]);
|
|
|
|
}
|
|
|
|
param_1[0x60] = 0;
|
|
|
|
param_1[0x61] = 0;
|
|
|
|
param_1[0x62] = 0;
|
|
|
|
param_1[99] = 0;
|
|
|
|
param_1[0x2a] = &PTR_FUN_0079cdb4;
|
|
|
|
FUN_0045ee30();
|
|
|
|
param_1[0x2b] = &PTR_FUN_0079cd98;
|
|
|
|
if ((undefined4 *)param_1[0x43] != param_1 + 0x2c) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x43]);
|
|
|
|
}
|
|
|
|
param_1[0x43] = 0;
|
|
|
|
param_1[0x44] = 0;
|
|
|
|
param_1[0x45] = 0;
|
|
|
|
param_1[0x46] = 0;
|
|
|
|
param_1[7] = &PTR_FUN_0079cdac;
|
|
|
|
FUN_005870f0();
|
|
|
|
param_1[8] = &PTR_FUN_0079cda4;
|
|
|
|
if ((undefined4 *)param_1[0x20] != param_1 + 9) {
|
|
|
|
operator_delete__((undefined4 *)param_1[0x20]);
|
|
|
|
}
|
|
|
|
param_1[0x20] = 0;
|
|
|
|
param_1[0x21] = 0;
|
|
|
|
param_1[0x22] = 0;
|
|
|
|
param_1[0x23] = 0;
|
|
|
|
if ((param_1[5] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[4]);
|
|
|
|
}
|
|
|
|
if ((param_1[2] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[1]);
|
|
|
|
}
|
|
|
|
param_1 = (undefined4 *)(-(uint)(param_1 != (undefined4 *)0x4) & (uint)param_1);
|
|
|
|
*param_1 = &PTR_FUN_00795824;
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
(**(code **)(*DAT_00837ff4 + 0x3c))(param_1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f6b0 at 0x0045F6B0 (size: 537) ---
|
|
|
|
|
|
undefined4 * __fastcall FUN_0045f6b0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
|
|
|
|
param_1[1] = &PTR_FUN_00795824;
|
|
|
|
*param_1 = &PTR_LAB_0079cf34;
|
|
|
|
param_1[1] = &PTR_FUN_0079cf28;
|
|
|
|
param_1[2] = 0;
|
|
|
|
param_1[3] = 0;
|
|
|
|
param_1[4] = 0;
|
|
|
|
param_1[5] = 0;
|
|
|
|
param_1[6] = 0;
|
|
|
|
param_1[7] = 0;
|
|
|
|
param_1[8] = &PTR_FUN_0079cdac;
|
|
|
|
FUN_0045ba30(0x17);
|
|
|
|
param_1[0x25] = 0;
|
|
|
|
param_1[0x26] = 0;
|
|
|
|
param_1[0x2b] = &PTR_FUN_0079cdb4;
|
|
|
|
FUN_0045bb50(0);
|
|
|
|
param_1[0x2b] = &PTR_FUN_0079cdb4;
|
|
|
|
param_1[0x48] = &PTR_FUN_0079cdb8;
|
|
|
|
FUN_0045bbe0(0);
|
|
|
|
param_1[0x48] = &PTR_FUN_0079cdb8;
|
|
|
|
param_1[0x65] = 0;
|
|
|
|
param_1[0x66] = 0;
|
|
|
|
param_1[0x67] = 0;
|
|
|
|
param_1[0x68] = &PTR_FUN_0079cdbc;
|
|
|
|
FUN_0045bc70(0);
|
|
|
|
param_1[0x68] = &PTR_FUN_0079cdbc;
|
|
|
|
param_1[0x85] = &PTR_FUN_0079cd90;
|
|
|
|
param_1[0x86] = 0;
|
|
|
|
param_1[0x87] = 0;
|
|
|
|
param_1[0x88] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x89) = 0;
|
|
|
|
param_1[0x8a] = DAT_0083e0a8;
|
|
|
|
param_1[0x8b] = 0;
|
|
|
|
param_1[0x8c] = 0;
|
|
|
|
param_1[0x8d] = DAT_0083e0a8;
|
|
|
|
param_1[0x8e] = 0;
|
|
|
|
param_1[0x8f] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x90) = 0;
|
|
|
|
param_1[0x91] = 0;
|
|
|
|
param_1[0x92] = 0;
|
|
|
|
param_1[0x93] = 0;
|
|
|
|
param_1[0x94] = 0;
|
|
|
|
param_1[0x95] = &PTR_FUN_0079cdb0;
|
|
|
|
FUN_0045bac0(0x17);
|
|
|
|
uVar2 = DAT_0079cd2c;
|
|
|
|
uVar1 = DAT_0079cd28;
|
|
|
|
param_1[0xb2] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0xb3) = 0;
|
|
|
|
param_1[0xb4] = DAT_0083e0a8;
|
|
|
|
param_1[0xb6] = uVar1;
|
|
|
|
*(undefined1 *)(param_1 + 0xb5) = 0;
|
|
|
|
param_1[0xb7] = uVar2;
|
|
|
|
param_1[0xb8] = uVar1;
|
|
|
|
param_1[0xb9] = uVar2;
|
|
|
|
*(undefined1 *)(param_1 + 0xba) = 1;
|
|
|
|
param_1[0xbb] = 0x3e800000;
|
|
|
|
param_1[0xbc] = 0x41200000;
|
|
|
|
param_1[0xbd] = 0;
|
|
|
|
param_1[0xbe] = 0;
|
|
|
|
param_1[0xc2] = 0;
|
|
|
|
param_1[0xc3] = 0;
|
|
|
|
param_1[0xc6] = 0;
|
|
|
|
param_1[199] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0xc9) = 0;
|
|
|
|
*(undefined1 *)((int)param_1 + 0x325) = 0;
|
|
|
|
param_1[0xca] = 0;
|
|
|
|
param_1[0xcb] = 0;
|
|
|
|
param_1[0xcc] = 0;
|
|
|
|
param_1[0xcd] = 0;
|
|
|
|
param_1[0xce] = 0;
|
|
|
|
param_1[0xcf] = 0;
|
|
|
|
param_1[0x28] = DAT_00819944;
|
|
|
|
param_1[0x29] = DAT_00819948;
|
|
|
|
param_1[0x2a] = DAT_0081994c;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f8d0 at 0x0045F8D0 (size: 34) ---
|
|
|
|
|
|
int __thiscall FUN_0045f8d0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_0045f4c0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete((void *)(param_1 + -4));
|
|
|
|
}
|
|
|
|
return param_1 + -4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f900 at 0x0045F900 (size: 50) ---
|
|
|
|
|
|
void FUN_0045f900(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
if (DAT_0083e03c == 0) {
|
|
|
|
iVar1 = FUN_005df0f5(0x340);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
DAT_0083e03c = FUN_0045f6b0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
DAT_0083e03c = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f940 at 0x0045F940 (size: 42) ---
|
|
|
|
|
|
void __thiscall FUN_0045f940(int *param_1,int param_2,int param_3,int param_4,int param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = param_2;
|
|
|
|
param_1[2] = param_2 + -1 + param_4;
|
|
|
|
param_1[1] = param_3;
|
|
|
|
param_1[3] = param_3 + -1 + param_5;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f9b0 at 0x0045F9B0 (size: 30) ---
|
|
|
|
|
|
void __thiscall FUN_0045f9b0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0xa4) =
|
|
|
|
*(uint *)(param_1 + 0xa4) ^ ((uint)param_2 << 5 ^ *(uint *)(param_1 + 0xa4)) & 0x20;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f9d0 at 0x0045F9D0 (size: 29) ---
|
|
|
|
|
|
void __thiscall FUN_0045f9d0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 1 ^ *(uint *)(param_1 + 0x554)) & 2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045f9f0 at 0x0045F9F0 (size: 30) ---
|
|
|
|
|
|
void __thiscall FUN_0045f9f0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 3 ^ *(uint *)(param_1 + 0x554)) & 8;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fa10 at 0x0045FA10 (size: 30) ---
|
|
|
|
|
|
void __thiscall FUN_0045fa10(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 4 ^ *(uint *)(param_1 + 0x554)) & 0x10;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fa30 at 0x0045FA30 (size: 30) ---
|
|
|
|
|
|
void __thiscall FUN_0045fa30(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 5 ^ *(uint *)(param_1 + 0x554)) & 0x20;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fa50 at 0x0045FA50 (size: 32) ---
|
|
|
|
|
|
void __thiscall FUN_0045fa50(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 9 ^ *(uint *)(param_1 + 0x554)) & 0x200;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fa70 at 0x0045FA70 (size: 32) ---
|
|
|
|
|
|
void __thiscall FUN_0045fa70(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 10 ^ *(uint *)(param_1 + 0x554)) & 0x400;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fa90 at 0x0045FA90 (size: 32) ---
|
|
|
|
|
|
void __thiscall FUN_0045fa90(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 7 ^ *(uint *)(param_1 + 0x554)) & 0x80;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fab0 at 0x0045FAB0 (size: 32) ---
|
|
|
|
|
|
void __thiscall FUN_0045fab0(int param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) =
|
|
|
|
*(uint *)(param_1 + 0x554) ^ ((uint)param_2 << 0xc ^ *(uint *)(param_1 + 0x554)) & 0x1000;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fad0 at 0x0045FAD0 (size: 96) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __thiscall FUN_0045fad0(float *param_1,float *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((ABS(*param_1 - *param_2) < _DAT_0079cf4c != (ABS(*param_1 - *param_2) == _DAT_0079cf4c)) &&
|
|
|
|
(ABS(param_1[1] - param_2[1]) < _DAT_0079cf4c !=
|
|
|
|
(ABS(param_1[1] - param_2[1]) == _DAT_0079cf4c))) &&
|
|
|
|
(ABS(param_1[2] - param_2[2]) < _DAT_0079cf4c !=
|
|
|
|
(ABS(param_1[2] - param_2[2]) == _DAT_0079cf4c))) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fb30 at 0x0045FB30 (size: 70) ---
|
|
|
|
|
|
int * __fastcall FUN_0045fb30(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int *piVar3;
|
|
|
|
|
|
|
|
piVar3 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
uVar1 = param_1[0x155];
|
|
|
|
while( true ) {
|
|
|
|
piVar2 = piVar3;
|
|
|
|
if ((uVar1 >> 0x15 & 1) != 0) {
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
if (piVar2 == (int *)0x0) break;
|
|
|
|
piVar3 = (int *)(**(code **)(*piVar2 + 0xa0))();
|
|
|
|
uVar1 = piVar2[0x155];
|
|
|
|
param_1 = piVar2;
|
|
|
|
}
|
|
|
|
return (int *)0x0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fbb0 at 0x0045FBB0 (size: 44) ---
|
|
|
|
|
|
bool __thiscall FUN_0045fbb0(int *param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
bool bVar2;
|
|
|
|
|
|
|
|
piVar1 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
bVar2 = piVar1 == (int *)0x0;
|
|
|
|
if (!bVar2) {
|
|
|
|
do {
|
|
|
|
if (piVar1 == param_2) break;
|
|
|
|
piVar1 = (int *)(**(code **)(*piVar1 + 0xa0))();
|
|
|
|
} while (piVar1 != (int *)0x0);
|
|
|
|
bVar2 = piVar1 == (int *)0x0;
|
|
|
|
}
|
|
|
|
return !bVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fbe0 at 0x0045FBE0 (size: 97) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045fbe0(int *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
if (DAT_00837ff4 == (int *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = (**(code **)(*param_1 + 0xa0))();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
piVar2 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
(**(code **)(*piVar2 + 0xb0))(param_2 + -1);
|
|
|
|
}
|
|
|
|
if (param_1[0x17b] != 0) {
|
|
|
|
uVar3 = (**(code **)(*DAT_00837ff4 + 0x34))(param_1[0x17b],param_1,param_2);
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fc50 at 0x0045FC50 (size: 73) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_0045fc50(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
if (DAT_00837ff4 != (int *)0x0) {
|
|
|
|
iVar1 = (**(code **)(*param_1 + 0xa0))();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
piVar2 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
(**(code **)(*piVar2 + 0xb4))();
|
|
|
|
}
|
|
|
|
if (param_1[0x17b] != 0) {
|
|
|
|
uVar3 = (**(code **)(*DAT_00837ff4 + 0x38))(param_1[0x17b],param_1);
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fca0 at 0x0045FCA0 (size: 51) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_0045fca0(int *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
iVar1 = (**(code **)(*param_1 + 0xa0))();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
piVar2 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
uVar3 = (**(code **)(*piVar2 + 0xb8))(param_1,param_2);
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fce0 at 0x0045FCE0 (size: 42) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_0045fce0(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
|
|
|
|
iVar1 = (**(code **)(*param_1 + 0xa0))();
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
piVar2 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
/* WARNING: Could not recover jumptable at 0x0045fcfe. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
uVar3 = (**(code **)(*piVar2 + 0xb8))();
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fd80 at 0x0045FD80 (size: 191) ---
|
|
|
|
|
|
void __thiscall FUN_0045fd80(int *param_1,int param_2,int param_3,int param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
if ((((uint)param_1[0x155] >> 0x13 & 1) == 0) && (((uint)param_1[0x155] >> 0x12 & 1) == 0)) {
|
|
|
|
param_1[0x121] = param_1[0x1f];
|
|
|
|
param_1[0x122] = param_1[0x20];
|
|
|
|
iVar2 = FUN_0069fe70();
|
|
|
|
param_1[0x123] = iVar2;
|
|
|
|
iVar2 = FUN_0069fe60();
|
|
|
|
param_1[0x124] = iVar2;
|
|
|
|
param_1[0x125] = param_3;
|
|
|
|
param_1[0x126] = param_4;
|
|
|
|
if (param_2 != 0) {
|
|
|
|
uVar1 = param_1[0x155];
|
|
|
|
param_1[0x120] = param_2;
|
|
|
|
param_1[0x155] = uVar1 | 0x80000;
|
|
|
|
if (((uVar1 & 1) != 0) && ((uVar1 & 0x10000) != 0)) {
|
|
|
|
param_3 = 0;
|
|
|
|
(**(code **)(*param_1 + 0x11c))(¶m_3);
|
|
|
|
(**(code **)(*param_1 + 0x118))(param_2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fe40 at 0x0045FE40 (size: 79) ---
|
|
|
|
|
|
void __fastcall FUN_0045fe40(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
undefined4 unaff_ESI;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
uVar1 = param_1[0x155];
|
|
|
|
uVar2 = uVar1 & 0xfff7ffff;
|
|
|
|
param_1[0x155] = uVar2;
|
|
|
|
if (((uVar1 & 1) != 0) && ((uVar2 >> 0x10 & 1) != 0)) {
|
|
|
|
local_4 = 0;
|
|
|
|
(**(code **)(*param_1 + 0x11c))(&local_4);
|
|
|
|
(**(code **)(*param_1 + 0x118))(unaff_ESI);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045fe90 at 0x0045FE90 (size: 107) ---
|
|
|
|
|
|
void __thiscall FUN_0045fe90(int param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
|
|
|
|
if (((*(uint *)(param_1 + 0x554) >> 0x13 & 1) == 0) &&
|
|
|
|
((*(uint *)(param_1 + 0x554) >> 0x12 & 1) == 0)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x494) = param_2;
|
|
|
|
*(undefined4 *)(param_1 + 0x484) = *(undefined4 *)(param_1 + 0x7c);
|
|
|
|
*(undefined4 *)(param_1 + 0x498) = param_3;
|
|
|
|
*(undefined4 *)(param_1 + 0x488) = *(undefined4 *)(param_1 + 0x80);
|
|
|
|
uVar1 = FUN_0069fe70();
|
|
|
|
*(undefined4 *)(param_1 + 0x48c) = uVar1;
|
|
|
|
uVar1 = FUN_0069fe60();
|
|
|
|
*(undefined4 *)(param_1 + 0x490) = uVar1;
|
|
|
|
*(uint *)(param_1 + 0x554) = *(uint *)(param_1 + 0x554) | 0x40000;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ff00 at 0x0045FF00 (size: 11) ---
|
|
|
|
|
|
void __fastcall FUN_0045ff00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*(uint *)(param_1 + 0x554) = *(uint *)(param_1 + 0x554) & 0xfffbffff;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_0045ff10 at 0x0045FF10 (size: 281) ---
|
|
|
|
|
|
void __thiscall FUN_0045ff10(int *param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
if (DAT_00837ff4 == (int *)0x0) {
|
|
|
|
cVar1 = '\0';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
cVar1 = (**(code **)(*DAT_00837ff4 + 0x58))();
|
|
|
|
}
|
|
|
|
param_2 = (param_1[0x121] - param_1[0x125]) + param_2;
|
|
|
|
param_3 = (param_1[0x122] - param_1[0x126]) + param_3;
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
if (param_2 % 10 != 0) {
|
|
|
|
param_2 = param_2 - param_2 % 10;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0xa0))();
|
|
|
|
iVar2 = FUN_0069fe70();
|
|
|
|
iVar3 = FUN_0069fe70();
|
|
|
|
if ((param_3 < iVar2 - iVar3) && (param_3 % 10 != 0)) {
|
|
|
|
param_3 = param_3 - param_3 % 10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (param_2 < 0) {
|
|
|
|
param_2 = 0;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0xa0))();
|
|
|
|
iVar2 = FUN_0069fe60();
|
|
|
|
iVar3 = FUN_0069fe60();
|
|
|
|
if (iVar2 - iVar3 < param_2) {
|
|
|
|
(**(code **)(*param_1 + 0xa0))();
|
|
|
|
param_2 = FUN_0069fe60();
|
|
|
|
iVar2 = FUN_0069fe60();
|
|
|
|
param_2 = param_2 - iVar2;
|
|
|
|
}
|
|
|
|
if (param_3 < 0) {
|
|
|
|
param_3 = 0;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0xa0))();
|
|
|
|
iVar2 = FUN_0069fe70();
|
|
|
|
iVar3 = FUN_0069fe70();
|
|
|
|
if (iVar2 - iVar3 < param_3) {
|
|
|
|
(**(code **)(*param_1 + 0xa0))();
|
|
|
|
param_3 = FUN_0069fe70();
|
|
|
|
iVar2 = FUN_0069fe70();
|
|
|
|
param_3 = param_3 - iVar2;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x2c))(param_2,param_3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|