Function at 0x14000cb2c
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x170]
sub rsp, 0x270
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rbp + 0x160], rax
xor r12d, r12d
mov rsi, rdx
mov qword [rsp + 0x38], r12
mov r15d, ecx
mov qword [rsp + 0x40], r12
mov edi, r12d
mov qword [rsp + 0x30], r12
test rdx, rdx
je 0x14002d29b
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rsi + rdx*2], r12w
jne 0x14000cb86
mov rcx, rsi
call fcn.14000cd14
test eax, eax
je 0x14002d29b
mov rcx, qword [0x1400ad2f8]
lea rbx, [0x1400ad2f8]
lea r14, str._avD
cmp rcx, rbx
je 0x14000cbd3
test byte [rcx + 0x1c], 4
jne 0x14002d074
cmp rcx, rbx
je 0x14000cbd3
test byte [rcx + 0x1c], 4
jne 0x14002d096
mov edx, r15d
test r15d, r15d
je 0x14002d12f
sub edx, 1
jne 0x14000ccd9
cmp rcx, rbx
je 0x14000cbf7
test byte [rcx + 0x1c], 4
jne 0x14002d0f5
mov r14, rsi
test rdi, rdi
jne 0x14002d110
lea rdx, str.PrintersDevModePerUser
mov rcx, 0xffffffff80000001
lea rax, [rsp + 0x30]
mov qword [rsp + 0x30], r12
mov r9d, 3
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
mov rcx, qword [0x1400ad2f8]
lea rax, [0x1400ad2f8]
cmp rcx, rax
je 0x14000cc4e
test byte [rcx + 0x1c], 4
jne 0x14002d1a9
test ebx, ebx
jne 0x14000cc99
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x38]
mov rdx, r14
call fcn.14000cd98
mov ebx, eax
mov rcx, qword [0x1400ad2f8]
lea rax, [0x1400ad2f8]
mov rdi, qword [rsp + 0x38]
cmp rcx, rax
je 0x14000cc88
test byte [rcx + 0x1c], 4
jne 0x14002d1c7
test ebx, ebx
je 0x14002d1e9
test rdi, rdi
jne 0x14002d28c
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x14000ccac
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rbp + 0x160]
xor rcx, rsp
call fcn.14001aad0
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
cmp edx, 1
jne 0x14000cd05
cmp rcx, rbx
je 0x14000cced
test byte [rcx + 0x1c], 4
jne 0x14002d0bb
mov r14, rsi
test rdi, rdi
jne 0x14002d0d6
lea rdx, [0x140091db8]
jmp 0x14000cc0a
mov ebx, 0x57
jmp 0x14000cc9e
mov rcx, qword [rcx + 0x10]
mov edx, 0x1a
mov r8, r14
call fcn.14002ef94
mov rcx, qword [0x1400ad2f8]
mov rdi, qword [rsp + 0x30]
jmp 0x14000cbc4
mov rcx, qword [rcx + 0x10]
mov edx, 0x1b
mov r9, rsi
mov r8, r14
call fcn.140040874
mov rcx, qword [0x1400ad2f8]
mov rdi, qword [rsp + 0x30]
jmp 0x14000cbd3
mov rcx, qword [rcx + 0x10]
mov edx, 0x1e
mov r8, r14
call fcn.14002ef94
mov rdi, qword [rsp + 0x30]
jmp 0x14000cced
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop
jmp 0x14000ccf9
mov rcx, qword [rcx + 0x10]
mov edx, 0x1d
mov r8, r14
call fcn.14002ef94
mov rdi, qword [rsp + 0x30]
jmp 0x14000cbf7
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop
jmp 0x14000cc03
cmp rcx, rbx
je 0x14002d14b
test byte [rcx + 0x1c], 4
je 0x14002d14b
mov rcx, qword [rcx + 0x10]
mov edx, 0x1c
mov r8, r14
call fcn.14002ef94
mov r9, rsi
lea r8, str.SoftwareMicrosoftWindows_NTCurrentVersionPrintPrinters_s
mov edx, 0x104
lea rcx, [rsp + 0x50]
lea r14, str.Default_DevMode
call fcn.14001243c
mov ebx, eax
test eax, eax
jne 0x14000cc31
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x14002d198
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
lea rdx, [rsp + 0x50]
mov rcx, 0xffffffff80000002
jmp 0x14000cc11
mov rcx, qword [rcx + 0x10]
lea r8, str._avD
mov edx, 0x1f
mov r9d, ebx
call fcn.14002efb8
nop
jmp 0x14000cc4e
mov rcx, qword [rcx + 0x10]
lea r8, str._avD
mov edx, 0x20
mov dword [rsp + 0x20], ebx
mov r9, rdi
call fcn.14004cc94
nop
jmp 0x14000cc88
mov r9, rsi
mov dword [rsp + 0x20], r15d
lea r8, [rsp + 0x38]
mov rcx, rdi
lea rdx, [rsp + 0x40]
call fcn.140072d0c
mov rsi, qword [rsp + 0x40]
mov ebx, eax
test eax, eax
jne 0x14002d274
cmp dword [rsp + 0x38], r12d
jne 0x14002d274
movzx ecx, word [rsi + 0x46]
lea r9d, [rbx + 3]
movzx eax, word [rsi + 0x44]
xor r8d, r8d
add ecx, eax
mov rdx, r14
mov dword [rsp + 0x28], ecx
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov ebx, eax
mov rcx, qword [0x1400ad2f8]
lea rax, [0x1400ad2f8]
cmp rcx, rax
je 0x14002d274
test byte [rcx + 0x1c], 4
je 0x14002d274
mov rcx, qword [rcx + 0x10]
lea r8, str._avD
mov edx, 0x21
mov dword [rsp + 0x20], ebx
mov r9, rdi
call fcn.14004cc94
test rsi, rsi
je 0x14000cc90
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_free]
nop
jmp 0x14000cc90
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_free]
nop
jmp 0x14000cc99
mov ebx, 0x709
jmp 0x14000cc9e