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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x8c0
mov rax, qword [0x100083218]
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 0x1000431b6
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 0x10004336a
mov rbx, qword [rsp + 0x38]
mov rbp, rbx
jmp 0x1000431bb
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x60]
lea rdx, [0x100078b20]
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 0x10004336a
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x58]
lea rdx, [0x100078b90]
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 0x10004336a
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 0x10004336a
cmp dword [rsp + 0x910], eax
jne 0x1000432ad
mov rcx, r12
call fcn.100005f84
mov rsi, rax
test rax, rax
jne 0x100043277
mov rcx, qword [rsp + 0x60]
mov rdx, rdi
call fcn.100043724
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.100006a44
lea rcx, [rsp + 0x50]
mov edx, 1
call fcn.1000090c8
jmp 0x10004336a
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.100042fcc
test eax, eax
jne 0x10004331b
mov rcx, qword [rsp + 0x58]
lea rdx, [0x100078a60]
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, [0x10007a800]
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 0x10004335a
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 0x10004337a
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x10004338a
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x10004339a
call qword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
test rbp, rbp
je 0x1000433a8
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.1000010c0
add rsp, 0x8c0
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret