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

Disassembly:
mov dword [rsp + 8], ecx
push rdi
mov eax, 0x12a0
call fcn.1400151b0
sub rsp, rax
mov rax, qword [0x1400243d8]
xor rax, rsp
mov qword [rsp + 0x1290], rax
mov dword [rsp + 0x670], 0xffffffff
mov dword [rsp + 0x34], 1
cmp dword [rsp + 0x12b0], 2
jne 0x140009f1e
mov dword [rsp + 0x1270], 6
jmp 0x140009f29
mov dword [rsp + 0x1270], 4
mov eax, dword [rsp + 0x1270]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x12b0], 2
jne 0x140009f4b
mov dword [rsp + 0x1274], 0
jmp 0x140009f56
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, [0x140025ddc]
xor ecx, ecx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov qword [rsp + 0x6a0], rax
cmp qword [rsp + 0x6a0], 0xffffffffffffffff
jne 0x140009fac
lea rcx, str.SetupDiGetClassDevs_error__n
call fcn.14000f7d4
xor eax, eax
jmp 0x14000a7a6
cmp dword [rsp + 0x12b0], 2
jne 0x14000a42b
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 0x14000a42b
lea rdx, [rsp + 0x9f0]
lea rcx, str.szSystemPath__s__n
call fcn.14000f7d4
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32libusb0.dll
mov edx, 0x104
lea rcx, [rsp + 0x1050]
call fcn.14000eb48
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32libusbK.dll
mov edx, 0x104
lea rcx, [rsp + 0xc10]
call fcn.14000eb48
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32driverslibusb0.sys
mov edx, 0x104
lea rcx, [rsp + 0xb00]
call fcn.14000eb48
lea r9, [rsp + 0x9f0]
lea r8, str._sSystem32driverslibusbK.sys
mov edx, 0x104
lea rcx, [rsp + 0x7d0]
call fcn.14000eb48
lea rdx, [rsp + 0x1050]
lea rcx, str.szPath_libusb0_dll__s__n
call fcn.14000f7d4
lea rdx, [rsp + 0xc10]
lea rcx, str.szPath_libusbK_dll__s__n
call fcn.14000f7d4
lea rdx, [rsp + 0xb00]
lea rcx, str.szPath_libusb0_sys__s__n
call fcn.14000f7d4
lea rdx, [rsp + 0x7d0]
lea rcx, str.szPath_libusbK_sys__s__n
call fcn.14000f7d4
mov edx, 0x104
lea rcx, [rsp + 0x8e0]
call fcn.140009e70
lea rdx, [rsp + 0x8e0]
lea rcx, str.szCurrentPath__s__n
call fcn.14000f7d4
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusb0.dll
mov edx, 0x104
lea rcx, [rsp + 0x1160]
call fcn.14000eb48
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusbK.dll
mov edx, 0x104
lea rcx, [rsp + 0xf40]
call fcn.14000eb48
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusb0.sys
mov edx, 0x104
lea rcx, [rsp + 0xd20]
call fcn.14000eb48
lea r9, [rsp + 0x8e0]
lea r8, str._slibusb_drive_x64libusbK.sys
mov edx, 0x104
lea rcx, [rsp + 0xe30]
call fcn.14000eb48
lea rdx, [rsp + 0x1160]
lea rcx, str.szCurrentPath_libusb0_dll__s__n
call fcn.14000f7d4
lea rdx, [rsp + 0xf40]
lea rcx, str.szCurrentPath_libusbK_dll__s__n
call fcn.14000f7d4
lea rdx, [rsp + 0xd20]
lea rcx, str.szCurrentPath_libusb0_sys__s__n
call fcn.14000f7d4
lea rdx, [rsp + 0xe30]
lea rcx, str.szCurrentPath_libusbK_sys__s__n
call fcn.14000f7d4
xor r8d, r8d
lea rdx, [rsp + 0x1050]
lea rcx, [rsp + 0x1160]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14000a311
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusb0.dll_fail__lasterror__d__n
call fcn.14000f7d4
lea rcx, [rsp + 0x1050]
call fcn.140009e10
test eax, eax
jne 0x14000a311
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusb0.dll__lasterror__d__n
call fcn.14000f7d4
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 0x14000a36f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusbK.dll_fail__lasterror__d__n
call fcn.14000f7d4
lea rcx, [rsp + 0xc10]
call fcn.140009e10
test eax, eax
jne 0x14000a36f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusbK.dll__lasterror__d__n
call fcn.14000f7d4
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 0x14000a3cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusb0.sys_fail__lasterror__d__n
call fcn.14000f7d4
lea rcx, [rsp + 0xb00]
call fcn.140009e10
test eax, eax
jne 0x14000a3cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusb0.sys__lasterror__d__n
call fcn.14000f7d4
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 0x14000a42b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CopyFile_libusbK.sys_fail__lasterror__d__n
call fcn.14000f7d4
lea rcx, [rsp + 0x7d0]
call fcn.140009e10
test eax, eax
jne 0x14000a42b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.FileIsExist_libusbK.sys__lasterror__d__n
call fcn.14000f7d4
mov dword [rsp + 0x34], 0
cmp dword [rsp + 0x34], 0
jne 0x14000a43b
mov eax, dword [rsp + 0x34]
jmp 0x14000a7a6
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 0x14000a794
lea r8, [rsp + 0x7c0]
lea rdx, [rsp + 0x678]
mov rcx, qword [rsp + 0x6a0]
call fcn.14000c070
test eax, eax
jne 0x14000a493
jmp 0x14000a43b
cmp dword [rsp + 0x7c0], 0
je 0x14000a49f
jmp 0x14000a43b
mov r8d, 0x628
xor edx, edx
lea rcx, [rsp + 0x40]
call fcn.14000f9e0
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x14c]
lea r8, [rsp + 0x678]
mov rdx, qword [rsp + 0x6a0]
mov ecx, 2
call fcn.14000a7f0
test eax, eax
jne 0x14000a4e4
jmp 0x14000a43b
lea rcx, [rsp + 0x14c]
call fcn.14000ca10
lea rdx, str.class_09
lea rcx, [rsp + 0x14c]
call fcn.14000c7b0
test rax, rax
je 0x14000a50f
jmp 0x14000a43b
lea r8, [rsp + 0x14c]
lea rdx, [rsp + 0x678]
mov rcx, qword [rsp + 0x6a0]
call fcn.14000c470
test eax, eax
jne 0x14000a535
jmp 0x14000a43b
lea rcx, [rsp + 0x14c]
call fcn.14000ca10
lea rdx, str.root_hub
lea rcx, [rsp + 0x14c]
call fcn.14000c7b0
test rax, rax
je 0x14000a560
jmp 0x14000a43b
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 0x14000a587
jmp 0x14000a43b
lea r8, [rsp + 0x7c4]
lea rdx, [rsp + 0x678]
mov rcx, qword [rsp + 0x6a0]
call fcn.14000bf20
test eax, eax
jne 0x14000a5ad
jmp 0x14000a43b
cmp dword [rsp + 0x698], 0
je 0x14000a5ca
mov eax, dword [rsp + 0x7c4]
and eax, 0xc
test eax, eax
jne 0x14000a5ca
jmp 0x14000a43b
cmp dword [rsp + 0x698], 0
jne 0x14000a5e7
mov eax, dword [rsp + 0x7c4]
and eax, 0xc
test eax, eax
je 0x14000a5e7
jmp 0x14000a43b
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x250]
lea r8, [rsp + 0x678]
mov rdx, qword [rsp + 0x6a0]
mov ecx, 0xb
call fcn.14000a7f0
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x678]
mov rdx, qword [rsp + 0x6a0]
xor ecx, ecx
call fcn.14000a7f0
lea rdx, str.MI_
lea rcx, [rsp + 0x14c]
call fcn.14000e1c8
test rax, rax
jne 0x14000a667
lea rdx, str.mi_
lea rcx, [rsp + 0x14c]
call fcn.14000e1c8
test rax, rax
je 0x14000a66c
jmp 0x14000a43b
lea rdx, str.VID_05AC
lea rcx, [rsp + 0x14c]
call fcn.14000e1c8
test rax, rax
jne 0x14000a6a3
lea rdx, str.vid_05ac
lea rcx, [rsp + 0x14c]
call fcn.14000e1c8
test rax, rax
jne 0x14000a6a3
jmp 0x14000a43b
cmp dword [rsp + 0x12b0], 2
jne 0x14000a6be
lea rax, [0x140025e04]
mov qword [rsp + 0x1278], rax
jmp 0x14000a6cd
lea rax, [0x140025e2c]
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.14000eaa8
xor r9d, r9d
lea r8, [rsp + 0x6b0]
xor edx, edx
xor ecx, ecx
call fcn.140006c10
test eax, eax
jne 0x14000a78f
cmp dword [rsp + 0x12b0], 2
jne 0x14000a728
lea rax, str.installed
mov qword [rsp + 0x1280], rax
jmp 0x14000a737
lea rax, str.removed
mov qword [rsp + 0x1280], rax
cmp dword [rsp + 0x12b0], 2
jne 0x14000a752
lea rax, str.Install
mov qword [rsp + 0x1288], rax
jmp 0x14000a761
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.14000f7d4
jmp 0x14000a43b
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.14000e050
add rsp, 0x12a0
pop rdi
ret