Function at 0x1400401dc
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 [0x14008b710]
xor rax, rsp
mov qword [rbp + 0x810], rax
mov r12, rcx
mov qword [rsp + 0x68], rcx
mov ecx, 0x67
call fcn.140006624
mov rcx, qword [r12]
call fcn.1400224b4
mov qword [rbp - 0x48], rax
xor edx, edx
movabs r8, 0x7fffffff7fffffff
mov rcx, qword [r12]
call fcn.140043bc8
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 0x1400402b9
mov rcx, qword [r12 + 0xd0]
mov rax, qword [r12 + 0x120]
cmp qword [rbx + rcx], rax
jne 0x1400402a0
mov edx, dword [rbx + rcx + 8]
lea rcx, [rbp - 0x70]
call fcn.1400417f0
add rdi, rsi
add rbx, 0x10
cmp rdi, qword [r12 + 0xd8]
jb 0x14004027d
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.14005ac18
mov r13, rax
lea r9, [0x140041530]
mov r8d, 0x20
mov rdx, qword [r12 + 0x88]
mov rcx, qword [r12 + 0x80]
call fcn.14005f3b0
mov rdx, qword [r12 + 0xb0]
lea rcx, [rsp + 0x78]
call fcn.14003e6ec
nop
mov r10, r15
cmp qword [r12 + 0xb0], r15
jbe 0x14004038e
mov r9, r15
mov r14, qword [rsp + 0x78]
mov r8, qword [r12 + 0xa8]
mov rax, qword [r12 + 0x120]
cmp qword [r9 + r8], rax
jne 0x140040379
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 0x140040321
mov r14, qword [rbp - 0x68]
lea rcx, [rbp + 0x10]
call fcn.140018af4
mov dword [rsp + 0x38], r15d
mov ecx, 0x7fffffff
mov dword [rsp + 0x5c], ecx
mov r8d, r15d
test r14, r14
je 0x14004044c
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 0x14004041c
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 0x140040405
mov qword [r10], rdx
add r9, r14
add r10, 8
sub rsi, r14
jne 0x1400403f2
add r8d, r14d
mov eax, r8d
mov r14, qword [rbp - 0x68]
cmp rax, r14
mov ecx, dword [rsp + 0x5c]
jb 0x1400403b7
mov dword [rsp + 0x38], r12d
mov r12, qword [rsp + 0x68]
mov ecx, 0x400000
call fcn.14005ac18
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.14005bf80]
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.14005bf80]
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 0x1400404f6
mov rax, r15
imul rbx, rax, 0x818
mov r8d, dword [rbx + r13]
cmp rcx, r8
jb 0x1400404ec
mov rdx, rsi
xor ecx, ecx
call fcn.140018934
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 0x1400404b7
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 0x140040631
cmp byte [r15 + rsi], 0x7b
jne 0x140040631
cmp byte [r15 + rsi + 1], 0x52
jne 0x140040631
cmp byte [r15 + rsi + 2], 0x42
jne 0x140040631
cmp byte [r15 + rsi + 3], 0x7d
jne 0x140040631
cmp byte [r15 + rsi + 0x14], r9b
jne 0x140040631
mov ebx, dword [r15 + rsi + 0xc]
lea rax, [rdx + rbx]
add rax, r15
cmp rax, rcx
jae 0x140040631
mov rax, qword [r12 + 0x120]
mov qword [rbp - 0x10], rax
lea rax, [r15 + r8]
mov qword [rbp], rax
lea rax, [0x140041530]
mov qword [rsp + 0x20], rax
mov r9d, 0x20
mov r8, qword [r12 + 0x88]
mov rdx, qword [r12 + 0x80]
lea rcx, [rbp - 0x10]
call fcn.140061d3c
mov rcx, qword [rsp + 0x30]
test rax, rax
je 0x140040631
add r15, rbx
xor edi, edi
test r14, r14
mov rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
lea r9d, [rdi + 1]
je 0x140040511
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.140018934
mov qword [rbx + r13 + 0x808], rax
mov byte [rbx + r13 + 0x810], r12b
add edi, r12d
mov eax, edi
cmp rax, r14
jb 0x1400405de
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 0x140040511
xor r11d, r11d
mov dword [rsp + 0x40], r11d
xor bl, bl
xor edi, edi
test r14, r14
je 0x140040867
xor eax, eax
mov rsi, qword [rsp + 0x70]
lea r8d, [r11 + 1]
imul r9, rax, 0x818
cmp byte [r9 + r13 + 0x810], 0
je 0x1400407d7
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 0x1400407d1
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 0x1400407d1
mov rax, qword [r12 + 0x120]
mov qword [rbp - 0x38], rax
mov eax, dword [r9 + r13]
mov dword [rbp - 0x18], eax
lea rax, [0x1400414d0]
mov qword [rsp + 0x20], rax
mov r9d, 0x28
mov r8, qword [r12 + 0xb0]
mov rdx, qword [r12 + 0xa8]
lea rcx, [rbp - 0x38]
call fcn.140061d3c
mov r8, rax
test rax, rax
je 0x1400407cc
mov rcx, qword [rax + 0x18]
mov rdx, qword [rax + 0x10]
cmp rcx, rdx
jbe 0x14004071b
sub rcx, rdx
jmp 0x140040724
mov rax, rdx
sub rax, rcx
mov rcx, rax
mov r9, qword [rsp + 0x50]
lea r10, [r15 + r9]
cmp r10, rdx
jbe 0x14004073d
mov rax, r15
sub rax, rdx
add rax, r9
jmp 0x140040746
mov rax, rdx
sub rax, r15
sub rax, r9
movabs r9, 0x7fffffff7fffffff
cmp qword [r8 + 0x18], r9
je 0x14004075b
cmp rax, rcx
jae 0x1400407cc
mov qword [r8 + 0x18], r10
mov r11d, dword [rbp - 0x18]
mov dword [rsp + 0x40], r11d
test rsi, rsi
je 0x140040798
mov eax, dword [rsi + 0x20]
cmp eax, dword [r8 + 0x20]
jne 0x140040798
mov rcx, qword [rsi + 0x18]
add rcx, rax
cmp rcx, r10
jne 0x140040798
mov rcx, qword [rsi + 0x10]
add rcx, rax
cmp rcx, rdx
jne 0x140040798
mov r10d, dword [rsp + 0x58]
inc r10d
jmp 0x14004079b
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 0x1400407d7
mov r11d, dword [rsp + 0x40]
mov r8d, 1
add edi, r8d
mov eax, edi
cmp rax, r14
jb 0x140040651
mov qword [rsp + 0x70], rsi
mov rsi, qword [rsp + 0x60]
test bl, bl
je 0x140040862
mov r8, qword [rsp + 0x48]
test r11d, r11d
je 0x14004085b
mov ecx, r11d
lea rax, [rcx + r8]
add rax, r15
cmp rax, qword [rsp + 0x30]
jae 0x14004085b
cmp byte [r15 + rsi], 0
je 0x14004085b
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.140018934
mov qword [rbx + r13 + 0x808], rax
mov byte [rbx + r13 + 0x810], r12b
add edi, r12d
mov eax, edi
cmp rax, r14
jb 0x140040827
jmp 0x14004060d
mov rcx, qword [rsp + 0x30]
jmp 0x14004086c
mov rcx, qword [rsp + 0x30]
mov r8, qword [rsp + 0x48]
lea rax, [r8 + r15]
cmp rax, rcx
jb 0x140040914
mov rbx, rcx
sub rbx, r15
mov qword [rsp + 0x40], rbx
cmp rbx, r8
jne 0x140040904
call fcn.14004bd9c
lea rdx, [r15 + rsi]
mov r8, rbx
mov rcx, rsi
call fcn.14005ca40
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.14005bf80]
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.140043bc8
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 0x1400409a9
xor r10d, r10d
test r14, r14
je 0x140040991
xor r8d, r8d
lea r12d, [r10 + 1]
imul r9, r8, 0x818
mov r11d, dword [r9 + r13]
add r11, r15
cmp r11, rcx
jae 0x140040978
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 0x140040981
mov byte [r9 + r13 + 0x810], 0
add r10d, r12d
mov r8d, r10d
cmp r8, r14
jb 0x140040923
mov r12, qword [rsp + 0x68]
mov r9d, 1
add r15, r9
mov rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
jmp 0x140040511
mov rcx, rsi
call fcn.14005ac10
mov rcx, r13
call fcn.14005ac10
mov edx, 0x64
mov r8d, edx
mov rcx, qword [r12]
call fcn.140043bc8
nop
mov edx, 1
mov rcx, qword [rsp + 0x78]
call fcn.14005ac10
nop
lea rcx, [rbp - 0x70]
call fcn.14000159c
mov rcx, qword [rbp + 0x810]
xor rcx, rsp
call fcn.14005ada0
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