Function at 0x5a8380
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
cmp dword [ebx + 0x2c], 0
je 0x5a8401
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
mov dword [edi], 0
mov eax, dword [ebx + 0x58]
mov eax, dword [eax]
sub eax, dword [ebx + 0x34]
cmp esi, eax
cmova esi, eax
mov eax, dword [ebx + 0x1c]
add eax, dword [ebx + 0x34]
push esi
push eax
push dword [ebp + 0x10]
call fcn.00580540
add dword [edi], esi
add esp, 0xc
mov eax, dword [ebx + 0x58]
add dword [ebx + 0x34], esi
mov ecx, dword [ebx + 0x34]
cmp ecx, dword [eax]
je 0x5a83e3
push 0xea
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov dword [ebx + 0x2c], 0
push ebx
call fcn.005a8020
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp dword [ebx + 0x24], 0
je 0x5a84b5
mov esi, dword [ebp + 0x18]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 0xc], 0
movdqu xmmword [ebp - 0x14], xmm0
mov dword [esi], 0
mov eax, dword [ebx + 0x58]
mov dword [ebp - 4], 0
mov eax, dword [eax]
sub eax, dword [ebx + 0x34]
cmp ecx, eax
cmova ecx, eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0xc]
push eax
push ecx
push dword [ebp + 0x10]
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5a8487
mov eax, dword [ebp + 0xc]
add dword [esi], eax
add dword [ebx + 0x34], eax
mov eax, dword [ebx + 0x58]
mov ecx, dword [ebx + 0x34]
cmp ecx, dword [eax]
jne 0x5a83cd
push ebx
mov dword [ebx + 0x24], 0
call fcn.005a8020
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x5a858d
push 1
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x5a858d
jmp 0x5a8453
cmp dword [ebx + 0x28], 0
je 0x5a858d
mov edx, dword [ebp + 0x18]
push dword [ebp + 0xc]
mov dword [ebp + 8], 0
mov dword [edx], 0
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x5a8582
push 1
lea eax, [ebp + 8]
push eax
lea eax, [ebx + 0x44]
push eax
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edx, dword [ebx + 0x58]
mov ecx, dword [ebp + 8]
mov dword [ebx + 0x34], 0
mov dword [edx], ecx
test eax, eax
jne 0x5a8519
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x5a858d
mov esi, dword [ebp + 0x14]
mov edi, esi
mov eax, dword [ebp + 8]
cmp eax, esi
jae 0x5a8529
mov edi, eax
mov esi, eax
push edi
push dword [ebx + 0x1c]
push dword [ebp + 0x10]
call fcn.00580540
mov eax, dword [ebp + 0x18]
add esp, 0xc
add dword [eax], edi
add dword [ebx + 0x34], edi
mov dword [ebx + 0x28], 0
sub esi, edi
je 0x5a83ea
lea eax, [ebp + 8]
mov dword [ebx + 0x24], 1
push eax
mov eax, dword [ebp + 0x10]
push esi
add eax, edi
mov dword [ebp + 8], 0
push eax
push dword [ebp + 0xc]
push ebx
call fcn.005a8380
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 8]
pop edi
pop esi
add dword [edx], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 0x3e4
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14