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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2cc
mov ebx, dword [esp + 0x2e4]
cmp dword [ebx + 8], 7
je 0x466a23
mov dword [esp + 8], 0x613
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.handle__type__UV_NAMED_PIPE
call fcn.0049c730
mov eax, dword [ebx + 0x2c]
mov edx, eax
and edx, 0xfffdffff
test ah, 0x10
mov dword [ebx + 0x2c], edx
je 0x466e90
mov eax, dword [ebx + 0xa0]
test eax, eax
je 0x466a4c
mov dword [esp], eax
call fcn.00470400
mov eax, dword [esp + 0x2e8]
mov edx, dword [eax + 0x20]
mov eax, dword [ebx + 0x2c]
test edx, edx
js 0x466e30
test ah, 1
je 0x466d15
lea eax, [esp + 0x2c]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x94]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
sub esp, 0x18
test eax, eax
je 0x466cf0
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x466d12
mov edx, dword [ebx + 0x90]
test edx, edx
je 0x466bc8
mov edx, dword [ebx + 0x108]
mov edi, edx
or edi, dword [ebx + 0x10c]
jne 0x466ce0
cmp eax, 0xf
jbe 0x466d50
lea eax, [esp + 0x38]
lea edi, [esp + 0x28]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x10
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x94]
mov dword [esp], eax
call esi
sub esp, 0x14
test eax, eax
je 0x466cf0
cmp dword [esp + 0x28], 0x10
je 0x466b42
mov dword [esp + 8], 0x642
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.bytes__sizeof_ipc_frame.header_
call fcn.0049c730
mov eax, dword [esp + 0x38]
cmp eax, 7
jg 0x466de1
test al, 2
je 0x466bc0
mov eax, dword [esp + 0x2c]
sub eax, 0x10
cmp eax, 0x277
jbe 0x466dc0
mov dword [esp + 0xc], edi
lea edi, [esp + 0x48]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x278
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x94]
mov dword [esp], eax
call esi
sub esp, 0x14
test eax, eax
je 0x466cf0
cmp dword [esp + 0x28], 0x278
jne 0x466d71
mov eax, dword [esp + 0x38]
mov dword [esp + 4], edi
mov dword [esp], ebx
and eax, 4
mov dword [esp + 8], eax
call fcn.00466960
mov eax, dword [esp + 0x38]
test al, 1
jne 0x466e10
mov dword [esp + 4], 0
mov dword [esp], 0
lea ebp, [esp + 0x30]
call fcn.00455ac0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x34], edx
mov dword [esp + 8], ebp
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [ebx + 0x34]
mov edx, dword [esp + 0x34]
test edx, edx
je 0x466eb1
mov eax, dword [esp + 0x30]
test eax, eax
je 0x466eb1
cmp dword [esp + 0x2c], eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x10], 0
cmovbe eax, dword [esp + 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x94]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x466ef0
mov eax, dword [ebx + 0x90]
mov ecx, dword [esp + 0x28]
test eax, eax
je 0x466c84
mov edx, dword [ebx + 0x10c]
xor edi, edi
mov eax, dword [ebx + 0x108]
mov esi, ecx
cmp edx, 0
ja 0x466c74
cmp eax, ecx
jb 0x466ca4
sub eax, esi
sbb edx, edi
mov dword [ebx + 0x108], eax
mov dword [ebx + 0x10c], edx
mov dword [esp + 8], ebp
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [ebx + 0x38]
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x30], eax
jae 0x466d12
mov eax, dword [ebx + 0x2c]
jmp 0x466a61
mov dword [esp + 8], 0x677
mov dword [esp + 4], str.src_win_pipe.c
xor edi, edi
mov dword [esp], str.handle__pipe.conn.remaining_ipc_rawdata_bytes___bytes
call fcn.0049c730
mov ecx, dword [esp + 0x28]
mov eax, dword [ebx + 0x108]
mov edx, dword [ebx + 0x10c]
mov esi, ecx
jmp 0x466c74
cmp eax, edx
cmovae eax, edx
mov dword [esp + 0x2c], eax
jmp 0x466bc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [0x546adc]
mov edi, dword [0x546ae0]
mov edx, eax
mov dword [esp], esi
mov dword [esp + 4], edi
mov eax, ebx
call fcn.00464520
mov eax, dword [ebx + 0x2c]
and eax, 0x20100
cmp eax, 0x100
je 0x466ed6
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x466e6c
sub eax, 1
mov edx, dword [ebx + 0x2c]
test eax, eax
mov dword [ebx + 0x3c], eax
jne 0x466d42
test dl, 1
jne 0x466d92
add esp, 0x2cc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x636
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.avail___sizeof_ipc_frame.header_
call fcn.0049c730
jmp 0x466ae3
mov dword [esp + 8], 0x655
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.bytes__sizeof_ipc_frame____sizeof_ipc_frame.header_
call fcn.0049c730
jmp 0x466ba5
test dl, 8
jne 0x466d42
mov eax, dword [esp + 0x2e0]
or edx, 8
mov dword [ebx + 0x2c], edx
mov eax, dword [eax + 0x2c]
mov dword [ebx + 0x28], eax
mov eax, dword [esp + 0x2e0]
mov dword [eax + 0x2c], ebx
add esp, 0x2cc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x648
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.avail___sizeof_ipc_frame.header____sizeof_ipc_frame.socket_info_ex_
call fcn.0049c730
jmp 0x466b65
mov dword [esp + 8], 0x644
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.ipc_frame.header.flags____UV_IPC_TCP_SERVER__UV_IPC_RAW_DATA__UV_IPC_TCP_CONNECTION_
call fcn.0049c730
mov eax, dword [esp + 0x38]
jmp 0x466b4f
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [ebx + 0x108], eax
mov dword [ebx + 0x10c], edx
jmp 0x466c9c
test ah, 1
je 0x466d25
mov dword [esp], edx
call dword [0x5779ec]
mov esi, dword [0x546adc]
mov edi, dword [0x546ae0]
sub esp, 4
mov edx, eax
mov eax, ebx
mov dword [esp], esi
mov dword [esp + 4], edi
call fcn.00464520
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x466d30
mov dword [esp + 8], 0x68e
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], 0x54677c
call fcn.0049c730
mov eax, dword [ebx + 0x3c]
jmp 0x466d30
mov dword [esp + 8], 0x737
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], str.pipe__flags__UV_HANDLE_CONNECTION
call fcn.0049c730
jmp 0x466a3a
mov dword [esp + 8], ebp
mov dword [esp + 4], 0xfffff024
mov dword [esp], ebx
call dword [ebx + 0x38]
mov eax, dword [ebx + 0x2c]
and eax, 0x20100
cmp eax, 0x100
jne 0x466d25
mov eax, dword [esp + 0x2e0]
mov edx, ebx
call fcn.00463b00
jmp 0x466d25
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
jmp 0x466d02