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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x23c
mov eax, dword [0x446e40]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
push edi
mov dword [esp + 0x10], 0
jne 0x405e85
mov ax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.00439534
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x64]
push eax
call fcn.004081b0
add esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x405eb2
mov ax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.00439534
mov esp, ebp
pop ebp
ret
cmp word [esi + 4], 0
je 0x405ed2
mov ax, 3
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.00439534
mov esp, ebp
pop ebp
ret
movzx eax, word [esi + 6]
test al, 1
je 0x405ef3
mov ax, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.00439534
mov esp, ebp
pop ebp
ret
lea ebx, [esi + 0x40]
push ebx
lea edi, [esi + 0x50]
or eax, 8
push edi
push ebx
mov word [esi + 6], ax
call fcn.00404ec0
lea ecx, [esp + 0x5c]
push ecx
push edi
push esi
call fcn.00404910
lea edx, [esp + 0x58]
push edx
push ebx
push esi
call fcn.00404910
movzx ecx, word [esi + 0x78]
mov eax, dword [esi + 8]
push ecx
mov dword [esp + 0x3c], eax
call fcn.00404330
add esp, 0x28
test eax, eax
mov dword [esp + 0x74], eax
je 0x405eda
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov edi, dword [edx]
mov eax, dword [edi]
test eax, eax
mov dword [esp + 0x20], edi
mov edi, edi
je 0x406aa6
add eax, 0xffffffff
cmp eax, 0xfe
ja case.0x405f6b.20
movzx eax, byte [eax + 0x406b4c]
jmp dword [eax*4 + 0x406af0]
mov eax, dword [esi + 0xb4]
test eax, eax
je case.0x405f6b.20
lea ecx, [edi + 8]
push ecx
push ebx
call eax
add edi, 4
add esp, 8
add edi, dword [edi]
jmp 0x405f46
mov eax, dword [esi + 0xb8]
test eax, eax
je case.0x405f6b.20
lea edx, [edi + 8]
push edx
push ebx
call eax
add edi, 4
add esp, 8
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x84], 0
je case.0x405f6b.20
push 8
lea eax, [edi + 8]
push eax
lea ecx, [esp + 0x68]
push ecx
call fcn.00404360
mov al, byte [esi + 0x60]
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
add esp, 0xc
test al, al
je 0x405feb
cmp word [esp + 0x10], 0
mov ebx, dword [esp + 0x14]
je 0x406003
cmp ecx, dword [esp + 0x50]
jl 0x406003
cmp ecx, dword [esp + 0x58]
jg 0x406003
cmp edx, dword [esp + 0x54]
jl 0x406003
cmp edx, dword [esp + 0x5c]
jle 0x406033
test al, al
je case.0x405f6b.20
cmp ecx, dword [esp + 0x40]
jl case.0x405f6b.20
cmp ecx, dword [esp + 0x48]
jg case.0x405f6b.20
cmp edx, dword [esp + 0x44]
jl case.0x405f6b.20
cmp edx, dword [esp + 0x4c]
jg case.0x405f6b.20
lea edx, [esp + 0x60]
push edx
mov eax, edx
push eax
push esi
call fcn.004047d0
mov edx, dword [esi + 0x84]
lea ecx, [esp + 0x6c]
push ecx
push ebx
call edx
add edi, 4
add esp, 0x14
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x88], 0
je case.0x405f6b.20
push 0x10
lea eax, [edi + 8]
push eax
lea ecx, [esp + 0x90]
push ecx
call fcn.00404360
lea edx, [esp + 0x27]
push edx
push 0
push 0
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0xa4]
push ecx
lea edx, [esp + 0x70]
push edx
push eax
push ecx
call fcn.00405070
mov al, byte [esi + 0x60]
add esp, 0x2c
test al, al
je 0x4060b3
cmp word [esp + 0x10], 0
je 0x4060ba
cmp byte [esp + 0x1b], 0
jne 0x4060e0
test al, al
je case.0x405f6b.20
lea edx, [esp + 0x88]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00404de0
add esp, 8
test ax, ax
je case.0x405f6b.20
lea ecx, [esp + 0x88]
push ecx
mov edx, ecx
push edx
push esi
call fcn.004047d0
lea eax, [esp + 0x9c]
push eax
mov ecx, eax
push ecx
push esi
call fcn.004047d0
mov eax, dword [esi + 0x88]
lea edx, [esp + 0xa0]
push edx
push ebx
call eax
add edi, 4
add esp, 0x20
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x8c], 0
je case.0x405f6b.20
push 0x10
lea ecx, [edi + 8]
push ecx
lea edx, [esp + 0xfc]
push edx
call fcn.00404360
add esp, 0xc
cmp byte [esi + 0x60], 0
je 0x406151
cmp word [esp + 0x10], 0
je 0x40616b
lea eax, [esp + 0xf4]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00404de0
add esp, 8
test ax, ax
jne 0x406193
cmp byte [esi + 0x60], 0
je case.0x405f6b.20
lea edx, [esp + 0xf4]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00404de0
add esp, 8
test ax, ax
je case.0x405f6b.20
lea ecx, [esp + 0xf4]
push ecx
mov edx, ecx
push edx
push esi
call fcn.004047d0
lea eax, [esp + 0x108]
push eax
mov ecx, eax
push ecx
push esi
call fcn.004047d0
mov eax, dword [esi + 0x8c]
lea edx, [esp + 0x10c]
push edx
push ebx
call eax
add edi, 4
add esp, 0x20
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x88], 0
je case.0x405f6b.20
cmp dword [esi + 0xa0], 0
je case.0x405f6b.20
push 0x20
lea ecx, [edi + 8]
push ecx
lea edx, [esp + 0xa0]
push edx
call fcn.00404360
add esp, 0xc
cmp byte [esi + 0x60], 0
je 0x406211
cmp word [esp + 0x10], 0
je 0x40622b
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00404de0
add esp, 8
test ax, ax
jne 0x406253
cmp byte [esi + 0x60], 0
je case.0x405f6b.20
lea edx, [esp + 0x98]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00404de0
add esp, 8
test ax, ax
je case.0x405f6b.20
lea ecx, [esp + 0x98]
push ecx
mov edx, ecx
push edx
push esi
call fcn.004047d0
lea eax, [esp + 0xac]
push eax
mov ecx, eax
push ecx
push esi
call fcn.004047d0
lea edx, [esp + 0x130]
push edx
lea eax, [esp + 0xc4]
push eax
call fcn.00405370
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0xcc]
push edx
call fcn.004054a0
add esp, 0x28
test byte [esp + 0xb4], 1
je 0x4062bf
mov ecx, dword [esi + 0xa0]
lea eax, [esp + 0x124]
push eax
push ebx
call ecx
jmp 0x4062d0
mov eax, dword [esi + 0xa0]
lea edx, [esp + 0x118]
push edx
push ebx
call eax
add esp, 8
test byte [esp + 0xb4], 2
je 0x4062fe
mov eax, 1
add dword [esp + 0x98], eax
add dword [esp + 0x9c], eax
sub dword [esp + 0xa0], eax
sub dword [esp + 0xa4], eax
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0xa4]
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0x88]
push ebx
mov dword [esp + 0x44], edx
call ecx
mov edx, dword [esp + 0xa8]
mov eax, dword [esp + 0xac]
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x44], edx
mov edx, dword [esi + 0x88]
push ebx
mov dword [esp + 0x4c], eax
call edx
add esp, 0x10
test byte [esp + 0xb4], 1
je 0x406375
mov ecx, dword [esi + 0xa0]
lea eax, [esp + 0x118]
push eax
push ebx
call ecx
jmp 0x406386
mov eax, dword [esi + 0xa0]
lea edx, [esp + 0x124]
push edx
push ebx
call eax
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0xa0]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], eax
add esp, 8
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0x88]
push ebx
mov dword [esp + 0x40], edx
call ecx
mov edx, dword [esp + 0xa8]
mov eax, dword [esp + 0xac]
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x44], edx
mov edx, dword [esi + 0x88]
push ebx
mov dword [esp + 0x4c], eax
call edx
add edi, 4
add esp, 0x10
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x90], 0
je case.0x405f6b.20
push 0x10
lea eax, [edi + 8]
push eax
lea ecx, [esp + 0x110]
push ecx
call fcn.00404360
add esp, 0xc
cmp byte [esi + 0x60], 0
je 0x40641e
cmp word [esp + 0x10], 0
je 0x406438
lea edx, [esp + 0x108]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00404de0
add esp, 8
test ax, ax
jne 0x406460
cmp byte [esi + 0x60], 0
je case.0x405f6b.20
lea ecx, [esp + 0x108]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00404de0
add esp, 8
test ax, ax
je case.0x405f6b.20
lea eax, [esp + 0x108]
push eax
mov ecx, eax
push ecx
push esi
call fcn.004047d0
lea edx, [esp + 0x11c]
push edx
mov eax, edx
push eax
push esi
call fcn.004047d0
mov edx, dword [esi + 0x90]
lea ecx, [esp + 0x120]
push ecx
push ebx
call edx
add edi, 4
add esp, 0x20
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x94], 0
je case.0x405f6b.20
mov eax, dword [esp + 0x74]
push eax
lea ecx, [edi + 8]
push ecx
call fcn.004049c0
mov ebx, eax
mov eax, dword [ebx + 4]
movzx ecx, word [ebx + 2]
lea edx, [esp + 0x138]
push edx
push eax
push ecx
call fcn.00404f50
add esp, 0x14
cmp byte [esi + 0x60], 0
je 0x4064e4
cmp word [esp + 0x10], 0
je 0x4064fe
lea edx, [esp + 0x130]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00404de0
add esp, 8
test ax, ax
jne 0x40651e
cmp byte [esi + 0x60], 0
je 0x406564
lea ecx, [esp + 0x130]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00404de0
add esp, 8
test ax, ax
je 0x406564
cmp word [ebx + 2], 0
mov edi, dword [ebx + 4]
mov dword [esp + 0x70], 0
jle 0x40654f
push edi
push edi
push esi
call fcn.004047d0
mov eax, dword [esp + 0x7c]
add eax, 1
add esp, 0xc
add edi, 8
cmp ax, word [ebx + 2]
mov dword [esp + 0x70], eax
jl 0x406530
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x94]
push ebx
push eax
call ecx
mov edi, dword [esp + 0x28]
add esp, 8
mov ebx, dword [esp + 0x14]
add edi, 4
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x98], 0
je case.0x405f6b.20
push 0xdc
lea edx, [edi + 8]
push edx
lea eax, [esp + 0x168]
push eax
call fcn.00404360
add esp, 0xc
cmp byte [esi + 0x60], 0
je 0x4065a2
cmp word [esp + 0x10], 0
je 0x4065bc
lea ecx, [esp + 0x160]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00404de0
add esp, 8
test ax, ax
jne 0x4065dc
cmp byte [esi + 0x60], 0
je case.0x405f6b.20
lea eax, [esp + 0x160]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00404de0
add esp, 8
test ax, ax
je case.0x405f6b.20
lea edx, [esp + 0x160]
push edx
mov eax, edx
push eax
push esi
call fcn.00404840
mov edx, dword [esi + 0x98]
lea ecx, [esp + 0x16c]
push ecx
push ebx
call edx
add edi, 4
add esp, 0x14
add edi, dword [edi]
jmp 0x405f46
push 0x38
lea eax, [edi + 8]
push eax
lea ecx, [esp + 0xa0]
push ecx
call fcn.00404360
add esp, 0xc
cmp byte [esi + 0x60], 0
je 0x40662f
cmp word [esp + 0x10], 0
je 0x406649
lea edx, [esp + 0x98]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00404de0
add esp, 8
test ax, ax
jne 0x406671
cmp byte [esi + 0x60], 0
je case.0x405f6b.20
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00404de0
add esp, 8
test ax, ax
je case.0x405f6b.20
test byte [esp + 0xb0], 0x80
je 0x40668f
lea eax, [esp + 0x98]
push eax
mov ecx, eax
push ecx
push esi
call fcn.00404840
add esp, 0xc
lea eax, [esi + 0x84]
push eax
lea edx, [esp + 0x9c]
push edx
push esi
call fcn.0040a3f0
add edi, 4
add esp, 0xc
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0x9c], 0
je case.0x405f6b.20
push 0xc
lea eax, [edi + 8]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00404360
movsx eax, word [esp + 0x38]
mov edx, dword [esp + 0x30]
mov ecx, edx
sub ecx, eax
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x34]
sub ecx, eax
add eax, edx
add esp, 0xc
cmp byte [esi + 0x60], 0
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
je 0x40670d
cmp word [esp + 0x10], 0
je 0x406724
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00404de0
add esp, 8
test ax, ax
jne 0x406749
cmp byte [esi + 0x60], 0
je case.0x405f6b.20
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00404de0
add esp, 8
test ax, ax
je case.0x405f6b.20
lea eax, [esp + 0x24]
push eax
mov ecx, eax
push ecx
push esi
call fcn.004047d0
movsx eax, word [esp + 0x38]
lea edx, [esp + 0x74]
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
push edx
mov eax, edx
push eax
push esi
call fcn.004047d0
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x84]
add esp, 0x18
cmp eax, ecx
jl 0x40678a
mov ax, cx
mov ecx, dword [esp + 0x24]
mov word [esp + 0x2c], ax
movsx eax, ax
mov edx, ecx
sub edx, eax
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0x28]
mov ebx, edx
sub ebx, eax
add ecx, eax
add eax, edx
lea edx, [esp + 0x78]
mov dword [esp + 0x84], eax
push edx
mov eax, edx
push eax
push esi
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ecx
call fcn.00404840
mov ebx, dword [esp + 0x20]
mov edx, dword [esi + 0x9c]
lea ecx, [esp + 0x30]
push ecx
push ebx
call edx
add edi, 4
add esp, 0x14
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0xa0], 0
je case.0x405f6b.20
push 0xc
lea eax, [edi + 8]
push eax
lea ecx, [esp + 0xe4]
push ecx
call fcn.00404360
add esp, 0xc
test byte [esp + 0xdc], 2
je 0x406850
mov eax, dword [esp + 0xe4]
test eax, eax
jne 0x406833
mov edx, dword [0x4441b8]
mov dword [esp + 0xe0], edx
jmp 0x406850
mov ecx, dword [esi]
mov edx, dword [esp + 0xe0]
push ecx
push edx
push 7
push eax
call fcn.00407c10
add esp, 0x10
mov dword [esp + 0xe0], eax
mov ecx, dword [esi + 0xa0]
lea eax, [esp + 0xdc]
push eax
push ebx
call ecx
add edi, 4
add esp, 8
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0xa4], 0
je case.0x405f6b.20
push 0xc
lea edx, [edi + 8]
push edx
lea eax, [esp + 0xf0]
push eax
call fcn.00404360
add esp, 0xc
test byte [esp + 0xe8], 2
je 0x4068d2
mov eax, dword [esp + 0xf0]
test eax, eax
jne 0x4068b5
mov ecx, dword [0x4441dc]
mov dword [esp + 0xec], ecx
jmp 0x4068d2
mov edx, dword [esi]
mov ecx, dword [esp + 0xec]
push edx
push ecx
push 0xa
push eax
call fcn.00407c10
add esp, 0x10
mov dword [esp + 0xec], eax
mov eax, dword [esi + 0xa4]
lea edx, [esp + 0xe8]
push edx
push ebx
call eax
add edi, 4
add esp, 8
add edi, dword [edi]
jmp 0x405f46
cmp dword [esi + 0xa8], 0
je case.0x405f6b.20
push 0xc
lea ecx, [edi + 8]
push ecx
lea edx, [esp + 0xd8]
push edx
call fcn.00404360
add esp, 0xc
test byte [esp + 0xd0], 2
je 0x40694c
mov eax, dword [esp + 0xd8]
test eax, eax
jne 0x40692f
mov eax, dword [0x4441bc]
jmp 0x406945
mov ecx, dword [esi]
mov edx, dword [esp + 0xd4]
push ecx
push edx
push 9
push eax
call fcn.00407c10
add esp, 0x10
mov dword [esp + 0xd4], eax
mov ecx, dword [esi + 0xa8]
lea eax, [esp + 0xd0]
push eax
push ebx
call ecx
add edi, 4
add esp, 8
add edi, dword [edi]
jmp 0x405f46
push 0x20
lea edx, [edi + 8]
push edx
lea eax, [esp + 0x148]
push eax
call fcn.00404360
add esp, 0xc
test byte [esp + 0x15c], 1
je 0x40698f
add dword [esp + 0x10], 1
cmp byte [esi + 0x60], 0
je case.0x405f6b.20
lea ecx, [esp + 0x140]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00404de0
add esp, 8
test ax, ax
jne case.0x405f6b.20
mov eax, dword [esp + 0x154]
mov edi, dword [esp + 0x150]
mov dword [esp + 0x1c], eax
jmp 0x405f46
push 4
lea eax, [edi + 8]
push eax
lea ecx, [esp + 0x10c]
push ecx
call fcn.00404360
mov edx, dword [esp + 0x110]
add esp, 0xc
test byte [edx + 0x1c], 1
je case.0x405f6b.20
add dword [esp + 0x10], 0xffff
add edi, 4
add edi, dword [edi]
jmp 0x405f46
mov al, byte [edi + 8]
add edi, 4
mov byte [esi + 0x60], al
add edi, dword [edi]
jmp 0x405f46
mov eax, dword [esi + 0xac]
test eax, eax
lea ebx, [edi + 8]
je 0x406a2f
mov ecx, dword [esp + 0x14]
push ebx
push ecx
call eax
add esp, 8
movzx edx, byte [ebx]
push edx
call fcn.00401ab0
mov ebx, dword [esp + 0x18]
add edi, 4
add esp, 4
mov dword [esi + 0xc], eax
add edi, dword [edi]
jmp 0x405f46
mov eax, dword [esi + 0xb0]
jmp 0x405f78
mov eax, dword [esi + 0xbc]
test eax, eax
je case.0x405f6b.20
lea edx, [edi + 8]
push edx
push ebx
call eax
add edi, 4
add esp, 8
add edi, dword [edi]
jmp 0x405f46
mov eax, dword [esi + 0xc0]
jmp 0x405f78
mov eax, dword [esi + 0xc4]
test eax, eax
je case.0x405f6b.20
lea edx, [edi + 8]
push edx
push ebx
call eax
add edi, 4
add esp, 8
add edi, dword [edi]
jmp 0x405f46
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00408240
add esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x405f40
mov edx, dword [esp + 0x74]
push edx
call fcn.00404350
push esi
call fcn.00407490
and word [esi + 6], 0xfff7
mov ecx, dword [esp + 0x24c]
add esp, 8
pop edi
pop esi
pop ebx
xor ecx, esp
xor ax, ax
call fcn.00439534
mov esp, ebp
pop ebp
ret