Function at 0x140020270
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x140062608]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xb8]
mov r13, rcx
mov r12, qword [rsp + 0xb0]
mov ecx, 0x28
mov qword [rsp + 0x28], rax
mov r15, r9
mov ebp, r8d
mov r14, rdx
call fcn.14001cf70
mov rbx, rax
test rax, rax
jne 0x1400202ca
lea eax, [rbx + 1]
jmp 0x1400206c9
xor edx, edx
mov qword [rsp + 0x20], 0xffffffffffffffff
mov rax, qword [rsp + 0x20]
mov ecx, 4
mov qword [rbx + 0xc], rax
cmp ebp, ecx
mov qword [rsp + 0x20], 0xffffffffffffffff
mov rax, qword [rsp + 0x20]
mov qword [rbx + 0x14], rax
movzx eax, bpl
cmovl ecx, eax
mov qword [rsp + 0xa0], rdi
mov qword [rbx + 0x20], rdx
mov word [rbx + 0xa], dx
mov byte [rbx], cl
test cl, cl
je 0x14002033c
nop dword [rax]
nop dword [rax + rax]
movsxd rax, edx
inc edx
lea rcx, [rax + rbx]
movzx eax, byte [r14 + rax]
mov byte [rcx + 1], al
mov byte [rcx + 5], 0xff
movzx eax, byte [rbx]
cmp edx, eax
jl 0x140020320
mov rdx, rbx
mov rcx, r13
call qword [r13]
mov edi, 4
mov byte [rsp + 0x30], 4
mov dword [rsp + 0x35], 0xffffffff
mov esi, eax
cmp ebp, edi
jle 0x1400203aa
nop
cmp esi, 0xff
jge 0x1400203aa
movsxd rax, edi
lea rdx, [rsp + 0x30]
mov byte [rsp + 0x30], 4
mov ecx, dword [rax + r14 - 3]
mov dword [rsp + 0x31], ecx
mov rcx, r13
call qword [r13]
cmp eax, esi
jle 0x1400203a4
movsd xmm0, qword [rsp + 0x30]
mov esi, eax
movsd qword [rbx], xmm0
movzx ecx, byte [rsp + 0x38]
mov byte [rbx + 8], cl
lea ecx, [rdi - 3]
mov word [rbx + 0xa], cx
inc edi
cmp edi, ebp
jl 0x140020360
mov r14, qword [rsp + 0x28]
xor ebp, ebp
mov qword [r12], rbx
mov dword [r14], esi
mov esi, dword [r15]
test sil, 0x10
je 0x140020519
mov rbx, qword [r12]
mov edi, ebp
test rbx, rbx
je 0x140020485
mov ecx, 0x28
call fcn.14001cf70
mov rdx, rax
test rax, rax
je 0x1400204b9
mov byte [rax + 1], bpl
lea r9, [rax + 1]
mov word [rax + 5], 0xffff
mov ecx, ebp
mov word [rax + 2], bp
mov word [rax + 7], 0xffff
mov byte [rax + 4], bpl
movzx r8d, byte [rbx]
test r8b, r8b
je 0x140020444
movzx eax, r8b
lea r10, [rbx + 1]
nop dword [rax]
movzx r8d, al
cmp ecx, 2
jge 0x140020444
movzx eax, byte [r10]
inc ecx
mov byte [r9], al
inc r10
movzx eax, byte [rbx]
add r9, 2
movzx r8d, al
cmp ecx, eax
jl 0x140020420
mov eax, 4
movzx ecx, r8b
add ecx, ecx
cmp ecx, eax
cmovb eax, ecx
mov byte [rdx], al
mov rax, qword [rbx + 0xc]
mov qword [rdx + 0xc], rax
mov rax, qword [rbx + 0x14]
mov qword [rdx + 0x14], rax
movzx eax, word [rbx + 0xa]
add ax, ax
mov qword [rdx + 0x20], rdi
mov word [rdx + 0xa], ax
mov rdi, rdx
mov rbx, qword [rbx + 0x20]
test rbx, rbx
jne 0x1400203d4
mov rcx, qword [r12]
test sil, 8
je 0x1400204ff
test rcx, rcx
je 0x140020515
mov rax, qword [rcx + 0x20]
mov rdx, rcx
test rax, rax
je 0x1400204b0
mov rdx, rax
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x1400204a4
mov qword [rdx + 0x20], rdi
mov rdi, rcx
jmp 0x140020515
mov rcx, qword [r12]
mov esi, 1
test rcx, rcx
je 0x1400204d8
mov rbx, qword [rcx + 0x20]
call fcn.14001cef0
mov rcx, rbx
test rbx, rbx
jne 0x1400204c7
test rdi, rdi
je 0x1400204f4
nop dword [rax]
mov rbx, qword [rdi + 0x20]
mov rcx, rdi
call fcn.14001cef0
mov rdi, rbx
test rbx, rbx
jne 0x1400204e0
mov qword [r12], rbp
mov eax, esi
jmp 0x1400206c1
test rcx, rcx
je 0x140020515
mov rbx, qword [rcx + 0x20]
call fcn.14001cef0
mov rcx, rbx
test rbx, rbx
jne 0x140020504
mov qword [r12], rdi
test sil, 4
je 0x1400205ad
mov rcx, qword [r12]
lea rdx, [rsp + 0x20]
call fcn.14001f1c0
mov rcx, qword [r12]
mov edi, eax
test eax, eax
je 0x14002057c
test rcx, rcx
je 0x140020551
mov rbx, qword [rcx + 0x20]
call fcn.14001cef0
mov rcx, rbx
test rbx, rbx
jne 0x140020540
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x140020571
nop dword [rax + rax]
mov rbx, qword [rcx + 0x20]
call fcn.14001cef0
mov rcx, rbx
test rbx, rbx
jne 0x140020560
mov qword [r12], rbp
mov eax, edi
jmp 0x1400206c1
test rcx, rcx
jne 0x140020588
mov rcx, qword [rsp + 0x20]
jmp 0x1400205a9
mov rax, qword [rcx + 0x20]
mov rdx, rcx
test rax, rax
je 0x1400205a0
mov rdx, rax
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x140020594
mov rax, qword [rsp + 0x20]
mov qword [rdx + 0x20], rax
mov qword [r12], rcx
bt esi, 0x13
jae 0x14002069b
mov rbx, qword [r12]
test rbx, rbx
je 0x14002067d
movzx r14d, byte [r15 + 4]
movzx esi, byte [r15 + 5]
nop
mov edi, r14d
cmp r14d, esi
ja 0x14002066b
nop dword [rax]
mov ecx, 0x28
call fcn.14001cf70
mov r9, rax
test rax, rax
je 0x1400206e6
movzx r8d, byte [rbx]
xor edx, edx
test r8b, r8b
je 0x14002062f
mov r8, rbx
lea rcx, [rax + 1]
sub r8, rax
nop dword [rax + rax]
movzx eax, dil
inc edx
xor al, byte [rcx + r8]
mov byte [rcx], al
mov byte [rcx + 4], 0xff
lea rcx, [rcx + 1]
movzx eax, byte [rbx]
cmp edx, eax
jl 0x140020610
movzx r8d, al
mov ecx, 4
movzx eax, r8b
cmp r8b, cl
cmovb ecx, eax
inc edi
mov byte [r9], cl
mov rax, qword [rbx + 0xc]
mov qword [r9 + 0xc], rax
mov rax, qword [rbx + 0x14]
mov qword [r9 + 0x14], rax
movzx eax, word [rbx + 0xa]
mov qword [r9 + 0x20], rbp
mov rbp, r9
mov word [r9 + 0xa], ax
cmp edi, esi
jle 0x1400205e0
mov rbx, qword [rbx + 0x20]
test rbx, rbx
jne 0x1400205d0
mov r14, qword [rsp + 0x28]
mov rcx, qword [r12]
test rcx, rcx
je 0x140020697
mov rbx, qword [rcx + 0x20]
call fcn.14001cef0
mov rcx, rbx
test rbx, rbx
jne 0x140020686
mov qword [r12], rbp
mov rbx, qword [r12]
test rbx, rbx
je 0x1400206bf
mov rdx, rbx
mov rcx, r13
call qword [r13]
cmp eax, dword [r14]
jge 0x1400206b6
mov dword [r14], eax
mov rbx, qword [rbx + 0x20]
test rbx, rbx
jne 0x1400206a4
xor eax, eax
mov rdi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400464f0
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [r12]
mov esi, 1
test rcx, rcx
je 0x140020705
mov rbx, qword [rcx + 0x20]
call fcn.14001cef0
mov rcx, rbx
test rbx, rbx
jne 0x1400206f4
test rbp, rbp
je 0x140020724
nop word [rax + rax]
mov rbx, qword [rbp + 0x20]
mov rcx, rbp
call fcn.14001cef0
mov rbp, rbx
test rbx, rbx
jne 0x140020710
mov qword [r12], 0
mov eax, esi
jmp 0x1400206c1