Function at 0x401c5f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c502
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x594
mov dword [ebp - 0x594], ecx
mov dword [ebp - 0x18], 0
push 6
push 0
push 0
push 0
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x401cd0
mov eax, 1
test eax, eax
je 0x401cb6
mov dword [ebp - 0x598], 0
jmp 0x401cc9
push 0x41010c
call fcn.004021b0
add esp, 4
mov dword [ebp - 0x598], eax
xor eax, eax
jmp 0x402094
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], 0x1c
cmp dword [ebp - 0x14], 0
jne 0x402088
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x59c], eax
mov ecx, dword [ebp - 0x59c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x402088
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
mov eax, dword [ebp - 0x48]
push eax
lea ecx, [ebp - 0x44]
push ecx
push 1
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x401dc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x401d63
jmp 0x401dc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401d8f
cmp dword [ebp - 0x48], 0
je 0x401d7e
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x4c]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x48], eax
jmp 0x401dc0
mov eax, 1
test eax, eax
je 0x401da4
mov dword [ebp - 0x5a0], 0
jmp 0x401db7
push 0x410130
call fcn.004021b0
add esp, 4
mov dword [ebp - 0x5a0], eax
mov dword [ebp - 0x10], 1
jmp 0x401dc5
jmp 0x401d32
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x401dd5
jmp 0x401ceb
cmp dword [ebp - 0x10], 0
je 0x401de0
jmp 0x402088
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x40], ecx
jmp 0x401dfc
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x40]
lea edx, [ecx + eax + 1]
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], 0
je 0x402073
mov eax, dword [ebp - 0x40]
movsx ecx, byte [eax]
test ecx, ecx
je 0x402073
mov edx, dword [ebp - 0x48]
add edx, dword [ebp - 0x4c]
cmp dword [ebp - 0x40], edx
jae 0x402073
mov dword [ebp - 0x50], 0
jmp 0x401e35
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x594]
mov edx, dword [ebp - 0x50]
cmp edx, dword [ecx + 0xc]
jge 0x402066
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x50]
imul ecx, ecx, 0xc3
mov edx, dword [ebp - 0x594]
mov eax, dword [edx + 0x1c]
lea ecx, [eax + ecx + 0x80]
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x402061
mov dword [ebp - 0x45c], 0x400
push 0x400
push 0
lea edx, [ebp - 0x458]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x45c]
push eax
mov ecx, dword [ebp - 0x45c]
push ecx
lea edx, [ebp - 0x458]
push edx
lea eax, [ebp - 0x58]
push eax
push 0xc
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x40205a
lea eax, [ebp - 0x458]
push eax
lea ecx, [ebp - 0x460]
call fcn.0040a15c
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x460]
call sub.MFC42.DLL_CString::MakeUpper
push 0x80
push 0
lea ecx, [ebp - 0x4e0]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x460]
call fcn.004021c0
push eax
lea edx, [ebp - 0x4e0]
push edx
call sub.MSVCRT.dll_strcpy
add esp, 8
push 0x20019
push 2
push 0
push 1
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov dword [ebp - 0x4e4], eax
cmp dword [ebp - 0x4e4], 0xffffffff
je 0x402048
mov dword [ebp - 0x4e8], 1
push 0x20
push 0
lea edx, [ebp - 0x58c]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x4ec], 0x20
lea eax, [ebp - 0x4ec]
push eax
lea ecx, [ebp - 0x58c]
push ecx
lea edx, [ebp - 0x4e8]
push edx
push 0
push str.AttachedTo
mov eax, dword [ebp - 0x4e4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401fba
lea ecx, [ebp - 0x589]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov edx, dword [ebp - 0x594]
mov dword [edx + 0x14], eax
mov dword [ebp - 0x4e8], 3
push 0x80
push 0
lea eax, [ebp - 0x56c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x4ec], 0x80
lea ecx, [ebp - 0x4ec]
push ecx
lea edx, [ebp - 0x56c]
push edx
lea eax, [ebp - 0x4e8]
push eax
push 0
push 0x410158
mov ecx, dword [ebp - 0x4e4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 0x4e4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov dword [ebp - 0x590], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x460]
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x590]
jmp 0x402094
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x460]
call sub.MFC42.DLL_CString::CString
mov eax, 2
jmp 0x402094
jmp 0x401e2c
cmp dword [ebp - 0x18], 0
jbe 0x40206e
jmp 0x402073
jmp 0x401de8
cmp dword [ebp - 0x48], 0
je 0x402083
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x401ceb
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret