Function at 0x50d5f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [ebp + 8]
cmp dword [ecx + 4], 0xffffffff
mov dword [ebp - 0x3c], ecx
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
jne 0x50d62a
call fcn.004db479
mov edx, dword [ebp + 0x18]
mov dword [edx], 6
mov dword [edx + 4], eax
jmp 0x50d8c2
call fcn.0050d5ae
mov eax, dword [ebp - 0x3c]
test byte [eax + 0x20], 4
jne 0x50d6ff
mov eax, dword [ebp - 0x50]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
sub esp, 0x14
test eax, eax
jne 0x50d694
call fcn.004db479
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov eax, edx
jmp 0x50d7d9
lea eax, [esi + ebx*8]
lea edi, [ebp - 0x34]
xor ebx, ebx
mov dword [ebp - 0x40], eax
cmp esi, dword [ebp - 0x40]
jae 0x50d8d6
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov eax, dword [esi + 4]
mov dword [ebp - 0x34], 0
mov dword [esp + 8], eax
mov eax, dword [esi]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x50d6f7
call fcn.004db479
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov eax, ecx
jmp 0x50d7d9
add ebx, dword [ebp - 0x34]
add esi, 8
jmp 0x50d69f
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.00528054
mov dword [ebp - 0x40], eax
mov eax, dword [0x855c44]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
lea eax, [eax + edx - 1]
cdq
idiv dword [ebp - 0x44]
lea ecx, [eax*8 + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ecx + 0x1e]
shr eax, 4
shl eax, 4
call fcn.005d34c0
sub esp, eax
lea eax, [esp + 0x23]
and eax, 0xfffffff0
mov dword [ebp - 0x48], eax
mov edi, dword [ebp - 0x48]
xor eax, eax
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x48]
lea ecx, [esi + ebx*8]
cmp esi, ecx
jae 0x50d776
mov edi, dword [esi + 4]
xor edx, edx
cmp edx, edi
jge 0x50d771
mov ebx, dword [esi]
add eax, 8
add ebx, edx
add edx, dword [ebp - 0x44]
mov dword [eax - 8], ebx
jmp 0x50d75e
add esi, 8
jmp 0x50d755
lea esi, [ebp - 0x30]
mov dword [eax], 0
mov ecx, 5
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x20], eax
jne 0x50d7e1
call fcn.004db479
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp + 0x18]
mov dword [edi], eax
mov eax, edi
mov dword [eax + 4], ebx
jmp 0x50d8c2
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x10], esi
imul eax, dword [0x855c44]
mov dword [esp + 0xc], 0
mov ebx, dword [ebp - 0x40]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFileScatter]
sub esp, 0x14
test eax, eax
jne 0x50d8c9
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
mov edi, eax
je 0x50d83c
call fcn.004db479
mov edx, dword [ebp + 0x18]
mov dword [edx], edi
jmp 0x50d8a4
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc eax
push ecx
push ecx
jne 0x50d868
call fcn.004db479
mov esi, eax
call ebx
mov edi, dword [ebp + 0x18]
mov dword [edi], eax
mov dword [edi + 4], esi
jmp 0x50d8a7
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
jne 0x50d8b6
call ebx
cmp eax, 0x26
mov ebx, eax
je 0x50d8b6
call fcn.004db479
mov edx, dword [ebp + 0x18]
mov dword [edx], ebx
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
jmp 0x50d8c2
mov ebx, dword [ebp - 0x34]
cmp dword [ebp - 0x40], ebx
cmovbe ebx, dword [ebp - 0x40]
jmp 0x50d8c9
or eax, 0xffffffff
mov edx, eax
jmp 0x50d8da
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov eax, ebx
xor edx, edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x14