Function at 0x1400022d0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
sub rsp, 0x78
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rdi, rcx
mov rsi, rdx
lea rcx, str.__Opening_Source_File...
call fcn.140001d60
xor r12d, r12d
xor r9d, r9d
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, rdi
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x140002349
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed___Error_Code__08X_r_n
call fcn.140001d60
jmp 0x14000262a
lea rcx, str.Success_r_n
call fcn.140001d60
lea rcx, str.__Reading_Source_File...
call fcn.140001d60
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140002662
add eax, 1
mov qword [rsp + 0xb0], rbx
mov ecx, eax
mov rbx, 0xffffffffffffffff
cmovb rcx, rbx
mov qword [rsp + 0x60], r15
call fcn.140009eb8
mov r8d, dword [rsp + 0x40]
xor edx, edx
inc r8d
mov rcx, rax
mov r15, rax
call fcn.140004070
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x44]
mov rdx, r15
mov qword [rsp + 0x20], r12
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140002651
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x44], eax
jne 0x140002651
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rsp + 0x44]
lea rcx, str.Success____d_bytes_readed_r_n
call fcn.140001d60
mov rcx, rbx
inc rcx
cmp byte [rdi + rcx], r12b
jne 0x140002400
add rcx, 5
cmovb rcx, rbx
call fcn.140009eb8
mov rbp, rax
mov r8, rbx
nop dword [rax]
inc r8
cmp byte [rdi + r8], r12b
jne 0x140002420
add r8, 5
xor edx, edx
mov rcx, rbp
call fcn.140004070
mov r8, rdi
lea rdx, str._s.khe
mov rcx, rbp
call fcn.140001dc0
mov rdx, rbp
lea rcx, str.__Creating_Target_File___s_...
call fcn.140001d60
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, rbx
jne 0x1400024a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed___Error_Code__08X_r_n
call fcn.140001d60
jmp 0x14000261d
mov qword [rsp + 0x70], r13
mov rcx, rbp
mov qword [rsp + 0x68], r14
call fcn.140009ea4
lea rcx, str.Success_r_n
call fcn.140001d60
lea rcx, str.__Encrypting_File_contents...
call fcn.140001d60
mov r14d, dword [rsp + 0x40]
mov eax, r14d
and al, 0xf
neg al
mov eax, r14d
sbb r13d, r13d
and eax, 0xfffffff0
and r13d, 0x10
add r13d, eax
mov ecx, r13d
add ecx, 1
cmovb rcx, rbx
call fcn.140009eb8
lea r8d, [r13 + 1]
xor edx, edx
mov rcx, rax
mov rbp, rax
call fcn.140004070
xorps xmm0, xmm0
mov rcx, rbx
movups xmmword [rsp + 0x48], xmm0
inc rcx
cmp byte [rsi + rcx], r12b
jne 0x140002513
cmp rcx, 0x10
jbe 0x140002530
mov ebx, 0x10
jmp 0x140002539
inc rbx
cmp byte [rsi + rbx], r12b
jne 0x140002530
mov r8, rbx
lea rcx, [rsp + 0x48]
mov rdx, rsi
call fcn.140004f40
mov ebx, r12d
test r14d, r14d
je 0x14000258b
lea rcx, [rsp + 0x48]
mov eax, r12d
mov qword [0x140026c40], rcx
cdqe
lea rcx, [rax + rbp]
mov qword [0x140026c48], rcx
movups xmm0, xmmword [rax + r15]
movups xmmword [rcx], xmm0
call section..text
call fcn.140001810
inc ebx
mov eax, ebx
shl eax, 4
cmp eax, r14d
jb 0x140002560
mov edx, r13d
lea rcx, str.Success____d_bytes_encrypted_r_n
call fcn.140001d60
mov rcx, r15
call fcn.140009ea4
lea rcx, str.__Writing_Target_File_Content...
call fcn.140001d60
lea r9, [rsp + 0x44]
mov dword [rsp + 0x44], r12d
mov r8d, r13d
mov qword [rsp + 0x20], r12
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r14, qword [rsp + 0x68]
mov r13, qword [rsp + 0x70]
test eax, eax
je 0x140002600
mov rcx, rbp
call fcn.140009ea4
xor r9d, r9d
mov qword [rsp + 0x20], r12
lea rdx, [rsp + 0x40]
mov rcx, rdi
lea r8d, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140002641
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed___Error_Code__08X_r_n
call fcn.140001d60
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0xb0]
mov r15, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140002f80
add rsp, 0x78
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, dword [rsp + 0x44]
lea rcx, str.Success____d_bytes_writed_r_n
add edx, 4
jmp 0x14000260f
lea rcx, str.Failed___Unable_to_read_the_file_contents_r_n
call fcn.140001d60
mov rcx, rbp
jmp 0x140002617
lea rcx, str.Failed___Unable_to_get_the_file_size_or_0_bytes_file_r_n
call fcn.140001d60
jmp 0x14000262a