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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
test edi, edi
je 0x4064ab
mov ecx, dword [edi + 0x3c]
mov eax, dword [edi + ecx + 0x78]
test eax, eax
jne 0x406485
cmp dword [edi + ecx + 0x7c], 0
je 0x4064ab
lea ecx, [edi + eax]
mov dword [esp], ecx
mov ecx, dword [edi + eax + 0x1c]
add ecx, edi
mov dword [esp + 8], ecx
mov ecx, dword [edi + eax + 0x20]
add ecx, edi
mov dword [esp + 0x14], ecx
mov eax, dword [edi + eax + 0x24]
add eax, edi
mov dword [esp + 0x10], eax
jmp 0x4064c0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp], 0
mov dword [esp + 8], eax
xor edi, edi
mov esi, dword [edx]
movzx ebx, word [esi]
add esi, 2
mov dword [edx], esi
mov dword [esp + 0xc], edi
test ebx, ebx
je 0x4065f4
test edi, edi
je 0x4065e4
mov eax, dword [esp]
mov eax, dword [eax + 0x18]
test eax, eax
mov dword [esp + 4], eax
je 0x4065e4
lea eax, [edi + 1]
xor ebp, ebp
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + ebp*4]
cmp byte [edi + ecx], 0
je 0x4065d3
lea eax, [edi + ecx]
add ecx, dword [esp + 0x18]
xor edx, edx
cmp byte [ecx + edx], 0
lea edx, [edx + 1]
jne 0x406513
mov ecx, edx
dec ecx
js 0x4065d3
push edx
push eax
call fcn.00419bf0
add esp, 8
test eax, eax
je 0x4065d3
mov ecx, eax
and eax, 0xca895f6e
xor edi, edi
not ecx
and ecx, 0x3576a091
or eax, ecx
mov ecx, dword [esi + edi*4]
test ecx, ecx
setne dl
cmp eax, ecx
sete dh
xor dh, dl
jne 0x40655f
test ecx, ecx
jne 0x40656a
inc edi
cmp edi, ebx
jb 0x40654a
mov edi, dword [esp + 0xc]
jmp 0x4065d3
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
lea ecx, [edi*4]
movzx eax, word [eax + ebp*2]
add ecx, dword [edx]
push dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x10]
push dword [ecx + eax*4]
push dword [esp + 0x18]
call fcn.0040cb70
add esp, 0x10
test eax, eax
jne 0x4065a8
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
mov dword [eax + edi*4], 0
mov dword [esi + edi*4], 0
xor eax, eax
xor ecx, ecx
mov edi, dword [esp + 0xc]
dec ecx
cmp dword [esi + eax*4], 0
jne 0x4065c4
sub eax, ecx
cmp eax, ebx
jb 0x4065b8
cmp eax, ebx
mov eax, dword [esp]
mov eax, dword [eax + 0x18]
mov dword [esp + 4], eax
cmove ebp, eax
inc ebp
cmp ebp, dword [esp + 4]
jb 0x4064f9
mov edx, dword [esp + 0x34]
mov esi, dword [edx]
mov ecx, dword [esp + 0x38]
lea eax, [esi + ebx*4]
shl ebx, 2
mov dword [edx], eax
add dword [ecx], ebx
mov esi, dword [edx]
movzx ebx, word [esi]
add esi, 2
mov dword [edx], esi
test ebx, ebx
je 0x406685
test edi, edi
je 0x406677
xor ebp, ebp
xor edi, edi
mov dword [esp + 4], ebx
movzx eax, word [esi]
mov ecx, eax
and eax, 0x4b3f
not ecx
and ecx, 0xffffb4c0
or eax, ecx
mov ecx, dword [esp]
xor eax, 0xd605
movzx eax, ax
sub eax, dword [ecx + 0x10]
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx]
add ecx, ebp
push dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x10]
push dword [ecx + eax*4]
push dword [esp + 0x18]
call fcn.0040cb70
add esp, 0x10
test eax, eax
jne 0x406663
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
mov dword [eax + ebp], 0
inc edi
add ebp, 4
add esi, 2
dec ebx
jne 0x406610
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 4]
mov esi, dword [edx]
mov ecx, dword [esp + 0x38]
lea eax, [esi + ebx*2]
shl ebx, 2
mov dword [edx], eax
add dword [ecx], ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret