Function at 0x50ee40
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 0x50ee7a
call fcn.004dccc9
mov edx, dword [ebp + 0x18]
mov dword [edx], 6
mov dword [edx + 4], eax
jmp 0x50f112
call fcn.0050edfe
mov eax, dword [ebp - 0x3c]
test byte [eax + 0x20], 4
jne 0x50ef4f
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 0x50eee4
call fcn.004dccc9
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov eax, edx
jmp 0x50f029
lea eax, [esi + ebx*8]
lea edi, [ebp - 0x34]
xor ebx, ebx
mov dword [ebp - 0x40], eax
cmp esi, dword [ebp - 0x40]
jae 0x50f126
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 0x50ef47
call fcn.004dccc9
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov eax, ecx
jmp 0x50f029
add ebx, dword [ebp - 0x34]
add esi, 8
jmp 0x50eeef
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.005298a4
mov dword [ebp - 0x40], eax
mov eax, dword [0x857c4c]
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.005d4d10
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 0x50efc6
mov edi, dword [esi + 4]
xor edx, edx
cmp edx, edi
jge 0x50efc1
mov ebx, dword [esi]
add eax, 8
add ebx, edx
add edx, dword [ebp - 0x44]
mov dword [eax - 8], ebx
jmp 0x50efae
add esi, 8
jmp 0x50efa5
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 0x50f031
call fcn.004dccc9
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 0x50f112
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x10], esi
imul eax, dword [0x857c4c]
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 0x50f119
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
mov edi, eax
je 0x50f08c
call fcn.004dccc9
mov edx, dword [ebp + 0x18]
mov dword [edx], edi
jmp 0x50f0f4
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 0x50f0b8
call fcn.004dccc9
mov esi, eax
call ebx
mov edi, dword [ebp + 0x18]
mov dword [edi], eax
mov dword [edi + 4], esi
jmp 0x50f0f7
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 0x50f106
call ebx
cmp eax, 0x26
mov ebx, eax
je 0x50f106
call fcn.004dccc9
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 0x50f112
mov ebx, dword [ebp - 0x34]
cmp dword [ebp - 0x40], ebx
cmovbe ebx, dword [ebp - 0x40]
jmp 0x50f119
or eax, 0xffffffff
mov edx, eax
jmp 0x50f12a
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