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

Disassembly:
sub esp, 0x120
push ebx
push ebp
mov ebp, dword [esp + 0x130]
mov ebx, eax
xor al, al
push esi
movzx esi, word [ebp + 0xa]
mov byte [esp + 0xe], al
mov byte [esp + 0xf], al
push edi
lea eax, [esp + 0xac]
push eax
mov eax, dword [esp + 0x140]
push esi
mov edx, ebx
mov edi, ecx
call fcn.0040c740
mov eax, dword [esp + 0x148]
mov edx, dword [eax + 8]
lea ecx, [esp + 0xc4]
push ecx
push esi
mov ecx, edi
call fcn.0040c740
mov eax, dword [esp + 0x14c]
add esp, 0x10
lea edx, [esp + 0x14]
push edx
push esi
call fcn.0040b5f0
mov edx, ebx
mov ecx, edi
call fcn.0040c740
lea ebx, [esp + 0x118]
lea edi, [esp + 0xb4]
mov esi, ebp
call fcn.0040c950
lea ebx, [esp + 0x128]
lea edi, [esp + 0xc4]
call fcn.0040c950
mov esi, dword [esp + 0x13c]
mov eax, dword [esp + 0x144]
mov ecx, dword [eax + 4]
push esi
push 0
push 0x2e
push ecx
call fcn.00407c10
push esi
mov esi, dword [esp + 0x15c]
mov edx, dword [esi + 4]
push 0
push 0x2e
push edx
mov edi, eax
call fcn.00407c10
mov ebx, eax
movzx eax, word [esi]
mov ecx, eax
add esp, 0x28
and ecx, 0x40
je 0x40e1d8
test eax, 0x200
jne 0x40e1d8
mov byte [esp + 0x12], 1
test cx, cx
je 0x40e1e9
test eax, 0x200
je 0x40e1e9
mov byte [esp + 0x13], 1
movzx ecx, word [ebp + 0xa]
lea eax, [esp + 0x38]
push eax
push ecx
push 0
push edi
call fcn.00409810
movzx eax, word [ebp + 0xa]
lea edx, [esp + 0x50]
push edx
push eax
push 1
push ebx
call fcn.00409810
lea ecx, [esp + 0x130]
lea edi, [esp + 0x58]
push ecx
mov ebx, edi
mov esi, ebp
call fcn.0040ca30
lea edx, [esp + 0x144]
lea edi, [esp + 0x64]
push edx
mov ebx, edi
call fcn.0040ca30
movzx eax, word [ebp + 0xa]
add esp, 0x28
cmp eax, 3
ja case.0x40e241.0
jmp dword [eax*4 + 0x40e8b8]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x44]
sub eax, ecx
mov dword [esp + 0x24], edx
cdq
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0xbc]
sar edx, 1
add edx, ecx
mov dword [esp + 0x28], edx
mov ecx, eax
jmp 0x40e2e6
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0xc8]
jmp 0x40e2ce
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x44]
sub eax, ecx
mov dword [esp + 0x24], edx
cdq
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0xc4]
sar edx, 1
add edx, ecx
mov dword [esp + 0x28], edx
mov ecx, eax
jmp 0x40e2e6
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0xc0]
sar eax, 1
add eax, ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], eax
mov ecx, eax
mov eax, dword [esp + 0x40]
mov edi, edx
test byte [ebp + 4], 8
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], edi
je 0x40e402
cmp ecx, eax
jne 0x40e352
cmp edx, edi
jne 0x40e352
push 8
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.00404360
push 8
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x78]
push edx
call fcn.00404360
push 8
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.00404360
push 8
lea edx, [esp + 0x68]
push edx
lea eax, [esp + 0xa0]
push eax
jmp 0x40e47e
push 8
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x64]
push edx
call fcn.00404360
push 8
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x78]
push ecx
call fcn.00404360
push 8
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x8c]
push eax
call fcn.00404360
push 8
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0xa0]
push edx
call fcn.00404360
push 8
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0xb4]
push ecx
call fcn.00404360
push 8
lea edx, [esp + 0x88]
push edx
lea eax, [esp + 0xc8]
push eax
call fcn.00404360
add esp, 0x48
push 8
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x94]
push edx
call fcn.00404360
push 8
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0xa8]
push ecx
call fcn.00404360
add esp, 0x18
mov dword [esp + 0x34], 4
jmp 0x40e48e
cmp ecx, eax
jne 0x40e439
cmp edx, edi
jne 0x40e439
push 8
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.00404360
push 8
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x78]
push edx
call fcn.00404360
add esp, 0x18
mov dword [esp + 0x34], 1
jmp 0x40e48e
push 8
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.00404360
push 8
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x78]
push eax
call fcn.00404360
push 8
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x8c]
push edx
call fcn.00404360
push 8
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0xa0]
push ecx
call fcn.00404360
mov dword [esp + 0x64], 2
add esp, 0x30
mov edi, dword [esp + 0x144]
mov ebx, dword [esp + 0x148]
lea edx, [esp + 0x50]
push edx
mov esi, 2
push edi
mov word [esp + 0x58], si
mov word [esp + 0x5a], 0x81
mov dword [esp + 0x5c], 1
mov dword [esp + 0x60], ebx
call fcn.00407060
lea eax, [esp + 0x10c]
push eax
push edi
mov word [esp + 0x114], si
mov dword [esp + 0x118], 0
mov dword [esp + 0x11c], ebx
call fcn.00407080
push 0
push edi
call fcn.00407110
mov esi, dword [esp + 0x4c]
add esp, 0x18
cmp si, 1
jbe 0x40e50c
push 0
push edi
call fcn.00407110
add esp, 8
test si, si
jbe 0x40e534
movzx ecx, word [esp + 0x34]
lea esi, [esp + 0x5c]
mov dword [esp + 0x14], ecx
mov edi, edi
push esi
push edi
call fcn.00406f00
add esp, 8
add esi, 0x10
sub dword [esp + 0x14], 1
jne 0x40e520
cmp word [esp + 0x34], 1
jbe 0x40e547
push 0
push edi
call fcn.00407130
add esp, 8
push ebx
push 2
push edi
call fcn.004070a0
mov eax, dword [ebp + 4]
add esp, 0xc
test al, 8
je 0x40e575
test eax, 0x8000
je 0x40e575
push edi
mov esi, 2
lea ecx, [esp + 0x3c]
mov edx, ebp
call fcn.0040cba0
add esp, 4
test byte [ebp + 4], 0x10
je 0x40e644
lea edx, [esp + 0x50]
push edx
push edi
mov word [esp + 0x58], 2
mov word [esp + 0x5a], 0x83
mov dword [esp + 0x5c], 1
mov dword [esp + 0x60], ebx
call fcn.00407060
xor eax, eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov eax, 6
add esp, 8
cmp byte [esp + 0x12], 0
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
je 0x40e5f0
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x74]
add eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x70]
sar eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x78]
add eax, edx
jmp 0x40e615
cmp byte [esp + 0x13], 0
jne 0x40e644
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x64]
lea eax, [edx + ecx]
mov ecx, dword [esp + 0x68]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x60]
add eax, ecx
cdq
sub eax, edx
sar eax, 1
lea edx, [esp + 0x14]
mov dword [esp + 0x18], eax
push edx
lea eax, [esp + 0xa0]
push eax
mov ecx, eax
push ecx
call fcn.00404c10
lea edx, [esp + 0xa8]
push edx
push edi
call fcn.00406f60
add esp, 0x14
mov eax, dword [ebp + 4]
test al, 0x20
je 0x40e87f
test al, 8
je 0x40e87f
cmp byte [esp + 0x12], 0
mov word [esp + 0xe4], 0
mov eax, 4
jne 0x40e671
movzx eax, word [ebp + 0xa]
cmp byte [esp + 0x13], 0
jne 0x40e87f
movzx ecx, ax
cmp ecx, 4
ja case.0x40e684.0
jmp dword [ecx*4 + 0x40e8c8]
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0xac]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x60]
jmp 0x40e6ff
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x68]
jmp 0x40e707
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xb4]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x68]
jmp 0x40e707
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x60]
jmp 0x40e6ff
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0xb8]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x5c]
movzx esi, word [ebp + 0xa]
mov dword [esp + 0x1c], ecx
movzx ecx, si
cmp ecx, 3
mov dword [esp + 0x20], edx
ja case.0x40e71b.3
jmp dword [ecx*4 + 0x40e8dc]
sub ax, si
neg ax
sbb eax, eax
and eax, 0xfffffff2
add eax, 0x10
jmp 0x40e769
sub ax, si
neg ax
sbb eax, eax
and eax, 0xc
add eax, 4
jmp 0x40e769
xor ecx, ecx
cmp ax, si
sete cl
lea ecx, [ecx*4 + 4]
mov word [esp + 0xe4], cx
jmp 0x40e771
sub ax, si
neg ax
sbb eax, eax
and eax, 6
add eax, 2
mov word [esp + 0xe4], ax
lea edx, [esp + 0x14]
push edx
mov eax, edx
push eax
call fcn.00404c90
push 5
lea ecx, [esp + 0x20]
push 5
push ecx
mov edx, ecx
push edx
call fcn.00404ac0
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x30]
xor ecx, ecx
add eax, 0xfffffff6
test eax, eax
setl cl
xor edx, edx
sub ecx, 1
and ecx, eax
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x2c]
mov esi, ecx
add eax, 0xfffffff6
test eax, eax
setl dl
push esi
sub edx, 1
and eax, edx
push eax
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00404b00
push 0x10
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0xfc]
push eax
call fcn.00404360
or word [esp + 0x118], 0x3c80
mov eax, 2
xor esi, esi
add esp, 0x34
test dword [ebp + 4], 0x1000
mov word [esp + 0xe8], ax
mov word [esp + 0xea], 0x85
mov dword [esp + 0xec], esi
mov dword [esp + 0xf0], ebx
mov word [esp + 0xf4], ax
mov word [esp + 0xf6], 0x83
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], ebx
mov dword [esp + 0xdc], esi
mov dword [esp + 0xe0], ebx
mov word [esp + 0x100], 0xffff
je 0x40e860
or word [esp + 0xe4], 1
push esi
push edi
call fcn.00407110
lea ecx, [esp + 0xd4]
push ecx
push edi
call fcn.00406fd0
push esi
push edi
call fcn.00407130
add esp, 0x18
push edi
call fcn.004070d0
push 0
push edi
call fcn.00407130
add esp, 0xc
cmp byte [esp + 0x12], 0
je 0x40e8a3
mov eax, dword [esp + 0x140]
or word [eax], 0x200
mov dl, byte [edi + 6]
pop edi
pop esi
and dl, 1
pop ebp
movzx ax, dl
pop ebx
add esp, 0x120
ret