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

Disassembly:
sub esp, 0xec
push ebx
push ebp
mov ebp, dword [esp + 0xfc]
push esi
movzx esi, word [ebp + 0xa]
push edi
mov edi, eax
xor al, al
mov byte [esp + 0x12], al
mov byte [esp + 0x13], al
lea eax, [esp + 0x78]
push eax
mov eax, dword [esp + 0x10c]
push esi
mov ecx, edi
call fcn.0040c740
mov eax, dword [esp + 0x114]
mov edx, dword [eax + 8]
lea ecx, [esp + 0xd4]
push ecx
push esi
mov ecx, edi
call fcn.0040c740
lea ebx, [esp + 0xfc]
lea edi, [esp + 0x88]
mov esi, ebp
call fcn.0040c950
lea ebx, [esp + 0xec]
lea edi, [esp + 0xdc]
call fcn.0040c950
mov esi, dword [esp + 0x110]
mov edx, dword [esp + 0x118]
mov eax, dword [edx + 4]
push esi
push 0
push 0x2e
push eax
call fcn.00407c10
push esi
mov esi, dword [esp + 0x130]
mov ecx, dword [esi + 4]
push 0
push 0x2e
push ecx
mov edi, eax
call fcn.00407c10
mov ebx, eax
movzx eax, word [esi]
mov ecx, eax
add esp, 0x30
and ecx, 0x20
je 0x40db45
test eax, 0x100
jne 0x40db45
mov byte [esp + 0x12], 1
test cx, cx
je 0x40db56
test eax, 0x100
je 0x40db56
mov byte [esp + 0x13], 1
movzx eax, word [ebp + 0xa]
lea edx, [esp + 0x2c]
push edx
push eax
push 3
push edi
call fcn.00409810
movzx edx, word [ebp + 0xa]
lea ecx, [esp + 0x44]
push ecx
push edx
push 2
push ebx
call fcn.00409810
lea eax, [esp + 0x10c]
lea edi, [esp + 0x4c]
push eax
mov ebx, edi
mov esi, ebp
call fcn.0040ca30
lea ecx, [esp + 0x100]
lea edi, [esp + 0x58]
push ecx
mov ebx, edi
call fcn.0040ca30
movzx eax, word [ebp + 0xa]
add esp, 0x28
cmp eax, 3
ja case.default.0x40dbae
jmp dword [eax*4 + 0x40e0b0]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
jmp 0x40dc08
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
jmp 0x40dc00
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
jmp 0x40dc08
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
jmp 0x40dc08
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0xd8]
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], ecx
test byte [ebp + 4], 8
push 8
je 0x40dc52
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00404360
push 8
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x58]
push eax
call fcn.00404360
push 8
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x6c]
push edx
call fcn.00404360
push 8
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x80]
push ecx
jmp 0x40dc92
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00404360
push 8
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.00404360
push 8
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.00404360
push 8
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x80]
push eax
call fcn.00404360
mov edi, dword [esp + 0x140]
mov ebx, dword [esp + 0x144]
add esp, 0x30
lea ecx, [esp + 0x5c]
push ecx
mov esi, 2
push edi
mov word [esp + 0x64], si
mov word [esp + 0x66], 0x81
mov dword [esp + 0x68], 1
mov dword [esp + 0x6c], ebx
call fcn.00407060
lea edx, [esp + 0xc8]
push edx
push edi
mov word [esp + 0xd0], si
mov dword [esp + 0xd4], 0
mov dword [esp + 0xd8], ebx
call fcn.00407080
push 0
push edi
call fcn.00407110
add esp, 0x18
test byte [ebp + 4], 8
je 0x40dd3e
push 0
push edi
call fcn.00407110
add esp, 8
lea esi, [esp + 0x3c]
mov dword [esp + 0x14], 2
push esi
push edi
call fcn.00406f00
add esp, 8
add esi, 0x10
sub dword [esp + 0x14], 1
jne 0x40dd20
push 0
push edi
call fcn.00407130
jmp 0x40dd49
lea eax, [esp + 0x3c]
push eax
push edi
call fcn.00406f00
add esp, 8
push ebx
push 2
push edi
call fcn.004070a0
mov eax, dword [ebp + 4]
add esp, 0xc
test al, 8
je 0x40dd7a
test eax, 0x8000
je 0x40dd7a
push edi
mov esi, 1
lea ecx, [esp + 0x30]
mov edx, ebp
call fcn.0040cba0
add esp, 4
test byte [ebp + 4], 0x10
je 0x40de39
lea ecx, [esp + 0x5c]
push ecx
push edi
mov word [esp + 0x64], 2
mov word [esp + 0x66], 0x83
mov dword [esp + 0x68], 1
mov dword [esp + 0x6c], ebx
call fcn.00407060
xor esi, esi
mov eax, 6
add esp, 8
cmp byte [esp + 0x12], 0
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
je 0x40ddea
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
add eax, edx
cdq
sub eax, edx
mov edx, dword [esp + 0x58]
sar eax, 1
mov dword [esp + 0x14], eax
lea eax, [edx + ecx]
jmp 0x40de0e
cmp byte [esp + 0x13], 0
jne 0x40de3b
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
add eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x40]
sar eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x48]
add eax, edx
cdq
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x6c]
mov dword [esp + 0x1c], eax
push edx
mov eax, edx
push eax
call fcn.00404c10
lea ecx, [esp + 0x74]
push ecx
push edi
call fcn.00406f60
add esp, 0x14
jmp 0x40de3b
xor esi, esi
mov eax, dword [ebp + 4]
test al, 0x20
je 0x40e076
test al, 8
je 0x40e076
cmp byte [esp + 0x12], 0
mov word [esp + 0xa0], si
mov eax, 4
jne 0x40de66
movzx eax, word [ebp + 0xa]
cmp byte [esp + 0x13], 0
jne 0x40e076
movzx ecx, ax
cmp ecx, 4
ja case.0x40de79.0
jmp dword [ecx*4 + 0x40e0c0]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x84]
jmp 0x40defe
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x40]
jmp 0x40defe
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x44]
jmp 0x40def6
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x40]
jmp 0x40defe
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x80]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x48]
movzx esi, word [ebp + 0xa]
mov dword [esp + 0x20], ecx
movzx ecx, si
cmp ecx, 3
mov dword [esp + 0x1c], edx
ja case.0x40df12.0
jmp dword [ecx*4 + 0x40e0d4]
sub ax, si
neg ax
sbb eax, eax
and eax, 0xfffffff2
add eax, 0x10
jmp 0x40df60
sub ax, si
neg ax
sbb eax, eax
and eax, 0xc
add eax, 4
jmp 0x40df60
xor edx, edx
cmp ax, si
sete dl
lea edx, [edx*4 + 4]
mov word [esp + 0xa0], dx
jmp 0x40df68
sub ax, si
neg ax
sbb eax, eax
and eax, 6
add eax, 2
mov word [esp + 0xa0], ax
lea eax, [esp + 0x14]
push eax
mov ecx, eax
push ecx
call fcn.00404c90
push 5
lea edx, [esp + 0x20]
push 5
push edx
mov eax, edx
push eax
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 + 0xb8]
push eax
call fcn.00404360
or word [esp + 0xd4], 0x3c80
mov eax, 2
xor esi, esi
add esp, 0x34
test dword [ebp + 4], 0x1000
mov word [esp + 0xa4], ax
mov word [esp + 0xa6], 0x85
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], ebx
mov word [esp + 0xb0], ax
mov word [esp + 0xb2], 0x83
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], ebx
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], ebx
mov word [esp + 0xbc], 0xffff
je 0x40e057
or word [esp + 0xa0], 1
push esi
push edi
call fcn.00407110
lea ecx, [esp + 0x90]
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 0x40e09a
mov eax, dword [esp + 0x10c]
or word [eax], 0x100
mov dl, byte [edi + 6]
pop edi
pop esi
and dl, 1
pop ebp
movzx ax, dl
pop ebx
add esp, 0xec
ret