Function at 0x140164170
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x800]
sub rsp, 0x900
mov rax, qword [0x1403fad18]
xor rax, rsp
mov qword [rbp + 0x7f0], rax
xor esi, esi
mov rdi, rcx
mov r13, rdx
mov qword [rbp - 0x80], rdx
lea rcx, [rbp + 0x3f2]
mov ebx, esi
xor edx, edx
mov r8d, 0x3fe
mov r12d, esi
mov qword [rsp + 0x40], rbx
mov dword [rsp + 0x4c], esi
mov word [rbp + 0x3f0], si
call sub.MSVCR100.dll_memset
lea r8d, [rsi + 0x32]
lea rdx, [rbp - 0x10]
mov rcx, rdi
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x60], rsi
call qword [sym.imp.ole32.dll_StringFromGUID2]
or r14, 0xffffffffffffffff
test eax, eax
jne 0x140164243
lea rcx, str.Failed_to_create_a_Guid_string
mov r12d, 0x80004005
mov dword [rsp + 0x4c], r12d
call fcn.140160a20
lea rdx, str.Failed_to_create_a_Guid_string
lea rcx, [rbp - 0x50]
call fcn.140162400
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x14016423a
mov rbx, qword [rax]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x14016423a
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rbp - 0x50]
jmp 0x14016440b
lea r8, [rbp - 0x10]
lea rdx, str.SYSTEMCurrentControlSetControlNetwork4D36E972_E325_11CE_BFC1_08002BE10318_s
lea rcx, [rbp + 0x60]
call fcn.140160940
lea rdx, [rsp + 0x68]
mov r9d, 0x20019
mov qword [rsp + 0x20], rdx
lea rdx, [rbp + 0x60]
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1401643b6
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1401643b6
lea rax, [rsp + 0x60]
lea rdx, str.Connection
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140164361
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140164361
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x54]
lea rdx, str.PnPInstanceID
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x3f0]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x58], 0x400
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140164309
cmp dword [rsp + 0x54], 1
je 0x14016444a
lea rdx, [rbp + 0x60]
lea rcx, str.Host_interface_network_is_not_found_in_registry___S___3_
mov r12d, 0x80004005
mov dword [rsp + 0x4c], r12d
call fcn.140160a20
lea r8, [rbp + 0x60]
lea rdx, str.Host_interface_network_is_not_found_in_registry___S___3_
lea rcx, [rbp - 0x60]
call fcn.140162400
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x140164358
mov rbx, qword [rax]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x140164358
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rbp - 0x60]
jmp 0x14016440b
lea rdx, [rbp + 0x60]
lea rcx, str.Host_interface_network_is_not_found_in_registry___S___2_
mov r12d, 0x80004005
mov dword [rsp + 0x4c], r12d
call fcn.140160a20
lea r8, [rbp + 0x60]
lea rdx, str.Host_interface_network_is_not_found_in_registry___S___2_
lea rcx, [rbp - 0x78]
call fcn.140162400
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x1401643b0
mov rbx, qword [rax]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x1401643b0
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rbp - 0x78]
jmp 0x14016440b
lea rdx, [rbp + 0x60]
lea rcx, str.Host_interface_network_is_not_found_in_registry___S___1_
mov r12d, 0x80004005
mov dword [rsp + 0x4c], r12d
call fcn.140160a20
lea r8, [rbp + 0x60]
lea rdx, str.Host_interface_network_is_not_found_in_registry___S___1_
lea rcx, [rsp + 0x70]
call fcn.140162400
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x140164406
mov rbx, qword [rax]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x140164406
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x70]
test rdi, rdi
je 0x14016444a
mov eax, r14d
lock xadd dword [rdi + 0x10], eax
dec eax
jne 0x140164445
test rdi, rdi
je 0x140164445
mov rcx, qword [rdi]
test rcx, rcx
je 0x14016442f
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14016443d
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rbx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14016445a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14016446a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r12d, r12d
js 0x140164992
mov eax, dword [0x140257980]
lea rcx, [rbp - 0x48]
mov r9d, 2
mov dword [rbp - 0x48], eax
mov eax, dword [0x140257984]
xor r8d, r8d
mov dword [rbp - 0x44], eax
mov eax, dword [0x140257988]
xor edx, edx
mov dword [rbp - 0x40], eax
mov eax, dword [0x14025798c]
mov qword [rsp + 0x950], r15
mov r12d, esi
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x50], esi
mov dword [rbp - 0x3c], eax
mov dword [rbp - 0x38], 0x20
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x1401645c0
mov r12d, 0x80004005
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetupDiGetClassDevs_failed__0x_08X_
mov edx, eax
call fcn.140160a20
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.SetupDiGetClassDevs_failed__0x_08X_
lea rcx, [rbp - 0x68]
mov r8d, eax
call fcn.140162400
mov rsi, rax
lea rax, [rsp + 0x40]
cmp rax, rsi
je 0x140164563
test rbx, rbx
je 0x14016454d
mov ecx, r14d
lock xadd dword [rbx + 0x10], ecx
dec ecx
jne 0x14016454d
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rdi]
test rcx, rcx
je 0x140164537
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140164545
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rbx, qword [rsi]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x140164563
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rbp - 0x68]
test rdi, rdi
je 0x14016498a
mov eax, r14d
lock xadd dword [rdi + 0x10], eax
dec eax
jne 0x1401645a5
test rdi, rdi
je 0x1401645a5
mov rcx, qword [rdi]
test rcx, rcx
je 0x14016458f
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14016459d
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rbx, qword [rsp + 0x40]
jmp 0x14016498a
inc r12d
nop word [rax + rax]
lea r8, [rbp - 0x38]
mov edx, r12d
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x1401645fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x140164739
inc r12d
lea r8, [rbp - 0x38]
mov rcx, r15
mov edx, r12d
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x1401645d4
xor r9d, r9d
lea rax, [rsp + 0x50]
lea rdx, [rbp - 0x38]
mov qword [rsp + 0x30], rax
lea r8d, [r9 + 1]
mov rcx, r15
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
jne 0x1401645af
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1401645af
mov edi, dword [rsp + 0x50]
mov ecx, edi
call sub.MSVCR100.dll_malloc
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rdx, [rbp - 0x38]
lea r8d, [r9 + 1]
mov rcx, r15
mov dword [rsp + 0x28], edi
mov r13, rax
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
jne 0x140164677
mov rcx, r13
call sub.MSVCR100.dll_free
jmp 0x1401645af
mov rsi, r13
test r13, r13
je 0x14016472f
cmp word [rsi], 0
je 0x14016471c
mov eax, dword [rsp + 0x50]
shr rax, 1
lea rax, [r13 + rax*2]
cmp rsi, rax
jae 0x14016471c
lea rcx, str.sun_VBoxNetAdp
mov rdx, rsi
call sub.MSVCR100.dll__wcsicmp
test eax, eax
jne 0x1401646f7
mov ecx, dword [rbp - 0x24]
lea rdx, [rbp + 0x260]
xor r9d, r9d
mov r8d, reloc.OLEAUT32.dll_SetErrorInfo
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_IDW]
test eax, eax
jne 0x1401646f7
lea rax, [rbp + 0x260]
lea rdi, [rbp + 0x3f0]
sub rdi, rax
nop
movzx edx, word [rax]
movzx ecx, word [rax + rdi]
sub edx, ecx
jne 0x1401646f3
add rax, 2
test ecx, ecx
jne 0x1401646e0
test edx, edx
je 0x140164714
xor eax, eax
mov rdi, rsi
mov rcx, r14
repne scasw ax, word [rdi]
not rcx
lea rsi, [rsi + rcx*2]
test rsi, rsi
jne 0x140164683
jmp 0x14016471c
mov dword [rsp + 0x48], 1
mov rcx, r13
call sub.MSVCR100.dll_free
cmp dword [rsp + 0x48], 0
jne 0x140164815
inc r12d
xor esi, esi
jmp 0x1401645c0
mov r12d, 0x80004005
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Host_Interface_Network_driver_not_found__0x_08X_
mov edx, eax
call fcn.140160a20
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Host_Interface_Network_driver_not_found__0x_08X_
lea rcx, [rbp - 0x58]
mov r8d, eax
call fcn.140162400
mov rsi, rax
lea rax, [rsp + 0x40]
cmp rax, rsi
je 0x1401647c9
test rbx, rbx
je 0x1401647b3
mov ecx, r14d
lock xadd dword [rbx + 0x10], ecx
dec ecx
jne 0x1401647b3
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rdi]
test rcx, rcx
je 0x14016479d
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1401647ab
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rbx, qword [rsi]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x1401647c9
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rbp - 0x58]
test rdi, rdi
je 0x14016497d
mov eax, r14d
lock xadd dword [rdi + 0x10], eax
dec eax
jne 0x14016480b
test rdi, rdi
je 0x14016480b
mov rcx, qword [rdi]
test rcx, rcx
je 0x1401647f5
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140164803
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rbx, qword [rsp + 0x40]
jmp 0x14016497d
lea rdx, [rbp - 0x38]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiSetSelectedDevice]
test eax, eax
jne 0x1401648c3
mov r12d, 0x80004005
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetupDiSetSelectedDevice_failed__0x_08X_
mov edx, eax
call fcn.140160a20
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.SetupDiSetSelectedDevice_failed__0x_08X_
lea rcx, [rbp - 0x70]
mov r8d, eax
call fcn.140162400
mov rsi, rax
lea rax, [rsp + 0x40]
cmp rax, rsi
je 0x1401648ba
test rbx, rbx
je 0x1401648a4
mov ecx, r14d
lock xadd dword [rbx + 0x10], ecx
dec ecx
jne 0x1401648a4
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rdi]
test rcx, rcx
je 0x14016488e
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14016489c
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rbx, qword [rsi]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x1401648ba
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rbp - 0x70]
jmp 0x1401647cd
lea r8, [rbp - 0x38]
mov rdx, r15
mov ecx, 5
call qword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
test eax, eax
jne 0x140164978
mov r12d, 0x80004005
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetupDiCallClassInstaller__DIF_REMOVE__failed__0x_08X_
mov edx, eax
call fcn.140160a20
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.SetupDiCallClassInstaller__DIF_REMOVE__failed__0x_08X_
lea rcx, [rsp + 0x78]
mov r8d, eax
call fcn.140162400
mov rsi, rax
lea rax, [rsp + 0x40]
cmp rax, rsi
je 0x14016496e
test rbx, rbx
je 0x140164958
mov ecx, r14d
lock xadd dword [rbx + 0x10], ecx
dec ecx
jne 0x140164958
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rdi]
test rcx, rcx
je 0x140164942
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140164950
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rbx, qword [rsi]
mov qword [rsp + 0x40], rbx
test rbx, rbx
je 0x14016496e
lock inc dword [rbx + 0x10]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x78]
jmp 0x1401647cd
mov r12d, dword [rsp + 0x4c]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov r13, qword [rbp - 0x80]
mov r15, qword [rsp + 0x950]
test r13, r13
je 0x140164a07
test rbx, rbx
je 0x140164a40
mov rcx, qword [rbx]
test rcx, rcx
je 0x140164a07
call qword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x140164a07
cmp dword [rbx + 0x10], 1
jne 0x1401649fc
mov rsi, qword [rbx]
mov qword [rbx], 0
lock xadd dword [rbx + 0x10], r14d
dec r14d
jne 0x1401649f6
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rdi]
test rcx, rcx
je 0x1401649e0
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1401649ee
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov qword [r13], rsi
jmp 0x140164a40
mov ecx, 0x80004003
call fcn.140166010
int3
test rbx, rbx
je 0x140164a40
lock xadd dword [rbx + 0x10], r14d
dec r14d
jne 0x140164a40
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rdi]
test rcx, rcx
je 0x140164a2a
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140164a38
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov eax, r12d
mov rcx, qword [rbp + 0x7f0]
xor rcx, rsp
call fcn.14015fe00
add rsp, 0x900
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret