Function at 0x40158f
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 [0x48e610]
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 0x40168d
cmp dword [ebp + 0x1d0], 1
mov dword [ebp - 0x60], 0x20006
jne 0x4015f1
mov dword [ebp - 0x60], 0x20106
jmp 0x401601
cmp dword [ebp + 0x1d0], 2
jne 0x401601
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 0x401639
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 0x401685
push ebx
lea ecx, [ebp - 0x7c]
call fcn.0043f6f0
mov ecx, ebx
call fcn.0043f510
push eax
push esi
lea ecx, [ebp - 0x7c]
call fcn.00440160
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 0x401671
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.0043f790
mov eax, dword [ebp - 0x70]
jmp 0x40175b
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 0x4016bc
xor eax, eax
jmp 0x40175b
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x4016d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x4016b5
push dword [ebp - 0x74]
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x58], edi
call fcn.0045f6c0
cmp byte [ebx + 7], 0xff
pop ecx
pop ecx
jne 0x4016ee
mov ebx, dword [ebx]
lea eax, [ebp + 0xb0]
push ebx
push eax
call fcn.0045f6c0
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 0x401753
cmp dword [ebp - 0x64], esi
jbe 0x401753
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.0045f4ee
add ebp, 0x1b8
leave
ret