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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xfc
mov ebx, eax
lea esi, [esp + 0xd8]
mov ecx, 0x18
xor eax, eax
mov edi, esi
rep stosb byte es:[edi], al
mov eax, dword [ebx + 4]
mov dword [esp + 0xd8], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0xdc], eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 0xe8], eax
fld qword [ebx + 0x18]
fstp qword [esp + 0xe0]
mov ebp, dword [0x68b0d8]
test ebp, ebp
je 0x40b680
lea eax, [esp + 0xbc]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], 0x68b0a0
call dword [0x68b0d0]
mov ebp, eax
mov edi, dword [esp + 0xbc]
test edi, edi
jne 0x40b5e9
mov ebp, dword [eax + 0xc]
mov dword [esp + 0xa0], ebp
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x74], eax
mov edx, dword [ebp + 0x18]
inc dword [ebp + 0x1c]
inc eax
mov dword [ebp + 0x20], eax
mov dword [ebx + 0x24], ebp
and edx, 4
je 0x40a7e4
mov edx, dword [esp + 0xa0]
mov dword [esp + 4], edx
mov dword [esp], fcn.00409bf0
mov eax, dword [0x68bb7c]
call dword [eax + 0x148]
mov ecx, dword [esp + 0xa0]
and dword [ecx + 0x18], 0xfffffffb
mov eax, dword [esp + 0xa0]
mov ebx, dword [eax + 0x24]
test ebx, ebx
jne 0x40a7f8
test byte [eax + 0x18], 1
je 0x40a803
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0xc8]
mov dword [esp + 0x10], eax
lea eax, [esp + 0xc4]
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc0]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5f9f9a
mov edx, dword [esp + 0xa0]
mov eax, dword [edx + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_sscanf
xor ecx, ecx
dec eax
setle cl
mov dword [esp + 0xa4], ecx
fld1
mov eax, dword [esp + 0xa0]
fdiv qword [eax + 8]
fstp qword [esp + 0x80]
mov ecx, dword [esp + 0xc0]
mov dword [esp + 0x9c], ecx
mov ecx, dword [esp + 0xa4]
test ecx, ecx
jne 0x40ac83
mov edx, dword [esp + 0xa0]
mov edx, dword [edx + 0x38]
mov eax, edx
sub eax, 4
cmp eax, 1
jbe 0x40aff0
mov ecx, dword [esp + 0x9c]
imul ecx, dword [esp + 0xc4]
imul ecx, dword [esp + 0xc8]
mov dword [esp + 0x9c], ecx
lea eax, [ecx + ecx*2]
shl eax, 2
mov dword [esp], eax
mov eax, dword [0x68bb7c]
call dword [eax + 0x14]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0xc0]
test eax, eax
jle 0x40ab4e
mov dword [esp + 0x94], 0
xor edi, edi
mov dword [esp + 0x7c], edi
mov edx, dword [esp + 0xc4]
test edx, edx
jle 0x40ab3a
mov ecx, dword [esp + 0x94]
shl ecx, 0x10
mov edx, dword [esp + 0x94]
sub ecx, edx
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], 0
mov ebp, dword [esp + 0xc8]
mov edi, eax
nop
test ebp, ebp
jle 0x40ab1d
mov eax, dword [esp + 0x90]
shl eax, 0x10
mov ecx, dword [esp + 0x90]
sub eax, ecx
mov dword [esp + 0x88], eax
mov ecx, dword [esp + 0x7c]
lea eax, [ecx + ecx*2]
mov edx, dword [esp + 0x98]
lea ebx, [edx + eax*4 + 4]
xor esi, esi
jmp 0x40a9a7
lea ecx, [edi - 1]
mov eax, dword [esp + 0x8c]
cdq
idiv ecx
mov word [ebx], ax
mov ecx, dword [esp + 0xc4]
dec ecx
mov eax, dword [esp + 0x88]
cdq
idiv ecx
mov word [ebx + 2], ax
mov eax, esi
shl eax, 0x10
sub eax, esi
lea ecx, [ebp - 1]
cdq
idiv ecx
mov word [ebx + 4], ax
inc dword [esp + 0x7c]
inc esi
add ebx, 0xc
cmp ebp, esi
jle 0x40ab1d
fld1
fld qword [esp + 0x80]
fucompp
fnstsw ax
and ah, 0x45
xor ah, 0x40
je 0x40a960
fld qword [esp + 0x80]
fstp qword [esp + 8]
dec edi
mov dword [esp + 0xa8], edi
fild dword [esp + 0xa8]
fidivr dword [esp + 0x94]
fstp qword [esp]
call sub.msvcrt.dll_pow
fmul qword [0x5fa920]
fnstcw word [esp + 0xae]
mov ax, word [esp + 0xae]
mov ah, 0xc
mov word [esp + 0xac], ax
fldcw word [esp + 0xac]
fistp dword [esp + 0xa8]
fldcw word [esp + 0xae]
mov eax, dword [esp + 0xa8]
mov word [ebx], ax
fld qword [esp + 0x80]
fstp qword [esp + 8]
mov eax, dword [esp + 0xc4]
dec eax
mov dword [esp + 0xa8], eax
fild dword [esp + 0xa8]
fidivr dword [esp + 0x90]
fstp qword [esp]
call sub.msvcrt.dll_pow
fmul qword [0x5fa920]
fnstcw word [esp + 0xae]
mov ax, word [esp + 0xae]
mov ah, 0xc
mov word [esp + 0xac], ax
fldcw word [esp + 0xac]
fistp dword [esp + 0xa8]
fldcw word [esp + 0xae]
mov eax, dword [esp + 0xa8]
mov word [ebx + 2], ax
fld qword [esp + 0x80]
fstp qword [esp + 8]
mov eax, dword [esp + 0xc8]
dec eax
mov dword [esp + 0xa8], eax
fild dword [esp + 0xa8]
push esi
fidivr dword [esp]
pop ecx
fstp qword [esp]
call sub.msvcrt.dll_pow
fmul qword [0x5fa920]
fnstcw word [esp + 0xae]
mov ax, word [esp + 0xae]
mov ah, 0xc
mov word [esp + 0xac], ax
fldcw word [esp + 0xac]
fistp dword [esp + 0xa8]
fldcw word [esp + 0xae]
mov eax, dword [esp + 0xa8]
mov word [ebx + 4], ax
mov edi, dword [esp + 0xc0]
mov ebp, dword [esp + 0xc8]
inc dword [esp + 0x7c]
inc esi
add ebx, 0xc
cmp ebp, esi
jg 0x40a9a7
inc dword [esp + 0x90]
mov ecx, dword [esp + 0x90]
cmp ecx, dword [esp + 0xc4]
jl 0x40a928
mov eax, edi
inc dword [esp + 0x94]
cmp dword [esp + 0x94], eax
jl 0x40a8e9
mov eax, dword [esp + 0x9c]
shl eax, 2
mov dword [esp], eax
mov eax, dword [0x68bb7c]
call dword [eax + 0x14]
mov dword [esp + 0x8c], eax
mov ebx, dword [esp + 0x9c]
test ebx, ebx
jle 0x40b22a
mov esi, dword [esp + 0x98]
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0x88], ecx
xor edi, edi
lea ebp, [esp + 0xcc]
mov ebx, dword [esp + 0xa0]
mov dword [esp + 0x7c], edi
mov edi, esi
jmp 0x40abd6
mov eax, dword [edi]
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x8c]
mov dword [ecx + edx*4], eax
inc edx
mov dword [esp + 0x7c], edx
add edi, 0xc
dec dword [esp + 0x88]
mov ecx, dword [esp + 0x9c]
cmp edx, ecx
jge 0x40b21f
mov dword [esp + 8], edi
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00473b54
test eax, eax
jne 0x40aba8
mov edx, dword [esp + 0x88]
mov dword [esp + 0x78], edx
mov dword [esp + 4], ebp
mov dword [esp], 0x68b0a0
mov eax, dword [0x68bb7c]
call dword [eax + 0x24c]
xor esi, esi
test eax, eax
jne 0x40ac32
jmp 0x40ad9c
mov dword [esp], ebp
mov eax, dword [0x68bb7c]
call dword [eax + 0x30c]
test eax, eax
je 0x40ad9c
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx]
cmp dword [eax], ecx
jne 0x40ac1c
mov edx, dword [ebx + 4]
cmp dword [eax + 4], edx
jne 0x40ac1c
mov ecx, dword [eax + 0x20]
test ecx, ecx
jne 0x40ac1c
mov edx, dword [eax + 0x24]
test edx, edx
je 0x40ac1c
mov ecx, dword [ebx + 0x10]
cmp dword [eax + 0x10], ecx
je 0x40ad7d
add esi, edx
jmp 0x40ac1c
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
mov dword [esp + 0x9c], edx
mov dword [esp + 0xc0], edx
mov dword [esp + 0xa4], 1
cmp dword [esp + 0x9c], 2
jle 0x40afda
mov ecx, dword [esp + 0xa0]
mov ecx, dword [ecx + 0x38]
mov eax, ecx
sub eax, 4
cmp eax, 1
jbe 0x40b1e9
mov ecx, dword [esp + 0x9c]
lea eax, [ecx + ecx*2]
shl eax, 2
mov dword [esp], eax
mov eax, dword [0x68bb7c]
call dword [eax + 0x14]
mov dword [esp + 0x98], eax
invalid