Function at 0x405250
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 0x40568b
push ebx
push ebp
push edi
push 0x2000
call fcn.004b2d7a
push 0x2000
mov dword [esi + 0xe4], eax
call fcn.004b2d7a
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 [0x4c4af0]
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 0x40528d
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.0040bc10
mov ecx, dword [esi + 0x7c]
mov ebx, eax
imul ecx, dword [esi + 0x78]
shl ecx, 2
push ecx
call fcn.004b2d7a
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 0x4053d9
jmp 0x40532e
mov edi, dword [esp + 0x18]
fild dword [esp + 0x10]
fmul st(1)
fsubr st(2)
fsub qword [0x4c4a80]
call fcn.004989f0
cmp eax, edi
jle 0x405348
lea eax, [edi - 1]
test eax, eax
jge 0x40534e
xor eax, eax
xor edi, edi
test ebp, ebp
mov dword [esp + 0x1c], edi
jle 0x4053c5
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 [0x4c4a80]
call fcn.004989f0
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jle 0x405388
lea eax, [ecx - 1]
test eax, eax
jge 0x40538e
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 0x40536a
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x7c]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x40532a
mov eax, dword [esi + 0x88]
fstp st(0)
fstp st(0)
fstp st(0)
cmp eax, 3
fstp st(0)
jne 0x405491
push 0x100
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004b2d7a
mov ecx, dword [esi + 0x7c]
mov dword [esi + 0xd8], eax
imul ecx, dword [esi + 0x78]
push ecx
call fcn.004b2d7a
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.00405690
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.0040b190
mov ebx, dword [esi + 0x7c]
mov ecx, edi
imul ebx, dword [esi + 0x78]
shl ebx, 2
call fcn.0040bc10
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 0x40553f
push 0x100
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004b2d7a
mov dword [esi + 0xd8], eax
mov eax, dword [esi + 0x7c]
imul eax, dword [esi + 0x78]
push eax
call fcn.004b2d7a
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.00404020
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.0040b190
mov ebx, dword [esi + 0x7c]
mov ecx, edi
imul ebx, dword [esi + 0x78]
shl ebx, 2
call fcn.0040bc10
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 0x40561b
push 0x100
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004b2d7a
mov dword [esi + 0xd8], eax
mov eax, dword [esi + 0x7c]
imul eax, dword [esi + 0x78]
push eax
call fcn.004b2d7a
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.00403d50
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 0x4055ad
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.0040b190
mov ebx, dword [esi + 0x7c]
mov ecx, edi
imul ebx, dword [esi + 0x78]
shl ebx, 2
call fcn.0040bc10
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 0x405662
push 0x100
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd0], eax
call fcn.004b2d7a
push 0x100
mov dword [esi + 0xd4], eax
call fcn.004b2d7a
add esp, 0xc
mov ecx, esi
mov dword [esi + 0xd8], eax
call fcn.00404020
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 0x40568b
mov dword [esi + 0xb0], eax
pop esi
add esp, 0x14
ret