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>
5801 lines
158 KiB
C
5801 lines
158 KiB
C
// Decompiled from acclient.exe — chunk 0x004B0000
|
|
// Ghidra 12.0.4 + pyghidra headless
|
|
|
|
// --- FUN_004b21b0 at 0x004B21B0 (size: 721) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004b21b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
float10 fVar6;
|
|
|
|
undefined4 *local_8a0;
|
|
|
|
undefined4 *local_89c;
|
|
|
|
int local_898;
|
|
|
|
undefined4 *local_894;
|
|
|
|
undefined4 local_890;
|
|
|
|
undefined4 local_88c;
|
|
|
|
undefined4 local_884;
|
|
|
|
double local_880;
|
|
|
|
undefined8 local_878;
|
|
|
|
char local_870 [128];
|
|
|
|
undefined1 local_7f0 [2028];
|
|
|
|
|
|
|
|
iVar1 = FUN_005b4970(0x90,&local_880);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
local_880 = local_880 + _DAT_007938c0;
|
|
|
|
uVar2 = FUN_004ab550(local_880);
|
|
|
|
sprintf(local_870,"Bonus to Mana Conversion: %s.",uVar2);
|
|
|
|
local_8a0 = (undefined4 *)0x0;
|
|
|
|
iVar1 = FUN_005b3d20(0x90,&local_8a0);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
}
|
|
|
|
else if (local_8a0 == (undefined4 *)0x0) {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa0);
|
|
|
|
}
|
|
|
|
FUN_004ae020(local_870,uVar2,0);
|
|
|
|
}
|
|
|
|
local_89c = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(DAT_008ef11c + 1);
|
|
|
|
puVar4 = DAT_008ef11c;
|
|
|
|
local_894 = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(DAT_008ef11c + 1);
|
|
|
|
puVar5 = DAT_008ef11c;
|
|
|
|
local_8a0 = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(DAT_008ef11c + 1);
|
|
|
|
local_890 = 0;
|
|
|
|
local_88c = 0x3ff00000;
|
|
|
|
iVar1 = FUN_005b4970(0x98,&local_890);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
local_884 = 0;
|
|
|
|
iVar1 = FUN_005b48e0(0x2d,&local_884);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_005b52b0(local_884,local_7f0,0x7e8);
|
|
|
|
FUN_00487620(&local_89c,"Damage bonus for %s spells:",local_7f0);
|
|
|
|
fVar6 = (float10)FUN_005ca000(local_890,local_88c);
|
|
|
|
local_878 = (double)fVar6;
|
|
|
|
uVar2 = FUN_004ab5c0(local_890,local_88c);
|
|
|
|
FUN_00487620(&local_894," vs. Monsters: %s.",uVar2);
|
|
|
|
uVar2 = FUN_004ab5c0((undefined4)local_878,local_878._4_4_);
|
|
|
|
FUN_00487620(&local_8a0," vs. Players: %s.",uVar2);
|
|
|
|
local_898 = 0;
|
|
|
|
iVar1 = FUN_005b3d20(0x98,&local_898);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
FUN_004ae020(local_89c + 5,0,0);
|
|
|
|
puVar4 = local_894;
|
|
|
|
FUN_004ae020(local_894 + 5,0,1);
|
|
|
|
uVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (local_898 == 0) {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa0);
|
|
|
|
}
|
|
|
|
FUN_004ae020(local_89c + 5,uVar2,0);
|
|
|
|
puVar4 = local_894;
|
|
|
|
if (local_898 == 0) {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa0);
|
|
|
|
}
|
|
|
|
FUN_004ae020(local_894 + 5,uVar2,1);
|
|
|
|
if (local_898 == 0) {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
puVar5 = local_8a0;
|
|
|
|
FUN_004ae020(local_8a0 + 5,uVar2,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement(puVar5 + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement(puVar4 + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
puVar4 = local_89c;
|
|
|
|
LVar3 = InterlockedDecrement(local_89c + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b2490 at 0x004B2490 (size: 357) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
void __fastcall FUN_004b2490(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 local_98;
|
|
|
|
undefined4 uStack_94;
|
|
|
|
int local_8c;
|
|
|
|
char local_88 [132];
|
|
|
|
|
|
|
|
iVar1 = FUN_005b4970(0x1d,&local_98);
|
|
|
|
if ((iVar1 != 0) && ((double)CONCAT44(uStack_94,local_98) != _DAT_007938c0)) {
|
|
|
|
uVar2 = FUN_004ab5c0(local_98,uStack_94);
|
|
|
|
sprintf(local_88,"Bonus to Melee Defense: %s.",uVar2);
|
|
|
|
local_8c = 0;
|
|
|
|
iVar1 = FUN_005b3d20(0x1d,&local_8c);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
}
|
|
|
|
else if (local_8c == 0) {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa4);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = *(undefined4 *)(param_1 + 0xa0);
|
|
|
|
}
|
|
|
|
FUN_004ae020(local_88,uVar2,1);
|
|
|
|
}
|
|
|
|
iVar1 = FUN_005b4970(0x95,&local_98);
|
|
|
|
if ((iVar1 != 0) && ((double)CONCAT44(uStack_94,local_98) != _DAT_007938c0)) {
|
|
|
|
uVar2 = FUN_004ab5c0(local_98,uStack_94);
|
|
|
|
sprintf(local_88,"Bonus to Missile Defense: %s.",uVar2);
|
|
|
|
FUN_004ae020(local_88,0,1);
|
|
|
|
}
|
|
|
|
iVar1 = FUN_005b4970(0x96,&local_98);
|
|
|
|
if ((iVar1 != 0) && ((double)CONCAT44(uStack_94,local_98) != _DAT_007938c0)) {
|
|
|
|
uVar2 = FUN_004ab5c0(local_98,uStack_94);
|
|
|
|
sprintf(local_88,"Bonus to Magic Defense: %s.",uVar2);
|
|
|
|
FUN_004ae020(local_88,0,1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b4510 at 0x004B4510 (size: 242) ---
|
|
|
|
|
|
void __thiscall FUN_004b4510(int param_1,undefined4 *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
char cVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
|
|
|
|
iVar1 = (int)param_2;
|
|
|
|
if (*(int *)(param_1 + 0x80) != 0) {
|
|
|
|
if ((int)param_2 < 1) {
|
|
|
|
FUN_00402730(&DAT_007b2014);
|
|
|
|
FUN_0046a740(¶m_2);
|
|
|
|
puVar6 = (undefined4 *)((int)param_2 + -0x14);
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)((int)param_2 + -0x10));
|
|
|
|
if ((LVar4 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
param_2 = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(DAT_008ef11c + 1);
|
|
|
|
cVar2 = FUN_004ad950(iVar1,1);
|
|
|
|
if (cVar2 == '\0') {
|
|
|
|
FUN_004034c0(&DAT_007b0580);
|
|
|
|
}
|
|
|
|
puVar6 = param_2;
|
|
|
|
uVar3 = FUN_00404a40(0,param_2 + 5);
|
|
|
|
FUN_0046a740(uVar3);
|
|
|
|
puVar5 = param_2 + -5;
|
|
|
|
LVar4 = InterlockedDecrement(param_2 + -4);
|
|
|
|
if ((LVar4 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
LVar4 = InterlockedDecrement(puVar6 + 1);
|
|
|
|
if ((LVar4 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b6a60 at 0x004B6A60 (size: 437) ---
|
|
|
|
|
|
void __thiscall FUN_004b6a60(int param_1,undefined4 *param_2,undefined4 *param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
undefined4 **ppuVar6;
|
|
|
|
undefined *puVar7;
|
|
|
|
undefined4 **ppuVar8;
|
|
|
|
undefined4 *local_c;
|
|
|
|
undefined4 *local_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x7c) == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
local_c = DAT_008ef11c;
|
|
|
|
local_4 = param_1;
|
|
|
|
InterlockedIncrement(DAT_008ef11c + 1);
|
|
|
|
if ((int)param_2 < 1) {
|
|
|
|
puVar7 = &DAT_00799b04;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
cVar1 = FUN_004ad950(param_2,1);
|
|
|
|
if (cVar1 != '\0') goto LAB_004b6ab8;
|
|
|
|
puVar7 = &DAT_007b0580;
|
|
|
|
}
|
|
|
|
FUN_004034c0(puVar7);
|
|
|
|
LAB_004b6ab8:
|
|
|
|
ppuVar8 = &local_c;
|
|
|
|
ppuVar6 = &local_8;
|
|
|
|
FUN_0048c3e0("Mana: ");
|
|
|
|
FUN_004a2b90(ppuVar6,ppuVar8);
|
|
|
|
puVar4 = param_2;
|
|
|
|
LVar2 = InterlockedDecrement(param_2 + 1);
|
|
|
|
if ((LVar2 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
puVar4 = local_c;
|
|
|
|
if (local_c != local_8) {
|
|
|
|
LVar2 = InterlockedDecrement(local_c + 1);
|
|
|
|
if ((LVar2 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
local_c = local_8;
|
|
|
|
InterlockedIncrement(local_8 + 1);
|
|
|
|
puVar4 = local_8;
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement(local_8 + 1);
|
|
|
|
if ((LVar2 == 0) && (local_8 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*local_8)(1);
|
|
|
|
}
|
|
|
|
puVar5 = param_3;
|
|
|
|
if (0 < (int)param_3) {
|
|
|
|
param_2 = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(DAT_008ef11c + 1);
|
|
|
|
FUN_00487620(¶m_2," + %d per target",puVar5);
|
|
|
|
uVar3 = FUN_004a2b90(¶m_3,¶m_2);
|
|
|
|
FUN_0048a0a0(uVar3);
|
|
|
|
puVar4 = param_3;
|
|
|
|
LVar2 = InterlockedDecrement(param_3 + 1);
|
|
|
|
if ((LVar2 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
puVar5 = param_2;
|
|
|
|
LVar2 = InterlockedDecrement(param_2 + 1);
|
|
|
|
puVar4 = local_c;
|
|
|
|
if ((LVar2 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
puVar4 = local_c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar3 = FUN_00404a40(0,puVar4 + 5);
|
|
|
|
FUN_0046a740(uVar3);
|
|
|
|
puVar5 = param_2 + -5;
|
|
|
|
LVar2 = InterlockedDecrement(param_2 + -4);
|
|
|
|
if ((LVar2 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement(puVar4 + 1);
|
|
|
|
if ((LVar2 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b6c20 at 0x004B6C20 (size: 158) ---
|
|
|
|
|
|
void __thiscall FUN_004b6c20(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x88) != 0) {
|
|
|
|
local_4 = param_1;
|
|
|
|
if (1 < *(uint *)(*(int *)(param_1 + 0x88) + 0x61c)) {
|
|
|
|
FUN_00402730(&DAT_0079d2e0);
|
|
|
|
FUN_00469f70(&local_4);
|
|
|
|
puVar3 = (undefined4 *)(local_4 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_4 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar2 = FUN_00404a40(0,param_2);
|
|
|
|
FUN_00469f70(uVar2);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(param_2 + -0x10));
|
|
|
|
if ((LVar1 == 0) && ((undefined4 *)(param_2 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_2 + -0x14))(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b6cc0 at 0x004B6CC0 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004b6cc0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004adbd0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b6ce0 at 0x004B6CE0 (size: 307) ---
|
|
|
|
|
|
void __thiscall FUN_004b6ce0(int param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
int *unaff_ESI;
|
|
|
|
undefined4 local_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
iVar2 = *param_2;
|
|
|
|
if (iVar2 == 0x10000137) {
|
|
|
|
if ((param_2[2] == 0x1c) && (param_2[3] == 7)) {
|
|
|
|
FUN_004ac5b0();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (iVar2 == 0x1000013e) {
|
|
|
|
if ((param_2[2] == 0x2f) && (*(int *)(param_1 + 0x600) != 0)) {
|
|
|
|
if (param_2[3] == 0) {
|
|
|
|
FUN_004ae9a0();
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_004ac460();
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (((iVar2 == 0x1000032d) && (param_2[2] == 4)) && ((int *)param_2[4] != (int *)0x0)) {
|
|
|
|
local_8 = 0;
|
|
|
|
local_4 = 0;
|
|
|
|
cVar1 = (**(code **)(*(int *)param_2[4] + 0xd0))(0x10000010,&local_8);
|
|
|
|
if ((cVar1 != '\0') && (unaff_ESI != (int *)0x0)) {
|
|
|
|
(**(code **)(*unaff_ESI + 0x78))(&local_4);
|
|
|
|
}
|
|
|
|
if (local_4 != 0) {
|
|
|
|
iVar2 = FUN_004ac2e0(local_4);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
*(undefined1 *)(param_1 + 0x61c) = 0;
|
|
|
|
FUN_0058d110(iVar2,0);
|
|
|
|
*(undefined1 *)(param_1 + 0x61c) = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_004234d0();
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b6e30 at 0x004B6E30 (size: 1767) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __thiscall FUN_004b6e30(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG *lpAddend;
|
|
|
|
LONG LVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iVar5;
|
|
|
|
int *piVar6;
|
|
|
|
undefined4 *unaff_EBP;
|
|
|
|
code *pcVar7;
|
|
|
|
undefined4 *puVar8;
|
|
|
|
undefined **ppuVar9;
|
|
|
|
float10 fVar10;
|
|
|
|
char *_Format;
|
|
|
|
longlong lVar11;
|
|
|
|
int iVar12;
|
|
|
|
int *local_904;
|
|
|
|
undefined4 *local_900;
|
|
|
|
undefined **local_8fc [2];
|
|
|
|
undefined4 *puStack_8f4;
|
|
|
|
int iStack_8f0;
|
|
|
|
int iStack_8e8;
|
|
|
|
undefined **ppuStack_8d8;
|
|
|
|
undefined **ppuStack_8d0;
|
|
|
|
undefined **appuStack_8cc [4];
|
|
|
|
undefined4 auStack_8bc [8];
|
|
|
|
undefined1 local_89c [28];
|
|
|
|
undefined4 uStack_880;
|
|
|
|
undefined4 uStack_87c;
|
|
|
|
undefined1 auStack_80c [36];
|
|
|
|
char acStack_7e8 [2024];
|
|
|
|
|
|
|
|
puVar3 = DAT_008ef11c;
|
|
|
|
if (param_2 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
lpAddend = DAT_008ef11c + 1;
|
|
|
|
local_900 = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(lpAddend);
|
|
|
|
local_8fc[0] = (undefined **)FUN_00567c00();
|
|
|
|
if (local_8fc[0] != (undefined **)0x0) {
|
|
|
|
FUN_0048b420();
|
|
|
|
FUN_00567eb0(param_2,local_89c);
|
|
|
|
FUN_004ac170();
|
|
|
|
FUN_00467ae0();
|
|
|
|
FUN_00467ae0();
|
|
|
|
*(int *)(param_1 + 0x94) = param_2;
|
|
|
|
FUN_00597d40();
|
|
|
|
FUN_0048a0a0();
|
|
|
|
piVar6 = local_904;
|
|
|
|
pcVar7 = InterlockedDecrement_exref;
|
|
|
|
LVar1 = InterlockedDecrement(local_904 + 1);
|
|
|
|
if ((LVar1 == 0) && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar6)();
|
|
|
|
}
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0x70) + 0x610) != 0) {
|
|
|
|
FUN_00404a40(0,local_900 + 5);
|
|
|
|
FUN_0046a740();
|
|
|
|
piVar6 = local_904 + -5;
|
|
|
|
LVar1 = InterlockedDecrement(local_904 + -4);
|
|
|
|
if ((LVar1 == 0) && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar6)();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00598370(&local_904);
|
|
|
|
FUN_0048a0a0();
|
|
|
|
piVar6 = local_904;
|
|
|
|
LVar1 = InterlockedDecrement(local_904 + 1);
|
|
|
|
if ((LVar1 == 0) && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar6)();
|
|
|
|
}
|
|
|
|
FUN_004ac370(&local_904,"School: ");
|
|
|
|
FUN_0048a0a0();
|
|
|
|
piVar6 = local_904;
|
|
|
|
LVar1 = InterlockedDecrement(local_904 + 1);
|
|
|
|
if ((LVar1 == 0) && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar6)();
|
|
|
|
}
|
|
|
|
FUN_00404a40(0,local_900 + 5);
|
|
|
|
FUN_0046a740();
|
|
|
|
piVar6 = local_904 + -5;
|
|
|
|
LVar1 = InterlockedDecrement(local_904 + -4);
|
|
|
|
if ((LVar1 == 0) && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar6)();
|
|
|
|
}
|
|
|
|
FUN_004b6a60(uStack_880,uStack_87c);
|
|
|
|
fVar10 = (float10)FUN_005979a0();
|
|
|
|
if ((fVar10 != (float10)_DAT_007aff60) && ((float10)_DAT_00795610 < fVar10)) {
|
|
|
|
if ((float10)_DAT_007b2440 <= fVar10) {
|
|
|
|
FUN_005df4c4();
|
|
|
|
_Format = "Duration: %u min.";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_005df4c4();
|
|
|
|
_Format = "Duration: %u sec.";
|
|
|
|
}
|
|
|
|
sprintf(acStack_7e8,_Format);
|
|
|
|
FUN_00404a40(0,acStack_7e8);
|
|
|
|
FUN_0046a740();
|
|
|
|
FUN_004011b0();
|
|
|
|
}
|
|
|
|
fVar10 = (float10)FUN_004ad7d0();
|
|
|
|
if (fVar10 == (float10)_DAT_00795610) {
|
|
|
|
FUN_00467ae0();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
sprintf(acStack_7e8,"Range: %.1f yds.",(double)(fVar10 / (float10)_DAT_007afe88));
|
|
|
|
FUN_00404a40(0,acStack_7e8);
|
|
|
|
FUN_0046a740();
|
|
|
|
piVar6 = local_904 + -5;
|
|
|
|
LVar1 = InterlockedDecrement(local_904 + -4);
|
|
|
|
if ((LVar1 == 0) && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar6)();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00597db0();
|
|
|
|
FUN_0048a0a0();
|
|
|
|
piVar6 = local_904;
|
|
|
|
LVar1 = InterlockedDecrement(local_904 + 1);
|
|
|
|
if ((LVar1 == 0) && (piVar6 != (int *)0x0)) {
|
|
|
|
(**(code **)*piVar6)();
|
|
|
|
}
|
|
|
|
puVar3 = local_900;
|
|
|
|
FUN_004b6c20();
|
|
|
|
if (*(int *)(param_1 + 0x8c) != 0) {
|
|
|
|
FUN_006a0660();
|
|
|
|
iVar2 = FUN_00569990();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_006a0570();
|
|
|
|
iVar2 = FUN_005df0f5();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_00694a00();
|
|
|
|
}
|
|
|
|
FUN_006a0610();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00567c00();
|
|
|
|
iStack_8e8 = FUN_00567c10();
|
|
|
|
if (iStack_8e8 != 0) {
|
|
|
|
FUN_00567c00();
|
|
|
|
puVar3 = (undefined4 *)FUN_00568af0(auStack_80c);
|
|
|
|
appuStack_8cc[3] = &PTR_FUN_007a4adc;
|
|
|
|
puVar8 = auStack_8bc;
|
|
|
|
for (iVar2 = 8; puVar3 = puVar3 + 1, iVar2 != 0; iVar2 = iVar2 + -1) {
|
|
|
|
*puVar8 = *puVar3;
|
|
|
|
puVar8 = puVar8 + 1;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_005bd990();
|
|
|
|
iStack_8f0 = iVar2;
|
|
|
|
if (0 < iVar2) {
|
|
|
|
FUN_004b6c20();
|
|
|
|
}
|
|
|
|
lVar11 = (ulonglong)(uint)(*(int **)(param_1 + 0x90))[0x20] << 0x20;
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x90) + 0x2c))();
|
|
|
|
iVar12 = **(int **)(param_1 + 0x90);
|
|
|
|
uVar4 = FUN_0069fe70();
|
|
|
|
(**(code **)(iVar12 + 0x30))(*(int *)(param_1 + 0x9c) * iVar2,uVar4);
|
|
|
|
FUN_00489ee0();
|
|
|
|
puVar3 = (undefined4 *)((ulonglong)lVar11 >> 0x20);
|
|
|
|
iVar12 = 0;
|
|
|
|
if (0 < iVar2) {
|
|
|
|
do {
|
|
|
|
FUN_0048c3e0(" ");
|
|
|
|
if ((iVar12 < 0) || (7 < iVar12)) {
|
|
|
|
ppuVar9 = (undefined **)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ppuVar9 = appuStack_8cc[iVar12];
|
|
|
|
}
|
|
|
|
iVar5 = FUN_0048a1f0(ppuVar9,&puStack_8f4);
|
|
|
|
iVar2 = iStack_8e8;
|
|
|
|
if ((iVar5 != 0) && (pcVar7 = InterlockedDecrement_exref, iStack_8e8 != DAT_008400ac)) {
|
|
|
|
piVar6 = (int *)FUN_0046f2c0(0x1000032e,0);
|
|
|
|
if (piVar6 != (int *)0x0) {
|
|
|
|
local_904 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x10000010);
|
|
|
|
if (local_904 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_904 + 0x7c))(ppuVar9);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar6 + 0xd4))(&stack0xfffff6f8);
|
|
|
|
FUN_006a0660();
|
|
|
|
iVar5 = FUN_00567c00();
|
|
|
|
if (iVar5 == 0) {
|
|
|
|
FUN_004234d0();
|
|
|
|
FUN_005abb30();
|
|
|
|
FUN_00489f20();
|
|
|
|
ppuStack_8d0 = &PTR_FUN_0079385c;
|
|
|
|
FUN_0048b4d0();
|
|
|
|
FUN_005abb30();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_00569a50(iVar2);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_006a0570(1);
|
|
|
|
iVar5 = FUN_005df0f5(0xc);
|
|
|
|
if (iVar5 == 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = FUN_00694a00(iVar2);
|
|
|
|
}
|
|
|
|
FUN_006a0610(uVar4);
|
|
|
|
}
|
|
|
|
FUN_004234d0();
|
|
|
|
}
|
|
|
|
uVar4 = FUN_00597d40(local_8fc);
|
|
|
|
FUN_004914f0(uVar4);
|
|
|
|
ppuVar9 = local_8fc[0];
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_8fc[0] + 1));
|
|
|
|
if ((LVar1 == 0) && (ppuVar9 != (undefined **)0x0)) {
|
|
|
|
(**(code **)*ppuVar9)(1);
|
|
|
|
}
|
|
|
|
FUN_004b6c20(unaff_EBP + 5);
|
|
|
|
pcVar7 = InterlockedDecrement_exref;
|
|
|
|
}
|
|
|
|
iVar2 = (*pcVar7)(unaff_EBP + 1);
|
|
|
|
if ((iVar2 == 0) && (unaff_EBP != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*unaff_EBP)(1);
|
|
|
|
}
|
|
|
|
puVar3 = (undefined4 *)((ulonglong)lVar11 >> 0x20);
|
|
|
|
iVar12 = iVar12 + 1;
|
|
|
|
} while (iVar12 < (int)local_900);
|
|
|
|
}
|
|
|
|
FUN_004ac1a0(0);
|
|
|
|
iVar2 = (*pcVar7)(ppuStack_8d8 + 1);
|
|
|
|
if ((iVar2 == 0) && (ppuStack_8d8 != (undefined **)0x0)) {
|
|
|
|
(**(code **)*ppuStack_8d8)(1);
|
|
|
|
}
|
|
|
|
iVar2 = (*pcVar7)(puStack_8f4 + 1);
|
|
|
|
if ((iVar2 == 0) && (puStack_8f4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puStack_8f4)(1);
|
|
|
|
}
|
|
|
|
local_8fc[0] = &PTR_FUN_0079385c;
|
|
|
|
ppuStack_8d8 = &PTR_FUN_0079385c;
|
|
|
|
FUN_0048b4d0();
|
|
|
|
iVar2 = (*pcVar7)(puVar3 + 1);
|
|
|
|
if ((iVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_0048b4d0();
|
|
|
|
LVar1 = InterlockedDecrement(puVar3 + 1);
|
|
|
|
if ((LVar1 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
LVar1 = InterlockedDecrement(lpAddend);
|
|
|
|
if ((LVar1 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b7520 at 0x004B7520 (size: 120) ---
|
|
|
|
|
|
void __thiscall FUN_004b7520(int *param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (param_1[0x185] == 0) {
|
|
|
|
if (param_1[0x186] == 0) goto LAB_004b7565;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
param_1[0x185] = 0;
|
|
|
|
FUN_00564d30();
|
|
|
|
FUN_00565630();
|
|
|
|
}
|
|
|
|
param_1[0x186] = 0;
|
|
|
|
FUN_006a94a0(0);
|
|
|
|
LAB_004b7565:
|
|
|
|
FUN_004b6e30(param_2);
|
|
|
|
if (param_1[0x17f] != param_1[0x183]) {
|
|
|
|
FUN_004ab7a0(param_1[0x183]);
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x18))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8110 at 0x004B8110 (size: 105) ---
|
|
|
|
|
|
void __thiscall FUN_004b8110(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 + 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 + 0x38) = *(undefined4 *)(param_2 + 0x38);
|
|
|
|
*(undefined4 *)(param_1 + 0x3c) = *(undefined4 *)(param_2 + 0x3c);
|
|
|
|
*(undefined4 *)(param_1 + 0x44) = *(undefined4 *)(param_2 + 0x44);
|
|
|
|
*(undefined4 *)(param_1 + 0x48) = *(undefined4 *)(param_2 + 0x48);
|
|
|
|
*(undefined4 *)(param_1 + 0x4c) = *(undefined4 *)(param_2 + 0x4c);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8290 at 0x004B8290 (size: 73) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __thiscall FUN_004b8290(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
uVar2 = 0;
|
|
|
|
uVar1 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x60c) != 0) {
|
|
|
|
do {
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0x604) + uVar2 * 4) + 0x20))(param_2);
|
|
|
|
uVar1 = *(uint *)(param_1 + 0x60c);
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
} while (uVar2 < uVar1);
|
|
|
|
}
|
|
|
|
*(double *)(param_1 + 0x618) = _DAT_008379a8 + _DAT_007938c0;
|
|
|
|
return CONCAT31((int3)(uVar1 >> 8),1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b82e0 at 0x004B82E0 (size: 128) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004b82e0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined1 local_90 [24];
|
|
|
|
byte local_78;
|
|
|
|
|
|
|
|
iVar2 = FUN_00567c00();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_0048b420();
|
|
|
|
cVar1 = FUN_00567eb0(param_2,local_90);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
if (((*(int *)(param_1 + 0x610) == 1) && ((local_78 & 4) != 0)) ||
|
|
|
|
((*(int *)(param_1 + 0x610) == 2 && ((local_78 & 4) == 0)))) {
|
|
|
|
FUN_0048b4d0();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0048b4d0();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8360 at 0x004B8360 (size: 73) ---
|
|
|
|
|
|
uint __thiscall FUN_004b8360(int param_1,int *param_2,uint param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
uVar2 = FUN_004b83b0();
|
|
|
|
if (uVar2 <= param_3) {
|
|
|
|
if (3 < param_3) {
|
|
|
|
*(undefined4 *)*param_2 = *(undefined4 *)(param_1 + 0xc);
|
|
|
|
*param_2 = *param_2 + 4;
|
|
|
|
}
|
|
|
|
for (piVar1 = *(int **)(param_1 + 4); piVar1 != (int *)0x0; piVar1 = (int *)piVar1[0x14]) {
|
|
|
|
(**(code **)(*piVar1 + 0xc))(param_2,param_3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return uVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b83b0 at 0x004B83B0 (size: 52) ---
|
|
|
|
|
|
int __fastcall FUN_004b83b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
piVar1 = *(int **)(param_1 + 4);
|
|
|
|
iVar3 = 4;
|
|
|
|
local_4 = 0;
|
|
|
|
for (; piVar1 != (int *)0x0; piVar1 = (int *)piVar1[0x14]) {
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0xc))(&local_4,0);
|
|
|
|
iVar3 = iVar3 + iVar2;
|
|
|
|
}
|
|
|
|
return iVar3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b83f0 at 0x004B83F0 (size: 115) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004b83f0(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x17f] = 0;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
*param_1 = &PTR_FUN_007b29b8;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b2710;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
param_1[0x183] = 0;
|
|
|
|
param_1[0x184] = 0;
|
|
|
|
param_1[0x186] = 0;
|
|
|
|
param_1[0x187] = 0;
|
|
|
|
param_1[0x188] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x189) = 1;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b84c0 at 0x004B84C0 (size: 19) ---
|
|
|
|
|
|
void FUN_004b84c0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x1000001b,&LAB_004b8490);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b84e0 at 0x004B84E0 (size: 525) ---
|
|
|
|
|
|
uint __thiscall FUN_004b84e0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
byte bVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
uint uVar4;
|
|
|
|
char cVar5;
|
|
|
|
int iVar6;
|
|
|
|
int *piVar7;
|
|
|
|
LONG LVar8;
|
|
|
|
byte *pbVar9;
|
|
|
|
byte *pbVar10;
|
|
|
|
bool bVar11;
|
|
|
|
byte *local_b0;
|
|
|
|
byte *pbStack_ac;
|
|
|
|
uint local_a8;
|
|
|
|
undefined4 *local_a4;
|
|
|
|
int local_a0;
|
|
|
|
int local_9c;
|
|
|
|
uint local_98;
|
|
|
|
undefined4 *local_94;
|
|
|
|
undefined1 local_90 [4];
|
|
|
|
undefined4 *puStack_8c;
|
|
|
|
undefined4 *puStack_88;
|
|
|
|
undefined **ppuStack_54;
|
|
|
|
|
|
|
|
local_a0 = param_1;
|
|
|
|
FUN_00567c00();
|
|
|
|
FUN_0048b420();
|
|
|
|
local_98 = *(uint *)(*(int *)(param_1 + 0x600) + 0x610);
|
|
|
|
local_a8 = 0;
|
|
|
|
if (local_98 != 0) {
|
|
|
|
do {
|
|
|
|
iVar6 = FUN_0046dc50(local_a8);
|
|
|
|
if ((((iVar6 != 0) && (cVar5 = FUN_00460b30(0x1000003a,&local_9c), cVar5 != '\0')) &&
|
|
|
|
(local_9c < *(int *)(param_1 + 0x60c))) &&
|
|
|
|
(iVar6 = *(int *)(*(int *)(param_1 + 0x604) + local_9c * 4), iVar6 != 0)) {
|
|
|
|
uVar2 = *(undefined4 *)(iVar6 + 0x14);
|
|
|
|
cVar5 = FUN_00567eb0(uVar2,local_90);
|
|
|
|
if (cVar5 != '\0') {
|
|
|
|
piVar7 = (int *)FUN_00567ef0(&local_a4,*(undefined4 *)(*(int *)(param_2 + 0x8c) + 4));
|
|
|
|
FUN_00401340(*piVar7 + 0x14);
|
|
|
|
puVar3 = local_a4;
|
|
|
|
LVar8 = InterlockedDecrement(local_a4 + 1);
|
|
|
|
if ((LVar8 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
piVar7 = (int *)FUN_00567ef0(&local_94,uVar2);
|
|
|
|
FUN_00401340(*piVar7 + 0x14);
|
|
|
|
puVar3 = local_94;
|
|
|
|
LVar8 = InterlockedDecrement(local_94 + 1);
|
|
|
|
pbVar9 = local_b0;
|
|
|
|
pbVar10 = pbStack_ac;
|
|
|
|
if ((LVar8 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
do {
|
|
|
|
bVar1 = *pbVar9;
|
|
|
|
bVar11 = bVar1 < *pbVar10;
|
|
|
|
if (bVar1 != *pbVar10) {
|
|
|
|
LAB_004b8636:
|
|
|
|
iVar6 = (1 - (uint)bVar11) - (uint)(bVar11 != 0);
|
|
|
|
goto LAB_004b863b;
|
|
|
|
}
|
|
|
|
if (bVar1 == 0) break;
|
|
|
|
bVar1 = pbVar9[1];
|
|
|
|
bVar11 = bVar1 < pbVar10[1];
|
|
|
|
if (bVar1 != pbVar10[1]) goto LAB_004b8636;
|
|
|
|
pbVar9 = pbVar9 + 2;
|
|
|
|
pbVar10 = pbVar10 + 2;
|
|
|
|
} while (bVar1 != 0);
|
|
|
|
iVar6 = 0;
|
|
|
|
LAB_004b863b:
|
|
|
|
if (iVar6 < 1) {
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_0048b4d0();
|
|
|
|
return local_a8;
|
|
|
|
}
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_004011b0();
|
|
|
|
param_1 = local_a0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local_a8 = local_a8 + 1;
|
|
|
|
} while (local_a8 < local_98);
|
|
|
|
}
|
|
|
|
uVar4 = local_98;
|
|
|
|
FUN_00599890();
|
|
|
|
ppuStack_54 = &PTR_FUN_0079385c;
|
|
|
|
LVar8 = InterlockedDecrement(puStack_88 + 1);
|
|
|
|
if ((LVar8 == 0) && (puStack_88 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puStack_88)(1);
|
|
|
|
}
|
|
|
|
LVar8 = InterlockedDecrement(puStack_8c + 1);
|
|
|
|
if ((LVar8 == 0) && (puStack_8c != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puStack_8c)(1);
|
|
|
|
}
|
|
|
|
return uVar4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b86f0 at 0x004B86F0 (size: 220) ---
|
|
|
|
|
|
void __fastcall FUN_004b86f0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 *puVar2;
|
|
|
|
|
|
|
|
FUN_005cbdd0();
|
|
|
|
iVar1 = *(int *)(param_1 + 4);
|
|
|
|
while (iVar1 != 0) {
|
|
|
|
puVar2 = *(undefined4 **)(param_1 + 4);
|
|
|
|
if (puVar2 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = puVar2[0x14];
|
|
|
|
*(int *)(param_1 + 4) = iVar1;
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 8) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(undefined4 *)(iVar1 + 0x54) = 0;
|
|
|
|
}
|
|
|
|
puVar2[0x10] = &PTR_FUN_0079385c;
|
|
|
|
*puVar2 = &PTR_FUN_0079385c;
|
|
|
|
operator_delete(puVar2);
|
|
|
|
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + -1;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 4);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b87d0 at 0x004B87D0 (size: 162) ---
|
|
|
|
|
|
undefined1 FUN_004b87d0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined1 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
undefined1 *puVar5;
|
|
|
|
undefined *puVar6;
|
|
|
|
int **ppiVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
int *local_14;
|
|
|
|
undefined1 local_10 [4];
|
|
|
|
undefined1 local_c [4];
|
|
|
|
int *local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
ppiVar7 = &local_14;
|
|
|
|
puVar5 = local_10;
|
|
|
|
puVar6 = &DAT_007b2630;
|
|
|
|
local_14 = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar5,&DAT_007b2630,ppiVar7);
|
|
|
|
FUN_00406570(puVar5,puVar6,ppiVar7);
|
|
|
|
piVar2 = local_14;
|
|
|
|
uVar8 = 0;
|
|
|
|
local_8 = (int *)0x0;
|
|
|
|
local_4 = 0;
|
|
|
|
piVar4 = local_14;
|
|
|
|
if (local_14 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_14 + 0x10))(local_14,0);
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_0048bb00(local_c,piVar4,uVar8);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
piVar2 = local_8;
|
|
|
|
if (local_8 != (int *)0x0) {
|
|
|
|
if (-1 < iVar1) {
|
|
|
|
uVar3 = FUN_004b8290(local_8);
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
(**(code **)(*local_8 + 0x14))();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8880 at 0x004B8880 (size: 133) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004b8880(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
FUN_0046e460();
|
|
|
|
uVar2 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x60c) != 0) {
|
|
|
|
do {
|
|
|
|
piVar1 = *(int **)(*(int *)(param_1 + 0x604) + uVar2 * 4);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 8))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x604) + uVar2 * 4) = 0;
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
} while (uVar2 < *(uint *)(param_1 + 0x60c));
|
|
|
|
}
|
|
|
|
uVar2 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x60c) != 0) {
|
|
|
|
do {
|
|
|
|
*(undefined4 *)(*(int *)(param_1 + 0x604) + uVar2 * 4) = 0;
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
} while (uVar2 < *(uint *)(param_1 + 0x60c));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x60c) = 0;
|
|
|
|
return CONCAT31((int3)((uint)(param_1 + 0x604) >> 8),1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8910 at 0x004B8910 (size: 123) ---
|
|
|
|
|
|
undefined4 FUN_004b8910(int *param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
int local_50 [20];
|
|
|
|
|
|
|
|
FUN_004b86f0();
|
|
|
|
if (param_2 < 4) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)*param_1;
|
|
|
|
*param_1 = (int)((int *)*param_1 + 1);
|
|
|
|
FUN_005cbdd0();
|
|
|
|
iVar3 = 0;
|
|
|
|
if (0 < iVar1) {
|
|
|
|
do {
|
|
|
|
iVar2 = (**(code **)(local_50[0] + 0x10))(param_1,param_2);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_004b8990(local_50);
|
|
|
|
iVar3 = iVar3 + 1;
|
|
|
|
} while (iVar3 < iVar1);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8990 at 0x004B8990 (size: 99) ---
|
|
|
|
|
|
void __thiscall FUN_004b8990(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
iVar2 = FUN_005df0f5(0x58);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_004b8a00(param_2);
|
|
|
|
*(undefined4 *)(iVar2 + 0x50) = 0;
|
|
|
|
*(undefined4 *)(iVar2 + 0x54) = 0;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 4) == 0) {
|
|
|
|
*(int *)(param_1 + 4) = iVar2;
|
|
|
|
*(int *)(param_1 + 8) = iVar2;
|
|
|
|
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar1 = *(int *)(param_1 + 8);
|
|
|
|
*(int *)(iVar1 + 0x50) = iVar2;
|
|
|
|
*(int *)(iVar2 + 0x54) = iVar1;
|
|
|
|
*(int *)(param_1 + 8) = iVar2;
|
|
|
|
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8a00 at 0x004B8A00 (size: 118) ---
|
|
|
|
|
|
void __thiscall FUN_004b8a00(undefined4 *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_LAB_007b2b04;
|
|
|
|
param_1[1] = *(undefined4 *)(param_2 + 4);
|
|
|
|
param_1[2] = *(undefined4 *)(param_2 + 8);
|
|
|
|
param_1[3] = *(undefined4 *)(param_2 + 0xc);
|
|
|
|
param_1[4] = *(undefined4 *)(param_2 + 0x10);
|
|
|
|
param_1[6] = *(undefined4 *)(param_2 + 0x18);
|
|
|
|
param_1[7] = *(undefined4 *)(param_2 + 0x1c);
|
|
|
|
param_1[8] = *(undefined4 *)(param_2 + 0x20);
|
|
|
|
param_1[9] = *(undefined4 *)(param_2 + 0x24);
|
|
|
|
param_1[10] = *(undefined4 *)(param_2 + 0x28);
|
|
|
|
param_1[0xb] = *(undefined4 *)(param_2 + 0x2c);
|
|
|
|
param_1[0xc] = *(undefined4 *)(param_2 + 0x30);
|
|
|
|
param_1[0xe] = *(undefined4 *)(param_2 + 0x38);
|
|
|
|
param_1[0xf] = *(undefined4 *)(param_2 + 0x3c);
|
|
|
|
param_1[0x10] = &PTR_FUN_007b2af0;
|
|
|
|
param_1[0x11] = *(undefined4 *)(param_2 + 0x44);
|
|
|
|
param_1[0x12] = *(undefined4 *)(param_2 + 0x48);
|
|
|
|
param_1[0x13] = *(undefined4 *)(param_2 + 0x4c);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8ab0 at 0x004B8AB0 (size: 42) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004b8ab0(undefined4 *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007b26fc;
|
|
|
|
FUN_004b86f0();
|
|
|
|
*param_1 = &PTR_FUN_0079385c;
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8ae0 at 0x004B8AE0 (size: 119) ---
|
|
|
|
|
|
void __fastcall FUN_004b8ae0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x17e;
|
|
|
|
*param_1 = &PTR_FUN_007b29b8;
|
|
|
|
*puVar1 = &PTR_FUN_007b2710;
|
|
|
|
FUN_004b8880();
|
|
|
|
param_1[0x17f] = 0;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
if ((param_1[0x182] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0x181]);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8b90 at 0x004B8B90 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004b8b90(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004b8ae0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8bb0 at 0x004B8BB0 (size: 751) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004b8bb0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
uint uVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
undefined4 uVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
undefined4 *puStack_12c;
|
|
|
|
undefined4 *puStack_128;
|
|
|
|
int aiStack_124 [73];
|
|
|
|
|
|
|
|
uVar4 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x60c) != 0) {
|
|
|
|
do {
|
|
|
|
iVar1 = (**(code **)(**(int **)(*(int *)(param_1 + 0x604) + uVar4 * 4) + 0x18))();
|
|
|
|
if (iVar1 == *(int *)(param_1 + 0x620)) {
|
|
|
|
uVar7 = 6;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar7 = 1;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0x604) + uVar4 * 4) + 0x2c))(uVar7);
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
} while (uVar4 < *(uint *)(param_1 + 0x60c));
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0x600) == 0) || (*(int *)(param_1 + 0x60c) == 0)) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_008401b8,0x10000001);
|
|
|
|
uVar7 = FUN_0042e980(&puStack_128,0);
|
|
|
|
FUN_0046a740(uVar7);
|
|
|
|
puStack_12c = puStack_128;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (*(int *)(param_1 + 0x620) != 0) {
|
|
|
|
iVar1 = FUN_00567c00();
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
piVar2 = (int *)FUN_00567ef0(&puStack_12c,*(undefined4 *)(param_1 + 0x620));
|
|
|
|
FUN_00401340(*piVar2 + 0x14);
|
|
|
|
puVar5 = puStack_12c;
|
|
|
|
LVar3 = InterlockedDecrement(puStack_12c + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
FUN_00401340(&DAT_007953c0);
|
|
|
|
if (puStack_12c[-1] != 1) {
|
|
|
|
FUN_00404ef0(puStack_12c,puStack_12c[-1] + -1);
|
|
|
|
}
|
|
|
|
puVar5 = puStack_12c + -5;
|
|
|
|
LVar3 = InterlockedDecrement(puStack_12c + -4);
|
|
|
|
if ((LVar3 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
piVar2 = (int *)FUN_00567f60(&puStack_128,*(undefined4 *)(param_1 + 0x620));
|
|
|
|
FUN_00401340(*piVar2 + 0x14);
|
|
|
|
if (puStack_12c[-1] != 1) {
|
|
|
|
FUN_00404ef0(puStack_12c,puStack_12c[-1] + -1);
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement(puStack_12c + -4);
|
|
|
|
if ((LVar3 == 0) && (puStack_12c + -5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)puStack_12c[-5])(1);
|
|
|
|
}
|
|
|
|
puVar5 = puStack_128;
|
|
|
|
LVar3 = InterlockedDecrement(puStack_128 + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar6 = 1;
|
|
|
|
uVar7 = FUN_004a2170(0,aiStack_124);
|
|
|
|
FUN_0042cbe0(uVar7,uVar6);
|
|
|
|
puVar5 = puStack_128 + -5;
|
|
|
|
LVar3 = InterlockedDecrement(puStack_128 + -4);
|
|
|
|
if ((LVar3 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
uVar7 = FUN_0042e980(&puStack_128,0);
|
|
|
|
FUN_0046a740(uVar7);
|
|
|
|
LVar3 = InterlockedDecrement(puStack_128 + -4);
|
|
|
|
if ((LVar3 == 0) && (puStack_128 + -5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)puStack_128[-5])(1);
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(aiStack_124[0] + -0x10));
|
|
|
|
if (LVar3 != 0) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if ((undefined4 *)(aiStack_124[0] + -0x14) == (undefined4 *)0x0) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
(*(code *)**(undefined4 **)(aiStack_124[0] + -0x14))(1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_008401bc,0x10000001);
|
|
|
|
uVar7 = FUN_0042e980(&puStack_12c,0);
|
|
|
|
FUN_0046a740(uVar7);
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement(puStack_12c + -4);
|
|
|
|
if ((LVar3 == 0) && (puStack_12c + -5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)puStack_12c[-5])(1);
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8eb0 at 0x004B8EB0 (size: 186) ---
|
|
|
|
|
|
void __thiscall FUN_004b8eb0(int param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *unaff_EBX;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *local_8;
|
|
|
|
undefined4 *local_4;
|
|
|
|
|
|
|
|
iVar2 = 0;
|
|
|
|
if (param_2 != (int *)0x0) {
|
|
|
|
local_8 = (undefined4 *)0x0;
|
|
|
|
local_4 = (undefined4 *)0x0;
|
|
|
|
(**(code **)(*param_2 + 0xd0))(0x1000003a,&local_8);
|
|
|
|
local_4 = (undefined4 *)0x0;
|
|
|
|
if (unaff_EBX != (int *)0x0) {
|
|
|
|
(**(code **)(*unaff_EBX + 0x78))(&local_4);
|
|
|
|
}
|
|
|
|
iVar2 = (**(code **)(**(int **)(*(int *)(param_1 + 0x604) + (int)local_4 * 4) + 0x18))();
|
|
|
|
if (local_8 != (undefined4 *)0x0) {
|
|
|
|
iVar1 = local_8[1];
|
|
|
|
local_8[1] = iVar1 + -1;
|
|
|
|
if (iVar1 + -1 == 0) {
|
|
|
|
(**(code **)*local_8)(1);
|
|
|
|
}
|
|
|
|
local_8 = (undefined4 *)0x0;
|
|
|
|
}
|
|
|
|
if ((local_4 != (undefined4 *)0x0) &&
|
|
|
|
(iVar1 = local_4[1], local_4[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*local_4)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x620) == iVar2) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x620) = iVar2;
|
|
|
|
FUN_004b8bb0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b8f70 at 0x004B8F70 (size: 468) ---
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 __fastcall FUN_004b8f70(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
uint uVar4;
|
|
|
|
uint uVar5;
|
|
|
|
uint uVar6;
|
|
|
|
undefined **local_ac;
|
|
|
|
int local_a8;
|
|
|
|
undefined4 local_a4;
|
|
|
|
undefined4 local_a0;
|
|
|
|
undefined4 local_9c [2];
|
|
|
|
int local_94;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_004b8880();
|
|
|
|
local_ac = &PTR_FUN_007b26fc;
|
|
|
|
local_a8 = 0;
|
|
|
|
local_a4 = 0;
|
|
|
|
local_a0 = 0;
|
|
|
|
iVar2 = FUN_0058fd80(&local_ac);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
local_ac = &PTR_FUN_007b26fc;
|
|
|
|
FUN_004b86f0();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar2 = local_a8;
|
|
|
|
if (local_a8 != 0) {
|
|
|
|
for (; local_94 = iVar2, iVar2 != 0; iVar2 = *(int *)(iVar2 + 0x50)) {
|
|
|
|
uVar6 = *(uint *)(iVar2 + 4) & 0xffff;
|
|
|
|
cVar1 = FUN_004b82e0();
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
iVar3 = FUN_00567c00();
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
local_ac = &PTR_FUN_007b26fc;
|
|
|
|
FUN_004b86f0();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_0048b420();
|
|
|
|
cVar1 = FUN_00567eb0(uVar6,local_90);
|
|
|
|
if (cVar1 != '\0') {
|
|
|
|
uVar4 = FUN_004b84e0();
|
|
|
|
uVar5 = uVar4;
|
|
|
|
if (uVar4 < *(uint *)(param_1 + 0x60c)) {
|
|
|
|
do {
|
|
|
|
uVar5 = uVar5 + 1;
|
|
|
|
FUN_004f1cf0();
|
|
|
|
iVar2 = local_94;
|
|
|
|
} while (uVar5 < *(uint *)(param_1 + 0x60c));
|
|
|
|
}
|
|
|
|
iVar3 = FUN_005df0f5();
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
local_9c[0] = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
local_9c[0] = FUN_004f31c0(*(undefined4 *)(param_1 + 0x600),uVar4,uVar6,0);
|
|
|
|
}
|
|
|
|
FUN_0044a770(local_9c,uVar4);
|
|
|
|
(**(code **)(**(int **)(*(int *)(param_1 + 0x604) + uVar4 * 4) + 0x30))
|
|
|
|
((*(double *)(iVar2 + 0x20) + *(double *)(iVar2 + 0x18)) - _DAT_008379a8);
|
|
|
|
}
|
|
|
|
FUN_0048b4d0();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_1 + 0x620) != 0) && (iVar2 = FUN_0058fd40(), iVar2 == 0)) {
|
|
|
|
*(undefined4 *)(param_1 + 0x620) = 0;
|
|
|
|
}
|
|
|
|
FUN_004b8bb0();
|
|
|
|
}
|
|
|
|
local_ac = &PTR_FUN_007b26fc;
|
|
|
|
FUN_004b86f0();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9150 at 0x004B9150 (size: 57) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004b9150(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((*(uint *)(param_1 + 0xa4) >> 1 & 1) == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (*(char *)(param_1 + 0x624) != '\0') {
|
|
|
|
FUN_004b8f70(param_2);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FUN_004b8290(param_2);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b91d0 at 0x004B91D0 (size: 172) ---
|
|
|
|
|
|
undefined1 __fastcall FUN_004b91d0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined1 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
undefined1 *puVar5;
|
|
|
|
undefined *puVar6;
|
|
|
|
int **ppiVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
int *local_14;
|
|
|
|
undefined1 local_10 [4];
|
|
|
|
undefined1 local_c [4];
|
|
|
|
int *local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
if ((*(uint *)(param_1 + 0xa4) >> 1 & 1) != 0) {
|
|
|
|
ppiVar7 = &local_14;
|
|
|
|
puVar5 = local_10;
|
|
|
|
puVar6 = &DAT_007b2630;
|
|
|
|
local_14 = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar5,&DAT_007b2630,ppiVar7);
|
|
|
|
FUN_00406570(puVar5,puVar6,ppiVar7);
|
|
|
|
piVar2 = local_14;
|
|
|
|
uVar8 = 0;
|
|
|
|
local_8 = (int *)0x0;
|
|
|
|
local_4 = 0;
|
|
|
|
piVar4 = local_14;
|
|
|
|
if (local_14 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_14 + 0x10))(local_14,0);
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_0048bb00(local_c,piVar4,uVar8);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
piVar2 = local_8;
|
|
|
|
if (local_8 != (int *)0x0) {
|
|
|
|
if (-1 < iVar1) {
|
|
|
|
uVar3 = FUN_004b9150(local_8);
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
(**(code **)(*local_8 + 0x14))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9310 at 0x004B9310 (size: 91) ---
|
|
|
|
|
|
void __fastcall FUN_004b9310(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
FUN_004639a0();
|
|
|
|
uVar1 = FUN_00463c00(0x1000011d);
|
|
|
|
*(undefined4 *)(param_1 + 0x600) = uVar1;
|
|
|
|
(**(code **)(*DAT_008f958c + 8))(1,0x7d,param_1 + 0x5fc);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd1f0,param_1 + 0x5f8);
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd220,param_1 + 0x5f8);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9370 at 0x004B9370 (size: 89) ---
|
|
|
|
|
|
void __fastcall FUN_004b9370(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
*param_1 = &PTR_FUN_007b2eb8;
|
|
|
|
puVar1 = param_1 + 0x17e;
|
|
|
|
*puVar1 = &PTR_FUN_007b2c10;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007b2c04;
|
|
|
|
(**(code **)(*DAT_008f958c + 0x10))(1,0x7d,param_1 + 0x17f);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9400 at 0x004B9400 (size: 332) ---
|
|
|
|
|
|
undefined4 FUN_004b9400(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined **local_a0;
|
|
|
|
undefined4 local_9c;
|
|
|
|
undefined4 local_98;
|
|
|
|
undefined4 local_94;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
local_a0 = &PTR_FUN_007a8b64;
|
|
|
|
local_9c = 0;
|
|
|
|
local_98 = 0;
|
|
|
|
local_94 = 0;
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_00840208,0x10000001);
|
|
|
|
FUN_005926d0(1,&local_a0);
|
|
|
|
FUN_0042e000(DAT_00840238,local_98,0);
|
|
|
|
FUN_005926d0(2,&local_a0);
|
|
|
|
FUN_0042e000(DAT_0084023c,local_98,0);
|
|
|
|
FUN_005926d0(4,&local_a0);
|
|
|
|
FUN_0042e000(DAT_00840240,local_98,0);
|
|
|
|
FUN_005926d0(3,&local_a0);
|
|
|
|
FUN_0042e000(DAT_00840244,local_98,0);
|
|
|
|
FUN_005926d0(5,&local_a0);
|
|
|
|
FUN_0042e000(DAT_00840248,local_98,0);
|
|
|
|
FUN_005926d0(6,&local_a0);
|
|
|
|
FUN_0042e000(DAT_0084024c,local_98,0);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9550 at 0x004B9550 (size: 228) ---
|
|
|
|
|
|
undefined4 FUN_004b9550(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
int local_98;
|
|
|
|
int local_94;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_0042dc80();
|
|
|
|
local_94 = 0x578;
|
|
|
|
FUN_00590c20(0xb5,&local_94,0,0);
|
|
|
|
FUN_0042c9c0(DAT_0084020c,0x10000001);
|
|
|
|
FUN_0042e000(DAT_00840254,local_94,local_94 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0xc0,&local_98,0,0);
|
|
|
|
FUN_0042c9c0(DAT_00840210,0x10000001);
|
|
|
|
FUN_0042e000(DAT_00840258,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9640 at 0x004B9640 (size: 447) ---
|
|
|
|
|
|
/* WARNING: Type propagation algorithm not settling */
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
|
|
|
|
undefined4 FUN_004b9640(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int local_a4;
|
|
|
|
int local_a0;
|
|
|
|
float local_9c [2];
|
|
|
|
int local_94;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_0058ff60(local_9c);
|
|
|
|
local_9c[1] = 1.4013e-44;
|
|
|
|
FUN_00592700(1,local_9c + 1,0);
|
|
|
|
local_a0 = 0;
|
|
|
|
FUN_00590c20(5,&local_a0,0,0);
|
|
|
|
local_a4 = 0;
|
|
|
|
FUN_00590c20(0xe6,&local_a4,0,0);
|
|
|
|
iVar1 = FUN_004fd7a0();
|
|
|
|
FUN_0042dc80();
|
|
|
|
if (_DAT_007938b0 <= local_9c[0]) {
|
|
|
|
iVar1 = local_a0 - iVar1;
|
|
|
|
FUN_004fd810();
|
|
|
|
iVar2 = FUN_005df4c4();
|
|
|
|
FUN_0042c9c0(DAT_00840218,0x10000001);
|
|
|
|
FUN_0042e000(DAT_0084025c,iVar1,iVar1 >> 0x1f);
|
|
|
|
iVar1 = (10 - iVar2) * 10;
|
|
|
|
FUN_0042e000(DAT_00840260,iVar1,iVar1 >> 0x1f);
|
|
|
|
FUN_00469fa0();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_0042c9c0();
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
if (0 < local_a4) {
|
|
|
|
FUN_0042c9c0();
|
|
|
|
FUN_0042e000(DAT_00840250,local_a4,local_a4 >> 0x1f);
|
|
|
|
local_94 = local_a4 * 0x14;
|
|
|
|
FUN_0042e080(DAT_00840264,(double)local_94,0);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9800 at 0x004B9800 (size: 82) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004b9800(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007a6af4;
|
|
|
|
*param_1 = &PTR_FUN_007b2eb8;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b2c10;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007b2c04;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9860 at 0x004B9860 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004b9860(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004b9370();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b98b0 at 0x004B98B0 (size: 19) ---
|
|
|
|
|
|
void FUN_004b98b0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x1000001a,&LAB_004b9880);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b98d0 at 0x004B98D0 (size: 609) ---
|
|
|
|
|
|
/* WARNING: Type propagation algorithm not settling */
|
|
|
|
|
|
|
|
undefined4 FUN_004b98d0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG *lpAddend;
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
tm *_Tm;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 extraout_ECX;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int local_530;
|
|
|
|
int local_52c;
|
|
|
|
undefined4 local_528;
|
|
|
|
undefined8 local_524;
|
|
|
|
undefined1 local_490 [144];
|
|
|
|
char local_400 [1024];
|
|
|
|
|
|
|
|
FUN_0042dc80();
|
|
|
|
local_524._0_4_ = 0;
|
|
|
|
iVar2 = FUN_00590c20(0x62,&local_524,0,0);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
_Tm = localtime(&local_524);
|
|
|
|
strftime(local_400,0x400,"%c",_Tm);
|
|
|
|
FUN_0042c9c0(DAT_008401ec,0x10000001);
|
|
|
|
uVar4 = extraout_ECX;
|
|
|
|
FUN_00401340(local_400);
|
|
|
|
FUN_0042e9f0(DAT_00840224,uVar4);
|
|
|
|
FUN_00469fa0((undefined4 *)((int)&local_524 + 4));
|
|
|
|
}
|
|
|
|
local_528 = 0;
|
|
|
|
iVar2 = FUN_00590c20(0x7d,&local_528,0,0);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00685170(local_528,local_490);
|
|
|
|
FUN_0042c9c0(DAT_008401f0,0x10000001);
|
|
|
|
FUN_0042e660(DAT_00840228,local_490);
|
|
|
|
FUN_00469fa0((undefined4 *)((int)&local_524 + 4));
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
local_530 = 0;
|
|
|
|
FUN_00590c20(0x2b,&local_530,0,0);
|
|
|
|
puVar1 = DAT_008ef11c;
|
|
|
|
lpAddend = DAT_008ef11c + 1;
|
|
|
|
InterlockedIncrement(lpAddend);
|
|
|
|
uVar4 = DAT_008401f4;
|
|
|
|
if (((local_530 == 0) || (uVar4 = DAT_008401f8, local_530 == 1)) ||
|
|
|
|
(uVar4 = DAT_008401fc, local_530 == 2)) {
|
|
|
|
FUN_0042c9c0(uVar4,0x10000001);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_0042c9c0(DAT_00840200,0x10000001);
|
|
|
|
FUN_0042e000(DAT_0084022c,local_530,0);
|
|
|
|
}
|
|
|
|
FUN_00469fa0((undefined4 *)((int)&local_524 + 4));
|
|
|
|
local_52c = 0;
|
|
|
|
iVar2 = FUN_00590c20(0x186,&local_52c,0,0);
|
|
|
|
if ((iVar2 != 0) && (0 < local_52c)) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(DAT_00840220,0x10000001);
|
|
|
|
FUN_0042e000(DAT_00840268,local_52c,local_52c >> 0x1f);
|
|
|
|
FUN_00469fa0((undefined4 *)((int)&local_524 + 4));
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement(lpAddend);
|
|
|
|
if ((LVar3 == 0) && (puVar1 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar1)(1);
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9b40 at 0x004B9B40 (size: 334) ---
|
|
|
|
|
|
undefined4 FUN_004b9b40(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
undefined4 extraout_ECX;
|
|
|
|
char *pcVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int local_98;
|
|
|
|
int local_94;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_00592700(1,&local_98,1);
|
|
|
|
FUN_00592700(2,&local_94,1);
|
|
|
|
FUN_0042dc80();
|
|
|
|
uVar1 = local_98 + local_94;
|
|
|
|
if (uVar1 < 0xc9) {
|
|
|
|
pcVar2 = "None";
|
|
|
|
}
|
|
|
|
else if (uVar1 < 0x105) {
|
|
|
|
pcVar2 = "Poor";
|
|
|
|
}
|
|
|
|
else if (uVar1 < 0x141) {
|
|
|
|
pcVar2 = "Mediocre";
|
|
|
|
}
|
|
|
|
else if (uVar1 < 0x17d) {
|
|
|
|
pcVar2 = "Hardy";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
pcVar2 = "Resilient";
|
|
|
|
if (0x1b8 < uVar1) {
|
|
|
|
pcVar2 = "Indomitable";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0042c9c0(DAT_00840204,0x10000001);
|
|
|
|
uVar3 = extraout_ECX;
|
|
|
|
FUN_00401340(pcVar2);
|
|
|
|
FUN_0042e9f0(DAT_00840230,uVar3);
|
|
|
|
uVar1 = local_98 + local_94 * 2;
|
|
|
|
if (uVar1 < 0xc9) {
|
|
|
|
pcVar2 = "None";
|
|
|
|
}
|
|
|
|
else if (uVar1 < 0x15b) {
|
|
|
|
pcVar2 = "Poor";
|
|
|
|
}
|
|
|
|
else if (uVar1 < 0x1d7) {
|
|
|
|
pcVar2 = "Mediocre";
|
|
|
|
}
|
|
|
|
else if (uVar1 < 0x245) {
|
|
|
|
pcVar2 = "Hardy";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
pcVar2 = "Resilient";
|
|
|
|
if (0x2b2 < uVar1) {
|
|
|
|
pcVar2 = "Indomitable";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00401340(pcVar2);
|
|
|
|
FUN_0042e9f0(DAT_00840234,local_98);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004b9c90 at 0x004B9C90 (size: 5966) ---
|
|
|
|
|
|
undefined4 FUN_004b9c90(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
undefined4 extraout_ECX;
|
|
|
|
undefined4 extraout_ECX_00;
|
|
|
|
undefined4 extraout_ECX_01;
|
|
|
|
int iVar2;
|
|
|
|
char *pcVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int local_9c;
|
|
|
|
int local_98;
|
|
|
|
int local_94;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
FUN_0042dc80();
|
|
|
|
local_98 = 0;
|
|
|
|
iVar2 = 0;
|
|
|
|
local_94 = 0;
|
|
|
|
FUN_00590c20(0x162,&local_94,0,0);
|
|
|
|
if (local_94 < 1) goto LAB_004b9dc7;
|
|
|
|
FUN_0042c9c0(DAT_0084026c,0x10000001);
|
|
|
|
uVar1 = extraout_ECX;
|
|
|
|
switch(local_94) {
|
|
|
|
case 1:
|
|
|
|
FUN_00401340("Unarmed Weapons");
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
FUN_00401340("Swords");
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
pcVar3 = "Axes";
|
|
|
|
goto LAB_004b9da2;
|
|
|
|
case 4:
|
|
|
|
FUN_00401340("Maces");
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
FUN_00401340("Spears");
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
pcVar3 = "Daggers";
|
|
|
|
goto LAB_004b9da2;
|
|
|
|
case 7:
|
|
|
|
FUN_00401340("Staves");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
pcVar3 = "Unknown";
|
|
|
|
LAB_004b9da2:
|
|
|
|
FUN_00401340(pcVar3);
|
|
|
|
break;
|
|
|
|
case 0xb:
|
|
|
|
FUN_00401340("Two Handed Weapons");
|
|
|
|
}
|
|
|
|
FUN_0042e9f0(DAT_00840278,uVar1);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
LAB_004b9dc7:
|
|
|
|
local_94 = 0;
|
|
|
|
FUN_00590c20(0x163,&local_94,0,0);
|
|
|
|
if (local_94 < 1) goto LAB_004b9e88;
|
|
|
|
FUN_0042c9c0(DAT_00840270,0x10000001);
|
|
|
|
uVar1 = extraout_ECX_00;
|
|
|
|
switch(local_94) {
|
|
|
|
case 8:
|
|
|
|
FUN_00401340(&DAT_007b3b40);
|
|
|
|
break;
|
|
|
|
case 9:
|
|
|
|
pcVar3 = "Crossbows";
|
|
|
|
goto LAB_004b9e64;
|
|
|
|
case 10:
|
|
|
|
FUN_00401340("Thrown Weapons");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
pcVar3 = "Unknown";
|
|
|
|
LAB_004b9e64:
|
|
|
|
FUN_00401340(pcVar3);
|
|
|
|
break;
|
|
|
|
case 0xc:
|
|
|
|
FUN_00401340("Magical Spells");
|
|
|
|
}
|
|
|
|
FUN_0042e9f0(DAT_00840278,uVar1);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
LAB_004b9e88:
|
|
|
|
local_94 = 0;
|
|
|
|
FUN_00590c20(0x16a,&local_94,0,0);
|
|
|
|
if (0 < local_94) {
|
|
|
|
FUN_0042c9c0(DAT_00840274,0x10000001);
|
|
|
|
uVar1 = extraout_ECX_01;
|
|
|
|
if (local_94 == 1) {
|
|
|
|
pcVar3 = "Primalist";
|
|
|
|
LAB_004b9efa:
|
|
|
|
FUN_00401340(pcVar3);
|
|
|
|
}
|
|
|
|
else if (local_94 == 2) {
|
|
|
|
FUN_00401340("Necromancer");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (local_94 != 3) {
|
|
|
|
pcVar3 = "Unknown";
|
|
|
|
goto LAB_004b9efa;
|
|
|
|
}
|
|
|
|
FUN_00401340("Naturalist");
|
|
|
|
}
|
|
|
|
FUN_0042e9f0(DAT_00840278,uVar1);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Header",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x14d,&local_98,0,0);
|
|
|
|
if (local_98 < 6) {
|
|
|
|
if (0 < local_98) goto LAB_004b9f80;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = local_98 + -5;
|
|
|
|
local_98 = 5;
|
|
|
|
LAB_004b9f80:
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Damage",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
if (0 < iVar2) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Spec_Damage",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,iVar2,iVar2 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
iVar2 = 0;
|
|
|
|
FUN_00590c20(0x14e,&local_98,0,0);
|
|
|
|
if (local_98 < 6) {
|
|
|
|
if (0 < local_98) goto LAB_004ba03f;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = local_98 + -5;
|
|
|
|
local_98 = 5;
|
|
|
|
LAB_004ba03f:
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Reduction",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
if (0 < iVar2) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Spec_Reduction",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,iVar2,iVar2 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
iVar2 = 0;
|
|
|
|
FUN_00590c20(0x14f,&local_98,0,0);
|
|
|
|
if (local_98 < 6) {
|
|
|
|
if (0 < local_98) goto LAB_004ba0fd;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = local_98 + -5;
|
|
|
|
local_98 = 5;
|
|
|
|
LAB_004ba0fd:
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Crit_Damage",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
if (0 < iVar2) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Spec_Crit_Damage",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,iVar2,iVar2 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
iVar2 = 0;
|
|
|
|
FUN_00590c20(0x150,&local_98,0,0);
|
|
|
|
if (local_98 < 6) {
|
|
|
|
if (local_98 < 1) goto LAB_004ba243;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = local_98 + -5;
|
|
|
|
local_98 = 5;
|
|
|
|
}
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Crit_Reduction",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
if (0 < iVar2) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Spec_Crit_Reduction",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,iVar2,iVar2 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
LAB_004ba243:
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x152,&local_98,0,0);
|
|
|
|
if (0 < local_98) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Surge_Chance",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x153,&local_98,0,0);
|
|
|
|
if (0 < local_98) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Mana_Use",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98 * 5,local_98 * 5 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x154,&local_98,0,0);
|
|
|
|
if (0 < local_98) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Mana_Gain",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98 * 5,local_98 * 5 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x156,&local_98,0,0);
|
|
|
|
if (0 < local_98) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Healing",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x157,&local_98,0,0);
|
|
|
|
if (0 < local_98) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_Skilled_Craft",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x158,&local_98,0,0);
|
|
|
|
if (0 < local_98) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Spec_Skilled_Spec",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98 * 2,local_98 * 2 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_98 = 0;
|
|
|
|
FUN_00590c20(0x16d,&local_98,0,0);
|
|
|
|
if (0 < local_98) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Luminance_Base_All_Skills",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_98,local_98 >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xda,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Attribute_Strength",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xdb,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Attribute_Endurance",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xdc,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Attribute_Coordination",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xdd,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Attribute_Quickness",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xde,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Attribute_Focus",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xdf,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Attribute_Self",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xf0,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Slash",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xf1,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Pierce",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xf2,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Blunt",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xf3,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Acid",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x147,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Nether",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xf4,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Fire",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xf5,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Frost",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xf6,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Resist_Lightning",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe0,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Spec_Salvaging",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe1,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Spec_ItemTinkering",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe2,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Spec_ArmorTinkering",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe3,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Spec_MagicItemTinkering",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe4,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Spec_WeaponTinkering",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x125,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Spec_Gearcraft",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe5,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_ExtraPackSlot",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe6,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_IncreasedCarryingCapacity",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe7,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_LessDeathItemLoss",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe8,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_SpellsRemainPastDeath",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xe9,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_CriticalDefense",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xea,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_BonusXP",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xeb,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_BonusSalvage",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xec,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_BonusImbueChance",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xed,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_FasterRegen",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0xee,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_IncreasedSpellDuration",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x126,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Infused_CreatureMagic",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x127,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Infused_ItemMagic",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x128,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Infused_LifeMagic",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x129,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Infused_WarMagic",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x148,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_Infused_VoidMagic",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(300,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_SkilledMelee",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x12d,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_SkilledMissile",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x12e,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_SkilledMagic",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x135,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_DamageBonus",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x136,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_DamageResist",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_0042e000(DAT_00840250,local_9c,local_9c >> 0x1f);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x12a,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_CriticalExpertise",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(299,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_CriticalPower",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
local_9c = 0;
|
|
|
|
FUN_00590c20(0x146,&local_9c,0,0);
|
|
|
|
if (0 < local_9c) {
|
|
|
|
uVar4 = 0x10000001;
|
|
|
|
uVar1 = FUN_004016b0("ID_CharacterInfo_Augmentation_JackOfAllTrades",0x10000001);
|
|
|
|
FUN_0042c9c0(uVar1,uVar4);
|
|
|
|
FUN_00469fa0(local_90);
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb420 at 0x004BB420 (size: 413) ---
|
|
|
|
|
|
undefined4 __thiscall FUN_004bb420(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG LVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
int local_124;
|
|
|
|
undefined1 auStack_120 [288];
|
|
|
|
|
|
|
|
if ((*(uint *)(param_1 + 0xa4) >> 1 & 1) == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(&DAT_00795320);
|
|
|
|
FUN_0042cbe0(&local_124,1);
|
|
|
|
puVar3 = (undefined4 *)(local_124 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_124 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
uVar2 = FUN_0042e980(&local_124,0);
|
|
|
|
FUN_0046a740(uVar2);
|
|
|
|
puVar3 = (undefined4 *)(local_124 + -0x14);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_124 + -0x10));
|
|
|
|
if ((LVar1 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(&DAT_0079d2e0);
|
|
|
|
FUN_0042cbe0(&local_124,1);
|
|
|
|
LVar1 = InterlockedDecrement((LONG *)(local_124 + -0x10));
|
|
|
|
if ((LVar1 == 0) && ((undefined4 *)(local_124 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_124 + -0x14))(1);
|
|
|
|
}
|
|
|
|
FUN_004b98d0(param_2);
|
|
|
|
FUN_00469fa0(auStack_120);
|
|
|
|
FUN_004b9b40(param_2);
|
|
|
|
FUN_00469fa0(auStack_120);
|
|
|
|
FUN_004b9400(param_2);
|
|
|
|
FUN_00469fa0(auStack_120);
|
|
|
|
FUN_004b9550(param_2);
|
|
|
|
FUN_00469fa0(auStack_120);
|
|
|
|
FUN_004b9c90(param_2);
|
|
|
|
FUN_00469fa0(auStack_120);
|
|
|
|
FUN_004b9640(param_2);
|
|
|
|
FUN_0042e590();
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb5e0 at 0x004BB5E0 (size: 172) ---
|
|
|
|
|
|
undefined1 __fastcall FUN_004bb5e0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined1 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
undefined1 *puVar5;
|
|
|
|
undefined *puVar6;
|
|
|
|
int **ppiVar7;
|
|
|
|
undefined4 uVar8;
|
|
|
|
int *local_14;
|
|
|
|
undefined1 local_10 [4];
|
|
|
|
undefined1 local_c [4];
|
|
|
|
int *local_8;
|
|
|
|
undefined4 local_4;
|
|
|
|
|
|
|
|
if ((*(uint *)(param_1 + 0xa4) >> 1 & 1) != 0) {
|
|
|
|
ppiVar7 = &local_14;
|
|
|
|
puVar5 = local_10;
|
|
|
|
puVar6 = &DAT_007b2bd8;
|
|
|
|
local_14 = (int *)0x0;
|
|
|
|
FUN_00406d10(puVar5,&DAT_007b2bd8,ppiVar7);
|
|
|
|
FUN_00406570(puVar5,puVar6,ppiVar7);
|
|
|
|
piVar2 = local_14;
|
|
|
|
uVar8 = 0;
|
|
|
|
local_8 = (int *)0x0;
|
|
|
|
local_4 = 0;
|
|
|
|
piVar4 = local_14;
|
|
|
|
if (local_14 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_14 + 0x10))(local_14,0);
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_0048bb00(local_c,piVar4,uVar8);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
}
|
|
|
|
piVar2 = local_8;
|
|
|
|
if (local_8 != (int *)0x0) {
|
|
|
|
if (-1 < iVar1) {
|
|
|
|
uVar3 = FUN_004bb420(local_8);
|
|
|
|
(**(code **)(*piVar2 + 0x14))();
|
|
|
|
return uVar3;
|
|
|
|
}
|
|
|
|
(**(code **)(*local_8 + 0x14))();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb710 at 0x004BB710 (size: 200) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004bb710(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
LONG *pLVar1;
|
|
|
|
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007b405c;
|
|
|
|
*param_1 = &PTR_FUN_007b4318;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b4070;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007b4064;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
param_1[0x183] = 0;
|
|
|
|
param_1[0x184] = 0;
|
|
|
|
param_1[0x185] = 0;
|
|
|
|
param_1[0x186] = 0;
|
|
|
|
param_1[0x187] = 0;
|
|
|
|
param_1[0x188] = 0;
|
|
|
|
param_1[0x189] = 0xffffffff;
|
|
|
|
param_1[0x18a] = 0;
|
|
|
|
pLVar1 = (LONG *)(DAT_008ef11c + 4);
|
|
|
|
param_1[0x18b] = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(pLVar1);
|
|
|
|
param_1[0x18c] = 0;
|
|
|
|
pLVar1 = (LONG *)(DAT_008ef11c + 4);
|
|
|
|
param_1[0x18d] = DAT_008ef11c;
|
|
|
|
InterlockedIncrement(pLVar1);
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb810 at 0x004BB810 (size: 152) ---
|
|
|
|
|
|
void __fastcall FUN_004bb810(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
|
|
|
|
puVar4 = param_1 + 0x17f;
|
|
|
|
puVar1 = param_1 + 0x17e;
|
|
|
|
*param_1 = &PTR_FUN_007b4318;
|
|
|
|
*puVar1 = &PTR_FUN_007b4070;
|
|
|
|
*puVar4 = &PTR_LAB_007b4064;
|
|
|
|
FUN_0055e1d0(puVar4);
|
|
|
|
FUN_0055f930(puVar4);
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
puVar4 = (undefined4 *)param_1[0x18d];
|
|
|
|
LVar3 = InterlockedDecrement(puVar4 + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
puVar4 = (undefined4 *)param_1[0x18b];
|
|
|
|
LVar3 = InterlockedDecrement(puVar4 + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb8e0 at 0x004BB8E0 (size: 155) ---
|
|
|
|
|
|
void FUN_004bb8e0(int *param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 **ppuVar2;
|
|
|
|
undefined4 *local_8;
|
|
|
|
int *local_4;
|
|
|
|
|
|
|
|
local_8 = (undefined4 *)0x0;
|
|
|
|
local_4 = (int *)0x0;
|
|
|
|
FUN_0042a2d0(0x16);
|
|
|
|
if (local_4 != (int *)0x0) {
|
|
|
|
FUN_00429b10();
|
|
|
|
(**(code **)(*local_4 + 0x74))(param_2 != 0);
|
|
|
|
}
|
|
|
|
ppuVar2 = &local_8;
|
|
|
|
(**(code **)(*param_1 + 0xd4))();
|
|
|
|
if ((ppuVar2 != (undefined4 **)0x0) &&
|
|
|
|
(iVar1 = (int)ppuVar2[1], ppuVar2[1] = (undefined4 *)(iVar1 + -1), iVar1 + -1 == 0)) {
|
|
|
|
(*(code *)**ppuVar2)(1);
|
|
|
|
}
|
|
|
|
if ((local_8 != (undefined4 *)0x0) &&
|
|
|
|
(iVar1 = local_8[1], local_8[1] = iVar1 + -1, iVar1 + -1 == 0)) {
|
|
|
|
(**(code **)*local_8)(1,0);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb980 at 0x004BB980 (size: 71) ---
|
|
|
|
|
|
void __thiscall FUN_004bb980(int param_1,int *param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int iVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
|
|
|
|
puVar1 = *(undefined4 **)(param_1 + 0x18);
|
|
|
|
if (puVar1 != (undefined4 *)*param_2) {
|
|
|
|
LVar3 = InterlockedDecrement(puVar1 + 1);
|
|
|
|
if ((LVar3 == 0) && (puVar1 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar1)(1);
|
|
|
|
}
|
|
|
|
iVar2 = *param_2;
|
|
|
|
*(int *)(param_1 + 0x18) = iVar2;
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004bb9bb. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
InterlockedIncrement((LONG *)(iVar2 + 4));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb9d0 at 0x004BB9D0 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004bb9d0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004bb810();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bb9f0 at 0x004BB9F0 (size: 269) ---
|
|
|
|
|
|
void __fastcall FUN_004bb9f0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
FUN_004639a0();
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x1000010f);
|
|
|
|
if (piVar1 == (int *)0x0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = (**(code **)(*piVar1 + 0x94))(0xc);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = uVar2;
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x10000111);
|
|
|
|
if (piVar1 == (int *)0x0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = (**(code **)(*piVar1 + 0x94))(0xc);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x60c) = uVar2;
|
|
|
|
uVar2 = FUN_00463c00(0x10000115);
|
|
|
|
*(undefined4 *)(param_1 + 0x600) = uVar2;
|
|
|
|
uVar2 = FUN_00463c00(0x10000114);
|
|
|
|
*(undefined4 *)(param_1 + 0x604) = uVar2;
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x10000470);
|
|
|
|
if (piVar1 == (int *)0x0) {
|
|
|
|
iVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = (**(code **)(*piVar1 + 0x94))(6);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x610) = iVar3;
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x1000047b);
|
|
|
|
if (piVar1 == (int *)0x0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = (**(code **)(*piVar1 + 0x94))(0xc);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x614) = uVar2;
|
|
|
|
}
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
param_1 = param_1 + 0x5f8;
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1e9,param_1);
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1ea,param_1);
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1eb,param_1);
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1ec,param_1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bbb00 at 0x004BBB00 (size: 19) ---
|
|
|
|
|
|
void FUN_004bbb00(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000019,&LAB_004bb8b0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bbb20 at 0x004BBB20 (size: 129) ---
|
|
|
|
|
|
void FUN_004bbb20(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
int unaff_retaddr;
|
|
|
|
|
|
|
|
iVar1 = FUN_0046d420(param_2,param_1);
|
|
|
|
if (((iVar1 != 0) && (piVar2 = (int *)FUN_00463c00(0x10000479), piVar2 != (int *)0x0)) &&
|
|
|
|
(iVar1 = (**(code **)(*piVar2 + 0x94))(0xc), iVar1 != 0)) {
|
|
|
|
uVar3 = FUN_00480980(&stack0x00000000,0,L"Page %d",param_1 + 1);
|
|
|
|
FUN_0046a740(uVar3);
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(unaff_retaddr + -0x10));
|
|
|
|
if ((LVar4 == 0) && ((undefined4 *)(unaff_retaddr + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(unaff_retaddr + -0x14))(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bbbb0 at 0x004BBBB0 (size: 88) ---
|
|
|
|
|
|
void __thiscall FUN_004bbbb0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
|
|
|
|
if (*(int *)(param_1 + 0x614) != 0) {
|
|
|
|
uVar1 = FUN_00480980(¶m_2,0,L"Page %d",param_2 + 1);
|
|
|
|
FUN_0046a740(uVar1);
|
|
|
|
puVar3 = (undefined4 *)(param_2 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(param_2 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bbc10 at 0x004BBC10 (size: 603) ---
|
|
|
|
|
|
void __fastcall FUN_004bbc10(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
char cVar2;
|
|
|
|
int *piVar3;
|
|
|
|
int *piVar4;
|
|
|
|
LONG LVar5;
|
|
|
|
undefined4 *puVar6;
|
|
|
|
int iVar7;
|
|
|
|
undefined *puVar8;
|
|
|
|
int **ppiVar9;
|
|
|
|
undefined4 uVar10;
|
|
|
|
int local_b0;
|
|
|
|
int *local_ac;
|
|
|
|
int local_a8;
|
|
|
|
int local_a4;
|
|
|
|
int iStack_a0;
|
|
|
|
int *piStack_9c;
|
|
|
|
int *local_98;
|
|
|
|
undefined4 local_94;
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
local_b0 = param_1;
|
|
|
|
FUN_0046ce20();
|
|
|
|
if (*(int *)(param_1 + 0x620) != 0) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
ppiVar9 = &local_ac;
|
|
|
|
piVar4 = &local_a4;
|
|
|
|
puVar8 = &DAT_007b3eb0;
|
|
|
|
local_ac = (int *)0x0;
|
|
|
|
FUN_00406d10(piVar4,&DAT_007b3eb0,ppiVar9);
|
|
|
|
FUN_00406570(piVar4,puVar8,ppiVar9);
|
|
|
|
piVar4 = local_ac;
|
|
|
|
uVar10 = 0;
|
|
|
|
local_98 = (int *)0x0;
|
|
|
|
local_94 = 0;
|
|
|
|
piVar3 = local_ac;
|
|
|
|
if (local_ac != (int *)0x0) {
|
|
|
|
(**(code **)(*local_ac + 0x10))(local_ac,0);
|
|
|
|
}
|
|
|
|
piVar3 = (int *)FUN_0048bb00(&local_a8,piVar3,uVar10);
|
|
|
|
local_a4 = *piVar3;
|
|
|
|
if (piVar4 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar4 + 0x14))();
|
|
|
|
}
|
|
|
|
iVar7 = *(int *)(*(int *)(param_1 + 0x620) + 4);
|
|
|
|
local_a8 = 0;
|
|
|
|
for (; iVar7 != 0; iVar7 = *(int *)(iVar7 + 0x20)) {
|
|
|
|
piVar4 = (int *)FUN_00426990();
|
|
|
|
if (*(int *)(*piVar4 + 8) == 1) {
|
|
|
|
local_ac = (int *)PTR_DAT_00818340;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818340 + -0x10));
|
|
|
|
FUN_0042cbe0(&local_ac,1);
|
|
|
|
piVar4 = local_ac;
|
|
|
|
LAB_004bbdae:
|
|
|
|
LVar5 = InterlockedDecrement(piVar4 + -4);
|
|
|
|
if ((LVar5 == 0) && (piVar4 + -5 != (int *)0x0)) {
|
|
|
|
(**(code **)piVar4[-5])(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (((local_98 == (int *)0x0) || (local_a4 < 0)) || (cVar2 = FUN_00593e30(), cVar2 == '\0'))
|
|
|
|
{
|
|
|
|
piVar4 = (int *)FUN_00426990();
|
|
|
|
FUN_00480980(&piStack_9c,0,L"- %hs",*piVar4 + 0x14);
|
|
|
|
FUN_0042cbe0(&piStack_9c,1);
|
|
|
|
piVar4 = piStack_9c;
|
|
|
|
goto LAB_004bbdae;
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_00426990();
|
|
|
|
FUN_00480980(&iStack_a0,0,L"- %hs <%hs>",*piVar4 + 0x14,*(int *)(iVar7 + 0xc) + 0x14);
|
|
|
|
FUN_0042cbe0(&iStack_a0,1);
|
|
|
|
puVar6 = (undefined4 *)(iStack_a0 + -0x14);
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(iStack_a0 + -0x10));
|
|
|
|
if ((LVar5 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iVar1 = local_a8;
|
|
|
|
FUN_004bbb20(local_a8,local_90);
|
|
|
|
local_a8 = iVar1 + 1;
|
|
|
|
param_1 = local_b0;
|
|
|
|
}
|
|
|
|
FUN_00402730(L"(blank)");
|
|
|
|
FUN_0042cbe0(&local_b0,1);
|
|
|
|
puVar6 = (undefined4 *)(local_b0 + -0x14);
|
|
|
|
LVar5 = InterlockedDecrement((LONG *)(local_b0 + -0x10));
|
|
|
|
if ((LVar5 == 0) && (puVar6 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar6)(1);
|
|
|
|
}
|
|
|
|
iVar7 = *(int *)(*(int *)(param_1 + 0x620) + 0xc);
|
|
|
|
if (iVar7 < *(int *)(param_1 + 0x61c)) {
|
|
|
|
do {
|
|
|
|
FUN_004bbb20(iVar7,local_90);
|
|
|
|
iVar7 = iVar7 + 1;
|
|
|
|
} while (iVar7 < *(int *)(param_1 + 0x61c));
|
|
|
|
}
|
|
|
|
if (local_98 != (int *)0x0) {
|
|
|
|
(**(code **)(*local_98 + 0x14))();
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bbe70 at 0x004BBE70 (size: 160) ---
|
|
|
|
|
|
void __thiscall FUN_004bbe70(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
uVar1 = FUN_00404a40(0,*(int *)(param_2 + 0x18) + 0x14);
|
|
|
|
FUN_0046a740(uVar1);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(param_2 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(param_2 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(param_2 + -0x14))(1);
|
|
|
|
}
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
iVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar3 = *(int *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
if ((*(int *)(param_2 + 4) != iVar3) && (*(int *)(param_2 + 0x14) == 0)) {
|
|
|
|
FUN_00467bc0();
|
|
|
|
FUN_004bb8e0(*(undefined4 *)(param_1 + 0x60c),0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_004bb8e0(*(undefined4 *)(param_1 + 0x60c),1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bbf10 at 0x004BBF10 (size: 187) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004bbf10(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
int iVar4;
|
|
|
|
int local_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
FUN_00466830(&local_8);
|
|
|
|
FUN_00408fd0(&local_4,0);
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_8 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(local_8 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_8 + -0x14))(1);
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(*(int *)(param_1 + 0x60c) + 0x61c);
|
|
|
|
iVar4 = 0;
|
|
|
|
if (0 < iVar2) {
|
|
|
|
do {
|
|
|
|
cVar1 = *(char *)(iVar4 + local_4);
|
|
|
|
if (((cVar1 != ' ') && (cVar1 != '\n')) && (cVar1 != '\0')) {
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_4 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(local_4 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_4 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar4 = iVar4 + 1;
|
|
|
|
} while (iVar4 < iVar2);
|
|
|
|
}
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(local_4 + -0x10));
|
|
|
|
if ((LVar3 == 0) && ((undefined4 *)(local_4 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_4 + -0x14))(1);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bbfd0 at 0x004BBFD0 (size: 300) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004bbfd0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 local_c;
|
|
|
|
undefined1 local_8 [8];
|
|
|
|
|
|
|
|
if (((*(int *)(param_1 + 0x618) != 0) && (*(int *)(param_1 + 0x620) != 0)) &&
|
|
|
|
(*(int *)(param_1 + 0x628) == 0)) {
|
|
|
|
iVar1 = FUN_005d2dc0(*(undefined4 *)(param_1 + 0x624));
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = *(int *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
if ((*(int *)(iVar1 + 4) == iVar2) || (*(int *)(iVar1 + 0x14) != 0)) {
|
|
|
|
iVar2 = FUN_004bbf10();
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar2 = FUN_0048e5f0();
|
|
|
|
if (*(int *)(iVar1 + 4) == iVar2) {
|
|
|
|
FUN_006aa330(*(undefined4 *)(param_1 + 0x618),*(undefined4 *)(param_1 + 0x624));
|
|
|
|
FUN_005d2f40(*(undefined4 *)(param_1 + 0x624));
|
|
|
|
FUN_004bbc10();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00466830(local_8);
|
|
|
|
FUN_00408fd0(&local_c,0);
|
|
|
|
FUN_004011b0();
|
|
|
|
uVar3 = FUN_0048c3e0(local_c);
|
|
|
|
FUN_004bb980(uVar3);
|
|
|
|
FUN_005abb30();
|
|
|
|
FUN_006aa6e0(*(undefined4 *)(param_1 + 0x618),*(undefined4 *)(param_1 + 0x624),iVar1 + 0x18)
|
|
|
|
;
|
|
|
|
FUN_004011b0();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bc100 at 0x004BC100 (size: 133) ---
|
|
|
|
|
|
void __thiscall FUN_004bc100(int param_1,int param_2,int param_3,undefined4 param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
|
|
|
|
if ((param_2 == *(int *)(param_1 + 0x618)) && (*(int *)(param_1 + 0x618) != 0)) {
|
|
|
|
iVar1 = FUN_005df0f5(0x24);
|
|
|
|
if (iVar1 == 0) {
|
|
|
|
uVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar2 = FUN_005d2fc0();
|
|
|
|
}
|
|
|
|
FUN_005d31c0(param_4);
|
|
|
|
puVar3 = (undefined4 *)FUN_005d2ed0(param_3);
|
|
|
|
if (puVar3 != (undefined4 *)0x0) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
FUN_005d2e20(uVar2,param_3);
|
|
|
|
if (param_3 == *(int *)(param_1 + 0x624)) {
|
|
|
|
FUN_004bbe70(uVar2);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x628) = 0;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bc190 at 0x004BC190 (size: 102) ---
|
|
|
|
|
|
void __fastcall FUN_004bc190(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004bbfd0();
|
|
|
|
*(undefined4 *)(param_1 + 0x618) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x61c) = 0;
|
|
|
|
if (*(undefined4 **)(param_1 + 0x620) != (undefined4 *)0x0) {
|
|
|
|
(**(code **)**(undefined4 **)(param_1 + 0x620))(1);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x620) = 0;
|
|
|
|
*(undefined4 *)(param_1 + 0x624) = 0xffffffff;
|
|
|
|
FUN_004034c0(&DAT_007938af);
|
|
|
|
*(undefined4 *)(param_1 + 0x630) = 0;
|
|
|
|
FUN_004034c0(&DAT_007938af);
|
|
|
|
*(undefined4 *)(param_1 + 0x628) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bc200 at 0x004BC200 (size: 660) ---
|
|
|
|
|
|
void __thiscall FUN_004bc200(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
undefined4 uVar6;
|
|
|
|
undefined1 local_98 [4];
|
|
|
|
undefined1 local_94 [4];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if ((((*(int *)(param_1 + 0x620) == 0) || (*(int *)(param_1 + 0x628) != 0)) || (param_2 < 0)) ||
|
|
|
|
((*(int *)(param_1 + 0x61c) <= param_2 || (param_2 == *(int *)(param_1 + 0x624))))) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_005d2dc0(*(int *)(param_1 + 0x624));
|
|
|
|
iVar3 = *(int *)(*(int *)(param_1 + 0x620) + 0xc);
|
|
|
|
if ((iVar3 < param_2) ||
|
|
|
|
(((iVar1 = *(int *)(param_1 + 0x624), iVar1 == iVar3 + -1 && (iVar1 != -1)) &&
|
|
|
|
((iVar1 < param_2 &&
|
|
|
|
(((iVar3 = FUN_004bbf10(), iVar3 != 0 && (iVar2 != 0)) &&
|
|
|
|
(iVar3 = FUN_0048e5f0(), *(int *)(iVar2 + 4) == iVar3)))))))) {
|
|
|
|
puVar5 = (undefined4 *)FUN_0058f8e0(local_94,*(undefined4 *)(param_1 + 0x618),2,0);
|
|
|
|
FUN_00480980(local_98,0,L"The %s is already open to a blank page",*puVar5);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042cbe0(local_98,1);
|
|
|
|
FUN_00693500(0x1a,local_90);
|
|
|
|
iVar3 = *(int *)(param_1 + 0x624);
|
|
|
|
iVar2 = FUN_0046cfd0();
|
|
|
|
if (iVar2 != iVar3) {
|
|
|
|
uVar6 = 1;
|
|
|
|
uVar4 = FUN_0046ce30(iVar3);
|
|
|
|
FUN_0046d4b0(uVar4,uVar6);
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
FUN_004011b0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar3 = FUN_004bbfd0();
|
|
|
|
if ((iVar3 != 0) && (*(int *)(param_1 + 0x624) < param_2)) {
|
|
|
|
param_2 = param_2 + -1;
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x624) = param_2;
|
|
|
|
iVar3 = FUN_005d2dc0(param_2);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
FUN_00467ae0();
|
|
|
|
FUN_00467bc0();
|
|
|
|
FUN_004bb8e0(*(undefined4 *)(param_1 + 0x60c),0);
|
|
|
|
FUN_006aa190(*(undefined4 *)(param_1 + 0x618));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (*(int *)(iVar3 + 0x10) != 0) {
|
|
|
|
FUN_004bbe70(iVar3);
|
|
|
|
goto LAB_004bc352;
|
|
|
|
}
|
|
|
|
FUN_00467ae0();
|
|
|
|
FUN_00467bc0();
|
|
|
|
FUN_004bb8e0(*(undefined4 *)(param_1 + 0x60c),0);
|
|
|
|
FUN_006aa440(*(undefined4 *)(param_1 + 0x618),*(undefined4 *)(param_1 + 0x624));
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x628) = 1;
|
|
|
|
LAB_004bc352:
|
|
|
|
iVar3 = *(int *)(param_1 + 0x624);
|
|
|
|
iVar2 = FUN_0046cfd0();
|
|
|
|
if (iVar2 != iVar3) {
|
|
|
|
uVar6 = 1;
|
|
|
|
uVar4 = FUN_0046ce30(iVar3);
|
|
|
|
FUN_0046d4b0(uVar4,uVar6);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x624) < 1) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x604) + 0x9c))(0xd);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x604) + 0x9c))(1);
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x61c) + -1 <= *(int *)(param_1 + 0x624)) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x600) + 0x9c))(0xd);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x600) + 0x9c))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bc8f0 at 0x004BC8F0 (size: 62) ---
|
|
|
|
|
|
void __thiscall FUN_004bc8f0(int param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00463830(param_2);
|
|
|
|
if (((*(uint *)(param_1 + 0x554) >> 0x11 & 1) != 0) && ((char)param_2 == '\0')) {
|
|
|
|
param_1 = param_1 + 0x5fc;
|
|
|
|
FUN_0055e1d0(param_1);
|
|
|
|
FUN_0055f930(param_1);
|
|
|
|
FUN_004bc190();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bcb40 at 0x004BCB40 (size: 78) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004bcb40(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x17f] = 0;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
*param_1 = &PTR_FUN_007b49e8;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b4740;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bcbc0 at 0x004BCBC0 (size: 106) ---
|
|
|
|
|
|
void __fastcall FUN_004bcbc0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
FUN_004639a0();
|
|
|
|
uVar1 = FUN_00463c00(0x10000105);
|
|
|
|
*(undefined4 *)(param_1 + 0x5fc) = uVar1;
|
|
|
|
uVar1 = FUN_00463c00(0x10000107);
|
|
|
|
*(undefined4 *)(param_1 + 0x600) = uVar1;
|
|
|
|
uVar1 = FUN_00463c00(0x1000010b);
|
|
|
|
*(undefined4 *)(param_1 + 0x604) = uVar1;
|
|
|
|
uVar1 = FUN_00463c00(0x10000109);
|
|
|
|
*(undefined4 *)(param_1 + 0x608) = uVar1;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
(**(code **)(*piVar2 + 4))(0x4dd221,param_1 + 0x5f8);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bcc30 at 0x004BCC30 (size: 89) ---
|
|
|
|
|
|
void __fastcall FUN_004bcc30(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
puVar1 = param_1 + 0x17e;
|
|
|
|
*param_1 = &PTR_FUN_007b49e8;
|
|
|
|
*puVar1 = &PTR_FUN_007b4740;
|
|
|
|
piVar2 = (int *)FUN_0043c680();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xc))(puVar1);
|
|
|
|
}
|
|
|
|
param_1[0x17f] = 0;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
*puVar1 = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bccc0 at 0x004BCCC0 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004bccc0(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004bcc30();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bcce0 at 0x004BCCE0 (size: 19) ---
|
|
|
|
|
|
void FUN_004bcce0(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000018,&LAB_004bcc90);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bcd00 at 0x004BCD00 (size: 183) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004bcd00(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
bool bVar3;
|
|
|
|
int local_8;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
piVar1 = (int *)FUN_00466830(&local_4);
|
|
|
|
if (*(int *)(*piVar1 + -4) != 1) {
|
|
|
|
piVar1 = (int *)FUN_00466830(&local_8);
|
|
|
|
bVar3 = *(int *)(*piVar1 + -4) == 1;
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_8 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(local_8 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_8 + -0x14))(1);
|
|
|
|
}
|
|
|
|
if (!bVar3) goto LAB_004bcd68;
|
|
|
|
}
|
|
|
|
bVar3 = true;
|
|
|
|
LAB_004bcd68:
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_4 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(local_4 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_4 + -0x14))(1);
|
|
|
|
}
|
|
|
|
if (bVar3) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x608) + 0x9c))(0xd);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x608) + 0x9c))(1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bcdc0 at 0x004BCDC0 (size: 122) ---
|
|
|
|
|
|
undefined4 FUN_004bcdc0(undefined4 param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined4 uVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
int local_94 [37];
|
|
|
|
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042c9c0(param_1,0x10000001);
|
|
|
|
uVar1 = FUN_0042e980(local_94,0);
|
|
|
|
FUN_0046a740(uVar1);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_94[0] + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(local_94[0] + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_94[0] + -0x14))(1);
|
|
|
|
}
|
|
|
|
FUN_0042e590();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bce90 at 0x004BCE90 (size: 185) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004bce90(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
|
|
|
|
(**(code **)(*param_1 + 0x18))(0);
|
|
|
|
puVar1 = PTR_DAT_00818340;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818340 + -0x10));
|
|
|
|
FUN_0046a740(&stack0xfffffff8);
|
|
|
|
puVar3 = (undefined4 *)(puVar1 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(puVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
puVar1 = PTR_DAT_00818340;
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818340 + -0x10));
|
|
|
|
FUN_0046a740(&stack0xfffffff8);
|
|
|
|
puVar3 = (undefined4 *)(puVar1 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(puVar1 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
(**(code **)(*(int *)param_1[0x182] + 0x9c))(0xd);
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x10000008);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bcf50 at 0x004BCF50 (size: 181) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004bcf50(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
iVar2 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = *(int *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
if (((DAT_00871e54 != iVar2) && (piVar1 = (int *)FUN_005583f0(DAT_00871e54), piVar1 != (int *)0x0)
|
|
|
|
) && (iVar2 = (**(code **)(*piVar1 + 0x10))(), iVar2 != 0)) {
|
|
|
|
uVar3 = FUN_0058f510(2,0);
|
|
|
|
FUN_0048c3e0(uVar3);
|
|
|
|
uVar3 = FUN_00404a40(0,param_1 + 5);
|
|
|
|
FUN_0046a740(uVar3);
|
|
|
|
LVar4 = InterlockedDecrement(param_1 + -4);
|
|
|
|
if ((LVar4 == 0) && (param_1 + -5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)param_1[-5])(1);
|
|
|
|
}
|
|
|
|
LVar4 = InterlockedDecrement(param_1 + 1);
|
|
|
|
if ((LVar4 == 0) && (param_1 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*param_1)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd010 at 0x004BD010 (size: 562) ---
|
|
|
|
|
|
undefined4 __fastcall FUN_004bd010(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
LONG LVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
bool bVar4;
|
|
|
|
undefined4 *puStack_a8;
|
|
|
|
undefined4 *local_a4;
|
|
|
|
int local_a0;
|
|
|
|
int iStack_9c;
|
|
|
|
int iStack_98;
|
|
|
|
int iStack_94;
|
|
|
|
undefined1 auStack_90 [144];
|
|
|
|
|
|
|
|
piVar1 = (int *)FUN_00466830(&local_a4);
|
|
|
|
if (*(int *)(*piVar1 + -4) != 1) {
|
|
|
|
piVar1 = (int *)FUN_00466830(&local_a0);
|
|
|
|
bVar4 = *(int *)(*piVar1 + -4) == 1;
|
|
|
|
puVar3 = (undefined4 *)(local_a0 + -0x14);
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_a0 + -0x10));
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
if (!bVar4) goto LAB_004bd07b;
|
|
|
|
}
|
|
|
|
bVar4 = true;
|
|
|
|
LAB_004bd07b:
|
|
|
|
puVar3 = local_a4 + -5;
|
|
|
|
LVar2 = InterlockedDecrement(local_a4 + -4);
|
|
|
|
if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar3)(1);
|
|
|
|
}
|
|
|
|
if (bVar4) {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(L"Please specify character and complaint.");
|
|
|
|
FUN_0042cbe0(&puStack_a8,1);
|
|
|
|
LVar2 = InterlockedDecrement(puStack_a8 + -4);
|
|
|
|
if ((LVar2 == 0) && (puStack_a8 + -5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)puStack_a8[-5])(1);
|
|
|
|
}
|
|
|
|
FUN_00693500(0x1a,auStack_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FUN_00466830(&iStack_98);
|
|
|
|
FUN_00408fd0(&local_a0,0);
|
|
|
|
FUN_0048c3e0(local_a0);
|
|
|
|
FUN_00466830(&iStack_94);
|
|
|
|
FUN_00408fd0(&iStack_9c,0);
|
|
|
|
FUN_0048c3e0(iStack_9c);
|
|
|
|
FUN_006a3850(&puStack_a8,1,&local_a4);
|
|
|
|
LVar2 = InterlockedDecrement(puStack_a8 + 1);
|
|
|
|
if ((LVar2 == 0) && (puStack_a8 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puStack_a8)(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(iStack_9c + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(iStack_9c + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_9c + -0x14))(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(iStack_94 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(iStack_94 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_94 + -0x14))(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement(local_a4 + 1);
|
|
|
|
if ((LVar2 == 0) && (local_a4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*local_a4)(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(local_a0 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(local_a0 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(local_a0 + -0x14))(1);
|
|
|
|
}
|
|
|
|
LVar2 = InterlockedDecrement((LONG *)(iStack_98 + -0x10));
|
|
|
|
if ((LVar2 == 0) && ((undefined4 *)(iStack_98 + -0x14) != (undefined4 *)0x0)) {
|
|
|
|
(*(code *)**(undefined4 **)(iStack_98 + -0x14))(1);
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x9c))(0x1000000a);
|
|
|
|
FUN_004bcdc0(DAT_0084038c);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd300 at 0x004BD300 (size: 109) ---
|
|
|
|
|
|
void __thiscall FUN_004bd300(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
if (*(int *)(param_2 + 8) == 0x18) {
|
|
|
|
uVar2 = 0;
|
|
|
|
if (*(uint *)(param_1 + 0x604) != 0) {
|
|
|
|
piVar1 = *(int **)(param_1 + 0x5fc);
|
|
|
|
while ((*piVar1 == 0 || (*piVar1 != *(int *)(param_2 + 4)))) {
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
piVar1 = piVar1 + 2;
|
|
|
|
if (*(uint *)(param_1 + 0x604) <= uVar2) {
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_0047a4a0(piVar1[1],*(uint *)(*piVar1 + 0xa4) >> 1 & 0xffffff01);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FUN_00462420(param_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- thunk_FUN_00463d60 at 0x004BD370 (size: 5) ---
|
|
|
|
|
|
void __thiscall thunk_FUN_00463d60(int *param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
int iVar5;
|
|
|
|
int iVar6;
|
|
|
|
int iStack_44;
|
|
|
|
int iStack_40;
|
|
|
|
int iStack_3c;
|
|
|
|
int iStack_38;
|
|
|
|
int iStack_34;
|
|
|
|
int iStack_30;
|
|
|
|
int *piStack_2c;
|
|
|
|
int iStack_28;
|
|
|
|
int *piStack_24;
|
|
|
|
undefined4 uStack_20;
|
|
|
|
undefined4 uStack_1c;
|
|
|
|
undefined4 uStack_18;
|
|
|
|
undefined4 uStack_14;
|
|
|
|
int iStack_10;
|
|
|
|
undefined4 uStack_c;
|
|
|
|
undefined4 uStack_8;
|
|
|
|
undefined4 uStack_4;
|
|
|
|
|
|
|
|
iStack_34 = FUN_0069fe60();
|
|
|
|
iStack_30 = FUN_0069fe70();
|
|
|
|
iVar5 = param_3;
|
|
|
|
iVar6 = param_2;
|
|
|
|
cVar1 = FUN_00460b30(0x3c,&iStack_44);
|
|
|
|
if ((cVar1 != '\0') && (iStack_44 < iVar5)) {
|
|
|
|
iVar5 = iStack_44;
|
|
|
|
}
|
|
|
|
cVar1 = FUN_00460b30(0x3e,&iStack_40);
|
|
|
|
if ((cVar1 != '\0') && (iVar5 < iStack_40)) {
|
|
|
|
iVar5 = iStack_40;
|
|
|
|
}
|
|
|
|
cVar1 = FUN_00460b30(0x3d,&iStack_3c);
|
|
|
|
if ((cVar1 != '\0') && (iStack_3c < param_2)) {
|
|
|
|
iVar6 = iStack_3c;
|
|
|
|
}
|
|
|
|
cVar1 = FUN_00460b30(0x3f,&iStack_38);
|
|
|
|
if ((cVar1 != '\0') && (iVar6 < iStack_38)) {
|
|
|
|
iVar6 = iStack_38;
|
|
|
|
}
|
|
|
|
if ((iStack_34 != iVar6) || (iStack_30 != iVar5)) {
|
|
|
|
FUN_006a0740(iVar6,iVar5);
|
|
|
|
piVar2 = (int *)param_1[0x2c];
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
if (param_1[0x2b] == 0) {
|
|
|
|
piVar2 = (int *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
piVar2 = (int *)FUN_004592b0();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(byte *)((int)param_1 + 0x556) & 1) == 0) {
|
|
|
|
FUN_00462270(0);
|
|
|
|
FUN_006a0c10(1);
|
|
|
|
}
|
|
|
|
else if (piVar2 != (int *)0x0) {
|
|
|
|
param_2 = 3;
|
|
|
|
FUN_00461fb0(¶m_2);
|
|
|
|
if (param_2 == 3) {
|
|
|
|
(**(code **)(*piVar2 + 0x10))(iVar6,iVar5);
|
|
|
|
FUN_006a0c10(1);
|
|
|
|
}
|
|
|
|
param_3 = piVar2[8];
|
|
|
|
iVar6 = piVar2[9];
|
|
|
|
iVar5 = *piVar2;
|
|
|
|
uVar3 = FUN_0069fe70();
|
|
|
|
uVar3 = FUN_0069fe60(uVar3);
|
|
|
|
(**(code **)(iVar5 + 0xc))(param_3,iVar6,uVar3);
|
|
|
|
FUN_004620c0();
|
|
|
|
}
|
|
|
|
if ((((uint)param_1[0x155] >> 5 & 1) != 0) && (DAT_0083e03c != 0)) {
|
|
|
|
FUN_0045b4c0(7,0);
|
|
|
|
}
|
|
|
|
if (((uint)param_1[0x155] >> 9 & 1) != 0) {
|
|
|
|
iVar6 = param_1[0xb9];
|
|
|
|
uVar3 = FUN_0069fe70();
|
|
|
|
uVar4 = FUN_0069fe60();
|
|
|
|
param_2 = FUN_0069fe70();
|
|
|
|
uStack_14 = FUN_0069fe60();
|
|
|
|
iStack_10 = param_2;
|
|
|
|
uStack_20 = 0x24;
|
|
|
|
uStack_1c = 0;
|
|
|
|
uStack_18 = 0;
|
|
|
|
uStack_4 = 0;
|
|
|
|
iStack_28 = iVar6;
|
|
|
|
piStack_24 = param_1;
|
|
|
|
uStack_c = uVar4;
|
|
|
|
uStack_8 = uVar3;
|
|
|
|
if (DAT_0083e03c != 0) {
|
|
|
|
FUN_0045ac50(&iStack_28);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
piStack_2c = param_1 + 0x2d;
|
|
|
|
iVar6 = 0;
|
|
|
|
if (param_1[0x48] != 0) {
|
|
|
|
if (param_1[0x49] == 0) {
|
|
|
|
iVar6 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar6 = param_1[0x49] + -8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (; iVar6 != 0; iVar6 = *(int *)(iVar6 + 8) + -8) {
|
|
|
|
if (*(int *)(iVar6 + 0x10) != 0) {
|
|
|
|
FUN_00462720();
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar6 + 8) == 0) break;
|
|
|
|
}
|
|
|
|
piVar2 = (int *)(**(code **)(*param_1 + 0xa0))();
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar2 + 0xf4))(param_1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd380 at 0x004BD380 (size: 388) ---
|
|
|
|
|
|
void __thiscall FUN_004bd380(int param_1,uint param_2,char param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
uint uVar3;
|
|
|
|
int local_4;
|
|
|
|
|
|
|
|
if ((param_2 != 0) && (uVar3 = 0, *(int *)(param_1 + 0xc) != 0)) {
|
|
|
|
piVar2 = *(int **)(param_1 + 4);
|
|
|
|
while ((*piVar2 == 0 || (piVar2[1] != param_2))) {
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
piVar2 = piVar2 + 2;
|
|
|
|
if (*(uint *)(param_1 + 0xc) <= uVar3) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
piVar2 = (int *)*piVar2;
|
|
|
|
if (piVar2 != (int *)0x0) {
|
|
|
|
local_4 = param_1;
|
|
|
|
if (param_3 != '\0') {
|
|
|
|
piVar1 = *(int **)(param_1 + 0x10);
|
|
|
|
if (piVar1 == piVar2) {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(1);
|
|
|
|
(**(code **)(*(int *)(param_1 + -0x5f8) + 0x18))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*(int **)(param_1 + 0x10) = piVar2;
|
|
|
|
if ((piVar1 != (int *)0x0) && (((uint)piVar1[0x29] >> 1 & 1) != 0)) {
|
|
|
|
param_3 = '\0';
|
|
|
|
FUN_00460cc0(0x10000049,¶m_3);
|
|
|
|
param_2 = param_2 & 0xffffff00;
|
|
|
|
FUN_00460cc0(0x10000049,¶m_2);
|
|
|
|
if ((param_3 == '\0') || ((char)param_2 != '\0')) {
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*(int **)(param_1 + 0x14) = piVar1;
|
|
|
|
}
|
|
|
|
local_4 = 0;
|
|
|
|
FUN_00460990(0x10000029,&local_4);
|
|
|
|
FUN_0047a4a0(local_4,0);
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0x18))(1);
|
|
|
|
(**(code **)(*(int *)(param_1 + -0x5f8) + 0x18))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (*(int **)(param_1 + 0x10) == piVar2) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x10) + 0x18))();
|
|
|
|
if (*(int *)(param_1 + 0x14) == 0) {
|
|
|
|
*(undefined4 *)(param_1 + 0x10) = 0;
|
|
|
|
(**(code **)(*(int *)(param_1 + -0x5f8) + 0x18))(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
param_2 = 0;
|
|
|
|
FUN_00460990(0x10000029,¶m_2);
|
|
|
|
FUN_0047a4a0(param_2,1);
|
|
|
|
*(undefined4 *)(param_1 + 0x14) = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar2 + 0x18))(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd510 at 0x004BD510 (size: 96) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004bd510(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
*param_1 = &PTR_FUN_007b5070;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b4dc8;
|
|
|
|
param_1[0x17f] = 0;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
param_1[0x183] = 0;
|
|
|
|
param_1[0x184] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x185) = 0;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd5d0 at 0x004BD5D0 (size: 94) ---
|
|
|
|
|
|
void __fastcall FUN_004bd5d0(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
*param_1 = &PTR_FUN_007b5070;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b4dc8;
|
|
|
|
FUN_005d8570();
|
|
|
|
FUN_00465fb0(1);
|
|
|
|
if ((param_1[0x180] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0x17f]);
|
|
|
|
}
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd630 at 0x004BD630 (size: 19) ---
|
|
|
|
|
|
void FUN_004bd630(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000008,&LAB_004bd5a0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd650 at 0x004BD650 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004bd650(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004bd5d0();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bd670 at 0x004BD670 (size: 1571) ---
|
|
|
|
|
|
void __fastcall FUN_004bd670(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
char cVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
uint uVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
undefined4 local_84;
|
|
|
|
undefined4 local_80;
|
|
|
|
undefined4 local_7c;
|
|
|
|
undefined4 local_78;
|
|
|
|
undefined4 local_74;
|
|
|
|
undefined4 local_70;
|
|
|
|
undefined4 local_6c;
|
|
|
|
undefined4 local_68;
|
|
|
|
undefined4 local_64;
|
|
|
|
undefined4 local_60;
|
|
|
|
undefined4 local_5c;
|
|
|
|
undefined4 local_58;
|
|
|
|
undefined4 local_54;
|
|
|
|
undefined4 local_50;
|
|
|
|
undefined4 local_4c;
|
|
|
|
undefined4 local_48;
|
|
|
|
undefined4 local_44;
|
|
|
|
undefined4 local_40;
|
|
|
|
undefined4 local_3c;
|
|
|
|
undefined4 local_38;
|
|
|
|
undefined4 local_34;
|
|
|
|
undefined4 local_30;
|
|
|
|
undefined4 local_2c;
|
|
|
|
undefined4 local_28;
|
|
|
|
undefined4 local_24;
|
|
|
|
undefined4 local_20;
|
|
|
|
undefined4 local_1c;
|
|
|
|
undefined4 local_18;
|
|
|
|
undefined4 local_14;
|
|
|
|
undefined4 local_10;
|
|
|
|
undefined4 local_c [2];
|
|
|
|
|
|
|
|
uVar5 = FUN_00463c00(0x1000018b);
|
|
|
|
FUN_00460990(0x10000029,&local_84);
|
|
|
|
piVar1 = (int *)(param_1 + 0x5fc);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd6d0:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = uVar5;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_84;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar7 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar7);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd6d0;
|
|
|
|
}
|
|
|
|
local_80 = FUN_00463c00(0x1000018f);
|
|
|
|
FUN_00460990(0x10000029,&local_7c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd72c:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_80;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_7c;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd72c;
|
|
|
|
}
|
|
|
|
local_78 = FUN_00463c00(0x1000018e);
|
|
|
|
FUN_00460990(0x10000029,&local_74);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd788:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_78;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_74;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd788;
|
|
|
|
}
|
|
|
|
local_70 = FUN_00463c00(0x10000559);
|
|
|
|
FUN_00460990(0x10000029,&local_6c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd7e4:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_70;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_6c;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd7e4;
|
|
|
|
}
|
|
|
|
local_68 = FUN_00463c00(0x1000018c);
|
|
|
|
FUN_00460990(0x10000029,&local_64);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd840:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_68;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_64;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd840;
|
|
|
|
}
|
|
|
|
local_60 = FUN_00463c00(0x10000182);
|
|
|
|
FUN_00460990(0x10000029,&local_5c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd89c:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_60;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_5c;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd89c;
|
|
|
|
}
|
|
|
|
local_58 = FUN_00463c00(0x1000018d);
|
|
|
|
FUN_00460990(0x10000029,&local_54);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd8f8:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_58;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_54;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd8f8;
|
|
|
|
}
|
|
|
|
local_50 = FUN_00463c00(0x10000190);
|
|
|
|
FUN_00460990(0x10000029,&local_4c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd954:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_50;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_4c;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd954;
|
|
|
|
}
|
|
|
|
local_48 = FUN_00463c00(0x10000184);
|
|
|
|
FUN_00460990(0x10000029,&local_44);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bd9b0:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_48;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_44;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bd9b0;
|
|
|
|
}
|
|
|
|
local_40 = FUN_00463c00(0x10000185);
|
|
|
|
FUN_00460990(0x10000029,&local_3c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bda0c:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_40;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_3c;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bda0c;
|
|
|
|
}
|
|
|
|
local_38 = FUN_00463c00(0x10000181);
|
|
|
|
FUN_00460990(0x10000029,&local_34);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bda68:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_38;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_34;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bda68;
|
|
|
|
}
|
|
|
|
local_30 = FUN_00463c00(0x10000189);
|
|
|
|
FUN_00460990(0x10000029,&local_2c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bdac4:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_30;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_2c;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bdac4;
|
|
|
|
}
|
|
|
|
local_28 = FUN_00463c00(0x10000183);
|
|
|
|
FUN_00460990(0x10000029,&local_24);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bdb20:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_28;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_24;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bdb20;
|
|
|
|
}
|
|
|
|
local_20 = FUN_00463c00(0x1000018a);
|
|
|
|
FUN_00460990(0x10000029,&local_1c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bdb7f:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_20;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_1c;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bdb7f;
|
|
|
|
}
|
|
|
|
local_18 = FUN_00463c00(0x10000187);
|
|
|
|
FUN_00460990(0x10000029,&local_14);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x604) < uVar6) {
|
|
|
|
LAB_004bdbe1:
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_18;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_14;
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 != '\0') goto LAB_004bdbe1;
|
|
|
|
}
|
|
|
|
local_10 = FUN_00463c00(0x10000188);
|
|
|
|
FUN_00460990(0x10000029,local_c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x600) & 0x7fffffff;
|
|
|
|
if (uVar6 <= *(uint *)(param_1 + 0x604)) {
|
|
|
|
uVar5 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar4 = FUN_00459e20(uVar5);
|
|
|
|
if (cVar4 == '\0') goto LAB_004bdc66;
|
|
|
|
}
|
|
|
|
iVar2 = *(int *)(param_1 + 0x604);
|
|
|
|
iVar3 = *piVar1;
|
|
|
|
*(undefined4 *)(iVar3 + iVar2 * 8) = local_10;
|
|
|
|
*(undefined4 *)(iVar3 + 4 + iVar2 * 8) = local_c[0];
|
|
|
|
*(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
|
|
|
|
LAB_004bdc66:
|
|
|
|
uVar6 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x604) != 0) {
|
|
|
|
do {
|
|
|
|
(**(code **)(**(int **)(*piVar1 + uVar6 * 8) + 0x18))(0);
|
|
|
|
uVar6 = uVar6 + 1;
|
|
|
|
} while (uVar6 < *(uint *)(param_1 + 0x604));
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bdca0 at 0x004BDCA0 (size: 172) ---
|
|
|
|
|
|
void __fastcall FUN_004bdca0(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int *piVar2;
|
|
|
|
|
|
|
|
FUN_004639a0();
|
|
|
|
piVar1 = (int *)FUN_0043c680();
|
|
|
|
if (param_1 == (int *)0x0) {
|
|
|
|
piVar2 = (int *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
piVar2 = param_1 + 0x17e;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1f8,piVar2);
|
|
|
|
if (param_1 == (int *)0x0) {
|
|
|
|
piVar2 = (int *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
piVar2 = param_1 + 0x17e;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd1f0,piVar2);
|
|
|
|
if (param_1 == (int *)0x0) {
|
|
|
|
piVar2 = (int *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
piVar2 = param_1 + 0x17e;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd21f,piVar2);
|
|
|
|
if (param_1 == (int *)0x0) {
|
|
|
|
piVar2 = (int *)0x0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
piVar2 = param_1 + 0x17e;
|
|
|
|
}
|
|
|
|
(**(code **)(*piVar1 + 4))(0x4dd25c,piVar2);
|
|
|
|
FUN_00465f90(1);
|
|
|
|
FUN_004bd670();
|
|
|
|
if (param_1[0x182] != 0) {
|
|
|
|
(**(code **)(*param_1 + 0x18))(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
(**(code **)(*param_1 + 0x18))(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bdd50 at 0x004BDD50 (size: 76) ---
|
|
|
|
|
|
void __thiscall FUN_004bdd50(int param_1,int param_2,undefined4 param_3,char param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0x38) == param_2) {
|
|
|
|
if (param_4 == '\0') {
|
|
|
|
FUN_006a9570(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (((uint)(*(int **)(param_1 + 0x28))[0x29] >> 1 & 1) == 0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x28) + 0x18))(1);
|
|
|
|
}
|
|
|
|
FUN_00460760(0x69,param_3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bdda0 at 0x004BDDA0 (size: 54) ---
|
|
|
|
|
|
void __thiscall FUN_004bdda0(int param_1,int param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (*(int *)(param_1 + 0x38) == param_2) {
|
|
|
|
if (((uint)(*(int **)(param_1 + 0x24))[0x29] >> 1 & 1) == 0) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x24) + 0x18))(1);
|
|
|
|
}
|
|
|
|
FUN_00460760(0x69,param_3);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bde10 at 0x004BDE10 (size: 75) ---
|
|
|
|
|
|
void __thiscall FUN_004bde10(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
byte local_8 [4];
|
|
|
|
undefined1 local_4 [4];
|
|
|
|
|
|
|
|
FUN_004e3380(param_2,¶m_2,local_4,local_8);
|
|
|
|
if ((param_2 != 0) && ((local_8[0] & 0xe) == 0)) {
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x62c) + 0x9c))(0x10000046);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bde60 at 0x004BDE60 (size: 83) ---
|
|
|
|
|
|
undefined4 FUN_004bde60(int *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
int iVar3;
|
|
|
|
|
|
|
|
if (param_1 == (int *)0x0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (((*(byte *)(param_1 + 0x40) & 4) != 0) &&
|
|
|
|
(iVar1 = (**(code **)(*param_1 + 0x10))(), iVar1 == 0)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
uVar2 = (**(code **)(*param_1 + 0x18))();
|
|
|
|
if (((uVar2 & 0x10) != 0) && (iVar1 = (**(code **)(*param_1 + 0x10))(), iVar1 == 0)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
iVar1 = param_1[0x2d];
|
|
|
|
if ((iVar1 != 0) && (iVar3 = FUN_00564d30(), iVar1 == *(int *)(iVar3 + 0x20))) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bdec0 at 0x004BDEC0 (size: 25) ---
|
|
|
|
|
|
undefined4 FUN_004bdec0(undefined4 param_1,undefined4 param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00415640(param_1,param_2,0xc);
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bdee0 at 0x004BDEE0 (size: 77) ---
|
|
|
|
|
|
bool __fastcall FUN_004bdee0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0xa4);
|
|
|
|
if ((DAT_0084042c & 1) == 0) {
|
|
|
|
DAT_0084042c = DAT_0084042c | 1;
|
|
|
|
FUN_00415640(&DAT_00840428,0x10000002,0xc);
|
|
|
|
_atexit((_func_4879 *)&DAT_00762240);
|
|
|
|
}
|
|
|
|
return iVar1 == DAT_00840428;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bdfe0 at 0x004BDFE0 (size: 199) ---
|
|
|
|
|
|
void __thiscall FUN_004bdfe0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
|
|
|
|
if ((((-1 < param_2) && (param_2 < *(int *)(param_1 + 0x63c))) &&
|
|
|
|
(*(int *)(*(int *)(param_1 + 0x634) + param_2 * 4) != 0)) &&
|
|
|
|
((piVar1 = (int *)FUN_0046dc50(0), piVar1 != (int *)0x0 &&
|
|
|
|
(iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 != 0)))) {
|
|
|
|
iVar3 = FUN_00564d30();
|
|
|
|
if ((iVar3 != 0) && (iVar3 = FUN_00564d30(), *(int *)(iVar3 + 0x2c) != 0)) {
|
|
|
|
iVar3 = FUN_00564d30();
|
|
|
|
iVar2 = *(int *)(iVar2 + 0x5fc);
|
|
|
|
uVar4 = *(undefined4 *)(iVar3 + 0x2c);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
FUN_00564d30(iVar2,uVar4);
|
|
|
|
FUN_005658d0(iVar2,uVar4);
|
|
|
|
}
|
|
|
|
uVar4 = 0;
|
|
|
|
FUN_00564d30(0);
|
|
|
|
FUN_005656e0(uVar4);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((char)param_2 != '\0') {
|
|
|
|
FUN_005898b0(*(undefined4 *)(iVar2 + 0x5fc),0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FUN_0058d110(*(undefined4 *)(iVar2 + 0x5fc),0);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be0b0 at 0x004BE0B0 (size: 48) ---
|
|
|
|
|
|
void __fastcall FUN_004be0b0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
|
|
|
|
uVar1 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x63c) != 0) {
|
|
|
|
do {
|
|
|
|
if (*(int *)(*(int *)(param_1 + 0x634) + uVar1 * 4) != 0) {
|
|
|
|
FUN_004e49f0();
|
|
|
|
}
|
|
|
|
uVar1 = uVar1 + 1;
|
|
|
|
} while (uVar1 < *(uint *)(param_1 + 0x63c));
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be0e0 at 0x004BE0E0 (size: 141) ---
|
|
|
|
|
|
uint __thiscall FUN_004be0e0(int param_1,undefined4 param_2,char param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
uVar2 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x63c) != 0) {
|
|
|
|
do {
|
|
|
|
if ((*(int *)(*(int *)(param_1 + 0x634) + uVar2 * 4) != 0) &&
|
|
|
|
(iVar1 = FUN_004e3b60(param_2), iVar1 != 0)) {
|
|
|
|
FUN_004e49f0();
|
|
|
|
iVar1 = FUN_005583f0(param_2);
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_0058cf30(0xffffffff,0);
|
|
|
|
}
|
|
|
|
if (param_3 != '\0') {
|
|
|
|
FUN_006a25e0(uVar2);
|
|
|
|
FUN_0055e1d0();
|
|
|
|
FUN_005d39e0(uVar2);
|
|
|
|
}
|
|
|
|
return uVar2;
|
|
|
|
}
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
} while (uVar2 < *(uint *)(param_1 + 0x63c));
|
|
|
|
}
|
|
|
|
return 0xffffffff;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be180 at 0x004BE180 (size: 100) ---
|
|
|
|
|
|
int __thiscall FUN_004be180(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
|
|
|
|
if (((-1 < param_2) && (param_2 < *(int *)(param_1 + 0x63c))) &&
|
|
|
|
(*(int *)(*(int *)(param_1 + 0x634) + param_2 * 4) != 0)) {
|
|
|
|
piVar1 = (int *)FUN_0046dc50(0);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032);
|
|
|
|
if ((iVar2 != 0) && (iVar2 = *(int *)(iVar2 + 0x5fc), iVar2 != 0)) {
|
|
|
|
FUN_004be0e0(iVar2,param_2);
|
|
|
|
return iVar2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be1f0 at 0x004BE1F0 (size: 111) ---
|
|
|
|
|
|
uint __thiscall FUN_004be1f0(int param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
uint uVar2;
|
|
|
|
|
|
|
|
uVar2 = param_2 + 1;
|
|
|
|
if (uVar2 < *(uint *)(param_1 + 0x63c)) {
|
|
|
|
do {
|
|
|
|
if ((*(int *)(*(int *)(param_1 + 0x634) + uVar2 * 4) != 0) &&
|
|
|
|
(iVar1 = FUN_004e3c10(), iVar1 == 0)) {
|
|
|
|
return uVar2;
|
|
|
|
}
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
} while (uVar2 < *(uint *)(param_1 + 0x63c));
|
|
|
|
}
|
|
|
|
uVar2 = 0;
|
|
|
|
while( true ) {
|
|
|
|
if (*(uint *)(param_1 + 0x63c) <= uVar2) {
|
|
|
|
return 0xffffffff;
|
|
|
|
}
|
|
|
|
if ((*(int *)(*(int *)(param_1 + 0x634) + uVar2 * 4) != 0) &&
|
|
|
|
(iVar1 = FUN_004e3c10(), iVar1 == 0)) break;
|
|
|
|
uVar2 = uVar2 + 1;
|
|
|
|
if (param_2 < uVar2) {
|
|
|
|
return 0xffffffff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return uVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be270 at 0x004BE270 (size: 48) ---
|
|
|
|
|
|
uint __thiscall FUN_004be270(int param_1,uint param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (((-1 < (int)param_2) && ((int)param_2 < *(int *)(param_1 + 0x63c))) &&
|
|
|
|
(*(int *)(*(int *)(param_1 + 0x634) + param_2 * 4) != 0)) {
|
|
|
|
param_2 = FUN_004e3c10();
|
|
|
|
if (param_2 == 0) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return param_2 & 0xffffff00;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be2a0 at 0x004BE2A0 (size: 240) ---
|
|
|
|
|
|
void __thiscall FUN_004be2a0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
*(bool *)(param_1 + 0x4c) = param_2 != 8;
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x44) != 0) {
|
|
|
|
do {
|
|
|
|
if ((((*(int *)(*(int *)(param_1 + 0x3c) + uVar3 * 4) != 0) &&
|
|
|
|
(piVar1 = (int *)FUN_0046dc50(0), piVar1 != (int *)0x0)) &&
|
|
|
|
(iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032), iVar2 != 0)) &&
|
|
|
|
(*(int *)(iVar2 + 0x5fc) != 0)) {
|
|
|
|
FUN_004e2220(uVar3,CONCAT31((int3)((uint)*(int *)(iVar2 + 0x5fc) >> 8),
|
|
|
|
*(char *)(param_1 + 0x4c) == '\0'));
|
|
|
|
}
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x44));
|
|
|
|
}
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x10000192);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(param_2 == 1);
|
|
|
|
}
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x10000193);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(param_2 == 2);
|
|
|
|
}
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x10000194);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
(**(code **)(*piVar1 + 0x18))(param_2 == 4);
|
|
|
|
}
|
|
|
|
piVar1 = (int *)FUN_00463c00(0x10000195);
|
|
|
|
if (piVar1 == (int *)0x0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* WARNING: Could not recover jumptable at 0x004be38c. Too many branches */
|
|
|
|
/* WARNING: Treating indirect jump as call */
|
|
|
|
(**(code **)(*piVar1 + 0x18))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be3a0 at 0x004BE3A0 (size: 189) ---
|
|
|
|
|
|
undefined4 * __thiscall FUN_004be3a0(undefined4 *param_1,undefined4 param_2,undefined4 param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00472670(param_2,param_3);
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007acb10;
|
|
|
|
*param_1 = &PTR_FUN_007b5650;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b53a8;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007bb5c4;
|
|
|
|
param_1[0x180] = 0;
|
|
|
|
param_1[0x181] = 0;
|
|
|
|
param_1[0x182] = 0;
|
|
|
|
param_1[0x183] = 0;
|
|
|
|
param_1[0x184] = 0;
|
|
|
|
param_1[0x185] = 0;
|
|
|
|
param_1[0x186] = 0;
|
|
|
|
param_1[0x187] = 0;
|
|
|
|
param_1[0x188] = 0;
|
|
|
|
param_1[0x189] = 0;
|
|
|
|
param_1[0x18a] = 0;
|
|
|
|
param_1[0x18b] = 0;
|
|
|
|
param_1[0x18c] = 0;
|
|
|
|
param_1[0x18d] = 0;
|
|
|
|
param_1[0x18e] = 0;
|
|
|
|
param_1[399] = 0;
|
|
|
|
param_1[400] = 0;
|
|
|
|
param_1[0x192] = 0;
|
|
|
|
*(undefined1 *)(param_1 + 0x191) = 1;
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be490 at 0x004BE490 (size: 177) ---
|
|
|
|
|
|
void __fastcall FUN_004be490(undefined4 *param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint uVar1;
|
|
|
|
|
|
|
|
uVar1 = 0;
|
|
|
|
*param_1 = &PTR_FUN_007b5650;
|
|
|
|
param_1[0x17e] = &PTR_FUN_007b53a8;
|
|
|
|
param_1[0x17f] = &PTR_LAB_007bb5c4;
|
|
|
|
if (param_1[399] != 0) {
|
|
|
|
do {
|
|
|
|
if (*(int *)(param_1[0x18d] + uVar1 * 4) != 0) {
|
|
|
|
FUN_004e3230();
|
|
|
|
}
|
|
|
|
uVar1 = uVar1 + 1;
|
|
|
|
} while (uVar1 < (uint)param_1[399]);
|
|
|
|
}
|
|
|
|
FUN_00465fb0(1);
|
|
|
|
if ((param_1[0x18e] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0x18d]);
|
|
|
|
}
|
|
|
|
if ((param_1[0x181] & 0x80000000) == 0x80000000) {
|
|
|
|
operator_delete__((void *)param_1[0x180]);
|
|
|
|
}
|
|
|
|
param_1[0x17e] = &PTR_FUN_007ccb60;
|
|
|
|
FUN_0043c610();
|
|
|
|
FUN_004726c0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be5c0 at 0x004BE5C0 (size: 104) ---
|
|
|
|
|
|
void __thiscall FUN_004be5c0(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
int *piVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x44) != 0) {
|
|
|
|
piVar1 = *(int **)(param_1 + 0x3c);
|
|
|
|
while (*piVar1 != param_2) {
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
piVar1 = piVar1 + 1;
|
|
|
|
if (*(uint *)(param_1 + 0x44) <= uVar3) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
piVar1 = (int *)FUN_0046dc50(0);
|
|
|
|
if (piVar1 != (int *)0x0) {
|
|
|
|
iVar2 = (**(code **)(*piVar1 + 0x94))(0x10000032);
|
|
|
|
if ((iVar2 != 0) && (*(int *)(iVar2 + 0x5fc) != 0)) {
|
|
|
|
FUN_004be0e0(*(int *)(iVar2 + 0x5fc),1);
|
|
|
|
*(uint *)(param_1 + 0x48) = uVar3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be630 at 0x004BE630 (size: 217) ---
|
|
|
|
|
|
void __thiscall FUN_004be630(int param_1,int param_2,uint param_3,char param_4)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
undefined1 local_10 [16];
|
|
|
|
|
|
|
|
uVar3 = param_3;
|
|
|
|
if (((int)param_3 < 0) || (*(int *)(param_1 + 0x63c) <= (int)param_3)) {
|
|
|
|
uVar4 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x63c) != 0) {
|
|
|
|
do {
|
|
|
|
if ((*(int *)(*(int *)(param_1 + 0x634) + uVar4 * 4) != 0) &&
|
|
|
|
(iVar1 = FUN_004e3c10(), uVar3 = uVar4, iVar1 == 0)) break;
|
|
|
|
uVar4 = uVar4 + 1;
|
|
|
|
uVar3 = param_3;
|
|
|
|
} while (uVar4 < *(uint *)(param_1 + 0x63c));
|
|
|
|
}
|
|
|
|
if (uVar4 == *(uint *)(param_1 + 0x63c)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((*(int *)(*(int *)(param_1 + 0x634) + uVar3 * 4) != 0) && (param_2 != 0)) {
|
|
|
|
FUN_004e49f0();
|
|
|
|
iVar1 = FUN_004e4a90(param_2);
|
|
|
|
iVar2 = FUN_005583f0(param_2);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
if (iVar1 != 0) {
|
|
|
|
FUN_004e1ec0(uVar3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
FUN_0058cf30(uVar3,0);
|
|
|
|
}
|
|
|
|
if (param_4 != '\0') {
|
|
|
|
FUN_0059b5b0(uVar3,param_2,0);
|
|
|
|
FUN_006a1cd0(local_10);
|
|
|
|
FUN_0055e1d0();
|
|
|
|
FUN_005d39a0(local_10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be710 at 0x004BE710 (size: 30) ---
|
|
|
|
|
|
void * __thiscall FUN_004be710(void *param_1,byte param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_004be490();
|
|
|
|
if ((param_2 & 1) != 0) {
|
|
|
|
operator_delete(param_1);
|
|
|
|
}
|
|
|
|
return param_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be730 at 0x004BE730 (size: 19) ---
|
|
|
|
|
|
void FUN_004be730(void)
|
|
|
|
|
|
|
|
{
|
|
|
|
FUN_00460270(0x10000007,&LAB_004be550);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be750 at 0x004BE750 (size: 644) ---
|
|
|
|
|
|
void __thiscall FUN_004be750(int param_1,int param_2,int param_3,char param_4,char param_5)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
undefined4 *puVar3;
|
|
|
|
int *piVar4;
|
|
|
|
uint uVar5;
|
|
|
|
wchar_t *pwVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
undefined1 local_9c [7];
|
|
|
|
char local_95;
|
|
|
|
undefined1 local_94 [4];
|
|
|
|
undefined1 local_90 [144];
|
|
|
|
|
|
|
|
if (param_2 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_005583f0(param_2);
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
cVar1 = FUN_004bde60(iVar2);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
if (param_5 != '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
puVar3 = (undefined4 *)FUN_0058f8b0(local_94,2,0);
|
|
|
|
uVar7 = *puVar3;
|
|
|
|
pwVar6 = L"You cannot make a shortcut to the %s";
|
|
|
|
LAB_004be7b5:
|
|
|
|
FUN_00480980(local_9c,0,pwVar6,uVar7);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042cbe0(local_9c,1);
|
|
|
|
LAB_004be7eb:
|
|
|
|
FUN_00693500(0x1a,local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
FUN_004011b0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
iVar2 = FUN_0058df90();
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
if (param_4 == '\0') {
|
|
|
|
if (param_5 != '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
puVar3 = (undefined4 *)FUN_0058f8b0(local_94,2,0);
|
|
|
|
FUN_00480980(local_9c,0,L"You are not carrying the %s",*puVar3);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_0042cbe0(local_9c,1);
|
|
|
|
goto LAB_004be7eb;
|
|
|
|
}
|
|
|
|
uVar7 = 0;
|
|
|
|
iVar2 = param_2;
|
|
|
|
FUN_0055e1d0(param_2,0);
|
|
|
|
cVar1 = FUN_0055e5e0(iVar2,uVar7);
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (param_3 == -1) {
|
|
|
|
uVar5 = 0;
|
|
|
|
local_95 = '\0';
|
|
|
|
if (*(int *)(param_1 + 0x63c) != 0) {
|
|
|
|
do {
|
|
|
|
if (((*(int *)(*(int *)(param_1 + 0x634) + uVar5 * 4) != 0) &&
|
|
|
|
(piVar4 = (int *)FUN_0046dc50(0), piVar4 != (int *)0x0)) &&
|
|
|
|
(iVar2 = (**(code **)(*piVar4 + 0x94))(0x10000032), iVar2 != 0)) {
|
|
|
|
if (*(int *)(iVar2 + 0x5fc) == param_2) {
|
|
|
|
if (param_5 != '\0') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
puVar3 = (undefined4 *)FUN_0058f8b0(local_94,2,0);
|
|
|
|
uVar7 = *puVar3;
|
|
|
|
pwVar6 = L"There is already a shortcut to the %s";
|
|
|
|
goto LAB_004be7b5;
|
|
|
|
}
|
|
|
|
if (*(int *)(iVar2 + 0x5fc) == 0) {
|
|
|
|
local_95 = '\x01';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uVar5 = uVar5 + 1;
|
|
|
|
} while (uVar5 < *(uint *)(param_1 + 0x63c));
|
|
|
|
if (local_95 != '\0') goto LAB_004be9ab;
|
|
|
|
}
|
|
|
|
if (param_5 == '\0') {
|
|
|
|
FUN_0042dc80();
|
|
|
|
FUN_00402730(L"There are no free shortcut slots");
|
|
|
|
FUN_0042cbe0(local_9c,1);
|
|
|
|
FUN_004011b0();
|
|
|
|
FUN_00693500(0x1a,local_90);
|
|
|
|
FUN_0042e590();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
LAB_004be9ab:
|
|
|
|
FUN_004be0e0(param_2,1);
|
|
|
|
FUN_004be630(param_2,param_3,1);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004be9e0 at 0x004BE9E0 (size: 1933) ---
|
|
|
|
|
|
void __fastcall FUN_004be9e0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int *piVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
uint uVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
int *piVar6;
|
|
|
|
int iVar7;
|
|
|
|
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x100001a7);
|
|
|
|
if (piVar2 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar2 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
piVar2 = (int *)(param_1 + 0x634);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bea4e:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bea4e;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001a8);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004beab8:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004beab8;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001a9);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004beb22:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004beb22;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001aa);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004beb8c:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004beb8c;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001ab);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bebf6:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bebf6;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001ac);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bec60:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bec60;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001ad);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004becca:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004becca;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001ae);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bed34:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bed34;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100001af);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bed9e:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bed9e;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006b7);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bee08:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bee08;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006b8);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bee72:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bee72;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006b9);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004beedc:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004beedc;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006ba);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bef46:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bef46;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006bb);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004befb0:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004befb0;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006bc);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bf01a:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bf01a;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006bd);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bf084:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bf084;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006be);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x63c) < uVar4) {
|
|
|
|
LAB_004bf0ee:
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 != '\0') goto LAB_004bf0ee;
|
|
|
|
}
|
|
|
|
piVar6 = (int *)FUN_00463c00(0x100006bf);
|
|
|
|
if (piVar6 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar6 + 0x94))(0x10000031);
|
|
|
|
}
|
|
|
|
if (param_1 == 0) {
|
|
|
|
iVar7 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar7 = param_1 + 0x5fc;
|
|
|
|
}
|
|
|
|
FUN_004e3220(iVar7);
|
|
|
|
uVar4 = *(uint *)(param_1 + 0x638) & 0x7fffffff;
|
|
|
|
if (uVar4 <= *(uint *)(param_1 + 0x63c)) {
|
|
|
|
uVar5 = FUN_00453850(uVar4 + 1);
|
|
|
|
cVar1 = FUN_004180a0(uVar5);
|
|
|
|
if (cVar1 == '\0') goto LAB_004bf163;
|
|
|
|
}
|
|
|
|
*(undefined4 *)(*piVar2 + *(int *)(param_1 + 0x63c) * 4) = uVar3;
|
|
|
|
*(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
|
|
|
|
LAB_004bf163:
|
|
|
|
FUN_004be0b0();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bf170 at 0x004BF170 (size: 407) ---
|
|
|
|
|
|
void __thiscall FUN_004bf170(int param_1,int param_2,int param_3)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
undefined4 uVar2;
|
|
|
|
LONG LVar3;
|
|
|
|
undefined4 *puVar4;
|
|
|
|
|
|
|
|
if (param_2 == 1) {
|
|
|
|
cVar1 = FUN_00460310();
|
|
|
|
if (cVar1 == '\0') {
|
|
|
|
switch(param_3) {
|
|
|
|
case 0x10000042:
|
|
|
|
case 0x10000043:
|
|
|
|
case 0x10000044:
|
|
|
|
case 0x10000045:
|
|
|
|
case 0x10000046:
|
|
|
|
case 0x10000047:
|
|
|
|
case 0x10000048:
|
|
|
|
case 0x10000049:
|
|
|
|
case 0x1000004a:
|
|
|
|
case 0x1000004b:
|
|
|
|
case 0x1000004c:
|
|
|
|
case 0x1000004d:
|
|
|
|
FUN_004bdfe0(param_3 + -0x10000042,1);
|
|
|
|
return;
|
|
|
|
case 0x1000004e:
|
|
|
|
case 0x1000004f:
|
|
|
|
case 0x10000050:
|
|
|
|
case 0x10000051:
|
|
|
|
case 0x10000052:
|
|
|
|
case 0x10000053:
|
|
|
|
case 0x10000054:
|
|
|
|
case 0x10000055:
|
|
|
|
case 0x10000056:
|
|
|
|
case 0x10000057:
|
|
|
|
case 0x10000058:
|
|
|
|
case 0x10000059:
|
|
|
|
FUN_004bdfe0(param_3 + -0x1000004e,0);
|
|
|
|
return;
|
|
|
|
case 0x1000010d:
|
|
|
|
if (DAT_00871e54 != 0) {
|
|
|
|
FUN_004be750(DAT_00871e54,0xffffffff,1,0);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x10000132:
|
|
|
|
FUN_004bdfe0(0xc,1);
|
|
|
|
return;
|
|
|
|
case 0x10000133:
|
|
|
|
FUN_004bdfe0(0xd,1);
|
|
|
|
return;
|
|
|
|
case 0x10000134:
|
|
|
|
FUN_004bdfe0(0xe,1);
|
|
|
|
return;
|
|
|
|
case 0x10000135:
|
|
|
|
FUN_004bdfe0(0xf,1);
|
|
|
|
return;
|
|
|
|
case 0x10000136:
|
|
|
|
FUN_004bdfe0(0x10,1);
|
|
|
|
return;
|
|
|
|
case 0x10000137:
|
|
|
|
FUN_004bdfe0(0x11,1);
|
|
|
|
return;
|
|
|
|
case 0x10000138:
|
|
|
|
FUN_004bdfe0(0xc,0);
|
|
|
|
return;
|
|
|
|
case 0x10000139:
|
|
|
|
FUN_004bdfe0(0xd,0);
|
|
|
|
return;
|
|
|
|
case 0x1000013a:
|
|
|
|
FUN_004bdfe0(0xe,0);
|
|
|
|
return;
|
|
|
|
case 0x1000013b:
|
|
|
|
FUN_004bdfe0(0xf,0);
|
|
|
|
return;
|
|
|
|
case 0x1000013c:
|
|
|
|
FUN_004bdfe0(0x10,0);
|
|
|
|
return;
|
|
|
|
case 0x1000013d:
|
|
|
|
FUN_004bdfe0(0x11,0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (param_3 == 0x27) {
|
|
|
|
uVar2 = FUN_00480980(¶m_3,0,&DAT_007a11d4,DAT_0081d7ec);
|
|
|
|
FUN_0046a740(uVar2);
|
|
|
|
puVar4 = (undefined4 *)(param_3 + -0x14);
|
|
|
|
LVar3 = InterlockedDecrement((LONG *)(param_3 + -0x10));
|
|
|
|
if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar4)(1);
|
|
|
|
}
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x108))();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bf450 at 0x004BF450 (size: 455) ---
|
|
|
|
|
|
void __thiscall FUN_004bf450(int param_1,int param_2)
|
|
|
|
|
|
|
|
{
|
|
|
|
char cVar1;
|
|
|
|
int iVar2;
|
|
|
|
uint uVar3;
|
|
|
|
int iVar4;
|
|
|
|
undefined4 uVar5;
|
|
|
|
byte local_8 [4];
|
|
|
|
undefined1 local_4 [4];
|
|
|
|
|
|
|
|
iVar2 = *(int *)(*(int *)(param_2 + 0xc) + 0x10);
|
|
|
|
iVar4 = *(int *)(*(int *)(param_2 + 0xc) + 8);
|
|
|
|
if ((iVar4 != 0) && (iVar2 != 0)) {
|
|
|
|
if (*(int *)(iVar2 + 0x2e4) == 0x100001b1) {
|
|
|
|
FUN_004e3380(iVar4,¶m_2,local_4,local_8);
|
|
|
|
if (((local_8[0] & 0xe) == 0) && (iVar2 = FUN_005583f0(param_2), iVar2 != 0)) {
|
|
|
|
iVar2 = FUN_0058df90();
|
|
|
|
uVar5 = 0;
|
|
|
|
if (iVar2 == 0) {
|
|
|
|
uVar5 = FUN_0048e5f0(0,1);
|
|
|
|
uVar3 = FUN_00588f70(param_2,uVar5);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar2 = param_2;
|
|
|
|
FUN_0055e1d0(param_2,0);
|
|
|
|
uVar3 = FUN_0055e5e0(iVar2,uVar5);
|
|
|
|
uVar3 = uVar3 & 0xff;
|
|
|
|
}
|
|
|
|
if (uVar3 == 0) {
|
|
|
|
FUN_0058cf00(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = 0;
|
|
|
|
if (*(int *)(param_1 + 0x63c) != 0) {
|
|
|
|
do {
|
|
|
|
cVar1 = FUN_0045fbb0(*(undefined4 *)(*(int *)(param_1 + 0x634) + uVar3 * 4));
|
|
|
|
if (cVar1 != '\0') break;
|
|
|
|
uVar3 = uVar3 + 1;
|
|
|
|
} while (uVar3 < *(uint *)(param_1 + 0x63c));
|
|
|
|
}
|
|
|
|
if ((uVar3 != *(uint *)(param_1 + 0x63c)) &&
|
|
|
|
(FUN_004e3380(iVar4,¶m_2,local_4,local_8), param_2 != 0)) {
|
|
|
|
if ((local_8[0] & 0xe) == 0) {
|
|
|
|
iVar2 = FUN_004be180(uVar3,1);
|
|
|
|
FUN_004be750(param_2,uVar3,1,0);
|
|
|
|
if (((iVar2 != 0) && (iVar2 != param_2)) && (iVar4 = FUN_004be1f0(uVar3), iVar4 != -1)) {
|
|
|
|
FUN_004be630(iVar2,iVar4,1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((local_8[0] & 4) != 0) {
|
|
|
|
iVar2 = FUN_004be180(uVar3,1);
|
|
|
|
FUN_004be630(param_2,uVar3,1);
|
|
|
|
if (((iVar2 != 0) && (iVar2 != param_2)) &&
|
|
|
|
(cVar1 = FUN_004be270(*(undefined4 *)(param_1 + 0x640)), cVar1 != '\0')) {
|
|
|
|
FUN_004be630(iVar2,*(undefined4 *)(param_1 + 0x640),1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bf670 at 0x004BF670 (size: 153) ---
|
|
|
|
|
|
void __fastcall FUN_004bf670(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
undefined *puVar1;
|
|
|
|
int *piVar2;
|
|
|
|
int iVar3;
|
|
|
|
LONG LVar4;
|
|
|
|
undefined4 *puVar5;
|
|
|
|
|
|
|
|
piVar2 = (int *)FUN_00463c00(0x10000194);
|
|
|
|
if ((piVar2 != (int *)0x0) &&
|
|
|
|
(iVar3 = (**(code **)(*piVar2 + 0x94))(1), puVar1 = PTR_DAT_00818340, iVar3 != 0)) {
|
|
|
|
InterlockedIncrement((LONG *)(PTR_DAT_00818340 + -0x10));
|
|
|
|
iVar3 = FUN_005583f0(*(undefined4 *)(param_1 + 0x648));
|
|
|
|
if (iVar3 != 0) {
|
|
|
|
iVar3 = *(int *)(iVar3 + 0xf8);
|
|
|
|
if (iVar3 == 0) {
|
|
|
|
iVar3 = 1;
|
|
|
|
}
|
|
|
|
FUN_0047b520(iVar3);
|
|
|
|
}
|
|
|
|
FUN_0046a740(&stack0xfffffff8);
|
|
|
|
puVar5 = (undefined4 *)(puVar1 + -0x14);
|
|
|
|
LVar4 = InterlockedDecrement((LONG *)(puVar1 + -0x10));
|
|
|
|
if ((LVar4 == 0) && (puVar5 != (undefined4 *)0x0)) {
|
|
|
|
(**(code **)*puVar5)(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bf710 at 0x004BF710 (size: 1025) ---
|
|
|
|
|
|
void __fastcall FUN_004bf710(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
char cVar2;
|
|
|
|
undefined4 uVar3;
|
|
|
|
int *piVar4;
|
|
|
|
int iVar5;
|
|
|
|
uint uVar6;
|
|
|
|
undefined4 uVar7;
|
|
|
|
undefined4 uStack_34;
|
|
|
|
undefined4 uStack_30;
|
|
|
|
undefined4 uStack_2c;
|
|
|
|
undefined4 uStack_28;
|
|
|
|
undefined4 uStack_24;
|
|
|
|
undefined4 uStack_20;
|
|
|
|
undefined4 uStack_1c;
|
|
|
|
undefined4 uStack_18;
|
|
|
|
undefined4 uStack_14;
|
|
|
|
undefined4 uStack_10;
|
|
|
|
undefined4 uStack_c;
|
|
|
|
undefined4 uStack_8;
|
|
|
|
undefined4 uStack_4;
|
|
|
|
|
|
|
|
FUN_004639a0();
|
|
|
|
uVar3 = FUN_00463c00(0x1000019d);
|
|
|
|
*(undefined4 *)(param_1 + 0x60c) = uVar3;
|
|
|
|
uVar3 = FUN_00463c00(0x100001a5);
|
|
|
|
*(undefined4 *)(param_1 + 0x610) = uVar3;
|
|
|
|
uVar3 = FUN_00463c00(0x1000019e);
|
|
|
|
*(undefined4 *)(param_1 + 0x614) = uVar3;
|
|
|
|
piVar4 = (int *)FUN_00463c00(0x1000019f);
|
|
|
|
if (piVar4 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar4 + 0x94))(0xc);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x618) = uVar3;
|
|
|
|
piVar4 = (int *)FUN_00463c00(0x100001a1);
|
|
|
|
if (piVar4 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar4 + 0x94))(7);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x61c) = uVar3;
|
|
|
|
piVar4 = (int *)FUN_00463c00(0x100001a2);
|
|
|
|
if (piVar4 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar4 + 0x94))(7);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x620) = uVar3;
|
|
|
|
piVar4 = (int *)FUN_00463c00(0x100001a3);
|
|
|
|
if (piVar4 == (int *)0x0) {
|
|
|
|
iVar5 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
iVar5 = (**(code **)(*piVar4 + 0x94))(0xc);
|
|
|
|
}
|
|
|
|
*(int *)(param_1 + 0x624) = iVar5;
|
|
|
|
if (iVar5 != 0) {
|
|
|
|
*(undefined1 **)(iVar5 + 0x6a0) = &LAB_00466520;
|
|
|
|
}
|
|
|
|
piVar4 = (int *)FUN_00463c00(0x100001a4);
|
|
|
|
if (piVar4 == (int *)0x0) {
|
|
|
|
uVar3 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = (**(code **)(*piVar4 + 0x94))(0xb);
|
|
|
|
}
|
|
|
|
*(undefined4 *)(param_1 + 0x628) = uVar3;
|
|
|
|
uVar3 = FUN_00463c00(0x10000197);
|
|
|
|
FUN_00460990(0x10000029,&uStack_34);
|
|
|
|
piVar4 = (int *)(param_1 + 0x600);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x604) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x608) < uVar6) {
|
|
|
|
LAB_004bf87f:
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
*(undefined4 *)(iVar1 + iVar5 * 8) = uVar3;
|
|
|
|
*(undefined4 *)(iVar1 + 4 + iVar5 * 8) = uStack_34;
|
|
|
|
*(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar7 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar2 = FUN_00459e20(uVar7);
|
|
|
|
if (cVar2 != '\0') goto LAB_004bf87f;
|
|
|
|
}
|
|
|
|
uStack_30 = FUN_00463c00(0x10000198);
|
|
|
|
FUN_00460990(0x10000029,&uStack_2c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x604) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x608) < uVar6) {
|
|
|
|
LAB_004bf8db:
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
*(undefined4 *)(iVar1 + iVar5 * 8) = uStack_30;
|
|
|
|
*(undefined4 *)(iVar1 + 4 + iVar5 * 8) = uStack_2c;
|
|
|
|
*(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar2 = FUN_00459e20(uVar3);
|
|
|
|
if (cVar2 != '\0') goto LAB_004bf8db;
|
|
|
|
}
|
|
|
|
uStack_28 = FUN_00463c00(0x10000199);
|
|
|
|
FUN_00460990(0x10000029,&uStack_24);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x604) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x608) < uVar6) {
|
|
|
|
LAB_004bf937:
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
*(undefined4 *)(iVar1 + iVar5 * 8) = uStack_28;
|
|
|
|
*(undefined4 *)(iVar1 + 4 + iVar5 * 8) = uStack_24;
|
|
|
|
*(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar2 = FUN_00459e20(uVar3);
|
|
|
|
if (cVar2 != '\0') goto LAB_004bf937;
|
|
|
|
}
|
|
|
|
uStack_20 = FUN_00463c00(0x1000055a);
|
|
|
|
FUN_00460990(0x10000029,&uStack_1c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x604) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x608) < uVar6) {
|
|
|
|
LAB_004bf993:
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
*(undefined4 *)(iVar1 + iVar5 * 8) = uStack_20;
|
|
|
|
*(undefined4 *)(iVar1 + 4 + iVar5 * 8) = uStack_1c;
|
|
|
|
*(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar2 = FUN_00459e20(uVar3);
|
|
|
|
if (cVar2 != '\0') goto LAB_004bf993;
|
|
|
|
}
|
|
|
|
uStack_18 = FUN_00463c00(0x1000019a);
|
|
|
|
FUN_00460990(0x10000029,&uStack_14);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x604) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x608) < uVar6) {
|
|
|
|
LAB_004bf9ef:
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
*(undefined4 *)(iVar1 + iVar5 * 8) = uStack_18;
|
|
|
|
*(undefined4 *)(iVar1 + 4 + iVar5 * 8) = uStack_14;
|
|
|
|
*(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar2 = FUN_00459e20(uVar3);
|
|
|
|
if (cVar2 != '\0') goto LAB_004bf9ef;
|
|
|
|
}
|
|
|
|
uStack_10 = FUN_00463c00(0x1000019b);
|
|
|
|
FUN_00460990(0x10000029,&uStack_c);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x604) & 0x7fffffff;
|
|
|
|
if (*(uint *)(param_1 + 0x608) < uVar6) {
|
|
|
|
LAB_004bfa4b:
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
*(undefined4 *)(iVar1 + iVar5 * 8) = uStack_10;
|
|
|
|
*(undefined4 *)(iVar1 + 4 + iVar5 * 8) = uStack_c;
|
|
|
|
*(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar3 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar2 = FUN_00459e20(uVar3);
|
|
|
|
if (cVar2 != '\0') goto LAB_004bfa4b;
|
|
|
|
}
|
|
|
|
uStack_8 = FUN_00463c00(0x100001b1);
|
|
|
|
FUN_00460990(0x10000029,&uStack_4);
|
|
|
|
uVar6 = *(uint *)(param_1 + 0x604) & 0x7fffffff;
|
|
|
|
if (uVar6 <= *(uint *)(param_1 + 0x608)) {
|
|
|
|
uVar3 = FUN_00453850(uVar6 + 1);
|
|
|
|
cVar2 = FUN_00459e20(uVar3);
|
|
|
|
if (cVar2 == '\0') goto LAB_004bfabe;
|
|
|
|
}
|
|
|
|
iVar5 = *(int *)(param_1 + 0x608);
|
|
|
|
iVar1 = *piVar4;
|
|
|
|
*(undefined4 *)(iVar1 + iVar5 * 8) = uStack_8;
|
|
|
|
*(undefined4 *)(iVar1 + 4 + iVar5 * 8) = uStack_4;
|
|
|
|
*(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
|
|
|
|
LAB_004bfabe:
|
|
|
|
uVar3 = FUN_00463c00(0x1000046c);
|
|
|
|
*(undefined4 *)(param_1 + 0x62c) = uVar3;
|
|
|
|
FUN_004be9e0();
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x61c) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x620) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x624) + 0x18))(0);
|
|
|
|
(**(code **)(**(int **)(param_1 + 0x628) + 0x18))(0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- FUN_004bfea0 at 0x004BFEA0 (size: 157) ---
|
|
|
|
|
|
void __fastcall FUN_004bfea0(int param_1)
|
|
|
|
|
|
|
|
{
|
|
|
|
int iVar1;
|
|
|
|
int iVar2;
|
|
|
|
int iVar3;
|
|
|
|
undefined4 uVar4;
|
|
|
|
|
|
|
|
iVar1 = *(int *)(param_1 + 0x648);
|
|
|
|
*(undefined4 *)(param_1 + 0x648) = 0;
|
|
|
|
if (DAT_0083da58 == 0) {
|
|
|
|
uVar4 = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uVar4 = *(undefined4 *)(DAT_0083da58 + 0xf4);
|
|
|
|
}
|
|
|
|
iVar2 = FUN_005583f0(uVar4);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar2 = FUN_0058dc30(0x400000,0);
|
|
|
|
if (iVar2 != 0) {
|
|
|
|
iVar3 = FUN_005583f0(iVar2);
|
|
|
|
if ((iVar3 != 0) && (1 < *(uint *)(iVar3 + 0xfc))) {
|
|
|
|
*(int *)(param_1 + 0x648) = iVar2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x648) == 0) {
|
|
|
|
uVar4 = FUN_0058dc30(0x800000,0);
|
|
|
|
*(undefined4 *)(param_1 + 0x648) = uVar4;
|
|
|
|
}
|
|
|
|
if (*(int *)(param_1 + 0x648) != iVar1) {
|
|
|
|
FUN_004bf670();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|