Function at 0x140089494
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp - 0x40], r8
mov qword [rbp - 0x38], rdx
mov r8, rcx
mov eax, 0x40
call fcn.140074a70
sub rsp, rax
mov r15, rsp
mov rbx, qword [rcx + 0x18]
cmp rbx, 0xffffffffffffffff
je 0x140089c4c
mov r13, qword [r8 + 8]
movabs rax, 0x1596902ea2322c83
lea rcx, [rax + 8]
xor rcx, rax
movabs rax, 0xdacee43692e1ee98
lea r12, [rax + 1]
xor r12, rax
add r12, r13
mov rax, r12
shr rax, 3
movabs rdx, 0xd2d3fb9876516803
lea r9, [rdx + 1]
xor r9, rdx
imul r9, rax
cmp r13, rcx
cmovb r9, r13
mov rax, r9
shr rax, 1
cmp rbx, rax
mov qword [rbp - 0x18], r8
mov qword [rbp - 0x10], rbx
jae 0x1400895c5
mov rcx, r12
shr rcx, 4
xor eax, eax
test r12b, 0xf
setne al
mov rbx, qword [r8]
add rax, rcx
je 0x140089582
movabs r8, 0x1b27a6ddde6fbdc2
xor ecx, ecx
lea rdx, [r8 + 0x10]
xor rdx, r8
movdqa xmm0, xmmword [0x14008b650]
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rbx + rcx]
por xmm1, xmm0
movdqa xmmword [rbx + rcx], xmm1
add rcx, rdx
dec rax
jne 0x140089568
mov qword [rbp - 8], r9
movabs rax, 0x230f6684a81471a2
lea rcx, [rax + 0x10]
xor rcx, rax
cmp r12, rcx
jae 0x14008964d
lea rcx, [rbx + 0x10]
sub rsp, 0x20
mov rdx, rbx
mov r8, r12
call fcn.140084cc0
add rsp, 0x20
test r12, r12
jne 0x140089657
jmp 0x140089889
movabs rax, 0xc71e6e364a1584fa
lea rcx, [rax + 1]
xor rcx, rax
add rcx, rbx
movabs rax, 0xac1aa58767fa00be
lea rdx, [rax + 1]
xor rdx, rax
add r9, rdx
cmp rcx, r9
cmova r9, rcx
movabs rax, 0xe27e1a17c52ac593
lea rcx, [rax + 8]
xor rcx, rax
cmp r9, rcx
jae 0x14008989e
movabs rax, 0xd1d5b8b66a343de0
lea rcx, [rax + 4]
xor rcx, rax
movabs rax, 0xe87e3adf865c8268
lea rdx, [rax + 4]
xor rdx, rax
movabs rax, 0x2fb6b1d2fe6031b5
lea rsi, [rax + 8]
xor rsi, rax
cmp r9, rcx
cmovb rsi, rdx
jmp 0x140089902
movdqu xmm0, xmmword [rbx]
movdqu xmmword [rbx + r12], xmm0
lea rax, [rbx - 0x20]
mov qword [rbp - 0x28], rax
movabs rdx, 0xe5733d836da224f8
movabs r14, 0xe4b651d40bd2ec14
movabs rax, 0xa75e0d0410a6e4ca
movabs rdi, 0x92afb33405478825
movabs rsi, 0x23184f19a4c845de
lea rcx, [rdx + 1]
xor rdx, rcx
lea ecx, [rax + 5]
xor ecx, eax
mov dword [rbp - 0x20], ecx
xor r12d, r12d
mov qword [rbp], rdx
cmp byte [rbx + r12], 0x80
jne 0x140089879
mov rax, r12
mov ecx, dword [rbp - 0x20]
shl rax, cl
mov r15, rbx
sub r15, rax
add r15, 0xffffffffffffffe0
mov rax, r12
shl rax, 5
mov rcx, qword [rbp - 0x28]
sub rcx, rax
mov qword [rbp - 0x30], rcx
mov rax, qword [rbp - 0x30]
mov r8, qword [rax]
sub rsp, 0x20
mov rcx, qword [rbp - 0x38]
mov rdx, qword [rbp - 0x40]
call fcn.140067118
add rsp, 0x20
mov rcx, rax
and rcx, r13
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb r8d, xmm0
mov rdx, rcx
test r8d, r8d
jne 0x140089730
mov rdx, rcx
xor r9d, r9d
lea r8, [rdi + 0x10]
xor r8, rdi
add r9, r8
add rdx, r9
and rdx, r13
movdqu xmm0, xmmword [rbx + rdx]
pmovmskb r8d, xmm0
test r8d, r8d
je 0x140089711
bsf r8d, r8d
add r8, rdx
and r8, r13
cmp byte [rbx + r8], 0
js 0x14008974d
movdqa xmm0, xmmword [rbx]
pmovmskb edx, xmm0
bsf r8d, edx
mov rdx, r12
sub rdx, rcx
mov r9, r8
sub r9, rcx
xor r9, rdx
and r9, r13
movabs rdx, 0x88143f283dc63ea4
lea rcx, [rdx + 0x10]
xor rcx, rdx
cmp r9, rcx
jb 0x140089805
movabs rdx, 0x1006a51440793980
lea ecx, [rdx + 5]
xor ecx, edx
mov rdx, r8
shl rdx, cl
neg rdx
add rdx, rbx
add rdx, 0xffffffffffffffe0
mov r9b, byte [rbx + r8]
movabs r10, 0xadb2d40034240444
lea ecx, [r10 + 0x39]
xor ecx, r10d
shr rax, cl
lea rcx, [r8 - 0x10]
and rcx, r13
movabs r11, 0xb65321ac07da9d2d
lea r10, [r11 + 0x10]
xor r10, r11
add r10, rcx
mov byte [rbx + r8], al
mov byte [rbx + r10], al
cmp r9b, 0xff
je 0x14008983c
xor eax, eax
mov cl, byte [r15 + rax]
mov r8b, byte [rdx + rax]
mov byte [r15 + rax], r8b
mov byte [rdx + rax], cl
lea rcx, [rsi + 1]
xor rcx, rsi
add rax, rcx
lea rcx, [r14 + 0x20]
xor rcx, r14
cmp rax, rcx
jne 0x1400897db
jmp 0x1400896d7
movabs rdx, 0x42b718b131ad4cd
lea ecx, [rdx + 0x27]
xor ecx, edx
shr rax, cl
lea rcx, [r12 - 0x10]
and rcx, r13
movabs r8, 0x94f2815985ab0868
lea rdx, [r8 + 0x10]
xor rdx, r8
add rdx, rcx
mov byte [rbx + r12], al
mov byte [rbx + rdx], al
jmp 0x140089875
lea rax, [r12 - 0x10]
and rax, r13
movabs r8, 0x1b3b644ec5b24ba5
lea rcx, [r8 + 0x10]
xor rcx, r8
add rcx, rax
mov al, 0xff
mov byte [rbx + r12], al
mov byte [rbx + rcx], al
movdqu xmm0, xmmword [r15]
movdqu xmm1, xmmword [r15 + 0x10]
movdqu xmmword [rdx + 0x10], xmm1
movdqu xmmword [rdx], xmm0
mov rdx, qword [rbp]
lea rax, [r12 + rdx]
cmp r12, r13
mov r12, rax
jne 0x1400896a7
mov rcx, qword [rbp - 8]
sub rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x18]
mov qword [rax + 0x10], rcx
jmp 0x140089c31
mov rax, r9
shr rax, 0x3d
jne 0x140089c4c
shl r9, 3
movabs rax, 0xb3eedbf6af430fa8
lea rcx, [rax + 7]
xor rcx, rax
mov rax, r9
xor edx, edx
div rcx
dec rax
bsr rcx, rax
not ecx
mov rsi, 0xffffffffffffffff
shr rsi, cl
movabs rax, 0x7fffffffffffffe
cmp rsi, rax
ja 0x140089c4c
movabs rax, 0x925593a3c2f49f8
lea rcx, [rax + 1]
xor rcx, rax
add rsi, rcx
mov rdi, rsi
shl rdi, 5
movabs rax, 0xaff9caffb959e083
lea rdx, [rax + 0x10]
xor rdx, rax
add rdx, rsi
add rdx, rdi
setb al
movabs rcx, 0x7ffffffffffffff0
cmp rdx, rcx
seta cl
or cl, al
cmp cl, 1
je 0x140089c4c
mov al, byte [0x1400a5058]
sub rsp, 0x20
xor ecx, ecx
call fcn.14004fc65
add rsp, 0x20
test rax, rax
je 0x140089c4c
mov r14, rax
add r14, rdi
lea r12, [rsi - 1]
movabs rax, 0x7964a2fdae47ec85
lea rcx, [rax + 7]
xor rax, rcx
mov rcx, rsi
shr rcx, 3
movabs rdx, 0x809888b9abc863da
lea rdi, [rdx + 3]
xor rdi, rdx
imul rdi, rcx
cmp rsi, rax
cmovb rdi, r12
movabs rax, 0x5e69b1a1f53f3ea6
lea r8, [rax + 0x10]
xor r8, rax
add r8, rsi
sub rsp, 0x20
mov rcx, r14
mov dl, 0xff
call fcn.140085360
add rsp, 0x20
movabs rax, 0x98f6cf658e2c4c20
lea rcx, [rax + 0x10]
xor rcx, rax
mov qword [r15 + 0x10], rcx
mov qword [r15 + 0x18], r14
mov qword [r15 + 0x20], r12
mov qword [rbp - 0x48], rdi
mov qword [r15 + 0x28], rdi
mov qword [rbp - 8], r15
mov qword [r15 + 0x30], 0
test rbx, rbx
je 0x140089b79
mov rax, qword [rbp - 0x18]
mov r15, qword [rax]
lea rax, [r15 - 0x20]
mov qword [rbp - 0x20], rax
movabs rbx, 0x50a553e977bde380
movabs r13, 0x3e50e9b728deb7c0
movdqa xmm0, xmmword [r15]
pmovmskb esi, xmm0
not esi
xor edi, edi
mov rcx, qword [rbp - 0x10]
mov qword [rbp], r15
mov qword [rbp - 0x30], rcx
test si, si
jne 0x140089a5d
movdqa xmm0, xmmword [r15 + 0x10]
add r15, 0x10
pmovmskb esi, xmm0
lea rax, [r13 + 0x10]
xor rax, r13
add rdi, rax
cmp esi, 0xffff
je 0x140089a3b
not esi
bsf eax, esi
add rax, rdi
mov qword [rbp - 0x28], rax
shl rax, 5
mov rcx, qword [rbp - 0x20]
sub rcx, rax
mov r8, qword [rcx]
sub rsp, 0x20
mov rcx, qword [rbp - 0x38]
mov rdx, qword [rbp - 0x40]
call fcn.140067118
add rsp, 0x20
mov rcx, rax
and rcx, r12
movdqu xmm0, xmmword [r14 + rcx]
pmovmskb edx, xmm0
test edx, edx
jne 0x140089abf
xor r8d, r8d
lea rdx, [rbx + 0x10]
xor rdx, rbx
add r8, rdx
add rcx, r8
and rcx, r12
movdqu xmm0, xmmword [r14 + rcx]
pmovmskb edx, xmm0
test edx, edx
je 0x140089aa1
bsf edx, edx
add rdx, rcx
and rdx, r12
cmp byte [r14 + rdx], 0
js 0x140089adb
movdqa xmm0, xmmword [r14]
pmovmskb ecx, xmm0
bsf edx, ecx
lea rcx, [rdx - 0x10]
and rcx, r12
movabs r9, 0xbe695310880c06c1
lea r8, [r9 + 0x10]
xor r8, r9
add r8, rcx
movabs r9, 0xa262a6834872c2cc
lea ecx, [r9 + 0x29]
xor ecx, r9d
shr rax, cl
mov byte [r14 + rdx], al
mov byte [r14 + r8], al
movabs rax, 0x54eed52cffae0b81
lea ecx, [rax + 3]
xor ecx, eax
mov r9, qword [rbp - 0x28]
shl r9, cl
lea eax, [rsi - 1]
and eax, esi
movabs r8, 0xfd7398be603494db
lea ecx, [r8 + 3]
xor ecx, r8d
shl rdx, cl
mov rcx, qword [rbp]
sub rcx, r9
movdqu xmm0, xmmword [rcx - 0x20]
movdqu xmm1, xmmword [rcx - 0x10]
mov rcx, r14
sub rcx, rdx
neg rdx
movdqu xmmword [r14 + rdx - 0x20], xmm0
movdqu xmmword [rcx - 0x10], xmm1
mov rcx, qword [rbp - 0x30]
dec rcx
mov esi, eax
test rcx, rcx
jne 0x140089a32
movabs r8, 0xe0c1bfefc831c5a8
movabs rdx, 0x8f4d98cd0f9e5496
mov rax, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x48]
sub rcx, rax
mov r11, qword [rbp - 8]
mov qword [r11 + 0x28], rcx
mov qword [r11 + 0x30], rax
xor eax, eax
lea rcx, [rdx + 1]
xor rcx, rdx
lea rdx, [r8 + 4]
xor rdx, r8
mov r10, qword [rbp - 0x18]
mov r8, qword [r10 + rax*8]
mov r9, qword [r11 + rax*8 + 0x18]
mov qword [r10 + rax*8], r9
mov qword [r11 + rax*8 + 0x18], r8
add rax, rcx
cmp rax, rdx
jne 0x140089bb8
mov rcx, qword [r11 + 0x20]
test rcx, rcx
je 0x140089c31
mov rax, rcx
shl rax, 5
movabs rdx, 0xe9fd671ae8d37c90
lea r8, [rdx + 0x20]
xor r8, rdx
add r8, rax
movabs rdx, 0x12f2227f8e9c77ac
lea r9, [rdx + 0x11]
xor r9, rdx
add r9, rcx
add r9, r8
je 0x140089c31
mov r8, qword [r11 + 0x18]
sub r8, rax
add r8, 0xffffffffffffffe0
mov rcx, qword [0x1400a5b60]
sub rsp, 0x20
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
add rsp, 0x20
movabs rax, 0x8000000000000001
lea rsp, [rbp + 8]
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
ud2