Function at 0x140027070
Capabilities:
Encode data using xor
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x68]
sub rsp, 0x168
mov rax, qword [0x14004f068]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov rdi, qword [rcx]
xorps xmm0, xmm0
xorps xmm1, xmm1
mov qword [rbp - 0x80], rcx
mov r11, r8
mov qword [rbp - 0x78], rdx
xor r8d, r8d
mov r15, rcx
mov ecx, 0x1000
mov ebx, r8d
mov r14, r9
mov dword [rsp + 0x64], ebx
mov r12, rdx
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm1
movups xmmword [rbp], xmm1
movups xmmword [rbp + 0x10], xmm1
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x50], xmm0
cmp dword [rdx], ecx
jb 0x14002712f
mov esi, dword [rdi + 0x28]
lea r10d, [rsi + 0x1000]
cmp r10d, ecx
jb 0x14002712f
mov rcx, rdi
call fcn.140031c54
xor r8d, r8d
mov r13d, 0x7f
test al, al
je 0x1400271cd
mov rax, qword [rdi + 0xc]
mov qword [rsp + 0x68], rax
mov eax, dword [rdi + 8]
mov byte [rsp + 0x60], 1
cmp dword [rdi + 4], eax
jne 0x140027242
cmp r10d, dword [r12]
jbe 0x14002749c
mov ebx, 0x3f1
mov r12d, 1
mov r15d, 2
lea rdi, [rbp - 0x40]
mov esi, r15d
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002715e
call qword [sym.imp.msvcrt.dll__aligned_free]
nop dword [rax + rax]
xor r8d, r8d
add rdi, 0x10
sub rsi, r12
jne 0x140027147
lea rdi, [rbp - 0x20]
mov rsi, r15
mov rcx, qword [rdi]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140027180
call fcn.140028788
add rdi, 8
sub rsi, r12
jne 0x14002716e
lea rdi, [rbp - 0x50]
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400271a1
call qword [sym.imp.msvcrt.dll__aligned_free]
nop dword [rax + rax]
add rdi, 8
sub r15, r12
jne 0x14002718d
mov eax, ebx
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.140030000
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov byte [rsp + 0x60], r8b
mov esi, r8d
mov eax, r8d
mov rcx, rdi
mov rdx, r13
mov r9d, 1
xor eax, dword [rcx]
lea rcx, [rcx + 4]
sub rdx, r9
jne 0x1400271e4
mov ecx, 0xffffffff
cmp eax, ecx
mov ecx, 0xfffffffe
cmove eax, ecx
test eax, eax
cmove eax, r9d
cmp eax, dword [rdi + 0x1fc]
je 0x140027239
cmp dword [r12], 0x1020
jae 0x140027223
mov ebx, 0x3f1
mov r12, r9
jmp 0x14002713a
cmp dword [r15 + 0x1000], 0x6e696268
jne 0x140027216
mov rax, qword [r15 + 0x1014]
jmp 0x14002723d
mov rax, qword [rdi + 0xc]
mov qword [rsp + 0x68], rax
lea r8, [rbp - 0x50]
mov rdx, r11
mov rcx, r14
call fcn.1400275a8
xor r8d, r8d
mov ebx, eax
test eax, eax
jne 0x140027134
lea rax, [rbp - 0x50]
mov r15d, r8d
mov qword [rsp + 0x78], rax
mov r14d, r8d
mov rcx, qword [rax]
lea r12, [rbp - 0x20]
mov edx, 1
mov r13d, r15d
lea r12, [r12 + r13*8]
mov r9, r12
lea r8d, [rdx + 2]
call fcn.14002872c
mov ebx, eax
cmp eax, 2
je 0x1400273ce
xor r8d, r8d
test eax, eax
jne 0x140027134
mov rax, qword [r12]
lea rdx, [rsp + 0x70]
mov rcx, rax
mov qword [rbp - 0x60], rax
mov ebx, r8d
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSizeEx]
nop dword [rax + rax]
xor r8d, r8d
test eax, eax
jne 0x1400272d9
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
xor r8d, r8d
test ebx, ebx
jne 0x140027134
mov rax, qword [rsp + 0x70]
lea rbx, [rbp - 0x40]
mov ecx, 0xffffffff
mov r12, r13
cmp rax, rcx
cmovg rax, rcx
shl r12, 4
add rbx, r12
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x58], rbx
mov dword [rbp + r12 - 0x38], eax
test eax, eax
je 0x140027397
mov eax, eax
mov edx, 0x10
mov ecx, eax
mov qword [rbp - 0x68], rax
call qword [sym.imp.msvcrt.dll__aligned_malloc]
nop dword [rax + rax]
xor r8d, r8d
mov qword [rbx], rax
test rax, rax
je 0x140027401
mov r8, qword [rbp - 0x68]
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov r8d, dword [rbp + r12 - 0x38]
lea r9, [rbp - 0x70]
mov rdx, qword [rbp + r12 - 0x40]
xor eax, eax
mov rcx, qword [rbp - 0x60]
mov ebx, eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
nop dword [rax + rax]
xor r8d, r8d
test eax, eax
jne 0x14002738b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
xor r8d, r8d
test ebx, ebx
jne 0x140027134
mov rbx, qword [rbp - 0x58]
lea rax, [fcn.140027860]
mov r12d, 1
lea rdx, [r13*2]
add rdx, r13
mov qword [rbp + rdx*8 - 8], rax
mov eax, r14d
neg eax
mov qword [rbp + rdx*8], rbx
sbb ecx, ecx
neg ecx
add ecx, 4
mov dword [rbp + rdx*8 - 0x10], ecx
add r15d, r12d
jmp 0x1400273d4
mov r12d, 1
mov rax, qword [rsp + 0x78]
add r14d, r12d
add rax, 8
mov qword [rsp + 0x78], rax
cmp r14d, 2
jb 0x14002726d
xor r8d, r8d
test r15d, r15d
jne 0x14002740b
mov ebx, 0x3f1
jmp 0x14002713a
mov ebx, 0xe
jmp 0x140027134
mov cl, byte [rsp + 0x60]
mov edx, r8d
test cl, cl
je 0x140027419
mov edx, dword [rdi + 8]
test cl, cl
mov rax, rdi
mov r9d, r15d
cmovne rax, r8
xor cl, r12b
mov qword [rsp + 0x38], rax
mov r8b, cl
lea rax, [rbp + 0x20]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x68]
lea rax, [rsp + 0x64]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
call fcn.140031008
xor r8d, r8d
test eax, eax
jns 0x14002746e
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
mov ebx, eax
xor r8d, r8d
jmp 0x14002713a
mov ebx, dword [rsp + 0x64]
test ebx, ebx
je 0x14002748e
lea rcx, [rbp + 0x30]
mov edx, ebx
mov eax, dword [rcx]
cmp esi, eax
lea rcx, [rcx + 0x18]
cmovae eax, esi
mov esi, eax
sub rdx, r12
jne 0x14002747c
mov r12, qword [rbp - 0x78]
mov r13d, 0x7f
mov r15, qword [rbp - 0x80]
add esi, 0x1000
cmp dword [r12], esi
jae 0x140027507
mov edx, 0x10
mov ecx, esi
mov r14d, esi
call qword [sym.imp.msvcrt.dll__aligned_malloc]
nop dword [rax + rax]
xor r8d, r8d
mov rdi, rax
test rax, rax
je 0x140027401
mov r8d, r14d
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov r8d, dword [r12]
mov rcx, rdi
mov rdx, qword [r15]
call sub.msvcrt.dll_memcpy
mov rcx, qword [r15]
test rcx, rcx
je 0x1400274fd
call qword [sym.imp.msvcrt.dll__aligned_free]
nop dword [rax + rax]
mov qword [r15], rdi
xor r8d, r8d
mov dword [r12], esi
mov r12d, 1
test ebx, ebx
je 0x14002759a
mov eax, dword [rbp + 0x28]
mov esi, r8d
mov dword [rsp + 0x64], eax
mov eax, esi
lea r8, [rbp + 0x20]
lea rcx, [rax + rax*2]
lea r8, [r8 + rcx*8]
mov eax, dword [r8]
lea rcx, [rbp - 0x40]
shl rax, 4
add rcx, rax
lea rax, [rsp + 0x64]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x20], rcx
mov rcx, qword [r15]
call fcn.140031764
xor r8d, r8d
test eax, eax
js 0x14002745d
add esi, r12d
cmp esi, ebx
jb 0x14002751f
mov eax, dword [rsp + 0x64]
mov rcx, rdi
mov dword [rdi + 4], eax
mov dword [rdi + 8], eax
mov eax, r8d
xor eax, dword [rcx]
lea rcx, [rcx + 4]
sub r13, r12
jne 0x140027574
mov ecx, 0xffffffff
cmp eax, ecx
mov ecx, 0xfffffffe
cmove eax, ecx
test eax, eax
cmove eax, r12d
mov dword [rdi + 0x1fc], eax
mov ebx, r8d
jmp 0x14002713a