Function at 0x18007f190
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push r12
push r13
mov eax, 0x58
call fcn.1801c83e0
sub rsp, rax
mov rax, qword [rcx + 0x180]
mov rsi, rcx
mov rdi, r9
mov qword [rsp + 0x30], rax
mov rax, qword [rcx + 0x38]
mov r13, r8
lea rcx, [r9 + rax]
movabs rax, 0xfffffffe0
mov r12, rdx
cmp rcx, rax
ja 0x18007f459
cmp rcx, r9
jb 0x18007f459
cmp dword [rsi + 0x174], 0
mov qword [rsp + 0x50], rbp
mov qword [rsi + 0x38], rcx
mov qword [rsp + 0x48], r14
je 0x18007f20e
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
call fcn.18007e0c0
mov dword [rsi + 0x174], 0
movzx eax, byte [rsi + 0xd]
mov ebp, dword [rsi + 0x170]
movzx r14d, byte [rsi + 0xc]
shl r14d, 8
mov dword [rsp + 0x80], ebp
or r14d, eax
movzx eax, byte [rsi + 0xe]
shl r14d, 8
or r14d, eax
movzx eax, byte [rsi + 0xf]
shl r14d, 8
or r14d, eax
test ebp, ebp
je 0x18007f28e
test rdi, rdi
je 0x18007f279
movzx edx, byte [r12]
mov ecx, ebp
inc r13
movzx eax, byte [rcx + rsi + 0x10]
inc r12
dec rdi
xor al, dl
mov byte [r13 - 1], al
xor byte [rcx + rsi + 0x40], dl
inc ebp
and ebp, 0xf
mov dword [rsp + 0x80], ebp
jne 0x18007f245
jmp 0x18007f281
test ebp, ebp
jne 0x18007f43c
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
call fcn.18007e0c0
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x40], r15
mov r15, qword [rsp + 0xa0]
cmp rdi, 0xc00
jb 0x18007f357
movabs rax, 0xaaaaaaaaaaaaaaab
mul rdi
mov rbx, rdx
shr rbx, 0xb
mov rax, rbx
imul rax, rax, 0xfffffffffffff400
add rdi, rax
mov qword [rsp + 0x98], rdi
nop dword [rax]
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
mov r9d, 0xc00
mov r8, r12
call fcn.18007e200
mov r9, qword [rsp + 0x30]
mov r8d, 0xc0
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x20], rsi
call r15
add r14d, 0xc0
add r13, 0xc00
mov eax, r14d
add r12, 0xc00
mov byte [rsi + 0xf], r14b
shr eax, 0x18
mov byte [rsi + 0xc], al
mov eax, r14d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r14d
shr eax, 8
dec rbx
mov byte [rsi + 0xe], al
jne 0x18007f2e0
mov rdi, qword [rsp + 0x98]
mov ebp, dword [rsp + 0x80]
mov r15, rdi
and r15, 0xfffffffffffffff0
je 0x18007f3bf
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
mov rbx, r15
mov r9, r15
mov r8, r12
shr rbx, 4
call fcn.18007e200
mov r9, qword [rsp + 0x30]
mov r8, rbx
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x20], rsi
call qword [rsp + 0xa0]
add r14d, ebx
add r13, r15
mov eax, r14d
add r12, r15
mov byte [rsi + 0xf], r14b
shr eax, 0x18
mov byte [rsi + 0xc], al
mov eax, r14d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r14d
shr eax, 8
sub rdi, r15
mov byte [rsi + 0xe], al
mov r15, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x88]
test rdi, rdi
je 0x18007f43c
mov r8, qword [rsp + 0x30]
lea rdx, [rsi + 0x10]
mov rcx, rsi
call qword [rsi + 0x178]
inc r14d
sub r12, rsi
mov eax, r14d
sub r13, rsi
mov byte [rsi + 0xf], r14b
shr eax, 0x18
mov byte [rsi + 0xc], al
mov eax, r14d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r14d
shr eax, 8
mov byte [rsi + 0xe], al
movsxd rax, ebp
add ebp, edi
lea rdx, [rax + rsi + 0x40]
nop word [rax + rax]
movzx ecx, byte [r12 + rdx - 0x40]
movzx eax, byte [rdx - 0x30]
inc rdx
xor byte [rdx - 1], cl
xor al, cl
dec rdi
mov byte [r13 + rdx - 0x41], al
jne 0x18007f420
mov r14, qword [rsp + 0x48]
mov dword [rsi + 0x170], ebp
mov rbp, qword [rsp + 0x50]
xor eax, eax
add rsp, 0x58
pop r13
pop r12
pop rdi
pop rsi
ret
or eax, 0xffffffff
add rsp, 0x58
pop r13
pop r12
pop rdi
pop rsi
ret