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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x654
mov eax, dword [0x5b228c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x64c], eax
mov eax, dword [ebp + 0x10]
push 8
mov dword [ecx], 0
push str.SYSTEMCurrentControlSetControlClass4D36E972_E325_11CE_BFC1_08002BE10318
mov dword [ebp - 0x628], ecx
lea ecx, [ebp - 0x644]
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x638], eax
mov dword [eax], 0
mov dword [ebp - 0x644], 0
mov dword [ebp - 0x640], 0
mov dword [ebp - 0x63c], 0
call fcn.00508340
mov esi, dword [ebp - 0x644]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x509ad8
xor esi, esi
jmp 0x509e12
push edi
xor edi, edi
nop dword [eax + eax]
lea eax, [ebp - 0x654]
mov dword [ebp - 0x624], 0x104
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x624]
push eax
lea eax, [ebp - 0x61c]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x509e0c
mov dword [ebp - 0x634], eax
mov dword [ebp - 0x62c], eax
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x620]
push eax
push 1
push 0
lea eax, [ebp - 0x61c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x509c00
mov esi, dword [ebp - 0x620]
mov dword [ebp - 0x630], eax
mov dword [ebp - 0x624], eax
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x414]
mov dword [ebp - 0x634], esi
push eax
lea eax, [ebp - 0x648]
mov dword [ebp - 0x620], 0x208
push eax
push 0
push str.NetCfgInstanceId
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x509be9
mov eax, dword [ebp - 0x648]
cmp eax, 1
je 0x509ba1
cmp eax, 2
jne 0x509be9
mov ecx, dword [ebp - 0x620]
test ecx, ecx
je 0x509bc1
test cl, 1
jne 0x509be9
mov eax, ecx
shr eax, 1
cmp word [ebp + eax*2 - 0x416], 0
je 0x509bca
jmp 0x509be9
xor eax, eax
mov word [ebp - 0x414], ax
push dword [ebp - 0x64c]
lea eax, [ebp - 0x414]
shr ecx, 1
push eax
mov dword [ebp - 0x624], ecx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x509c1c
test esi, esi
je 0x509bfa
push esi
call ebx
mov dword [ebp - 0x634], 0
mov esi, dword [ebp - 0x644]
inc edi
mov dword [ebp - 0x630], 0
cmp edi, 0x100
jl 0x509ae0
jmp 0x509e0c
lea eax, [ebp - 0x624]
mov dword [ebp - 0x624], 0x104
push eax
lea eax, [ebp - 0x414]
push eax
push str.BusType
lea ecx, [ebp - 0x634]
call fcn.00509e90
test eax, eax
jne 0x509e05
lea eax, [ebp - 0x414]
push eax
call fcn.0051ccce
add esp, 4
cmp eax, 5
jne 0x509e05
mov eax, dword [ebp - 0x628]
mov dword [ebp - 0x620], 0x208
mov dword [eax], 1
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x628]
push eax
push 0
push str.DriverDesc
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x509cd4
mov eax, dword [ebp - 0x628]
cmp eax, 1
je 0x509cb1
cmp eax, 2
jne 0x509cd4
mov eax, dword [ebp - 0x620]
test eax, eax
je 0x509d8c
test al, 1
jne 0x509cd4
shr eax, 1
cmp word [ebp + eax*2 - 0x20e], 0
je 0x509d95
mov eax, dword [ebp - 0x638]
cmp dword [eax], 0
jne 0x509e05
push 1
push str.NDIInterfaces
push esi
lea ecx, [ebp - 0x634]
mov dword [ebp - 0x634], 0
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x62c], 0
call fcn.00508340
mov edi, dword [ebp - 0x634]
test eax, eax
jne 0x509dfe
lea eax, [ebp - 0x620]
mov dword [ebp - 0x620], 0x208
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x628]
push eax
push 0
push str.LowerRange
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x509dfe
mov eax, dword [ebp - 0x628]
cmp eax, 1
je 0x509d6b
cmp eax, 2
jne 0x509dfe
mov eax, dword [ebp - 0x620]
test eax, eax
je 0x509dbd
test al, 1
jne 0x509dfe
shr eax, 1
cmp word [ebp + eax*2 - 0x20e], 0
je 0x509dc6
jmp 0x509dfe
xor eax, eax
mov word [ebp - 0x20c], ax
push str.Wireless
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x509cd4
mov eax, dword [ebp - 0x638]
mov dword [eax], 1
jmp 0x509e05
xor eax, eax
mov word [ebp - 0x20c], ax
push str.wlan
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x509df2
push str.vwifi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x509dfe
mov eax, dword [ebp - 0x638]
mov dword [eax], 1
test edi, edi
je 0x509e05
push edi
call ebx
test esi, esi
je 0x509e0c
push esi
call ebx
mov esi, 1
pop edi
mov eax, dword [ebp - 0x644]
test eax, eax
je 0x509e1f
push eax
call ebx
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00460f8d
mov esp, ebp
pop ebp
ret