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

Disassembly:
sub esp, 0x74
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov byte [esp + 0x13], 0
mov eax, dword [edi + 0x54]
lea ecx, [eax - 1]
test ecx, ecx
jle 0x40e3ec
mov esi, 1
lea ebx, [edi + 0x14]
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], ebx
mov ecx, dword [ebx]
test ecx, ecx
je 0x40e3cf
mov edx, dword [ecx + 0x3c]
cmp edx, 1
je 0x40e3cf
test edx, edx
je 0x40e3cf
mov edx, dword [ecx + 0x34]
cmp esi, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], esi
jge 0x40e3cf
lea esi, [ebx + 4]
mov ecx, dword [esi]
test ecx, ecx
mov ebp, dword [ecx + 0x34]
je 0x40e3b4
mov eax, dword [ecx + 0x3c]
cmp eax, 1
je 0x40e3b4
test eax, eax
je 0x40e3b4
mov eax, dword [ebx]
add eax, 0x14
fld dword [eax]
fsub dword [ecx + 0x14]
fstp dword [esp + 0x44]
fld dword [eax + 4]
fsub dword [ecx + 0x18]
lea eax, [esp + 0x44]
lea ecx, [esp + 0x2c]
push eax
fstp dword [esp + 0x4c]
call fcn.0040d880
fld dword [esp + 0x30]
fmul dword [esp + 0x30]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov eax, dword [esi]
mov dword [esp + 0x6c], ecx
faddp st(1)
mov dword [esp + 0x70], edx
mov ecx, dword [eax + 0x3c]
cmp ecx, 5
fstp dword [esp + 0x14]
jne 0x40e36a
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40e36a
fld dword [esp + 0x14]
fcomp dword [0x45268c]
fnstsw ax
test ah, 1
je 0x40e36a
call fcn.004361d7
and eax, 0x80000001
jns 0x40e26d
dec eax
or eax, 0xfffffffe
inc eax
mov ecx, dword [esp + 0x18]
lea ebx, [eax + eax - 1]
mov dword [esp + 0x1c], ebx
mov eax, dword [ecx]
add eax, 0x24
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
call fcn.00425730
fild dword [esp + 0x1c]
cmp eax, 0x100000
fmul dword [esp + 0x38]
jge 0x40e2ec
neg ebx
mov dword [esp + 0x1c], ebx
fild dword [esp + 0x1c]
fmul dword [esp + 0x34]
fstp dword [esp + 0x78]
mov ecx, dword [esp + 0x78]
fstp dword [esp + 0x3c]
fld dword [0x452690]
push ecx
mov dword [esp + 0x44], ecx
fstp dword [esp]
lea ecx, [esp + 0x40]
call fcn.0040e480
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x4c]
push edx
call fcn.0040d880
mov eax, dword [esp + 0x50]
fld dword [esp + 0x4c]
mov dword [esp + 0x68], eax
jmp 0x40e33e
neg ebx
mov dword [esp + 0x1c], ebx
lea ecx, [esp + 0x54]
fild dword [esp + 0x1c]
push ecx
lea ecx, [esp + 0x60]
fmul dword [esp + 0x38]
fstp dword [esp + 0x84]
fld dword [0x452690]
fadd st(0), st(0)
fst dword [esp + 0x20]
fmul st(1)
fstp dword [esp + 0x58]
fstp st(0)
fld dword [esp + 0x84]
fmul dword [esp + 0x20]
fstp dword [esp + 0x5c]
call fcn.0040d880
mov edx, dword [esp + 0x60]
fld dword [esp + 0x5c]
mov dword [esp + 0x68], edx
mov eax, dword [esi]
push 0
add eax, 0x2c
push ebp
push 0x47
mov ecx, edi
fadd dword [eax]
fstp dword [eax]
fld dword [esp + 0x74]
fadd dword [eax + 4]
fstp dword [eax + 4]
mov eax, dword [esi]
mov dword [eax + 0x3c], 2
mov edx, dword [edi]
call dword [edx + 0xc]
mov ebx, dword [esp + 0x18]
fld dword [0x46a96c]
fmul dword [0x452780]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 0x41
jne 0x40e39a
mov ecx, dword [esp + 0x14]
mov edx, dword [esi]
lea eax, [esp + 0x6c]
push eax
mov eax, dword [ebx]
push ecx
push edx
push eax
mov ecx, edi
call fcn.0040e740
jmp 0x40e3b4
mov eax, dword [esp + 0x20]
mov ecx, eax
shl ecx, 4
add ecx, ebp
shl ebp, 4
add ebp, eax
mov byte [ecx + edi + 0x6c], 0
mov byte [edi + ebp + 0x6c], 0
mov eax, dword [esp + 0x24]
mov ecx, dword [edi + 0x54]
inc eax
add esi, 4
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x40e1c0
mov esi, dword [esp + 0x28]
mov eax, dword [edi + 0x54]
inc esi
add ebx, 4
mov dword [esp + 0x28], esi
lea edx, [esi - 1]
lea ecx, [eax - 1]
cmp edx, ecx
mov dword [esp + 0x18], ebx
jl 0x40e18c
mov eax, dword [edi + 0x54]
xor ebp, ebp
test eax, eax
jle 0x40e46f
lea esi, [edi + 0x14]
mov eax, dword [esi]
test eax, eax
je 0x40e464
mov ecx, dword [eax + 0x3c]
test ecx, ecx
je 0x40e464
cmp ecx, 3
je 0x40e464
cmp ecx, 4
je 0x40e464
push eax
mov ecx, edi
call fcn.0040e4a0
fld qword [esp + 0x88]
mov ecx, dword [esi]
fstp dword [esp + 0x28]
mov ebx, dword [esp + 0x28]
mov edx, dword [ecx]
push ebx
call dword [edx + 8]
mov ecx, dword [esi]
push ebx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov al, byte [esp + 0x13]
test al, al
jne 0x40e45f
mov ecx, dword [esi]
fld dword [ecx + 0x14]
fcomp dword [ecx + 0x1c]
fnstsw ax
test ah, 0x40
je 0x40e45f
fld dword [ecx + 0x18]
fcomp dword [ecx + 0x20]
mov byte [esp + 0x13], 0
fnstsw ax
test ah, 0x40
jne 0x40e464
mov byte [esp + 0x13], 1
mov eax, dword [edi + 0x54]
inc ebp
add esi, 4
cmp ebp, eax
jl 0x40e3f8
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 8