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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x49c
mov eax, dword [0x45b040]
xor eax, esp
mov dword [esp + 0x498], eax
push ebx
push esi
mov ebx, ecx
push edi
mov edi, edx
test ebx, ebx
jne 0x405cd6
or eax, 0xffffffff
jmp 0x40604d
mov eax, dword [ebx]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x10], eax
test edi, edi
je 0x40604a
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x405cf0
sub esi, ecx
mov dword [esp + 0x20], esi
je 0x40604a
cmp dword [ebx + 0x5c], 0
je 0x405d16
push dword [ebx + 0x5c]
call fcn.00425e47
and dword [ebx + 0x5c], 0
pop ecx
push ecx
push ecx
mov edx, esi
mov ecx, edi
call fcn.00405bea
mov dword [ebx + 0x5c], eax
pop ecx
pop ecx
test eax, eax
je 0x40604a
cmp dword [ebx + 0x14], 1
jne 0x405df0
lea ecx, [esp + 0x14]
mov edx, eax
push ecx
push pe_nt_image_headers32
push ecx
mov ecx, ebx
call fcn.00404bb3
mov edx, dword [esp + 0x20]
or ecx, 0xffffffff
add esp, 0xc
test eax, eax
cmove edx, ecx
mov dword [ebx + 0x58], edx
test edx, edx
jns 0x405d69
push 0xfffffffffffffffd
jmp 0x406032
lea eax, [esp + 0x30]
mov ecx, ebx
push eax
call fcn.00405bba
pop ecx
test eax, eax
je 0x405d62
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [ebx + 0x68], eax
mov eax, dword [esp + 0x60]
mov dword [ebx + 0x60], eax
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x70], eax
mov eax, dword [esp + 0x38]
mov dword [ebx + 0x78], eax
mov eax, dword [esp + 0x70]
mov dword [ebx + 0x6c], ecx
mov ecx, dword [esp + 0x64]
mov dword [ebx + 0xa0], eax
mov ax, word [esp + 0x46]
mov dword [ebx + 0x64], ecx
mov ecx, dword [esp + 0x3c]
mov dword [ebx + 0x7c], ecx
mov ecx, dword [esp + 0x74]
mov word [ebx + 0xa8], ax
mov eax, dword [esp + 0x6c]
mov dword [ebx + 0xa4], ecx
mov ecx, dword [esp + 0x4c]
mov dword [ebx + 0x4e008], eax
mov eax, dword [esp + 0x48]
mov dword [ebx + 0x4e010], eax
mov dword [ebx + 0x4e014], ecx
xor eax, eax
jmp 0x40604d
mov eax, dword [ebx + 0x10]
lea edi, [ebx + 0x80]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x50]
mov dword [ebx + 0x58], eax
and edx, 0xf
xor eax, eax
mov dword [ebx + 0x7c], ecx
mov dword [ebx + 0x68], eax
mov dword [ebx + 0x6c], eax
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x70], eax
mov eax, dword [ebx]
mov dword [ebx + 0x78], eax
mov dword [ebx + 0xa0], eax
xor eax, eax
mov dword [ebx + 0xa4], ecx
push 7
pop ecx
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], edx
mov ecx, ebx
neg edx
stosw word es:[edi], ax
sbb eax, eax
and dword [ebx + 0x4e008], 0
and eax, 8
mov word [ebx + 0xa8], ax
call fcn.00405620
cmp dword [ebx + 0x48], 0
mov dword [esp + 0x14], eax
je 0x406030
cmp dword [ebx + 0x14], 2
jne 0x406030
test dword [ebx + 0x50], 0x400
je 0x405e7b
push 0xfffffffffffffffb
jmp 0x406032
push dword [ebx + 0x7c]
mov edx, eax
mov ecx, ebx
push dword [ebx + 0x78]
call fcn.0040563d
pop ecx
pop ecx
test eax, eax
jne 0x405e97
push 0xfffffffffffffff9
jmp 0x406032
mov edi, dword [esp + 0x18]
add edi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
adc eax, 0
mov dword [esp + 0x28], edi
push 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], eax
call fcn.00425ddf
pop ecx
push edx
mov dword [ebx + 0x4e014], edx
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x20]
mov dword [ebx + 0x4e010], eax
call fcn.0040458c
cmp dword [esp + 0x18], 0
pop ecx
pop ecx
jne 0x405ee7
cmp edi, 0xffffffff
jae 0x405ee7
xor eax, eax
jmp 0x405eeb
lea eax, [esp + 0x28]
push eax
push 0
xor edx, edx
lea ecx, [esp + 0x490]
call fcn.00405139
pop ecx
pop ecx
push dword [esp + 0x18]
lea edx, [ebx + 0x80]
mov dword [esp + 0x14], eax
push dword [esp + 0x20]
push ecx
movzx ecx, word [ebx + 0xa8]
push ecx
sub esp, 0x14
push eax
push esi
call fcn.00405224
add esp, 0x2c
test eax, eax
je 0x405e90
mov edi, dword [esp + 0x14]
mov ecx, edi
add ecx, dword [ebx + 0x78]
mov eax, dword [ebx + 0x7c]
push 0x1e
push edx
adc eax, 0
mov dword [ebx + 0xa0], ecx
push eax
push ecx
mov dword [ebx + 0xa4], eax
mov esi, dword [ebx + 0x3c]
mov ecx, esi
push dword [ebx + 0x44]
call dword [0x448184]
call esi
add esp, 0x14
cmp eax, 0x1e
jne 0x405e90
lea eax, [edi + 0x1e]
mov edi, dword [esp + 0x20]
add dword [ebx + 0x78], eax
push edi
push dword [ebx + 0x5c]
adc dword [ebx + 0x7c], 0
push dword [ebx + 0x7c]
mov esi, dword [ebx + 0x3c]
mov ecx, esi
push dword [ebx + 0x78]
push dword [ebx + 0x44]
call dword [0x448184]
call esi
add esp, 0x14
cmp eax, edi
je 0x405fa0
push 0xfffffffffffffff8
jmp 0x406032
add dword [ebx + 0x78], edi
lea eax, [esp + 0x488]
mov edi, dword [esp + 0x10]
adc dword [ebx + 0x7c], 0
mov esi, dword [ebx + 0x3c]
mov ecx, esi
push edi
push eax
push dword [ebx + 0x7c]
push dword [ebx + 0x78]
push dword [ebx + 0x44]
call dword [0x448184]
call esi
add esp, 0x14
cmp eax, edi
jne 0x405f99
add edi, dword [ebx + 0x78]
mov ecx, dword [esp + 0x24]
push 0
pop eax
adc eax, dword [ebx + 0x7c]
mov dword [ebx + 0x78], edi
mov dword [ebx + 0x7c], eax
test ecx, ecx
je 0x405de9
and dword [ebx + 0xc0], 0
lea esi, [ebx + 0xb0]
and dword [ebx + 0xc4], 0
push ecx
mov dword [esi], ebx
mov dword [ebx + 0xb8], edi
mov dword [ebx + 0xbc], eax
call fcn.00404489
pop ecx
push eax
push esi
lea ecx, [ebx + 0xc8]
call fcn.00404354
pop ecx
pop ecx
test eax, eax
je 0x405de9
push 0xfffffffffffffff7
jmp 0x406032
push 0xfffffffffffffffc
pop esi
cmp dword [ebx + 0x5c], 0
je 0x406046
push dword [ebx + 0x5c]
call fcn.00425e47
and dword [ebx + 0x5c], 0
pop ecx
mov eax, esi
jmp 0x40604d
push 0xfffffffffffffffe
pop eax
mov ecx, dword [esp + 0x4a4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041eb18
mov esp, ebp
pop ebp
ret