Function at 0x4da910
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 0x4da943
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.0053e6a0
mov eax, dword [ebx + 0x2c]
mov edx, eax
and edx, 0xfffdffff
test ah, 0x10
mov dword [ebx + 0x2c], edx
je 0x4dadb0
mov eax, dword [ebx + 0xa0]
test eax, eax
je 0x4da96c
mov dword [esp], eax
call fcn.004e4320
mov eax, dword [esp + 0x2e8]
mov edx, dword [eax + 0x20]
mov eax, dword [ebx + 0x2c]
test edx, edx
js 0x4dad50
test ah, 1
je 0x4dac35
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 0x4dac10
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4dac32
mov edx, dword [ebx + 0x90]
test edx, edx
je 0x4daae8
mov edx, dword [ebx + 0x108]
mov edi, edx
or edi, dword [ebx + 0x10c]
jne 0x4dac00
cmp eax, 0xf
jbe 0x4dac70
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 0x4dac10
cmp dword [esp + 0x28], 0x10
je 0x4daa62
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.0053e6a0
mov eax, dword [esp + 0x38]
cmp eax, 7
jg 0x4dad01
test al, 2
je 0x4daae0
mov eax, dword [esp + 0x2c]
sub eax, 0x10
cmp eax, 0x277
jbe 0x4dace0
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 0x4dac10
cmp dword [esp + 0x28], 0x278
jne 0x4dac91
mov eax, dword [esp + 0x38]
mov dword [esp + 4], edi
mov dword [esp], ebx
and eax, 4
mov dword [esp + 8], eax
call fcn.004da880
mov eax, dword [esp + 0x38]
test al, 1
jne 0x4dad30
mov dword [esp + 4], 0
mov dword [esp], 0
lea ebp, [esp + 0x30]
call fcn.004c96e0
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 0x4dadd1
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4dadd1
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 0x4dae10
mov eax, dword [ebx + 0x90]
mov ecx, dword [esp + 0x28]
test eax, eax
je 0x4daba4
mov edx, dword [ebx + 0x10c]
xor edi, edi
mov eax, dword [ebx + 0x108]
mov esi, ecx
cmp edx, 0
ja 0x4dab94
cmp eax, ecx
jb 0x4dabc4
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 0x4dac32
mov eax, dword [ebx + 0x2c]
jmp 0x4da981
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.0053e6a0
mov ecx, dword [esp + 0x28]
mov eax, dword [ebx + 0x108]
mov edx, dword [ebx + 0x10c]
mov esi, ecx
jmp 0x4dab94
cmp eax, edx
cmovae eax, edx
mov dword [esp + 0x2c], eax
jmp 0x4daae8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [0x7527f8]
mov edi, dword [0x7527fc]
mov edx, eax
mov dword [esp], esi
mov dword [esp + 4], edi
mov eax, ebx
call fcn.004d8440
mov eax, dword [ebx + 0x2c]
and eax, 0x20100
cmp eax, 0x100
je 0x4dadf6
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4dad8c
sub eax, 1
mov edx, dword [ebx + 0x2c]
test eax, eax
mov dword [ebx + 0x3c], eax
jne 0x4dac62
test dl, 1
jne 0x4dacb2
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.0053e6a0
jmp 0x4daa03
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.0053e6a0
jmp 0x4daac5
test dl, 8
jne 0x4dac62
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.0053e6a0
jmp 0x4daa85
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.0053e6a0
mov eax, dword [esp + 0x38]
jmp 0x4daa6f
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [ebx + 0x108], eax
mov dword [ebx + 0x10c], edx
jmp 0x4dabbc
test ah, 1
je 0x4dac45
mov dword [esp], edx
call dword [0x8630d8]
mov esi, dword [0x7527f8]
mov edi, dword [0x7527fc]
sub esp, 4
mov edx, eax
mov eax, ebx
mov dword [esp], esi
mov dword [esp + 4], edi
call fcn.004d8440
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x4dac50
mov dword [esp + 8], 0x68e
mov dword [esp + 4], str.src_win_pipe.c
mov dword [esp], 0x752498
call fcn.0053e6a0
mov eax, dword [ebx + 0x3c]
jmp 0x4dac50
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.0053e6a0
jmp 0x4da95a
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 0x4dac45
mov eax, dword [esp + 0x2e0]
mov edx, ebx
call fcn.004d7a20
jmp 0x4dac45
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
jmp 0x4dac22