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

Disassembly:
sub esp, 0x50
fld1
push ebx
fcom dword [esp + 0x60]
push ebp
push esi
push edi
mov edi, eax
mov eax, dword [edi]
mov eax, dword [eax]
mov edx, dword [eax + 4]
imul edx, dword [edi + 0xc]
add edx, dword [eax + 0x18]
fnstsw ax
mov dword [esp + 0x18], edx
test ah, 0x44
jp 0x401fc7
fcomp dword [esp + 0x70]
fnstsw ax
test ah, 0x44
jp 0x401fc9
mov ecx, dword [esp + 0x7c]
fld dword [esp + 0x78]
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x64]
push ecx
sub esp, 8
fstp dword [esp + 4]
fld dword [esp + 0x80]
fstp dword [esp]
push edx
push eax
call fcn.00401d70
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
fstp st(0)
xor ecx, ecx
cmp dword [edx + 4], ecx
mov dword [esp + 0x20], ecx
jle 0x4021f1
mov eax, dword [edx]
mov esi, dword [eax + 4]
imul esi, ecx
add esi, dword [eax + 0x18]
mov eax, dword [edi + 0x1c]
mov ecx, dword [esi]
dec eax
cmp eax, ecx
jl 0x4021d7
mov ebx, dword [esi + 4]
add ecx, ebx
cmp eax, ecx
jl 0x402003
cmp ebx, 0xffffffff
jne 0x4021d7
mov bl, byte [esp + 0x7c]
fild dword [esi + 0x10]
mov edx, 0
test bl, 1
fmul dword [esp + 0x74]
sete dl
sub esp, 8
lea edx, [edx + edx - 1]
mov dword [esp + 0x24], edx
fimul dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fadd qword [0x4a6ba0]
fstp qword [esp]
call sub.MSVCR90.dll_floor
call fcn.00499690
fild dword [esi + 0x14]
add eax, dword [esp + 0x6c]
test bl, 2
fmul dword [esp + 0x80]
mov dword [esp + 0x24], eax
mov eax, 0
sete al
lea eax, [eax + eax - 1]
mov dword [esp + 0x1c], eax
fimul dword [esp + 0x1c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fadd qword [0x4a6ba0]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.00499690
mov ebx, dword [esi + 0x18]
add eax, dword [esp + 0x68]
mov ecx, dword [edi + 0x20]
mov edx, dword [esi + 0x20]
and ebx, 3
xor ebx, dword [esp + 0x7c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], ecx
cmp ecx, 0xffffffff
jne 0x4020bb
mov ecx, dword [esi + 0x1c]
mov ebp, dword [esi + 0x24]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
jmp 0x4020d9
imul edx, dword [edi + 0x24]
sar edx, 8
mov dword [esp + 0x14], edx
mov edx, dword [edi + 0x28]
mov ebp, 0x100
sub ebp, edx
imul ebp, dword [esi + 0x24]
sar ebp, 8
add ebp, edx
cmp dword [edi + 0x2c], 0xffffffff
je 0x4021d3
mov edx, dword [edi + 0x30]
test edx, edx
jne 0x402159
mov edx, dword [esp + 0x14]
push ebp
push edx
test bl, 2
mov edx, 0
sete dl
sub esp, 8
test bl, 1
lea edx, [edx + edx - 1]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
mov edx, 0
sete dl
fmul dword [esp + 0x80]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp dword [esp + 4]
lea edx, [edx + edx - 1]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
mov edx, dword [edi + 4]
fmul dword [esp + 0x7c]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp dword [esp]
push eax
mov eax, dword [esp + 0x30]
push eax
mov eax, dword [edi + 0x2c]
call fcn.00402cd0
add esp, 0x18
jmp 0x4021d3
push 0x38
lea ecx, [esp + 0x2c]
push 0
push ecx
call sub.MSVCR90.dll_memset
fld dword [esp + 0x78]
mov eax, dword [edi + 4]
fstp dword [esp + 0x5c]
mov ecx, dword [esp + 0x28]
fld dword [esp + 0x7c]
mov edx, dword [edi + 0x34]
fstp dword [esp + 0x60]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x2c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
mov ecx, dword [edi + 0x30]
add esp, 0xc
lea eax, [esp + 0x28]
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], 2
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x5c], ebx
call fcn.004025e0
mov edx, dword [esp + 0x18]
mov eax, dword [edi + 0x1c]
dec eax
cmp dword [esi], eax
jg 0x4021f1
mov ecx, dword [esp + 0x20]
inc ecx
cmp ecx, dword [edx + 4]
mov dword [esp + 0x20], ecx
jl 0x401fd8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret