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

Disassembly:
sub esp, 0x50
mov eax, dword [edi]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
imul ecx, dword [edi + 0xc]
add ecx, dword [eax + 0x18]
push ebx
xor edx, edx
cmp dword [ecx + 4], edx
push ebp
push esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], edx
jle 0x402457
mov eax, dword [ecx]
fld1
mov esi, dword [eax + 4]
imul esi, edx
add esi, dword [eax + 0x18]
mov eax, dword [edi + 0x1c]
mov edx, dword [esi]
dec eax
cmp eax, edx
jl 0x40243b
mov ebx, dword [esi + 4]
add edx, ebx
cmp eax, edx
jl 0x402254
cmp ebx, 0xffffffff
jne 0x40243b
mov bl, byte [esp + 0x7c]
mov eax, 0
test bl, 1
sete al
lea eax, [eax + eax - 1]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fstp dword [esp + 0x18]
fild dword [esi + 0x10]
fmul dword [esp + 0x74]
fld dword [esp + 0x18]
fld st(0)
fmulp st(2)
fild dword [esp + 0x60]
faddp st(2)
fxch st(1)
call fcn.00499690
fild dword [esi + 0x14]
mov ecx, 0
test bl, 2
fmul dword [esp + 0x78]
sete cl
mov dword [esp + 0x14], eax
lea ecx, [ecx + ecx - 1]
mov dword [esp + 0x18], ecx
fimul dword [esp + 0x18]
fiadd dword [esp + 0x64]
call fcn.00499690
mov ebx, dword [esi + 0x18]
and ebx, 3
xor ebx, dword [esp + 0x7c]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x20]
cmp eax, 0xffffffff
jne 0x4022df
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0x1c]
mov ebp, dword [esi + 0x24]
mov dword [esp + 0xc], edx
jmp 0x402300
mov ecx, dword [esi + 0x20]
imul ecx, dword [edi + 0x24]
sar ecx, 8
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x28]
mov ebp, 0x100
sub ebp, ecx
imul ebp, dword [esi + 0x24]
sar ebp, 8
add ebp, ecx
fmul dword [esp + 0x68]
mov ecx, dword [edi + 0x2c]
fstp dword [esp + 0x68]
cmp ecx, 0xffffffff
je 0x402437
mov edx, dword [edi + 0x30]
test edx, edx
jne 0x4023ae
mov edx, dword [esp + 0xc]
push ebp
push edx
sub esp, 0x14
fst dword [esp + 0x10]
test bl, 2
mov edx, 0
fstp dword [esp + 0xc]
sete dl
test bl, 1
lea edx, [edx + edx - 1]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
mov edx, 0
sete dl
fmul dword [esp + 0x8c]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp dword [esp + 8]
lea edx, [edx + edx - 1]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
mov edx, dword [esp + 0x34]
fmul dword [esp + 0x88]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp dword [esp + 4]
fld dword [esp + 0x84]
fstp dword [esp]
push edx
mov edx, dword [esp + 0x34]
push edx
mov edx, ecx
mov ecx, dword [edi + 4]
call fcn.00402dc0
mov ecx, dword [esp + 0x34]
add esp, 0x24
jmp 0x40243d
push 0x38
fstp st(0)
lea eax, [esp + 0x24]
push 0
push eax
call sub.MSVCR90.dll_memset
fld dword [esp + 0x78]
mov eax, dword [edi + 0x2c]
fstp dword [esp + 0x54]
mov ecx, dword [edi + 0x34]
fld dword [esp + 0x7c]
mov edx, dword [edi + 4]
fstp dword [esp + 0x58]
fld dword [esp + 0x74]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x20]
fstp dword [esp + 0x5c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], ecx
mov ecx, dword [edi + 0x30]
mov dword [esp + 0x48], eax
add esp, 0xc
lea eax, [esp + 0x20]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x38], 3
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x54], ebx
call fcn.004025e0
mov ecx, dword [esp + 0x10]
jmp 0x40243d
mov ecx, dword [esp + 0x10]
fstp st(0)
mov eax, dword [edi + 0x1c]
dec eax
cmp dword [esi], eax
jg 0x402457
mov edx, dword [esp + 0x1c]
inc edx
cmp edx, dword [ecx + 4]
mov dword [esp + 0x1c], edx
jl 0x402227
pop esi
pop ebp
pop ebx
add esp, 0x50
ret