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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x140079040]
xor rax, rsp
mov qword [rbp], rax
mov r14, rcx
xor r15d, r15d
mov dword [rbp - 0x40], 0x1a066ee5
mov dword [rbp - 0x3c], 0x23a80181
mov dword [rbp - 0x38], 0x7b0075c8
mov rax, qword gs:[0x58]
mov rdi, qword [rax]
mov ecx, 0x1b0
mov eax, dword [rcx + rdi]
mov ebx, 0x140
test al, 1
jne 0x140005099
or eax, 1
mov dword [rcx + rdi], eax
mov byte [rdi + rbx + 0xc], 1
movsd xmm0, qword [rbp - 0x40]
movsd qword [rdi + rbx], xmm0
mov eax, dword [rbp - 0x38]
mov dword [rdi + rbx + 8], eax
lea rcx, [0x140043f30]
call fcn.140020fc8
nop
lea r9, [rdi + rbx]
cmp byte [r9 + 0xc], r15b
je 0x1400050cd
mov r8, r15
mov cl, r8b
and cl, 7
shl cl, 3
movabs rdx, 0x57fb21ed7b6501a9
shr rdx, cl
xor byte [r8 + r9], dl
inc r8
cmp r8, 0xc
jb 0x1400050a6
mov byte [r9 + 0xc], r15b
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], r15
or r8, 0xffffffffffffffff
inc r8
cmp byte [r9 + r8], r15b
jne 0x1400050e3
mov rdx, r9
lea rcx, [rsp + 0x50]
call fcn.14000bbe8
nop
mov rdx, qword [r14 + 0x10]
add rdx, 0x104
lea rax, [0x14006d134]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 5
lea rax, [rsp + 0x70]
mov r8d, 2
mov ecx, r8d
mov qword [rax], r15
lea rax, [rax + 8]
sub rcx, 1
jne 0x140005128
mov qword [rbp - 0x80], rdx
movabs rax, 0xb000000000000000
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x50]
cmp qword [rsp + 0x68], 0xf
cmova rax, qword [rsp + 0x50]
mov qword [rbp - 0x40], rax
mov rax, qword [rsp + 0x60]
mov qword [rbp - 0x38], rax
movups xmm0, xmmword [rbp - 0x40]
movdqu xmmword [rbp - 0x78], xmm0
movabs rax, 0xc000000000000008
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x40], r8
lea rax, [rsp + 0x70]
mov qword [rbp - 0x38], rax
movaps xmm0, xmmword [rbp - 0x40]
movdqa xmmword [rbp - 0x40], xmm0
movaps xmm1, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm1
lea r8, [rbp - 0x40]
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x20]
call fcn.140010da4
nop
mov r13d, 0x1000
mov rdx, qword [rsp + 0x68]
cmp rdx, 0xf
jbe 0x1400051f1
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, r13
jb 0x1400051ec
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400053bf
call fcn.140020dd0
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 0xf
mov byte [rsp + 0x50], r15b
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x40]
call fcn.14000b430
nop
lea rcx, [rbp - 0x40]
call fcn.1400040e8
mov bl, al
lea rcx, [rbp - 0x40]
call fcn.140009704
test bl, bl
je 0x1400052cb
lea rcx, [rbp - 0x20]
cmp qword [rbp - 8], 0xf
cmova rcx, qword [rbp - 0x20]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], pe_nt_image_headers64
mov r8d, 3
mov dword [rsp + 0x20], r8d
xor r9d, r9d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
test rax, rax
je 0x1400052cb
mov qword [rbp - 0x50], r15
lea rdx, [rbp - 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400052cb
mov rbx, qword [rbp - 0x50]
lea rcx, [rbx + 1]
call fcn.140020eec
mov rdi, rax
lea r8, [rbx + 1]
xor edx, edx
mov rcx, rax
call fcn.140041f10
mov qword [rbp - 0x40], rdi
mov dword [rbp - 0x48], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x48]
mov r8d, dword [rbp - 0x50]
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14000532c
mov rcx, rdi
call fcn.140020dd0
nop
mov rdx, qword [rbp - 8]
cmp rdx, 0xf
jbe 0x140005302
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, r13
jb 0x1400052fd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400053b9
call fcn.140020dd0
xor eax, eax
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.140020db0
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret
mov eax, dword [rbp - 0x48]
mov byte [rdi + rax], r15b
mov qword [rbp - 0x58], r15
mov qword [rsp + 0x40], rdi
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.14000b558
mov dl, byte [r14]
mov cl, byte [rax]
mov byte [r14], cl
mov byte [rax], dl
lea rcx, [rax + 8]
mov rdx, qword [r14 + 8]
mov r8, qword [rcx]
mov qword [r14 + 8], r8
mov qword [rcx], rdx
mov dl, byte [rax]
call fcn.140009d64
nop
mov rcx, rdi
call fcn.140020dd0
nop
mov rdx, qword [rbp - 8]
cmp rdx, 0xf
jbe 0x140005304
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, r13
jb 0x1400053af
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400053b9
call fcn.140020dd0
jmp 0x140005304
call fcn.14002e0c8
nop
call fcn.14002e0c8
int3