Function at 0x140057b40
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov rax, qword [0x1400d9180]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rdi, qword [rbp + 0xe0]
mov rsi, qword [rbp + 0xe8]
mov r15, qword [rbp + 0xf0]
mov r14, qword [rbp + 0xf8]
mov r13, qword [rbp + 0x100]
xor ebx, ebx
and qword [rsp + 0x30], rbx
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x50], rcx
mov r8, rdx
lea ecx, [rbx + 4]
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_HidAddr_012I64x_n
mov r12, r9
call fcn.140046d10
test r12, r12
je 0x140057bbf
test rdi, rdi
je 0x140057bd7
test rsi, rsi
je 0x140057bc9
test r15, r15
je 0x140057bd7
test r14, r14
je 0x140057c9f
test r13, r13
jne 0x140057bf2
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_Invalid_parameter_n
mov ecx, 1
call fcn.140046d10
mov ebx, 0x57
jmp 0x140057fc5
mov rax, qword [rsp + 0x38]
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64x
lea rcx, [rsp + 0x60]
mov edx, 0x100
mov qword [rsp + 0x20], rax
call fcn.14005d88c
lea r11, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test eax, eax
je 0x140057c5d
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegOpenKeyEx_failed._err_d_n
mov r8d, eax
mov ecx, 1
call fcn.140046d10
jmp 0x140057fc5
mov rcx, qword [rsp + 0x30]
lea rdx, str.Name
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test eax, eax
je 0x140057c8e
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegQueryValueEx_Name__failed._err_d_n
jmp 0x140057c4b
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rsp + 0x30], 0
test rsi, rsi
jne 0x140057cad
test r12, r12
je 0x140057ecf
mov r14, qword [rsp + 0x38]
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64xCachedServices
lea rcx, [rsp + 0x60]
mov edx, 0x100
mov qword [rsp + 0x20], r14
call fcn.14005d88c
lea r11, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test eax, eax
je 0x140057d0b
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegOpenKeyEx_CachedServices__failed._err_d_n
jmp 0x140057c4b
test r12, r12
jne 0x140057d15
xor r13d, r13d
jmp 0x140057d18
mov r13d, dword [rdi]
mov rcx, qword [rsp + 0x30]
mov r9, rsi
mov r8, rdi
mov rdx, r12
mov qword [rsp + 0x20], r15
call fcn.140057890
mov ebx, eax
test eax, eax
je 0x140057d42
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_GetHidSdpRecords_failed._err_d_n
jmp 0x140057c4b
test rsi, rsi
je 0x140057d68
cmp dword [r15], 0
jne 0x140057d68
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_no_HID_SDP_record_n
mov ecx, 1
call fcn.140046d10
mov ebx, ntohl
jmp 0x140057fc5
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rsp + 0x30], 0
test r12, r12
je 0x140057ed4
cmp dword [rdi], 0
jne 0x140057ed4
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64x
lea rcx, [rsp + 0x60]
mov edx, 0x100
mov dword [rdi], r13d
mov qword [rsp + 0x20], r14
call fcn.14005d88c
lea r11, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test eax, eax
je 0x140057de7
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegOpenKeyEx_Devices__failed._err_d_n
jmp 0x140057c4b
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x40]
lea rdx, [0x1400bba18]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x38]
mov r13d, 4
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x40], r13d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, 0xffff
test eax, eax
je 0x140057e3d
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegQueryValueEx_PID__failed._err_d._Use_dummy_PID_n
mov r8d, eax
mov ecx, r13d
call fcn.140046d10
mov dword [rsp + 0x38], esi
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x40]
lea rdx, [0x1400bba1c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x44]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test eax, eax
je 0x140057e8a
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegQueryValueEx_VID__failed._err_d._Use_dummy_VID_n
mov r8d, eax
mov ecx, r13d
call fcn.140046d10
mov dword [rsp + 0x44], esi
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx edx, word [rsp + 0x44]
movzx ecx, word [rsp + 0x38]
and qword [rsp + 0x30], 0
mov r9, rdi
mov r8, r12
call fcn.14005a1a4
test al, al
jne 0x140057ed4
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_CreatePnpSdpRecord_failed_n
mov ecx, 1
call fcn.140046d10
mov ebx, 0x80004005
jmp 0x140057fc5
mov r14, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x140057fc5
mov esi, sendto
xor edx, edx
mov rcx, rdi
mov r8d, esi
call fcn.14005bab0
mov r11, qword [rsp + 0x50]
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sKeys_012I64x
lea rcx, [rsp + 0x60]
mov edx, 0x100
mov qword [rsp + 0x20], r11
call fcn.14005d88c
lea r11, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test eax, eax
je 0x140057f5b
cmp eax, 2
jne 0x140057f4f
xor ebx, ebx
jmp 0x140057fc5
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegOpenKeyEx_Keys__failed._err_d_n
jmp 0x140057c4b
lea r8, str._012I64x
lea rcx, [rsp + 0x60]
mov r9, r14
mov edx, 0x100
call fcn.14005d88c
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rdx, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x38], esi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test eax, eax
je 0x140057fb4
cmp eax, 2
je 0x140057f4b
lea rdx, str.BtwProvisionedHidDevsGetHidInfo:_RegQueryValueEx_Keys__failed._err_d_n
jmp 0x140057c4b
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rsp + 0x30], 0
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140057fd5
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx eax, bx
or eax, 0x80070000
test ebx, ebx
cmovle eax, ebx
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.14005ba20
add rsp, 0x178
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret