Function at 0x4060aa
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [0x4584c8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x624], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x61c], eax
xor esi, esi
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x628], eax
lea eax, [ebp - 0x618]
push eax
push 0x20019
push esi
push str.SYSTEMCurrentControlSetControlClass4D36E972_E325_11CE_BFC1_08002BE10318
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
je 0x406156
push str.tapwin32_find_device
push str._s:
push 2
call fcn.0041af8f
pop ecx
push eax
call fcn.004023ba
add esp, 0xc
push str.Error_opening_adapter_key
push 2
call fcn.0041af8f
pop ecx
push eax
call fcn.004023ba
pop ecx
pop ecx
push 0x448600
push 2
call fcn.0041af8f
pop ecx
push eax
call fcn.004023ba
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004146ec
mov esp, ebp
pop ebp
ret
push edi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x608]
mov dword [ebp - 0x620], esi
push eax
lea eax, [ebp - 0x104]
mov dword [ebp - 0x608], 0x100
push eax
push esi
push dword [ebp - 0x618]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4063f5
lea eax, [ebp - 0x104]
push eax
push str.SYSTEMCurrentControlSetControlClass4D36E972_E325_11CE_BFC1_08002BE10318
push str._s_s
lea eax, [ebp - 0x304]
push 0x100
push eax
call fcn.00405dc1
add esp, 0x14
test eax, eax
js 0x4063bf
cmp eax, 0x100
je 0x4063bf
lea eax, [ebp - 0x610]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x304]
push eax
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x4063bf
lea eax, [ebp - 0x608]
mov dword [ebp - 0x608], 0x100
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x60c]
push eax
push esi
push str.ComponentId
push dword [ebp - 0x610]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4063b3
cmp dword [ebp - 0x60c], 1
jne 0x4063b3
lea eax, [ebp - 0x608]
mov dword [ebp - 0x608], 0x100
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x60c]
push eax
push esi
push str.NetCfgInstanceId
push dword [ebp - 0x610]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40639d
cmp dword [ebp - 0x60c], 1
jne 0x40639d
push dword [ebp - 0x610]
call edi
push dword [ebp - 0x624]
lea eax, [ebp - 0x404]
push eax
call fcn.0041d0d0
pop ecx
pop ecx
test eax, eax
jne 0x4063bf
cmp dword [ebp - 0x61c], esi
je 0x406369
lea eax, [ebp - 0x204]
push eax
push str.SYSTEMCurrentControlSetControlNetwork4D36E972_E325_11CE_BFC1_08002BE10318
push str._s_sConnection
lea eax, [ebp - 0x504]
push 0x100
push eax
call fcn.00405dc1
add esp, 0x14
test eax, eax
js 0x4063bf
cmp eax, 0x100
je 0x4063bf
lea eax, [ebp - 0x614]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x504]
push eax
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x4063bf
lea eax, [ebp - 0x608]
mov dword [ebp - 0x608], 0x100
push eax
lea eax, [ebp - 0x604]
push eax
lea eax, [ebp - 0x60c]
push eax
push esi
push str.Name
push dword [ebp - 0x614]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406387
cmp dword [ebp - 0x60c], 1
jne 0x406387
push dword [ebp - 0x614]
call edi
test eax, eax
jne 0x406449
push dword [ebp - 0x61c]
lea eax, [ebp - 0x604]
push eax
call fcn.0041d0d0
pop ecx
pop ecx
test eax, eax
jne 0x4063bf
xor esi, esi
inc esi
push dword [ebp - 0x618]
call edi
pop edi
test eax, eax
je 0x406409
push 0xd7
jmp 0x40644e
push dword [ebp - 0x614]
call edi
test eax, eax
je 0x4063bf
push 0xc9
jmp 0x40644e
push dword [ebp - 0x610]
call edi
test eax, eax
je 0x4063bf
push 0xac
jmp 0x40644e
push dword [ebp - 0x610]
call edi
test eax, eax
jne 0x406402
mov eax, dword [ebp - 0x620]
lea ecx, [ebp - 0x608]
push esi
push esi
push esi
push esi
push ecx
lea ecx, [ebp - 0x104]
mov dword [ebp - 0x608], 0x100
inc eax
push ecx
push eax
push dword [ebp - 0x618]
mov dword [ebp - 0x620], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x406191
jmp 0x40636c
push 0xa6
jmp 0x40644e
test esi, esi
je 0x406144
lea eax, [ebp - 0x204]
mov ebx, 0x100
push eax
push str..Global_s.tap
push ebx
push dword [ebp - 0x628]
call fcn.00405dc1
add esp, 0x10
test eax, eax
js 0x406144
cmp eax, ebx
je 0x406144
xor eax, eax
inc eax
jmp 0x406146
push 0xcd
push str.D:_badvpn_tuntap_tapwin32_funcs.c
push str._s:_d_Assertion_failed_n
push 2
call fcn.0041af8f
pop ecx
push eax
call fcn.004023ba
add esp, 0x10
call fcn.0041d306
int3