Function at 0x180005190
Capabilities:
Copy file
Create directory
Move file
Read file on windows
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0xe10
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov rax, qword [0x1801dc960]
xor rax, rsp
mov qword [rsp + 0xe00], rax
mov edi, r9d
mov rsi, r8
mov r12, rdx
mov r14, rcx
mov dword [rsp + 0x50], 0
mov byte [rsp + 0xa0], 0
xor edx, edx
mov r8d, 0x207
lea rcx, [rsp + 0xa1]
call fcn.1800f4fb0
mov byte [rsp + 0x7e0], 0
xor edx, edx
mov r8d, 0x207
lea rcx, [rsp + 0x7e1]
call fcn.1800f4fb0
mov byte [rsp + 0x5d0], 0
xor edx, edx
mov r8d, 0x207
lea rcx, [rsp + 0x5d1]
call fcn.1800f4fb0
lea rcx, [0x1801dc900]
mov rax, qword [0x1801dc900]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x3c0], 0
xor edx, edx
mov r8d, 0x207
lea rcx, [rsp + 0x3c1]
call fcn.1800f4fb0
mov byte [rsp + 0x2b0], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x2b1]
call fcn.1800f4fb0
lea rcx, [r14 + 8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r8d, eax
mov qword [rsp + 0x20], rsi
mov r9, r12
lea rdx, str._CBackUpFile::EncryptFile__tid:_d__s__s
lea rcx, [rsp + 0x7e0]
call fcn.1800f509c
or rbx, 0xffffffffffffffff
cmp edi, 1
jne 0x18000544c
lea rdx, [0x180151a40]
mov rcx, r12
call fcn.1800f7e24
mov rdi, rax
lea rdx, [0x180151a3c]
mov rcx, rsi
call fcn.1800f7e24
mov rsi, rax
mov byte [rsp + 0x68], 0
xor eax, eax
mov qword [rsp + 0x69], rax
mov qword [rsp + 0x71], rax
mov qword [rsp + 0x79], rax
mov qword [rsp + 0x81], rax
mov qword [rsp + 0x89], rax
mov qword [rsp + 0x91], rax
mov byte [rsp + 0x99], al
test rdi, rdi
je 0x180005436
test rsi, rsi
je 0x180005429
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1800f7c3c
mov r9, rdi
lea edx, [rbx + 2]
lea r8d, [rbx + 0x21]
lea rcx, [rsp + 0x68]
call fcn.1800f7b68
test eax, eax
jle 0x180005372
lea rcx, [rsp + 0x68]
mov r8d, eax
mov edx, dword [rsp + 0x50]
nop word [rax + rax]
movsx eax, byte [rcx]
add edx, eax
inc rcx
sub r8, 1
jne 0x180005360
mov dword [rsp + 0x50], edx
mov r9, rsi
mov edx, 1
lea r8d, [rdx + 3]
lea rcx, [rsp + 0x50]
call fcn.1800f7788
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1800f7c3c
mov byte [rsp + 0x9f0], 0
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x9f1]
call fcn.1800f4fb0
mov rcx, rdi
call fcn.1800f757c
test eax, eax
jne 0x180005414
nop
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x9f0]
call fcn.1800f4fb0
mov r9, rdi
mov edx, 1
mov r8d, 0x400
lea rcx, [rsp + 0x9f0]
call fcn.1800f7b68
movsxd r8, eax
mov r9, rsi
mov edx, 1
lea rcx, [rsp + 0x9f0]
call fcn.1800f7788
mov rcx, rdi
call fcn.1800f757c
test eax, eax
je 0x1800053c0
mov rcx, rdi
call fcn.1800f7504
mov rcx, rsi
call fcn.1800f7504
jmp 0x18000584c
mov rcx, rdi
call fcn.1800f7504
jmp 0x18000584c
test rsi, rsi
je 0x18000584c
mov rcx, rsi
call fcn.1800f7504
jmp 0x18000584c
test edi, edi
jne 0x18000584c
lea r8d, [rdi + 3]
mov rdx, rsi
lea rcx, [rsp + 0x2b0]
call fcn.1800f4e00
lea r8, [rsp + 0x2b0]
lea rdx, str._sProgramData_temp
lea rcx, [rsp + 0x5d0]
call qword [sym.imp.USER32.dll_wsprintfA]
xor edx, edx
lea rcx, [rsp + 0x5d0]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test rsi, rsi
jne 0x18000549e
xor ecx, ecx
jmp 0x1800054ae
xor eax, eax
mov rcx, rbx
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
dec rcx
mov r8d, ecx
mov rdx, rsi
lea rcx, [rsp + 0x48]
call fcn.180003320
mov edx, 0x5c
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call fcn.1800f6344
test rax, rax
je 0x180005825
sub eax, edi
cmp eax, 0xffffffff
je 0x180005825
mov r9d, dword [rdi - 0x10]
sub r9d, eax
lea r8d, [rax + 1]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x48]
call fcn.180003b80
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x180005558
cmp dword [rdi + 0x10], 0
jl 0x180005549
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x180005549
call fcn.180002880
mov rbp, rax
mov ecx, ebx
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x18000553e
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
lea rax, [rbp + 0x18]
mov qword [rsp + 0x48], rax
jmp 0x180005558
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.180003320
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x180005577
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov r9, qword [rsp + 0x48]
lea r8, [rsp + 0x5d0]
lea rdx, [0x180151a20]
lea rcx, [rsp + 0x3c0]
call fcn.1800f509c
xor r8d, r8d
lea rdx, [rsp + 0x3c0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x18000584c
lea rdx, str..tmp
lea rcx, [rsp + 0x3c0]
call fcn.1800f4d08
test rax, rax
je 0x18000584c
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, [rsp + 0x3c0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x18000584c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, rbx
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 5]
mov rdx, rsi
lea rcx, [rsp + 0xa0]
call fcn.1800f4e00
lea rcx, [rsp + 0xa0]
call fcn.1801241b4
lea rcx, [0x1801dc900]
mov rax, qword [0x1801dc900]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0xa0]
lea rax, [rsp + 0xa0]
test rax, 0xffffffffffff0000
jne 0x1800056a0
movzx edi, cx
xor edx, edx
mov ecx, edi
call fcn.180001960
test rax, rax
je 0x1800057ab
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.180003400
jmp 0x1800057ab
xor eax, eax
mov rcx, rbx
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x180005727
mov rax, qword [rsp + 0x40]
lea rdx, [rax - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], ecx
je 0x1800057ab
cmp dword [rdx + 0x10], ecx
jge 0x1800056fa
cmp dword [rax - 0xc], ecx
jge 0x1800056e6
mov ecx, 0x80070057
call fcn.180001700
int3
mov dword [rax - 0x10], 0
mov rax, qword [rsp + 0x40]
mov byte [rax], 0
jmp 0x1800057ab
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x180005710
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
jmp 0x1800057ab
mov rcx, qword [rsp + 0x40]
mov ebp, dword [rcx - 0x10]
lea r12, [rsp + 0xa0]
sub r12, rcx
mov edx, 1
sub edx, dword [rcx - 8]
mov eax, dword [rcx - 0xc]
sub eax, edi
or eax, edx
jge 0x18000575c
mov edx, edi
lea rcx, [rsp + 0x40]
call fcn.180002910
mov rcx, qword [rsp + 0x40]
cmp r12, rbp
ja 0x180005776
movsxd rbp, edi
lea r8, [r12 + rcx]
movsxd rdx, dword [rcx - 0xc]
mov r9, rbp
call fcn.1800f6010
jmp 0x18000578d
movsxd rbp, edi
movsxd rdx, dword [rcx - 0xc]
mov r9, rbp
lea r8, [rsp + 0xa0]
call fcn.1800f5f78
test edi, edi
js 0x18000581a
mov rax, qword [rsp + 0x40]
cmp edi, dword [rax - 0xc]
jg 0x18000581a
mov dword [rax - 0x10], edi
mov rax, qword [rsp + 0x40]
mov byte [rax + rbp], 0
lea rdx, [rsp + 0x40]
mov rcx, r14
call fcn.180005050
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x3c0]
call qword [sym.imp.KERNEL32.dll_MoveFileA]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r8d, eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9, rsi
lea rdx, str._CBackUpFile::_Rename__tid:_d__s___s
lea rcx, [rsp + 0x7e0]
call fcn.1800f509c
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18000584c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x18000584c
mov ecx, 0x80070057
call fcn.180001700
nop
lea rcx, [r14 + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebx
dec ebx
test ebx, ebx
jg 0x180005848
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
xor eax, eax
jmp 0x180005879
lea rcx, [r14 + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
dec ebx
test ebx, ebx
jg 0x180005874
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, 1
mov rcx, qword [rsp + 0xe00]
xor rcx, rsp
call fcn.1800f4f80
add rsp, 0xe10
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret