Function at 0x140039110
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r13
push r15
sub rsp, 0x80
mov rax, qword [0x1400580f8]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov edi, dword [rcx + 0x10ee0]
mov r15, r9
mov r13, r8
mov eax, dword [rdx + 0x1c]
mov rsi, rdx
mov rbx, rcx
cmp dword [rcx + 0x10edc], edi
je 0x140039191
test eax, eax
jne 0x140039169
mov r8d, 0x32b
lea rdx, str.xz_5.2_src_liblzma_lzmalzma_encoder_optimum_normal.c
lea rcx, str.mf__read_ahead___0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
imul rcx, rdi, 0x2c
mov edx, dword [rcx + rbx + 0x10ef8]
mov eax, edx
sub eax, edi
mov dword [r15], eax
mov eax, dword [rcx + rbx + 0x10efc]
mov dword [r13], eax
mov dword [rbx + 0x10ee0], edx
jmp 0x140039460
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x68], r14
test eax, eax
jne 0x14003929f
cmp dword [rcx + 0x10e94], 0x80
jb 0x1400391b4
call fcn.140037520
cmp dword [rbx + 0x10ed8], 0x10
jb 0x14003929f
xor edi, edi
lea r14, [rbx + 0x10e98]
lea rbp, [0x140041450]
movzx eax, word [rbx + 0x71e2]
lea r14, [r14 + 4]
shr rax, 4
mov edx, edi
and edx, 1
mov r11d, edi
mov ecx, edx
shr r11d, 1
neg ecx
inc edi
shr rcx, 4
and ecx, 0x7f
lea r8d, [rdx + 2]
xor rcx, rax
mov edx, r11d
and edx, 1
shr r11d, 1
mov eax, edx
neg eax
movzx r10d, byte [rcx + rbp]
movzx ecx, word [rbx + r8*2 + 0x71e0]
lea r9d, [rdx + r8*2]
shr rax, 4
mov edx, r11d
and eax, 0x7f
shr rcx, 4
xor rcx, rax
shr r11d, 1
and edx, 1
and r11d, 1
movzx eax, byte [rcx + rbp]
movzx ecx, word [rbx + r9*2 + 0x71e0]
add r10d, eax
shr rcx, 4
mov eax, edx
neg eax
shr rax, 4
and eax, 0x7f
xor rcx, rax
movzx eax, byte [rcx + rbp]
add r10d, eax
lea eax, [rdx + r9*2]
movzx ecx, word [rbx + rax*2 + 0x71e0]
mov eax, r11d
neg eax
shr rcx, 4
shr rax, 4
and eax, 0x7f
xor rcx, rax
movzx eax, byte [rcx + rbp]
add r10d, eax
mov dword [r14 - 4], r10d
cmp edi, 0x10
jb 0x1400391d1
mov dword [rbx + 0x10ed8], 0
mov r14d, dword [rsp + 0xd0]
mov r9, r15
mov r8, r13
mov dword [rsp + 0x20], r14d
mov rdx, rsi
mov rcx, rbx
call fcn.140037820
mov ebp, eax
cmp eax, 0xffffffff
je 0x140039456
movups xmm0, xmmword [rbx + 0x2e4]
mov edi, 1
movups xmmword [rsp + 0x48], xmm0
cmp eax, edi
jbe 0x140039384
mov qword [rsp + 0x70], r12
cmp edi, 0x1000
jb 0x140039308
mov r8d, 0x34c
lea rdx, str.xz_5.2_src_liblzma_lzmalzma_encoder_optimum_normal.c
lea rcx, str.cur___OPTS
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
lea r8, [rbx + 0x2f4]
mov rcx, rsi
lea rdx, [rbx + 0xb84]
call fcn.1400368b0
mov r9d, dword [rsi + 0x60]
mov dword [rbx + 0xb88], eax
cmp eax, r9d
jae 0x14003937f
mov r8d, dword [rsi + 0x18]
lea ecx, [rdi + r14]
mov edx, dword [rsi + 0x24]
mov eax, 0xfff
sub edx, r8d
sub eax, edi
inc edx
cmp edx, eax
cmovae edx, eax
mov rax, qword [rsi]
mov dword [rsp + 0x38], edx
dec rax
mov dword [rsp + 0x30], r9d
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x28], edi
add r8, rax
mov dword [rsp + 0x20], ecx
mov r9d, ebp
mov rcx, rbx
call fcn.140038000
inc edi
mov ebp, eax
cmp edi, eax
jb 0x1400392e6
mov r12, qword [rsp + 0x70]
mov dword [rbx + 0x10edc], edi
mov eax, edi
imul rcx, rax, 0x2c
mov r9d, dword [rcx + rbx + 0x10ef8]
mov r10d, dword [rcx + rbx + 0x10efc]
mov eax, edi
imul rdx, rax, 0x2c
add rdx, rbx
cmp byte [rdx + 0x10ee8], 0
je 0x140039406
mov eax, r9d
imul rcx, rax, 0x2c
lea eax, [r9 - 1]
mov dword [rcx + rbx + 0x10efc], 0xffffffff
mov byte [rcx + rbx + 0x10ee8], 0
mov dword [rcx + rbx + 0x10ef8], eax
cmp byte [rdx + 0x10ee9], 0
je 0x140039406
imul rcx, rax, 0x2c
mov byte [rcx + rbx + 0x10ee8], 0
mov eax, dword [rdx + 0x10eec]
mov dword [rcx + rbx + 0x10ef8], eax
mov eax, dword [rdx + 0x10ef0]
mov dword [rcx + rbx + 0x10efc], eax
mov r8d, r9d
mov eax, r9d
imul rcx, rax, 0x2c
mov edx, r10d
mov r9d, dword [rcx + rbx + 0x10ef8]
mov r10d, dword [rcx + rbx + 0x10efc]
mov dword [rcx + rbx + 0x10ef8], edi
mov edi, r8d
mov dword [rcx + rbx + 0x10efc], edx
test r8d, r8d
jne 0x1400393a0
mov eax, dword [rbx + 0x10ef8]
mov dword [rbx + 0x10ee0], eax
mov dword [r15], eax
mov eax, dword [rbx + 0x10efc]
mov dword [r13], eax
mov rbp, qword [rsp + 0x78]
mov r14, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14003b700
add rsp, 0x80
pop r15
pop r13
pop rdi
pop rsi
pop rbx
ret