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

Disassembly:
sub esp, 0x14
push esi
mov esi, ecx
mov eax, dword [esi + 0x74]
test eax, eax
je 0x4059db
push ebx
push ebp
push edi
push 0x2000
call fcn.004d8aef
push 0x2000
mov dword [esi + 0xe4], eax
call fcn.004d8aef
add esp, 8
mov dword [esi + 0xe0], eax
xor eax, eax
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
mov edi, dword [esi + 0xe4]
lea ecx, [eax*8]
mov edx, ecx
fmul qword [0x4eab40]
add edx, edi
inc eax
cmp eax, 0x400
mov dword [esp + 0x14], eax
fld st(0)
fsin
fstp qword [edx]
mov edx, dword [esi + 0xe0]
fcos
fstp qword [edx + ecx]
jl 0x4055dd
mov eax, dword [esi + 0x50]
mov edi, dword [esi + 0x54]
lea ecx, [esi + 0x3c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edi
call fcn.0040a8a0
mov ecx, dword [esi + 0x7c]
mov ebx, eax
imul ecx, dword [esi + 0x78]
shl ecx, 2
push ecx
call fcn.004d8aef
mov ebp, dword [esi + 0x78]
mov dword [esi + 0xdc], eax
fild dword [esp + 0x18]
mov eax, dword [esi + 0x7c]
mov dword [esp + 0x20], ebp
fild dword [esp + 0x20]
mov dword [esp + 0x20], eax
add esp, 4
test eax, eax
fdivr st(1)
mov dword [esp + 0x10], 0
fild dword [esp + 0x18]
fild dword [esp + 0x1c]
fdivr st(1)
jle 0x405729
jmp 0x40567e
mov edi, dword [esp + 0x18]
fild dword [esp + 0x10]
fmul st(1)
fsubr st(2)
fsub qword [0x4eaad0]
call fcn.004bfae0
cmp eax, edi
jle 0x405698
lea eax, [edi - 1]
test eax, eax
jge 0x40569e
xor eax, eax
xor edi, edi
test ebp, ebp
mov dword [esp + 0x1c], edi
jle 0x405715
mov edx, dword [esp + 0x14]
lea ecx, [edx*4]
imul eax, ecx
mov dword [esp + 0x20], eax
fild dword [esp + 0x1c]
fmul st(3)
fsubr st(4)
fsub qword [0x4eaad0]
call fcn.004bfae0
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jle 0x4056d8
lea eax, [ecx - 1]
test eax, eax
jge 0x4056de
xor eax, eax
mov ecx, dword [esp + 0x20]
imul ebp, dword [esp + 0x10]
lea eax, [ecx + eax*4]
xor edx, edx
xor ecx, ecx
add ebp, edi
mov dh, byte [ebx + eax + 2]
mov cl, byte [eax + ebx]
mov dl, byte [ebx + eax + 1]
mov eax, dword [esi + 0xdc]
shl edx, 8
or edx, ecx
inc edi
mov dword [eax + ebp*4], edx
mov ebp, dword [esi + 0x78]
cmp edi, ebp
mov dword [esp + 0x1c], edi
jl 0x4056ba
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x7c]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x40567a
mov eax, dword [esi + 0x88]
fstp st(0)
fstp st(0)
fstp st(0)
cmp eax, 3
fstp st(0)
jne 0x4057e1
push 0x100
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004d8aef
mov ecx, dword [esi + 0x7c]
mov dword [esi + 0xd8], eax
imul ecx, dword [esi + 0x78]
push ecx
call fcn.004d8aef
mov ecx, dword [esi + 0x7c]
mov edi, eax
imul ecx, dword [esi + 0x78]
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esi + 0xc8], edi
add esp, 0x10
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, esi
call fcn.004059e0
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x78]
push 0
push 0x20
lea edi, [esi + 4]
push eax
push ecx
mov ecx, edi
call fcn.00409e20
mov ebx, dword [esi + 0x7c]
mov ecx, edi
imul ebx, dword [esi + 0x78]
shl ebx, 2
call fcn.0040a8a0
mov ecx, ebx
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esi + 0x88], 4
jne 0x40588f
push 0x100
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004d8aef
mov dword [esi + 0xd8], eax
mov eax, dword [esi + 0x7c]
imul eax, dword [esi + 0x78]
push eax
call fcn.004d8aef
mov ecx, dword [esi + 0x7c]
mov edi, eax
imul ecx, dword [esi + 0x78]
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esi + 0xc8], edi
add esp, 0x10
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, esi
call fcn.00404370
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x78]
push 0
push 0x20
lea edi, [esi + 4]
push eax
push ecx
mov ecx, edi
call fcn.00409e20
mov ebx, dword [esi + 0x7c]
mov ecx, edi
imul ebx, dword [esi + 0x78]
shl ebx, 2
call fcn.0040a8a0
mov ecx, ebx
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esi + 0x88], 5
jne 0x40596b
push 0x100
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004d8aef
mov dword [esi + 0xd8], eax
mov eax, dword [esi + 0x7c]
imul eax, dword [esi + 0x78]
push eax
call fcn.004d8aef
mov ecx, dword [esi + 0x7c]
mov edi, eax
imul ecx, dword [esi + 0x78]
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esi + 0xc8], edi
add esp, 0x10
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
push edi
mov ecx, esi
call fcn.004040a0
mov edx, dword [esi + 0xd0]
xor ecx, ecx
mov cl, ah
mov byte [edx + edi], cl
mov ecx, dword [esi + 0xd4]
mov byte [ecx + edi], al
mov edx, dword [esi + 0xd8]
shr eax, 0x10
mov byte [edx + edi], al
inc edi
cmp edi, 0x100
jl 0x4058fd
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x78]
push 0
push 0x20
lea edi, [esi + 4]
push eax
push ecx
mov ecx, edi
call fcn.00409e20
mov ebx, dword [esi + 0x7c]
mov ecx, edi
imul ebx, dword [esi + 0x78]
shl ebx, 2
call fcn.0040a8a0
mov ecx, ebx
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 0x88]
pop edi
pop ebp
pop ebx
test eax, eax
jne 0x4059b2
push 0x100
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004d8aef
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004d8aef
add esp, 0xc
mov ecx, esi
mov dword [esi + 0xd8], eax
call fcn.00404370
mov ecx, dword [esi + 0xb0]
xor eax, eax
mov dword [esi + 0x94], eax
mov dword [esi + 0x98], eax
mov dword [esi + 0x9c], eax
mov eax, 1
cmp ecx, eax
jge 0x4059db
mov dword [esi + 0xb0], eax
pop esi
add esp, 0x14
ret