Function at 0x140002480
Capabilities:
Encode data using xor
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x2d8]
sub rsp, 0x3d8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x2a0], rax
mov rbx, rdx
cmp ecx, 2
jge 0x1400024be
lea rcx, str.____Please_Enter_Your_Payload_File_Name__n
call fcn.140002160
xor eax, eax
jmp 0x140002a24
mov qword [rsp + 0x3f0], rsi
lea rcx, [0x14000439c]
mov qword [rsp + 0x400], rdi
mov qword [rsp + 0x408], r12
mov qword [rsp + 0x3d0], r13
mov qword [rsp + 0x3c8], r14
call fcn.140002160
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov rbx, qword [rbx + 8]
lea rcx, str._i__Reading___s__...
mov rdx, rbx
call fcn.140002160
xor r13d, r13d
xor r9d, r9d
mov qword [rsp + 0x30], r13
xor r8d, r8d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x40], r13d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140002572
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140004318]
lea rcx, str.______s____FAILED____t_d__n
call fcn.140002160
xor eax, eax
jmp 0x1400029fc
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov edi, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8d, edi
xor edx, edx
mov rcx, rax
mov r12, rax
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r13
mov r8d, edi
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400025d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140004328]
lea rcx, str.______s____FAILED____t_d__n
call fcn.140002160
xor eax, eax
jmp 0x1400029fc
lea rcx, str.___DONE__n
call fcn.140002160
mov r14d, dword [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12, r12
je 0x14000256b
test r14d, r14d
je 0x14000256b
mov edx, r14d
movaps xmmword [rsp + 0x3b0], xmm6
lea rcx, str._t____Read_Payload_Size_:__ld_n
call fcn.140002160
mov rbx, r13
nop dword [rax]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
and eax, 0x800000ff
jge 0x140002636
dec eax
or eax, 0xffffff00
inc eax
mov byte [rbp + rbx + 0x70], al
inc rbx
cmp rbx, 0x20
jb 0x140002620
lea rcx, str._i__The_Generate_Key_Bytes:__
call fcn.140002160
mov rbx, r13
movzx edx, byte [rbp + rbx + 0x70]
lea rcx, str._02X
call fcn.140002160
inc rbx
cmp rbx, 0x20
jb 0x140002652
lea rcx, [0x1400043e8]
call fcn.140002160
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
movzx ecx, byte [rbp + 0x70]
xor ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov rbx, r13
nop
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
and eax, 0x800000ff
jge 0x1400026a6
dec eax
or eax, 0xffffff00
inc eax
mov byte [rbp + rbx + 0x50], al
inc rbx
cmp rbx, 0x10
jb 0x140002690
lea rcx, str._i__The_Generate_Iv_Bytes:__
call fcn.140002160
mov rbx, r13
movzx edx, byte [rbp + rbx + 0x50]
lea rcx, str._02X
call fcn.140002160
inc rbx
cmp rbx, 0x10
jb 0x1400026c2
lea rcx, [0x1400043e8]
mov qword [rsp + 0x3c0], r15
call fcn.140002160
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x100
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp + 0x70]
lea rcx, [rsp + 0x50]
call fcn.140001930
movups xmm6, xmmword [rbp + 0x50]
mov ebx, r14d
mov qword [rbp + 0x60], r13
movdqu xmmword [rbp + 0x40], xmm6
and ebx, 0xf
je 0x14000279a
lea rcx, str.____Payload_Size_Is_Not_Multiple_of_16__Padding_...
call fcn.140002160
mov eax, r14d
sub eax, ebx
add eax, 0x10
mov ecx, eax
mov edi, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x140002a59
mov r8d, edi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8, r14
mov rdx, r12
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
mov edx, edi
lea rcx, str.___DONE__n_t____New_Payload_Size_:__ld_n
call fcn.140002160
lea r9, [rbp + 0x60]
mov r8d, edi
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140002020
test al, al
je 0x140002a59
mov r15, qword [rbp + 0x60]
jmp 0x140002813
mov rdi, r14
test r14b, 0xf
jne 0x140002a59
mov rsi, r14
shr rsi, 4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x140002a59
mov r14, r12
test rsi, rsi
je 0x140002813
mov rbx, rax
nop dword [rax]
movups xmm0, xmmword [r14]
lea r9, [rbp + 0x60]
mov r8, rbx
lea rcx, [rsp + 0x50]
xorps xmm0, xmm6
movdqu xmmword [rbp + 0x60], xmm0
call fcn.140001ca0
movups xmm6, xmmword [rbx]
add rbx, 0x10
lea r14, [r14 + 0x10]
movdqu xmmword [rbp + 0x40], xmm6
sub rsi, 1
jne 0x1400027e0
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdx, r15
lea rcx, str.___Payload_Encrypted_At_:_0x_p__n
call fcn.140002160
lea rdx, [rbp + 0x50]
lea rcx, [rbp + 0x70]
call fcn.1400021c0
lea rcx, str._t____The_Encrypted_Key_Bytes:__
call fcn.140002160
mov rbx, r13
nop word [rax + rax]
movzx edx, byte [rbp + rbx + 0x70]
lea rcx, str._02X
call fcn.140002160
inc rbx
cmp rbx, 0x20
jb 0x140002850
lea rcx, [0x1400043e8]
call fcn.140002160
lea rcx, str._t____The_Encrypted_Iv_Bytes:__
call fcn.140002160
mov rbx, r13
nop word [rax + rax]
movzx edx, byte [rbp + rbx + 0x50]
lea rcx, str._02X
call fcn.140002160
inc rbx
cmp rbx, 0x10
jb 0x140002890
lea rcx, [0x1400043e8]
call fcn.140002160
lea rsi, [rdi + 0x30]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x140002915
mov r8, rsi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
movups xmm0, xmmword [rbp + 0x70]
lea rcx, [rbx + 0x30]
mov r8, rdi
movups xmm1, xmmword [rbp + 0x80]
mov rdx, r15
movups xmmword [rbx], xmm0
movups xmm0, xmmword [rbp + 0x50]
movups xmmword [rbx + 0x10], xmm1
movups xmmword [rbx + 0x20], xmm0
call sub.VCRUNTIME140.dll_memcpy
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rdx, str.PayloadConfig.pc
lea rcx, str._i__Writing___s__...
call fcn.140002160
mov qword [rsp + 0x30], r13
lea rcx, str.PayloadConfig.pc
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
mov dword [rsp + 0x40], r13d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140002975
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140004318]
jmp 0x140002a4a
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r13
mov r8d, esi
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140002a3d
cmp esi, dword [rsp + 0x40]
jne 0x140002a3d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.___DONE__n
call fcn.140002160
lea rdx, [rbp + 0x90]
mov ecx, 0x208
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea r8, [rbp + 0x90]
lea rdx, str.PayloadConfig.pc
lea rcx, str.___File___s__Is_Successfully_Written_Under_:__s__n
call fcn.140002160
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
mov r15, qword [rsp + 0x3c0]
movaps xmm6, xmmword [rsp + 0x3b0]
mov r13, qword [rsp + 0x3d0]
mov r12, qword [rsp + 0x408]
mov rdi, qword [rsp + 0x400]
mov rsi, qword [rsp + 0x3f0]
mov r14, qword [rsp + 0x3c8]
mov rcx, qword [rbp + 0x2a0]
xor rcx, rsp
call fcn.140002a70
add rsp, 0x3d8
pop rbx
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140004360]
mov r8d, eax
lea rcx, str.______s____FAILED____t_d__n
call fcn.140002160
mov eax, 0xffffffff
jmp 0x1400029ec