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

Disassembly:
push ebx
push edi
mov edi, dword [esp + 0xc]
xor ebx, ebx
cmp edi, ebx
je 0x404671
cmp dword [edi + 0x2c], ebx
jne 0x40467b
pop edi
mov eax, 0xffffff9a
pop ebx
ret 0xc
cmp dword [edi + 0x80], 8
push ebp
push esi
mov dword [edi + 0x34], ebx
jne 0x4046e7
cmp dword [edi + 0x84], ebx
jne 0x4046e7
lea ebp, [edi + 0x30]
mov eax, dword [edi + 0x40]
test eax, eax
jne 0x4046c2
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x20]
mov edx, dword [edi + 0x1c]
push eax
lea esi, [edi + 0x88]
push esi
push ecx
push edx
call dword [edi + 8]
mov dword [edi + 0x6c], 0
mov dword [edi + 0x40], 0x4000
mov dword [edi + 0x3c], esi
mov esi, dword [edi + 0x44]
push 4
push ebp
call fcn.00405970
mov ecx, dword [edi + 0x6c]
mov ebx, eax
mov eax, dword [edi + 0x44]
sub eax, esi
add ecx, eax
test ebx, ebx
mov dword [edi + 0x6c], ecx
je 0x404694
cmp ebx, 1
jne 0x4046e7
xor ebx, ebx
mov eax, dword [edi + 0x6c]
test eax, eax
jbe 0x40470d
test ebx, ebx
jne 0x40470d
mov edx, dword [edi + 0x20]
push eax
mov eax, dword [edi + 0x1c]
lea ecx, [edi + 0x88]
push ecx
push edx
push eax
call dword [edi + 8]
cmp eax, dword [edi + 0x6c]
je 0x40470d
or ebx, 0xffffffff
cmp dword [edi + 0x80], 8
jne 0x404732
mov eax, dword [edi + 0x84]
test eax, eax
jne 0x40474b
lea ecx, [edi + 0x30]
push ecx
call fcn.00405c00
mov ebx, eax
mov dword [edi + 0x68], 0
mov eax, dword [edi + 0x84]
test eax, eax
jne 0x40474b
mov edx, dword [edi + 0x38]
mov ebp, dword [edi + 0x408c]
mov dword [esp + 0x18], edx
jmp 0x40474f
mov ebp, dword [esp + 0x1c]
mov esi, dword [edi + 0x74]
mov eax, dword [edi + 0x44]
add esi, 0x10
mov edx, 4
mov ecx, ebp
mov dword [esp + 0x14], eax
call fcn.004043d0
mov esi, dword [edi + 0x74]
mov ecx, dword [esp + 0x14]
add esi, 0x14
call fcn.004043d0
mov eax, dword [edi + 0x5c]
mov ecx, 1
cmp eax, ecx
jne 0x404793
mov esi, dword [edi + 0x74]
add esi, 0x24
mov edx, 2
call fcn.004043d0
mov esi, dword [edi + 0x74]
mov ecx, dword [esp + 0x18]
add esi, 0x18
mov edx, 4
call fcn.004043d0
test ebx, ebx
jne 0x4047c1
mov ecx, dword [edi + 0x78]
mov edx, dword [edi + 0x74]
push ecx
push edx
lea eax, [edi + 0x24]
push eax
call fcn.004042f0
add esp, 0xc
mov ebx, eax
mov ecx, dword [edi + 0x74]
push ecx
call fcn.0040c1db
add esp, 4
test ebx, ebx
jne 0x404860
mov edx, dword [edi + 0x20]
mov eax, dword [edi + 0x1c]
push edx
push eax
call dword [edi + 0xc]
mov ecx, dword [edi + 0x70]
mov edx, dword [edi + 0x20]
push ebx
add ecx, 0xe
push ecx
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x1c]
push edx
push eax
call dword [edi + 0x10]
test eax, eax
je 0x404800
or ebx, 0xffffffff
jmp 0x404847
mov ecx, dword [edi + 0x20]
push ecx
mov esi, 4
mov ecx, ebp
mov edx, edi
call fcn.004043a0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x404847
mov edx, dword [edi + 0x20]
mov ecx, dword [esp + 0x14]
push edx
mov edx, edi
call fcn.004043a0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x404847
mov eax, dword [edi + 0x20]
mov ecx, dword [esp + 0x18]
push eax
mov edx, edi
call fcn.004043a0
add esp, 4
mov ebx, eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [edi + 0x20]
mov eax, dword [edi + 0x1c]
push 0
push ecx
push edx
push eax
call dword [edi + 0x10]
test eax, eax
je 0x404860
or ebx, 0xffffffff
mov eax, dword [edi + 0x4094]
pop esi
inc eax
pop ebp
mov dword [edi + 0x4094], eax
mov dword [edi + 0x2c], 0
pop edi
mov eax, ebx
pop ebx
ret 0xc