Function at 0x140058850
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x970]
sub rsp, 0xa70
mov rax, qword [0x1400cc010]
xor rax, rsp
mov qword [rbp + 0x960], rax
xor esi, esi
lea rcx, [rsp + 0x30]
xor edx, edx
mov dword [rsp + 0x30], esi
mov r8d, 0x100
mov edi, esi
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_ID_List_SizeA]
test eax, eax
je 0x1400588ad
mov edx, eax
lea rcx, [0x1400b7ef0]
call fcn.140040a00
mov ebx, dword [rsp + 0x30]
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x1400588df
lea rcx, str.unexpected_error__CM_Get_Device_ID_List_Size_return_Value_of
call fcn.140040a00
mov r8d, dword [rsp + 0x30]
mov r9d, 0x100
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_ID_ListW]
test eax, eax
je 0x140058907
mov edx, eax
lea rcx, str.unexpected_error__Get_Device_ID_List_return_Value_0x_08x
call fcn.140040a00
cmp si, word [rbx]
je 0x1400589cc
test edi, edi
jne 0x1400589cc
xor r8d, r8d
lea rcx, [rsp + 0x40]
mov rdx, rbx
call qword [sym.imp.SETUPAPI.dll_CM_Locate_DevNodeW]
test eax, eax
je 0x14005893b
mov edx, eax
lea rcx, str.unexpected_error__Locate_DevNode_return_Value_0x_08x
call fcn.140040a00
mov ecx, dword [rsp + 0x40]
lea rax, [rsp + 0x44]
mov dword [rsp + 0x28], esi
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea rdx, [0x1400b7220]
mov dword [rsp + 0x44], 0x200
call qword [sym.imp.api_ms_win_devices_config_l1_1_1.dll_CM_Get_DevNode_PropertyW]
test eax, eax
jne 0x1400589a9
lea rdx, str.SWCVID_8086PID_PIESID_0001
lea rcx, [rsp + 0x60]
call fcn.140062294
test rax, rax
je 0x140058997
lea rcx, str.PIE_was_found
call fcn.140040a00
mov edi, 1
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x200
call fcn.140062890
mov rax, 0xffffffffffffffff
cmp word [rbx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x1400589b0
lea rbx, [rbx + rax*2]
add rbx, 2
cmp si, word [rbx]
jne 0x140058910
mov ecx, dword [rsp + 0x40]
lea rax, [rsp + 0x38]
mov dword [rsp + 0x28], 1
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x20019
call qword [sym.imp.SETUPAPI.dll_CM_Open_DevNode_Key]
mov ebx, eax
test eax, eax
je 0x140058a0a
mov edx, eax
lea rcx, str.unexpected_error__Open_DevNode_Key_return_Value_0x_08x
call fcn.140040a00
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x4c]
lea rax, [rbp + 0x160]
mov dword [rsp + 0x4c], esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.PiePathHint
mov dword [rsp + 0x48], 0x800
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x140058a58
mov edx, ebx
lea rcx, str.unexpected_error_RegQueryValueExW_return_Value_0x_08x
call fcn.140040a00
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea r8, [rbp + 0x160]
lea rdx, str._sMurocApi.dll
lea rcx, [rbp + 0x160]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rdx, [rbp + 0x160]
lea rcx, str.MurocApi_full_path:__ws
call fcn.140040a00
lea rcx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [rbp + 0x960]
xor rcx, rsp
call fcn.14005da30
lea r11, [rsp + 0xa70]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret