Function at 0x407b50
Capabilities:
Connect pipe
Create pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4192f6
mov eax, dword fs:[0]
push eax
mov eax, 0x5690
call fcn.0040eb20
mov eax, dword [0x4210c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x5670], eax
lea eax, [ebp - 0x567c]
push str.HKEY_LOCAL_MACHINESOFTWAREMicrosoftSpeechVoices
push eax
call fcn.00407640
add esp, 8
mov ecx, dword [ebp - 0x5678]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0x567c]
xor esi, esi
sub ecx, edi
mov dword [ebp - 4], 0
imul ecx
mov dword [ebp - 0x566c], 0xffffffff
sar edx, 2
mov eax, edx
mov dword [ebp - 0x5664], esi
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x5668], eax
je 0x407f3c
lea eax, [esi + esi*2]
cmp dword [edi + eax*8 + 0x14], 7
lea edi, [edi + eax*8]
mov eax, dword [edi + 0x10]
jbe 0x407bf4
mov edi, dword [edi]
cmp eax, 9
jne 0x407c26
mov esi, eax
mov eax, str.VW_Misaki
sub edi, eax
movzx edx, word [edi + eax]
movzx ecx, word [eax]
cmp dx, cx
jne 0x407c20
add eax, 2
sub esi, 1
jne 0x407c02
mov esi, dword [ebp - 0x5664]
mov cl, 1
jmp 0x407c28
mov esi, dword [ebp - 0x5664]
xor cl, cl
mov edi, dword [ebp - 0x567c]
test cl, cl
mov eax, esi
cmove eax, dword [ebp - 0x566c]
inc esi
mov dword [ebp - 0x566c], eax
mov dword [ebp - 0x5664], esi
cmp esi, dword [ebp - 0x5668]
jb 0x407be2
cmp eax, 0xffffffff
je 0x407f3c
mov edi, dword [ebp - 0x5670]
push 0
push 0xffffffffffffffff
push 0xffff
push 0xffff
push 0xff
push 6
push 3
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov esi, eax
mov dword [ebp - 0x568c], 0
push 1
lea eax, [ebp - 0x569c]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x569c], xmm0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [ebp - 0x569c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push dword [edi + 8]
lea eax, [ebp - 0x569c]
mov dword [ebp - 0x5688], 0xc
push 0
mov dword [ebp - 0x5684], eax
lea eax, [ebp - 0x5688]
push 0
push eax
mov dword [ebp - 0x5680], 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
push 0
lea eax, [ebp - 0x5664]
mov edi, 1
push eax
push 4
lea eax, [ebp - 0x5668]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407f3c
nop
push 0
lea eax, [ebp - 0x5664]
push eax
push 0x4e20
lea eax, [ebp - 0x5630]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407f3c
xorps xmm0, xmm0
mov dword [ebp - 0x5650], 0
lea ecx, [ebp - 0x5630]
mov dword [ebp - 0x564c], 0
movups xmmword [ebp - 0x5660], xmm0
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407d70
sub ecx, edx
lea eax, [ebp - 0x5630]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x5660]
call fcn.00401230
push 0x800
lea eax, [ebp - 0x810]
mov byte [ebp - 4], 1
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x5670]
push edi
push dword [eax + 0xc]
lea eax, [ebp - 0x810]
push 0x41ac74
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
xorps xmm0, xmm0
mov dword [ebp - 0x5638], 0
lea ecx, [ebp - 0x810]
mov dword [ebp - 0x5634], 0
add esp, 0x1c
lea edx, [ecx + 2]
movups xmmword [ebp - 0x5648], xmm0
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407df0
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x5648]
call fcn.00401230
lea eax, [ebp - 0x5648]
mov byte [ebp - 4], 2
push eax
push 0x64
push dword [ebp - 0x5668]
lea eax, [ebp - 0x5660]
push dword [ebp - 0x566c]
push str.HKEY_LOCAL_MACHINESOFTWAREMicrosoftSpeechVoices
push eax
call fcn.00407800
lea ecx, [ebp - 0x810]
add esp, 0x18
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407e50
sub ecx, edx
lea eax, [ebp - 0x5664]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x810]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x5634]
mov byte [ebp - 4], 1
cmp ecx, 7
jbe 0x407ebe
mov edx, dword [ebp - 0x5648]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x407eb4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407f64
push ecx
push edx
call fcn.0040e678
add esp, 8
mov ecx, dword [ebp - 0x564c]
xor eax, eax
mov dword [ebp - 0x5638], 0
mov dword [ebp - 0x5634], 7
mov word [ebp - 0x5648], ax
mov byte [ebp - 4], al
cmp ecx, 7
jbe 0x407f1a
mov edx, dword [ebp - 0x5660]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x407f10
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407f64
push ecx
push edx
call fcn.0040e678
add esp, 8
push 0
lea eax, [ebp - 0x5664]
inc edi
push eax
push 4
lea eax, [ebp - 0x5668]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407d20
lea ecx, [ebp - 0x567c]
call fcn.00407460
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e694
mov esp, ebp
pop ebp
ret
call fcn.0040f790
int3