Function at 0x54c300
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5a6f1b
mov eax, dword fs:[0]
push eax
sub esp, 0xbfc
mov eax, dword [0x691844]
xor eax, esp
mov dword [esp + 0xbf8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x691844]
xor eax, esp
push eax
lea eax, [esp + 0xc10]
mov dword fs:[0], eax
mov eax, dword [0x6cb158]
mov edi, dword [esp + 0xc20]
mov esi, ecx
xor ebx, ebx
push 0x400
lea ecx, [esp + 0x410]
push ebx
push ecx
mov dword [esi + 4], eax
mov dword [esp + 0x20], ebx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea ecx, [esp + 0x70]
call fcn.00521330
push 0x10
push 0x5bf11c
push edi
lea ecx, [esp + 0x7c]
mov dword [esp + 0xc24], ebx
call fcn.00521580
push edi
push str._s_file_inited
push 0x68e51c
call fcn.0051f340
add esp, 0xc
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
call fcn.00520e10
cmp eax, 0xffffffff
je 0x54ca07
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push str.GX_METADATA
lea eax, [esp + 0x410]
push eax
call edi
test eax, eax
jne 0x54c488
push 0x5bce40
lea ecx, [esp + 0x410]
push ecx
call edi
test eax, eax
je 0x54c488
lea ebx, [ebx]
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
call fcn.00520e10
push str.BOX_MAX
lea eax, [esp + 0x410]
push eax
call edi
test eax, eax
jne 0x54c43a
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esi + 0x10]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esi + 0x14]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esi + 0x18]
jmp 0x54c471
push str.BOX_MIN
lea ecx, [esp + 0x410]
push ecx
call edi
test eax, eax
jne 0x54c471
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esi + 0x1c]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esi + 0x20]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esi + 0x24]
push 0x5bce40
lea edx, [esp + 0x410]
push edx
call edi
test eax, eax
jne 0x54c3f0
push str.GX_MAP
lea eax, [esp + 0x410]
push eax
call edi
test eax, eax
jne 0x54c5b8
push 0x5bce40
lea ecx, [esp + 0x410]
push ecx
call edi
test eax, eax
je 0x54c594
jmp 0x54c4c0
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
call fcn.00520e10
push str.STATIC_MODEL
lea eax, [esp + 0x410]
push eax
call edi
test eax, eax
jne 0x54c526
lea ecx, [esp + 0x40c]
push ecx
lea ecx, [esp + 0x74]
call fcn.00520e10
lea edx, [esp + 0x40c]
push edx
push str._s_PID_STATIC_MODEL
push 0x68e51c
call fcn.0051f340
add esp, 0xc
lea eax, [esp + 0x40c]
push eax
mov ecx, esi
call fcn.0054c250
mov dword [esp + 0x14], 1
push str.HEIGHT_FIELD
lea ecx, [esp + 0x410]
push ecx
call edi
test eax, eax
jne 0x54c57d
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
call fcn.00520e10
lea eax, [esp + 0x40c]
push eax
push str._s_PID_HEIGHT_FIELD
push 0x68e51c
call fcn.0051f340
add esp, 0xc
push 0
lea ecx, [esp + 0x410]
push ecx
mov ecx, esi
call fcn.0054c0f0
mov dword [esp + 0x14], 1
push 0x5bce40
lea edx, [esp + 0x410]
push edx
call edi
test eax, eax
jne 0x54c4c0
cmp dword [esp + 0x14], 0
je 0x54c5b8
push str.bBuildTree
push 0x68e51c
call fcn.0051f340
add esp, 8
lea eax, [esi + 0x10]
push eax
mov ecx, esi
call fcn.0054bee0
push str.GX_OBJECT
lea ecx, [esp + 0x410]
push ecx
call edi
test eax, eax
jne 0x54c82f
lea ecx, [esp + 0x70]
call fcn.00521800
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
mov ebx, eax
call fcn.00520e10
test ebx, ebx
jbe 0x54c81e
mov ebp, ebx
lea eax, [esp + 0x40c]
push eax
lea ecx, [esp + 0x74]
call fcn.00520e10
lea ecx, [esp + 0x40c]
push ecx
push str._s_gxobject
push 0x68e51c
call fcn.0051f340
add esp, 0xc
lea ecx, [esp + 0x70]
call fcn.00521800
lea ecx, [esp + 0x70]
mov ebx, eax
call fcn.005217d0
fstp dword [esp + 0x64]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x68]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x6c]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x4c]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x50]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x54]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x58]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x5c]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x60]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x44]
push str.hex_start
push 0x68e51c
call fcn.0051f340
add esp, 8
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x74]
call fcn.005204a0
push str.hex_end
push 0x68e51c
call fcn.0051f340
mov edx, dword [esp + 0x20]
mov eax, dword [esi + 4]
mov ecx, dword [eax]
add esp, 8
push edx
push 0
push 0
lea edx, [esp + 0x418]
push edx
push eax
mov eax, dword [ecx + 0x18c]
call eax
mov edi, eax
test edi, edi
jne 0x54c739
lea ecx, [esp + 0x40c]
push ecx
lea edx, [esp + 0x810]
push str.Failed_to_load_MapObject___s_
push edx
call dword [sym.imp.MSVCR90.dll_sprintf]
lea eax, [esp + 0x818]
push eax
push 0x68e51c
call fcn.0051f340
add esp, 0x14
jmp 0x54c80f
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x4c]
push 0
push edi
push eax
call edx
test eax, eax
jbe 0x54c77e
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1cc]
push edi
push eax
call edx
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 4]
mov ecx, dword [eax]
or edx, 8
push edx
push 0
push 0
lea edx, [esp + 0x418]
push edx
push eax
mov eax, dword [ecx + 0x18c]
call eax
mov edi, eax
test edi, edi
je 0x54c80f
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x150]
push ebx
push edi
push eax
call edx
mov eax, dword [esi + 4]
mov ecx, dword [eax]
lea edx, [esp + 0x64]
push edx
push edi
push eax
mov eax, dword [ecx + 0x8c]
call eax
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push 0
lea edx, [esp + 0x50]
push edx
push edi
push eax
mov eax, dword [ecx + 0x64]
call eax
fld dword [esp + 0x44]
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push ecx
fstp dword [esp]
lea edx, [esp + 0x5c]
push edx
push edi
push eax
mov eax, dword [ecx + 0x78]
call eax
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x180]
push edi
push eax
call edx
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x178]
push edi
push eax
call edx
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x170]
push edi
push eax
call edx
push edi
lea ecx, [esi + 0x1a0]
call fcn.00594150
sub ebp, 1
jne 0x54c5f5
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea eax, [esp + 0x40c]
push eax
lea ecx, [esp + 0x74]
call fcn.00520e10
push str.GX_LIGHT
lea ecx, [esp + 0x410]
push ecx
call edi
test eax, eax
jne 0x54c86d
lea ecx, [esp + 0x70]
call fcn.00521800
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
call fcn.00520e10
lea eax, [esp + 0x40c]
push eax
lea ecx, [esp + 0x74]
call fcn.00520e10
push 0x5c1be8
lea ecx, [esp + 0x410]
push ecx
call edi
test eax, eax
jne 0x54c9ed
lea ecx, [esp + 0x70]
call fcn.00521800
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
mov ebp, eax
call fcn.00520e10
test ebp, ebp
jbe 0x54c9dc
xor eax, eax
lea ecx, [esp + 0x70]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call fcn.00521800
mov ebx, eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x74]
call fcn.005204a0
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x1c]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x20]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x24]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x28]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x2c]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x30]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x34]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x38]
lea ecx, [esp + 0x70]
call fcn.005217d0
fstp dword [esp + 0x3c]
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x74]
call fcn.005204a0
mov ecx, dword [esp + 0x48]
mov eax, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx + 0x194]
push ecx
push 0
push 0
push eax
call edx
mov edi, eax
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x150]
push ebx
push edi
push eax
call edx
mov eax, dword [esi + 4]
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push edi
push eax
mov eax, dword [ecx + 0x210]
call eax
mov eax, dword [esi + 4]
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
push edi
push eax
mov eax, dword [ecx + 0x214]
call eax
mov eax, dword [esi + 4]
mov ecx, dword [eax]
lea edx, [esp + 0x34]
push edx
push edi
push eax
mov eax, dword [ecx + 0x218]
call eax
sub ebp, 1
jne 0x54c8a8
lea ecx, [esp + 0x40c]
push ecx
lea ecx, [esp + 0x74]
call fcn.00520e10
lea edx, [esp + 0x40c]
push edx
lea ecx, [esp + 0x74]
call fcn.00520e10
cmp eax, 0xffffffff
jne 0x54c3b6
lea ecx, [esp + 0x70]
call fcn.00520350
mov esi, dword [esi + 8]
lea ecx, [esp + 0x70]
mov dword [esp + 0xc18], 0xffffffff
call fcn.005207d0
mov eax, esi
mov ecx, dword [esp + 0xc10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xbf8]
xor ecx, esp
call fcn.005997a8
add esp, 0xc08
ret 4