Function at 0x14006a1d4
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 [0x1400a5768]
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 0x14006a539
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rsi + rdx*2], r12w
jne 0x14006a22e
mov rcx, rsi
call fcn.1400696ec
test eax, eax
je 0x14006a539
mov rcx, qword [0x1400a52b8]
lea rbx, [0x1400a52b8]
lea r14, [0x14009b160]
cmp rcx, rbx
je 0x14006a2b0
test byte [rcx + 0x1c], 4
je 0x14006a285
mov rcx, qword [rcx + 0x10]
mov edx, 0x17
mov r8, r14
call fcn.1400248e4
mov rcx, qword [0x1400a52b8]
mov rdi, qword [rsp + 0x30]
cmp rcx, rbx
je 0x14006a2b0
test byte [rcx + 0x1c], 4
je 0x14006a2b0
mov rcx, qword [rcx + 0x10]
mov edx, 0x18
mov r9, rsi
mov r8, r14
call fcn.14003317c
mov rcx, qword [0x1400a52b8]
mov rdi, qword [rsp + 0x30]
mov edx, r15d
test r15d, r15d
je 0x14006a370
sub edx, 1
je 0x14006a325
cmp edx, 1
je 0x14006a2d0
mov ebx, 0x57
jmp 0x14006a53e
cmp rcx, rbx
je 0x14006a2f1
test byte [rcx + 0x1c], 4
je 0x14006a2f1
mov rcx, qword [rcx + 0x10]
mov edx, 0x1b
mov r8, r14
call fcn.1400248e4
mov rdi, qword [rsp + 0x30]
mov r14, rsi
test rdi, rdi
je 0x14006a312
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, str.PrintersDevModes2
mov rcx, 0xffffffff80000001
jmp 0x14006a3e1
cmp rcx, rbx
je 0x14006a346
test byte [rcx + 0x1c], 4
je 0x14006a346
mov rcx, qword [rcx + 0x10]
mov edx, 0x1a
mov r8, r14
call fcn.1400248e4
mov rdi, qword [rsp + 0x30]
mov r14, rsi
test rdi, rdi
je 0x14006a367
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, str.PrintersDevModePerUser
jmp 0x14006a319
cmp rcx, rbx
je 0x14006a38c
test byte [rcx + 0x1c], 4
je 0x14006a38c
mov rcx, qword [rcx + 0x10]
mov edx, 0x19
mov r8, r14
call fcn.1400248e4
mov r9, rsi
lea r8, str.SoftwareMicrosoftWindows_NTCurrentVersionPrintPrinters_s
mov edx, 0x104
lea rcx, [rsp + 0x50]
lea r14, str.Default_DevMode
call fcn.14000b620
mov ebx, eax
test eax, eax
jne 0x14006a3fc
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x14006a3d5
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
lea rax, [rsp + 0x30]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
mov rcx, qword [0x1400a52b8]
lea rax, [0x1400a52b8]
cmp rcx, rax
je 0x14006a42d
test byte [rcx + 0x1c], 4
je 0x14006a42d
mov rcx, qword [rcx + 0x10]
lea r8, [0x14009b160]
mov edx, 0x1c
mov r9d, ebx
call fcn.140024908
test ebx, ebx
jne 0x14006a532
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x38]
mov rdx, r14
call fcn.14006978c
mov ebx, eax
mov rcx, qword [0x1400a52b8]
lea rax, [0x1400a52b8]
mov rdi, qword [rsp + 0x38]
cmp rcx, rax
je 0x14006a483
test byte [rcx + 0x1c], 4
je 0x14006a483
mov rcx, qword [rcx + 0x10]
lea r8, [0x14009b160]
mov edx, 0x1d
mov dword [rsp + 0x20], ebx
mov r9, rdi
call fcn.14003f0e8
test ebx, ebx
jne 0x14006a524
mov r9, rsi
mov dword [rsp + 0x20], r15d
lea r8, [rsp + 0x38]
mov rcx, rdi
lea rdx, [rsp + 0x40]
call fcn.1400698c4
mov rsi, qword [rsp + 0x40]
mov ebx, eax
test eax, eax
jne 0x14006a516
cmp dword [rsp + 0x38], r12d
jne 0x14006a516
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 [0x1400a52b8]
lea rax, [0x1400a52b8]
cmp rcx, rax
je 0x14006a516
test byte [rcx + 0x1c], 4
je 0x14006a516
mov rcx, qword [rcx + 0x10]
lea r8, [0x14009b160]
mov edx, 0x1e
mov dword [rsp + 0x20], ebx
mov r9, rdi
call fcn.14003f0e8
test rsi, rsi
je 0x14006a524
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_free]
test rdi, rdi
je 0x14006a532
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_free]
mov rdi, qword [rsp + 0x30]
jmp 0x14006a53e
mov ebx, 0x709
test rdi, rdi
je 0x14006a54c
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.1400106e0
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