Function at 0x3004f500
Capabilities:
Connect pipe
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x3021be88]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
or ebx, 0xffffffff
push edi
pushfd
mov eax, dword fs:[0x18]
pop esi
mov dword [esp + 0x1c], esi
test eax, eax
jne 0x3004f534
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
jmp 0x3004f545
mov ecx, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
push 0x3026d740
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
test eax, eax
je 0x3004f597
mov ecx, dword [0x302465d8]
test ecx, ecx
je 0x3004f57e
mov edx, dword [0x302465dc]
call fcn.300480c0
mov ecx, dword [0x302465d8]
call fcn.300011f0
mov dword [0x302465d8], 0
push 0x3026d740
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x302465d4], 0
je 0x3004f597
call fcn.30047fc0
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
xor ecx, ecx
call fcn.3004f0d0
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jle 0x3004f776
lea ecx, [eax + 1]
pushfd
mov eax, dword fs:[0x18]
pop dword [esp + 0x10]
test eax, eax
jne 0x3004f5ce
or esi, 0xffffffff
or edi, 0xffffffff
jmp 0x3004f5d7
mov esi, dword [eax + 0x34]
mov edi, dword [eax + 0xbf4]
push ecx
push 8
push dword [0x30272510]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword fs:[0x18]
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x3004f608
mov eax, dword [esp + 0x10]
mov dword [ecx + 0x34], esi
mov dword [ecx + 0xbf4], edi
test eax, eax
je 0x3004f608
push eax
popfd
mov esi, dword [esp + 0x18]
lea eax, [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ecx, esi
push eax
call fcn.3004f0d0
add esp, 4
cmp dword [0x30270314], 0
je 0x3004f6fb
mov ecx, str.pipe
call fcn.30003280
mov esi, eax
mov dword [esp + 0x28], esi
test esi, esi
je 0x3004f71d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov edx, 8
lea ecx, [esp + 0x30]
call fcn.3004b060
add esp, 4
lea edi, [esi - 1]
lea ecx, [ecx]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x3004f660
mov ax, word [0x30206bb0]
lea edx, [esp + 0x2c]
mov ecx, edx
mov word [edi], ax
mov dword [esp + 0x10], ecx
lea ecx, [ecx]
mov al, byte [edx]
inc edx
test al, al
jne 0x3004f680
sub edx, ecx
lea edi, [esi - 1]
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x3004f690
mov esi, dword [esp + 0x10]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x28]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [edx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x3004f6b1
mov eax, dword [str..log]
mov dword [ecx], eax
mov al, byte [0x30206bb8]
push 0x30208678
push edx
mov byte [ecx + 4], al
call fcn.3016bb02
mov esi, eax
add esp, 8
test esi, esi
je 0x3004f71d
push esi
push 1
push dword [esp + 0x1c]
push dword [esp + 0x24]
call fcn.3016d4bd
push esi
call fcn.3016bc3e
add esp, 0x14
xor ebx, ebx
jmp 0x3004f71d
push 0xffffffffffffffff
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x1c]
push eax
push esi
push eax
push esi
push 0x3026e840
call dword [sym.imp.KERNEL32.dll_CallNamedPipeW]
neg eax
sbb eax, eax
not eax
and ebx, eax
pushfd
mov eax, dword fs:[0x18]
pop esi
test eax, eax
jne 0x3004f736
or edi, 0xffffffff
mov dword [esp + 0x10], 0xffffffff
jmp 0x3004f743
mov edi, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [esp + 0x10], eax
push dword [esp + 0x18]
push 0
push dword [0x30272510]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004f772
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x34], edi
mov dword [eax + 0xbf4], ecx
test esi, esi
je 0x3004f772
push esi
popfd
mov esi, dword [esp + 0x1c]
mov ecx, dword fs:[0x18]
test ecx, ecx
je 0x3004f7ac
mov eax, dword [esp + 0x20]
mov dword [ecx + 0x34], eax
mov eax, dword [esp + 0x24]
mov dword [ecx + 0xbf4], eax
mov eax, ebx
test esi, esi
je 0x3004f7ae
push esi
popfd
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.3015f3bd
mov esp, ebp
pop ebp
ret
mov eax, ebx
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.3015f3bd
mov esp, ebp
pop ebp
ret