Function at 0x180031284
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push r12
push r13
push r15
lea rbp, [rsp - 0x1f0]
sub rsp, 0x2f0
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
cmp byte [0x1800962f8], 0
mov r15, r9
mov r12d, r8d
mov qword [rsp + 0x60], rdx
mov r13, rdx
mov ebx, ecx
jne 0x1800312d0
mov eax, 0xc0000001
jmp 0x180031610
lea rcx, [0x180096140]
mov qword [rsp + 0x2e8], rdi
call qword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
mov rdi, qword [0x1800960e8]
test rdi, rdi
je 0x180031300
cmp ebx, 3
je 0x18003130f
mov ebx, 0xc0000030
jmp 0x1800315f9
cmp ebx, 1
je 0x18003130f
mov ebx, 0xc0000030
jmp 0x1800315f9
mov qword [rsp + 0x320], rsi
lea rax, [rbp - 0x40]
mov qword [rsp + 0x2e0], r14
lea rsi, [0x180070210]
xor r14d, r14d
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x40], 0x2080000
cmp ebx, 1
jne 0x180031356
lea rdx, str.RegistryMachineSoftwarePoliciesMicrosoftWindowsSafer
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
jmp 0x1800313f7
cmp ebx, 2
jne 0x1800313fc
lea rcx, [rsp + 0x68]
call qword [sym.imp.ntdll.dll_RtlFormatCurrentUserKeyPath]
mov ebx, eax
test eax, eax
js 0x180031560
movzx ebx, word [rsp + 0x68]
add bx, 0x78
cmp word [rsp + 0x42], bx
jae 0x1800313b6
mov rcx, qword gs:[0x60]
xor edx, edx
movzx r8d, bx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x1800313b1
mov ebx, 0xc0000017
jmp 0x1800315e9
mov word [rsp + 0x42], bx
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeStringToString]
lea rcx, [rsp + 0x68]
mov ebx, eax
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
test ebx, ebx
js 0x180031560
lea rdx, str.SoftwarePoliciesMicrosoftWindowsSafer
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
mov ebx, eax
test eax, eax
js 0x180031560
mov rdi, r14
jmp 0x180031425
cmp ebx, 3
jne 0x1800315e4
test rdi, rdi
je 0x180031425
mov ecx, 0x5c
cmp cx, 0x5c
jne 0x180031425
movzx eax, word [rsi + 2]
add rsi, 2
movzx ecx, ax
test ax, ax
jne 0x18003140f
mov rdx, rsi
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
mov ebx, eax
test eax, eax
js 0x180031560
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], r14
mov qword [rbp - 0x78], rax
lea r8, [rsp + 0x78]
mov eax, dword [0x180096064]
lea rcx, [rsp + 0x50]
xorps xmm0, xmm0
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov edx, 0x2001b
mov dword [rsp + 0x78], 0x30
mov qword [rbp - 0x80], rdi
mov dword [rbp - 0x70], 0x40
movdqu xmmword [rbp - 0x68], xmm0
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov ebx, eax
cmp eax, 0xc0000034
jne 0x180031560
movzx edi, word [rsp + 0x40]
xor ecx, ecx
shr di, 1
movzx esi, cx
cmp cx, di
jae 0x180031560
xor r13d, r13d
mov rax, qword [rsp + 0x48]
movzx ecx, si
cmp word [rax + rcx*2], 0x5c
jne 0x180031516
movzx eax, si
mov qword [rsp + 0x30], r13
add ax, ax
lea r8, [rsp + 0x78]
mov word [rsp + 0x40], ax
lea rcx, [rsp + 0x58]
mov eax, dword [0x180096064]
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov edx, 0x2001b
mov qword [rsp + 0x20], r13
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov ebx, eax
test eax, eax
js 0x18003150c
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x180031513
cmp eax, 0xc0000034
je 0x18003151e
mov r14b, 1
inc si
cmp si, di
jb 0x1800314b3
mov r13, qword [rsp + 0x60]
test r14b, r14b
je 0x180031560
mov eax, dword [0x180096064]
lea r8, [rsp + 0x78]
xor ecx, ecx
add di, di
mov qword [rsp + 0x30], rcx
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov edx, 0x2001b
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x50]
mov word [rsp + 0x40], di
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov ebx, eax
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x18003158d
lea rcx, [rbp - 0x40]
cmp rax, rcx
je 0x18003158d
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8, qword [rsp + 0x48]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
test ebx, ebx
js 0x1800315e9
cmp r12d, 4
jb 0x1800315d2
test r15, r15
je 0x1800315d2
mov rdx, r13
lea rcx, [rbp - 0x58]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x50]
lea rdx, [rbp - 0x58]
mov r9d, 4
mov dword [rsp + 0x28], 4
xor r8d, r8d
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
jmp 0x1800315d7
mov ebx, 0xc0000023
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x1800315e9
mov ebx, 0xc00000ef
mov rsi, qword [rsp + 0x320]
mov r14, qword [rsp + 0x2e0]
lea rcx, [0x180096140]
call qword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
mov rdi, qword [rsp + 0x2e8]
mov eax, ebx
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.180017170
add rsp, 0x2f0
pop r15
pop r13
pop r12
pop rbx
pop rbp
ret