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

Disassembly:
sub esp, 0x70
push ebx
push ebp
mov ebp, dword [esp + 0x7c]
fld dword [ebp + 0xa4]
mov eax, dword [ebp + 0x10c]
fmul dword [0x4c4a08]
push esi
push edi
and eax, 0xfffffbff
sub esp, 8
xor esi, esi
fstp qword [esp]
xor ebx, ebx
mov dword [esp + 0x18], esi
mov dword [ebp + 0x10c], eax
call fcn.0049aa90
fmul dword [0x4c4acc]
fadd dword [0x4c49d4]
fstp dword [esp + 0x8c]
fld dword [ebp + 0xac]
fmul dword [0x4c4a08]
fstp qword [esp]
call fcn.0049aa90
fmul dword [0x4c4acc]
add esp, 8
mov ecx, 1
fadd dword [0x4c49d4]
fld dword [ebp + 0xa4]
fcomp dword [esp + 0x84]
fnstsw ax
test ah, 0x41
jne 0x40e678
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], 2
jmp 0x40e684
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x18], ecx
fcomp dword [ebp + 0xac]
fnstsw ax
test ah, 5
jp 0x40e69a
xor eax, eax
mov ecx, 2
jmp 0x40e69d
or eax, 0xffffffff
cmp eax, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], eax
jge 0x40e959
mov esi, dword [0x14c8e90]
mov edi, dword [0x4d64a4]
lea esp, [esp]
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
jge 0x40e942
mov eax, dword [0x14cc4b0]
mov edx, dword [eax + 0x74]
mov ecx, dword [ebp + 0x58]
sub ecx, edx
mov eax, 0x2aaaaaab
imul ecx
movzx eax, word [esi + 8]
imul eax, dword [esp + 0x1c]
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [esp + 0x14]
add ecx, edx
add eax, ecx
js 0x40e92d
cmp eax, dword [esi + 0xc]
jge 0x40e92d
lea edx, [eax + eax*2]
mov eax, dword [esi]
lea eax, [eax + edx*4]
mov dl, byte [eax + 8]
xor ecx, ecx
test dl, dl
mov dword [esp + 0x28], eax
mov dword [esp + 0x84], ecx
jbe 0x40e92d
mov eax, dword [eax]
mov edx, dword [esp + 0x10]
shr eax, 8
add eax, ecx
mov ecx, dword [0x14cc4b0]
mov ecx, dword [ecx + 0x78]
mov ebx, dword [ecx + eax*4]
test ebx, ebx
je case.0x40e828.7
mov eax, dword [ebx + 0xa8]
test eax, 0x800000
je 0x40e7aa
test eax, 0x1000000
jne 0x40e7aa
cmp dx, 0x14
je case.0x40e828.7
xor ecx, ecx
xor eax, eax
test dx, dx
jbe 0x40e799
test ecx, ecx
jne case.0x40e828.7
movzx esi, ax
cmp ebx, dword [esp + esi*4 + 0x30]
jne 0x40e78b
mov ecx, 1
inc eax
cmp ax, dx
jb 0x40e775
test ecx, ecx
jne case.0x40e828.7
movzx eax, dx
inc edx
mov dword [esp + eax*4 + 0x30], ebx
mov dword [esp + 0x10], edx
jmp case.0x40e828.7
mov ecx, dword [ebp + 0xf8]
test ecx, ecx
jne 0x40e7cf
test eax, 0x48000
jne case.0x40e828.7
movzx ecx, byte [ebx + 0xd0]
shl ecx, 6
mov ax, word [ecx + edi]
jmp 0x40e7ec
cmp ebx, ecx
jne 0x40e7de
test eax, 0x20000
jne case.0x40e828.7
movzx edx, byte [ebx + 0xd0]
shl edx, 6
mov ax, word [edx + edi]
test al, 0x20
je 0x40e7f9
test ah, 0x20
je case.0x40e828.7
push 1
lea eax, [ebp + 0xd4]
push eax
lea eax, [ebp + 0xa4]
push eax
lea esi, [ebp + 0xc8]
push esi
push ebx
mov eax, ebp
call fcn.00411240
movzx eax, ax
add esp, 0x14
dec eax
cmp eax, 7
ja case.0x40e828.7
jmp dword [eax*4 + 0x40ebe4]
fld dword [ebp + 0x11c]
fmul dword [0x4c4ec0]
fstp dword [ebp + 0x11c]
jmp case.0x40e828.7
or dword [ebp + 0x10c], 0x400
jmp case.0x40e828.7
fld dword [ebx + 0x80]
fcomp dword [0x4bf424]
fnstsw ax
test ah, 0x44
jp 0x40e87b
fld dword [ebx + 0x88]
fcomp dword [0x4bf424]
fnstsw ax
test ah, 0x44
jnp 0x40e8af
fld dword [ebx + 0x80]
fmul dword [0x4c4ebc]
fadd dword [esi]
fstp dword [esi]
fld dword [ebx + 0x88]
fmul dword [0x4c4ebc]
fadd dword [ebp + 0xd0]
fstp dword [ebp + 0xd0]
jmp 0x40e8af
or dword [ebp + 0x10c], 0x1000
mov eax, dword [ebp + 0x18]
movzx ecx, word [ebp + 0x30]
lea edx, [eax + eax*2]
mov eax, dword [0x150b09c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [ecx + edx*8]
test ah, ah
jns case.0x40e828.7
mov ecx, ebp
call fcn.0040d760
test eax, eax
je case.0x40e828.7
movzx edx, byte [ebx + 0xd0]
shl edx, 6
mov ax, word [edx + edi]
test al, 0x40
je 0x40e8ee
test al, 0x20
je case.0x40e828.7
test ah, 0x1a
jne case.0x40e828.7
mov ecx, ebx
xor eax, eax
call fcn.0046bf40
push 0
push ebx
call fcn.0041a980
mov edi, dword [0x4d64a4]
add esp, 8
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x84]
movzx edx, byte [eax + 8]
inc ecx
cmp ecx, edx
mov dword [esp + 0x84], ecx
jb 0x40e72f
mov esi, dword [0x14c8e90]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x40e6d2
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x40e6c0
xor esi, esi
mov eax, dword [ebp + 0x58]
cmp eax, esi
je 0x40e9a9
mov ecx, dword [ebp + 0x10c]
test ch, 4
jne 0x40e9d0
test byte [eax], 4
push esi
lea ecx, [ebp + 0xa4]
je 0x40e990
call fcn.0040ed50
movsx eax, byte [eax + 9]
mov dword [esp + 0x88], eax
fild dword [esp + 0x88]
jmp 0x40e9c7
call fcn.0040ed50
movsx ecx, byte [eax + 9]
mov dword [esp + 0x88], ecx
fild dword [esp + 0x88]
jmp 0x40e9c7
push esi
lea ecx, [ebp + 0xa4]
call fcn.0040ed50
movsx edx, byte [eax + 9]
mov dword [esp + 0x88], edx
fild dword [esp + 0x88]
fstp dword [ebp + 0xcc]
add esp, 4
movzx eax, word [esp + 0x10]
cmp eax, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x84], esi
mov dword [esp + 0x14], eax
jbe 0x40ebda
lea edx, [ebp + 0xc8]
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + eax*4 + 0x30]
movsx eax, word [ecx + 0xbc]
mov ecx, dword [0x14cc4b0]
mov esi, dword [ecx + 0x38]
lea eax, [eax + eax*2]
shl eax, 5
add eax, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], 4
lea ecx, [ecx]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
and eax, 3
lea esi, [ecx + eax*8]
mov ecx, dword [esp + 0x18]
push 0x40600000
lea edi, [ebp + 0xa4]
call fcn.0040e3e0
add esp, 4
test eax, eax
je 0x40ea61
mov dword [esp + 0x20], 1
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
inc esi
add ecx, 8
dec eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], eax
jne 0x40ea30
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x84], eax
jb 0x40e9f2
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40ebda
mov edx, dword [ebp + 0x10c]
mov ecx, dword [0x150b09c]
mov eax, dword [ebp + 0x18]
or edx, 0x1000
mov dword [ebp + 0x10c], edx
movzx edx, word [ebp + 0x30]
mov edx, dword [ecx + edx*4]
lea eax, [eax + eax*2]
mov ecx, dword [edx + eax*8]
test ch, ch
jns 0x40ebda
mov ecx, ebp
call fcn.0040d760
test eax, eax
je 0x40ebda
test dword [ebx + 0xa8], 0x800000
je 0x40ebda
mov ax, word [ebx + 0xc2]
cmp ax, 0xffff
je 0x40ebda
mov ecx, dword [0x14cc4b0]
mov edi, dword [ecx + 0x24]
movzx eax, ax
imul eax, eax, 0xf0
add eax, edi
push ebx
push eax
mov edi, ebp
call fcn.00419070
mov eax, dword [ebp + 0x18]
add esp, 8
cmp eax, 0xaa
je 0x40eb38
cmp eax, 0x9c
jne 0x40eb54
fld dword [ebp + 0xd4]
fchs
fstp dword [ebp + 0xd4]
fld dword [ebp + 0xdc]
fchs
fstp dword [ebp + 0xdc]
push 0
push 0x3e7
push 0x71
push ebp
call fcn.00408010
add esp, 0x10
test eax, eax
je 0x40ebda
mov eax, dword [0x14c74b0]
test eax, eax
mov eax, dword [0x14c74b8]
jne 0x40eb7c
test eax, eax
je 0x40ebda
xor edx, edx
mov dx, word [ebp + 0x12a]
push 0
and edx, 0x1ff
or edx, 0x7cee200
test eax, eax
mov dword [esp + 0x2e], edx
je 0x40ebc0
mov eax, 8
mov ecx, 6
lea edx, [esp + 0x2c]
mov word [esp + 0x2c], 0x17
call fcn.0047eaf0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
push 0x28
push 6
lea eax, [esp + 0x34]
push eax
push 0
mov word [esp + 0x3c], 0x22
call fcn.00480aa0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret