Function at 0x401674
Capabilities:
Connect pipe
Create pipe
Read file on windows
Read pipe
Set registry value
Write file on windows
Write pipe

Disassembly:
push ebp
lea ebp, [esp - 0x1b8]
sub esp, 0x238
mov eax, dword [0x4806f0]
xor eax, ebp
mov dword [ebp + 0x1b4], eax
test byte [ebp + 0x1d0], 4
mov eax, dword [ebp + 0x1c4]
mov ecx, dword [ebp + 0x1c8]
push ebx
mov ebx, dword [ebp + 0x1cc]
push esi
push edi
mov edi, dword [ebp + 0x1c0]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], ecx
jne 0x401772
cmp dword [ebp + 0x1d0], 1
mov dword [ebp - 0x60], 0x20006
jne 0x4016d6
mov dword [ebp - 0x60], 0x20106
jmp 0x4016e6
cmp dword [ebp + 0x1d0], 2
jne 0x4016e6
mov dword [ebp - 0x60], 0x20206
lea ecx, [ebp - 0x5c]
push ecx
push dword [ebp - 0x60]
xor esi, esi
push esi
push eax
push edi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x70], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40171e
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x5c]
push eax
push esi
push dword [ebp - 0x60]
mov dword [ebp - 0x78], esi
push esi
push esi
push esi
push dword [ebp - 0x74]
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp - 0x5c], esi
je 0x40176a
push ebx
lea ecx, [ebp - 0x7c]
call fcn.0042f130
mov ecx, ebx
call fcn.0042ef90
push eax
push esi
lea ecx, [ebp - 0x7c]
call fcn.0042fbb0
push eax
xor edi, edi
inc edi
push edi
push esi
push dword [ebp - 0x6c]
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x401756
mov dword [ebp - 0x70], edi
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x5c], esi
call fcn.0042f1e0
mov eax, dword [ebp - 0x70]
jmp 0x401840
xor esi, esi
push esi
push 0x64
mov eax, 0x104
push eax
push eax
push 0xff
push 6
push 3
push str..pipe_realnetworks.registry.pipe
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov dword [ebp - 0x6c], eax
cmp eax, 0xffffffff
jne 0x4017a1
xor eax, eax
jmp 0x401840
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x4017ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x40179a
push dword [ebp - 0x74]
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x58], edi
call fcn.0044f8f0
cmp byte [ebx + 7], 0xff
pop ecx
pop ecx
jne 0x4017d3
mov ebx, dword [ebx]
lea eax, [ebp + 0xb0]
push ebx
push eax
call fcn.0044f8f0
mov edi, dword [ebp - 0x6c]
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x80]
push eax
push 0x20c
lea eax, [ebp - 0x58]
push eax
push edi
mov dword [ebp - 0x80], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
push esi
lea eax, [ebp - 0x64]
push eax
push 4
lea eax, [ebp - 0x68]
push eax
push edi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x68], esi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x401838
cmp dword [ebp - 0x64], esi
jbe 0x401838
push esi
lea eax, [ebp - 0x64]
push eax
push 4
lea eax, [ebp - 0x68]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x68], esi
sete al
mov ecx, dword [ebp + 0x1b4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044f6e0
add ebp, 0x1b8
leave
ret