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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x3021ae88]
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 0x3004de44
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
jmp 0x3004de55
mov ecx, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
push 0x3026c680
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
test eax, eax
je 0x3004dea7
mov ecx, dword [0x30245528]
test ecx, ecx
je 0x3004de8e
mov edx, dword [0x3024552c]
call fcn.30046b30
mov ecx, dword [0x30245528]
call fcn.300011f0
mov dword [0x30245528], 0
push 0x3026c680
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x30245524], 0
je 0x3004dea7
call fcn.30046a30
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
xor ecx, ecx
call fcn.3004d9e0
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jle 0x3004e086
lea ecx, [eax + 1]
pushfd
mov eax, dword fs:[0x18]
pop dword [esp + 0x10]
test eax, eax
jne 0x3004dede
or esi, 0xffffffff
or edi, 0xffffffff
jmp 0x3004dee7
mov esi, dword [eax + 0x34]
mov edi, dword [eax + 0xbf4]
push ecx
push 8
push dword [0x30271450]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword fs:[0x18]
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x3004df18
mov eax, dword [esp + 0x10]
mov dword [ecx + 0x34], esi
mov dword [ecx + 0xbf4], edi
test eax, eax
je 0x3004df18
push eax
popfd
mov esi, dword [esp + 0x18]
lea eax, [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ecx, esi
push eax
call fcn.3004d9e0
add esp, 4
cmp dword [0x3026f250], 0
je 0x3004e00b
mov ecx, str.pipe
call fcn.30003370
mov esi, eax
mov dword [esp + 0x28], esi
test esi, esi
je 0x3004e02d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov edx, 8
lea ecx, [esp + 0x30]
call fcn.30049ab0
add esp, 4
lea edi, [esi - 1]
lea ecx, [ecx]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x3004df70
mov ax, word [0x30205ac8]
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 0x3004df90
sub edx, ecx
lea edi, [esi - 1]
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x3004dfa0
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 0x3004dfc1
mov eax, dword [str..log]
mov dword [ecx], eax
mov al, byte [0x30205ad0]
push 0x302075b8
push edx
mov byte [ecx + 4], al
call fcn.3016a4a2
mov esi, eax
add esp, 8
test esi, esi
je 0x3004e02d
push esi
push 1
push dword [esp + 0x1c]
push dword [esp + 0x24]
call fcn.3016bd6d
push esi
call fcn.3016a5de
add esp, 0x14
xor ebx, ebx
jmp 0x3004e02d
push 0xffffffffffffffff
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x1c]
push eax
push esi
push eax
push esi
push 0x3026d780
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 0x3004e046
or edi, 0xffffffff
mov dword [esp + 0x10], 0xffffffff
jmp 0x3004e053
mov edi, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [esp + 0x10], eax
push dword [esp + 0x18]
push 0
push dword [0x30271450]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword fs:[0x18]
test eax, eax
je 0x3004e082
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x34], edi
mov dword [eax + 0xbf4], ecx
test esi, esi
je 0x3004e082
push esi
popfd
mov esi, dword [esp + 0x1c]
mov ecx, dword fs:[0x18]
test ecx, ecx
je 0x3004e0bc
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 0x3004e0be
push esi
popfd
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.3015dd6d
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.3015dd6d
mov esp, ebp
pop ebp
ret