Function at 0x1802cf214
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x178
mov r15, r9
mov ebx, r8d
mov esi, edx
mov r14, rcx
mov ebp, dword [rsp + 0x1e8]
mov ecx, ebp
call fcn.18010df24
mov r12d, eax
test eax, eax
jne 0x1802cf581
mov ecx, dword [rsp + 0x1e0]
test ebx, ebx
je 0x1802cf266
call fcn.1802afaf4
mov r12d, eax
test eax, eax
jne 0x1802cf581
mov eax, dword [rsp + 0x1f0]
mov r13d, eax
shr r13d, 3
and eax, 7
cmp eax, 1
sbb r13d, 0xffffffff
mov r12d, 0x20012
mov edx, r13d
sub edx, ebx
jb 0x1802cf581
movsxd rax, ebp
imul rdi, rax, 0x78
lea rax, [0x180611330]
mov ecx, dword [rdi + rax + 0xc]
lea eax, [rbx + rcx]
add eax, 2
cmp r13d, eax
jb 0x1802cf581
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x58], rcx
mov edi, r13d
mov rcx, rdi
call fcn.1802fb6e2
mov qword [rsp + 0x30], rax
mov rcx, rdi
call fcn.1802fb6e2
mov r12, rax
mov rcx, rdi
call fcn.1802fb6e2
mov rcx, rdi
mov rdi, r12
mov r12, rax
call fcn.1802fb6e2
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1802cf309
test rdi, rdi
je 0x1802cf309
test r12, r12
je 0x1802cf309
test rax, rax
jne 0x1802cf356
test rcx, rcx
je 0x1802cf319
mov rsi, rax
call fcn.1802fbeb6
mov rax, rsi
test rdi, rdi
je 0x1802cf32c
mov rcx, rdi
mov rsi, rax
call fcn.1802fbeb6
mov rax, rsi
test r12, r12
je 0x1802cf33f
mov rcx, r12
mov rsi, rax
call fcn.1802fbeb6
mov rax, rsi
mov r12d, 0xc
test rax, rax
je 0x1802cf581
mov rcx, rax
jmp 0x1802cf57c
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x50], rdi
test ebx, ebx
je 0x1802cf39c
movsxd rax, dword [rsp + 0x1e0]
lea rdi, [rax + rax*4]
shl rdi, 4
lea rax, [0x18060ebb0]
mov rcx, qword [rsp + 0x40]
mov edx, ebx
mov r8, r15
call qword [rdi + rax + 0x28]
mov r12d, 0x20007
cmp eax, ebx
jne 0x1802cf559
lea rcx, [rsp + 0x68]
mov rax, qword [rsp + 0x48]
lea rdx, [0x180611330]
call qword [rax + rdx + 0x58]
mov r12d, eax
test eax, eax
jne 0x1802cf559
mov edx, 8
mov rdi, qword [rsp + 0x30]
mov rcx, rdi
call fcn.1800708d4
lea rcx, [rsp + 0x68]
mov rdx, rdi
mov r8d, 8
mov rax, qword [rsp + 0x48]
lea rdi, [0x180611330]
call qword [rax + rdi + 0x60]
mov r12d, eax
test eax, eax
jne 0x1802cf559
mov rax, qword [rsp + 0x48]
lea rcx, [0x180611330]
lea rdi, [rax + rcx]
add rdi, 0x60
lea rcx, [rsp + 0x68]
mov rdx, r14
mov r8d, esi
call qword [rdi]
mov r12d, eax
test eax, eax
jne 0x1802cf559
lea rcx, [rsp + 0x68]
mov rdx, qword [rsp + 0x40]
mov r8d, ebx
call qword [rdi]
mov r12d, eax
test eax, eax
jne 0x1802cf559
lea rcx, [rsp + 0x68]
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x48]
lea rdi, [0x180611330]
call qword [rax + rdi + 0x68]
mov r12d, eax
test eax, eax
jne 0x1802cf559
mov r14, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
sub esi, r14d
lea r15d, [rsi - 2]
mov rdi, qword [rsp + 0x30]
mov rcx, rdi
xor edx, edx
mov r8, r15
call fcn.1802f6e84
dec esi
mov byte [rdi + r15], 1
mov r8d, ebx
add rdi, rsi
mov rcx, rdi
mov rdx, qword [rsp + 0x40]
call fcn.18017fd34
mov edi, r14d
not edi
add edi, r13d
mov dword [rsp + 0x20], edi
mov ecx, ebp
mov rdx, qword [rsp + 0x38]
mov r8d, r14d
mov r9, qword [rsp + 0x50]
call fcn.18020dba4
mov r12d, eax
test eax, eax
jne 0x1802cf559
mov rbx, qword [rsp + 0x200]
test edi, edi
mov rbp, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x50]
je 0x1802cf4f3
mov eax, edi
xor ecx, ecx
mov dl, byte [rsi + rcx]
xor byte [rbp + rcx], dl
inc rcx
cmp rcx, rax
jne 0x1802cf4e4
cmp dword [rbx], r13d
jae 0x1802cf503
mov dword [rbx], r13d
mov r12d, 0x20004
jmp 0x1802cf559
mov rsi, qword [rsp + 0x1f8]
mov edi, edi
mov rcx, rsi
mov rdx, qword [rsp + 0x30]
mov r8, rdi
call fcn.18017fd34
add rdi, rsi
mov rcx, rdi
mov rdx, qword [rsp + 0x38]
mov r8, qword [rsp + 0x58]
call fcn.18017fd34
lea eax, [r13 - 1]
mov ecx, 1
sub ecx, dword [rsp + 0x1f0]
lea ecx, [rcx + r13*8]
mov edx, 0xff
shr edx, cl
mov byte [rsi + rax], 0xbc
and byte [rsi], dl
mov dword [rbx], r13d
xor r12d, r12d
mov rcx, qword [rsp + 0x38]
call fcn.1802fbeb6
mov rcx, qword [rsp + 0x40]
call fcn.1802fbeb6
mov rcx, qword [rsp + 0x50]
call fcn.1802fbeb6
mov rcx, qword [rsp + 0x30]
call fcn.1802fbeb6
mov eax, r12d
add rsp, 0x178
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret