Function at 0x1000406b4
Capabilities:
Delete registry value
Set registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x8c0
mov rax, qword [0x100080258]
xor rax, rsp
mov qword [rsp + 0x8b0], rax
mov rbx, rcx
mov rdi, r8
mov rsi, rdx
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x858
mov r12, r9
xor ebp, ebp
call sub.msvcrt.dll_memset
and qword [rsp + 0x60], rbp
and qword [rsp + 0x68], rbp
and dword [rsp + 0x74], ebp
mov dword [rsp + 0x7c], 1
test rsi, rsi
je 0x100040746
lea rax, [rsp + 0x38]
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, rsi
mov rcx, 0xffffffff80000003
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x1000408fa
mov rbx, qword [rsp + 0x38]
mov rbp, rbx
jmp 0x10004074b
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x60]
lea rdx, [0x100075950]
mov r9d, 0x2001f
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x1000408fa
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x58]
lea rdx, [0x1000759c0]
mov r9d, 0x2001f
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x1000408fa
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x68]
mov esi, 0x20006
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
mov r9d, esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x1000408fa
cmp dword [rsp + 0x910], eax
jne 0x10004083d
mov rcx, r12
call fcn.100006004
mov rsi, rax
test rax, rax
jne 0x100040807
mov rcx, qword [rsp + 0x60]
mov rdx, rdi
call fcn.100040cac
mov dword [rsp + 0x30], eax
and dword [rsp + 0x7c], 0
lea rax, [rsp + 0x30]
lea rcx, [rsp + 0x50]
mov r9, rsi
xor r8d, r8d
mov rdx, rdi
mov qword [rsp + 0x20], rax
call fcn.100006d0c
lea rcx, [rsp + 0x50]
mov edx, 1
call fcn.1000091fc
jmp 0x1000408fa
mov rcx, qword [rsp + 0x60]
mov rdx, rdi
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x68]
mov rdx, rdi
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegDeleteValueW]
lea rcx, [rsp + 0x50]
mov rdx, rdi
call fcn.100040564
test eax, eax
jne 0x1000408ab
mov rcx, qword [rsp + 0x58]
lea rdx, [0x100075890]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x58]
and dword [rsp + 0x30], 0
lea rax, [rsp + 0x30]
mov r9d, 4
lea rdx, [0x100077620]
mov dword [rsp + 0x28], r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
lea rdx, str.PrintersDevModes2
mov r9d, esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1000408ea
mov rcx, qword [rsp + 0x40]
mov rdx, rdi
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x38]
xor r8d, r8d
mov rdx, rdi
call sym.spoolsv.exe_PrvbSetDevModePerUser
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x10004090a
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x10004091a
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x10004092a
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
test rbp, rbp
je 0x100040938
mov rcx, rbp
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rsp + 0x8b0]
xor rcx, rsp
call fcn.1000010b0
add rsp, 0x8c0
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret