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

Disassembly:
push rsi
push r12
push r13
sub rsp, 0xae0
mov rax, qword [0x140018008]
xor rax, rsp
mov qword [rsp + 0xad0], rax
mov ecx, 0xff
call fcn.140005bd0
lea rcx, [rsp + 0x6d0]
xor edx, edx
mov r8d, 0xff
mov r12, rax
call fcn.140005240
lea rcx, [rsp + 0x3c0]
xor edx, edx
mov r8d, 0xff
call fcn.140005240
xor ecx, ecx
lea r13, [0x140019680]
nop
movzx eax, word [rcx + r13]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x8ce], ax
jne 0x140004800
xor ecx, ecx
lea rsi, [0x140019c90]
nop
movzx eax, word [rcx + rsi]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x8ce], ax
jne 0x140004820
xor ecx, ecx
nop
nop
nop
movzx eax, word [rcx + r13]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x6ce], ax
jne 0x140004840
xor ecx, ecx
nop
nop
movzx eax, word [rcx + rsi]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x3be], ax
jne 0x140004860
lea rdx, [0x140013c84]
mov rcx, r12
call qword [sym.imp.USER32.dll_wsprintfA]
mov rdx, r13
mov rcx, r12
call fcn.1400015d0
test eax, eax
je 0x140004dbc
mov qword [rsp + 0xb00], rbx
lea rdx, str._sREV_0200SS
mov r8, r13
mov rcx, r12
mov qword [rsp + 0xb08], rbp
mov qword [rsp + 0xb10], rdi
call qword [sym.imp.USER32.dll_wsprintfA]
mov rbx, r13
mov rdx, r12
sub rbx, r12
nop
movzx eax, word [rdx]
add rdx, 2
test ax, ax
mov word [rbx + rdx - 2], ax
jne 0x1400048d0
call fcn.140004330
xor edx, edx
nop
nop
movzx eax, word [rsp + rdx + 0x6d0]
add rdx, 2
test ax, ax
mov word [rdx + r13 - 2], ax
jne 0x1400048f0
xor ecx, ecx
lea rdi, str.rtlss.inf
movzx eax, word [rcx + rdi]
add rcx, 2
test ax, ax
mov word [rcx + rsi - 2], ax
jne 0x140004910
call fcn.140004330
mov rcx, r13
call fcn.1400012d0
xor edx, edx
movzx eax, word [rsp + rdx + 0x3c0]
add rdx, 2
test ax, ax
mov word [rdx + rsi - 2], ax
jne 0x140004931
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x1a0]
mov edx, 0x104
mov rcx, rsi
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x40], 0
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x1400049be
cmp eax, 0x104
jae 0x1400049be
lea rax, [rsp + 0x58]
xor r9d, r9d
lea rcx, [rsp + 0x1a0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x8d0]
mov qword [rsp + 0x30], 0
lea r8d, [r9 + 1]
xor edx, edx
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupCopyOEMInfA]
xor ecx, ecx
movzx eax, word [rcx + rdi]
add rcx, 2
test ax, ax
mov word [rcx + rsi - 2], ax
jne 0x1400049c0
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x2b0]
mov edx, 0x104
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea rdx, [rsp + 0x5c0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rcx, [rsp + 0x90]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x90]
lea rdx, [rsp + 0x90]
xor r8d, r8d
repne scasb al, byte [rdi]
mov eax, dword [str.inf_]
or rcx, 0xffffffffffffffff
mov dword [rdi - 1], eax
movzx eax, word [0x140013c80]
mov word [rdi + 3], ax
xor eax, eax
lea rdi, [rsp + 0x90]
repne scasb al, byte [rdi]
mov rax, qword [str.rtlss.sys]
lea rcx, [rsp + 0x2b0]
mov qword [rdi - 1], rax
movzx eax, word [0x140013c58]
mov word [rdi + 7], ax
call qword [sym.imp.KERNEL32.dll_CopyFileA]
call fcn.140003b00
xor ecx, ecx
nop
movzx eax, word [rsp + rcx + 0x3c0]
add rcx, 2
test ax, ax
mov word [rcx + rsi - 2], ax
jne 0x140004a80
lea rdx, str._sREV_0200SS
mov r8, r13
mov rcx, r12
call qword [sym.imp.USER32.dll_wsprintfA]
mov rcx, r12
nop
movzx eax, word [rcx]
add rcx, 2
test ax, ax
mov word [rbx + rcx - 2], ax
jne 0x140004ab0
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x2b0]
mov edx, 0x104
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea rdx, [rsp + 0x5c0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rcx, [rsp + 0x90]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x90]
repne scasb al, byte [rdi]
mov eax, dword [str.inf_]
or rcx, 0xffffffffffffffff
mov dword [rdi - 1], eax
movzx eax, word [0x140013c80]
mov word [rdi + 3], ax
xor eax, eax
lea rdi, [rsp + 0x90]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
movzx eax, byte [rsi + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140004b40
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x2b0]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
xor ebp, ebp
nop
nop
lea rdx, [0x140013c84]
mov rcx, r12
call qword [sym.imp.USER32.dll_wsprintfA]
xor esi, esi
lea r9, [rsp + 0x4c]
lea rdx, [rsp + 0x1a0]
lea r8d, [rsi + 0xa]
mov rcx, r12
xor ebx, ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiClassGuidsFromNameA]
test eax, eax
je 0x140004c6c
lea r9d, [rsi + 6]
lea rcx, [rsp + 0x1a0]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x140004c6c
lea r8, [rsp + 0x70]
xor edx, edx
mov rcx, rax
mov dword [rsp + 0x70], 0x20
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140004c5b
nop
nop
nop
lea rax, [rsp + 0x4c]
lea r9, [rsp + 0x60]
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x3c0]
mov r8d, 1
mov rcx, rdi
mov dword [rsp + 0x28], 0x3e8
add ebx, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x140004c47
lea rcx, [rsp + 0x3c0]
mov rdx, r13
call fcn.140005010
test rax, rax
je 0x140004c47
add esi, 1
lea r8, [rsp + 0x70]
mov edx, ebx
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x140004bf0
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
test esi, esi
jne 0x140004d8d
lea rdx, [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.SETUPAPI.dll_CM_Connect_MachineA]
test eax, eax
jne 0x140004ca8
mov r9, qword [rsp + 0x40]
lea rcx, [rsp + 0x50]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_CM_Locate_DevNode_ExA]
test eax, eax
jne 0x140004ca8
mov r8, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x50]
lea edx, [rax + 1]
call qword [sym.imp.SETUPAPI.dll_CM_Reenumerate_DevNode_Ex]
xor esi, esi
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x1a0]
lea r8d, [rsi + 0xa]
mov rcx, r12
xor edi, edi
call qword [sym.imp.SETUPAPI.dll_SetupDiClassGuidsFromNameA]
test eax, eax
je 0x140004d8d
lea r9d, [rsi + 6]
lea rcx, [rsp + 0x1a0]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp rax, 0xffffffffffffffff
mov rbx, rax
je 0x140004d8d
lea r8, [rsp + 0x70]
xor edx, edx
mov rcx, rax
mov dword [rsp + 0x70], 0x20
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140004d80
nop
lea rax, [rsp + 0x48]
lea r9, [rsp + 0x58]
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x3c0]
mov r8d, 1
mov rcx, rbx
mov dword [rsp + 0x28], 0x3e8
add edi, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x140004d6c
lea rdx, [rsp + 0x6d0]
lea rcx, [rsp + 0x3c0]
call fcn.140005010
test rax, rax
je 0x140004d6c
add esi, 1
lea r8, [rsp + 0x70]
mov edx, edi
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x140004d10
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
test esi, esi
jne 0x140004d99
add ebp, 1
cmp ebp, 0x14
jl 0x140004b70
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rdi, qword [rsp + 0xb10]
mov rbp, qword [rsp + 0xb08]
mov rbx, qword [rsp + 0xb00]
mov rcx, qword [rsp + 0xad0]
xor rcx, rsp
call fcn.140005210
add rsp, 0xae0
pop r13
pop r12
pop rsi
ret