Function at 0x140040be8
Capabilities:
Copy file
Delete file

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x6e0
mov rax, qword [0x14009e140]
xor rax, rsp
mov qword [rsp + 0x6d0], rax
mov rsi, rcx
mov rcx, qword [str.P5_n_]
lea r14, str.P5_n_
lea r15, [0x140009808]
cmp rcx, r14
je 0x140040c4d
test byte [rcx + 0x1c], 4
je 0x140040c4d
cmp byte [rcx + 0x19], 5
jb 0x140040c4d
mov rcx, qword [rcx + 0x10]
mov edx, 0x8f
mov r8, r15
call fcn.14000ffa8
lea rcx, [0x1400a3fb0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [0x1400a40c8]
xor ebx, ebx
mov r8, qword [r11 + 0x30]
mov edx, 0x104
lea rcx, [rsp + 0x4c0]
mov edi, ebx
lea r12d, [rbx + 2]
lea rax, [rdx + 0x7ffffefa]
cmp rax, rbx
je 0x140040c9e
movzx eax, word [r8]
cmp ax, bx
je 0x140040c9e
mov word [rcx], ax
add r8, r12
add rcx, r12
sub rdx, 1
jne 0x140040c7a
cmp rdx, rbx
jne 0x140040cab
sub rcx, r12
mov edi, 0x8007007a
mov word [rcx], bx
lea rcx, [0x1400a3fb0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, ebx
mov ebp, 0xc
jge 0x140040d11
mov rcx, qword [str.P5_n_]
cmp rcx, r14
je 0x140040cf0
test byte [rcx + 0x1c], 4
je 0x140040cf0
cmp byte [rcx + 0x19], r12b
jb 0x140040cf0
mov rcx, qword [rcx + 0x10]
mov edx, 0x90
mov r9d, edi
mov r8, r15
call fcn.1400100e0
mov ecx, edi
movzx eax, di
mov word [rsp + 0x4c0], bx
and ecx, 0x1fff0000
cmp ecx, 0x70000
cmove edi, eax
jmp 0x140040ed1
mov r8, qword [rsi + 0x248]
mov rdx, qword [rsi + 0x10]
mov rcx, qword [0x1400a3c58]
mov r8, qword [r8 + 0x198]
lea rax, [rsp + 0x4c0]
mov r9d, 1
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x2b0]
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rax
call fcn.140017d9c
mov edi, eax
cmp eax, ebx
je 0x140040dd4
mov rcx, qword [str.P5_n_]
cmp rcx, r14
je 0x140040d89
test byte [rcx + 0x1c], 4
je 0x140040d89
cmp byte [rcx + 0x19], r12b
jb 0x140040d89
mov rcx, qword [rcx + 0x10]
mov edx, 0x91
mov r9d, eax
mov r8, r15
call fcn.1400100e0
lea r8, [0x140009d68]
lea rcx, [rsp + 0x44]
mov r9d, edi
mov rdx, rbp
mov dword [rsp + 0x40], edi
mov word [rsp + 0x44], bx
call fcn.1400118ac
mov edx, 1
lea rcx, [rsp + 0x44]
cmp eax, ebx
mov r9d, 0xc0007d2f
mov r8d, edx
cmovl rcx, rbx
mov qword [rsp + 0x20], rcx
mov ecx, r12d
call fcn.140077054
jmp 0x140040ed1
mov rcx, qword [rsi + 0x48]
lea rdx, [rsp + 0x2b0]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, ebx
jne 0x140040f33
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [str.P5_n_]
cmp rcx, r14
je 0x140040e37
test byte [rcx + 0x1c], 4
je 0x140040e37
cmp byte [rcx + 0x19], r12b
jb 0x140040e37
mov r9, qword [rsi + 0x48]
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x2b0]
mov edx, 0x92
mov r8, r15
mov qword [rsp + 0x20], rax
call fcn.14003beb4
lea r8, [0x140009d68]
lea rcx, [rsp + 0x44]
mov r9d, edi
mov rdx, rbp
mov dword [rsp + 0x40], edi
mov word [rsp + 0x44], bx
call fcn.1400118ac
mov edx, 1
lea rcx, [rsp + 0x44]
cmp eax, ebx
mov r9d, 0xc0007d2f
mov r8d, edx
cmovl rcx, rbx
mov qword [rsp + 0x20], rcx
mov ecx, r12d
call fcn.140077054
lea rcx, [rsp + 0x2b0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, ebx
jne 0x140040ed1
mov rax, qword [str.P5_n_]
cmp rax, r14
je 0x140040ed1
test byte [rax + 0x1c], 4
je 0x140040ed1
cmp byte [rax + 0x19], r12b
jb 0x140040ed1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.P5_n_]
lea r9, [rsp + 0x2b0]
mov rcx, qword [rcx + 0x10]
mov edx, 0x93
mov r8, r15
mov dword [rsp + 0x20], eax
call fcn.140011a18
lea r8, [0x140009d70]
lea rcx, [rsp + 0x44]
mov r9d, edi
mov rdx, rbp
mov dword [rsp + 0x40], edi
mov word [rsp + 0x44], bx
call fcn.1400118ac
mov edx, 1
lea r8, [rsp + 0x44]
cmp eax, ebx
lea rax, [rsp + 0x4c0]
mov r9d, 0xc0007d14
cmovl r8, rbx
mov ecx, r12d
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], rax
mov rax, qword [rsi + 0x48]
lea r8d, [rdx + 2]
mov qword [rsp + 0x20], rax
call fcn.140077054
jmp 0x140041153
lea rcx, [rsp + 0x2b0]
mov rdx, rsi
call fcn.1400403e0
cmp eax, ebx
jne 0x140040fdd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov rcx, qword [str.P5_n_]
cmp rcx, r14
je 0x140040f88
test byte [rcx + 0x1c], 4
je 0x140040f88
cmp byte [rcx + 0x19], r12b
jb 0x140040f88
mov rcx, qword [rcx + 0x10]
lea r9, [rsp + 0x2b0]
mov edx, 0x94
mov r8, r15
mov dword [rsp + 0x20], eax
call fcn.140011a18
lea r8, [0x140009d70]
lea rcx, [rsp + 0x44]
mov r9d, ebp
mov edx, 0xc
mov dword [rsp + 0x40], ebp
mov word [rsp + 0x44], bx
call fcn.1400118ac
lea rcx, [rsp + 0x44]
mov r9d, 0xc0007d4a
cmp eax, ebx
lea rax, [rsp + 0x2b0]
mov r8d, r12d
cmovl rcx, rbx
mov edx, 1
mov qword [rsp + 0x28], rcx
mov ecx, r12d
mov qword [rsp + 0x20], rax
call fcn.140077054
mov r9, qword [rsi + 0x248]
mov rcx, qword [rsi + 0x10]
xor r8d, r8d
mov r9, qword [r9 + 0x198]
lea edx, [r8 + 0x40]
call fcn.140066354
cmp eax, ebx
je 0x14004102c
mov rcx, qword [str.P5_n_]
cmp rcx, r14
je 0x14004102c
test byte [rcx + 0x1c], 4
je 0x14004102c
cmp byte [rcx + 0x19], r12b
jb 0x14004102c
mov rcx, qword [rcx + 0x10]
mov edx, 0x95
movzx r9d, ax
mov r8, r15
call fcn.140011990
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x2b0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x14004109f
mov rax, qword [str.P5_n_]
cmp rax, r14
je 0x140041127
test byte [rax + 0x1c], 4
je 0x140041127
cmp byte [rax + 0x19], r12b
jb 0x140041127
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.P5_n_]
mov edx, 0x96
mov rcx, qword [rcx + 0x10]
mov r9d, eax
lea rax, [rsp + 0x2b0]
mov r8, r15
mov qword [rsp + 0x20], rax
call fcn.14001d554
jmp 0x140041127
lea rcx, [0x1400a3fb0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [0x1400a40c8]
cmp qword [r11 + 0x38], 0xffffffffffffffff
je 0x1400410d4
mov edx, dword [rsp + 0x7c]
mov eax, dword [rsp + 0x80]
shl rdx, 0x20
or rdx, rax
add rdx, qword [r11 + 0x38]
mov qword [r11 + 0x38], rdx
lea rcx, [0x1400a3fb0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp eax, ebx
jne 0x140041127
mov rax, qword [str.P5_n_]
cmp rax, r14
je 0x140041127
test byte [rax + 0x1c], 4
je 0x140041127
cmp byte [rax + 0x19], r12b
jb 0x140041127
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.P5_n_]
mov edx, 0x97
mov rcx, qword [rcx + 0x10]
mov r9d, eax
mov r8, r15
call fcn.140011990
lea rax, [rsp + 0x2b0]
mov r9d, 0x40007d13
mov r8d, r12d
mov qword [rsp + 0x28], rax
mov rax, qword [rsi + 0x48]
mov edx, 3
mov ecx, r12d
mov qword [rsp + 0x20], rax
call fcn.140077054
cmp edi, ebx
je 0x140041161
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, ebx
sete bl
mov eax, ebx
mov rcx, qword [rsp + 0x6d0]
xor rcx, rsp
call fcn.14008c5b0
lea r11, [rsp + 0x6e0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret