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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a759b
mov eax, dword fs:[0]
push eax
sub esp, 0x74
push ebx
push ebp
push esi
push edi
mov eax, dword [0x691844]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x14], ebx
jne 0x55670b
push str.____mapDesc__NULL____
push 0x68e51c
call fcn.0051f340
add esp, 8
mov eax, dword [esi + 0x14]
add eax, 0x1d8
cmp byte [eax], bl
je 0x55675a
push ebx
push 4
push ebx
lea edi, [esi + 0x17350]
push eax
mov ecx, edi
call fcn.0054ee80
mov eax, dword [esi + 0x14]
fld dword [eax + 0x218]
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.0054e780
fld dword [0x5c1a94]
sub esp, 8
fstp dword [esp + 4]
mov ecx, 0x6e4470
fldz
fstp dword [esp]
push edi
call fcn.0055ce70
mov edx, dword [esi + 0x14]
mov ecx, dword [0x5e50ac]
mov eax, dword [edx + 0x184]
mov ecx, dword [ecx + 8]
push eax
call fcn.0054a430
mov ecx, dword [0x5e50ac]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 8]
fld dword [eax + 4]
mov edx, dword [eax]
push ecx
fstp dword [esp]
push edx
call fcn.0054a440
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0xb4]
mov eax, dword [0x6cb158]
mov dword [0x6cb15c], ecx
mov edx, dword [eax]
push eax
mov eax, dword [edx + 0x18]
call eax
mov edx, dword [esi + 0x14]
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 [esi + 0x14]
mov eax, dword [0x6cb158]
push eax
cmp dword [ecx + 0x30], ebx
je 0x5567ff
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 [0x6cb158]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
push eax
call edx
mov edx, dword [esi + 0x14]
mov ecx, dword [eax]
push ebx
add edx, 0x20
push edx
push eax
mov eax, dword [ecx + 0xa0]
call eax
jmp 0x556812
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 [0x6cb158]
fst dword [esp + 0x50]
push eax
fst dword [esp + 0x58]
fstp dword [esp + 0x5c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
call edx
mov ecx, dword [esi + 0x14]
fld dword [ecx + 0x1c]
mov edx, dword [eax]
fdiv qword [0x5b0bc0]
mov edx, dword [edx + 0x88]
push ebx
sub esp, 0xc
fmul qword [0x5b0bc8]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fstp dword [esp + 8]
fld dword [ecx + 0x18]
lea ecx, [esp + 0x60]
fstp dword [esp + 4]
fld dword [0x5af454]
fstp dword [esp]
push ecx
push eax
call edx
mov eax, dword [esi + 0x14]
fld dword [eax + 0x18]
push str.AUDIOMGR__PlayBGM
fstp dword [0x6e4a1c]
push 0x68e51c
fldz
fstp dword [0x6e4a18]
mov ecx, dword [esi + 0x14]
fld dword [ecx + 0x1c]
fdiv qword [0x5b0bc0]
fmul qword [0x5b0bc8]
fstp dword [0x6e4a20]
call fcn.0051f340
mov edx, dword [esi + 0x14]
movzx eax, word [edx + 0x138]
add esp, 8
push eax
mov ecx, 0x6cce50
call fcn.005502d0
push 0x5c2328
push 0x68e51c
call fcn.0051f340
mov eax, dword [0x6cb158]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
add esp, 8
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 + 0x6c], eax
mov dword [esp + 0x70], eax
mov eax, dword [esi + 0x14]
add eax, 8
mov dword [esp + 0x68], ebx
fld dword [eax]
fld qword [0x5b1020]
fmul st(1), st(0)
fxch st(1)
fstp dword [esp + 0x3c]
fld dword [eax + 4]
fmul st(1)
fstp dword [esp + 0x40]
mov ecx, dword [esp + 0x40]
fmul dword [eax + 8]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
fstp dword [esp + 0x44]
mov edx, dword [esp + 0x44]
mov eax, dword [0x6cb158]
mov dword [esp + 0x7c], edx
mov dword [esp + 0x80], 1
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
push eax
call edx
mov ecx, dword [eax]
push ebx
lea edx, [esp + 0x6c]
push edx
push eax
mov eax, dword [ecx + 0xac]
call eax
cmp byte [0x6c9e90], 2
jne 0x5569c3
fldz
lea ecx, [esi + 0x17420]
fst dword [esp + 0x3c]
push ecx
fst dword [esp + 0x44]
fstp dword [esp + 0x48]
call dword [sym.imp.SS3DGFunc.dll__VECTOR3Length_4]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
sub esp, 8
fadd qword [0x5b7c68]
lea edx, [esp + 0x44]
lea eax, [esp + 0x58]
lea ecx, [esi + 0x173e8]
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
fstp dword [esp + 4]
fld dword [0x5c2324]
fstp dword [esp]
push edx
push eax
push ebx
call fcn.0054b950
mov ecx, dword [esi + 0x14]
cmp dword [ecx + 0x140], ebx
je 0x5569fe
push 0xc
mov ecx, 0x6e4cb0
call fcn.0056c960
mov edx, dword [esi + 0x14]
push ebx
push 4
push ebx
add edx, 0x144
push edx
lea ecx, [esi + 0x172b8]
call fcn.0054ee80
push ebx
mov ecx, 0x6e4cb0
call fcn.0056c960
mov eax, dword [esi + 0x14]
cmp dword [eax + 0x1cc], ebx
je 0x556c26
add eax, 0x18c
push eax
call fcn.0054d580
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0x1d4]
mov edx, dword [eax + 0x1d0]
push ecx
push edx
call fcn.0054d3a0
fld dword [0x5b4e08]
fstp dword [esp + 0x68]
lea eax, [esp + 0x68]
fldz
push eax
fstp dword [esp + 0x70]
fld dword [0x5b9a3c]
fstp dword [esp + 0x74]
call fcn.0054d380
add esp, 0x10
cmp dword [0x6cb224], ebx
jne 0x556a70
push ebx
push 0x17c
push str..MHMap.cpp
call fcn.00527110
add esp, 0xc
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx + 0x1cc]
fild dword [ecx + 0x1cc]
test edx, edx
jge 0x556a89
fadd qword [0x5b4460]
call sub.MSVCR90.dll__CIsqrt
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
fldcw word [esp + 0x28]
fistp qword [esp + 0x34]
mov eax, dword [esp + 0x34]
mov ecx, eax
mov dword [esp + 0x34], ecx
fldcw word [esp + 0x18]
mov dword [esp + 0x28], eax
fild dword [esp + 0x34]
test ecx, ecx
jge 0x556acc
fadd dword [0x5af1c8]
fdivr qword [0x5b5598]
mov dword [esp + 0x20], ebx
fstp dword [esp + 0x1c]
cmp eax, ebx
jbe 0x556c26
fld dword [esp + 0x1c]
mov edi, dword [sym.imp.MSVCR90.dll_rand]
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x2c], eax
add esi, 0x173f8
fldcw word [esp + 0x2c]
fistp qword [esp + 0x34]
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x34], esi
fldcw word [esp + 0x18]
mov dword [esp + 0x18], ebx
jmp 0x556b24
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
fild dword [esp + 0x20]
xor esi, esi
test edx, edx
jge 0x556b38
fadd dword [0x5af1c8]
fmul dword [esp + 0x1c]
fstp qword [esp + 0x3c]
jmp 0x556b46
mov ebx, dword [esp + 0x18]
push 0xa8
call fcn.00599902
add esp, 4
mov dword [esp + 0x30], eax
xor ebp, ebp
mov dword [esp + 0x90], ebp
cmp eax, ebp
je 0x556b6d
mov ecx, eax
call fcn.0054d350
mov ebp, eax
mov dword [esp + 0x90], 0xffffffff
call edi
xor edx, edx
div ebx
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
test edx, edx
jge 0x556b90
fadd dword [0x5af1c8]
fadd qword [esp + 0x3c]
fstp dword [esp + 0x30]
call edi
xor edx, edx
div ebx
mov dword [esp + 0x2c], edx
fild dword [esp + 0x2c]
test edx, edx
jge 0x556bb0
fadd dword [0x5af1c8]
mov eax, esi
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
test eax, eax
jge 0x556bc4
fadd dword [0x5af1c8]
fmul dword [esp + 0x1c]
mov ebx, dword [0x6cb224]
sub esp, 8
faddp st(1)
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp + 4]
fld dword [esp + 0x38]
fstp dword [esp]
call edi
xor edx, edx
div ebx
mov ecx, ebp
push edx
call fcn.0054d740
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
push ebx
push ebp
call fcn.00556610
inc ebx
inc esi
mov dword [esp + 0x24], ebx
cmp esi, dword [esp + 0x28]
jb 0x556b42
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x28]
jb 0x556b20
push str.Apply_MapDesc_Ends
push 0x68e51c
call fcn.0051f340
add esp, 8
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret