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

Disassembly:
push 0xffffffffffffffff
push 0x486f3b
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x49e7c0]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49e7c0]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov eax, dword [esp + 0xb0]
mov edi, dword [esp + 0xa8]
mov ebx, dword [esp + 0xac]
xor esi, esi
mov ecx, 7
mov dword [esp + 0x18], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x70], esi
mov word [esp + 0x60], si
mov dword [esp + 0xa0], esi
mov dword [esp + 0x58], ecx
mov dword [esp + 0x54], esi
mov word [esp + 0x44], si
mov eax, dword [edi + 0x40]
cmp eax, esi
mov byte [esp + 0xa0], 1
je 0x40597a
cmp eax, 6
je 0x40597a
cmp dword [edi + 0x18], 8
lea ebp, [edi + 4]
jb 0x4058e6
mov eax, dword [ebp]
jmp 0x4058e8
mov eax, ebp
push eax
call fcn.00442030
mov esi, eax
add esp, 4
test esi, esi
jne 0x40593c
mov esi, 8
cmp dword [esp + 0x58], esi
jb 0x40590f
mov ecx, dword [esp + 0x44]
push ecx
call fcn.004775de
add esp, 4
xor eax, eax
cmp dword [esp + 0x74], esi
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], eax
mov word [esp + 0x44], ax
jb 0x405935
mov edx, dword [esp + 0x60]
push edx
call fcn.004775de
add esp, 4
xor eax, eax
jmp 0x405d0c
cmp dword [edi + 0x18], 8
jb 0x405947
mov eax, dword [ebp]
jmp 0x405949
mov eax, ebp
lea ecx, [esi - 1]
push ecx
push eax
lea ecx, [esp + 0x64]
call fcn.00402680
cmp dword [edi + 0x18], 8
mov eax, dword [edi + 0x14]
jb 0x405963
mov ebp, dword [ebp]
sub eax, esi
push eax
lea edx, [ebp + esi*2]
push edx
lea ecx, [esp + 0x48]
call fcn.00402680
mov ecx, dword [esp + 0x74]
xor esi, esi
mov eax, dword [edi + 0x40]
cmp eax, 6
ja case.0x405986.1
jmp dword [eax*4 + 0x405d34]
cmp dword [edi + 0x18], 8
jb 0x4059a4
mov edi, dword [edi + 4]
push ebx
push 1
push 1
push esi
push esi
push esi
push edi
jmp 0x405c6e
push ebx
push 1
push 1
push esi
push esi
add edi, 4
push esi
push edi
jmp 0x405c6e
mov dword [esp + 0x14], esi
cmp ecx, 8
mov eax, dword [esp + 0x60]
mov byte [esp + 0xa0], 2
jae 0x4059ce
lea eax, [esp + 0x60]
lea ecx, [esp + 0x14]
push ecx
push 1
push 1
push esi
push esi
push esi
push eax
call fcn.00408e30
mov esi, eax
mov eax, dword [esp + 0x30]
xor ebp, ebp
add esp, 0x1c
cmp eax, ebp
jne 0x405a05
lea ecx, [esp + 0x14]
mov byte [esp + 0xa0], 1
call fcn.00401000
jmp 0x405c7a
cmp dword [0x4a0540], ebp
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0xb4]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebp
je 0x405a34
mov dword [esp + 0x20], 0x10
mov ecx, dword [edi + 0x44]
add dword [eax + 4], 1
lea edx, [esp + 0x1c]
push edx
push ebx
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
mov dword [ecx], eax
call dword [0x49fc00]
mov esi, eax
cmp esi, 0xfffffff8
jne 0x405c20
cmp byte [esp + 0xb8], 0
je 0x405c20
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
lea edx, [esp + 0x30]
push edx
mov byte [esp + 0xa4], 3
call fcn.004055b0
add esp, 4
lea ecx, [esp + 0x30]
call fcn.00401370
test eax, eax
jle 0x405b29
lea esp, [esp]
push ebp
lea ecx, [esp + 0x34]
call fcn.004013a0
cmp dword [eax + 0x18], 8
jb 0x405ab5
mov eax, dword [eax + 4]
jmp 0x405ab8
add eax, 4
mov edx, dword [edi + 0x44]
lea ecx, [esp + 0x1c]
push ecx
push ebx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
test eax, eax
push edx
push ecx
mov dword [esp + 0x28], esp
mov ecx, esp
je 0x405ad9
add dword [eax + 4], 1
mov dword [ecx], eax
call dword [0x49fc00]
mov esi, eax
test esi, esi
lea ecx, [esp + 0x30]
je 0x405af9
add ebp, 1
call fcn.00401370
cmp ebp, eax
jl 0x405aa0
jmp 0x405b29
push ebp
call fcn.004013a0
cmp dword [eax + 0x18], 8
jb 0x405b0a
mov eax, dword [eax + 4]
jmp 0x405b0d
add eax, 4
push eax
mov eax, dword [esp + 0x18]
test eax, eax
push ecx
mov dword [esp + 0x20], esp
mov ecx, esp
je 0x405b21
add dword [eax + 4], 1
mov dword [ecx], eax
call dword [0x49fbf8]
lea ecx, [esp + 0x30]
call fcn.00401370
cmp ebp, eax
jne 0x405c15
cmp esi, 0xfffffff8
jne 0x405c15
xor ebp, ebp
mov dword [esp + 0x90], 7
mov dword [esp + 0x8c], ebp
mov word [esp + 0x7c], bp
mov ecx, dword [0x4a06a4]
mov edx, dword [0x4a1388]
lea eax, [esp + 0x78]
push eax
push 0x401810
push ecx
push 0x1fd
push edx
mov byte [esp + 0xb4], 4
call dword [sym.imp.USER32.dll_DialogBoxParamW]
cmp eax, 1
jne 0x405bd4
cmp dword [esp + 0x90], 8
jb 0x405ba0
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x1c], eax
jmp 0x405ba8
lea ecx, [esp + 0x7c]
mov dword [esp + 0x1c], ecx
mov eax, dword [edi + 0x44]
lea edx, [esp + 0x1c]
push edx
push ebx
push eax
mov eax, dword [esp + 0x20]
cmp eax, ebp
push ecx
mov dword [esp + 0x28], esp
mov ecx, esp
je 0x405bc5
add dword [eax + 4], 1
mov dword [ecx], eax
call dword [0x49fc00]
mov esi, eax
cmp esi, 0xfffffff8
jne 0x405bde
push ebp
lea ecx, [esp + 0x7c]
call fcn.00402760
cmp dword [esp + 0x90], 8
mov eax, dword [esp + 0x7c]
jae 0x405bf0
lea eax, [esp + 0x7c]
push eax
mov eax, dword [esp + 0x18]
cmp eax, ebp
push ecx
mov dword [esp + 0x20], esp
mov ecx, esp
je 0x405c04
add dword [eax + 4], 1
mov dword [ecx], eax
call dword [0x49fbf8]
lea ecx, [esp + 0x78]
call fcn.00401f00
lea ecx, [esp + 0x30]
call fcn.00403bf0
xor ebp, ebp
mov eax, dword [esp + 0x14]
cmp eax, ebp
mov byte [esp + 0xa0], 1
je 0x405c7a
add dword [eax + 4], 0xffffffff
mov ecx, eax
add eax, 4
cmp dword [eax], ebp
jne 0x405c7a
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
jmp 0x405c7a
cmp ecx, 8
mov eax, dword [esp + 0x60]
jae 0x405c54
lea eax, [esp + 0x60]
push ebx
push 1
jmp 0x405c68
cmp ecx, 8
mov eax, dword [esp + 0x60]
jae 0x405c66
lea eax, [esp + 0x60]
push ebx
push esi
push 1
push esi
push esi
push esi
push eax
call fcn.00408e30
add esp, 0x1c
mov esi, eax
xor ebp, ebp
mov edi, 8
cmp dword [esp + 0x58], edi
jb 0x405c92
mov ecx, dword [esp + 0x44]
push ecx
call fcn.004775de
add esp, 4
cmp dword [esp + 0x74], edi
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], ebp
mov word [esp + 0x44], bp
jb 0x405cb6
mov edx, dword [esp + 0x60]
push edx
call fcn.004775de
add esp, 4
mov eax, esi
jmp 0x405d0c
lea ecx, [esp + 0x40]
call fcn.00401f00
lea ecx, [esp + 0x5c]
call fcn.00401f00
jmp 0x405d09
cmp dword [esp + 0x58], 8
jb 0x405ce6
mov eax, dword [esp + 0x44]
push eax
call fcn.004775de
mov ecx, dword [esp + 0x78]
add esp, 4
cmp ecx, 8
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], esi
mov word [esp + 0x44], si
jb 0x405d09
mov ecx, dword [esp + 0x60]
push ecx
call fcn.004775de
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.004777ea
add esp, 0x90
ret