Function at 0x180004790
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x1f0]
sub rsp, 0x2f0
mov rax, qword [0x180028008]
xor rax, rsp
mov qword [rbp + 0x1e0], rax
lea rdx, [rsp + 0x7c]
call fcn.180003f70
test eax, eax
je 0x180004ab4
mov eax, dword [0x180023578]
lea rdx, [rsp + 0x70]
movsd xmm0, qword [str.CLSID_]
xor esi, esi
mov dword [rsp + 0x78], eax
xor r9d, r9d
lea rax, [rsp + 0x58]
mov qword [rsp + 0x300], rdi
mov qword [rsp + 0x40], rax
xor r8d, r8d
lea rax, [rsp + 0x50]
movsd qword [rsp + 0x70], xmm0
mov qword [rsp + 0x38], rax
mov rcx, 0xffffffff80000000
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, esi
lea r14, str.Sample_Text_Service
test eax, eax
sete dil
test eax, eax
jne 0x180004976
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0x50]
lea r9d, [rsi + 1]
xor r8d, r8d
xor edx, edx
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
lea rdx, str.InProcServer32
test eax, eax
mov ebx, esi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], rax
sete bl
lea rax, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov qword [rsp + 0x30], rsi
and ebx, edi
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
mov edi, esi
cmove edi, ebx
test edi, edi
je 0x18000496b
mov rcx, qword [0x18002a318]
lea rdx, [rbp - 0x30]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rbp - 0x30]
mov dword [rsp + 0x58], eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0x60]
lea r9d, [rsi + 1]
xor r8d, r8d
xor edx, edx
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
mov ebx, esi
sete bl
and ebx, edi
lea rdi, str.Apartment
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0x60]
lea r9d, [rsi + 1]
xor r8d, r8d
lea rdx, str.ThreadingModel
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
mov edi, esi
test eax, eax
cmove edi, ebx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
mov rdi, qword [rsp + 0x300]
je 0x180004ab4
xor edx, edx
lea rax, [rsp + 0x50]
lea r9, [0x18001a3f0]
mov qword [rsp + 0x20], rax
lea rcx, [0x18001a580]
lea r8d, [rdx + 1]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x180004a34
mov rcx, qword [rsp + 0x50]
lea rdx, [0x1800234e0]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov ebx, eax
test eax, eax
jne 0x180004a21
mov rcx, qword [0x18002a318]
lea rdx, [rbp - 0x30]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rcx, qword [rsp + 0x50]
lea r9, [0x180023500]
mov dword [rsp + 0x40], esi
lea rdx, [0x1800234e0]
mov dword [rsp + 0x38], eax
mov r8d, 0x411
lea rax, [rbp - 0x30]
mov r10, qword [rcx]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x13
mov qword [rsp + 0x20], r14
call qword [r10 + 0x28]
mov ebx, eax
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x10]
test ebx, ebx
jne 0x180004ab4
xor edx, edx
lea rax, [rsp + 0x50]
lea r9, [0x18001a4d0]
mov qword [rsp + 0x20], rax
lea rcx, [0x18001a550]
lea r8d, [rdx + 1]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x180004ab4
mov rcx, qword [rsp + 0x50]
lea r9, [0x1800234e0]
lea r8, [0x18001a540]
lea rdx, [0x1800234e0]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x50]
lea r9, [0x1800234e0]
lea r8, [0x18001a530]
lea rdx, [0x1800234e0]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x50]
mov ebx, eax
mov rdx, qword [rcx]
call qword [rdx + 0x10]
test ebx, ebx
jne 0x180004ab4
xor eax, eax
jmp 0x180004ba8
xor edx, edx
lea rax, [rsp + 0x50]
lea r9, [0x18001a3f0]
mov qword [rsp + 0x20], rax
lea rcx, [0x18001a580]
lea r8d, [rdx + 1]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x180004af9
mov rcx, qword [rsp + 0x50]
lea rdx, [0x1800234e0]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x10]
xor edx, edx
lea rax, [rsp + 0x50]
lea r9, [0x18001a4d0]
mov qword [rsp + 0x20], rax
lea rcx, [0x18001a550]
lea r8d, [rdx + 1]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x180004b6c
mov rcx, qword [rsp + 0x50]
lea r9, [0x1800234e0]
lea r8, [0x18001a540]
lea rdx, [0x1800234e0]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, qword [rsp + 0x50]
lea r9, [0x1800234e0]
lea r8, [0x18001a530]
lea rdx, [0x1800234e0]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x10]
lea rdx, [rsp + 0x7c]
call fcn.180003f70
test eax, eax
je 0x180004ba3
movsd xmm0, qword [str.CLSID_]
lea rdx, [rsp + 0x70]
mov eax, dword [0x180023578]
mov rcx, 0xffffffff80000000
movsd qword [rsp + 0x70], xmm0
mov dword [rsp + 0x78], eax
call fcn.180004290
mov eax, 0x80004005
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.180005950
lea r11, [rsp + 0x2f0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret