Function at 0x14003ca30
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x9c0]
sub rsp, 0xac0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rsp + 0xae0], rbx
mov rax, qword [0x140398250]
xor rax, rsp
mov qword [rbp + 0x9b0], rax
mov rsi, r8
mov rdi, rdx
xor r8d, r8d
lea rdx, str.______tCBaseDlgPrinterSelectDirect::IsPortLinkedWithIPAddress__.
lea rcx, [rsp + 0x58]
call fcn.1400075a0
nop
mov qword [rsp + 0x20], rdi
mov r9, rdi
lea r8, str.lpcPortName___s__lpcPortName___s
mov edx, 1
lea rcx, [rsp + 0x58]
call fcn.140007780
xor ebx, ebx
mov dword [rsp + 0x44], ebx
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x48], rbx
xor edx, edx
mov r8d, 0x618
lea rcx, [rbp + 0x390]
call fcn.14024b970
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x180]
call fcn.14024b970
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.14024b970
test rdi, rdi
je 0x14003ccfc
test rsi, rsi
je 0x14003ccfc
mov qword [rsp + 0x30], rdi
lea rax, str.Standard_TCP_IP_PortPorts_
mov qword [rsp + 0x28], rax
lea rax, str.SystemCurrentControlSetControlPrintMonitors_
mov qword [rsp + 0x20], rax
lea r9, [0x1402e9a78]
or r8, 0xffffffffffffffff
mov edx, 0x30c
lea rcx, [rbp + 0x390]
call fcn.14024679c
lea r8, str.IPAddress
mov edx, 0x104
lea rcx, [rbp + 0x180]
call fcn.140246628
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp + 0x390]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14003cc5f
mov dword [rsp + 0x44], 1
mov dword [rsp + 0x40], 0x208
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [rbp + 0x180]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14003cbd1
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
repne scasw ax, word [rdi]
not rcx
dec rcx
jne 0x14003cc2b
lea r8, str.HostName
mov edx, 0x104
lea rcx, [rbp + 0x180]
call fcn.140246628
mov dword [rsp + 0x44], 1
mov dword [rsp + 0x40], 0x208
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, [rbp + 0x180]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14003cc41
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.140247088
test eax, eax
jne 0x14003cc52
lea ebx, [rax + 1]
jmp 0x14003cc52
lea rdx, str._t_t_tRegQueryValueEx
lea rcx, [rsp + 0x58]
call fcn.140029dc0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14003ccd4
mov qword [rsp + 0x50], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x409
mov r8d, edi
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x14003ccc4
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], edi
lea r9, str._t_t_tRegOpenKeyEx
lea r8, str.ApiName:__s__ErrorCode:__d_:__s
mov edx, 6
lea rcx, [rsp + 0x58]
call fcn.140007780
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14003ccd4
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r9d, ebx
lea r8, str.______tCBaseDlgPrinterSelectDirect::IsPortLinkedWithIPAddress__._res___08x.
mov edx, 2
lea rcx, [rsp + 0x58]
call fcn.140007780
nop
lea rcx, [rsp + 0x58]
call fcn.140007730
mov eax, ebx
jmp 0x14003cd08
lea rcx, [rsp + 0x58]
call fcn.140007730
xor eax, eax
mov rcx, qword [rbp + 0x9b0]
xor rcx, rsp
call fcn.140245660
mov rbx, qword [rsp + 0xae0]
add rsp, 0xac0
pop rdi
pop rsi
pop rbp
ret