Function at 0x51bea4
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 0x51bede
call fcn.004e34b3
mov ecx, dword [ebp + 0x18]
mov dword [ecx], 6
mov dword [ecx + 4], eax
jmp 0x51c160
call fcn.0051be60
mov eax, dword [ebp - 0x3c]
test byte [eax + 0x20], 4
jne 0x51bf9a
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 0x51bf48
call fcn.004e34b3
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov eax, ecx
jmp 0x51c06e
lea edi, [esi + ebx*8]
xor ebx, ebx
cmp esi, edi
jae 0x51c170
lea eax, [ebp - 0x34]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x34], 0
mov dword [esp + 0xc], eax
mov eax, dword [esi + 4]
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
je 0x51c05a
add ebx, dword [ebp - 0x34]
add esi, 8
jmp 0x51bf4d
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.00536158
mov dword [ebp - 0x40], eax
mov eax, dword [0x86bc14]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
lea eax, [eax + ecx - 1]
cdq
idiv dword [ebp - 0x44]
lea ecx, [eax*8 + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ecx + 0x1e]
and eax, 0xfffffff0
call fcn.005e3260
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 0x51c00b
mov edi, dword [esi + 4]
xor edx, edx
cmp edi, edx
jle 0x51c006
mov ebx, dword [esi]
add eax, 8
add ebx, edx
add edx, dword [ebp - 0x44]
mov dword [eax - 8], ebx
jmp 0x51bff3
add esi, 8
jmp 0x51bfea
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 0x51c076
call fcn.004e34b3
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov eax, edx
mov dword [eax + 4], ebx
jmp 0x51c160
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x10], esi
imul eax, dword [0x86bc14]
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
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x51c167
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
je 0x51c0de
mov dword [ebp - 0x3c], eax
call fcn.004e34b3
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x3c]
mov dword [ecx + 4], eax
mov dword [ecx], edx
jmp 0x51c149
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 0x51c10a
call fcn.004e34b3
mov esi, eax
call ebx
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov dword [ecx + 4], esi
jmp 0x51c149
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 0x51c154
call ebx
cmp eax, 0x26
mov ebx, eax
je 0x51c154
call fcn.004e34b3
mov edx, dword [ebp + 0x18]
mov dword [edx], ebx
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call edi
push edx
jmp 0x51c160
mov ebx, dword [ebp - 0x34]
cmp dword [ebp - 0x40], ebx
cmovbe ebx, dword [ebp - 0x40]
jmp 0x51c167
or eax, 0xffffffff
mov edx, eax
jmp 0x51c174
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call edi
push eax
mov eax, ebx
xor edx, edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x14