Function at 0x14003fa6c
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x848]
sub rsp, 0x920
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rbp + 0x810], rax
mov r12, rcx
mov qword [rsp + 0x68], rcx
mov ecx, 0x64
call fcn.1400063e8
mov rcx, qword [r12]
call fcn.140021d34
mov qword [rbp - 0x48], rax
xor edx, edx
movabs r8, 0x7fffffff7fffffff
mov rcx, qword [r12]
call fcn.140043460
xor r15d, r15d
mov ebx, r15d
mov qword [rbp - 0x70], rbx
mov r14d, r15d
mov qword [rbp - 0x68], r15
mov qword [rbp - 0x60], r15
mov qword [rbp - 0x58], r15
mov byte [rbp - 0x50], r15b
mov edi, r15d
lea esi, [r15 + 1]
cmp qword [r12 + 0xd8], r15
jbe 0x14003fb49
mov rcx, qword [r12 + 0xd0]
mov rax, qword [r12 + 0x120]
cmp qword [rbx + rcx], rax
jne 0x14003fb30
mov edx, dword [rbx + rcx + 8]
lea rcx, [rbp - 0x70]
call fcn.140041080
add rdi, rsi
add rbx, 0x10
cmp rdi, qword [r12 + 0xd8]
jb 0x14003fb0d
mov rbx, qword [rbp - 0x70]
mov r14, qword [rbp - 0x68]
mov eax, 0x818
mul r14
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.14005a480
mov r13, rax
lea r9, [0x140040dc0]
mov r8d, 0x20
mov rdx, qword [r12 + 0x88]
mov rcx, qword [r12 + 0x80]
call fcn.14005ec70
mov rdx, qword [r12 + 0xb0]
lea rcx, [rsp + 0x78]
call fcn.14003df8c
nop
mov r10, r15
cmp qword [r12 + 0xb0], r15
jbe 0x14003fc1e
mov r9, r15
mov r14, qword [rsp + 0x78]
mov r8, qword [r12 + 0xa8]
mov rax, qword [r12 + 0x120]
cmp qword [r9 + r8], rax
jne 0x14003fc09
mov r8, qword [r9 + r8 + 8]
mov rdx, r8
shr rdx, 3
and rdx, qword [rbp - 0x78]
movzx ecx, byte [rdx + r14]
mov eax, r8d
and eax, 7
bts ecx, eax
mov byte [rdx + r14], cl
shr r8, 0x1e
mov rcx, r8
shr rcx, 3
and rcx, qword [rbp - 0x78]
movzx eax, byte [rcx + r14]
and r8d, 7
bts eax, r8d
mov byte [rcx + r14], al
add r10, rsi
add r9, 0x28
cmp r10, qword [r12 + 0xb0]
jb 0x14003fbb1
mov r14, qword [rbp - 0x68]
lea rcx, [rbp + 0x10]
call fcn.140018884
mov dword [rsp + 0x38], r15d
mov ecx, 0x7fffffff
mov dword [rsp + 0x5c], ecx
mov r8d, r15d
test r14, r14
je 0x14003fcdc
mov rax, r15
mov r12d, eax
imul r11, rax, 0x818
mov eax, dword [rbx + rax*4]
mov dword [r11 + r13], eax
cmp eax, r12d
cmova r12d, eax
cmp eax, ecx
cmovb ecx, eax
mov dword [rsp + 0x5c], ecx
mov byte [r11 + r13 + 0x810], r15b
mov r9, r15
lea r10, [r13 + 8]
add r10, r11
mov esi, 0x100
mov r14d, 1
movzx eax, r9b
mov rdx, qword [rbp + rax*8 + 0x10]
cmp dword [r11 + r13], r15d
jbe 0x14003fcac
mov edi, dword [r11 + r13]
movzx eax, dl
mov rcx, rdx
shr rcx, 8
mov rdx, qword [rbp + rax*8 + 0x10]
xor rdx, rcx
sub rdi, r14
jne 0x14003fc95
mov qword [r10], rdx
add r9, r14
add r10, 8
sub rsi, r14
jne 0x14003fc82
add r8d, r14d
mov eax, r8d
mov r14, qword [rbp - 0x68]
cmp rax, r14
mov ecx, dword [rsp + 0x5c]
jb 0x14003fc47
mov dword [rsp + 0x38], r12d
mov r12, qword [rsp + 0x68]
mov ecx, 0x400000
call fcn.14005a480
mov rsi, rax
mov qword [rsp + 0x60], rax
mov rdi, qword [r12]
mov rcx, qword [rdi]
mov rbx, qword [rcx + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call rbx
mov rdi, qword [r12]
mov rcx, qword [rdi]
mov rbx, qword [rcx + 0x18]
mov rcx, rbx
call qword [fcn.140023ba0]
mov r8d, 0x400000
mov rdx, rsi
mov rcx, rdi
call rbx
movsxd rcx, eax
mov qword [rsp + 0x30], rcx
mov edi, r15d
mov r9d, 1
test r14, r14
je 0x14003fd86
mov rax, r15
imul rbx, rax, 0x818
mov r8d, dword [rbx + r13]
cmp rcx, r8
jb 0x14003fd7c
mov rdx, rsi
xor ecx, ecx
call fcn.1400186c4
mov qword [rbx + r13 + 0x808], rax
mov r9d, 1
mov byte [rbx + r13 + 0x810], r9b
mov rcx, qword [rsp + 0x30]
add edi, r9d
mov eax, edi
cmp rax, r14
jb 0x14003fd47
mov dword [rsp + 0x58], r15d
mov qword [rsp + 0x70], r15
mov r8, r15
mov qword [rsp + 0x50], r15
mov edx, dword [rsp + 0x38]
mov qword [rsp + 0x48], rdx
lea rax, [r15 + 0x40]
cmp rax, rcx
jae 0x14003fec1
cmp byte [r15 + rsi], 0x7b
jne 0x14003fec1
cmp byte [r15 + rsi + 1], 0x52
jne 0x14003fec1
cmp byte [r15 + rsi + 2], 0x42
jne 0x14003fec1
cmp byte [r15 + rsi + 3], 0x7d
jne 0x14003fec1
cmp byte [r15 + rsi + 0x14], r9b
jne 0x14003fec1
mov ebx, dword [r15 + rsi + 0xc]
lea rax, [rdx + rbx]
add rax, r15
cmp rax, rcx
jae 0x14003fec1
mov rax, qword [r12 + 0x120]
mov qword [rbp - 0x10], rax
lea rax, [r15 + r8]
mov qword [rbp], rax
lea rax, [0x140040dc0]
mov qword [rsp + 0x20], rax
mov r9d, 0x20
mov r8, qword [r12 + 0x88]
mov rdx, qword [r12 + 0x80]
lea rcx, [rbp - 0x10]
call fcn.1400615fc
mov rcx, qword [rsp + 0x30]
test rax, rax
je 0x14003fec1
add r15, rbx
xor edi, edi
test r14, r14
mov rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
lea r9d, [rdi + 1]
je 0x14003fda1
xor eax, eax
lea rcx, [r15 + rsi]
mov rsi, rcx
mov r12d, r9d
imul rbx, rax, 0x818
mov r8d, dword [rbx + r13]
mov rdx, rsi
xor ecx, ecx
call fcn.1400186c4
mov qword [rbx + r13 + 0x808], rax
mov byte [rbx + r13 + 0x810], r12b
add edi, r12d
mov eax, edi
cmp rax, r14
jb 0x14003fe6e
mov r12, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
mov r9d, 1
jmp 0x14003fda1
xor r11d, r11d
mov dword [rsp + 0x40], r11d
xor bl, bl
xor edi, edi
test r14, r14
je 0x1400400f7
xor eax, eax
mov rsi, qword [rsp + 0x70]
lea r8d, [r11 + 1]
imul r9, rax, 0x818
cmp byte [r9 + r13 + 0x810], 0
je 0x140040067
mov r8, qword [r9 + r13 + 0x808]
mov qword [rbp - 0x30], r8
mov cl, r8b
and cl, 7
mov edx, 1
shl edx, cl
mov rax, r8
shr rax, 3
and rax, qword [rbp - 0x78]
mov r10, qword [rsp + 0x78]
mov al, byte [rax + r10]
test al, dl
je 0x140040061
shr r8, 0x1e
mov cl, r8b
and cl, 7
mov edx, 1
shl edx, cl
shr r8, 3
and r8, qword [rbp - 0x78]
test byte [r8 + r10], dl
je 0x140040061
mov rax, qword [r12 + 0x120]
mov qword [rbp - 0x38], rax
mov eax, dword [r9 + r13]
mov dword [rbp - 0x18], eax
lea rax, [0x140040d60]
mov qword [rsp + 0x20], rax
mov r9d, 0x28
mov r8, qword [r12 + 0xb0]
mov rdx, qword [r12 + 0xa8]
lea rcx, [rbp - 0x38]
call fcn.1400615fc
mov r8, rax
test rax, rax
je 0x14004005c
mov rcx, qword [rax + 0x18]
mov rdx, qword [rax + 0x10]
cmp rcx, rdx
jbe 0x14003ffab
sub rcx, rdx
jmp 0x14003ffb4
mov rax, rdx
sub rax, rcx
mov rcx, rax
mov r9, qword [rsp + 0x50]
lea r10, [r15 + r9]
cmp r10, rdx
jbe 0x14003ffcd
mov rax, r15
sub rax, rdx
add rax, r9
jmp 0x14003ffd6
mov rax, rdx
sub rax, r15
sub rax, r9
movabs r9, 0x7fffffff7fffffff
cmp qword [r8 + 0x18], r9
je 0x14003ffeb
cmp rax, rcx
jae 0x14004005c
mov qword [r8 + 0x18], r10
mov r11d, dword [rbp - 0x18]
mov dword [rsp + 0x40], r11d
test rsi, rsi
je 0x140040028
mov eax, dword [rsi + 0x20]
cmp eax, dword [r8 + 0x20]
jne 0x140040028
mov rcx, qword [rsi + 0x18]
add rcx, rax
cmp rcx, r10
jne 0x140040028
mov rcx, qword [rsi + 0x10]
add rcx, rax
cmp rcx, rdx
jne 0x140040028
mov r10d, dword [rsp + 0x58]
inc r10d
jmp 0x14004002b
xor r10d, r10d
mov dword [rsp + 0x58], r10d
xor edx, edx
mov eax, dword [rsp + 0x38]
div dword [r8 + 0x20]
inc eax
mov ecx, 5
cmp eax, ecx
cmovb eax, ecx
movzx ebx, bl
cmp r10d, eax
mov ecx, 1
cmova ebx, ecx
mov rsi, r8
mov r8d, ecx
jmp 0x140040067
mov r11d, dword [rsp + 0x40]
mov r8d, 1
add edi, r8d
mov eax, edi
cmp rax, r14
jb 0x14003fee1
mov qword [rsp + 0x70], rsi
mov rsi, qword [rsp + 0x60]
test bl, bl
je 0x1400400f2
mov r8, qword [rsp + 0x48]
test r11d, r11d
je 0x1400400eb
mov ecx, r11d
lea rax, [rcx + r8]
add rax, r15
cmp rax, qword [rsp + 0x30]
jae 0x1400400eb
cmp byte [r15 + rsi], 0
je 0x1400400eb
add r15, rcx
xor edi, edi
xor eax, eax
lea rcx, [r15 + rsi]
mov rsi, rcx
lea r12d, [rdi + 1]
imul rbx, rax, 0x818
mov r8d, dword [rbx + r13]
mov rdx, rsi
xor ecx, ecx
call fcn.1400186c4
mov qword [rbx + r13 + 0x808], rax
mov byte [rbx + r13 + 0x810], r12b
add edi, r12d
mov eax, edi
cmp rax, r14
jb 0x1400400b7
jmp 0x14003fe9d
mov rcx, qword [rsp + 0x30]
jmp 0x1400400fc
mov rcx, qword [rsp + 0x30]
mov r8, qword [rsp + 0x48]
lea rax, [r8 + r15]
cmp rax, rcx
jb 0x1400401a4
mov rbx, rcx
sub rbx, r15
mov qword [rsp + 0x40], rbx
cmp rbx, r8
jne 0x140040194
call fcn.14004b6d0
lea rdx, [r15 + rsi]
mov r8, rbx
mov rcx, rsi
call fcn.14005c2b0
xor r15d, r15d
mov rdx, qword [rsp + 0x30]
sub rdx, rbx
add qword [rsp + 0x50], rdx
mov r14, qword [r12]
mov rax, qword [r14]
mov edi, 0x400000
sub rdi, rbx
add rbx, rsi
mov rsi, qword [rax + 0x18]
mov rcx, rsi
call qword [fcn.140023ba0]
mov r8, rdi
mov rdx, rbx
mov rcx, r14
call rsi
movsxd rdx, eax
add rdx, qword [rsp + 0x40]
mov qword [rsp + 0x30], rdx
mov r8, qword [rbp - 0x48]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [r12]
call fcn.140043460
mov rsi, qword [rsp + 0x60]
mov r14, qword [rbp - 0x68]
mov rcx, qword [rsp + 0x30]
mov eax, dword [rsp + 0x5c]
add rax, r15
cmp rax, rcx
jae 0x140040239
xor r10d, r10d
test r14, r14
je 0x140040221
xor r8d, r8d
lea r12d, [r10 + 1]
imul r9, r8, 0x818
mov r11d, dword [r9 + r13]
add r11, r15
cmp r11, rcx
jae 0x140040208
mov rdx, qword [r9 + r13 + 0x808]
movzx ecx, byte [r15 + rsi]
imul rax, r8, 0x103
add rcx, rax
movzx eax, byte [r11 + rsi]
xor rax, rdx
movzx eax, al
mov rcx, qword [r13 + rcx*8 + 8]
xor rcx, qword [rbp + rax*8 + 0x10]
shr rdx, 8
xor rcx, rdx
mov qword [r9 + r13 + 0x808], rcx
mov rcx, qword [rsp + 0x30]
jmp 0x140040211
mov byte [r9 + r13 + 0x810], 0
add r10d, r12d
mov r8d, r10d
cmp r8, r14
jb 0x1400401b3
mov r12, qword [rsp + 0x68]
mov r9d, 1
add r15, r9
mov rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
jmp 0x14003fda1
mov rcx, rsi
call fcn.14005a488
mov rcx, r13
call fcn.14005a488
mov edx, 0x64
mov r8d, edx
mov rcx, qword [r12]
call fcn.140043460
nop
mov edx, 1
mov rcx, qword [rsp + 0x78]
call fcn.14005a488
nop
lea rcx, [rbp - 0x70]
call fcn.14000143c
mov rcx, qword [rbp + 0x810]
xor rcx, rsp
call fcn.14005a610
lea r11, [rsp + 0x920]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret