Function at 0x4054b0
Capabilities:
Get common file path

Disassembly:
mov r11, rsp
sub rsp, 0x548
mov rax, qword [0x00445f40]
xor rax, rsp
mov qword [rsp + 0x520], rax
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x20], rsi
mov qword [r11 - 8], rdi
mov qword [r11 - 0x10], r12
mov qword [r11 - 0x18], r13
xor r13d, r13d
mov rsi, rcx
lea rdx, [0x0043482c]
lea r9d, [r13 + 6]
xor r8d, r8d
xor ecx, ecx
mov r12d, r13d
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp rax, 0xffffffffffffffff
mov rdi, rax
jne 0x40555e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], r13
mov r9d, 0x400
mov ebx, eax
lea rax, [rsp + 0x40]
xor edx, edx
mov ecx, 0x1100
mov r8d, ebx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], r13
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x40554f
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x405af3
mov rcx, qword [rsi + 0x40]
xor r9d, r9d
mov edx, 0x402
lea r8d, [r9 + 5]
mov qword [rsp + 0x560], rbp
mov dword [rsp + 0x48], 0x20
call qword [sym.imp.USER32.dll_SendMessageA]
lea r8, [rsp + 0x48]
xor edx, edx
mov rcx, rdi
mov ebp, r13d
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x405a1f
nop
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x48]
mov r9d, 0x100
mov rcx, rdi
mov qword [rsp + 0x20], r13
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdA]
mov rdx, qword [0x004479e0]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
je 0x4055e5
mov rax, qword [0x004479e0]
cmp dword [rax - 0x10], r13d
jne 0x405911
mov rdx, qword [0x004479e8]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a18]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447aa0]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a90]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a38]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447ac8]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447ac0]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a28]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a00]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a88]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a68]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a80]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447ad0]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a08]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a98]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447ab8]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a20]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447ad8]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x004479f8]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447ab0]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a10]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a60]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a58]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a50]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a30]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447aa8]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447ae0]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a48]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a40]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a78]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x00447a70]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
jne 0x405911
mov rdx, qword [0x004479f0]
lea rcx, [rsp + 0x70]
call fcn.00419c30
test rax, rax
je 0x4059cb
xor edx, edx
lea rcx, [rsp + 0x171]
mov byte [rsp + 0x170], r13b
lea r8d, [rdx + 0x7f]
call fcn.0041a500
xor r9d, r9d
lea rax, [rsp + 0x170]
mov qword [rsp + 0x30], r13
lea rdx, [rsp + 0x48]
lea r8d, [r9 + 9]
mov rcx, rdi
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiRemoveDevice]
test eax, eax
jne 0x4059be
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], r13
mov r9d, 0x400
mov ebx, eax
lea rax, [rsp + 0x40]
xor edx, edx
mov ecx, 0x1100
mov r8d, ebx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], r13
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x4059b4
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4059cb
lea rcx, [rsp + 0x170]
call fcn.00403710
mov rcx, qword [rsi + 0x40]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x408
call qword [sym.imp.USER32.dll_SendMessageA]
mov ecx, r13d
cmp r12d, 0x5a
setl cl
xor r9d, r9d
mov edx, 0x402
add eax, ecx
mov rcx, qword [rsi + 0x40]
movsxd r12, eax
mov r8, r12
call qword [sym.imp.USER32.dll_SendMessageA]
add ebp, 1
lea r8, [rsp + 0x48]
mov edx, ebp
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4055a0
lea rcx, [rsp + 0x1f0]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rdx, str.INF_
lea rcx, [rsp + 0x1f0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rcx, [rsp + 0x300]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rdx, str.INFOTHER_
lea rcx, [rsp + 0x300]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rcx, [rsp + 0x410]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rdx, str.INFINTERNET_
lea rcx, [rsp + 0x410]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rcx, [rsp + 0x1f0]
mov rdx, rsi
call fcn.004042b0
lea rcx, [rsp + 0x300]
mov rdx, rsi
call fcn.00402db0
lea rcx, [rsp + 0x410]
mov rdx, rsi
call fcn.00402db0
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov rcx, qword [rsi + 0x40]
xor r9d, r9d
lea r8d, [r9 + 0x64]
mov edx, 0x402
call qword [sym.imp.USER32.dll_SendMessageA]
mov rbp, qword [rsp + 0x560]
mov eax, 1
mov r13, qword [rsp + 0x530]
mov r12, qword [rsp + 0x538]
mov rdi, qword [rsp + 0x540]
mov rsi, qword [rsp + 0x568]
mov rbx, qword [rsp + 0x558]
mov rcx, qword [rsp + 0x520]
xor rcx, rsp
call fcn.004196e0
add rsp, 0x548
ret