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

Disassembly:
push 0xffffffffffffffff
push 0x430278
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 0x406ad9
cmp word [ebp + esi*2 - 2], 0x5c
lea eax, [ebp + esi*2 - 2]
je 0x406a82
cmp eax, ebp
je 0x406ad9
sub eax, 2
cmp word [eax], 0x5c
jne 0x406a75
sub eax, ebp
sar eax, 1
test eax, eax
jle 0x406ad9
lea ecx, [esi - 1]
cmp eax, ecx
jne 0x406ad9
cmp esi, 3
jne 0x406aa1
cmp word [ebp + 2], 0x3a
je 0x406c40
lea edx, [eax + 1]
cmp edx, esi
mov edi, 1
jle 0x406ab5
mov edi, esi
sub edi, eax
test edi, edi
jle 0x406ad9
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.00421f90
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.00406950
test al, al
jne 0x406cd7
mov edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406be5
test esi, esi
je 0x406c8b
cmp word [ebp + esi*2 - 2], 0x5c
lea eax, [ebp + esi*2 - 2]
je 0x406b36
cmp eax, ebp
je 0x406c8b
sub eax, 2
cmp word [eax], 0x5c
jne 0x406b25
sub eax, ebp
sar eax, 1
mov ebx, eax
js 0x406c8b
test ebx, ebx
je 0x406c8b
cmp word [ebp + ebx*2 - 2], 0x3a
je 0x406dbc
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 0x406bb9
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 0x406b9d
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 0x406ba1
mov edx, dword [edi + 4]
mov dword [esp + 0x1c], edx
mov byte [esp + 0x80], 1
mov eax, dword [esp + 0x30]
push eax
call fcn.00421bde
add esp, 4
push ebp
call fcn.00406950
test al, al
jne 0x406cd7
mov esi, dword [esp + 0x1c]
jmp 0x406b00
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.00407cd0
test al, al
jne 0x406c6a
mov byte [esp + 0x80], 1
mov edx, dword [esp + 0x64]
push edx
call fcn.00421bde
mov byte [esp + 0x84], 0
mov eax, dword [esp + 0x28]
add esp, 4
push eax
call fcn.00421bde
add esp, 4
push ebp
mov dword [esp + 0x84], 0xffffffff
call fcn.00421bde
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 0x406cca
mov edx, dword [esp + 0x64]
push edx
call fcn.00421bde
add esp, 4
mov byte [esp + 0x80], 0
mov eax, dword [esp + 0x24]
push eax
call fcn.00421bde
add esp, 4
push ebp
mov dword [esp + 0x84], 0xffffffff
call fcn.00421bde
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.00421bde
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 0x406d62
movzx ecx, word [edi + ebx*2 + 2]
lea eax, [edi + ebx*2 + 2]
cmp cx, 0x5c
je 0x406d12
nop
test cx, cx
je 0x406d1a
movzx ecx, word [eax + 2]
add eax, 2
cmp cx, 0x5c
jne 0x406d00
sub eax, edi
sar eax, 1
mov ebx, eax
jns 0x406d1c
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.00406950
mov byte [esp + 0x80], 1
mov edx, dword [esp + 0x30]
test al, al
push edx
sete byte [esp + 0x1b]
call fcn.00421bde
add esp, 4
cmp byte [esp + 0x17], 0
jne 0x406da1
cmp ebx, ebp
jl 0x406cf0
mov byte [esp + 0x80], 0
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00421bde
add esp, 4
push edi
mov dword [esp + 0x84], 0xffffffff
call fcn.00421bde
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.00421bde
add esp, 4
push edi
jmp 0x406ca1
mov byte [esp + 0x80], 0
mov edx, dword [esp + 0x24]
push edx
jmp 0x406c98