Function at 0x140215400
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x198
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x110], 0xfffffffffffffffe
mov qword [rbp + 0xb8], r8
cmp rdx, 0x15
jae 0x140215465
mov rsi, rdx
mov r14, rcx
cmp rsi, 1
jbe 0x140215450
mov r8d, 1
mov rcx, r14
mov rdx, rsi
call fcn.1402150c0
nop
add rsp, 0x198
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r15, r9
mov qword [rbp + 0xd8], rdx
mov qword [rbp + 0x100], rcx
mov r13d, dword [rbp + 0x180]
mov byte [rbp + 0xf8], 1
mov byte [rbp + 0xe0], 1
movzx eax, byte [rbp + 0xf8]
and byte [rbp + 0xe0], al
mov r14, qword [rbp + 0x100]
mov rdi, qword [rbp + 0xd8]
mov qword [rbp + 0xc8], r15
nop dword [rax]
test r13d, r13d
je 0x140216171
test byte [rbp + 0xf8], 1
je 0x1402159df
mov rdx, rdi
shr rdx, 2
lea rax, [rdx + rdx]
lea rcx, [rdx + rdx*2]
mov qword [rbp + 0xf0], rdi
cmp rdi, 0x31
jbe 0x140215540
lea r9, [rdx - 1]
mov r10d, dword [r14 + rdx*8]
mov r11d, dword [r14 + rdx*8 + 4]
mov esi, dword [r14 + rdx*8 - 8]
mov ebx, dword [r14 + rdx*8 - 4]
xor r8d, r8d
cmp r11d, ebx
setb r8b
xor edi, edi
cmp r10d, esi
setb dil
cmove edi, r8d
cmp dil, 1
mov dword [rbp + 0x10c], r13d
jne 0x140215550
mov r8d, 1
mov rdi, r9
mov r9, rdx
mov r11d, ebx
mov r10d, esi
jmp 0x140215556
xor r8d, r8d
mov r12, rax
jmp 0x14021574c
xor r8d, r8d
mov rdi, rdx
mov esi, dword [r14 + rdx*8 + 8]
mov ebx, dword [r14 + rdx*8 + 0xc]
xor r12d, r12d
cmp ebx, r11d
setb r12b
xor r13d, r13d
cmp esi, r10d
setb r13b
cmove r13d, r12d
cmp r13b, 1
jne 0x140215590
inc rdx
inc r8
jmp 0x140215599
mov ebx, r11d
mov esi, r10d
mov rdx, rdi
xor r10d, r10d
cmp ebx, dword [r14 + r9*8 + 4]
setb r10b
xor r11d, r11d
cmp esi, dword [r14 + r9*8]
setb r11b
cmove r11d, r10d
movzx r10d, r11b
add r8, r10
test r10b, r10b
cmovne rdx, r9
lea r9, [rax - 1]
mov edi, dword [r14 + rax*8]
mov ebx, dword [r14 + rax*8 + 4]
mov r10d, dword [r14 + rax*8 - 8]
mov r11d, dword [r14 + rax*8 - 4]
xor esi, esi
cmp ebx, r11d
setb sil
xor r12d, r12d
cmp edi, r10d
setb r12b
cmove r12d, esi
cmp r12b, 1
jne 0x140215610
inc r8
mov r15, r9
mov r9, rax
jmp 0x140215619
mov r15, rax
mov r11d, ebx
mov r10d, edi
mov r12, rax
or r12, 1
mov edi, dword [r14 + r12*8]
mov ebx, dword [r14 + r12*8 + 4]
xor r13d, r13d
cmp ebx, r11d
setb r13b
xor esi, esi
cmp edi, r10d
setb sil
cmove esi, r13d
cmp sil, 1
jne 0x140215650
inc r8
jmp 0x140215659
mov r12, r15
mov ebx, r11d
mov edi, r10d
xor r10d, r10d
cmp ebx, dword [r14 + r9*8 + 4]
setb r10b
xor r11d, r11d
cmp edi, dword [r14 + r9*8]
setb r11b
cmove r11d, r10d
movzx r10d, r11b
add r8, r10
test r10b, r10b
cmovne r12, r9
lea r9, [rcx - 1]
mov edi, dword [r14 + rcx*8]
mov ebx, dword [r14 + rcx*8 + 4]
mov r11d, dword [r14 + rcx*8 - 8]
mov esi, dword [r14 + rcx*8 - 4]
xor r10d, r10d
cmp ebx, esi
setb r10b
xor r13d, r13d
cmp edi, r11d
setb r13b
cmove r13d, r10d
cmp r13b, 1
jne 0x1402156d0
inc r8
mov r10, r9
mov r9, rcx
jmp 0x1402156d8
mov r10, rcx
mov esi, ebx
mov r11d, edi
mov edi, dword [r14 + rcx*8 + 8]
mov ebx, dword [r14 + rcx*8 + 0xc]
xor r13d, r13d
cmp ebx, esi
setb r13b
xor r15d, r15d
cmp edi, r11d
setb r15b
cmove r15d, r13d
cmp r15b, 1
jne 0x140215710
inc rcx
inc r8
mov r10, rcx
jmp 0x140215715
mov ebx, esi
mov edi, r11d
mov r15, qword [rbp + 0xc8]
mov r13d, dword [rbp + 0x10c]
xor ecx, ecx
cmp ebx, dword [r14 + r9*8 + 4]
setb cl
xor r11d, r11d
cmp edi, dword [r14 + r9*8]
setb r11b
cmove r11d, ecx
movzx ecx, r11b
add r8, rcx
test cl, cl
cmovne r10, r9
mov rcx, r10
mov esi, dword [r14 + r12*8]
mov edi, dword [r14 + r12*8 + 4]
mov r9d, dword [r14 + rdx*8]
mov r10d, dword [r14 + rdx*8 + 4]
xor r11d, r11d
cmp edi, r10d
setb r11b
xor ebx, ebx
cmp esi, r9d
setb bl
cmove ebx, r11d
cmp bl, 1
jne 0x140215790
inc r8
mov r11, rdx
jmp 0x14021579c
mov r11, r12
mov r12, rdx
mov r10d, edi
mov r9d, esi
mov edx, dword [r14 + rcx*8]
mov esi, dword [r14 + rcx*8 + 4]
xor edi, edi
cmp esi, r10d
setb dil
xor ebx, ebx
cmp edx, r9d
setb bl
cmove ebx, edi
cmp bl, 1
jne 0x1402157d0
inc r8
jmp 0x1402157d9
mov rcx, r11
mov esi, r10d
mov edx, r9d
movabs rdi, 0x1ffffffffffffffe
mov rbx, qword [rbp + 0xf0]
xor r9d, r9d
cmp esi, dword [r14 + r12*8 + 4]
setb r9b
xor r10d, r10d
cmp edx, dword [r14 + r12*8]
setb r10b
cmove r10d, r9d
cmp r10b, 1
jne 0x140215840
mov ecx, r8d
mov r8d, 1
cmp ecx, 0xb
jb 0x140215843
mov rcx, rbx
shr rcx, 1
lea rdx, [r14 + rbx*8]
lea r8, [rcx*8]
sub rdx, r8
cmp rcx, 1
jne 0x140215856
xor r8d, r8d
jmp 0x140215898
mov r12, rcx
test r8, r8
sete al
test byte [rbp + 0xe0], al
je 0x1402158ca
jmp 0x1402159f2
lea r9, [rbx - 1]
xor r8d, r8d
nop dword [rax]
mov r10, qword [r14 + r9*8]
mov r11, qword [r14 + r8*8]
mov qword [r14 + r8*8], r10
mov qword [r14 + r9*8], r11
mov r10, r8
xor r10, rdi
add r10, rcx
mov r11, qword [rdx + r10*8]
mov rsi, qword [r14 + r8*8 + 8]
mov qword [r14 + r8*8 + 8], r11
mov qword [rdx + r10*8], rsi
add r8, 2
add r9, 0xfffffffffffffffe
cmp rax, r8
jne 0x140215860
test bl, 2
je 0x1402158b6
mov rax, r8
not rax
add rcx, rax
mov rax, qword [rdx + rcx*8]
mov r9, qword [r14 + r8*8]
mov qword [r14 + r8*8], rax
mov qword [rdx + rcx*8], r9
not r12
add r12, rbx
mov al, 1
test byte [rbp + 0xe0], al
jne 0x1402159f2
test r15, r15
je 0x140215a10
cmp r12, rbx
jae 0x140216181
mov eax, dword [r15]
mov ecx, dword [r15 + 4]
xor edx, edx
cmp ecx, dword [r14 + r12*8 + 4]
setb dl
xor ecx, ecx
cmp eax, dword [r14 + r12*8]
setb cl
cmove ecx, edx
test cl, cl
jne 0x140215a20
mov rax, qword [r14]
mov rcx, qword [r14 + r12*8]
mov qword [r14], rcx
mov qword [r14 + r12*8], rax
lea r8, [rbx - 1]
mov eax, dword [r14]
mov edx, dword [r14 + 4]
xor ecx, ecx
cmp rcx, r8
jae 0x140215960
nop word cs:[rax + rax]
xor r9d, r9d
cmp edx, dword [r14 + rcx*8 + 0xc]
setb r9b
xor r10d, r10d
cmp eax, dword [r14 + rcx*8 + 8]
setb r10b
cmove r10d, r9d
test r10b, r10b
jne 0x140215960
inc rcx
cmp r8, rcx
jne 0x140215930
mov rcx, r8
nop dword [rax]
lea r9, [r8 - 1]
cmp rcx, r9
jae 0x1402159b0
xor r10d, r10d
cmp edx, dword [r14 + r9*8 + 0xc]
setb r10b
xor r11d, r11d
cmp eax, dword [r14 + r8*8]
setb r11b
cmove r11d, r10d
mov r8, r9
test r11b, r11b
jne 0x140215960
mov r8, qword [r14 + rcx*8 + 8]
mov r10, qword [r14 + r9*8 + 8]
mov qword [r14 + rcx*8 + 8], r10
mov qword [r14 + r9*8 + 8], r8
inc rcx
mov r8, r9
cmp rcx, r8
jb 0x140215930
jmp 0x140215960
inc rcx
shl rdx, 0x20
or rdx, rax
mov qword [r14], rdx
mov rsi, rbx
sub rsi, rcx
jb 0x140216193
lea r14, [r14 + rcx*8]
mov rdi, rsi
cmp rsi, 0x15
jae 0x1402154b0
jmp 0x140215439
mov rcx, r14
mov rdx, rdi
call fcn.140333df0
dec r13d
jmp 0x1402154c6
mov rcx, r14
mov rdx, rbx
call fcn.140333f40
test al, al
je 0x1402158ca
jmp 0x140215450
mov r14, qword [rbp + 0x100]
mov rdx, qword [rbp + 0xd8]
jmp 0x140215a23
mov rdx, rbx
cmp r12, rdx
jae 0x1402161a2
mov rax, qword [r14]
mov rcx, qword [r14 + r12*8]
mov qword [r14], rcx
mov qword [r14 + r12*8], rax
lea rax, [r14 + 8]
lea r8, [rdx - 1]
mov esi, dword [r14]
mov ebx, dword [r14 + 4]
xor ecx, ecx
nop dword [rax + rax]
xor r10d, r10d
cmp dword [r14 + rcx*8 + 0xc], ebx
setb r10b
xor r9d, r9d
cmp dword [r14 + rcx*8 + 8], esi
setb r9b
cmove r9d, r10d
cmp r9b, 1
jne 0x140215a7d
inc rcx
cmp r8, rcx
jne 0x140215a50
mov rcx, r8
lea rdi, [r14 + rdx*8]
nop word cs:[rax + rax]
mov r15, r8
mov r9, rdi
cmp rcx, r8
jae 0x140215ac2
lea r8, [r15 - 1]
lea rdi, [r9 - 8]
xor r10d, r10d
cmp dword [r9 - 4], ebx
setb r10b
xor r11d, r11d
cmp dword [r9 - 8], esi
setb r11b
cmove r11d, r10d
test r11b, r11b
je 0x140215a90
mov qword [rbp + 0xe8], rsi
mov qword [rbp + 0xd8], rdx
mov dword [rbp + 0x10c], r13d
mov qword [rbp + 0x100], r14
mov qword [rbp + 0xc0], r15
cmp rcx, r15
mov qword [rbp + 0xf0], rbx
ja 0x1402161c0
mov qword [rbp + 0xb0], rcx
lea r12, [rax + rcx*8]
mov ecx, 0x80
xor r11d, r11d
xor r13d, r13d
xor r10d, r10d
xor r15d, r15d
mov edi, 0x80
mov qword [rbp + 0xd0], r12
jmp 0x140215b66
movlps qword [r9 + rax*8], xmm0
inc r15
inc r13
cmp r15, r10
mov eax, 0
mov rdi, qword [rbp + 0xe0]
cmove rax, rdi
mov rdx, rcx
neg rdx
cmp r13, r11
mov r8d, 0
cmovne rdx, r8
lea r12, [r12 + rax*8]
lea r9, [r9 + rdx*8]
cmp r14, 0x808
jb 0x140215ed0
mov r14, r9
sub r14, r12
cmp r14, 0x808
jae 0x140215bbe
mov rax, r14
shr rax, 3
cmp r15, r10
setb r8b
cmp r13, r11
setb sil
or sil, r8b
lea r8, [rax - 0x80]
test sil, sil
mov rdx, rdi
mov rdi, rax
cmovne rdi, r8
cmp r15, r10
cmovb rcx, r8
cmovae rdx, rdi
mov rdi, rdx
test sil, sil
jne 0x140215bbe
mov rdi, r14
shr rdi, 4
sub rax, rdi
mov rcx, rax
cmp r15, r10
mov qword [rbp + 0xe0], rdi
je 0x140215c30
cmp r13, r11
je 0x140215c60
mov rax, r10
sub rax, r15
mov r8, r11
sub r8, r13
cmp rax, r8
cmovb r8, rax
test r8, r8
je 0x140215b2b
movzx edx, byte [r15]
movsd xmm0, qword [r12 + rdx*8]
movzx edi, byte [r13]
mov rax, rdi
not rax
mov rsi, qword [r9 + rax*8]
mov qword [r12 + rdx*8], rsi
cmp r8, 1
je 0x140215b20
lea rsi, [r8 - 1]
cmp r8, 2
jne 0x140215c88
jmp 0x140215ce2
test rdi, rdi
je 0x140215d22
cmp rdi, 1
jne 0x140215d3a
lea r15, [rbp + 0x30]
mov r10, r15
mov r8, r12
xor edx, edx
test dil, 1
je 0x140215bca
jmp 0x140215dcf
test rcx, rcx
je 0x140215d2e
cmp rcx, 1
mov qword [rbp + 0xf8], rcx
jne 0x140215dfb
lea r11, [rbp - 0x50]
xor eax, eax
mov rdi, r9
jmp 0x140215e85
mov r8, rsi
and r8, 0xfffffffffffffffe
nop
movzx eax, byte [r15 + 1]
movzx edx, dil
not rdx
mov rdi, qword [r12 + rax*8]
mov qword [r9 + rdx*8], rdi
movzx edx, byte [r13 + 1]
not rdx
mov rdi, qword [r9 + rdx*8]
mov qword [r12 + rax*8], rdi
movzx ebx, byte [r15 + 2]
add r15, 2
mov rax, qword [r12 + rbx*8]
mov qword [r9 + rdx*8], rax
movzx edi, byte [r13 + 2]
add r13, 2
mov rax, rdi
not rax
mov rdx, qword [r9 + rax*8]
mov qword [r12 + rbx*8], rdx
add r8, 0xfffffffffffffffe
jne 0x140215c90
test sil, 1
mov rbx, qword [rbp + 0xf0]
je 0x140215b20
movzx edx, byte [r15 + 1]
inc r15
movzx eax, dil
not rax
mov r8, qword [r12 + rdx*8]
mov qword [r9 + rax*8], r8
movzx eax, byte [r13 + 1]
inc r13
not rax
mov r8, qword [r9 + rax*8]
mov qword [r12 + rdx*8], r8
jmp 0x140215b20
lea r15, [rbp + 0x30]
mov r10, r15
jmp 0x140215bca
lea r13, [rbp - 0x50]
mov r11, r13
jmp 0x140215bd3
mov qword [rbp + 0xf8], rcx
mov r15, rdi
and r15, 0xfffffffffffffffe
lea r10, [rbp + 0x30]
mov r8, r12
xor edx, edx
mov rcx, qword [rbp + 0xe8]
nop dword [rax + rax]
xor esi, esi
cmp dword [r8 + 4], ebx
setae sil
xor edi, edi
cmp dword [r8], ecx
mov eax, edx
setae dil
cmove edi, esi
mov byte [r10], dl
movzx esi, dil
add rdx, 2
inc eax
mov byte [r10 + rsi], al
xor eax, eax
cmp dword [r8 + 0xc], ebx
setae al
xor edi, edi
cmp dword [r8 + 8], ecx
lea rsi, [r10 + rsi]
setae dil
cmove edi, eax
movzx r10d, dil
add r10, rsi
add r8, 0x10
cmp r15, rdx
jne 0x140215d60
lea r15, [rbp + 0x30]
mov rcx, qword [rbp + 0xf8]
mov rdi, qword [rbp + 0xe0]
test dil, 1
je 0x140215bca
xor esi, esi
cmp dword [r8 + 4], ebx
setae sil
xor edi, edi
mov rax, qword [rbp + 0xe8]
cmp dword [r8], eax
setae dil
cmove edi, esi
mov byte [r10], dl
movzx eax, dil
add r10, rax
jmp 0x140215bca
mov r8, rcx
and r8, 0xfffffffffffffffe
lea r11, [rbp - 0x50]
xor r13d, r13d
mov rsi, r9
xor eax, eax
mov rcx, qword [rbp + 0xe8]
nop word cs:[rax + rax]
mov byte [r11], r13b
xor edx, edx
cmp dword [rsi - 4], ebx
setb dl
xor edi, edi
cmp dword [rsi - 8], ecx
setb dil
cmove edi, edx
movzx edx, dil
lea rbx, [r11 + rdx]
add rax, 2
lea rdi, [rsi - 0x10]
inc r13d
mov byte [r11 + rdx], r13b
xor edx, edx
mov r11, qword [rbp + 0xf0]
cmp dword [rsi - 0xc], r11d
setb dl
xor r11d, r11d
cmp dword [rsi - 0x10], ecx
setb r11b
cmove r11d, edx
movzx r11d, r11b
add r11, rbx
mov rbx, qword [rbp + 0xf0]
mov r13, rax
mov rsi, rdi
cmp r8, rax
jne 0x140215e20
lea r13, [rbp - 0x50]
mov rcx, qword [rbp + 0xf8]
test cl, 1
je 0x140215bd3
xor edx, edx
cmp dword [rdi - 4], ebx
setb dl
xor r8d, r8d
mov rsi, rcx
mov rcx, qword [rbp + 0xe8]
cmp dword [rdi - 8], ecx
mov rcx, rsi
setb r8b
cmove r8d, edx
mov byte [r11], al
movzx eax, r8b
add r11, rax
jmp 0x140215bd3
mov rdx, r15
sub rdx, r10
jae 0x140215f40
mov r8d, r10d
sub r8d, r15d
and r8d, 3
mov rdi, qword [rbp + 0x100]
je 0x140215f84
mov r14, qword [rbp + 0xd0]
nop word cs:[rax + rax]
movzx ecx, byte [r10 - 1]
dec r10
lea rax, [r9 - 8]
mov r11, qword [r12 + rcx*8]
mov rsi, qword [r9 - 8]
mov qword [r12 + rcx*8], rsi
mov qword [r9 - 8], r11
mov r9, rax
dec r8
jne 0x140215f00
mov rsi, rax
cmp rdx, 0xfffffffffffffffc
jbe 0x140215fa0
jmp 0x140216080
cmp r13, r11
mov rdi, qword [rbp + 0x100]
jae 0x140215f75
mov eax, r11d
sub eax, r13d
test al, 1
mov r14, qword [rbp + 0xd0]
jne 0x140216006
mov rax, r11
dec r11
cmp r11, r13
jne 0x140216040
jmp 0x140216080
mov rsi, r12
mov r14, qword [rbp + 0xd0]
jmp 0x140216080
mov rax, r9
mov r14, qword [rbp + 0xd0]
mov rsi, rax
cmp rdx, 0xfffffffffffffffc
ja 0x140216080
nop dword [rax + rax]
movzx ecx, byte [r10 - 1]
mov rdx, qword [r12 + rcx*8]
mov r8, qword [rax - 8]
mov qword [r12 + rcx*8], r8
mov qword [rax - 8], rdx
movzx ecx, byte [r10 - 2]
mov rdx, qword [r12 + rcx*8]
mov r8, qword [rax - 0x10]
mov qword [r12 + rcx*8], r8
mov qword [rax - 0x10], rdx
movzx ecx, byte [r10 - 3]
mov rdx, qword [r12 + rcx*8]
mov r8, qword [rax - 0x18]
mov qword [r12 + rcx*8], r8
mov qword [rax - 0x18], rdx
movzx ecx, byte [r10 - 4]
add r10, 0xfffffffffffffffc
lea rsi, [rax - 0x20]
mov rdx, qword [r12 + rcx*8]
mov r8, qword [rax - 0x20]
mov qword [r12 + rcx*8], r8
mov qword [rax - 0x20], rdx
mov rax, rsi
cmp r15, r10
jb 0x140215fa0
jmp 0x140216080
lea rax, [r11 - 1]
movzx ecx, byte [r11 - 1]
not rcx
mov rdx, qword [r12]
mov r8, qword [r9 + rcx*8]
mov qword [r12], r8
mov qword [r9 + rcx*8], rdx
add r12, 8
mov rsi, r12
dec r11
cmp r11, r13
je 0x140216080
nop word cs:[rax + rax]
movzx ecx, byte [rax - 1]
not rcx
mov rdx, qword [r12]
mov r8, qword [r9 + rcx*8]
mov qword [r12], r8
mov qword [r9 + rcx*8], rdx
movzx ecx, byte [rax - 2]
add rax, 0xfffffffffffffffe
not rcx
mov rdx, qword [r12 + 8]
mov r8, qword [r9 + rcx*8]
mov qword [r12 + 8], r8
mov qword [r9 + rcx*8], rdx
add r12, 0x10
cmp r13, rax
jb 0x140216040
mov rsi, r12
sub rsi, r14
shr rsi, 3
mov rax, qword [rbp + 0xb0]
add rsi, rax
shl rbx, 0x20
add rbx, qword [rbp + 0xe8]
mov qword [rdi], rbx
mov rdx, qword [rbp + 0xd8]
mov r14, rdx
sub r14, rsi
jbe 0x1402161b1
cmp rax, qword [rbp + 0xc0]
setae byte [rbp + 0xe0]
lea r15, [rdi + rsi*8]
mov rax, qword [rdi + rsi*8]
mov qword [rdi], rax
mov qword [rdi + rsi*8], rbx
cmp rsi, r14
mov rax, r14
cmovb rax, rsi
shr rdx, 3
cmp rax, rdx
setae byte [rbp + 0xf8]
lea rbx, [rdi + rsi*8]
add rbx, 8
dec r14
cmp rsi, r14
mov r13d, dword [rbp + 0x10c]
jae 0x140216130
mov dword [rsp + 0x20], r13d
mov rcx, rdi
mov rdx, rsi
mov r8, qword [rbp + 0xb8]
mov r9, qword [rbp + 0xc8]
call fcn.140215400
mov rsi, r14
mov r14, rbx
jmp 0x140216154
mov dword [rsp + 0x20], r13d
mov rcx, rbx
mov rdx, r14
mov r8, qword [rbp + 0xb8]
mov r9, r15
call fcn.140215400
mov r14, rdi
mov r15, qword [rbp + 0xc8]
mov qword [rbp + 0xd8], rsi
mov qword [rbp + 0x100], r14
cmp rsi, 0x15
jae 0x14021548b
jmp 0x140215439
mov rcx, r14
mov rdx, rdi
call fcn.140334940
jmp 0x140215450
lea r8, [0x140399ee8]
mov rcx, r12
mov rdx, rbx
call fcn.1403393b0
lea r8, [0x140399f00]
mov rdx, rbx
call fcn.1403396e0
lea r8, [0x140399f60]
mov rcx, r12
call fcn.1403393b0
lea r8, [0x140399f90]
mov rcx, rsi
call fcn.1403393b0
lea r8, [0x140399f78]
mov rdx, qword [rbp + 0xc0]
call fcn.1403397c0
ud2