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

Disassembly:
sub esp, 0xf0
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3520]
test eax, eax
je 0x4d57f1
mov eax, dword [esi + 0x33b8]
mov byte [esi + 0x37c1], 1
mov ecx, dword [esi + eax*4 + 0x3398]
test ecx, ecx
je 0x4d5891
push 0x3dcccccd
call fcn.00533ca0
mov ecx, dword [esi + 0x33b8]
inc ecx
and ecx, 3
mov dword [esi + 0x33b8], ecx
jmp 0x4d5891
mov al, byte [esi + 0x37c1]
test al, al
je 0x4d5809
mov byte [esi + 0x37c1], 0
mov byte [esi + 0x37c0], 1
mov al, byte [esi + 0x37c0]
test al, al
je 0x4d5891
mov edx, dword [esi + 0x33b8]
mov byte [esi + 0x37c0], 0
mov ecx, dword [esi + edx*4 + 0x3398]
test ecx, ecx
je 0x4d5845
push 0x3e4ccccd
call fcn.00533ca0
mov eax, dword [esi + 0x33b8]
inc eax
and eax, 3
mov dword [esi + 0x33b8], eax
mov ecx, dword [esi + 0x33b8]
mov eax, dword [esi + ecx*4 + 0x3398]
test eax, eax
je 0x4d5862
mov ecx, dword [0xab4b78]
push eax
call fcn.00470e00
mov edx, dword [esi + 0x37bc]
push edx
call fcn.00535ef0
mov ecx, dword [esi + 0x33b8]
add esp, 4
mov dword [esi + ecx*4 + 0x3398], eax
mov edx, dword [esi + 0x33b8]
mov eax, dword [esi + 0x37bc]
mov dword [esi + edx*4 + 0x33a8], eax
lea edi, [esp + 0x28]
mov ebx, 4
mov ecx, edi
call fcn.00402a70
add edi, 0x10
dec ebx
jne 0x4d589a
fld qword [0x58b090]
fcos
mov edi, dword [esi + 0x634]
push fcn.00402a70
push 4
lea ecx, [esp + 0xb8]
push 0x10
push ecx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0x3f800000
mov dword [esp + 0x38], 0xbf800000
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0x3f800000
mov dword [esp + 0x48], 0
mov dword [esp + 0x54], 0x3f800000
mov dword [esp + 0x58], 0
mov dword [esp + 0x64], 0x3f800000
add edi, 0x40
fst dword [esp + 0x4c]
fld qword [0x58b090]
fsin
fst dword [esp + 0x50]
fstp dword [esp + 0x5c]
fchs
fstp dword [esp + 0x60]
call fcn.00404450
lea edx, [esp + 0x28]
lea ecx, [esp + 0xb0]
push edx
call fcn.00403a00
push edi
lea ecx, [esp + 0xb4]
call fcn.00403b00
push fcn.00402a70
push 4
lea eax, [esp + 0x78]
push 0x10
push eax
call fcn.00404450
lea ecx, [esp + 0xb0]
push ecx
lea ecx, [esp + 0x74]
call fcn.00403a00
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x7c]
lea eax, [esp + 0x80]
mov dword [esp + 0x30], ecx
push eax
lea ecx, [esp + 0x3c]
mov dword [esp + 0x38], edx
call fcn.00499d60
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x4c]
call fcn.00499d60
lea edx, [esp + 0xa0]
lea ecx, [esp + 0x58]
push edx
call fcn.00499d60
lea edi, [esi + 0x3398]
mov dword [esp + 0x14], 4
mov ecx, dword [edi]
test ecx, ecx
je 0x4d5ba3
call fcn.00471240
test al, al
je 0x4d5a17
mov eax, dword [edi]
mov ecx, dword [0xab4b78]
push eax
call fcn.00470e00
mov dword [edi], 0
jmp 0x4d5ba3
mov ecx, dword [esi + 0x634]
push ecx
mov ecx, dword [edi]
call fcn.004711f0
mov ecx, dword [edi]
lea edx, [esp + 0x28]
push edx
call fcn.00533ca0
mov eax, dword [edi + 0x10]
push eax
call fcn.004aad00
mov ecx, eax
add esp, 4
mov dword [esp + 0x10], ecx
fld dword [ecx + 0x34]
fcomp dword [0x589284]
fnstsw ax
test ah, 0x44
jnp 0x4d5b28
fld dword [ecx + 0x34]
fchs
fstp dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0x3f800000
lea ebp, [esp + 0xb0]
mov ebx, 4
mov ecx, ebp
call fcn.00402a70
add ebp, 0x10
dec ebx
jne 0x4d5a84
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0xb4]
call fcn.00403f20
lea ecx, [esp + 0x28]
call fcn.00403d60
fcom dword [0x589288]
fnstsw ax
test ah, 0x44
jnp 0x4d5ad4
fld dword [0x589288]
fdiv st(1)
push ecx
lea ecx, [esp + 0xb4]
fstp dword [esp]
fstp st(0)
call fcn.00404ca0
jmp 0x4d5ad6
fstp st(0)
lea edx, [esp + 0xb0]
lea ecx, [esp + 0x28]
push edx
call fcn.00403a00
lea eax, [esp + 0x18]
lea ecx, [esp + 0xf0]
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.0041fdc0
mov edx, dword [eax]
mov dword [esp + 0x18], edx
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov edx, dword [eax + 8]
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], edx
mov eax, dword [eax + 0xc]
push ecx
mov ecx, dword [edi]
mov dword [esp + 0x28], eax
call fcn.00471210
mov ecx, dword [esp + 0x10]
fld dword [esi + 0x53c]
fld dword [esi + 0x538]
fld dword [esi + 0x534]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
mov ecx, dword [ecx]
faddp st(1)
fld st(3)
fmul st(4)
faddp st(1)
fsqrt
fstp st(3)
fstp st(0)
fstp st(0)
fst dword [esp + 0x10]
fcomp dword [0x58af98]
fnstsw ax
test ah, 5
jp 0x4d5b69
xor ecx, ecx
jmp 0x4d5b9b
fld dword [esp + 0x10]
fcomp dword [0x58afc0]
fnstsw ax
test ah, 5
jp 0x4d5b9b
fld dword [esp + 0x10]
fmul dword [0x5892e0]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], 0
fimul dword [esp + 0x68]
call fcn.005749d0
mov ecx, eax
push ecx
mov ecx, dword [edi]
call fcn.00533ca0
mov eax, dword [esp + 0x14]
add edi, 4
dec eax
mov dword [esp + 0x14], eax
jne 0x4d59eb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf0
ret