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

Disassembly:
sub esp, 0x70
mov eax, dword [0x453170]
xor eax, esp
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x7c]
push ebx
mov ebx, dword [esp + 0x78]
push ebp
push esi
push edi
mov edi, dword [esp + 0x88]
xor ebp, ebp
push ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], eax
push dword [edi + 0x38]
call fcn.004136a0
push ebp
push dword [edi + 0x40]
mov esi, eax
mov dword [esp + 0x28], esi
call fcn.004136a0
add esp, 0x10
mov ecx, eax
mov dword [esp + 0x20], ecx
cmp esi, 2
jne 0x40e6ce
cmp ecx, 1
je 0x40e6ba
cmp ecx, esi
jne 0x40e6e5
lea edx, [edi + 0xc]
mov eax, 0x800
or word [edx], ax
mov dword [esp + 0x20], edx
jmp 0x40e76b
cmp esi, 1
jne 0x40e6e5
cmp ecx, 2
je 0x40e6ba
lea esi, [edi + 0xc]
mov edx, 0xf7ff
and word [esi], dx
jmp 0x40e715
lea esi, [edi + 0xc]
mov edx, 0xf7ff
and word [esi], dx
cmp dword [esp + 0x18], 2
jne 0x40e715
lea eax, [ebx + 8]
push eax
push dword [edi + 0x38]
push 0x7075
call fcn.0040ed70
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x40e74d
mov ecx, dword [esp + 0x20]
test dword [esp + 0x14], 0x100
lea eax, [ebx + 8]
mov dword [esp + 0x20], esi
jne 0x40e76b
mov dword [esp + 0x20], esi
cmp ecx, 2
jne 0x40e76b
push eax
push dword [edi + 0x40]
push 0x6375
call fcn.0040ed70
add esp, 0xc
test eax, eax
jne 0x40e763
push ebp
call fcn.0040f760
add esp, 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0041d829
add esp, 0x70
ret
mov dword [eax], ebp
mov ebp, eax
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x20]
movzx edx, word [edi + 0x5a]
movzx ecx, word [esi]
mov eax, ecx
and ecx, 0xfffe
or eax, 1
movzx ecx, cx
test dx, dx
movzx eax, ax
cmovne ecx, eax
mov word [esi], cx
cmp dword [edi + 0x34], 0
ja 0x40e7ca
jb 0x40e79e
cmp dword [edi + 0x30], 0xffffffff
jae 0x40e7ca
cmp dword [edi + 0x2c], 0
ja 0x40e7ca
jb 0x40e7ac
cmp dword [edi + 0x28], 0xffffffff
jae 0x40e7ca
mov esi, dword [esp + 0x14]
test esi, 0x200
je 0x40e7c6
cmp dword [edi + 0x54], 0
ja 0x40e7ce
jb 0x40e7c6
cmp dword [edi + 0x50], 0xffffffff
jae 0x40e7ce
xor cl, cl
jmp 0x40e7d0
mov esi, dword [esp + 0x14]
mov cl, 1
mov eax, esi
mov byte [esp + 0x12], cl
and eax, 0x500
cmp eax, 0x500
je 0x40e7ea
test cl, cl
jne 0x40e7ea
xor al, al
jmp 0x40e7ec
mov al, 1
mov ecx, 0x101
mov byte [esp + 0x13], al
cmp dx, cx
je 0x40e813
mov ecx, 0x102
cmp dx, cx
je 0x40e813
mov ecx, 0x103
mov byte [esp + 0x11], 0
cmp dx, cx
jne 0x40e818
mov byte [esp + 0x11], 1
test al, al
je 0x40e9a8
push 0
lea eax, [esp + 0x34]
push 0x1c
push eax
call fcn.0040cd60
mov esi, eax
add esp, 0xc
mov dword [esp + 0x28], esi
test esi, esi
jne 0x40e867
lea eax, [ebx + 8]
push 0
push 0xe
push eax
call fcn.0040b370
push ebp
call fcn.0040f760
add esp, 0x10
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0041d829
add esp, 0x70
ret
mov eax, dword [esp + 0x14]
mov ecx, eax
and ecx, 0x100
and eax, 0x400
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x40e8be
test eax, eax
jne 0x40e8a1
cmp dword [edi + 0x2c], eax
ja 0x40e8a1
jb 0x40e891
cmp dword [edi + 0x28], 0xffffffff
ja 0x40e8a1
cmp dword [edi + 0x34], 0
ja 0x40e8a1
cmp dword [edi + 0x30], 0xffffffff
jbe 0x40e937
push dword [edi + 0x34]
push dword [edi + 0x30]
push esi
call fcn.0040cff0
push dword [edi + 0x2c]
push dword [edi + 0x28]
push esi
call fcn.0040cff0
add esp, 0x18
jmp 0x40e937
test eax, eax
jne 0x40e8e9
cmp dword [edi + 0x2c], eax
ja 0x40e8e9
jb 0x40e8cf
cmp dword [edi + 0x28], 0xffffffff
ja 0x40e8e9
cmp dword [edi + 0x34], 0
ja 0x40e8e9
jb 0x40e8dd
cmp dword [edi + 0x30], 0xffffffff
ja 0x40e8e9
cmp dword [edi + 0x54], 0
ja 0x40e8e9
cmp dword [edi + 0x50], 0xffffffff
jbe 0x40e937
mov ecx, dword [edi + 0x34]
mov eax, dword [edi + 0x30]
test ecx, ecx
jne 0x40e8f8
cmp eax, 0xffffffff
jb 0x40e903
push ecx
push eax
push esi
call fcn.0040cff0
add esp, 0xc
mov ecx, dword [edi + 0x2c]
mov eax, dword [edi + 0x28]
test ecx, ecx
jne 0x40e912
cmp eax, 0xffffffff
jb 0x40e91d
push ecx
push eax
push esi
call fcn.0040cff0
add esp, 0xc
mov ecx, dword [edi + 0x54]
mov eax, dword [edi + 0x50]
test ecx, ecx
jne 0x40e92c
cmp eax, 0xffffffff
jb 0x40e937
push ecx
push eax
push esi
call fcn.0040cff0
add esp, 0xc
push esi
call fcn.0040ced0
add esp, 4
test al, al
jne 0x40e976
push 0
lea eax, [ebx + 8]
push 0x14
push eax
call fcn.0040b370
push esi
call fcn.0040cac0
push ebp
call fcn.0040f760
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0041d829
add esp, 0x70
ret
push 0x300
lea eax, [esp + 0x34]
push eax
push esi
call fcn.0040cea0
add esp, 4
movzx eax, ax
push eax
push 1
call fcn.0040f920
push dword [esp + 0x38]
mov esi, eax
call fcn.0040cac0
mov dword [esi], ebp
add esp, 0x14
mov ebp, esi
jmp 0x40e9b3
mov eax, esi
and eax, 0x100
mov dword [esp + 0x18], eax
cmp byte [esp + 0x11], 0
je 0x40ea63
push 0
lea eax, [esp + 0x2c]
push 7
push eax
call fcn.0040cd60
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x40e9e1
mov eax, dword [esp + 0x1c]
add eax, 8
jmp 0x40e83e
push 2
push ebx
call fcn.0040cf40
push 2
push 0x4453b0
push ebx
call fcn.0040cee0
movzx eax, byte [edi + 0x5a]
push eax
push ebx
call fcn.0040d080
movzx eax, word [edi + 0x10]
push eax
push ebx
call fcn.0040cf40
push ebx
call fcn.0040ced0
add esp, 0x28
test al, al
jne 0x40ea3e
mov eax, dword [esp + 0x1c]
push 0
add eax, 8
push 0x14
push eax
call fcn.0040b370
push ebx
call fcn.0040cac0
push ebp
call fcn.0040f760
add esp, 0x14
jmp 0x40e851
push 0x300
lea eax, [esp + 0x2c]
push eax
push 7
push 0x9901
call fcn.0040f920
push ebx
mov esi, eax
call fcn.0040cac0
mov dword [esi], ebp
add esp, 0x14
mov ebp, esi
push 0
lea eax, [esp + 0x50]
push 0x2e
push eax
call fcn.0040cd60
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40e9d5
mov esi, dword [esp + 0x18]
mov ecx, 0x4453a8
test esi, esi
mov eax, 0x4453a0
push 4
cmove eax, ecx
push eax
push ebx
call fcn.0040cee0
add esp, 0xc
test esi, esi
jne 0x40eaaf
movzx eax, word [edi + 8]
push eax
push ebx
call fcn.0040cf40
add esp, 8
movzx ecx, word [edi + 0xa]
xor eax, eax
cmp byte [esp + 0x12], al
mov edx, 0x2d
cmovne eax, edx
cmp eax, ecx
cmova ecx, eax
push ecx
push ebx
call fcn.0040cf40
mov eax, dword [esp + 0x28]
movzx eax, word [eax]
push eax
push ebx
call fcn.0040cf40
add esp, 0x10
mov eax, 0x63
cmp byte [esp + 0x11], 0
jne 0x40eaee
movzx eax, word [edi + 0x10]
push eax
push ebx
call fcn.0040cf40
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x30], ecx
call fcn.0042b07f
mov edx, eax
add esp, 0xc
test edx, edx
jne 0x40eb1b
lea esi, [eax + 0x21]
jmp 0x40eb66
mov eax, dword [edx + 0x14]
movzx ecx, ax
cmp eax, 0x50
jge 0x40eb32
mov dword [edx + 0x14], 0x50
mov ecx, 0x50
shl ecx, 4
mov eax, 0x301
add cx, word [edx + 0x10]
add cx, ax
mov eax, dword [edx]
shl cx, 5
add cx, word [edx + 0xc]
movzx esi, cx
mov cx, word [edx + 8]
shl cx, 6
add cx, word [edx + 4]
sar eax, 1
shl cx, 5
add cx, ax
movzx eax, cx
push eax
push ebx
call fcn.0040cf40
push esi
push ebx
call fcn.0040cf40
add esp, 0x10
cmp byte [esp + 0x11], 0
je 0x40eb90
cmp dword [edi + 0x34], 0
ja 0x40eb90
jb 0x40eb8c
cmp dword [edi + 0x30], 0x14
jae 0x40eb90
xor eax, eax
jmp 0x40eb93
mov eax, dword [edi + 0x20]
push eax
push ebx
call fcn.0040cf90
add esp, 8
cmp dword [esp + 0x18], 0
je 0x40ebcb
cmp dword [edi + 0x2c], 0
ja 0x40ebbe
jb 0x40ebb2
cmp dword [edi + 0x28], 0xffffffff
jae 0x40ebbe
cmp dword [edi + 0x34], 0
ja 0x40ebbe
cmp dword [edi + 0x30], 0xffffffff
jb 0x40ebcb
push 0xffffffffffffffff
push ebx
call fcn.0040cf90
add esp, 8
jmp 0x40ebf8
cmp dword [edi + 0x2c], 0
mov eax, dword [edi + 0x28]
ja 0x40ebdb
jb 0x40ebde
cmp eax, 0xffffffff
jb 0x40ebde
or eax, 0xffffffff
push eax
push ebx
call fcn.0040cf90
mov eax, dword [edi + 0x30]
add esp, 8
cmp dword [edi + 0x34], 0
ja 0x40ebf8
jb 0x40ebfb
cmp eax, 0xffffffff
jb 0x40ebfb
or eax, 0xffffffff
push eax
push ebx
call fcn.0040cf90
push dword [edi + 0x38]
call fcn.00411770
movzx eax, ax
push eax
push ebx
call fcn.0040cf40
push dword [esp + 0x28]
push dword [edi + 0x3c]
call fcn.0040fcf0
push 0x300
push ebp
movzx esi, ax
call fcn.0040fcf0
add eax, esi
push eax
push ebx
call fcn.0040cf40
add esp, 0x2c
cmp dword [esp + 0x18], 0
jne 0x40ec93
push dword [edi + 0x40]
call fcn.00411770
movzx eax, ax
push eax
push ebx
call fcn.0040cf40
movzx eax, word [edi + 0x44]
push eax
push ebx
call fcn.0040cf40
movzx eax, word [edi + 0x48]
push eax
push ebx
call fcn.0040cf40
push dword [edi + 0x4c]
push ebx
call fcn.0040cf90
mov eax, dword [edi + 0x50]
add esp, 0x24
cmp dword [edi + 0x54], 0
ja 0x40ec88
jb 0x40ec85
cmp eax, 0xffffffff
jae 0x40ec88
push eax
jmp 0x40ec8a
push 0xffffffffffffffff
push ebx
call fcn.0040cf90
add esp, 8
push ebx
call fcn.0040ced0
add esp, 4
test al, al
je 0x40ea19
push ebx
call fcn.0040cea0
mov esi, dword [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x58]
push eax
push esi
call fcn.0040f700
add esp, 0x14
push ebx
test eax, eax
jns 0x40ecd6
call fcn.0040cac0
push ebp
call fcn.0040f760
add esp, 8
jmp 0x40e851
call fcn.0040cac0
mov eax, dword [edi + 0x38]
add esp, 4
test eax, eax
je 0x40ecf7
push eax
push esi
call fcn.00411890
add esp, 8
test eax, eax
js 0x40e744
test ebp, ebp
je 0x40ed12
push 0x300
push ebp
push esi
call fcn.0040fd40
add esp, 0xc
test eax, eax
js 0x40e744
push ebp
call fcn.0040f760
mov eax, dword [edi + 0x3c]
add esp, 4
test eax, eax
je 0x40ed38
push dword [esp + 0x14]
push eax
push esi
call fcn.0040fd40
add esp, 0xc
test eax, eax
js 0x40e74d
cmp dword [esp + 0x18], 0
jne 0x40ed58
mov eax, dword [edi + 0x40]
test eax, eax
je 0x40ed58
push eax
push esi
call fcn.00411890
add esp, 8
test eax, eax
js 0x40e74d
mov ecx, dword [esp + 0x7c]
movzx eax, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041d829
add esp, 0x70
ret