Function at 0x140008470
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
mov r11, rsp
push r12
sub rsp, 0x370
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
mov rax, qword [0x140024050]
xor rax, rsp
mov qword [rsp + 0x360], rax
lea rax, [0x14001e490]
mov qword [r11 - 0x2f8], rax
xor ebp, ebp
mov dword [rsp + 0x90], ebp
mov esi, ebp
lea rcx, [rsp + 0x58]
call fcn.140003f00
mov qword [rsp + 0x60], rax
mov byte [rax + 0x89], 1
mov rax, qword [rsp + 0x60]
mov qword [rax + 8], rax
mov rax, qword [rsp + 0x60]
mov qword [rax], rax
mov rax, qword [rsp + 0x60]
mov qword [rax + 0x10], rax
mov qword [rsp + 0x68], rbp
lea r12, [0x14001e448]
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.140001e90
lea r8, [rsp + 0x80]
xor edx, edx
lea rcx, [0x1400047f0]
call fcn.14000aac0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x140026bf0], rax
mov edx, 0x7d0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400086ec
lea rcx, [rsp + 0x50]
call fcn.140007670
or esi, eax
mov rbx, rbp
mov qword [rsp + 0x70], rbp
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
xor r8d, r8d
lea rdx, str.SOFTWAREWordcraft_International_LtdTTECPrinterPorts
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400086b6
mov rbx, qword [rsp + 0x70]
mov qword [rsp + 0xa0], rbx
mov dword [rsp + 0x48], 0x208
mov dword [rsp + 0x44], 0xa0
lea rax, [rsp + 0x44]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x150]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x1400086a9
mov dword [rsp + 0x40], ebp
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call sub.WINSPOOL.DRV_EnumPortsW
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000869b
lea r8, [rsp + 0xb0]
lea rdx, [rsp + 0x150]
lea rcx, str.AddPort__s___s_r_n
call fcn.140005f00
mov r9d, 1
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x150]
call fcn.140006630
mov edi, eax
mov r9d, 1
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x150]
call fcn.140007320
test edi, edi
js 0x1400086b6
lea rdx, [rsp + 0x150]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x1400086b6
lea rcx, str.Spooler_not_running__r_n
call fcn.140005f00
jmp 0x1400086b6
lea rcx, str.RegEnumValue_failed_r_n
call fcn.140005f00
nop
test rbx, rbx
je 0x1400086c4
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, 0x7d0
mov rcx, qword [0x140026bf0]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140008551
test esi, esi
je 0x1400086ec
lea rcx, [rsp + 0x50]
call fcn.140001fe0
mov dword [rsp + 0x90], 1
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x140026bf0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x58]
call fcn.1400033f0
nop
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.140009b60
lea r11, [rsp + 0x370]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r12
ret