Function at 0x140035880
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
movdqa xmmword [rsp + 0x60], xmm6
mov rsi, rcx
lea r15, str.UnexpectedError
test r8, r8
je 0x140035e43
cmp byte [rdx], 0
je 0x140035a0b
mov rbx, r8
lea rdi, [r8 + 7]
mov r14d, 8
mov r8d, 8
cmp rdi, 8
jb 0x140035903
test rdi, rdi
js 0x140035ee1
mov r12, rdx
mov r13, r9
movabs rdx, 0x7ffffffffffffff8
and rdx, rdi
mov ecx, 8
call fcn.140082900
test rax, rax
je 0x140035ee1
mov r8, rax
mov r9, r13
mov rdx, r12
shr rdi, 3
xor eax, eax
mov ecx, ebx
and ecx, 7
setne al
cmovne r14, rcx
mov rcx, rbx
shr rcx, 3
add rax, rcx
cmp rax, rdi
ja 0x140035e30
test rdi, rdi
je 0x140035990
lea rcx, [rdi - 1]
movabs r10, 0x1fffffffffffffff
and r10, rcx
mov rcx, r8
cmp r10, 3
jb 0x14003597b
inc r10
mov r11, r10
and r11, 0xfffffffffffffffc
lea rcx, [r8 + r11*8]
xor r12d, r12d
pxor xmm0, xmm0
nop dword [rax]
movdqu xmmword [r8 + r12*8], xmm0
movdqu xmmword [r8 + r12*8 + 0x10], xmm0
add r12, 4
cmp r11, r12
jne 0x140035960
cmp r10, r11
je 0x140035990
lea r10, [r8 + rdi*8]
nop
mov qword [rcx], 0
add rcx, 8
cmp rcx, r10
jne 0x140035980
test rax, rax
je 0x140035a17
lea rcx, [rax - 1]
cmp rcx, rdi
jae 0x140035e1b
mov r10b, 1
xor ecx, ecx
xor r11d, r11d
cmp rcx, rbx
jae 0x1400359f7
lea r12, [r11 + 1]
dec r14
xor r13d, r13d
nop dword [rax]
movzx ebp, byte [rdx + rcx]
inc rcx
shl r13, 8
or r13, rbp
sub r14, 1
jb 0x1400359db
cmp rbx, rcx
jne 0x1400359c0
jmp 0x1400359f7
not r11
add r11, rax
mov qword [r8 + r11*8], r13
mov r14d, 8
mov r11, r12
cmp r12, rax
setb r10b
jne 0x1400359ae
test r10b, 1
jne 0x140035e30
cmp rcx, rbx
je 0x140035a22
jmp 0x140035e30
lea r15, [0x1401cc208]
jmp 0x140035e43
xor ecx, ecx
cmp rcx, rbx
jne 0x140035e30
cmp rdi, 0x80
jbe 0x140035a39
mov eax, 8
lea r15, [0x1401cc275]
jmp 0x140035aa3
cmp rdi, 4
jae 0x140035a5b
lea r15, str.UnexpectedError
test rdi, rdi
je 0x140035e43
mov eax, 0xf
movq xmm6, rax
jmp 0x140035aa7
mov rbp, r9
mov rbx, r8
mov rcx, r8
mov rdx, rdi
call fcn.140196b60
test rax, rax
je 0x140035a7f
mov eax, 0x10
lea r15, [0x1401cc240]
jmp 0x140035aa0
mov edx, 3
mov rcx, rbx
mov r8, rdi
call fcn.140196d00
test rax, rax
je 0x140035abf
mov eax, 0xf
lea r15, str.UnexpectedError
mov r8, rbx
movd xmm6, eax
mov rcx, qword [0x14024d108]
xor edx, edx
call sub.kernel32.dll_HeapFree
movq r14, xmm6
jmp 0x140035e49
mov r13, qword [rsp + 0xe8]
mov r15, rbx
mov rcx, qword [rbx]
call fcn.140199160
mov r14, rax
mov rcx, rbx
mov rdx, rdi
call fcn.140034da0
cmp r13, 0x3ff
jbe 0x140035ee1
mov r12, rax
shr eax, 2
mov ecx, r12d
shr ecx, 1
or ecx, eax
or ecx, r12d
and ecx, 1
lea rax, [r12 + rcx*8]
and rax, 0xfffffffffffffff8
cmp rax, r13
jae 0x140035b19
lea r15, [0x1401cc27d]
mov r8, rbx
jmp 0x140035b2d
cmp r12, qword [rsp + 0xf0]
mov r8, rbx
jbe 0x140035b46
lea r15, [0x1401cc275]
mov rcx, qword [0x14024d108]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov r14d, 8
jmp 0x140035e49
movq xmm6, r14
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x40], rdi
movdqu xmmword [rsp + 0x48], xmm6
mov qword [rsp + 0x58], r12
lea rdx, [rdi*8]
mov ecx, 8
call fcn.140082900
test rax, rax
je 0x140035ee1
mov r15, rax
mov r13, rdi
shl r13, 6
xor ecx, ecx
cmp rdi, 4
jb 0x140035bdf
mov rdx, r15
mov rax, rbx
sub rdx, rbx
cmp rdx, 0x20
jb 0x140035be2
movabs rcx, 0xffffffffffffffc
and rcx, rdi
xor edx, edx
pcmpeqd xmm0, xmm0
movdqu xmm1, xmmword [rax + rdx*8]
movdqu xmm2, xmmword [rax + rdx*8 + 0x10]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [r15 + rdx*8], xmm1
movdqu xmmword [r15 + rdx*8 + 0x10], xmm2
add rdx, 4
cmp rcx, rdx
jne 0x140035baf
cmp rdi, rcx
jne 0x140035be2
jmp 0x140035c4f
mov rax, rbx
mov r8, rdi
mov rdx, rcx
and r8, 3
je 0x140035c08
mov r9, rcx
lea rdx, [r9 + 1]
mov r10, qword [rax + r9*8]
not r10
mov qword [r15 + r9*8], r10
mov r9, rdx
dec r8
jne 0x140035bf1
sub rcx, rdi
cmp rcx, 0xfffffffffffffffc
ja 0x140035c4f
mov rcx, qword [rax + rdx*8]
not rcx
mov qword [r15 + rdx*8], rcx
mov rcx, qword [rax + rdx*8 + 8]
not rcx
mov qword [r15 + rdx*8 + 8], rcx
mov rcx, qword [rax + rdx*8 + 0x10]
not rcx
mov qword [r15 + rdx*8 + 0x10], rcx
mov rcx, qword [rax + rdx*8 + 0x18]
not rcx
mov qword [r15 + rdx*8 + 0x18], rcx
lea rcx, [rdx + 4]
mov rdx, rcx
cmp rdi, rcx
jne 0x140035c11
or byte [r15], 1
sub r13, r12
je 0x140035c89
mov rax, qword [r15 + rdi*8 - 8]
mov ecx, r13d
shl rax, cl
shr rax, cl
mov qword [r15 + rdi*8 - 8], rax
cmp r13, 1
adc r13, 0
mov rcx, r15
mov rdx, r15
mov r8, rbx
mov r9, rdi
call fcn.140196ef0
dec r13
jne 0x140035c73
lea r13, [rdi - 1]
mov rcx, r15
mov rdx, r15
mov r8, rbx
mov r9, rdi
call fcn.140196ef0
sub r13, 1
jae 0x140035c8d
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r15
mov r8, r15
mov r13, rbx
mov r9, rbx
call fcn.1400ef340
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r15
mov r8, r15
mov r9, rbx
call fcn.1400ef340
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r15
mov r8, r15
mov r9, rbx
call fcn.1400ef340
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r15
mov r8, r15
mov r9, rbx
call fcn.1400ef340
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r15
mov r8, r15
mov r9, rbx
call fcn.1400ef340
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r15
mov r8, r15
mov r9, rbx
call fcn.1400ef340
test rbx, rbx
je 0x140035e0c
mov r8, rbx
mov eax, 8
lea rcx, [0x1401cc275]
mov r13, qword [rsp + 0xe0]
cmp r13, 5
ja 0x140035e82
test r13, r13
je 0x140035da0
cmp byte [rbp], 0
je 0x140035e6e
xor r11d, r11d
lea r10, [0x1401cc208]
xor edx, edx
test r13, r13
je 0x140035e11
movzx r9d, byte [rbp + r11]
inc r11
shl rdx, 8
or rdx, r9
cmp r13, r11
jne 0x140035dac
lea r8, [0x1401cc27d]
test rdx, rdx
je 0x140035e7c
cmp rdx, qword [rsp + 0xf8]
jb 0x140035e7c
mov r8, rdx
shr r8, 0x21
mov r8, rbx
jne 0x140035e82
test r9b, 1
jne 0x140035eb7
mov eax, 0x10
lea rcx, [0x1401cc240]
jmp 0x140035e7f
mov r15, rdi
jmp 0x140035e49
mov eax, 0xf
mov rcx, r10
jmp 0x140035e82
dec r14
lea rax, [rbx - 1]
cmp r14, rax
jbe 0x140035ee1
dec rbx
jne 0x140035e22
test rdi, rdi
je 0x140035e43
mov rcx, qword [0x14024d108]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov r14d, 0xf
mov qword [rsi + 8], r15
mov qword [rsi + 0x10], r14
mov qword [rsi], 0
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0xf
lea rcx, [0x1401cc208]
jmp 0x140035e82
mov rcx, r8
mov r8, rbx
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rax
mov qword [rsi], 0
test rdi, rdi
je 0x140035ea4
mov rcx, qword [0x14024d108]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x14024d108]
xor edx, edx
mov r8, r15
call sub.kernel32.dll_HeapFree
jmp 0x140035e58
mov qword [rsi], rbx
mov qword [rsi + 8], rdi
mov qword [rsi + 0x10], r14
pshufd xmm0, xmm6, 0xee
movq qword [rsi + 0x18], xmm0
mov qword [rsi + 0x20], r12
mov qword [rsi + 0x28], r15
mov qword [rsi + 0x30], rdi
mov qword [rsi + 0x38], rdx
jmp 0x140035e58
ud2