Function at 0x140005a40
Capabilities:
Copy file

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x8a0]
sub rsp, 0x9a0
mov rax, qword [0x14004f678]
xor rax, rsp
mov qword [rbp + 0x890], rax
mov r12d, edx
mov rbx, rcx
call fcn.1400052f0
mov qword [rsp + 0x50], rax
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x10]
call fcn.140001360
nop
xor r13d, r13d
cmp qword [rbp + 0x30], r13
je 0x140005e87
mov r15, qword [rbx + 0x40]
mov rax, qword [r15 + 0x18]
mov qword [rbp + 0x40], rax
mov rax, qword [r15 + 0x20]
mov qword [rbp + 0x48], rax
mov rax, qword [r15 + 0x28]
mov qword [rbp + 0x50], rax
xor edx, edx
mov r8d, 0x618
lea rcx, [rbp + 0x270]
call fcn.1400171d0
movzx edi, r13w
nop dword [rax + rax]
movzx ecx, di
imul rax, rcx, 0x208
lea rsi, [rbp + 0x270]
add rsi, rax
mov r14, qword [rbp + rcx*8 + 0x40]
mov rbx, qword [rbp + 0x30]
mov rcx, r14
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test rax, rax
je 0x140005e7c
cmp word [rax], r13w
je 0x140005e7c
mov r8, rax
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathCombineW]
test rax, rax
je 0x140005e7c
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
mov rcx, r14
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov r10, rax
mov edx, 0x104
mov rcx, rsi
nop
cmp word [rcx], r13w
je 0x140005b60
add rcx, 2
sub rdx, 1
jne 0x140005b50
mov eax, 0x104
sub rax, rdx
test rdx, rdx
cmove rax, r13
je 0x140005e7c
mov edx, 0x104
sub rdx, rax
lea rcx, [rsi + rax*2]
lea rbx, [0x14002c4ec]
je 0x140005bbf
lea r8, [rax + 0x7ffffefa]
add r8, rdx
mov r9, rbx
sub r9, rcx
nop word [rax + rax]
test r8, r8
je 0x140005bbf
movzx eax, word [r9 + rcx]
test ax, ax
je 0x140005bbf
mov word [rcx], ax
add rcx, 2
dec r8
sub rdx, 1
jne 0x140005ba0
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r13w
je 0x140005e7c
test r10, r10
je 0x140005bed
mov rdx, r10
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
test eax, eax
je 0x140005e7c
xor r8d, r8d
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140005e87
inc di
cmp di, 3
jb 0x140005ae0
lea rax, vtable.std::_Func_impl_no_alloc_class__lambda_fcdcac1b99a4df67a9a046b13ed5cc76___void__wchar_t____3__260____ptr64_.0
mov qword [rsp + 0x60], rax
lea rax, [rbp + 0x270]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x60]
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x28], r13
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x60]
call qword [method.std::_Func_impl_no_alloc_class__lambda_fcdcac1b99a4df67a9a046b13ed5cc76___void__wchar_t____3__260____ptr64_.virtual_0]
mov qword [rbp - 0x28], rax
mov rcx, qword [rbp - 0x68]
test rcx, rcx
je 0x140005c6a
mov rax, qword [rcx]
lea rdx, [rsp + 0x60]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov rcx, r13
mov qword [rbp - 0x68], rcx
lea rax, [rbp + 0x270]
mov qword [rbp - 0x20], rax
test rcx, rcx
je 0x140005c8f
mov rax, qword [rcx]
lea rdx, [rsp + 0x60]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov qword [rbp - 0x68], r13
test r12d, r12d
je 0x140005dae
movzx edi, r13w
nop dword [rax]
mov edx, 0x104
lea rax, [rbp + 0x60]
lea rcx, [rbp + 0x60]
mov r8, qword [rbp + 0x30]
sub r8, rcx
lea rcx, [rdx + 0x7ffffefa]
test rcx, rcx
je 0x140005cd7
movzx ecx, word [r8 + rax]
test cx, cx
je 0x140005cd7
mov word [rax], cx
add rax, 2
sub rdx, 1
jne 0x140005cb4
lea rcx, [rax - 2]
test rdx, rdx
cmovne rcx, rax
mov word [rcx], r13w
je 0x140005da6
lea rdx, [0x14002c738]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x140005da6
movzx eax, di
imul rcx, rax, 0x208
lea rbx, [rbp + 0x270]
add rbx, rcx
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rdx, rax
lea rcx, [rbp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x140005da6
lea rdx, [rbp + 0x60]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x140005d8f
xor r8d, r8d
lea rdx, [rbp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x140005d8f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x140005d6e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x140005d8f
lea rcx, [rbp + 0x60]
call fcn.140007480
test eax, eax
je 0x140005da6
xor r8d, r8d
lea rdx, [rbp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140005da6
inc di
cmp di, 3
jb 0x140005ca0
mov edi, 1
jmp 0x140005e37
mov edi, r13d
jmp 0x140005e37
mov rax, qword [r15 + 0x48]
mov qword [rsp + 0x48], rax
mov rax, qword [r15 + 0x40]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
lea rax, [rbp + 0x680]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x478]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x270]
mov r8, qword [r15 + 0x10]
mov rdx, qword [r15 + 8]
mov ecx, dword [r15]
call fcn.140004300
mov rbx, rax
test rax, rax
je 0x140005e19
mov r8, rax
mov edx, 3
xor ecx, ecx
call sub.WINSPOOL.DRV_AddPrinterDriverW
test eax, eax
mov edi, 1
jne 0x140005e1c
mov edi, r13d
test rbx, rbx
je 0x140005e37
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
lea r8, [rbx - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov rax, qword [rbp - 0x20]
test rax, rax
je 0x140005e5d
mov qword [rsp + 0x50], rax
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x140005eff
mov rax, qword [rcx]
lea rdx, [rsp + 0x50]
call qword [rax + 0x10]
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x140005e7a
mov rax, qword [rcx]
lea rdx, [rbp - 0x60]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov qword [rbp - 0x28], r13
jmp 0x140005e8a
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, r13d
mov rax, qword [rbp + 0x30]
test rax, rax
je 0x140005eac
mov qword [rsp + 0x50], rax
mov rcx, qword [rbp + 0x28]
test rcx, rcx
je 0x140005ef9
mov rax, qword [rcx]
lea rdx, [rsp + 0x50]
call qword [rax + 0x10]
mov rcx, qword [rbp + 0x28]
test rcx, rcx
je 0x140005ec7
mov r8, qword [rcx]
lea rax, [rbp - 0x10]
cmp rcx, rax
setne dl
call qword [r8 + 0x20]
nop
mov eax, edi
mov rcx, qword [rbp + 0x890]
xor rcx, rsp
call fcn.1400153e0
lea r11, [rsp + 0x9a0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140014ea8
nop
call fcn.140014ea8
int3