Function at 0x4277d0
Capabilities:
Read file on windows
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x308
push esi
mov esi, ecx
lea ecx, [eax - 0xc8]
cmp ecx, 0x14
ja 0x427a5e
push ebx
mov ebx, dword [ebp + 0x10]
push edi
add ebx, 0x30
push ebx
push eax
call fcn.004248c0
mov edi, eax
add esp, 8
mov dword [ebp - 8], edi
test edi, edi
jne 0x427827
mov edx, dword [ebp + 8]
push edx
push ebx
lea eax, [ebp - 0x108]
push str.Pipe:_Cant_allocate_memory___i__bytes__Cmd___i_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push edi
push edi
jmp 0x4278d9
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x427843
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x427843
push eax
push ecx
lea edx, [edi + 0x30]
push edx
call fcn.004b0bb0
add esp, 0xc
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, dword [edi]
push 0
mov ebx, eax
lea eax, [ebp - 4]
push eax
mov eax, dword [esi + 0x20c]
push 0x200
lea ecx, [ebp - 0x308]
push ecx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
lea ecx, [esi + 4]
push ecx
mov dword [ebp + 0xc], eax
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x50b3a4]
sub eax, ebx
push eax
push ebx
xor ebx, ebx
push ebx
push edi
call fcn.0044f9e0
cmp dword [ebp + 0x10], ebx
jne 0x4278fc
mov eax, dword [ebp + 0xc]
cmp eax, 0x6d
jne 0x4278b9
mov ecx, esi
call fcn.00427700
pop edi
lea eax, [ebx + 1]
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 0xea
je 0x4278fc
mov edx, dword [ebp + 8]
push eax
push edx
lea eax, [ebp - 0x108]
push str.Pipe:_TransactNamedPipe_failed__Cmd___i__ErrCode__0x_08X_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push ebx
push ebx
lea ecx, [ebp - 0x108]
push 0x40
push ecx
call fcn.00420020
add esp, 0x20
mov ecx, esi
call fcn.00427700
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp - 4], 4
jb 0x427955
mov edi, dword [ebp - 0x308]
lea edx, [ebp - 0x308]
mov dword [esi + 0x214], edx
cmp edi, 0x30
jbe 0x427955
mov eax, dword [ebp - 0x304]
cmp eax, 0x7e
je 0x42796d
mov ecx, dword [ebp - 0x2ec]
mov edx, dword [ebp - 0x2dc]
push ecx
mov ecx, dword [ebp - 0x2e0]
push edx
mov edx, dword [ebp - 0x2f4]
push ecx
mov ecx, dword [0x50b39c]
push edx
push 0xffffffffffffffff
push eax
mov eax, dword [ebp - 0x2fc]
push eax
call fcn.0040c090
mov ecx, esi
mov dword [esi + 0x214], ebx
call fcn.00427700
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov dword [esi + 0x214], ebx
cmp edi, ebx
jne 0x42799a
push ebx
push ebx
push ebx
push ebx
push str.Empty_data_recieved_from_server
call fcn.004200b0
add esp, 0x14
mov ecx, esi
call fcn.00427700
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
push 1
push edi
call fcn.004412c0
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x308]
push edx
push eax
mov dword [esi + 0x214], eax
call fcn.004b0bb0
mov eax, dword [ebp - 4]
mov ebx, dword [esi + 0x214]
sub edi, eax
add esp, 0x14
add ebx, eax
test edi, edi
jle 0x427a0a
lea ecx, [ecx]
cmp dword [ebp + 0x10], 0
jne 0x427a0a
mov ecx, dword [esi + 0x20c]
push 0
lea eax, [ebp - 4]
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp + 0x10], eax
test eax, eax
jne 0x4279ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x427a0a
mov eax, dword [ebp - 4]
sub edi, eax
add ebx, eax
test edi, edi
jg 0x4279d0
mov eax, dword [esi + 0x20c]
test eax, eax
je 0x427a2a
mov dword [esi + 0x20c], 0
cmp eax, 0xffffffff
je 0x427a2a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 8]
push edx
call fcn.00441300
mov eax, dword [esi + 0x214]
add esp, 4
lea ecx, [eax + 0x30]
mov dword [esi + 0x218], ecx
mov edx, dword [eax]
pop edi
sub edx, 0x30
pop ebx
mov dword [esi + 0x21c], edx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 0xc
push eax
lea eax, [ebp - 0x108]
push str.Invalid_command_id___i__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push 0
push 0
lea ecx, [ebp - 0x108]
push 0x40
push ecx
call fcn.00420020
add esp, 0x1c
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc