Function at 0x408c46
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
mov ecx, esi
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x10], eax
call fcn.0042bd77
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x50]
push 1
push eax
push 0x4a5a38
call dword [sym.imp.SETUPAPI.dll_SetupDiClassGuidsFromNameA]
test eax, eax
jne 0x408c8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetupDiClassGuidsFromName___ERROR_d
jmp 0x408cac
push 0xa
push ebx
lea eax, [ebp - 0x50]
push ebx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x408cbe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetupDiGetClassDevs___ERROR_d
push 0x4b39b0
call fcn.0042b4a1
add esp, 0xc
jmp 0x408ecc
push edi
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x38]
mov dword [ebp - 8], ebx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0x1c
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x408e84
mov esi, 0x200
push ebx
lea eax, [ebp - 0x250]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
push esi
push eax
push ebx
lea eax, [ebp - 0x3c]
push 0x16
push eax
mov byte [ebp - 0x250], bl
push dword [ebp - 4]
call edi
test eax, eax
jne 0x408d21
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetupDiGetDeviceRegistryProperty_SPDRP_ENMERATOR_NAME__ERROR_d
jmp 0x408d76
lea eax, [ebp - 0x250]
push 0x4a59ac
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
test eax, eax
pop ecx
lea eax, [ebp - 0x250]
je 0x408d57
push eax
push dword [ebp - 8]
push str.AddAdrs_2__u__s
push 0x4b39b0
call fcn.0042b4b9
jmp 0x408ddd
push ebx
push esi
push eax
push ebx
lea eax, [ebp - 0x3c]
push 9
push eax
push dword [ebp - 4]
call edi
test eax, eax
jne 0x408d88
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetupDiGetDeviceRegistryProperty_SPDRP_DRIVER__ERROR_d
push 0x4b39b0
call fcn.0042b4a1
add esp, 0xc
jmp 0x408e55
lea eax, [ebp - 0x250]
push eax
push str.SystemCurrentControlSetControlClass
lea eax, [ebp - 0x450]
push 0x4a5934
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 0x450]
push ebx
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
je 0x408de2
push eax
lea eax, [ebp - 0x450]
push eax
push str.RegOpenKey__s__Error_d
push 0x4b39b0
call fcn.0042b4a1
add esp, 0x10
jmp 0x408e55
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], esi
push eax
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push str.NetCfgInstanceId
mov byte [ebp - 0x250], bl
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x408e39
cmp dword [ebp - 0x14], 1
jne 0x408e39
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x250]
push eax
call fcn.00408ed0
pop ecx
test al, al
pop ecx
je 0x408e4c
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x20]
push 6
push eax
call fcn.0042bd21
jmp 0x408e4c
push eax
push str.RegQueryValueEx__NetCfgInstanceId___ERROR_d
push 0x4b39b0
call fcn.0042b4a1
add esp, 0xc
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 8]
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x38]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0x1c
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x408cee
mov esi, dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x408ea4
push eax
push str.SetupDiEnumDeviceInfo___ERROR_d
push 0x4b39b0
call fcn.0042b4a1
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esi + 0xc]
mov edi, dword [ebp - 0x10]
sub eax, edi
push 6
sub eax, 4
xor edx, edx
pop ecx
div ecx
mov ecx, esi
mov ebx, eax
mov eax, dword [esi]
call dword [eax + 0x14]
mov dword [eax + edi], ebx
pop edi
pop esi
pop ebx
leave
ret