Function at 0x140004850
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xe0
mov rax, qword [0x14000f018]
xor rax, rsp
mov qword [rsp + 0xd0], rax
mov dword [rsp + 0x34], r9d
mov eax, r8d
mov dword [rsp + 0x3c], eax
mov qword [rsp + 0x50], rdx
mov r12, rcx
test rdx, rdx
je 0x140004c30
test eax, eax
je 0x140004c30
mov dword [rsp + 0x30], 0
lea rax, vtable.MFX::MFXVector_wchar_t_.0
mov qword [rsp + 0x60], rax
xor esi, esi
mov qword [rsp + 0x68], rsi
xor ebx, ebx
mov dword [rsp + 0x70], ebx
mov rax, qword [rcx]
test rax, rax
jne 0x1400048dc
lea rcx, str.cfgmgr32.dll
call fcn.140005f60
mov qword [r12], rax
test rax, rax
je 0x140004c29
cmp qword [r12 + 0x10], 0
je 0x140004900
cmp qword [r12 + 8], 0
je 0x140004900
cmp qword [r12 + 0x18], 0
je 0x140004900
cmp qword [r12 + 0x20], 0
jne 0x140004980
lea rdx, str.CM_Get_Device_ID_ListW
mov rcx, rax
call fcn.140005f50
mov qword [r12 + 0x10], rax
lea rdx, str.CM_Get_Device_ID_List_SizeW
mov rcx, qword [r12]
call fcn.140005f50
mov qword [r12 + 8], rax
lea rdx, str.CM_Locate_DevNodeW
mov rcx, qword [r12]
call fcn.140005f50
mov qword [r12 + 0x18], rax
lea rdx, str.CM_Open_DevNode_Key
mov rcx, qword [r12]
call fcn.140005f50
mov qword [r12 + 0x20], rax
cmp qword [r12 + 0x10], 0
je 0x140004c29
cmp qword [r12 + 8], 0
je 0x140004c29
cmp qword [r12 + 0x18], 0
je 0x140004c29
test rax, rax
je 0x140004c29
mov r8d, 0x50
lea rdx, [rsp + 0x80]
lea rcx, [0x14000bb08]
call qword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
je 0x140004c29
mov r15, 0xffffffffffffffff
nop word [rax + rax]
mov rax, qword [r12 + 8]
mov r8d, 0x300
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call rax
test eax, eax
jne 0x140004c24
mov r13d, dword [rsp + 0x30]
mov eax, 2
mul r13
mov rdi, rax
cmovo rdi, r15
mov rcx, rdi
call fcn.14000824c
mov r14, rax
test rax, rax
je 0x140004a05
mov r8, rdi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
jmp 0x140004a08
xor r14d, r14d
test ebx, ebx
je 0x140004a32
mov rax, r14
mov r9, rsi
sub r9, r14
mov r8d, ebx
nop dword [rax + rax]
movzx edx, word [r9 + rax]
mov word [rax], dx
lea rax, [rax + 2]
sub r8, 1
jne 0x140004a20
mov rcx, rsi
call fcn.140007f0c
mov rsi, r14
mov qword [rsp + 0x68], r14
mov ebx, r13d
mov dword [rsp + 0x70], ebx
mov rax, qword [r12 + 0x10]
mov r9d, 0x300
mov r8d, dword [rsp + 0x30]
mov rdx, r14
lea rcx, [rsp + 0x80]
call rax
cmp eax, 0x1a
je 0x1400049b0
test eax, eax
jne 0x140004c24
mov rsi, r14
lea rax, [r14 + r13*2]
mov qword [rsp + 0x58], rax
cmp r14, rax
jae 0x140004c18
mov rdi, r15
nop
inc rdi
cmp word [rsi + rdi*2], 0
jne 0x140004a90
test rdi, rdi
je 0x140004c18
lea rdx, str.VEN_8086
mov rcx, rsi
call sub.VCRUNTIME140.dll_wcsstr
test rax, rax
jne 0x140004acf
lea rdx, str.ven_8086
mov rcx, rsi
call sub.VCRUNTIME140.dll_wcsstr
test rax, rax
je 0x140004ba7
lea rdx, str.DEV_
mov rcx, rsi
call sub.VCRUNTIME140.dll_wcsstr
test rax, rax
jne 0x140004afb
lea rdx, str.dev_
mov rcx, rsi
call sub.VCRUNTIME140.dll_wcsstr
test rax, rax
je 0x140004ba7
lea rcx, [rax + 8]
xor edx, edx
lea r8d, [rdx + 0x10]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
test eax, eax
je 0x140004ba7
cmp eax, dword [rsp + 0x34]
jne 0x140004ba7
mov rax, qword [r12 + 0x18]
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x38]
call rax
test eax, eax
jne 0x140004ba7
mov rax, qword [r12 + 0x20]
mov dword [rsp + 0x28], 1
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x20], rcx
mov r9d, 1
xor r8d, r8d
mov edx, 0x20019
mov ecx, dword [rsp + 0x38]
call rax
test eax, eax
jne 0x140004ba7
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov r13, qword [rsp + 0x50]
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
lea rdx, str.DriverStorePathForMediaSDK
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x140004bb9
lea rsi, [rsi + rdi*2]
add rsi, 2
cmp rsi, qword [rsp + 0x58]
jmp 0x140004a86
mov rax, r15
nop dword [rax]
lea rax, [rax + 1]
cmp word [r13 + rax*2], 0
jne 0x140004bc0
cmp word [r13 + rax*2 - 2], 0x2f
je 0x140004c0c
nop word [rax + rax]
lea r15, [r15 + 1]
cmp word [r13 + r15*2], 0
jne 0x140004be0
cmp word [r13 + r15*2 - 2], 0x5c
je 0x140004c0c
lea r8, [0x14000a790]
mov edx, 0x400
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
nop
mov rcx, r14
call fcn.140007f0c
mov al, 1
jmp 0x140004c32
mov rcx, r14
jmp 0x140004c2b
mov rcx, rsi
jmp 0x140004c2b
xor ecx, ecx
call fcn.140007f0c
xor al, al
mov rcx, qword [rsp + 0xd0]
xor rcx, rsp
call fcn.140008200
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret