Function at 0x653df660
Capabilities:
Encode data using xor

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov r13, qword [rcx + 0x38]
mov rbp, rdx
mov rdx, qword [rcx + 0x20]
mov rsi, rcx
mov rdi, r8
mov r12d, r9d
mov rax, qword [r13 + 0x78]
add rax, 7
and rax, 0xfffffffffffffff8
add rax, r8
cmp rax, rdx
jle 0x653df6c4
lea rbx, [rdx + r8 + 0x1000]
lea rcx, [r13 + 0x58]
and rbx, 0xfffffffffffff001
cmp qword [r13 + 0x58], 0
je 0x653df795
mov r8, rbx
call fcn.653fe3a0
mov r13, qword [rsi + 0x38]
mov qword [rsi + 0x20], rbx
mov r8, qword [r13 + 0x60]
test r8, r8
je 0x653df8f0
test rdi, rdi
jle 0x653df920
lea r9, [rdi + rbp]
mov rdx, rbp
xor eax, eax
mov ecx, eax
add rdx, 1
and ecx, 1
shl rax, cl
movzx ecx, byte [rdx - 1]
xor rax, rcx
cmp r9, rdx
jne 0x653df6e3
mov rbx, qword [r13 + 0x68]
lea rdx, [rbx - 1]
and rax, rdx
mov rbx, qword [r8 + rax*8]
lea r14, [rax*8]
test rbx, rbx
jne 0x653df728
jmp 0x653df760
mov rbx, qword [rbx]
test rbx, rbx
je 0x653df760
cmp qword [rbx + 0x18], rdi
jne 0x653df720
mov rcx, qword [rbx + 0x10]
add rcx, qword [r13 + 0x58]
mov r8, rdi
mov rdx, rbp
call fcn.65401380
test eax, eax
jne 0x653df720
mov rax, rbx
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
xor edx, edx
mov rcx, rsi
call fcn.653dd6e0
test r12d, r12d
mov rbx, rax
mov rax, qword [rsi + 0x38]
cmove r12d, edi
cmp r12d, 4
mov rcx, qword [rax + 0x78]
ja case.default.0x653df793
lea r8, [0x65410530]
mov r12d, r12d
movsxd rdx, dword [r8 + r12*4]
add rdx, r8
jmp rdx
mov rdx, rbx
call fcn.653fe370
jmp 0x653df6bc
add rcx, 7
and rcx, 0xfffffffffffffff8
mov qword [rax + 0x78], rcx
mov qword [rbx + 0x10], rcx
add rcx, qword [rax + 0x58]
mov r8, rdi
mov qword [rbx + 0x18], rdi
mov rdx, rbp
call fcn.653fe2d0
mov rax, qword [rsi + 0x38]
add r14, qword [rax + 0x60]
add qword [rax + 0x78], rdi
mov rdi, qword [rax + 0x70]
mov rdx, qword [r14]
lea rcx, [rdi + 1]
mov qword [rbx], rdx
mov rdx, qword [rax + 0x68]
mov qword [r14], rbx
mov qword [rax + 0x70], rcx
mov r8, rdx
mov rax, rdx
sar rax, 1
sar r8, 2
add rax, r8
cmp rcx, rax
jle 0x653df745
lea rax, [rdx + rdx]
cmp rdx, rax
jge 0x653df745
lea rcx, [rsp + 0x28]
shl rdx, 4
call fcn.653fe370
mov r12, qword [rsi + 0x38]
mov rax, qword [r12 + 0x68]
test rax, rax
jle 0x653df8a9
mov rbp, qword [r12 + 0x60]
mov r11, qword [rsp + 0x28]
lea rdi, [rax + rax - 1]
lea r13, [rbp + rax*8]
mov r8, qword [rbp]
test r8, r8
je 0x653df8a0
mov r10, qword [r12 + 0x58]
nop
mov r14, qword [r8 + 0x18]
mov r9, qword [r8]
mov rax, qword [r8 + 0x10]
test r14, r14
jle 0x653df930
add r14, rax
lea rdx, [r10 + rax]
xor eax, eax
add r14, r10
mov ecx, eax
add rdx, 1
and ecx, 1
shl rax, cl
movzx ecx, byte [rdx - 1]
xor rax, rcx
cmp r14, rdx
jne 0x653df870
and rax, rdi
lea rax, [r11 + rax*8]
mov rdx, qword [rax]
test r9, r9
mov qword [r8], rdx
mov qword [rax], r8
mov r8, r9
jne 0x653df850
add rbp, 8
cmp r13, rbp
jne 0x653df840
lea rcx, [r12 + 0x60]
call fcn.653fe3f0
mov rax, qword [rsi + 0x38]
mov rdx, qword [rsp + 0x28]
shl qword [rax + 0x68], 1
mov qword [rax + 0x60], rdx
jmp 0x653df745
add rcx, 1
and rcx, 0xfffffffffffffffe
mov qword [rax + 0x78], rcx
jmp case.0x653df793.0
add rcx, 3
and rcx, 0xfffffffffffffffc
mov qword [rax + 0x78], rcx
jmp case.0x653df793.0
lea rcx, [r13 + 0x60]
mov qword [r13 + 0x68], 0x10
mov edx, pe_nt_image_headers64
call fcn.653fe370
mov r13, qword [rsi + 0x38]
test rdi, rdi
mov r8, qword [r13 + 0x60]
jg 0x653df6da
nop word [rax + rax]
xor eax, eax
jmp 0x653df6fb
mov rax, r11
jmp 0x653df88f