Function at 0x473170
Capabilities:
Connect pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55c270
mov eax, dword fs:[0]
push eax
sub esp, 0x860
mov eax, dword [0x5c7cec]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 8]
mov dword [ebp - 0x850], esi
test esi, esi
jne 0x4731b6
lea eax, [esi + 8]
jmp 0x473572
cmp dword [esi + 0x10], 0
mov dword [ebp - 0x85c], esi
jne 0x4731c7
mov edi, dword [esi + 0x2c]
jmp 0x4731c9
xor edi, edi
mov ecx, dword [esi + 8]
mov eax, dword [esi]
mov ebx, dword [esi + 0x90]
mov dword [ebp - 0x860], edi
mov dword [ebp - 0x84c], ecx
mov dword [ebp - 0x858], eax
mov dword [ebp - 0x848], ebx
nop dword [eax]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x473570
push 0x400
lea eax, [ebp - 0x830]
mov dword [ebp - 0x20], 0
push 0
push eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x838], 0
mov dword [ebp - 0x834], 0
call fcn.005290f0
push 0x404
lea eax, [ebp - 0x428]
mov dword [ebp - 0x430], 0
push 0
push eax
mov dword [ebp - 0x42c], 0
call fcn.005290f0
add esp, 0x18
push 0
push edi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
cmp dword [ebp - 0x858], 0
je 0x473310
test ebx, ebx
je 0x473310
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push edi
mov ecx, ebx
call dword [0x5677a4]
call ebx
test eax, eax
je 0x473310
mov eax, dword [ebp - 0x858]
cmp eax, dword [ebp - 0x18]
je 0x473310
mov eax, dword [ebp - 0x840]
push 0
mov dword [ebp - 0x430], eax
lea eax, [ebp - 0x20]
push eax
push 0x410
lea eax, [ebp - 0x840]
mov dword [ebp - 0x42c], 0xfffffffa
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x40c
lea eax, [ebp - 0x430]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov ecx, dword [ebp - 0x84c]
jmp 0x4731f0
push 0
lea eax, [ebp - 0x20]
push eax
push 0x410
lea eax, [ebp - 0x840]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4732fe
cmp dword [ebp - 0x20], 0x410
jne 0x473590
mov ecx, dword [ebp - 0x840]
test ecx, ecx
je 0x473514
cmp ecx, 3
je 0x473517
cmp dword [ebp - 0x834], 0x400
ja 0x473514
lea eax, [esi + 0x14]
mov dword [ebp - 0x24], ecx
push eax
mov dword [ebp - 0x86c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x38]
lea ecx, [esi + 0x38]
mov dword [ebp - 0x864], ecx
mov dword [ebp - 0x18], eax
mov ecx, dword [eax + 4]
mov edx, ecx
mov bl, byte [edx + 0xd]
mov byte [ebp - 0x841], bl
test bl, bl
mov ebx, dword [ebp - 0x24]
jne 0x4733ba
cmp dword [edx + 0x10], ebx
jae 0x4733a2
mov edx, dword [edx + 8]
jmp 0x4733a6
mov eax, edx
mov edx, dword [edx]
cmp byte [edx + 0xd], 0
je 0x473398
mov edx, dword [ebp - 0x18]
cmp eax, edx
je 0x4733bd
cmp ebx, dword [eax + 0x10]
jb 0x4733bd
jmp 0x4733bf
mov edx, dword [ebp - 0x18]
mov eax, edx
cmp eax, edx
je 0x4734c1
cmp byte [ebp - 0x841], 0
mov esi, edx
jne 0x4733ef
cmp dword [ecx + 0x10], ebx
jae 0x4733dc
mov ecx, dword [ecx + 8]
jmp 0x4733e0
mov esi, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x4733d2
cmp esi, edx
je 0x4733ef
cmp ebx, dword [esi + 0x10]
jae 0x47342e
mov ecx, dword [ebp - 0x864]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x851]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x569a5b
call fcn.0045dc70
mov ecx, dword [ebp - 0x864]
push eax
add eax, 0x10
push eax
push esi
lea eax, [ebp - 0x868]
push eax
call fcn.0045dca0
mov esi, dword [ebp - 0x868]
mov esi, dword [esi + 0x14]
test esi, esi
je 0x4734bb
push dword [ebp - 0x850]
lea eax, [ebp - 0x430]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x840]
mov ecx, esi
push eax
call dword [0x5677a4]
call esi
mov esi, dword [ebp - 0x850]
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
jmp 0x4734d7
mov esi, dword [ebp - 0x850]
mov eax, dword [ebp - 0x840]
mov dword [ebp - 0x430], eax
mov dword [ebp - 0x42c], 0xffffffff
mov ebx, dword [ebp - 0x848]
lea eax, [ebp - 0x1c]
push 0
push eax
push 0x40c
lea eax, [ebp - 0x430]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x86c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov ecx, dword [ebp - 0x84c]
jmp 0x4731f0
cmp ecx, 3
sete bl
mov dword [ebp - 0x430], ecx
xor edx, edx
mov eax, 0xfffffffb
cmp ecx, 3
push edx
cmove eax, edx
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x1c]
push eax
push 0x40c
lea eax, [ebp - 0x430]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov ecx, dword [ebp - 0x84c]
test bl, bl
mov ebx, dword [ebp - 0x848]
je 0x4731f0
cmp byte [esi + 0xc], 0
jne 0x4731f0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040154f
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x840]
mov dword [ebp - 0x430], eax
mov dword [ebp - 0x42c], 0xfffffffe
jmp 0x4732e5