Function at 0x50e068
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x569e7d
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x5f7350]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov ebx, ecx
push dword [ebp + 0xc]
lea edi, [ebx - 0x8c]
call fcn.0050da00
xor esi, esi
mov dword [esp + 0x1c], eax
cmp eax, esi
jne 0x50e0c6
or eax, 0xffffffff
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebx - 0x50]
call fcn.0050697f
test al, al
je 0x50e0e9
mov ecx, dword [ebx - 0x50]
push 4
pop edx
call fcn.00506997
push eax
call fcn.00506eb5
mov dword [esp + 0x18], eax
jmp 0x50e0ee
or dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x24], esi
push esi
mov dword [esp + 0x5c], esi
push esi
xor edi, edi
lea esi, [esp + 0x28]
mov dword [esp + 0x28], vtable.GFE::Windows::Event.0
call fcn.0049d7a8
mov dword [esp + 0x58], 1
mov esi, 0x10000
lea eax, [esp + 0x28]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call fcn.0042c6dd
push 0x14
lea eax, [esp + 0x3c]
push edi
push eax
mov byte [esp + 0x64], 2
call fcn.00517bf0
mov eax, dword [esp + 0x30]
add esp, 0xc
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x14]
push ecx
push esi
mov esi, dword [esp + 0x34]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
mov eax, dword [eax]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
je 0x50e1b7
mov edi, dword [ebp + 8]
mov edx, dword [edi]
cmp dword [edx + 0x14], 0x10
jb 0x50e17e
mov ecx, dword [edx]
jmp 0x50e180
mov ecx, edx
mov eax, dword [edx + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x10]
add ecx, esi
push ecx
push eax
mov ecx, esi
call fcn.0050eb7f
mov eax, dword [edi]
mov edi, dword [eax + 0x10]
lea esi, [esp + 0x28]
call fcn.004e7046
or dword [esp + 0x58], 0xffffffff
lea ecx, [esp + 0x20]
call fcn.0049d8bc
mov eax, edi
jmp 0x50e0b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
sub eax, 0xe9
je 0x50e294
dec eax
je 0x50e16f
sub eax, 0x2fb
je 0x50e1f3
mov eax, dword [ebx + 0x34]
cmp eax, edi
je 0x50e1e9
cmp eax, 0xffffffff
je 0x50e1e9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.PopFromDevice__ReadFile
jmp 0x50e27e
push dword [esp + 0x18]
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, edi
je 0x50e22a
push str.PopFromDevice__WaitForSingleObject
cmp eax, 0x102
je 0x50e218
push 0x3e5
jmp 0x50e285
push 0x20
push dword [ebx - 0x50]
call fcn.005063f4
add esp, 0xc
jmp 0x50e2aa
mov eax, dword [esp + 0x1c]
push edi
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x40]
mov dword [esp + 0x18], edi
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x50e16f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
sub eax, 0xe9
je 0x50e294
dec eax
je 0x50e16f
mov eax, dword [ebx + 0x34]
cmp eax, edi
je 0x50e279
cmp eax, 0xffffffff
je 0x50e279
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.PopFromDevice__GetOverlappedResult
push dword [esp + 0x18]
mov dword [ebx + 0x34], edi
push 0x1b
push dword [ebx - 0x50]
call fcn.005063f4
add esp, 0x10
jmp 0x50e2aa
mov eax, dword [ebx + 0x34]
cmp eax, edi
je 0x50e2a7
cmp eax, 0xffffffff
je 0x50e2a7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x34], edi
or edi, 0xffffffff
jmp 0x50e199