Function at 0x50e23a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x56a176
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.0050dbd0
xor esi, esi
mov dword [esp + 0x1c], eax
cmp eax, esi
jne 0x50e298
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.00506b71
test al, al
je 0x50e2bb
mov ecx, dword [ebx - 0x50]
push 4
pop edx
call fcn.00506b89
push eax
call fcn.005070a7
mov dword [esp + 0x18], eax
jmp 0x50e2c0
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.0049d29f
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.0042c3df
push 0x14
lea eax, [esp + 0x3c]
push edi
push eax
mov byte [esp + 0x64], 2
call fcn.00517e90
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 0x50e389
mov edi, dword [ebp + 8]
mov edx, dword [edi]
cmp dword [edx + 0x14], 0x10
jb 0x50e350
mov ecx, dword [edx]
jmp 0x50e352
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.0050ed51
mov eax, dword [edi]
mov edi, dword [eax + 0x10]
lea esi, [esp + 0x28]
call fcn.00426e9d
or dword [esp + 0x58], 0xffffffff
lea ecx, [esp + 0x20]
call fcn.0049d3d2
mov eax, edi
jmp 0x50e283
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
sub eax, 0xe9
je 0x50e466
dec eax
je 0x50e341
sub eax, 0x2fb
je 0x50e3c5
mov eax, dword [ebx + 0x34]
cmp eax, edi
je 0x50e3bb
cmp eax, 0xffffffff
je 0x50e3bb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.PopFromDevice__ReadFile
jmp 0x50e450
push dword [esp + 0x18]
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, edi
je 0x50e3fc
push str.PopFromDevice__WaitForSingleObject
cmp eax, 0x102
je 0x50e3ea
push 0x3e5
jmp 0x50e457
push 0x20
push dword [ebx - 0x50]
call fcn.005065e6
add esp, 0xc
jmp 0x50e47c
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 0x50e341
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
sub eax, 0xe9
je 0x50e466
dec eax
je 0x50e341
mov eax, dword [ebx + 0x34]
cmp eax, edi
je 0x50e44b
cmp eax, 0xffffffff
je 0x50e44b
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.005065e6
add esp, 0x10
jmp 0x50e47c
mov eax, dword [ebx + 0x34]
cmp eax, edi
je 0x50e479
cmp eax, 0xffffffff
je 0x50e479
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x34], edi
or edi, 0xffffffff
jmp 0x50e36b