Function at 0x140006ed0
Capabilities:
Copy file
Get common file path

Disassembly:
mov dword [rsp + 8], ecx
push rdi
mov eax, 0x12a0
call fcn.1400121b0
sub rsp, rax
mov rax, qword [0x1400213d8]
xor rax, rsp
mov qword [rsp + 0x1290], rax
mov dword [rsp + 0x670], 0xffffffff
mov dword [rsp + 0x34], 1
cmp dword [rsp + 0x12b0], 2
jne 0x140006f1e
mov dword [rsp + 0x1270], 6
jmp 0x140006f29
mov dword [rsp + 0x1270], 4
mov eax, dword [rsp + 0x1270]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x12b0], 2
jne 0x140006f4b
mov dword [rsp + 0x1274], 0
jmp 0x140006f56
mov dword [rsp + 0x1274], 1
mov eax, dword [rsp + 0x1274]
mov dword [rsp + 0x698], eax
mov dword [rsp + 0x678], 0x20
mov r9d, dword [rsp + 0x30]
xor r8d, r8d
lea rdx, [0x140022ddc]
xor ecx, ecx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov qword [rsp + 0x6a0], rax
cmp qword [rsp + 0x6a0], 0xffffffffffffffff
jne 0x140006fac
lea rcx, str.SetupDiGetClassDevs_error__n
call fcn.14000c7d4
xor eax, eax
jmp 0x1400077a6
cmp dword [rsp + 0x12b0], 2
jne 0x14000742b
mov byte [rsp + 0x9f0], 0
lea rax, [rsp + 0x9f1]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0x1050], 0
lea rax, [rsp + 0x1051]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0xc10], 0
lea rax, [rsp + 0xc11]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0xb00], 0
lea rax, [rsp + 0xb01]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0x7d0], 0
lea rax, [rsp + 0x7d1]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0x1160], 0
lea rax, [rsp + 0x1161]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0xf40], 0
lea rax, [rsp + 0xf41]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0xd20], 0
lea rax, [rsp + 0xd21]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov byte [rsp + 0xe30], 0
lea rax, [rsp + 0xe31]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov edx, 0x103
lea rcx, [rsp + 0x9f0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x14000742b
lea rdx, [rsp + 0x9f0]
lea rcx, str.szSystemPath__s__n
call fcn.14000c7d4
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32libusb0.dll
mov edx, 0x104
lea rcx, [rsp + 0x1050]
call fcn.14000bb48
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32libusbK.dll
mov edx, 0x104
lea rcx, [rsp + 0xc10]
call fcn.14000bb48
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32driverslibusb0.sys
mov edx, 0x104
lea rcx, [rsp + 0xb00]
call fcn.14000bb48
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32driverslibusbK.sys
mov edx, 0x104
lea rcx, [rsp + 0x7d0]
call fcn.14000bb48
lea rdx, [rsp + 0x1050]
lea rcx, str.szPath_libusb0_dll__s__n
call fcn.14000c7d4
lea rdx, [rsp + 0xc10]
lea rcx, str.szPath_libusbK_dll__s__n
call fcn.14000c7d4
lea rdx, [rsp + 0xb00]
lea rcx, str.szPath_libusb0_sys__s__n
call fcn.14000c7d4
lea rdx, [rsp + 0x7d0]
lea rcx, str.szPath_libusbK_sys__s__n
call fcn.14000c7d4
mov edx, 0x104
lea rcx, [rsp + 0x8e0]
call fcn.140006e70
lea rdx, [rsp + 0x8e0]
lea rcx, str.szCurrentPath__s__n
call fcn.14000c7d4
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusb0.dll
mov edx, 0x104
lea rcx, [rsp + 0x1160]
call fcn.14000bb48
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusbK.dll
mov edx, 0x104
lea rcx, [rsp + 0xf40]
call fcn.14000bb48
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusb0.sys
mov edx, 0x104
lea rcx, [rsp + 0xd20]
call fcn.14000bb48
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusbK.sys
mov edx, 0x104
lea rcx, [rsp + 0xe30]
call fcn.14000bb48
lea rdx, [rsp + 0x1160]
lea rcx, str.szCurrentPath_libusb0_dll__s__n
call fcn.14000c7d4
lea rdx, [rsp + 0xf40]
lea rcx, str.szCurrentPath_libusbK_dll__s__n
call fcn.14000c7d4
lea rdx, [rsp + 0xd20]
lea rcx, str.szCurrentPath_libusb0_sys__s__n
call fcn.14000c7d4
lea rdx, [rsp + 0xe30]
lea rcx, str.szCurrentPath_libusbK_sys__s__n
call fcn.14000c7d4
xor r8d, r8d
lea rdx, [rsp + 0x1050]
lea rcx, [rsp + 0x1160]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x140007311
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusb0.dll_fail__lasterror__d__n
call fcn.14000c7d4
lea rcx, [rsp + 0x1050]
call fcn.140006e10
test eax, eax
jne 0x140007311
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusb0.dll__lasterror__d__n
call fcn.14000c7d4
mov dword [rsp + 0x34], 0
xor r8d, r8d
lea rdx, [rsp + 0xc10]
lea rcx, [rsp + 0xf40]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14000736f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusbK.dll_fail__lasterror__d__n
call fcn.14000c7d4
lea rcx, [rsp + 0xc10]
call fcn.140006e10
test eax, eax
jne 0x14000736f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusbK.dll__lasterror__d__n
call fcn.14000c7d4
mov dword [rsp + 0x34], 0
xor r8d, r8d
lea rdx, [rsp + 0xb00]
lea rcx, [rsp + 0xd20]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x1400073cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusb0.sys_fail__lasterror__d__n
call fcn.14000c7d4
lea rcx, [rsp + 0xb00]
call fcn.140006e10
test eax, eax
jne 0x1400073cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusb0.sys__lasterror__d__n
call fcn.14000c7d4
mov dword [rsp + 0x34], 0
xor r8d, r8d
lea rdx, [rsp + 0x7d0]
lea rcx, [rsp + 0xe30]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14000742b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusbK.sys_fail__lasterror__d__n
call fcn.14000c7d4
lea rcx, [rsp + 0x7d0]
call fcn.140006e10
test eax, eax
jne 0x14000742b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusbK.sys__lasterror__d__n
call fcn.14000c7d4
mov dword [rsp + 0x34], 0
cmp dword [rsp + 0x34], 0
jne 0x14000743b
mov eax, dword [rsp + 0x34]
jmp 0x1400077a6
mov eax, dword [rsp + 0x670]
inc eax
mov dword [rsp + 0x670], eax
lea r8, [rsp + 0x678]
mov edx, dword [rsp + 0x670]
mov rcx, qword [rsp + 0x6a0]
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140007794
lea r8, [rsp + 0x7c0]
lea rdx, [rsp + 0x678]
mov rcx, qword [rsp + 0x6a0]
call fcn.140009070
test eax, eax
jne 0x140007493
jmp 0x14000743b
cmp dword [rsp + 0x7c0], 0
je 0x14000749f
jmp 0x14000743b
mov r8d, 0x628
xor edx, edx
lea rcx, [rsp + 0x40]
call fcn.14000c9e0
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x14c]
lea r8, [rsp + 0x678]
mov rdx, qword [rsp + 0x6a0]
mov ecx, 2
call fcn.1400077f0
test eax, eax
jne 0x1400074e4
jmp 0x14000743b
lea rcx, [rsp + 0x14c]
call fcn.140009a10
lea rdx, str.class_09
lea rcx, [rsp + 0x14c]
call fcn.1400097b0
test rax, rax
je 0x14000750f
jmp 0x14000743b
lea r8, [rsp + 0x14c]
lea rdx, [rsp + 0x678]
mov rcx, qword [rsp + 0x6a0]
call fcn.140009470
test eax, eax
jne 0x140007535
jmp 0x14000743b
lea rcx, [rsp + 0x14c]
call fcn.140009a10
lea rdx, str.root_hub
lea rcx, [rsp + 0x14c]
call fcn.1400097b0
test rax, rax
je 0x140007560
jmp 0x14000743b
xor r9d, r9d
mov r8d, 0x104
lea rdx, [rsp + 0x55c]
mov ecx, dword [rsp + 0x68c]
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_IDA]
test eax, eax
je 0x140007587
jmp 0x14000743b
lea r8, [rsp + 0x7c4]
lea rdx, [rsp + 0x678]
mov rcx, qword [rsp + 0x6a0]
call fcn.140008f20
test eax, eax
jne 0x1400075ad
jmp 0x14000743b
cmp dword [rsp + 0x698], 0
je 0x1400075ca
mov eax, dword [rsp + 0x7c4]
and eax, 0xc
test eax, eax
jne 0x1400075ca
jmp 0x14000743b
cmp dword [rsp + 0x698], 0
jne 0x1400075e7
mov eax, dword [rsp + 0x7c4]
and eax, 0xc
test eax, eax
je 0x1400075e7
jmp 0x14000743b
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x250]
lea r8, [rsp + 0x678]
mov rdx, qword [rsp + 0x6a0]
mov ecx, 0xb
call fcn.1400077f0
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x678]
mov rdx, qword [rsp + 0x6a0]
xor ecx, ecx
call fcn.1400077f0
lea rdx, str.MI_
lea rcx, [rsp + 0x14c]
call fcn.14000b1c8
test rax, rax
jne 0x140007667
lea rdx, str.mi_
lea rcx, [rsp + 0x14c]
call fcn.14000b1c8
test rax, rax
je 0x14000766c
jmp 0x14000743b
lea rdx, str.VID_05AC
lea rcx, [rsp + 0x14c]
call fcn.14000b1c8
test rax, rax
jne 0x1400076a3
lea rdx, str.vid_05ac
lea rcx, [rsp + 0x14c]
call fcn.14000b1c8
test rax, rax
jne 0x1400076a3
jmp 0x14000743b
cmp dword [rsp + 0x12b0], 2
jne 0x1400076be
lea rax, [0x140022e04]
mov qword [rsp + 0x1278], rax
jmp 0x1400076cd
lea rax, [0x140022e2c]
mov qword [rsp + 0x1278], rax
lea r9, [rsp + 0x55c]
mov r8, qword [rsp + 0x1278]
lea rdx, str._s___di_s_
lea rcx, [rsp + 0x6b0]
call fcn.14000baa8
xor r9d, r9d
lea r8, [rsp + 0x6b0]
xor edx, edx
xor ecx, ecx
call fcn.140003c10
test eax, eax
jne 0x14000778f
cmp dword [rsp + 0x12b0], 2
jne 0x140007728
lea rax, str.installed
mov qword [rsp + 0x1280], rax
jmp 0x140007737
lea rax, str.removed
mov qword [rsp + 0x1280], rax
cmp dword [rsp + 0x12b0], 2
jne 0x140007752
lea rax, str.Install
mov qword [rsp + 0x1288], rax
jmp 0x140007761
lea rax, str.Remove
mov qword [rsp + 0x1288], rax
lea rax, [rsp + 0x14c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
mov r8, qword [rsp + 0x1280]
mov rdx, qword [rsp + 0x1288]
lea rcx, str._s_device_filter_:_libusb_win32_device_filter_successfully__s_for__s___s_
call fcn.14000c7d4
jmp 0x14000743b
mov rcx, qword [rsp + 0x6a0]
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x1290]
xor rcx, rsp
call fcn.14000b050
add rsp, 0x12a0
pop rdi
ret