Function at 0x140058cb0
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
sub rsp, 0x690
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov qword [r11 + 0x20], rbp
mov rax, qword [0x14012ce40]
xor rax, rsp
mov qword [rsp + 0x680], rax
mov rbp, r8
mov r12, rdx
mov word [rsp + 0x480], 0
xor edx, edx
mov r8d, 0x1fe
lea rcx, [r11 - 0x226]
call fcn.1400b57e0
xor ebx, ebx
mov word [rsp + 0x80], bx
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rsp + 0x82]
call fcn.1400b57e0
mov dword [rsp + 0x38], 0x100
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x140058d60
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140058d56
mov rcx, rax
call fcn.140050830
jmp 0x140058d59
mov rax, rbx
mov qword [0x1401370f0], rax
lea rdx, str.USBdevInstID_to_USBPRINTdevInstID__
mov rcx, rax
call fcn.140050c00
mov r9, r12
lea r8, str.SYSTEMCurrentControlSetEnum_s
mov edx, 0x100
lea rcx, [rsp + 0x80]
call fcn.1400b1010
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x140058dbf
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140058db5
mov rcx, rax
call fcn.140050830
jmp 0x140058db8
mov rax, rbx
mov qword [0x1401370f0], rax
lea r9, str.ParentIdPrefix
lea r8, [rsp + 0x80]
lea rdx, str.GetStringFromHKLM__s__s
mov rcx, rax
call fcn.140050c00
mov qword [rsp + 0x30], rbx
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x140058e16
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x48], rax
test rax, rax
je 0x140058e0c
mov rcx, rax
call fcn.140050830
jmp 0x140058e0f
mov rax, rbx
mov qword [0x1401370f0], rax
lea r9, str.ParentIdPrefix
lea r8, [rsp + 0x80]
lea rdx, str.GetValueFromHKLM__s__s
mov rcx, rax
call fcn.140050c00
lea r11, [rsp + 0x30]
mov qword [rsp + 0x20], r11
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x80]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140058ea3
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x480]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
xor r8d, r8d
lea rdx, str.ParentIdPrefix
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140058ee8
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x140058ed7
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140058ecd
mov rcx, rax
call fcn.140050830
jmp 0x140058ed0
mov rax, rbx
mov qword [0x1401370f0], rax
lea r8, str.GetValueFromHKLM__RegOpenKeyEx_failed
mov edx, edi
mov rcx, rax
call fcn.140050e40
test edi, edi
je 0x140058ef3
xor eax, eax
jmp 0x140059062
mov dword [rsp + 0x58], 0x20
mov word [rsp + 0x280], 0
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rsp + 0x282]
call fcn.1400b57e0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400ec238]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov rsi, rax
mov edi, ebx
lea r8, [rsp + 0x58]
xor edx, edx
mov rcx, rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140059057
nop
mov qword [rsp + 0x20], rbx
mov r9d, 0x100
lea r8, [rsp + 0x280]
lea rdx, [rsp + 0x58]
mov rcx, rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
je 0x140058f8e
lea rdx, [rsp + 0x480]
lea rcx, [rsp + 0x280]
call fcn.14004e060
test eax, eax
jne 0x140058fab
add edi, 1
lea r8, [rsp + 0x58]
mov edx, edi
mov rcx, rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140059057
jmp 0x140058f50
mov word [rbp], 0
lea r8, [rsp + 0x280]
mov edx, 0x100
mov rcx, rbp
call fcn.1400b1b70
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x140058ffa
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140058ff0
mov rcx, rax
call fcn.140050830
jmp 0x140058ff3
mov rax, rbx
mov qword [0x1401370f0], rax
mov r8, r12
lea rdx, str.____USBdevInstID:___s
mov rcx, rax
call fcn.140050c00
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x140059040
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140059036
mov rcx, rax
call fcn.140050830
jmp 0x140059039
mov rax, rbx
mov qword [0x1401370f0], rax
mov r8, rbp
lea rdx, str.____USBPRINTdevInstID:___s
mov rcx, rax
call fcn.140050c00
mov ebx, 1
mov rcx, rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, ebx
mov rcx, qword [rsp + 0x680]
xor rcx, rsp
call fcn.1400b09d0
lea r11, [rsp + 0x690]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret