Function at 0x404570
Capabilities:
Get common file path

Disassembly:
sub esp, 0x4b8
mov eax, dword [0x42eb60]
xor eax, esp
mov dword [esp + 0x4b4], eax
push ebp
push esi
push edi
mov edi, dword [esp + 0x4c8]
push 6
xor ebp, ebp
push ebp
push 0x425d80
push ebp
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4045cd
push str.SetupDiCreateDeviceInfoList
call fcn.00402490
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x4b4]
xor ecx, esp
call fcn.00411d2a
add esp, 0x4b8
ret
mov eax, dword [edi + 0x20]
push ebx
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 5
push 0x402
push eax
mov dword [esp + 0x2c], 0x1c
call ebx
lea ecx, [esp + 0x1c]
push ecx
push 0
push esi
mov dword [esp + 0x20], ebp
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x404a93
push 0
push 0x100
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdA]
mov ecx, dword [0x430014]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
je 0x404644
mov eax, dword [0x430014]
cmp dword [eax - 0xc], 0
jne 0x4049a5
mov ecx, dword [0x430018]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430030]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430074]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x43006c]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430040]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430088]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x430084]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430038]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430024]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x430068]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430058]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430064]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x43008c]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430028]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430070]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x430080]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430034]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430090]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x430020]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x43007c]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x43002c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x430054]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430050]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x43004c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x43003c]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430078]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430094]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x430048]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x430044]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov edx, dword [0x430060]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov ecx, dword [0x43005c]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004125af
add esp, 8
test eax, eax
jne 0x4049a5
mov eax, dword [0x43001c]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004125af
add esp, 8
test eax, eax
je 0x404a4a
push 0x7f
lea edx, [esp + 0x13d]
push 0
push edx
mov byte [esp + 0x144], 0
call fcn.00412b50
add esp, 0xc
push 0
push 0x80
lea eax, [esp + 0x140]
push eax
push 0
push 9
lea ecx, [esp + 0x30]
push ecx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
lea edx, [esp + 0x1c]
push edx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiRemoveDevice]
test eax, eax
jne 0x404a3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x400
push eax
push 0
push 0x1100
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404a2d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x404a4a
lea eax, [esp + 0x138]
push eax
call fcn.00402c30
add esp, 4
mov ecx, dword [edi + 0x20]
push 0
push 0
push 0x408
push ecx
call ebx
xor edx, edx
cmp ebp, 0x5a
setl dl
push 0
add eax, edx
mov ebp, eax
mov eax, dword [edi + 0x20]
push ebp
push 0x402
push eax
call ebx
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
add eax, 1
push ecx
push eax
push esi
mov dword [esp + 0x20], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x404605
mov ebp, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x104
lea edx, [esp + 0x2c0]
push edx
call ebp
push str.INF_
lea eax, [esp + 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x104
lea ecx, [esp + 0x1bc]
push ecx
call ebp
push str.INFOTHER_
lea edx, [esp + 0x1bc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x104
lea eax, [esp + 0x3c4]
push eax
call ebp
push str.INFINTERNET_
lea ecx, [esp + 0x3c4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x2bc]
push edi
push edx
call fcn.00403610
lea eax, [esp + 0x1c0]
push edi
push eax
call fcn.004024e0
lea ecx, [esp + 0x3d0]
push edi
push ecx
call fcn.004024e0
add esp, 0x18
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov edx, dword [edi + 0x20]
push 0
push 0x64
push 0x402
push edx
call ebx
mov ecx, dword [esp + 0x4c4]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 1
call fcn.00411d2a
add esp, 0x4b8
ret