Function at 0x1400021d0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push r13
lea rbp, [rsp - 0x3b0]
sub rsp, 0x4b0
mov rax, qword [0x140008008]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rbx, r8
mov r13, rdx
mov qword [rsp + 0x58], rbx
test r8, r8
jne 0x14000220f
mov eax, 0xa0
jmp 0x1400028e7
mov qword [rsp + 0x4d0], rsi
lea rcx, [0x1400049b0]
mov qword [rsp + 0x490], r15
xor r8d, r8d
xor r15d, r15d
xor edx, edx
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
lea r9d, [r15 + 2]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsExW]
mov qword [rsp + 0x50], rax
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14000227a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.tap_list_adapters
mov ebx, eax
lea rdx, str._s:_SetupDiGetClassDevsEx_failed
lea ecx, [rsi + 0x21]
call section..text
mov eax, ebx
jmp 0x1400028d7
xor eax, eax
mov qword [rsp + 0x4a8], rdi
mov qword [rsp + 0x4a0], r12
lea rcx, [rbp - 0x60]
xor edx, edx
mov qword [rsp + 0x498], r14
mov r8d, 0x210
mov qword [rbp - 0x76], rax
mov dword [rbp - 0x6e], eax
mov word [rbp - 0x6a], ax
mov qword [rbp - 0x80], 0x230
mov word [rbp - 0x78], r15w
mov qword [rbp - 0x68], r15
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp - 0x80]
mov rcx, rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInfoListDetailW]
test eax, eax
jne 0x1400022f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.tap_list_adapters
mov ecx, 0x20
lea rdx, str._s:_SetupDiGetDeviceInfoListDetail_failed
mov r15d, eax
call section..text
jmp 0x1400028b3
lea rdx, [rsp + 0x78]
mov qword [rsp + 0x78], r15
lea rcx, [0x1400049b0]
call qword [sym.imp.ole32.dll_StringFromIID]
mov qword [rbx], r15
mov edi, r15d
mov qword [rsp + 0x48], r15
mov r14, 0xffffffffffffffff
mov dword [rsp + 0x40], r15d
nop word [rax + rax]
xor eax, eax
mov qword [rbp + 0x1b8], 0x20
lea r8, [rbp + 0x1b8]
mov qword [rbp + 0x1c2], rax
mov edx, edi
mov word [rbp + 0x1ca], ax
mov rcx, rsi
mov word [rbp + 0x1c0], r15w
mov dword [rbp + 0x1cc], r15d
mov qword [rbp + 0x1d0], r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x1400023ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x1400028a8
mov r9d, edi
lea r8, str.tap_list_adapters
lea rdx, str._s:_SetupDiEnumDeviceInfo__u__failed
mov ecx, 0x140
call section..text
inc edi
mov dword [rsp + 0x40], edi
jmp 0x140002330
lea rax, [rsp + 0x60]
mov dword [rbp + 0x1b0], r15d
mov qword [rsp + 0x30], rax
lea r9, [rbp + 0x1b0]
lea rax, [rbp + 0x1f0]
mov dword [rsp + 0x28], 0x80
mov r8d, 1
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x1b8]
mov dword [rsp + 0x60], r15d
mov rcx, rsi
mov r12, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x140002428
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r12, rax
test rax, rax
je 0x140002902
mov r8d, dword [rsp + 0x60]
lea rdx, [rbp + 0x1f0]
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
jmp 0x1400024af
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x7a
jne 0x140002489
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r12, rax
test rax, rax
je 0x14000292b
lea rax, [rsp + 0x60]
mov rcx, rsi
mov qword [rsp + 0x30], rax
lea r9, [rbp + 0x1b0]
mov eax, dword [rsp + 0x60]
lea r8d, [rbx - 0x79]
mov dword [rsp + 0x28], eax
lea rdx, [rbp + 0x1b8]
mov qword [rsp + 0x20], r12
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
jne 0x1400024af
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r9d, 1
lea r8, str.get_device_reg_property
lea rdx, str._s:_SetupDiGetDeviceRegistryProperty__u__failed
mov ecx, 0x120
call section..text
test ebx, ebx
jne 0x14000289d
mov eax, dword [rbp + 0x1b0]
cmp eax, 1
jne 0x14000251e
test r13, r13
je 0x14000259f
mov rbx, r13
cmp word [r13], r15w
je 0x140002894
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x14000259f
mov rax, r14
nop dword [rax + rax]
cmp word [rbx + rax*2 + 2], r15w
lea rax, [rax + 1]
jne 0x1400024f0
lea rbx, [rbx + rax*2]
add rbx, 2
cmp word [rbx], r15w
jne 0x1400024d1
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc edi
mov dword [rsp + 0x40], edi
jmp 0x140002330
cmp eax, 7
jne 0x140002894
test r13, r13
je 0x14000259f
mov rdi, r12
cmp word [r12], r15w
je 0x140002890
nop word [rax + rax]
mov rbx, r13
cmp word [r13], r15w
je 0x14000257d
nop word [rax + rax]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x14000259f
mov rax, r14
cmp word [rbx + rax*2 + 2], r15w
lea rax, [rax + 1]
jne 0x140002563
lea rbx, [rbx + rax*2]
add rbx, 2
cmp word [rbx], r15w
jne 0x140002550
mov rax, r14
cmp word [rdi + rax*2 + 2], r15w
lea rax, [rax + 1]
jne 0x140002580
lea rdi, [rdi + rax*2]
add rdi, 2
cmp word [rdi], r15w
jne 0x140002540
jmp 0x140002890
mov ebx, 1
mov dword [rsp + 0x28], 0x20019
mov r8d, ebx
mov dword [rsp + 0x20], 2
xor r9d, r9d
lea rdx, [rbp + 0x1b8]
mov rcx, rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400025f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.get_net_adapter_guid
mov ecx, 0x120
lea rdx, str._s:_SetupDiOpenDevRegKey_failed
mov edi, eax
call section..text
jmp 0x1400026ab
mov qword [rsp + 0x60], r15
nop dword [rax]
mov qword [rsp + 0x28], r15
lea rdx, str.NetCfgInstanceId
xor r9d, r9d
mov qword [rsp + 0x20], r15
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
je 0x140002660
cmp eax, 2
jne 0x14000263e
dec ebx
test ebx, ebx
jle 0x14000263e
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140002600
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r8, str.get_net_adapter_guid
mov ecx, 0x120
lea rdx, str._s:_querying__NetCfgInstanceId__registry_value_failed
call section..text
jmp 0x1400026a2
lea r8, [rsp + 0x60]
mov rcx, rsi
lea rdx, str.NetCfgInstanceId
call fcn.140001380
mov edi, eax
test eax, eax
jne 0x1400026a2
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp + 0x1d8]
call qword [sym.imp.ole32.dll_CLSIDFromString]
mov rcx, qword [rsp + 0x60]
mov edi, 0xd
test eax, eax
cmovns edi, r15d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x14000288b
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x68], r15
lea rcx, [rbp + 0x1d8]
call qword [sym.imp.ole32.dll_StringFromIID]
mov rax, qword [rsp + 0x68]
lea r8, str.SYSTEMCurrentControlSetControlNetwork_ls_lsConnection
mov r9, qword [rsp + 0x78]
lea rcx, [rbp + 0x270]
mov edx, 0x82
mov qword [rsp + 0x20], rax
call fcn.140001170
lea rax, [rsp + 0x70]
mov qword [rsp + 0x70], r15
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp + 0x270]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14000274d
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r9, [rbp + 0x270]
mov ecx, 0x140
lea r8, str.tap_list_adapters
lea rdx, str._s:_RegOpenKeyEx_HKLM____ls___failed
call section..text
jmp 0x140002880
mov rcx, qword [rsp + 0x70]
lea r8, [rsp + 0x60]
lea rdx, str.Name
mov qword [rsp + 0x60], r15
call fcn.140001380
test eax, eax
je 0x140002796
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9, qword [rsp + 0x68]
lea r8, str.tap_list_adapters
lea rdx, str._s:_Cannot_determine__ls_adapter_name
mov ecx, 0x140
call section..text
jmp 0x140002875
mov rcx, r12
cmp word [r12], r15w
je 0x1400027bd
mov rax, r14
cmp word [rcx + rax*2 + 2], r15w
lea rax, [rax + 1]
jne 0x1400027a3
lea rcx, [rcx + rax*2]
add rcx, 2
cmp word [rcx], r15w
jne 0x1400027a0
mov rdi, qword [rsp + 0x60]
sub rcx, r12
sar rcx, 1
mov rdx, 0xffffffffffffffff
mov rax, rdx
lea r14, [rcx*2 + 2]
nop word [rax + rax]
cmp word [rdi + rax*2 + 2], r15w
lea rax, [rax + 1]
jne 0x1400027e0
lea rsi, [rax*2 + 2]
lea rcx, [r14 + 0x28]
add rcx, rsi
cmovb rcx, rdx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x140002954
movups xmm0, xmmword [rbp + 0x1d8]
lea rcx, [rax + 0x28]
mov r8, r14
mov rdx, r12
mov qword [rax + 0x10], rcx
movups xmmword [rax], xmm0
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rbx + 0x10]
mov r8, rsi
add rcx, r14
mov rdx, rdi
mov qword [rbx + 0x18], rcx
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsp + 0x48]
mov qword [rbx + 0x20], r15
mov qword [rsp + 0x48], rbx
test rax, rax
je 0x14000285d
mov qword [rax + 0x20], rbx
jmp 0x140002865
mov rax, qword [rsp + 0x58]
mov qword [rax], rbx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r14, 0xffffffffffffffff
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rsi, qword [rsp + 0x50]
mov edi, dword [rsp + 0x40]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc edi
mov dword [rsp + 0x40], edi
jmp 0x140002330
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, rsi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov r14, qword [rsp + 0x498]
mov eax, r15d
mov r12, qword [rsp + 0x4a0]
mov rdi, qword [rsp + 0x4a8]
mov rsi, qword [rsp + 0x4d0]
mov r15, qword [rsp + 0x490]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140003170
add rsp, 0x4b0
pop r13
pop rbx
pop rbp
ret
mov r9d, dword [rsp + 0x60]
lea r8, str.get_device_reg_property
lea rdx, str._s:_malloc__u__failed
mov ecx, 0x10
call section..text
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
mov r9d, dword [rsp + 0x60]
lea r8, str.get_device_reg_property
lea rdx, str._s:_malloc__u__failed
mov ecx, 0x10
call section..text
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
lea r9, [r14 + 0x28]
mov ecx, 0x10
add r9, rsi
lea r8, str.tap_list_adapters
lea rdx, str._s:_malloc__u__failed
call section..text
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3