Function at 0x10001880
Capabilities:
Read file on windows
Read pipe

Disassembly:
mov eax, dword [0x10009fc4]
sub esp, 0x4c
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
je 0x100018aa
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
push ecx
push edx
push str._in_ppstZxGet__tt_p__len_ld__n
push eax
call fcn.10001bce
add esp, 0x10
cmp dword [0x10009fc8], ebx
je 0x10001b97
cmp dword [0x1000a5d0], ebx
je 0x10001b97
mov eax, dword [0x1000a5cc]
cmp eax, ebx
je 0x10001b97
cmp eax, 0xffffffff
je 0x10001b97
lea ecx, [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
push ecx
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x18]
push edx
push ecx
lea edx, [esp + 0x28]
push ebx
push edx
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call ebp
mov esi, eax
mov eax, dword [0x10009fc4]
cmp eax, ebx
je 0x10001921
mov ecx, dword [esp + 0x18]
push ecx
push esi
push str._peekpipe_d__tot_lu__n
push eax
call fcn.10001bce
add esp, 0x10
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, ebx
je 0x100019cb
mov eax, dword [esp + 0x18]
cmp eax, ebx
jbe 0x100019cb
mov edx, dword [esp + 0x10]
push edx
push eax
lea eax, [esp + 0x24]
push str._tot_lu__bytesLeft_lu__n
push eax
call fcn.10001ccb
mov eax, dword [0x10009fc4]
add esp, 0x10
cmp eax, ebx
je 0x1000196f
lea ecx, [esp + 0x1c]
push ecx
push 0x100090e4
push eax
call fcn.10001bce
add esp, 0xc
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], ebx
cmp eax, ebx
jbe 0x100019cb
mov ecx, dword [0x1000a5cc]
lea edx, [esp + 0x14]
push ebx
push edx
lea eax, [esp + 0x24]
push 1
push eax
push ecx
call edi
mov ecx, dword [0x10009fc4]
cmp ecx, ebx
je 0x100019ba
mov edx, dword [esp + 0x1c]
and edx, 0xff
push edx
push eax
mov eax, dword [esp + 0x18]
push eax
push str._flush_0xdd__i_lu__ok_lu__buf_0__x__n
push ecx
call fcn.10001bce
add esp, 0x14
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x1000197b
mov ecx, dword [0x1000a5d0]
mov esi, dword [sym.imp.KERNEL32.dll_ResetEvent]
push ecx
call esi
mov edx, dword [0x1000a5d4]
push edx
call esi
push 0x100092e8
call fcn.10001090
add esp, 4
test eax, eax
jne 0x10001b97
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [0x1000a5cc]
push edx
lea eax, [esp + 0x28]
push ebx
push eax
push ecx
mov byte [esp + 0x34], bl
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call ebp
mov esi, eax
mov eax, dword [0x10009fc4]
cmp eax, ebx
je 0x10001a45
mov edx, dword [esp + 0x18]
push edx
push esi
push str._peekpipe_d__tot_lu__n
push eax
call fcn.10001bce
add esp, 0x10
cmp esi, ebx
je 0x10001b97
mov eax, dword [esp + 0x18]
cmp eax, 1
jb 0x10001b97
cmp eax, 0x38
jbe 0x10001a67
mov dword [esp + 0x18], 0x38
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [esp + 0x14]
push ebx
mov ecx, dword [esp + 0x1c]
push eax
mov eax, dword [0x1000a5cc]
lea edx, [esp + 0x24]
push ecx
push edx
push eax
mov dword [esp + 0x28], ebx
call edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push esi
push str._readFile_lu__nob_lu__lerr_ld__buf__
push 0x1000a3cc
call fcn.10001ccb
mov ecx, dword [0x10009fc4]
add esp, 0x14
cmp ecx, ebx
je 0x10001b1b
push 0x1000a3cc
push 0x100092b8
push ecx
call fcn.10001bce
mov ecx, dword [esp + 0x20]
add esp, 0xc
xor eax, eax
cmp ecx, ebx
mov dword [esp + 0x10], eax
jbe 0x10001b01
xor edx, edx
mov dl, byte [esp + eax + 0x1c]
mov eax, dword [0x10009fc4]
push edx
push 0x100092b4
push eax
call fcn.10001bce
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add esp, 0xc
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x10001ad6
mov ecx, dword [0x10009fc4]
push 0x100092b0
push ecx
call fcn.10001bce
mov ecx, dword [0x10009fc4]
add esp, 8
mov eax, dword [esp + 0x14]
cmp eax, ebx
jbe 0x10001b97
mov esi, dword [esp + 0x60]
cmp esi, ebx
je 0x10001b97
cmp ecx, ebx
je 0x10001b65
xor edx, edx
xor eax, eax
mov dl, byte [esi + 5]
mov al, byte [esi + 4]
push edx
push eax
xor edx, edx
xor eax, eax
mov dl, byte [esi + 3]
mov al, byte [esi + 2]
push edx
push eax
xor edx, edx
xor eax, eax
mov dl, byte [esi + 1]
mov al, byte [esi]
push edx
push eax
push esi
push str._tt_p___x__x__x__x__x__x__n
push ecx
call fcn.10001bce
mov eax, dword [esp + 0x38]
add esp, 0x24
xor ecx, ecx
cmp eax, ebx
mov dword [esp + 0x10], ecx
jbe 0x10001b99
cmp ecx, dword [esp + 0x64]
jae 0x10001b99
mov dl, byte [esp + ecx + 0x1c]
mov byte [ecx + esi], dl
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
jb 0x10001b6f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8