Function at 0x1802d8034
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov esi, r9d
mov rbp, r8
mov r15d, edx
mov r12, rcx
mov rax, qword [rsp + 0xe0]
mov ebx, dword [rsp + 0xc8]
mov dword [rax], 0
mov ecx, ebx
call fcn.18010df24
mov r14d, eax
test eax, eax
jne 0x1802d831e
mov ecx, dword [rsp + 0xc0]
mov eax, ecx
shr eax, 3
and ecx, 7
cmp ecx, 1
sbb eax, 0xffffffff
mov r14d, 0x20012
cmp eax, r15d
jne 0x1802d831e
movsxd rcx, ebx
imul rcx, rcx, 0x78
lea rdx, [0x18060d510]
mov edi, dword [rcx + rdx + 0xc]
lea ecx, [rdi + rdi]
add eax, 0xfffffffe
cmp ecx, eax
jae 0x1802d831e
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x4c], esi
mov esi, r15d
mov rcx, rsi
call fcn.1802fb6e2
mov rbp, rax
mov rcx, rsi
call fcn.1802fb6e2
mov rcx, rdi
mov rdi, rax
mov r13, rcx
call fcn.1802fb6e2
mov rsi, rax
test rbp, rbp
je 0x1802d80fa
test rdi, rdi
je 0x1802d80fa
test rsi, rsi
jne 0x1802d812b
test rbp, rbp
je 0x1802d8107
mov rcx, rbp
call fcn.1802fbeb6
test rdi, rdi
je 0x1802d8114
mov rcx, rdi
call fcn.1802fbeb6
mov r14d, 0xc
test rsi, rsi
je 0x1802d831e
mov rcx, rsi
jmp 0x1802d8319
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rbp
xor r14d, r14d
cmp byte [r12], 0
jne 0x1802d8302
mov rdi, r13
lea rdx, [r12 + 1]
mov rcx, rsi
mov r8, r13
mov qword [rsp + 0x30], rsi
call fcn.18017fd34
lea edx, [r13 + 1]
not r13d
add r13d, r15d
add rdx, r12
mov rbp, qword [rsp + 0x38]
mov rcx, rbp
mov r8, r13
call fcn.18017fd34
mov dword [rsp + 0x2c], r15d
mov dword [rsp + 0x20], edi
mov ecx, ebx
mov rdx, rbp
mov r8d, r13d
mov r9, qword [rsp + 0x40]
call fcn.18020dba4
mov rsi, qword [rsp + 0x30]
mov r14d, eax
test eax, eax
jne 0x1802d8302
test edi, edi
mov r9, qword [rsp + 0x40]
je 0x1802d81bd
xor eax, eax
mov cl, byte [r9 + rax]
xor byte [rsi + rax], cl
inc rax
cmp rax, rdi
jne 0x1802d81ae
mov dword [rsp + 0x20], r13d
mov ecx, ebx
mov rdx, rsi
mov r8d, edi
call fcn.18020dba4
mov rsi, qword [rsp + 0x30]
mov r14d, eax
test eax, eax
jne 0x1802d8302
test r13d, r13d
mov rdx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
je 0x1802d81ff
xor eax, eax
mov cl, byte [rbp + rax]
xor byte [rdx + rax], cl
inc rax
cmp rax, r13
jne 0x1802d81f0
mov dword [rsp + 0x2c], r15d
mov rbp, qword [rsp + 0x50]
lea rax, [rsp + 0x2c]
test rbp, rbp
je 0x1802d8224
mov qword [rsp + 0x20], rax
mov ecx, ebx
mov rdx, rbp
mov r8d, dword [rsp + 0x4c]
jmp 0x1802d822e
mov qword [rsp + 0x20], rax
mov ecx, ebx
xor r8d, r8d
mov r9, qword [rsp + 0x30]
call fcn.180218554
mov rsi, qword [rsp + 0x30]
mov r14d, eax
test eax, eax
jne 0x1802d8302
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov r8, rdi
call fcn.18023f1c4
xor r14d, r14d
test eax, eax
je 0x1802d8269
mov rsi, qword [rsp + 0x30]
jmp 0x1802d8302
mov dword [rsp + 0x2c], edi
cmp edi, r13d
jb 0x1802d8279
mov rsi, qword [rsp + 0x30]
jmp 0x1802d8296
mov rcx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
mov eax, edi
cmp byte [rcx + rax], 0
jne 0x1802d8296
inc edi
mov dword [rsp + 0x2c], edi
cmp edi, r13d
jb 0x1802d8283
mov r14d, 0x20005
cmp edi, r13d
je 0x1802d8302
mov eax, edi
mov rcx, qword [rsp + 0x38]
cmp byte [rcx + rax], 1
jne 0x1802d8302
mov rcx, qword [rsp + 0xd8]
inc edi
mov dword [rsp + 0x2c], edi
mov eax, r13d
sub eax, edi
mov r14d, 0x20004
cmp eax, dword [rcx]
mov dword [rcx], eax
ja 0x1802d8302
mov rcx, qword [rsp + 0xd0]
mov r8d, eax
mov eax, edi
mov rdx, qword [rsp + 0x38]
add rdx, rax
call fcn.18017fd34
mov rsi, qword [rsp + 0x30]
add dword [rsp + 0x2c], r13d
mov rax, qword [rsp + 0xe0]
mov dword [rax], 1
xor r14d, r14d
mov rcx, rsi
call fcn.1802fbeb6
mov rcx, qword [rsp + 0x40]
call fcn.1802fbeb6
mov rcx, qword [rsp + 0x38]
call fcn.1802fbeb6
mov eax, r14d
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret