Function at 0x180018230
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x5c8]
sub rsp, 0x6c0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov rax, qword [0x1800548e0]
xor rax, rsp
mov qword [rbp + 0x5b0], rax
mov eax, dword [0x180059dd4]
test al, 1
jne 0x180018291
or eax, 1
mov dword [0x180059dd4], eax
call fcn.18001ff10
lea rcx, [0x1800400e0]
call fcn.180022e9c
nop
mov eax, dword [0x180059d74]
mov dword [rsp + 0x60], eax
mov eax, dword [0x180059d78]
mov dword [rsp + 0x64], eax
mov eax, dword [0x180059d7c]
mov dword [rsp + 0x68], eax
mov eax, dword [0x180059d80]
mov dword [rsp + 0x6c], eax
mov r8d, 0x104
lea rdx, [rbp + 0x190]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ole32.dll_StringFromGUID2]
lea r9, [rbp + 0x190]
lea r8, str.CLSID_s
mov edx, 0x104
lea rcx, [rbp - 0x80]
call fcn.180018080
test eax, eax
js 0x180018541
mov ebx, 0x80004005
xor r12d, r12d
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x80]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x18001853f
mov edx, dword [0x180059dd4]
test dl, 1
jne 0x180018369
or edx, 1
mov dword [0x180059dd4], edx
call fcn.18001ff10
lea rcx, [0x1800400e0]
call fcn.180022e9c
nop
mov edx, dword [0x180059dd4]
lea rsi, [0x180045398]
mov rdi, rsi
mov r8, qword [0x180059d90]
test r8, r8
cmovne rdi, r8
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
not rcx
lea rdi, [rcx - 1]
add edi, edi
test dl, 1
jne 0x1800183ba
or edx, 1
mov dword [0x180059dd4], edx
call fcn.18001ff10
lea rcx, [0x1800400e0]
call fcn.180022e9c
nop
mov r8, qword [0x180059d90]
test r8, r8
cmovne rsi, r8
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rsi
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
cmove ebx, r12d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
js 0x18001853f
lea r9, [rbp + 0x190]
lea r8, str.CLSID_sInprocServer32
mov edx, 0x104
lea rcx, [rbp - 0x80]
call fcn.180018080
test eax, eax
js 0x180018541
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x80]
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test eax, eax
jle 0x180018464
movzx edi, ax
or edi, 0x80070000
test edi, edi
js 0x18001853b
mov r8d, 0x104
lea rdx, [rbp + 0x3a0]
mov rcx, qword [0x180059d20]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1800184ce
lea rcx, [rbp + 0x3a0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x3a0]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test eax, eax
jle 0x1800184ce
movzx edi, ax
or edi, 0x80070000
test edi, edi
js 0x180018530
mov rax, qword [str.Apartment]
mov qword [rsp + 0x60], rax
mov rax, qword [0x1800489d0]
mov qword [rsp + 0x68], rax
mov eax, dword [0x1800489d8]
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x28], socket
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.ThreadingModel
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test eax, eax
jle 0x180018530
movzx edi, ax
or edi, 0x80070000
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x180018541
mov eax, ebx
mov rcx, qword [rbp + 0x5b0]
xor rcx, rsp
call fcn.1800221a0
lea r11, [rsp + 0x6c0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r12, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret