Function at 0x180030e64
Capabilities:
Set registry value

Disassembly:
push rbp
push rsi
push r12
push r15
lea rbp, [rsp - 0x1d8]
sub rsp, 0x2d8
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
cmp byte [0x1800962f8], 0
mov r15, r8
mov r12d, edx
mov esi, ecx
jne 0x180030ea6
mov eax, 0xc0000001
jmp 0x180031267
mov qword [rsp + 0x300], rbx
lea rcx, [0x180096140]
mov qword [rsp + 0x308], rdi
call qword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
mov rdi, qword [0x1800960e8]
test rdi, rdi
je 0x180030ede
cmp esi, 3
je 0x180030eed
mov ebx, 0xc0000030
jmp 0x180031248
cmp esi, 1
je 0x180030eed
mov ebx, 0xc0000030
jmp 0x180031248
cmp byte [0x1800961c8], 0
je 0x180030f0c
call fcn.1800063f0
mov ebx, eax
test eax, eax
js 0x180031248
mov rdi, qword [0x1800960e8]
mov qword [rsp + 0x318], r13
lea rax, [rbp - 0x50]
xor r13d, r13d
mov qword [rsp + 0x2d0], r14
mov qword [rsp + 0x48], rax
lea r14, [0x180070210]
mov dword [rsp + 0x40], 0x2080000
cmp esi, 1
jne 0x180030f53
lea rdx, str.RegistryMachineSoftwarePoliciesMicrosoftWindowsSafer
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
jmp 0x180030ff4
cmp esi, 2
jne 0x180030ff9
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_RtlFormatCurrentUserKeyPath]
mov ebx, eax
test eax, eax
js 0x180031158
movzx ebx, word [rsp + 0x60]
add bx, 0x78
cmp word [rsp + 0x42], bx
jae 0x180030fb3
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 0x180030fae
mov ebx, 0xc0000017
jmp 0x180031238
mov word [rsp + 0x42], bx
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeStringToString]
lea rcx, [rsp + 0x60]
mov ebx, eax
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
test ebx, ebx
js 0x180031158
lea rdx, str.SoftwarePoliciesMicrosoftWindowsSafer
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
mov ebx, eax
test eax, eax
js 0x180031158
mov rdi, r13
jmp 0x180031023
cmp esi, 3
jne 0x180031233
test rdi, rdi
je 0x180031023
mov ecx, 0x5c
cmp cx, 0x5c
jne 0x180031023
movzx eax, word [r14 + 2]
add r14, 2
movzx ecx, ax
test ax, ax
jne 0x18003100c
mov rdx, r14
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
mov ebx, eax
test eax, eax
js 0x180031158
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], r13
mov qword [rbp - 0x80], rax
lea r8, [rsp + 0x70]
mov eax, dword [0x180096064]
lea rcx, [rsp + 0x50]
xorps xmm0, xmm0
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov qword [rsp + 0x20], r13
mov edx, 0x2001b
mov dword [rsp + 0x70], 0x30
mov qword [rsp + 0x78], rdi
mov dword [rbp - 0x78], 0x40
movdqu xmmword [rbp - 0x70], xmm0
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov ebx, eax
cmp eax, 0xc0000034
jne 0x180031158
movzx edi, word [rsp + 0x40]
xor r14b, r14b
shr di, 1
movzx esi, r13w
cmp r13w, di
jae 0x180031158
mov rax, qword [rsp + 0x48]
movzx ecx, si
cmp word [rax + rcx*2], 0x5c
jne 0x180031115
movzx eax, si
mov qword [rsp + 0x30], r13
add ax, ax
lea r8, [rsp + 0x70]
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 0x18003110b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x180031112
cmp eax, 0xc0000034
je 0x18003111d
mov r14b, 1
inc si
cmp si, di
jb 0x1800310b2
test r14b, r14b
je 0x180031158
mov eax, dword [0x180096064]
lea r8, [rsp + 0x70]
add di, di
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], eax
lea rcx, [rsp + 0x50]
xor r9d, r9d
mov word [rsp + 0x40], di
mov edx, 0x2001b
mov qword [rsp + 0x20], r13
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov ebx, eax
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x180031185
lea rcx, [rbp - 0x50]
cmp rax, rcx
je 0x180031185
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 0x180031238
cmp r12d, 4
jb 0x180031221
test r15, r15
je 0x180031221
lea rdx, str.HonorUserIdentities
lea rcx, [rbp - 0x60]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x50]
lea rdx, [rbp - 0x60]
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
test eax, eax
js 0x180031226
cmp dword [r15], r13d
setne al
cmp byte [0x180096068], al
je 0x180031226
cmp qword [0x1800960e8], r13
mov byte [0x180096068], al
jne 0x180031226
call fcn.18001220c
xor r9d, r9d
lea r8d, [r9 + 1]
call fcn.18000a164
cmp byte [0x180096068], r13b
je 0x180031226
xor r9d, r9d
lea r8d, [r9 + 2]
call fcn.18000a164
jmp 0x180031226
mov ebx, 0xc0000023
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x180031238
mov ebx, 0xc00000ef
mov r13, qword [rsp + 0x318]
mov r14, qword [rsp + 0x2d0]
lea rcx, [0x180096140]
call qword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
mov rdi, qword [rsp + 0x308]
mov eax, ebx
mov rbx, qword [rsp + 0x300]
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.180017170
add rsp, 0x2d8
pop r15
pop r12
pop rsi
pop rbp
ret