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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x527b82
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x278
mov eax, dword [0x566450]
push ebx
push esi
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp + 8]
push edi
mov dword [esp + 0x27c], eax
call fcn.004c1fe0
mov edx, eax
xor eax, eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x52f0a8
xor ecx, ecx
test edx, edx
mov dword [esp + 0x28c], 1
mov dword [esp + 0x28], ecx
jle 0x4af7c6
lea esp, [esp]
sub esp, 8
mov eax, esp
mov dword [esp + 0x28], esp
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.004c20a0
lea ecx, [esp + 0x18]
call fcn.004131e0
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x14]
call fcn.004c2630
cmp byte [esp + 0x78], 0x23
je 0x4af7ad
lea edx, [esp + 0x78]
push str.LINK
push edx
call fcn.004dcb79
add esp, 8
test eax, eax
jne 0x4af7ad
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax + 0x48]
lea ecx, [esp + 0x10]
call fcn.004c21c0
mov edi, eax
xor esi, esi
test edi, edi
jle 0x4af644
jmp 0x4af5f0
lea ecx, [esp + 0x178]
push ecx
lea edx, [esp + 0x3c]
push edx
push esi
lea ecx, [esp + 0x1c]
call fcn.004c3010
lea eax, [esp + 0x38]
push str.name
push eax
call fcn.004dcb79
add esp, 8
test eax, eax
jne 0x4af63f
lea eax, [esp + 0x178]
lea ecx, [ebx + ebx*4]
mov edx, eax
shl ecx, 4
sub ecx, edx
mov edx, dword [ebp + 0xc]
lea edx, [ecx + edx + 0x4c]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4af635
inc esi
cmp esi, edi
jl 0x4af5f0
lea ecx, [esp + 0x10]
call fcn.004c1fe0
mov edx, eax
xor eax, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0x52f0a8
xor ecx, ecx
test edx, edx
mov byte [esp + 0x28c], 3
mov dword [esp + 0x24], ecx
jle 0x4af76b
sub esp, 8
mov eax, esp
mov dword [esp + 0x3c], esp
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004c20a0
lea ecx, [esp + 0x20]
call fcn.004131e0
lea ecx, [esp + 0xf8]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004c2630
cmp byte [esp + 0xf8], 0x23
je 0x4af752
lea edx, [esp + 0xf8]
push str.TARGET
push edx
call fcn.004dcb79
add esp, 8
test eax, eax
jne 0x4af752
push 0x52d8f8
push str.sector
lea eax, [esp + 0x180]
push eax
lea ecx, [esp + 0x24]
call fcn.004c2b90
lea ecx, [esp + 0x178]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.004ae8c0
test eax, eax
je 0x4af752
mov ecx, dword [ebp + 0xc]
lea edx, [ebx + ebx*4]
shl edx, 4
mov esi, dword [edx + ecx + 0x90]
test esi, esi
lea ecx, [edx + ecx + 0x8c]
jne 0x4af71f
xor edi, edi
jmp 0x4af727
mov edi, dword [ecx + 8]
sub edi, esi
sar edi, 2
test esi, esi
je 0x4af746
mov edx, dword [ecx + 0xc]
sub edx, esi
sar edx, 2
cmp edi, edx
jae 0x4af746
mov edx, dword [ecx + 8]
mov eax, dword [eax]
mov dword [edx], eax
add edx, 4
mov dword [ecx + 8], edx
jmp 0x4af752
mov edx, dword [ecx + 8]
push eax
push 1
push edx
call fcn.00485560
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
inc ecx
cmp ecx, eax
mov dword [esp + 0x24], ecx
jl 0x4af677
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 0xc]
inc dword [ecx + 0x48]
mov dword [esp + 0x18], 0x52f0a4
test eax, eax
mov byte [esp + 0x28c], 4
je 0x4af79b
mov ecx, eax
xor eax, eax
test ecx, ecx
mov dword [esp + 0x1c], eax
je 0x4af79b
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, dword [esp + 0x1c]
test eax, eax
mov byte [esp + 0x28c], 1
je 0x4af7ad
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
inc ecx
cmp ecx, eax
mov dword [esp + 0x28], ecx
jl 0x4af580
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], 0x52f0a4
test eax, eax
mov dword [esp + 0x28c], 5
je 0x4af7f3
mov ecx, eax
xor eax, eax
test ecx, ecx
mov dword [esp + 0x14], eax
je 0x4af7f3
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, dword [esp + 0x14]
test eax, eax
mov dword [esp + 0x28c], 0xffffffff
je 0x4af808
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [esp + 0x284]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x27c]
call fcn.004da561
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8