Function at 0x140015660
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov dword [rax + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x480
mov r15d, r8d
mov r13, rdx
mov rbx, rcx
test rcx, rcx
je 0x140015f21
test rdx, rdx
je 0x140015f21
mov dword [rcx + 0x18], 0
xor ecx, ecx
movsxd rsi, dword [rdx + 0x3c]
add rsi, rdx
xor edx, edx
movzx r8d, word [rsi + 6]
cmp r8d, 8
jb 0x140015846
cmp dword [0x1400177d8], 2
jl 0x140015846
movaps xmmword [rax - 0x48], xmm6
mov edx, r8d
movaps xmmword [rax - 0x58], xmm7
xorps xmm6, xmm6
movaps xmmword [rax - 0x68], xmm8
xorps xmm7, xmm7
movaps xmmword [rax - 0x78], xmm9
xorps xmm8, xmm8
movdqa xmm9, xmmword [0x140011080]
mov eax, 0xfffffff8
and rdx, rax
lea rax, [rsi + 0x164]
xor r9d, r9d
movd xmm1, dword [rax + 0x28]
add ecx, 8
movd xmm0, dword [rax - 0x28]
add r9, 8
movd xmm2, dword [rax]
movd xmm4, dword [rax - 0x50]
movd xmm3, dword [rax - 0x4c]
lea rax, [rax + 0x140]
punpckldq xmm4, xmm0
movd xmm0, dword [rax - 0x164]
punpckldq xmm3, xmm0
movdqa xmm0, xmm6
punpckldq xmm2, xmm1
movd xmm1, dword [rax - 0x114]
punpcklqdq xmm4, xmm2
movd xmm2, dword [rax - 0x13c]
movdqa xmm5, xmm4
punpckldq xmm2, xmm1
pcmpeqd xmm5, xmm8
movd xmm1, dword [rax - 0x78]
andnps xmm5, xmm9
punpcklqdq xmm3, xmm2
movd xmm2, dword [rax - 0xa0]
paddd xmm3, xmm4
movd xmm4, dword [rax - 0xf0]
pmaxud xmm0, xmm3
movd xmm3, dword [rax - 0xec]
andps xmm0, xmm5
punpckldq xmm2, xmm1
andnps xmm5, xmm6
movd xmm1, dword [rax - 0x74]
movdqa xmm6, xmm0
movd xmm0, dword [rax - 0xc8]
orps xmm6, xmm5
punpckldq xmm4, xmm0
movd xmm0, dword [rax - 0xc4]
punpckldq xmm3, xmm0
movdqa xmm0, xmm7
punpcklqdq xmm4, xmm2
movd xmm2, dword [rax - 0x9c]
movdqa xmm5, xmm4
punpckldq xmm2, xmm1
pcmpeqd xmm5, xmm8
punpcklqdq xmm3, xmm2
andnps xmm5, xmm9
paddd xmm3, xmm4
pmaxud xmm0, xmm3
andps xmm0, xmm5
andnps xmm5, xmm7
movdqa xmm7, xmm0
orps xmm7, xmm5
cmp r9, rdx
jl 0x140015700
movaps xmm9, xmmword [rsp + 0x440]
pmaxud xmm6, xmm7
movaps xmm8, xmmword [rsp + 0x450]
movdqa xmm0, xmm6
movaps xmm7, xmmword [rsp + 0x460]
psrldq xmm0, 8
pmaxud xmm6, xmm0
movdqa xmm0, xmm6
psrldq xmm0, 4
pmaxud xmm6, xmm0
movd edx, xmm6
movaps xmm6, xmmword [rsp + 0x470]
movsxd rcx, ecx
mov rbp, r8
mov qword [rsp + 0x4d8], r8
cmp rcx, r8
jge 0x14001588a
lea r8, [rcx + 7]
mov r9, rbp
lea r8, [r8 + r8*4]
sub r9, rcx
lea r8, [rsi + r8*8]
nop dword [rax + rax]
mov ecx, dword [r8 - 4]
test ecx, ecx
je 0x140015880
add ecx, dword [r8]
cmp edx, ecx
cmovb edx, ecx
add r8, 0x28
sub r9, 1
jne 0x140015870
mov rax, qword [0x1400177b8]
mov r14d, 0x3000
mov rcx, qword [rsi + 0x30]
mov r8d, r14d
mov r9d, 4
mov edi, edx
call rax
mov r12, rax
test rax, rax
jne 0x1400158d1
mov rax, qword [0x1400177b8]
lea r9d, [r12 + 4]
mov r8d, r14d
mov edx, edi
xor ecx, ecx
call rax
mov r12, rax
test rax, rax
je 0x140015f1a
mov rax, qword [0x1400177b8]
mov r9d, 4
mov edx, dword [rsi + 0x54]
mov r8d, 0x1000
mov rcx, r12
call rax
mov rdi, rax
test rax, rax
je 0x140015f1a
mov r8d, dword [rsi + 0x54]
mov rdx, r13
mov rcx, rax
call fcn.140015f40
mov qword [rbx], rdi
mov ecx, dword [rsi + 0x50]
mov dword [rbx + 8], ecx
mov dword [rbx + 0x14], 1
movsxd rdx, dword [rdi + 0x3c]
add rdx, rdi
mov qword [rsp + 0x4c0], rdx
test rbp, rbp
je 0x1400159c7
xor r15d, r15d
lea rsi, [rdx + 0x118]
nop dword [rax]
mov eax, dword [rsi - 4]
test eax, eax
je 0x1400159ad
mov ecx, dword [rsi]
lea r14, [r12 + rax]
test ecx, ecx
jne 0x140015a50
mov ebp, dword [rsi - 8]
test ebp, ebp
jne 0x140015967
mov ebp, dword [rdx + 0x38]
test ebp, ebp
je 0x140015ae5
mov rax, qword [0x1400177b8]
mov r9d, 4
mov edx, ebp
mov r8d, 0x1000
mov rcx, r14
call rax
mov rdi, rax
test rax, rax
je 0x140015f1a
mov r8d, ebp
xor edx, edx
mov rcx, r14
call fcn.140015fa4
mov rbp, qword [rsp + 0x4d8]
mov rdx, qword [rsp + 0x4c0]
mov dword [rsi - 8], edi
inc r15
add rsi, 0x28
cmp r15, rbp
jl 0x140015940
mov r15d, dword [rsp + 0x4d0]
mov r14d, 0x3000
mov rax, qword [rbx]
test rax, rax
je 0x140015a11
movsxd rcx, dword [rax + 0x3c]
mov r9, rax
sub r9, qword [rcx + rax + 0x30]
je 0x140015b99
mov edx, dword [rcx + rax + 0xb0]
test edx, edx
je 0x140015b99
cmp dword [rcx + rax + 0xb4], 0
je 0x140015b99
mov r8d, edx
add r8, rax
jne 0x140015af2
mov dword [rbx + 0x18], 3
cmp dword [rbx + 0x14], 0
je 0x140015f21
mov rcx, rax
test rax, rax
je 0x140015f21
xor edx, edx
mov r8d, 0x8000
call qword [0x1400177c0]
mov qword [rbx], 0
mov qword [rbx + 8], 0
mov dword [rbx + 0x14], 0
jmp 0x140015f21
mov rax, qword [0x1400177b8]
mov rdx, rcx
mov rcx, r14
mov r9d, 4
mov r8d, 0x1000
call rax
mov rdi, rax
test rax, rax
je 0x140015f1a
mov r8d, dword [rsi + 4]
mov ecx, dword [rsi]
add r8, r13
cmp r8, rax
jae 0x140015ab8
dec r8
lea rdx, [rcx - 1]
add rdx, rax
add r8, rcx
test ecx, ecx
je 0x1400159a2
nop word [rax + rax]
movzx eax, byte [r8]
lea r8, [r8 - 1]
mov byte [rdx], al
lea rdx, [rdx - 1]
add ecx, 0xffffffff
jne 0x140015aa0
jmp 0x1400159a2
jbe 0x1400159a2
mov rdx, rax
test ecx, ecx
je 0x1400159a2
sub r8, rax
nop dword [rax]
movzx eax, byte [r8 + rdx]
mov byte [rdx], al
lea rdx, [rdx + 1]
add ecx, 0xffffffff
jne 0x140015ad0
jmp 0x1400159a2
mov rbp, qword [rsp + 0x4d8]
jmp 0x1400159aa
mov ecx, dword [r8]
mov r10d, dword [r8 + 4]
add ecx, r10d
je 0x140015b99
mov edi, 0xa000
mov r11d, 0xf000
xor r12d, r12d
mov eax, r10d
mov rdx, r12
sub rax, 8
shr rax, 1
movsxd r10, eax
test eax, eax
jle 0x140015b80
nop dword [rax]
nop dword [rax + rax]
movzx ecx, word [r8 + rdx*2 + 8]
movzx eax, cx
and ax, r11w
cmp r14w, ax
jne 0x140015b55
mov eax, dword [r8]
and ecx, 0xfff
add rcx, rax
add rcx, qword [rbx]
add dword [rcx], r9d
movzx eax, word [r8 + rdx*2 + 8]
movzx ecx, ax
and cx, r11w
cmp di, cx
jne 0x140015b78
mov ecx, dword [r8]
and eax, 0xfff
add rax, rcx
add rax, qword [rbx]
add qword [rax], r9
inc rdx
cmp rdx, r10
jl 0x140015b30
mov eax, dword [r8 + 4]
add r8, rax
mov ecx, dword [r8]
mov r10d, dword [r8 + 4]
add ecx, r10d
jne 0x140015b10
jmp 0x140015b9c
xor r12d, r12d
mov rax, qword [rbx]
test rax, rax
je 0x140015ed9
movsxd rcx, dword [rax + 0x3c]
mov edx, dword [rcx + rax + 0x90]
test edx, edx
je 0x140015c85
cmp dword [rcx + rax + 0x94], 0
je 0x140015c85
cmp dword [rax + rdx + 0xc], 0
lea r14, [rax + rdx]
je 0x140015c85
nop dword [rax + rax]
mov edi, dword [r14 + 0xc]
add rdi, qword [rbx]
mov rax, qword [0x140017780]
mov rcx, rdi
call rax
mov rbp, rax
test rax, rax
jne 0x140015c13
mov rax, qword [0x140017788]
mov rcx, rdi
call rax
mov rbp, rax
test rax, rax
je 0x140015df3
mov ecx, dword [r14]
mov rax, qword [rbx]
test ecx, ecx
je 0x140015c23
lea rdi, [rax + rcx]
jmp 0x140015c2a
mov edi, dword [r14 + 0x10]
add rdi, rax
mov esi, dword [r14 + 0x10]
mov rcx, qword [rdi]
add rsi, rax
test rcx, rcx
je 0x140015c76
jns 0x140015c4c
mov rax, qword [0x140017790]
movzx edx, cx
mov rcx, rbp
call rax
jmp 0x140015c63
mov rdx, qword [rbx]
mov r8, qword [0x140017790]
add rdx, 2
add rdx, rcx
mov rcx, rbp
call r8
add rdi, 8
mov qword [rsi], rax
add rsi, 8
mov rcx, qword [rdi]
test rcx, rcx
jne 0x140015c39
add r14, 0x14
cmp dword [r14 + 0xc], 0
jne 0x140015be0
mov r8d, dword [rbx + 8]
lea r10, [rsp + 0x40]
mov r11, qword [rbx]
mov r9d, r12d
nop dword [rax]
nop dword [rax + rax]
mov ecx, r9d
lea r10, [r10 + 4]
shl ecx, 0x18
lea eax, [rcx + rcx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [rdx + rdx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [rcx + rcx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [rdx + rdx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [rcx + rcx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [rdx + rdx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [rcx + rcx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea ecx, [rdx + rdx]
mov eax, ecx
xor eax, 0x4c10db7
test edx, edx
cmovns eax, ecx
inc r9d
mov dword [r10 - 4], eax
cmp r9d, 0x100
jl 0x140015ca0
mov edx, r12d
mov r9, r11
test r8d, r8d
je 0x140015d6e
nop dword [rax + rax]
movzx eax, byte [r9]
lea r9, [r9 + 1]
mov ecx, edx
shr rcx, 0x18
xor rcx, rax
shl edx, 8
xor edx, dword [rsp + rcx*4 + 0x40]
add r8d, 0xffffffff
jne 0x140015d50
movdqa xmm0, xmmword [0x140011060]
mov rbp, r11
movdqa xmm1, xmmword [0x140011070]
movabs rax, 0xffffffff00000000
mov dword [rbx + 0xc], edx
and rbp, rax
movsxd rdi, dword [r11 + 0x3c]
add rdi, r11
movdqu xmmword [rsp + 0x20], xmm0
movdqu xmmword [rsp + 0x30], xmm1
movzx r14d, word [rdi + 6]
test r14, r14
je 0x140015e62
mov rsi, r12
add rdi, 0x118
nop dword [rax]
mov r11d, dword [rdi - 8]
mov eax, dword [rdi]
or r11, rbp
mov dword [rsp + 0x4c0], r12d
test eax, eax
je 0x140015e52
mov r9d, dword [rdi + 0x14]
mov edx, eax
bt r9d, 0x19
jae 0x140015dff
mov r8d, 0x4000
mov rcx, r11
call qword [0x1400177c0]
jmp 0x140015e52
mov dword [rbx + 0x18], 4
jmp 0x140015ed9
mov r10, qword [0x140017798]
mov ecx, r9d
shr rcx, 0x1d
mov eax, r9d
shr rax, 0x1b
and ecx, 2
and eax, 4
add rcx, rax
mov rax, r9
shr rax, 0x1f
add rcx, rax
mov eax, dword [rsp + rcx*4 + 0x20]
mov r8d, eax
bts r8d, 9
mov rcx, r11
bt r9d, 0x1a
lea r9, [rsp + 0x4c0]
cmovae r8d, eax
call r10
test eax, eax
je 0x140015ed2
inc rsi
add rdi, 0x28
cmp rsi, r14
jl 0x140015dc0
mov rdi, qword [rbx]
test rdi, rdi
je 0x140015f21
movsxd rax, dword [rdi + 0x3c]
mov ecx, dword [rax + rdi + 0xd0]
test ecx, ecx
je 0x140015ea9
mov rdi, qword [rcx + rdi + 0x18]
test rdi, rdi
je 0x140015ea9
mov rax, qword [rdi]
test rax, rax
je 0x140015ea9
nop
mov rcx, qword [rbx]
xor r8d, r8d
lea edx, [r8 + 1]
call rax
mov rax, qword [rdi + 8]
lea rdi, [rdi + 8]
test rax, rax
jne 0x140015e90
test r15d, r15d
je 0x140015f13
mov rcx, qword [rbx]
test rcx, rcx
je 0x140015ed9
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x140015ed9
mov eax, edx
add rax, rcx
jne 0x140015f06
mov dword [rbx + 0x18], 6
jmp 0x140015ed9
mov dword [rbx + 0x18], 5
cmp dword [rbx + 0x14], 0
je 0x140015f21
mov rcx, qword [rbx]
test rcx, rcx
je 0x140015f21
xor edx, edx
mov r8d, 0x8000
call qword [0x1400177c0]
mov qword [rbx], r12
mov qword [rbx + 8], 0
mov dword [rbx + 0x14], r12d
jmp 0x140015f21
xor r8d, r8d
lea edx, [r8 + 1]
call rax
test eax, eax
je 0x140015ed9
mov eax, 1
jmp 0x140015f23
mov dword [rbx + 0x18], 2
xor eax, eax
mov rbx, qword [rsp + 0x4c8]
add rsp, 0x480
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret