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
mov ebx, eax
xor edi, edi
xor esi, esi
mov ecx, dword [esp + 0x9c]
lea ebp, [ecx - 1]
jmp 0x40ad02
mov eax, edi
cdq
idiv ebp
mov word [ebx + 8], ax
mov word [ebx + 6], ax
mov word [ebx + 4], ax
inc esi
add ebx, 0xc
add edi, 0xffff
cmp esi, dword [esp + 0x9c]
je 0x40af9d
fld1
fld qword [esp + 0x80]
fucompp
fnstsw ax
and ah, 0x45
xor ah, 0x40
je 0x40acda
fld qword [esp + 0x80]
fstp qword [esp + 8]
mov dword [esp + 0xa8], ebp
fild dword [esp + 0xa8]
push esi
fidivr dword [esp]
pop eax
fstp qword [esp]
call sub.msvcrt.dll_pow
fmul dword [0x5fa910]
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]
jmp 0x40acdf
fld qword [eax + 8]
fld qword [ebx + 8]
fxch st(1)
fucompp
fnstsw ax
and ah, 0x45
cmp ah, 0x40
je 0x40ac1c
add esi, edx
jmp 0x40ac1c
cmp dword [esp + 0x88], esi
jle 0x40ae8e
mov edi, dword [esp + 0x7c]
cmp dword [esp + 0x9c], edi
jle 0x40b21f
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov eax, dword [esp + 0x8c]
mov dword [esp + 8], eax
mov edx, dword [esp + 0xa0]
mov eax, dword [edx + 4]
mov dword [esp + 4], eax
mov eax, dword [edx]
mov dword [esp], eax
call fcn.00474028
mov eax, dword [esp + 0x98]
mov dword [esp], eax
mov eax, dword [0x68bb7c]
call dword [eax + 0x18]
mov eax, dword [esp + 0x8c]
mov dword [esp], eax
mov eax, dword [0x68bb7c]
call dword [eax + 0x18]
mov eax, dword [esp + 0xc0]
mov edx, dword [esp + 0xa4]
test edx, edx
jne 0x40ac61
cmp eax, 2
je 0x40afbe
lea eax, [eax + eax*2]
mov edx, eax
add edx, 2
js 0x40b6b1
sar edx, 2
mov dword [esp + 0x9c], edx
mov dword [esp + 0xc0], edx
mov eax, dword [esp + 0xc4]
lea eax, [eax + eax*2]
mov edx, eax
add edx, 2
js 0x40b6a9
sar edx, 2
mov dword [esp + 0xc4], edx
mov eax, dword [esp + 0xc8]
lea eax, [eax + eax*2]
mov edx, eax
add edx, 2
js 0x40b5e1
sar edx, 2
mov dword [esp + 0xc8], edx
jmp 0x40a87b
mov dword [esp + 4], ebp
mov dword [esp], 0x68b0a0
mov eax, dword [0x68bb7c]
call dword [eax + 0x24c]
test eax, eax
je 0x40af7b
mov edx, dword [esp + 0x88]
test edx, edx
jle 0x40af7b
mov esi, dword [esp + 0x78]
mov dword [esp + 0x78], edi
jmp 0x40aee6
mov dword [esp], ebp
mov eax, dword [0x68bb7c]
call dword [eax + 0x30c]
test eax, eax
je 0x40af77
test esi, esi
jle 0x40af77
mov edx, dword [eax + 0xc]
mov ecx, dword [edx]
cmp ecx, dword [ebx]
jne 0x40aec8
mov edi, dword [edx + 4]
cmp edi, dword [ebx + 4]
jne 0x40aec8
mov eax, dword [edx + 0x20]
test eax, eax
jne 0x40aec8
mov eax, dword [edx + 0x24]
mov dword [esp + 0x90], eax
test eax, eax
je 0x40aec8
mov eax, dword [ebx + 0x10]
cmp dword [edx + 0x10], eax
je 0x40b5c4
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x90]
mov dword [esp + 0xc], eax
mov eax, dword [edx + 0xc50]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], ecx
mov dword [esp + 0x50], edx
call fcn.00474028
mov edx, dword [esp + 0x50]
sub esi, dword [edx + 0x24]
mov dword [edx + 0x24], 0
mov eax, dword [edx + 0xc50]
mov dword [esp], eax
mov eax, dword [0x68bb7c]
call dword [eax + 0x18]
mov edx, dword [esp + 0x50]
mov dword [edx + 0xc50], 0
jmp 0x40aec8
mov edi, dword [esp + 0x78]
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
jmp 0x40ada9
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
jmp 0x40ab79
cmp dword [esp + 0xc4], 2
jne 0x40ae2c
cmp dword [esp + 0xc8], 2
jne 0x40ae2c
mov eax, dword [esp + 0xa0]
or dword [eax + 0x18], 1
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0xc4]
mov eax, dword [esp + 0xc8]
cmp eax, edx
jge 0x40b004
mov eax, edx
cmp dword [esp + 0x9c], eax
jge 0x40b014
mov dword [esp + 0x9c], eax
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
mov edx, dword [esp + 0x9c]
test edx, edx
jle 0x40b203
mov ebx, eax
xor esi, esi
xor edi, edi
mov ebp, dword [esp + 0x9c]
jmp 0x40b096
mov ecx, dword [esp + 0xc0]
dec ecx
mov eax, esi
cdq
idiv ecx
mov word [ebx + 4], ax
mov ecx, dword [esp + 0xc4]
dec ecx
mov eax, esi
cdq
idiv ecx
mov word [ebx + 6], ax
mov ecx, dword [esp + 0xc8]
dec ecx
mov eax, esi
cdq
idiv ecx
mov word [ebx + 8], ax
inc edi
add esi, 0xffff
add ebx, 0xc
cmp edi, ebp
je 0x40af9d
fld1
fld qword [esp + 0x80]
fucompp
fnstsw ax
and ah, 0x45
xor ah, 0x40
je 0x40b051
mov dword [esp + 0xa8], edi
fild dword [esp + 0xa8]
fld qword [esp + 0x80]
fstp qword [esp + 8]
mov eax, dword [esp + 0xc0]
dec eax
fld st(0)
push eax
fidiv dword [esp]
pop eax
fstp qword [esp]
fstp qword [esp + 0x50]
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
fld qword [esp + 0x80]
fstp qword [esp + 8]
mov eax, dword [esp + 0xc4]
dec eax
fld qword [esp + 0x50]
push eax
fidiv dword [esp]
pop eax
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 + 6], ax
fld qword [esp + 0x80]
fstp qword [esp + 8]
mov eax, dword [esp + 0xc8]
dec eax
fld qword [esp + 0x50]
push eax
fidiv dword [esp]
pop eax
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 + 8], ax
jmp 0x40b084
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xc4], ecx
jmp 0x40b014
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 eax, dword [esp + 0xa4]
test eax, eax
jne 0x40b235
mov edx, dword [esp + 0xa0]
or dword [edx + 0x18], 2
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0xa0]
mov dword [ecx + 0x24], eax
mov eax, dword [esp + 0x8c]
mov dword [ecx + 0xc50], eax
mov ecx, dword [esp + 0xc4]
imul ecx, dword [esp + 0xc8]
mov dword [esp + 0x8c], ecx
mov ebx, dword [esp + 0xc0]
mov ebp, dword [esp + 0xa0]
add ebp, 0xc54
mov edi, dword [esp + 0xa0]
add edi, 0x50
mov dword [esp + 0x7c], 0
mov esi, dword [esp + 0xa0]
jmp 0x40b332
lea eax, [ecx + ecx*2]
mov edx, dword [esp + 0x98]
lea ebx, [edx + eax*4]
movzx eax, word [ebx + 4]
fld dword [0x5fa910]
push eax
fidivr dword [esp]
pop eax
fld qword [esi + 8]
fld1
fxch st(1)
fucom st(1)
fnstsw ax
fstp st(1)
and ah, 0x45
cmp ah, 0x40
jne 0x40b51a
fstp st(0)
fmul qword [0x5fa918]
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 byte [ebp], al
mov eax, dword [ebx]
mov dword [edi], eax
inc dword [esp + 0x7c]
inc ebp
add edi, 4
cmp dword [esp + 0x7c], 0x100
je 0x40b6b9
mov ebx, dword [esp + 0xc0]
dec ebx
imul ebx, dword [esp + 0x7c]
invalid