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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55e2bb
mov eax, dword fs:[0]
push eax
sub esp, 0x74
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6397d4]
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 0x528d9b
push str.____mapDesc__NULL____
push 0x6366b0
call fcn.00504320
add esp, 8
mov eax, dword [esi + 0x14]
add eax, 0x1d8
cmp byte [eax], bl
je 0x528dea
push ebx
push 4
push ebx
lea edi, [esi + 0x29c]
push eax
mov ecx, edi
call fcn.005234c0
mov eax, dword [esi + 0x14]
fld dword [eax + 0x218]
push ecx
mov ecx, edi
fstp dword [esp]
call fcn.00522d60
fld dword [0x571584]
sub esp, 8
fstp dword [esp + 4]
mov ecx, 0x66d8e8
fldz
fstp dword [esp]
push edi
call fcn.00530320
mov edx, dword [esi + 0x14]
mov ecx, dword [0x58d064]
mov eax, dword [edx + 0x184]
mov ecx, dword [ecx + 8]
push eax
call fcn.0051fa80
mov ecx, dword [0x58d064]
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.0051fa90
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0xb4]
mov eax, dword [0x66b728]
mov dword [0x66b72c], 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]
cmp dword [ecx + 0x30], ebx
mov eax, dword [0x66b728]
push eax
je 0x528e8f
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 [0x66b728]
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 0x528ea2
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 [0x66b728]
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 [0x563de0]
mov edx, dword [edx + 0x88]
push ebx
sub esp, 0xc
fmul qword [0x563de8]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp + 8]
fld dword [ecx + 0x18]
lea ecx, [esp + 0x60]
fstp dword [esp + 4]
fld dword [0x562ae4]
fstp dword [esp]
push ecx
push eax
call edx
mov eax, dword [esi + 0x14]
fld dword [eax + 0x18]
push str.AUDIOMGR__PlayBGM
fstp dword [0x66de94]
push 0x6366b0
fldz
fstp dword [0x66de90]
mov ecx, dword [esi + 0x14]
fld dword [ecx + 0x1c]
fdiv qword [0x563de0]
fmul qword [0x563de8]
fstp dword [0x66de98]
call fcn.00504320
mov edx, dword [esi + 0x14]
movzx eax, word [edx + 0x138]
add esp, 8
push eax
mov ecx, 0x66d408
call fcn.00524080
push 0x571c60
push 0x6366b0
call fcn.00504320
mov eax, dword [0x66b728]
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 [0x5641c0]
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 [0x66b728]
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 [0x66a5d4], 2
jne 0x529053
fldz
lea ecx, [esi + 0x378]
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 + 0x24]
fld dword [esp + 0x24]
sub esp, 8
fadd qword [0x56a040]
lea edx, [esp + 0x44]
lea eax, [esp + 0x58]
lea ecx, [esi + 0x340]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp + 4]
fld dword [0x571c5c]
fstp dword [esp]
push edx
push eax
push ebx
call fcn.00520590
mov ecx, dword [esi + 0x14]
cmp dword [ecx + 0x140], ebx
je 0x52908e
push 0xc
mov ecx, 0x66e140
call fcn.0053dd20
mov edx, dword [esi + 0x14]
push ebx
push 4
push ebx
add edx, 0x144
push edx
lea ecx, [esi + 0x1f8]
call fcn.005234c0
push ebx
mov ecx, 0x66e140
call fcn.0053dd20
mov eax, dword [esi + 0x14]
cmp dword [eax + 0x1cc], ebx
je 0x5292c2
add eax, 0x18c
push eax
call fcn.00521e10
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0x1d4]
mov edx, dword [eax + 0x1d0]
push ecx
push edx
call fcn.00521c30
fld dword [0x567e78]
fstp dword [esp + 0x68]
lea eax, [esp + 0x68]
fldz
push eax
fstp dword [esp + 0x70]
fld dword [0x56b730]
fstp dword [esp + 0x74]
call fcn.00521c10
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx + 0x1cc]
fild dword [ecx + 0x1cc]
add esp, 0x10
test edx, edx
jge 0x5290fe
fadd qword [0x5673e8]
call sub.MSVCR80.dll__CIsqrt
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
or eax, 0xc00
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ebx
fldcw word [esp + 0x24]
fistp qword [esp + 0x34]
mov eax, dword [esp + 0x34]
mov ecx, eax
test ecx, ecx
fldcw word [esp + 0x14]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x24], eax
fild dword [esp + 0x30]
jge 0x529141
fadd dword [0x562930]
cmp eax, ebx
fdivr qword [0x567e60]
mov dword [esp + 0x18], ebx
fstp dword [esp + 0x1c]
jbe 0x5292c2
fld dword [esp + 0x1c]
mov edi, dword [sym.imp.MSVCR80.dll_rand]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
fld st(0)
or eax, 0xc00
mov dword [esp + 0x28], eax
add esi, 0x350
mov dword [esp + 0x30], esi
fldcw word [esp + 0x28]
fistp qword [esp + 0x34]
mov ebx, dword [esp + 0x34]
fldcw word [esp + 0x14]
mov dword [esp + 0x14], ebx
jmp 0x5291a8
fld qword [esp + 0x34]
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
fild dword [esp + 0x18]
xor esi, esi
test edx, edx
jge 0x5291bc
fadd dword [0x562930]
fmulp st(1)
fstp qword [esp + 0x3c]
jmp 0x5291d4
mov ebx, dword [esp + 0x14]
push 0xb4
call fcn.00551850
add esp, 4
mov dword [esp + 0x2c], eax
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x90], ebp
je 0x5291fb
mov ecx, eax
call fcn.00521bf0
mov ebp, eax
mov dword [esp + 0x90], 0xffffffff
call edi
xor edx, edx
div ebx
test edx, edx
mov dword [esp + 0x2c], edx
fild dword [esp + 0x2c]
jge 0x52921e
fadd dword [0x562930]
fadd qword [esp + 0x3c]
fstp dword [esp + 0x2c]
fld dword [esp + 0x1c]
fstp qword [esp + 0x34]
call edi
xor edx, edx
div ebx
test edx, edx
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
jge 0x529246
fadd dword [0x562930]
mov eax, esi
test eax, eax
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
jge 0x52925a
fadd dword [0x562930]
fmul qword [esp + 0x34]
mov ebx, dword [0x66b7d8]
sub esp, 8
faddp st(1)
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
fstp dword [esp + 4]
fld dword [esp + 0x34]
fstp dword [esp]
call edi
xor edx, edx
div ebx
mov ecx, ebp
push edx
call fcn.00521fe0
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
push ebx
push ebp
call fcn.00547bc0
add ebx, 1
add esi, 1
cmp esi, dword [esp + 0x24]
mov dword [esp + 0x20], ebx
jb 0x5291d0
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, dword [esp + 0x24]
mov dword [esp + 0x18], eax
jb 0x5291a0
push str.Apply_MapDesc_Ends
push 0x6366b0
call fcn.00504320
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