Function at 0x54fac0
Capabilities:
Resolve function by parsing pe exports
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x57f732
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x5b107c]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov eax, dword [0x5b107c]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [0x69aadc], ebx
jne 0x54fb0e
push str.____mapDesc__NULL____
call fcn.00527920
add esp, 4
mov edi, dword [0x69aadc]
add edi, 0x1d8
cmp byte [edi], bl
je 0x54fd05
mov dword [0x69ad84], ebx
cmp dword [0x69ad6c], ebx
jne 0x54fb3a
mov dword [0x69ad7c], 1
mov eax, dword [0x69ad58]
mov edx, dword [eax + 4]
mov ecx, 0x69ad58
call edx
mov esi, 0xa
mov byte [0x69ad80], bl
mov dword [0x69ad70], ebx
mov dword [0x69ad68], ebx
cmp dword [0x6573f0], esi
je 0x54fb7a
mov eax, dword [0x6573d0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], esi
mov eax, dword [0x65fadc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x188]
push edi
push eax
call edx
push 0x69ad58
mov ecx, 2
mov ebx, edi
call fcn.0054af90
mov dword [0x69ad6c], eax
test eax, eax
jne 0x54fc00
push 0x5948e0
push str.._Log_MissedObjectList.txt
call dword [sym.imp.MSVCR100.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x54fbd8
push edi
push 0x596998
push ebx
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
cmp dword [0x6573f0], 0
je 0x54fcb3
mov eax, dword [0x6573a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], 0
jmp 0x54fcb3
push 0
mov ecx, 0x69ad58
call fcn.0054a700
mov esi, dword [0x69ad6c]
call fcn.00549110
test eax, eax
jne 0x54fc22
mov edx, esi
call fcn.00549280
cmp dword [0x6573f0], 0
mov dword [0x69ad94], eax
je 0x54fc47
mov ecx, dword [0x6573a8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], 0
cmp dword [0x69ad7c], 0xffffffff
jne 0x54fc61
push 1
mov ecx, 1
mov esi, 0x69ad58
call fcn.0054a4a0
mov esi, dword [0x69ad6c]
test esi, esi
je 0x54fcb3
mov ecx, dword [0x69ad7c]
mov edx, dword [0x69ad94]
call fcn.00548ff0
mov ecx, dword [0x65fadc]
mov dword [0x69ad90], eax
movzx eax, word [eax]
mov edx, dword [ecx]
push eax
push esi
push ecx
mov ecx, dword [edx + 0x44]
call ecx
mov ecx, dword [0x69ad90]
movzx ecx, word [ecx + 2]
mov eax, dword [0x65fadc]
mov edx, dword [eax]
mov edx, dword [edx + 0x40]
push ecx
mov ecx, dword [0x69ad6c]
push ecx
push eax
call edx
mov eax, dword [0x69aadc]
mov ecx, dword [0x69ad6c]
fld dword [eax + 0x218]
fstp dword [esp + 0x10]
test ecx, ecx
je 0x54fce5
mov eax, dword [0x65fadc]
fld dword [esp + 0x10]
mov edx, dword [eax]
push ecx
fstp dword [esp]
push ecx
push eax
mov eax, dword [edx + 0xe0]
call eax
fldz
mov dword [0x69ae40], 0x69ad58
fstp dword [0x69ae44]
xor ebx, ebx
fld dword [0x599070]
fstp dword [0x69ae48]
call fcn.0041c260
mov ecx, dword [eax + 8]
mov edx, dword [0x69aadc]
mov eax, dword [edx + 0x184]
mov dword [ecx + 4], eax
mov dword [0x65f90c], eax
mov eax, dword [0x69aadc]
mov ecx, dword [eax]
fld dword [eax + 4]
mov edx, dword [eax + 0xb4]
fstp dword [esp + 0x10]
mov eax, dword [0x65fadc]
fld dword [esp + 0x10]
mov dword [0x65fae8], ecx
fstp dword [0x65faec]
mov ecx, dword [eax]
mov dword [0x65fae0], edx
mov edx, dword [ecx + 0x18]
push eax
call edx
mov edx, dword [0x69aadc]
mov edx, dword [edx + 0x14]
mov ecx, dword [eax]
push edx
push ebx
push eax
mov eax, dword [ecx + 0xd4]
call eax
mov ecx, dword [0x69aadc]
mov eax, dword [0x65fadc]
push eax
cmp dword [ecx + 0x30], ebx
je 0x54fdb7
mov edx, dword [eax]
mov eax, dword [edx + 0x18]
call eax
mov ecx, dword [eax]
mov edx, dword [ecx + 0xa4]
push ebx
push eax
call edx
mov eax, dword [0x65fadc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
push eax
call edx
mov edx, dword [0x69aadc]
mov ecx, dword [eax]
push ebx
add edx, 0x20
push edx
push eax
mov eax, dword [ecx + 0xa0]
call eax
jmp 0x54fdca
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
call edx
mov ecx, dword [eax]
mov edx, dword [ecx + 0xa8]
push ebx
push eax
call edx
fldz
mov eax, dword [0x65fadc]
fst dword [esp + 0x30]
push eax
fst dword [esp + 0x38]
fstp dword [esp + 0x3c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
call edx
mov ecx, dword [0x69aadc]
fld dword [ecx + 0x1c]
mov edx, dword [eax]
fdiv qword [0x598de0]
mov edx, dword [edx + 0x88]
push ebx
sub esp, 0xc
fmul qword [0x598dd8]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fstp dword [esp + 8]
fld dword [ecx + 0x18]
lea ecx, [esp + 0x40]
fstp dword [esp + 4]
fld dword [0x65b538]
fstp dword [esp]
push ecx
push eax
call edx
mov eax, dword [0x69aadc]
fld dword [eax + 0x18]
push str.AUDIOMGR__PlayBGM
fstp dword [0x69b3ec]
fldz
fstp dword [0x69b3e8]
fld dword [eax + 0x1c]
fdiv qword [0x598de0]
fmul qword [0x598dd8]
fstp dword [0x69b3f0]
call fcn.00527920
mov eax, dword [0x69aadc]
mov si, word [eax + 0x138]
add esp, 4
call fcn.0054b600
push str.AUDIOMGR__PlayBGM_End
call fcn.00527920
mov eax, dword [0x65fadc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
add esp, 4
push eax
call edx
mov ecx, dword [eax]
mov edx, dword [ecx + 0xb4]
push ebx
push eax
call edx
or eax, 0xffffffff
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov eax, dword [0x69aadc]
mov dword [esp + 0x3c], ebx
fld dword [eax + 8]
fld qword [0x598db8]
fmul st(1), st(0)
fxch st(1)
fstp dword [esp + 0x14]
fld dword [eax + 0xc]
fmul st(1)
fstp dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
fmul dword [eax + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x48], eax
mov eax, dword [0x65fadc]
fstp dword [esp + 0x1c]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], 1
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 0x18]
call edx
mov ecx, dword [eax]
push ebx
lea edx, [esp + 0x40]
push edx
push eax
mov eax, dword [ecx + 0xac]
call eax
cmp byte [0x6981a8], 2
jne 0x54ff67
fldz
push 0x69ae28
fst dword [esp + 0x18]
fst dword [esp + 0x1c]
fstp dword [esp + 0x20]
call dword [sym.imp.SS3DGFunc.dll__VECTOR3Length_4]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
sub esp, 8
fadd qword [0x598e10]
lea ecx, [esp + 0x38]
mov esi, 0x69adf0
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fstp dword [esp + 4]
fld dword [0x5992f0]
fstp dword [esp]
push ecx
lea ecx, [esp + 0x20]
call fcn.00547b60
mov edx, dword [0x69aadc]
cmp dword [edx + 0x140], ebx
je 0x550149
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edi, 0xc
cmp dword [0x6573f0], edi
je 0x54ff9a
mov eax, dword [0x6573d8]
push eax
call esi
mov dword [0x6573f0], edi
mov edi, dword [0x69aadc]
add edi, 0x144
mov dword [0x69acec], ebx
cmp dword [0x69acd4], ebx
jne 0x54ffbe
mov dword [0x69ace4], 1
mov edx, dword [0x69acc0]
mov eax, dword [edx + 4]
mov ecx, 0x69acc0
call eax
mov byte [0x69ace8], bl
mov dword [0x69acd8], ebx
mov dword [0x69acd0], ebx
mov ebx, 0xa
cmp dword [0x6573f0], ebx
je 0x54fffc
mov ecx, dword [0x6573d0]
push ecx
call esi
mov dword [0x6573f0], ebx
mov eax, dword [0x65fadc]
mov edx, dword [eax]
push edi
push eax
mov eax, dword [edx + 0x188]
call eax
push 0x69acc0
mov ecx, 2
mov ebx, edi
call fcn.0054af90
mov dword [0x69acd4], eax
test eax, eax
jne 0x550075
push 0x5948e0
push str.._Log_MissedObjectList.txt
call dword [sym.imp.MSVCR100.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x55005a
push edi
push 0x596998
push ebx
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
cmp dword [0x6573f0], 0
je 0x550147
mov ecx, dword [0x6573a8]
push ecx
call esi
jmp 0x55013d
push 0
mov ecx, 0x69acc0
call fcn.0054a700
mov esi, dword [0x69acd4]
call fcn.00549110
test eax, eax
jne 0x550097
mov edx, esi
call fcn.00549280
cmp dword [0x6573f0], 0
mov dword [0x69acfc], eax
je 0x5500bc
mov edx, dword [0x6573a8]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], 0
cmp dword [0x69ace4], 0xffffffff
jne 0x5500d6
push 1
mov ecx, 1
mov esi, 0x69acc0
call fcn.0054a4a0
mov edi, dword [0x69acd4]
test edi, edi
je 0x550128
mov ecx, dword [0x69ace4]
mov edx, dword [0x69acfc]
call fcn.00548ff0
mov ecx, dword [0x65fadc]
mov dword [0x69acf8], eax
movzx eax, word [eax]
mov edx, dword [ecx]
push eax
push edi
push ecx
mov ecx, dword [edx + 0x44]
call ecx
mov ecx, dword [0x69acf8]
movzx ecx, word [ecx + 2]
mov eax, dword [0x65fadc]
mov edx, dword [eax]
mov edx, dword [edx + 0x40]
push ecx
mov ecx, dword [0x69acd4]
push ecx
push eax
call edx
cmp dword [0x6573f0], 0
je 0x550147
mov eax, dword [0x6573a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], 0
xor ebx, ebx
mov eax, dword [0x69aadc]
cmp dword [eax + 0x1cc], ebx
je 0x550317
lea ecx, [eax + 0x18c]
call fcn.00549300
fld dword [0x598d70]
mov eax, dword [0x69aadc]
fstp dword [esp + 0x14]
mov ecx, dword [eax + 0x1d4]
fldz
mov edx, dword [eax + 0x1d0]
fstp dword [esp + 0x18]
fld dword [0x598f58]
mov dword [0x65f93c], ecx
mov ecx, dword [esp + 0x14]
fstp dword [esp + 0x1c]
mov dword [0x65f938], edx
mov edx, dword [esp + 0x18]
mov dword [0x65f940], ecx
mov ecx, dword [esp + 0x1c]
mov dword [0x65f944], edx
mov dword [0x65f948], ecx
cmp dword [0x65f94c], ebx
jne 0x5501db
push str.MHMap.cpp
xor ecx, ecx
mov edx, 0x16a
call fcn.0052cb10
mov eax, dword [0x69aadc]
add esp, 4
mov edx, dword [eax + 0x1cc]
fild dword [eax + 0x1cc]
test edx, edx
jns 0x5501f1
fadd qword [0x598e40]
call sub.MSVCR100.dll__CIsqrt
fnstcw word [esp + 0x24]
movzx eax, word [esp + 0x24]
or eax, 0xc00
mov dword [esp + 0x10], eax
fldcw word [esp + 0x10]
fistp qword [esp + 0x14]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], eax
fldcw word [esp + 0x24]
mov dword [esp + 0x24], ebx
cmp eax, ebx
jbe 0x550317
mov dword [esp + 0x10], eax
jmp 0x550234
mov eax, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
push 0xa8
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
mov dword [esp + 0x68], ebx
cmp esi, ebx
je 0x5502c2
mov dword [esi], vtable.CEngineObject.0
mov edx, 0xffff
push 0xa
lea ecx, [esi + 0x40]
mov dword [esi + 0x30], 1
mov word [esi + 0x34], dx
call fcn.00574250
push 0xa
lea ecx, [esi + 0x5c]
mov byte [esp + 0x6c], 1
call fcn.00574250
push 0xa
lea ecx, [esi + 0x78]
mov byte [esp + 0x6c], 2
call fcn.00574250
fld1
fstp dword [esi + 8]
mov dword [esi + 4], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x24], 0xffffffff
mov byte [esi + 0x28], bl
mov dword [esi + 0x20], 1
mov dword [esi + 0xc], ebx
mov dword [esi + 0x94], ebx
mov dword [esi], vtable.CEngineCloud.0
mov dword [esi + 0x3c], ebx
jmp 0x5502c4
xor esi, esi
mov dword [esp + 0x68], 0xffffffff
mov edi, dword [sym.imp.MSVCR100.dll_rand]
call edi
call edi
mov edi, dword [0x65f94c]
call dword [sym.imp.MSVCR100.dll_rand]
xor edx, edx
div edi
mov ecx, esi
call fcn.005495e0
mov edi, dword [esp + 0x24]
push esi
mov eax, edi
mov esi, 0x69ae00
call fcn.004eca80
inc edi
dec dword [esp + 0x2c]
mov dword [esp + 0x24], edi
jne 0x550238
dec dword [esp + 0x10]
jne 0x550230
push str.Apply_MapDesc_Ends
call fcn.00527920
add esp, 4
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.005762ee
mov esp, ebp
pop ebp
ret