Function at 0x180077840
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push r12
push r14
mov eax, 0x58
call fcn.1800c7940
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 r14, r8
lea rcx, [r9 + rax]
movabs rax, 0xfffffffe0
mov r12, rdx
cmp rcx, rax
ja 0x180077b07
cmp rcx, r9
jb 0x180077b07
cmp dword [rsi + 0x174], 0
mov qword [rsp + 0x50], rbp
mov qword [rsi + 0x38], rcx
mov qword [rsp + 0x48], r13
je 0x1800778be
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
call fcn.1800769e0
mov dword [rsi + 0x174], 0
movzx eax, byte [rsi + 0xd]
mov ebp, dword [rsi + 0x170]
movzx r13d, byte [rsi + 0xc]
shl r13d, 8
mov dword [rsp + 0x80], ebp
or r13d, eax
movzx eax, byte [rsi + 0xe]
shl r13d, 8
or r13d, eax
movzx eax, byte [rsi + 0xf]
shl r13d, 8
or r13d, eax
test ebp, ebp
je 0x18007793c
test rdi, rdi
je 0x180077927
mov ecx, ebp
inc r14
inc r12
movzx eax, byte [rcx + rsi + 0x10]
dec rdi
xor al, byte [r12 - 1]
mov byte [r14 - 1], al
xor byte [rcx + rsi + 0x40], al
inc ebp
and ebp, 0xf
mov dword [rsp + 0x80], ebp
jne 0x1800778f5
jmp 0x18007792f
test ebp, ebp
jne 0x180077aea
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
call fcn.1800769e0
mov r10, qword [rsp + 0xa0]
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x40], r15
cmp rdi, 0xc00
jb 0x180077a0e
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
mov rdi, qword [rsp + 0x30]
nop dword [rax]
mov r9, rdi
mov r8d, 0xc0
mov rdx, r14
mov rcx, r12
mov qword [rsp + 0x20], rsi
call r10
add r13d, 0xc0
lea rdx, [rsi + 0x60]
mov eax, r13d
lea rcx, [rsi + 0x40]
mov r9d, 0xc00
shr eax, 0x18
mov r8, r14
mov byte [rsi + 0xf], r13b
mov byte [rsi + 0xc], al
mov eax, r13d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r13d
shr eax, 8
mov byte [rsi + 0xe], al
call fcn.180076b20
mov r10, qword [rsp + 0xa0]
add r14, 0xc00
add r12, 0xc00
sub rbx, 1
jne 0x180077990
mov rdi, qword [rsp + 0x98]
mov ebp, dword [rsp + 0x80]
mov r15, rdi
and r15, 0xfffffffffffffff0
je 0x180077a72
mov r9, qword [rsp + 0x30]
mov rbx, r15
mov rdx, r14
shr rbx, 4
mov rcx, r12
mov qword [rsp + 0x20], rsi
mov r8, rbx
call r10
add r13d, ebx
lea rdx, [rsi + 0x60]
mov eax, r13d
lea rcx, [rsi + 0x40]
mov r9, r15
shr eax, 0x18
mov r8, r14
mov byte [rsi + 0xf], r13b
mov byte [rsi + 0xc], al
mov eax, r13d
add r12, r15
shr eax, 0x10
sub rdi, r15
mov byte [rsi + 0xd], al
mov eax, r13d
shr eax, 8
mov byte [rsi + 0xe], al
call fcn.180076b20
add r14, r15
mov r15, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x88]
test rdi, rdi
je 0x180077aea
mov r8, qword [rsp + 0x30]
lea rdx, [rsi + 0x10]
mov rcx, rsi
call qword [rsi + 0x178]
inc r13d
sub r12, r14
mov eax, r13d
mov byte [rsi + 0xf], r13b
shr eax, 0x18
mov byte [rsi + 0xc], al
mov eax, r13d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r13d
shr eax, 8
mov byte [rsi + 0xe], al
movsxd rax, ebp
add ebp, edi
lea rcx, [rax + rsi + 0x40]
lea rdx, [rax + r14]
nop dword [rax]
movzx eax, byte [r12 + rdx]
inc rcx
inc rdx
xor al, byte [rcx - 0x31]
mov byte [rdx - 1], al
xor byte [rcx - 1], al
sub rdi, 1
jne 0x180077ad0
mov r13, qword [rsp + 0x48]
mov dword [rsi + 0x170], ebp
mov rbp, qword [rsp + 0x50]
xor eax, eax
add rsp, 0x58
pop r14
pop r12
pop rdi
pop rsi
ret
or eax, 0xffffffff
add rsp, 0x58
pop r14
pop r12
pop rdi
pop rsi
ret