Function at 0x401b50
Capabilities:
Connect pipe
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x78
mov eax, dword [0x40d040]
xor eax, esp
mov dword [esp + 0x74], eax
push esi
push edi
mov dword [esp + 0x24], 0
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x1c], 0xffffffff
call fcn.00401dd0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x401d8f
lea eax, [esp + 0x40]
xorps xmm0, xmm0
push eax
movaps xmmword [esp + 0x44], xmm0
call dword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
jne 0x401da3
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.RPCRT4.dll_UuidToStringW]
test eax, eax
jne 0x401da3
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], eax
test eax, eax
je 0x401da3
xorps xmm0, xmm0
mov dword [esp + 0x60], 0
push 0x208
movaps xmmword [esp + 0x54], xmm0
movq qword [esp + 0x44], xmm0
mov dword [esp + 0x4c], 0
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
test edi, edi
je 0x401da7
cmp dword [0x40d0d4], 7
mov ecx, 0x40d0c0
push dword [esp + 0x18]
cmova ecx, dword [0x40d0c0]
push ecx
push 0x104
push edi
call fcn.004013a0
add esp, 0x10
lea eax, [esp + 0x50]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x401c54
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x401da7
cmp dword [0x40d164], 7
lea ecx, [esp + 0x44]
push 0
push ecx
mov eax, 0x40d150
cmova eax, dword [0x40d150]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
jne 0x401c8a
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x401da7
lea eax, [esp + 0x40]
push eax
push 0
push 0x800
push 0x800
push 0xa
push 0
push 0x40000003
push edi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push dword [esp + 0x14]
mov edi, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
cmp edi, 0xffffffff
je 0x401da7
test edi, edi
je 0x401da7
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x401cf2
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
or eax, 0xffffffff
jmp 0x401db5
mov dword [esp + 0x38], eax
xorps xmm0, xmm0
lea eax, [esp + 0x28]
movlpd qword [esp + 0x28], xmm0
push eax
push edi
movlpd qword [esp + 0x38], xmm0
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x401d22
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x401ce1
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0
push eax
push 0
push dword [esp + 0x2c]
push 0x401fa0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x401d55
push edi
mov dword [esp + 0x20], eax
call esi
mov eax, dword [esp + 0x18]
jmp 0x401daa
mov ecx, dword [esp + 0x20]
mov edx, edi
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x401d96
push 0x1388
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x401d94
mov ecx, edi
call fcn.00402160
push edi
call esi
mov eax, dword [esp + 0x18]
jmp 0x401daa
or edx, 0xffffffff
jmp 0x401d96
mov edx, edi
push edx
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x401dad
jmp 0x401daa
push 0xffffffffffffffff
call esi
or eax, 0xffffffff
push eax
call esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x401db8
push eax
call esi
mov ecx, dword [esp + 0x7c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00406fc9
mov esp, ebp
pop ebp
ret