Function at 0x1400278da
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x958
mov r12, rcx
mov rcx, qword [r8 + 8]
xor edi, edi
test rcx, rcx
je 0x140028108
mov rsi, r8
mov rbx, rdx
mov rdx, qword [r8]
lea eax, [rcx*8]
lea ebp, [rcx*8 + 0x1e]
cmp byte [rdx], 0
jne 0x14002792e
inc rdx
add ebp, 0xfffffff8
add eax, 0xfffffff8
dec rcx
jne 0x140027916
jmp 0x140028108
cmp rcx, 0x200
ja 0x140028108
cmp rbx, rcx
jne 0x140028108
test ebx, ebx
jle 0x14002796e
cmp eax, 0x1f
mov ecx, 0x1f
cmovl ecx, eax
sub ebp, ecx
imul rax, rbp, 0x8421085
shr rax, 0x20
sub ebp, eax
shr ebp, 1
add ebp, eax
shr ebp, 4
add ebp, 3
jmp 0x140027973
mov ebp, 2
mov r14d, ebp
and r14d, 0xfffffffe
lea r13, [rsp + r14*4]
add r13, 0xe0
lea rdi, [rsp + 0xe0]
mov rcx, rdi
mov r8, rbx
call fcn.140011b9c
mov r15d, dword [rdi + 4]
mov eax, 2
mov ecx, 2
sub ecx, r15d
mov edx, ecx
imul edx, r15d
mov r8d, 2
sub r8d, edx
imul r8d, ecx
mov ecx, r8d
imul ecx, r15d
mov edx, 2
sub edx, ecx
imul edx, r8d
mov ecx, edx
imul ecx, r15d
sub eax, ecx
imul eax, edx
mov ecx, eax
imul ecx, r15d
add ecx, 0x7ffffffe
imul ecx, eax
and r15d, 1
neg r15d
and r15d, ecx
mov eax, r15d
and eax, 0x7fffffff
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x70], r13
mov rcx, r13
mov rdx, r12
mov r8, rbx
mov r9, rdi
call fcn.140011f80
and eax, r15d
mov dword [rsp + 0x60], eax
mov rax, qword [rsi + 0x10]
mov qword [rsp + 0x80], rax
mov r8, qword [rsi + 0x18]
lea r15, [rsp + r14*8]
add r15, 0xe0
mov r9d, 0x10e
sub r9, r14
mov eax, dword [rdi]
add eax, 0x1f
mov ecx, eax
shr ecx, 5
lea r13, [rcx + 1]
cmp eax, 0x80
mov qword [rsp + 0xb0], r12
jb 0x140027be0
mov rdx, r13
shr rdx, 1
lea rax, [rdx*4]
cmp rax, r9
ja 0x140027be0
mov qword [rsp + 0x90], r9
mov qword [rsp + 0x50], r8
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0xa8], rbx
cmp rdx, 2
mov esi, 1
mov rax, rdx
mov qword [rsp + 0x38], rdx
cmovae rsi, rdx
mov rbx, rsi
neg rbx
lea rdi, [rsp + 0xe0]
mov r14, qword [rsp + 0x70]
mov rcx, r14
mov rdx, rdi
call fcn.140011925
mov rcx, r14
mov rdx, rdi
call fcn.140011925
inc rbx
jne 0x140027ab9
mov rax, qword [rsp + 0x38]
lea r12, [r15 + rax*8]
and r13d, 0xfffffffe
lea rdi, [r15 + r13*8]
xor eax, eax
mov r11, qword [rsp + 0x68]
mov rcx, rax
shr rcx, 1
mov r9, rax
or r9, 1
cmp r9, r11
jne 0x140027b10
mov edx, dword [rsp + r11*4 + 0xe0]
mov r8d, dword [r14 + r11*4]
add rax, 2
jmp 0x140027b3a
mov r10d, dword [rsp + r9*4 + 0xe0]
mov edx, dword [rsp + rax*4 + 0xe8]
mov r8d, dword [r14 + rax*4 + 8]
add rax, 2
shl rdx, 0x1f
add rdx, r10
mov r9d, dword [r14 + r9*4]
shl r8, 0x1f
add r8, r9
mov qword [r15 + rcx*8], rdx
mov qword [r12 + rcx*8], r8
cmp rax, r11
jb 0x140027aec
mov rdx, qword [rsp + 0x90]
sub rdx, r13
mov ecx, 5
mov qword [rsp + 0x90], rdx
mov qword [rsp + 0xa0], rdi
mov ebx, 1
shl ebx, cl
lea eax, [rbx + 1]
imul rax, qword [rsp + 0x38]
mov qword [rsp + 0xd8], rax
cmp rax, rdx
jbe 0x140027c25
lea eax, [rcx - 1]
cmp ecx, 2
mov ecx, eax
ja 0x140027b67
mov eax, dword [rsp + 0x40]
mov rcx, qword [r15]
imul rcx, rax
add rcx, 2
imul rcx, rax
movabs rax, 0x3fffffffffffffff
and rcx, rax
mov qword [rsp + 0x58], rcx
mov rax, qword [rsp + 0x38]
lea rcx, [rdi + rax*8]
lea r8, [rax*8]
mov qword [rsp + 0x78], rcx
mov rdx, r12
call fcn.1400027aa
mov r13d, 1
jmp 0x140027d04
cmp r9, rcx
mov edi, dword [rsp + 0x60]
mov r14, qword [rsp + 0x70]
jbe 0x1400280f2
lea rax, [r15 + r13*4]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xe0]
mov rcx, r14
mov rdx, qword [rsp + 0x80]
call fcn.140011dd8
jmp 0x1400280f2
mov qword [rsp + 0x88], rcx
mov r8, qword [rsp + 0x38]
lea rcx, [rdi + r8*8]
mov eax, dword [rsp + 0x40]
mov rdx, qword [r15]
imul rdx, rax
add rdx, 2
imul rdx, rax
movabs rax, 0x3fffffffffffffff
and rdx, rax
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x78], rcx
mov rax, r8
lea r13, [rcx + r8*8]
lea r8, [r8*8]
mov rdi, rax
mov rcx, r13
mov rdx, r12
mov qword [rsp + 0x40], r8
call fcn.1400027aa
cmp ebx, 4
mov r14d, 3
cmovae r14d, ebx
add r14, 0xfffffffffffffffe
mov rax, rdi
lea rax, [rdi + rdi*4]
and ebp, 0xfffffffe
shl rbp, 3
lea rax, [rax*8]
add rax, rbp
lea rbp, [rsp + rax]
add rbp, 0xe0
lea rbx, [rdi*8]
add rbx, r13
mov qword [rsp + 0x20], rdi
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov rcx, rbp
mov rdx, r13
mov r8, r12
mov r9, r15
call fcn.140011615
add rbp, qword [rsp + 0x40]
mov r13, rbx
dec r14
jne 0x140027cb7
mov r14, qword [rsp + 0x70]
mov r13, qword [rsp + 0x88]
mov rdi, qword [rsp + 0xa0]
lea rbx, [rsp + 0xe0]
mov r8d, dword [rbx]
lea rcx, [r14 + 4]
mov dword [r14], r8d
add r8d, 0x1f
shr r8d, 3
and r8d, 0xfffffffc
xor edx, edx
call fcn.140002794
mov eax, dword [rbx]
add eax, 0x1f
shr eax, 5
mov dword [r14 + rax*4], 1
mov rcx, r14
mov rdx, rbx
call fcn.140011925
mov r9, qword [rsp + 0x68]
test r9b, 1
je 0x140027d64
lea rdx, [rsp + 0xe0]
mov rcx, r14
call fcn.140011925
mov r9, qword [rsp + 0x68]
xor eax, eax
mov r10, qword [rsp + 0x50]
mov rcx, rax
shr rcx, 1
mov rdx, rax
or rdx, 1
cmp rdx, r9
jne 0x140027d87
mov edx, dword [r14 + r9*4]
add rax, 2
jmp 0x140027d9b
mov r8d, dword [r14 + rdx*4]
mov edx, dword [r14 + rax*4 + 8]
add rax, 2
shl rdx, 0x1f
add rdx, r8
mov qword [r12 + rcx*8], rdx
cmp rax, r9
jb 0x140027d6b
test r10, r10
je 0x140027fd6
mov rax, qword [rsp + 0x38]
lea rcx, [rax*8]
mov qword [rsp + 0x40], rcx
lea rbp, [rdi + rax*8]
mov rcx, qword [rsp + 0x78]
lea rax, [rcx + rax*8]
mov qword [rsp + 0xb8], rax
mov al, 1
mov dword [rsp + 0x48], 0
xor ecx, ecx
mov qword [rsp + 0xc8], r15
mov qword [rsp + 0x88], r13
mov qword [rsp + 0xc0], r12
mov rdi, qword [rsp + 0xa0]
mov r12, qword [rsp + 0xc0]
cmp ecx, r13d
jge 0x140027e42
test al, 1
je 0x140027e4c
mov edx, dword [rsp + 0x48]
shl edx, 8
mov r8, qword [rsp + 0x80]
movzx eax, byte [r8]
inc r8
mov qword [rsp + 0x80], r8
or edx, eax
mov dword [rsp + 0x48], edx
dec r10
mov qword [rsp + 0x50], r10
add ecx, 8
jmp 0x140027e47
mov qword [rsp + 0x50], r10
mov edx, r13d
jmp 0x140027e55
mov edx, ecx
xor eax, eax
mov qword [rsp + 0x50], rax
sub ecx, edx
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x9c], ecx
shr eax, cl
mov dword [rsp + 0x4c], eax
mov eax, 1
mov ecx, edx
shl eax, cl
mov qword [rsp + 0xd0], rax
dec eax
mov dword [rsp + 0x98], eax
mov dword [rsp + 0x64], edx
test edx, edx
mov r15, qword [rsp + 0x38]
mov rbx, qword [rsp + 0xc8]
mov r13, qword [rsp + 0x58]
jle 0x140027ed1
mov r14d, dword [rsp + 0x64]
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r15
mov rcx, rdi
mov rdx, r12
mov r8, r12
mov r9, rbx
call fcn.140011615
mov rcx, r12
mov rdx, rdi
mov r8, qword [rsp + 0x40]
call fcn.1400027aa
dec r14d
jne 0x140027ea1
mov eax, dword [rsp + 0x98]
and dword [rsp + 0x4c], eax
mov rax, qword [rsp + 0xd8]
cmp rax, qword [rsp + 0x90]
mov r14, qword [rsp + 0x70]
mov r15, rbx
mov r13, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x40]
ja 0x140027f68
mov rcx, qword [rsp + 0x78]
xor edx, edx
mov r8, rbx
call fcn.140002794
mov r10, qword [rsp + 0xd0]
cmp dword [rsp + 0x64], 0
je 0x140027f68
mov eax, dword [rsp + 0x4c]
cmp r10d, 3
mov ecx, 2
cmovb r10d, ecx
mov ecx, 1
mov rdx, qword [rsp + 0xb8]
xor r8d, r8d
cmp rcx, rax
jne 0x140027f4d
mov r9, qword [rdx + r8*8]
jmp 0x140027f50
xor r9d, r9d
or qword [rbp + r8*8], r9
inc r8
cmp rsi, r8
jne 0x140027f42
inc rcx
add rdx, rbx
cmp rcx, r10
jne 0x140027f3f
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r12
mov r8, qword [rsp + 0x78]
mov r9, r15
call fcn.140011615
xor eax, eax
mov r8d, dword [rsp + 0x4c]
test r8d, r8d
lea rcx, [r12 + rax*8]
lea rdx, [rdi + rax*8]
cmove rdx, rcx
mov rdx, qword [rdx]
mov qword [rcx], rdx
inc rax
cmp rsi, rax
jne 0x140027f96
mov r10, qword [rsp + 0x50]
test r10, r10
setne al
mov ecx, dword [rsp + 0x9c]
test ecx, ecx
jg 0x140027e08
test r10, r10
jne 0x140027e08
mov rbp, qword [rsp + 0x58]
shl rbp, 2
xor r8d, r8d
mov rbx, qword [rsp + 0xa8]
mov edi, dword [rsp + 0x60]
mov rsi, qword [rsp + 0x38]
movabs r13, 0x3fffffffffffffff
mov rcx, qword [r12]
imul rcx, rbp
xor r9d, r9d
xor r10d, r10d
mov rax, rcx
mul qword [r15 + r9*8]
mov r11, qword [r12 + r9*8]
shl r11, 2
add rax, r10
adc rdx, 0
add rax, r11
mov r10, rdx
adc r10, 0
test r9, r9
je 0x140028039
shr rax, 2
mov qword [r12 + r9*8 - 8], rax
shl r10, 2
inc r9
cmp rsi, r9
jne 0x14002800b
shr r10, 2
mov qword [r12 + rsi*8 - 8], r10
inc r8
cmp r8, rsi
jne 0x140027ffd
xor edx, edx
mov rax, r15
mov r8, rsi
add rdx, qword [rax + rsi*8]
mov rcx, rdx
sub rcx, qword [rax]
mov rdx, rcx
sar rdx, 0x3f
add rax, 8
dec r8
jne 0x14002805e
shr rcx, 0x3f
mov eax, 0xffffffff
add ecx, eax
add rax, 2
imul rax, rcx
xor edx, edx
mov rcx, rsi
mov r10, qword [rsp + 0x68]
mov r8, qword [r15 + rsi*8]
add rdx, r8
sub rdx, qword [r15]
mov r9, rdx
sar r9, 0x3f
and rdx, r13
xor rdx, r8
and rdx, rax
xor rdx, r8
mov qword [r15 + rsi*8], rdx
add r15, 8
mov rdx, r9
dec rcx
jne 0x140028095
xor eax, eax
mov rcx, qword [r12 + rax*4]
mov edx, ecx
and edx, 0x7fffffff
mov r8, rax
or r8, 1
mov dword [r14 + r8*4], edx
cmp r8, r10
jae 0x1400280e9
shr rcx, 0x1f
mov dword [r14 + rax*4 + 8], ecx
add rax, 2
cmp rax, r10
jb 0x1400280c4
and edi, 1
mov rcx, qword [rsp + 0xb0]
mov rdx, rbx
mov r8, r14
call fcn.14001156d
mov eax, edi
add rsp, 0x958
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret