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

Disassembly:
push 0xffffffffffffffff
push 0x430478
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43c024]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov ebx, ecx
lea eax, [esp + 0x18]
call fcn.00404b30
mov dword [esp + 0x80], 0
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
test esi, esi
je 0x406d49
cmp word [ebp + esi*2 - 2], 0x5c
lea eax, [ebp + esi*2 - 2]
je 0x406cf2
cmp eax, ebp
je 0x406d49
sub eax, 2
cmp word [eax], 0x5c
jne 0x406ce5
sub eax, ebp
sar eax, 1
test eax, eax
jle 0x406d49
lea ecx, [esi - 1]
cmp eax, ecx
jne 0x406d49
cmp esi, 3
jne 0x406d11
cmp word [ebp + 2], 0x3a
je 0x406eb0
lea edx, [eax + 1]
cmp edx, esi
mov edi, 1
jle 0x406d25
mov edi, esi
sub edi, eax
test edi, edi
jle 0x406d49
lea ecx, [edi + eax]
mov edx, esi
sub edx, ecx
lea edx, [edx + edx + 2]
push edx
lea ecx, [ebp + ecx*2]
push ecx
lea edx, [ebp + eax*2]
push edx
call fcn.00422140
add esp, 0xc
sub esi, edi
mov dword [esp + 0x1c], esi
lea edi, [esp + 0x18]
lea eax, [esp + 0x24]
call fcn.00404b90
push ebp
mov byte [esp + 0x84], 1
mov ebx, esi
call fcn.00406bc0
test al, al
jne 0x406f47
mov edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406e55
test esi, esi
je 0x406efb
cmp word [ebp + esi*2 - 2], 0x5c
lea eax, [ebp + esi*2 - 2]
je 0x406da6
cmp eax, ebp
je 0x406efb
sub eax, 2
cmp word [eax], 0x5c
jne 0x406d95
sub eax, ebp
sar eax, 1
mov ebx, eax
js 0x406efb
test ebx, ebx
je 0x406efb
cmp word [ebp + ebx*2 - 2], 0x3a
je 0x40702c
mov ecx, ebx
lea esi, [esp + 0x30]
lea eax, [esp + 0x18]
call fcn.00404df0
mov edi, eax
lea eax, [esp + 0x18]
mov byte [esp + 0x80], 3
cmp edi, eax
je 0x406e29
xor ecx, ecx
mov word [ebp], cx
mov eax, dword [edi + 4]
inc eax
mov dword [esp + 0x1c], 0
cmp eax, dword [esp + 0x20]
je 0x406e0d
push eax
lea esi, [esp + 0x1c]
call fcn.00404e70
mov ebp, dword [esp + 0x18]
mov edx, dword [edi]
mov ecx, ebp
movzx eax, word [edx]
mov word [ecx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x406e11
mov edx, dword [edi + 4]
mov dword [esp + 0x1c], edx
mov byte [esp + 0x80], 1
mov eax, dword [esp + 0x30]
push eax
call fcn.00421d8e
add esp, 4
push ebp
call fcn.00406bc0
test al, al
jne 0x406f47
mov esi, dword [esp + 0x1c]
jmp 0x406d70
xor eax, eax
push 4
lea esi, [esp + 0x68]
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
call fcn.00404e70
lea ecx, [esp + 0x3c]
push ecx
mov ecx, ebp
mov byte [esp + 0x84], 2
call fcn.00407f40
test al, al
jne 0x406eda
mov byte [esp + 0x80], 1
mov edx, dword [esp + 0x64]
push edx
call fcn.00421d8e
mov byte [esp + 0x84], 0
mov eax, dword [esp + 0x28]
add esp, 4
push eax
call fcn.00421d8e
add esp, 4
push ebp
mov dword [esp + 0x84], 0xffffffff
call fcn.00421d8e
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
mov ecx, dword [esp + 0x5c]
shr ecx, 4
mov byte [esp + 0x80], 1
test cl, 1
jne 0x406f3a
mov edx, dword [esp + 0x64]
push edx
call fcn.00421d8e
add esp, 4
mov byte [esp + 0x80], 0
mov eax, dword [esp + 0x24]
push eax
call fcn.00421d8e
add esp, 4
push ebp
mov dword [esp + 0x84], 0xffffffff
call fcn.00421d8e
add esp, 4
xor al, al
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
mov ecx, dword [esp + 0x64]
push ecx
call fcn.00421d8e
add esp, 4
lea edi, [esp + 0x24]
lea eax, [esp + 0x18]
call fcn.00404bf0
mov ebp, dword [esp + 0x1c]
cmp ebx, ebp
mov edi, dword [esp + 0x18]
jge 0x406fd2
movzx ecx, word [edi + ebx*2 + 2]
lea eax, [edi + ebx*2 + 2]
cmp cx, 0x5c
je 0x406f82
nop
test cx, cx
je 0x406f8a
movzx ecx, word [eax + 2]
add eax, 2
cmp cx, 0x5c
jne 0x406f70
sub eax, edi
sar eax, 1
mov ebx, eax
jns 0x406f8c
mov ebx, ebp
mov ecx, ebx
lea esi, [esp + 0x30]
lea eax, [esp + 0x18]
call fcn.00404df0
mov byte [esp + 0x80], 4
mov eax, dword [eax]
push eax
call fcn.00406bc0
mov byte [esp + 0x80], 1
mov edx, dword [esp + 0x30]
test al, al
push edx
sete byte [esp + 0x1b]
call fcn.00421d8e
add esp, 4
cmp byte [esp + 0x17], 0
jne 0x407011
cmp ebx, ebp
jl 0x406f60
mov byte [esp + 0x80], 0
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00421d8e
add esp, 4
push edi
mov dword [esp + 0x84], 0xffffffff
call fcn.00421d8e
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
mov byte [esp + 0x80], 0
mov eax, dword [esp + 0x24]
push eax
call fcn.00421d8e
add esp, 4
push edi
jmp 0x406f11
mov byte [esp + 0x80], 0
mov edx, dword [esp + 0x24]
push edx
jmp 0x406f08