Function at 0x1400512d0
Capabilities:
Encode data using xor
Hash data using sha512

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x18], r8
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0xf0
movsx rbx, word [rbp + 0x77]
mov eax, 1
mov qword [rbp - 0x19], rcx
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
movsx eax, word [rbp + 0x7f]
lea eax, [rax + rax*2]
xor r14d, r14d
mov ecx, 0x40
shl eax, 2
cmp word [rbp + 0x7f], 4
mov rdi, rbx
movsxd rsi, eax
mov eax, 8
movsxd r15, r9d
cmove ecx, eax
mov qword [rbp - 0x21], rdx
mov r12d, r14d
mov qword [rsp + 0x38], rcx
mov qword [rbp - 1], 2
imul rdi, rsi
shl rdi, 3
mov rcx, rdi
call qword [sym.imp.MSVCR120.dll_malloc]
mov qword [rsp + 0x30], rax
test rax, rax
jne 0x140051368
or eax, 0xffffffff
jmp 0x1400517fc
mov r8, rdi
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x120], r13
call sub.MSVCR120.dll_memset
lea rcx, [rbx*8]
call qword [sym.imp.MSVCR120.dll_malloc]
mov r13, rax
test rax, rax
jne 0x14005139b
or eax, 0xffffffff
jmp 0x1400517f4
mov r9, qword [rsp + 0x30]
mov rax, r14
mov rcx, r9
test rbx, rbx
jle 0x1400513d0
lea rdx, [rsi*8]
nop dword [rax]
nop word [rax + rax]
mov qword [r13 + rax*8], rcx
inc rax
add rcx, rdx
cmp rax, rbx
jl 0x1400513c0
movsxd rbx, dword [rbp + 0x67]
mov rdx, qword [rbp + 0x4f]
mov r8, r15
lea eax, [r15 + rbx]
mov rcx, r9
mov rsi, r15
movsxd rdi, eax
lea r14, [rdi + 0x30]
shr r14, 6
inc r14
mov qword [rbp + 7], r14
call sub.MSVCR120.dll_memcpy
mov r15, qword [rsp + 0x30]
mov rdx, qword [rbp + 0x5f]
add r15, rsi
mov r8, rbx
mov rcx, r15
call sub.MSVCR120.dll_memcpy
shl r14, 6
add r15, rbx
mov r8, r14
xor edx, edx
mov rcx, r15
sub r8, rdi
call sub.MSVCR120.dll_memset
mov rax, qword [rbp - 0x21]
mov qword [r15], rax
mov rax, qword [rbp + 0x6f]
mov qword [r15 + 8], rsi
movsx rsi, word [rbp + 0x77]
mov qword [r15 + 0x10], rbx
mov rbx, qword [rsp + 0x30]
mov qword [r15 + 0x18], rax
movsx rax, word [rbp + 0x7f]
mov qword [r15 + 0x20], rsi
mov qword [r15 + 0x28], rax
xor eax, eax
mov byte [r15 + 0x30], 0x80
xor byte [r14 + rbx - 1], 1
movabs r14, 0x6a09e667f3bcc908
mov qword [rsp + 0x40], rax
mov qword [rbp - 0x61], r14
movabs r14, 0xbb67ae8584caa73b
mov ecx, eax
mov qword [rbp - 0x59], r14
movabs r14, 0x3c6ef372fe94f82b
mov qword [rsp + 0x48], rax
mov qword [rbp - 0x51], r14
movabs r14, 0xa54ff53a5f1d36f1
mov edx, eax
mov qword [rbp - 0x49], r14
movabs r14, 0x510e527fade682d1
mov qword [rsp + 0x50], rax
mov qword [rbp - 0x41], r14
movabs r14, 0x9b05688c2b3e6c1f
mov r8d, eax
mov qword [rbp - 0x39], r14
movabs r14, 0x1f83d9abfb41bd6b
mov qword [rsp + 0x58], rax
mov qword [rbp - 0x31], r14
movabs r14, 0x5be0cd19137e2179
mov r9d, eax
mov qword [rbp - 0x29], r14
mov r14, qword [rbp + 7]
mov qword [rsp + 0x60], rax
mov r10d, eax
mov qword [rbp - 0x79], rax
mov r11d, eax
mov qword [rbp - 0x71], rax
mov edi, eax
mov qword [rbp - 0x69], rax
test r14, r14
jle 0x1400515ad
mov r15, qword [rsp + 0x38]
lea r15, [r15*8]
nop word [rax + rax]
xor rcx, qword [rbx + 8]
xor rax, qword [rbx]
xor rdx, qword [rbx + 0x10]
xor r8, qword [rbx + 0x18]
xor r9, qword [rbx + 0x20]
xor r10, qword [rbx + 0x28]
xor r11, qword [rbx + 0x30]
xor rdi, qword [rbx + 0x38]
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x60], r9
mov qword [rbp - 0x79], r10
mov qword [rbp - 0x71], r11
mov qword [rbp - 0x69], rdi
call fcn.140038aa0
add rbx, r15
dec r14
je 0x1400515ad
mov rdi, qword [rbp - 0x69]
mov r11, qword [rbp - 0x71]
mov r10, qword [rbp - 0x79]
mov r9, qword [rsp + 0x60]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x40]
jmp 0x140051530
movsx r14d, word [rbp + 0x7f]
mov rdx, qword [r13]
lea rcx, [rsp + 0x40]
mov r8d, r14d
call fcn.14003a460
mov r8, qword [r13 + 8]
mov rdx, qword [r13]
lea rcx, [rsp + 0x40]
mov r9d, r14d
call fcn.14003a7a0
mov edi, 2
lea eax, [rdi + 6]
mov r8, qword [r13 + r12*8]
mov rdx, qword [rax + r13]
lea rbx, [rdi*8]
mov r9, qword [rbx + r13]
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x20], r14d
call fcn.14003a930
add r12, qword [rbp - 0x11]
mov rdx, qword [rbp - 1]
lea rax, [rdx - 1]
mov rcx, rdi
inc rdi
and r12, rax
mov rax, rbx
test r12, r12
jne 0x14005163e
mov rax, qword [rbp - 9]
lea r10, [rax + rdx]
add rdx, rdx
neg rax
mov qword [rbp - 9], rax
mov rax, rbx
mov qword [rbp - 0x11], r10
mov qword [rbp - 1], rdx
cmp rdi, rsi
jl 0x1400515e0
xor r9d, r9d
mov r15d, 1
mov ebx, r9d
cmp r15, qword [rbp + 0x6f]
jg 0x1400516c0
movsx edx, word [rbp + 0x77]
mov dword [rbp + 0x7f], edx
lea edi, [rdx - 1]
nop
test r15b, 1
jne 0x14005166b
or eax, 0xffffffff
jmp 0x140051674
mov eax, edx
cdq
sub eax, edx
sar eax, 1
dec eax
movsxd rsi, eax
nop word [rax + rax]
mov r12, qword [rsp + 0x40]
mov rdx, qword [r13 + rcx*8]
mov r9, qword [r13 + rbx*8]
and r12, rdi
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x20], r14d
mov r8, qword [r13 + r12*8]
call fcn.14003ac70
mov rcx, rbx
add rbx, rsi
and rbx, rdi
jne 0x140051680
mov edx, dword [rbp + 0x7f]
inc r15
cmp r15, qword [rbp + 0x6f]
jle 0x140051660
xor r9d, r9d
mov r8, qword [r13 + r12*8]
lea rcx, [rsp + 0x40]
lea rax, [r8 + 0x58]
cmp rcx, rax
ja 0x1400516dc
lea rax, [rbp - 0x49]
cmp rax, r8
jae 0x140051730
lea rcx, [rsp + 0x50]
mov rdx, r8
lea rax, [rsp + 0x50]
sub rdx, rcx
mov ecx, 3
lea r9d, [rcx + 9]
nop word [rax + rax]
movdqu xmm0, xmmword [rax - 0x10]
movdqu xmm1, xmmword [rdx + rax]
movdqu xmm2, xmmword [rdx + rax + 0x10]
lea rax, [rax + 0x20]
pxor xmm1, xmm0
movdqu xmmword [rax - 0x30], xmm1
movdqu xmm0, xmmword [rax - 0x20]
pxor xmm2, xmm0
movdqu xmmword [rax - 0x20], xmm2
dec rcx
jne 0x140051700
movsxd rdx, r9d
cmp rdx, 0xc
jge 0x140051758
lea rax, [rsp + 0x40]
sub r8, rax
lea rax, [r8 + rdx*8]
inc rdx
mov rcx, qword [rsp + rax + 0x40]
xor qword [rsp + rdx*8 + 0x38], rcx
cmp rdx, 0xc
jl 0x140051741
lea rcx, [rsp + 0x40]
call fcn.140038aa0
mov r14, qword [rbp - 0x21]
mov rbx, qword [rbp - 0x19]
mov eax, 0xaaaaaaab
mul r14d
mov esi, edx
shr esi, 6
test esi, esi
jle 0x1400517c5
mov edi, esi
nop dword [rax]
movaps xmm0, xmmword [rsp + 0x40]
movaps xmm1, xmmword [rsp + 0x50]
lea rcx, [rsp + 0x40]
movups xmmword [rbx], xmm0
movups xmmword [rbx + 0x10], xmm1
movaps xmm0, xmmword [rsp + 0x60]
movaps xmm1, xmmword [rbp - 0x71]
movups xmmword [rbx + 0x20], xmm0
movups xmmword [rbx + 0x30], xmm1
movaps xmm0, xmmword [rbp - 0x61]
movaps xmm1, xmmword [rbp - 0x51]
movups xmmword [rbx + 0x40], xmm0
movups xmmword [rbx + 0x50], xmm1
call fcn.140038aa0
add rbx, 0x60
dec rdi
jne 0x140051780
lea eax, [rsi + rsi*2]
lea rdx, [rsp + 0x40]
mov rcx, rbx
shl eax, 5
sub r14d, eax
mov r8d, r14d
call sub.MSVCR120.dll_memcpy
mov rcx, r13
call qword [sym.imp.MSVCR120.dll_free]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.MSVCR120.dll_free]
xor eax, eax
mov r13, qword [rsp + 0x120]
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret