Function at 0x140021260
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push rdi
push r14
sub rsp, 0x38
mov qword [rsp + 0x50], rbx
mov edi, r9d
mov qword [rsp + 0x58], rbp
mov r14, rdx
mov ebp, dword [rsp + 0x70]
mov rbx, rcx
mov qword [rsp + 0x60], rsi
mov esi, dword [rcx + 0xb90]
and esi, ebp
mov r11d, r8d
cmp r8d, 0xffffffff
jne 0x140021434
mov qword [rsp + 0x30], r15
cmp r9d, 1
je 0x1400212be
mov r8d, 0xf1
lea rdx, str.xz_5.2_src_liblzma_lzmalzma_encoder.c
lea rcx, str.len__1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
movsxd rdx, dword [rbx + 0x2e0]
xor r10d, r10d
shl rdx, 4
mov r9d, 8
mov eax, esi
mov ecx, r9d
add rax, 0x35ce
lea rsi, [rbx + 0xb9c]
add rdx, rax
mov rax, qword [rbx + 0x18]
mov dword [rbx + rax*4 + 0x28], r10d
lea rdx, [rbx + rdx*2]
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rdx
inc qword [rbx + 0x18]
sub cl, byte [rbx + 0xb94]
mov r15, qword [r14]
mov r11d, dword [r14 + 0x18]
mov eax, r11d
sub eax, dword [r14 + 0x1c]
mov r8d, eax
dec eax
movzx edx, byte [rax + r15]
mov eax, dword [rbx + 0xb98]
shr edx, cl
and eax, ebp
mov ecx, dword [rbx + 0xb94]
movzx ebp, byte [r8 + r15]
shl eax, cl
add edx, eax
lea rcx, [rdx + rdx*2]
shl rcx, 9
add rsi, rcx
cmp dword [rbx + 0x2e0], 7
jge 0x140021398
lea r8d, [r10 + 1]
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x18]
dec r9d
movzx ecx, r9b
mov edx, ebp
shr edx, cl
and edx, 1
mov dword [rbx + rax*4 + 0x28], edx
mov eax, r8d
lea r8d, [rdx + r8*2]
lea rcx, [rsi + rax*2]
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rcx
inc qword [rbx + 0x18]
test r9d, r9d
jne 0x140021360
jmp 0x14002140b
sub r11d, dword [rbx + 0x2e4]
lea edx, [rbp + 0x100]
sub r11d, dword [r14 + 0x1c]
mov r9d, 0x100
dec r11d
movzx r8d, byte [r11 + r15]
nop word [rax + rax]
mov rax, qword [rbx + 0x18]
mov ecx, edx
shr ecx, 7
add r8d, r8d
and ecx, 1
mov dword [rbx + rax*4 + 0x28], ecx
mov eax, r9d
and eax, r8d
mov ecx, edx
add eax, r9d
shr ecx, 8
add ecx, eax
add edx, edx
mov rax, qword [rbx + 0x18]
lea rcx, [rsi + rcx*2]
mov qword [rbx + rax*8 + 0x110], rcx
mov eax, r8d
inc qword [rbx + 0x18]
xor eax, edx
not eax
and r9d, eax
cmp edx, 0x10000
jb 0x1400213c0
mov eax, dword [rbx + 0x2e0]
mov r15, qword [rsp + 0x30]
cmp eax, 3
jle 0x140021428
lea r10d, [rax - 3]
cmp eax, 9
jle 0x140021428
lea r10d, [rax - 6]
mov dword [rbx + 0x2e0], r10d
jmp 0x140021666
movsxd rax, dword [rcx + 0x2e0]
mov r8d, 1
shl rax, 4
add rax, 0x35ce
mov r9d, esi
add rax, r9
lea rcx, [rcx + rax*2]
mov rax, qword [rbx + 0x18]
mov dword [rbx + rax*4 + 0x28], r8d
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rcx
inc qword [rbx + 0x18]
movsxd rdx, dword [rbx + 0x2e0]
mov rax, qword [rbx + 0x18]
add rdx, 0x368e
lea rdx, [rbx + rdx*2]
lea rcx, [rbx + rax*4]
cmp r11d, 4
jae 0x14002163e
mov dword [rcx + 0x28], r8d
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rdx
inc qword [rbx + 0x18]
mov rax, qword [rbx + 0x18]
lea rdx, [rbx + rax*4]
movsxd rax, dword [rbx + 0x2e0]
add rax, 0x369a
lea rcx, [rbx + rax*2]
test r11d, r11d
jne 0x140021518
xor r10d, r10d
mov dword [rdx + 0x28], r10d
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rcx
inc qword [rbx + 0x18]
movsxd rax, dword [rbx + 0x2e0]
mov rdx, qword [rbx + 0x18]
shl rax, 4
add rax, 0x36be
add rax, r9
cmp edi, r8d
setne r10b
mov dword [rbx + rdx*4 + 0x28], r10d
lea rcx, [rbx + rax*2]
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rcx
inc qword [rbx + 0x18]
jmp 0x1400215df
mov r9d, dword [rbx + r11*4 + 0x2e4]
mov dword [rdx + 0x28], r8d
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rcx
inc qword [rbx + 0x18]
movsxd rdx, dword [rbx + 0x2e0]
mov rax, qword [rbx + 0x18]
add rdx, 0x36a6
lea rdx, [rbx + rdx*2]
lea rcx, [rbx + rax*4]
cmp r11d, r8d
jne 0x14002156c
xor r10d, r10d
mov dword [rcx + 0x28], r10d
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rdx
inc qword [rbx + 0x18]
jmp 0x1400215cc
mov dword [rcx + 0x28], r8d
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rdx
lea eax, [r11 - 2]
inc qword [rbx + 0x18]
movsxd rdx, dword [rbx + 0x2e0]
mov rcx, qword [rbx + 0x18]
add rdx, 0x36b2
mov dword [rbx + rcx*4 + 0x28], eax
lea rdx, [rbx + rdx*2]
mov rax, qword [rbx + 0x18]
mov qword [rbx + rax*8 + 0x110], rdx
inc qword [rbx + 0x18]
cmp r11d, 3
jne 0x1400215c0
mov eax, dword [rbx + 0x2ec]
mov dword [rbx + 0x2f0], eax
mov eax, dword [rbx + 0x2e8]
mov dword [rbx + 0x2ec], eax
mov eax, dword [rbx + 0x2e4]
mov dword [rbx + 0x2e8], eax
mov dword [rbx + 0x2e4], r9d
cmp edi, r8d
jne 0x140021600
cmp dword [rbx + 0x2e0], 7
mov eax, 0xb
mov ecx, 9
cmovl eax, ecx
mov dword [rbx + 0x2e0], eax
jmp 0x140021666
movzx eax, byte [rbx + 0xb8c]
lea rdx, [rbx + 0xba48]
mov r9d, edi
mov byte [rsp + 0x20], al
mov r8d, esi
mov rcx, rbx
call fcn.1400216b0
cmp dword [rbx + 0x2e0], 7
mov eax, 0xb
mov r9d, 8
cmovl eax, r9d
mov dword [rbx + 0x2e0], eax
jmp 0x140021666
xor r10d, r10d
lea r8d, [r11 - 4]
mov dword [rcx + 0x28], r10d
mov r9d, edi
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov qword [rbx + rax*8 + 0x110], rdx
mov edx, esi
inc qword [rbx + 0x18]
call fcn.140022cd0
mov eax, dword [r14 + 0x1c]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
cmp eax, edi
jae 0x14002169b
mov r8d, 0x106
lea rdx, str.xz_5.2_src_liblzma_lzmalzma_encoder.c
lea rcx, str.mf__read_ahead___len
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov eax, dword [r14 + 0x1c]
sub eax, edi
mov dword [r14 + 0x1c], eax
add rsp, 0x38
pop r14
pop rdi
ret