Function at 0x140008950
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
push rbp
push rdi
push r13
push r15
sub rsp, 0x488
mov rax, qword [0x1400c77d8]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rdi, r9
mov rbp, r8
mov r15, rdx
mov r13, rcx
test rdx, rdx
je 0x140008c8b
mov qword [r11 + 0x18], rbx
lea r9, str.winspool
mov qword [r11 - 0x28], rsi
lea r8, [0x1400aa030]
mov qword [r11 - 0x30], r12
lea rcx, [rsp + 0x50]
mov qword [r11 - 0x38], r14
mov r14d, 0x208
mov edx, r14d
call fcn.140008ca0
mov rbx, 0xffffffffffffffff
lea rax, [rsp + 0x50]
mov rcx, rbx
nop word [rax + rax]
inc rcx
cmp word [rax + rcx*2], 0
jne 0x1400089d0
mov eax, ecx
lea rsi, [rsp + 0x50]
mov edx, r14d
xor r12d, r12d
sub edx, ecx
lea rsi, [rsi + rax*2]
mov rcx, rsi
test rbp, rbp
jne 0x1400146f9
mov eax, dword [rdi]
lea r9, [0x1400aa0d8]
lea r8, str._s_.2d:
mov dword [rsp + 0x20], eax
call fcn.140008ca0
inc dword [rdi]
cmp dword [rdi], 0x63
ja 0x140014666
call sym.spoolsv.exe_PrvRevertToPrinterSelf
mov rdi, rax
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x38]
mov r9d, 2
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionPorts
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x140008a90
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], 2
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov word [rsp + 0x30], r12w
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140008aa6
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
test rdi, rdi
je 0x140008b3b
mov qword [rsp + 0x40], rdi
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov r9d, 4
lea r8, [rsp + 0x30]
mov esi, eax
mov rcx, rdi
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea edx, [r9 + 4]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetTokenInformation]
nop dword [rax + rax]
mov ecx, esi
test eax, eax
jne 0x14001466e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov r9d, 8
lea r8, [rsp + 0x40]
mov rcx, 0xfffffffffffffffe
lea edx, [r9 - 3]
call qword [sym.imp.ntdll.dll_NtSetInformationThread]
nop dword [rax + rax]
test eax, eax
js 0x14001468b
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov rsi, qword [rsp + 0x480]
lea rcx, [rsp + 0x50]
mov rax, rbx
nop dword [rax + rax]
cmp word [rcx + rax*2 + 2], r12w
lea rax, [rax + 1]
jne 0x140008b50
mov rcx, qword [r13 + 0x10]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov r9d, 1
lea rax, [rsp + 0x50]
xor r8d, r8d
mov rdx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, r14
lea rax, [rsp + 0x50]
cmp word [rax], r12w
je 0x140008ba7
add rax, 2
sub rcx, 1
jne 0x140008b95
jmp 0x140008c03
sub r14, rcx
lea rax, [rsp + 0x50]
lea rax, [rax + r14*2]
test rcx, rcx
je 0x140014727
lea r9, str._15_45
mov edx, 0x7ffffffe
sub r9, rax
nop dword [rax + rax]
test rdx, rdx
je 0x140008bff
movzx r8d, word [r9 + rax]
test r8w, r8w
je 0x140008bf6
mov word [rax], r8w
dec rdx
add rax, 2
sub rcx, 1
jne 0x140008bd0
jmp 0x140014727
test rcx, rcx
je 0x140014727
mov word [rax], r12w
mov r14, qword [rsp + 0x470]
lea rcx, [rsp + 0x50]
mov r12, qword [rsp + 0x478]
nop dword [rax + rax]
cmp word [rcx + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x140008c20
lea r8d, [rbx*2 + 2]
mov r9d, 1
mov dword [rsp + 0x28], r8d
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, qword [r13 + 0x18]
mov rdx, r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x4c0]
mov eax, 1
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.14000d4b0
add rsp, 0x488
pop r15
pop r13
pop rdi
pop rbp
ret
xor eax, eax
jmp 0x140008c6c
mov dword [rdi], r12d
jmp 0x140008a1d
cmp dword [rsp + 0x30], 2
je 0x140008af4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
nop
jmp 0x140008b2a
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov rax, qword [0x1400c72a8]
lea rcx, [0x1400c72a8]
cmp rax, rcx
je 0x140008b3b
test byte [rax + 0x44], 0x20
je 0x140008b3b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea r8, [0x1400aa900]
mov edx, 0x14
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.140016318
nop
jmp 0x140008b3b
mov r8, rbp
call fcn.140023184
mov edx, 0x2c
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
test rax, rax
je 0x140008b3b
mov word [rax], r12w
jmp 0x140008b3b
sub rax, 2
jmp 0x140008bff