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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4874a7
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x158], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x170]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
and dword [esp + 0x3c], 0
push 0x64
mov esi, ecx
movzx eax, word [esi + 0xb0]
push 0
push 4
pop ecx
mov edi, ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x2c], eax
call fcn.00460b55
push 0x64
lea eax, [esp + 0x48]
push 0
push eax
call fcn.004012a6
mov eax, dword [esi + 0xb8]
add esp, 0xc
push eax
push 0
push 8
pop ecx
mov dword [esp + 0x4c], eax
call fcn.00460b55
mov ecx, dword [esi + 0xe8]
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0xec]
cmp ecx, eax
je 0x40e955
sub eax, ecx
push 2
sar eax, 1
push eax
push ecx
push 2
mov dword [esp + 0x84], eax
pop eax
call fcn.00460bb7
mov dword [esp + 0x70], eax
mov ecx, dword [esi + 0xf8]
mov eax, dword [esi + 0xfc]
cmp ecx, eax
je 0x40e982
sub eax, ecx
push 2
sar eax, 1
push eax
push ecx
push 2
mov dword [esp + 0x8c], eax
pop eax
mov edi, ebx
call fcn.00460bb7
mov dword [esp + 0x78], eax
mov ecx, dword [esi + 0x108]
mov eax, dword [esi + 0x10c]
cmp ecx, eax
je 0x40e9b5
push 6
pop edi
sub eax, ecx
cdq
idiv edi
push 2
push eax
push ecx
push edi
mov dword [esp + 0x94], eax
pop eax
mov edi, ebx
call fcn.00460bb7
mov dword [esp + 0x80], eax
mov ecx, dword [esi + 0x118]
mov eax, dword [esi + 0x11c]
cmp ecx, eax
je 0x40e9e8
push 0xc
pop edi
sub eax, ecx
cdq
idiv edi
push 4
push eax
push ecx
push edi
mov dword [esp + 0x9c], eax
pop eax
mov edi, ebx
call fcn.00460bb7
mov dword [esp + 0x88], eax
movzx eax, word [esp + 0x24]
push 2
push eax
push 0
push 0xe
mov dword [esp + 0x48], eax
pop eax
mov edi, ebx
call fcn.00460bb7
cmp dword [ebx], 0
mov dword [esp + 0x94], eax
je 0x40ea5b
and dword [esp + 0x14], 0
xor ecx, ecx
cmp cx, word [esp + 0x24]
jae 0x40ea5b
mov edi, eax
push dword [esp + 0x14]
mov ecx, dword [esi + 0xbc]
mov eax, dword [ecx]
lea edx, [esp + 0xb0]
push edx
call dword [eax + 4]
lea eax, [esp + 0xac]
push eax
push 0xe
pop esi
mov eax, ebx
call fcn.00460bdd
inc dword [esp + 0x14]
mov ax, word [esp + 0x14]
add edi, esi
mov esi, dword [esp + 0x18]
cmp ax, word [esp + 0x24]
jb 0x40ea1c
lea eax, [esp + 0x1c]
mov edx, ebx
call fcn.00460c7a
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
and dword [esp + 0xb4], 0
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], ecx
test eax, eax
jne 0x40ea95
mov ecx, dword [esi + 0xe4]
call fcn.004123a1
jmp 0x40eafd
mov edi, dword [esi + 0xe4]
push ecx
push eax
lea eax, [edi + 4]
push eax
mov dword [esp + 0x4c], edi
call fcn.00411cf4
mov ecx, dword [edi + 0x19820]
sub ecx, dword [edi + 0x1981c]
and dword [esp + 0x14], 0
sar ecx, 2
mov dword [esp + 0x28], ecx
test ecx, ecx
jne 0x40eacc
jmp 0x40eafd
mov edi, dword [esp + 0x40]
mov ecx, dword [edi + 0x1981c]
mov edx, dword [esp + 0x14]
lea ecx, [ecx + edx*4]
push dword [ecx]
mov esi, eax
push dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov edi, 0x80
call fcn.00411bc8
inc dword [esp + 0x14]
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esp + 0x28]
jb 0x40eac8
xor ecx, ecx
cmp ecx, ecx
ja 0x40eb08
cmp eax, 0xffffffff
jbe 0x40eb0d
call fcn.00409abe
push eax
push ecx
xor ecx, ecx
inc ecx
lea edi, [esp + 0xb4]
call fcn.00460b55
push dword [esp + 0xb4]
mov esi, ebx
call fcn.00460cc5
push ebx
push dword [esp + 0x1c]
lea edi, [esp + 0x4c]
mov dword [esp + 0xa0], eax
call fcn.0040d074
mov eax, dword [esp + 0x38]
add eax, 0x1f
xor edi, edi
shr eax, 5
push eax
lea esi, [esp + 0x2c]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.0040faac
mov dword [esp + 0x178], edi
cmp dword [ebx], edi
je 0x40ebb7
lea eax, [esp + 0x44]
push eax
push 0x64
pop esi
mov eax, ebx
call fcn.00460bdd
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
mov dword [esp + 0x20], eax
push edi
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0xd4]
push eax
mov dword [esp + 0x28], ecx
call fcn.0040f19f
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x28]
lea eax, [esp + 0xfc]
push eax
call fcn.0040d6ff
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x28], eax
je 0x40ebe1
sub eax, dword [esp + 0x28]
push 4
sar eax, 2
mov ecx, eax
pop eax
push eax
push ecx
push dword [esp + 0x30]
mov edi, ebx
call fcn.00460bb7
mov dword [esp + 0x90], eax
or dword [esp + 0x178], 0xffffffff
lea esi, [esp + 0x28]
call fcn.004019a5
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 0x18]
xor esi, esi
cmp eax, esi
jne 0x40ec05
mov dword [esp + 0x14], esi
jmp 0x40ec59
lea ecx, [eax + 0x4e]
call fcn.004108cf
and eax, 0x1e0000
je 0x40ebff
test eax, 0x20000
je 0x40ec25
mov dword [esp + 0x14], 0x3a4
jmp 0x40ec59
test eax, 0x100000
je 0x40ec36
mov dword [esp + 0x14], 0x3b6
jmp 0x40ec59
test eax, 0x40000
je 0x40ec47
mov dword [esp + 0x14], 0x3a8
jmp 0x40ec59
and eax, 0x80000
neg eax
sbb eax, eax
and eax, 0x3b5
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
push edi
call fcn.0040e0a0
test al, al
je 0x40ed5c
mov ecx, dword [esp + 0x38]
lea eax, [ecx + 0x1f]
cmp eax, ecx
jb 0x40eb08
cmp eax, 0xffff
ja 0x40eb08
and eax, 0xffe0
movzx eax, ax
mov dword [esp + 0xac], esi
mov dword [esp + 0xb0], esi
mov dword [esp + 0xb4], esi
push eax
lea esi, [esp + 0xb0]
call fcn.0040faac
mov dword [esp + 0x178], 1
cmp dword [ebx], 0
je 0x40ed08
lea eax, [esp + 0x44]
push eax
push 0x64
pop esi
xor edi, edi
mov eax, ebx
call fcn.00460bdd
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
mov dword [esp + 0x20], eax
push edi
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0xd4]
push eax
mov dword [esp + 0x28], ecx
call fcn.0040f19f
lea eax, [esp + 0xf4]
push eax
push dword [esp + 0x18]
lea edi, [esp + 0xb4]
call fcn.0040e14a
mov eax, dword [esp + 0xb0]
cmp dword [esp + 0xac], eax
je 0x40ed44
sub eax, dword [esp + 0xac]
or word [esp + 0x6a], 8
push 4
sar eax, 2
mov ecx, eax
pop eax
push eax
push ecx
push dword [esp + 0xb4]
mov edi, ebx
call fcn.00460bb7
mov dword [esp + 0xa4], eax
or dword [esp + 0x178], 0xffffffff
lea esi, [esp + 0xac]
call fcn.004019a5
mov edi, dword [esp + 0x18]
mov esi, dword [ebx]
test esi, esi
je 0x40eec4
mov eax, dword [ebx + 4]
mov edx, dword [esp + 0x48]
mov ecx, dword [edi + 0xb8]
cmp eax, edx
jb 0x40ee77
mov edi, eax
sub edi, edx
cmp edi, ecx
jb 0x40ee77
lea ecx, [esi + edx]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0xdc], 3
jne 0x40eda1
or word [esp + 0x6a], 1
push eax
push esi
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0xa4]
call fcn.0040fb24
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x28]
lea edi, [esp + 0xac]
call fcn.004120f1
push eax
push dword [esp + 0x1c]
call fcn.0040de01
test al, al
je 0x40ede8
or word [esp + 0x6a], 2
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
call fcn.004178b4
mov dword [esp + 0x178], 2
mov ax, word [esp + 0x13a]
mov edi, dword [esp + 0xe0]
mov word [esp + 0x60], ax
mov ax, word [esp + 0xdc]
mov word [esp + 0x62], ax
mov al, byte [esp + 0x139]
mov byte [esp + 0x65], al
mov al, byte [esp + 0xdf]
mov byte [esp + 0x66], al
mov al, byte [esp + 0x13c]
mov byte [esp + 0x64], al
xor esi, esi
mov eax, dword [esi + 0x40eef4]
lea ecx, [edi + 8]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40ee7c
test dx, dx
je 0x40ee73
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40ee7c
add ecx, 4
add eax, 4
test dx, dx
jne 0x40ee51
xor eax, eax
jmp 0x40ee81
call fcn.0041e1f7
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jle 0x40eeee
add esi, 4
cmp esi, 0x18
jb 0x40ee48
xor al, al
test al, al
je 0x40ee99
or word [esp + 0x6a], 4
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0xbc]
push ebx
lea ecx, [esp + 0x48]
push ecx
push eax
call fcn.0040cacd
or dword [esp + 0x178], 0xffffffff
lea eax, [esp + 0xcc]
push eax
call fcn.0040ef0c
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x170]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x158]
xor ecx, esp
call fcn.00401298
mov esp, ebp
pop ebp
ret 4
sete al
jmp 0x40ee8f