Function at 0x697eee60
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
movups xmmword [rsp + 0x50], xmm6
mov dword [rsp + 0x2c], edx
mov rbx, rcx
mov rdi, r8
mov ebp, r9d
test r9d, r9d
jg 0x697eeeb0
movups xmm6, xmmword [rsp + 0x50]
mov ecx, 1
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.697494c0
movsxd rsi, r9d
mov rcx, rsi
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x697eee87
xor r13d, r13d
mov r8d, 0x10ea
lea r11d, [rbp - 1]
and ebp, 3
je 0x697eef40
cmp rbp, 1
je 0x697eef0e
cmp rbp, 2
jne 0x697efb0b
mov eax, r8d
movzx r10d, byte [rdi + r13]
movzx ebp, ah
mov r9d, ebp
xor r9d, r10d
add r10d, r8d
imul r8w, r10w, 0xce6d
mov byte [r12 + r13], r9b
add r13, 1
lea r8d, [r8 + 0x58bf]
movzx r14d, byte [rdi + r13]
mov edx, r8d
mov r10, r13
movzx ecx, dh
xor ecx, r14d
add r14d, r8d
imul r15w, r14w, 0xce6d
mov byte [r12 + r13], cl
add r13, 1
lea r8d, [r15 + 0x58bf]
cmp r11, r10
je 0x697eefd1
mov edx, r8d
movzx eax, byte [rdi + r13]
movzx r14d, byte [rdi + r13 + 1]
lea r10, [r13 + 3]
movzx ebp, dh
movzx r15d, byte [rdi + r13 + 2]
mov r9d, ebp
xor r9d, eax
add eax, r8d
imul ax, ax, 0xce6d
mov byte [r12 + r13], r9b
add ax, 0x58bf
movzx ecx, ah
add eax, r14d
imul dx, ax, 0xce6d
xor ecx, r14d
movzx r14d, byte [rdi + r13 + 3]
mov byte [r12 + r13 + 1], cl
add dx, 0x58bf
movzx ebp, dh
add edx, r15d
imul ax, dx, 0xce6d
mov r8d, ebp
xor r8d, r15d
mov byte [r12 + r13 + 2], r8b
add ax, 0x58bf
movzx ecx, ah
add eax, r14d
imul r9w, ax, 0xce6d
xor ecx, r14d
mov byte [r12 + r13 + 3], cl
add r13, 4
lea r8d, [r9 + 0x58bf]
cmp r11, r10
jne 0x697eef40
movsxd rdx, dword [rbx + 0x108]
add rsi, r12
add rdx, r12
cmp rsi, rdx
jbe 0x697efb3b
movsxd rdi, dword [rsp + 0x2c]
xor r15d, r15d
lea r13, [0x699f67a8]
pxor xmm6, xmm6
shl rdi, 5
jmp 0x697ef02e
lea rbp, [rdx + 1]
cmp al, 0xc
je 0x697ef130
cmp al, 0xd
je 0x697ef0f0
cmp al, 0xa
je 0x697ef0c0
mov dword [rbx + 0x228], 0
mov rdx, rbp
cmp rsi, rdx
jbe 0x697ef075
movzx eax, byte [rdx]
cmp al, 0x1f
jbe 0x697ef000
movsxd r11, dword [rbx + 0x228]
cmp r11d, 0x17
jg 0x697efb00
cmp al, 0xf6
ja 0x697ef0a0
add rdx, 1
sub eax, 0x8b
pxor xmm0, xmm0
lea r10d, [r11 + 1]
cvtsi2sd xmm0, eax
mov dword [rbx + 0x228], r10d
movsd qword [rbx + r11*8 + 0x168], xmm0
cmp rsi, rdx
ja 0x697ef02e
mov rcx, r12
call fcn.6969b170
nop
movups xmm6, xmmword [rsp + 0x50]
mov eax, r15d
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movzx ebp, byte [rdx + 1]
cmp al, 0xfa
ja 0x697efa40
sub eax, 0xf7
add rdx, 2
shl eax, 8
lea eax, [rbp + rax + 0x6c]
jmp 0x697ef053
mov r8d, dword [rbx + 0xbc]
test r8d, r8d
je 0x697ef0da
mov eax, dword [rbx + 0x228]
test eax, eax
jg 0x697efa80
mov dword [rbx + 0xbc], 0
mov rdx, rbp
jmp 0x697ef029
cmp dword [rbx + 0x228], 1
jle 0x697efb00
mov rcx, qword [rbx + 0x78]
movsd xmm0, qword [rbx + 0x170]
mov rdx, rbp
divsd xmm0, qword [rbx + 0x50]
movsd qword [rcx + rdi + 8], xmm0
mov dword [rbx + 0x228], 0
jmp 0x697ef029
lea rbp, [rdx + 2]
movzx edx, byte [rdx + 1]
or dh, 0xc
sub edx, 0xc06
cmp edx, 0xb
ja case.0x697ef152.3080
movsxd r14, dword [r13 + rdx*4]
add r14, r13
jmp r14
mov eax, dword [rbx + 0x290]
test eax, eax
jle 0x697efb00
sub eax, 1
pxor xmm1, xmm1
movsxd r11, dword [rbx + 0x228]
mov rdx, rbp
mov dword [rbx + 0x290], eax
cdqe
mov r9d, dword [rbx + rax*4 + 0x230]
lea ecx, [r11 + 1]
mov dword [rbx + 0x228], ecx
cvtsi2sd xmm1, r9d
movsd qword [rbx + r11*8 + 0x168], xmm1
jmp 0x697ef029
mov r10d, dword [rbx + 0x228]
test r10d, r10d
jle 0x697efb00
mov dword [rbx + 0x290], 0
lea r8d, [r10 - 1]
mov dword [rbx + 0x228], r8d
test r8d, r8d
je 0x697efb33
movsxd r14, r10d
sub r10d, 2
lea rdx, [rbx + 0x230]
lea r9, [rbx + r10*4 + 0x234]
lea r11, [rbx + r14*8]
mov rcx, r9
sub rcx, rdx
sub rcx, 4
shr rcx, 2
add rcx, 1
and ecx, 7
je 0x697ef2d2
cmp rcx, 1
je 0x697ef2b8
cmp rcx, 2
je 0x697ef2a3
cmp rcx, 3
je 0x697ef28f
cmp rcx, 4
je 0x697ef27b
cmp rcx, 5
je 0x697ef266
cmp rcx, 6
je 0x697ef251
cvttsd2si eax, qword [r11 + 0x158]
lea rdx, [rbx + 0x234]
sub r11, 8
mov dword [rbx + 0x230], eax
cvttsd2si r10d, qword [r11 + 0x158]
add rdx, 4
sub r11, 8
mov dword [rdx - 4], r10d
cvttsd2si r14d, qword [r11 + 0x158]
add rdx, 4
sub r11, 8
mov dword [rdx - 4], r14d
cvttsd2si ecx, qword [r11 + 0x158]
add rdx, 4
sub r11, 8
mov dword [rdx - 4], ecx
cvttsd2si eax, qword [r11 + 0x158]
add rdx, 4
sub r11, 8
mov dword [rdx - 4], eax
cvttsd2si r10d, qword [r11 + 0x158]
add rdx, 4
sub r11, 8
mov dword [rdx - 4], r10d
cvttsd2si r14d, qword [r11 + 0x158]
add rdx, 4
sub r11, 8
mov dword [rdx - 4], r14d
cmp r9, rdx
je 0x697ef343
cvttsd2si ecx, qword [r11 + 0x158]
add rdx, 0x20
sub r11, 0x40
mov dword [rdx - 0x20], ecx
cvttsd2si eax, qword [r11 + 0x190]
mov dword [rdx - 0x1c], eax
cvttsd2si r10d, qword [r11 + 0x188]
mov dword [rdx - 0x18], r10d
cvttsd2si r14d, qword [r11 + 0x180]
mov dword [rdx - 0x14], r14d
cvttsd2si ecx, qword [r11 + 0x178]
mov dword [rdx - 0x10], ecx
cvttsd2si eax, qword [r11 + 0x170]
mov dword [rdx - 0xc], eax
cvttsd2si r10d, qword [r11 + 0x168]
mov dword [rdx - 8], r10d
cvttsd2si r14d, qword [r11 + 0x160]
mov dword [rdx - 4], r14d
cmp r9, rdx
jne 0x697ef2d2
mov dword [rbx + 0x228], 0
mov rdx, rbp
mov dword [rbx + 0x290], r8d
jmp 0x697ef029
mov r8d, dword [rbx + 0x228]
cmp r8d, 1
jle 0x697efb00
movsxd r11, r8d
pxor xmm2, xmm2
sub r8d, 1
lea r9, [rbx + r11*8]
movsd xmm4, qword [r9 + 0x160]
movsd xmm3, qword [r9 + 0x158]
mov dword [rbx + 0x228], r8d
comisd xmm4, xmm2
je 0x697efb00
divsd xmm3, xmm4
mov rdx, rbp
movsd qword [r9 + 0x158], xmm3
jmp 0x697ef029
cmp dword [rbx + 0x228], 3
jle 0x697efb00
mov rdx, qword [rbx + 0x78]
movsd xmm5, qword [rbx + 0x178]
divsd xmm5, qword [rbx + 0x50]
movsd qword [rdx + rdi + 8], xmm5
jmp case.0x697ef152.3080
cmp dword [rbx + 0x228], 4
jle 0x697efb00
cvttsd2si ecx, qword [rbx + 0x180]
cmp ecx, 0xff
ja 0x697ef710
call fcn.697752c0
mov r14, rax
test rax, rax
je 0x697ef710
mov eax, dword [rbx + 0x18]
test eax, eax
je 0x697efb00
sub eax, 1
mov rcx, qword [rbx + 0x80]
xor r15d, r15d
mov r10, rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x20], rcx
and r10d, 7
je 0x697ef577
mov rcx, qword [rcx]
test rcx, rcx
je 0x697ef473
mov rdx, r14
mov qword [rsp + 0x38], r10
call sub.msvcrt.dll_strcmp
mov r10, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov r15d, 1
cmp r10, 1
je 0x697ef577
cmp r10, 2
je 0x697ef555
cmp r10, 3
je 0x697ef533
cmp r10, 4
je 0x697ef511
cmp r10, 5
je 0x697ef4ef
cmp r10, 6
je 0x697ef4cd
mov r8, qword [rsp + 0x20]
mov rcx, qword [r8 + 8]
test rcx, rcx
je 0x697ef4c7
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef6e6
mov r15d, 2
mov r11, qword [rsp + 0x20]
mov rcx, qword [r11 + r15*8]
test rcx, rcx
je 0x697ef4eb
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef6e6
add r15, 1
mov r9, qword [rsp + 0x20]
mov rcx, qword [r9 + r15*8]
test rcx, rcx
je 0x697ef50d
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef6e6
add r15, 1
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rdx + r15*8]
test rcx, rcx
je 0x697ef52f
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef6e6
add r15, 1
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + r15*8]
test rcx, rcx
je 0x697ef551
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef6e6
add r15, 1
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + r15*8]
test rcx, rcx
je 0x697ef573
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef6e6
add r15, 1
mov r10, qword [rsp + 0x20]
mov rcx, qword [r10 + r15*8]
test rcx, rcx
je 0x697ef595
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef6e6
lea r9, [r15 + 1]
cmp r15, qword [rsp + 0x30]
je 0x697efb00
mov r8, qword [rsp + 0x20]
mov r15, r9
mov rcx, qword [r8 + r9*8]
test rcx, rcx
je 0x697ef5cf
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov r11, qword [rsp + 0x20]
lea r15, [r9 + 1]
mov rcx, qword [r11 + r15*8]
test rcx, rcx
je 0x697ef5fb
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov rdx, qword [rsp + 0x20]
lea r15, [r9 + 2]
mov rcx, qword [rdx + r15*8]
test rcx, rcx
je 0x697ef627
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov rax, qword [rsp + 0x20]
lea r15, [r9 + 3]
mov rcx, qword [rax + r15*8]
test rcx, rcx
je 0x697ef653
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov rcx, qword [rsp + 0x20]
lea r15, [r9 + 4]
mov rcx, qword [rcx + r15*8]
test rcx, rcx
je 0x697ef67b
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov r10, qword [rsp + 0x20]
lea r15, [r9 + 5]
mov rcx, qword [r10 + r15*8]
test rcx, rcx
je 0x697ef6a3
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov r8, qword [rsp + 0x20]
lea r15, [r9 + 6]
mov rcx, qword [r8 + r15*8]
test rcx, rcx
je 0x697ef6cb
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef6e6
mov r10, qword [rsp + 0x20]
lea r15, [r9 + 7]
mov rcx, qword [r10 + r15*8]
test rcx, rcx
jne 0x697ef585
jmp 0x697ef595
movsxd r14, r15d
shl r14, 5
add r14, qword [rbx + 0x78]
mov r11d, dword [r14]
test r11d, r11d
jns 0x697ef710
movsxd rdx, dword [rbx + 0x70]
mov dword [r14], edx
mov rax, qword [rbx + 0xc8]
mov dword [rax + rdx*4], r15d
add dword [rbx + 0x70], 1
nop
cvttsd2si ecx, qword [rbx + 0x188]
cmp ecx, 0xff
ja 0x697efa28
call fcn.697752c0
mov r14, rax
test rax, rax
je 0x697efa28
mov r10d, dword [rbx + 0x18]
test r10d, r10d
je 0x697efb00
sub r10d, 1
mov rcx, qword [rbx + 0x80]
xor r15d, r15d
mov r8, r10
mov qword [rsp + 0x30], r10
mov qword [rsp + 0x20], rcx
and r8d, 7
je 0x697ef88d
mov rcx, qword [rcx]
test rcx, rcx
je 0x697ef789
mov rdx, rax
mov qword [rsp + 0x38], r8
call sub.msvcrt.dll_strcmp
mov r8, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov r15d, 1
cmp r8, 1
je 0x697ef88d
cmp r8, 2
je 0x697ef86b
cmp r8, 3
je 0x697ef849
cmp r8, 4
je 0x697ef827
cmp r8, 5
je 0x697ef805
cmp r8, 6
je 0x697ef7e3
mov r9, qword [rsp + 0x20]
mov rcx, qword [r9 + 8]
test rcx, rcx
je 0x697ef7dd
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef9fc
mov r15d, 2
mov r11, qword [rsp + 0x20]
mov rcx, qword [r11 + r15*8]
test rcx, rcx
je 0x697ef801
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef9fc
add r15, 1
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rdx + r15*8]
test rcx, rcx
je 0x697ef823
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef9fc
add r15, 1
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + r15*8]
test rcx, rcx
je 0x697ef845
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef9fc
add r15, 1
mov r10, qword [rsp + 0x20]
mov rcx, qword [r10 + r15*8]
test rcx, rcx
je 0x697ef867
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef9fc
add r15, 1
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + r15*8]
test rcx, rcx
je 0x697ef889
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef9fc
add r15, 1
mov r8, qword [rsp + 0x20]
mov rcx, qword [r8 + r15*8]
test rcx, rcx
je 0x697ef8ab
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x697ef9fc
lea r9, [r15 + 1]
cmp r15, qword [rsp + 0x30]
je 0x697efb00
mov r11, qword [rsp + 0x20]
mov r15, r9
mov rcx, qword [r11 + r9*8]
test rcx, rcx
je 0x697ef8e5
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov rdx, qword [rsp + 0x20]
lea r15, [r9 + 1]
mov rcx, qword [rdx + r15*8]
test rcx, rcx
je 0x697ef911
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov rax, qword [rsp + 0x20]
lea r15, [r9 + 2]
mov rcx, qword [rax + r15*8]
test rcx, rcx
je 0x697ef93d
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov r10, qword [rsp + 0x20]
lea r15, [r9 + 3]
mov rcx, qword [r10 + r15*8]
test rcx, rcx
je 0x697ef969
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov rcx, qword [rsp + 0x20]
lea r15, [r9 + 4]
mov rcx, qword [rcx + r15*8]
test rcx, rcx
je 0x697ef991
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov r8, qword [rsp + 0x20]
lea r15, [r9 + 5]
mov rcx, qword [r8 + r15*8]
test rcx, rcx
je 0x697ef9b9
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov r11, qword [rsp + 0x20]
lea r15, [r9 + 6]
mov rcx, qword [r11 + r15*8]
test rcx, rcx
je 0x697ef9e1
mov rdx, r14
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strcmp
mov r9, qword [rsp + 0x38]
test eax, eax
je 0x697ef9fc
mov r8, qword [rsp + 0x20]
lea r15, [r9 + 7]
mov rcx, qword [r8 + r15*8]
test rcx, rcx
jne 0x697ef89b
jmp 0x697ef8ab
movsxd r14, r15d
shl r14, 5
add r14, qword [rbx + 0x78]
mov edx, dword [r14]
test edx, edx
jns 0x697efa28
movsxd r10, dword [rbx + 0x70]
mov dword [r14], r10d
mov rax, qword [rbx + 0xc8]
mov dword [rax + r10*4], r15d
add dword [rbx + 0x70], 1
nop dword [rax]
mov dword [rbx + 0x228], 0
mov rdx, rbp
xor r15d, r15d
jmp 0x697ef029
cmp al, 0xff
je 0x697efa68
mov r8d, 0xfb
add rdx, 2
sub r8d, eax
mov eax, r8d
shl eax, 8
sub eax, ebp
sub eax, 0x6c
jmp 0x697ef053
mov eax, dword [rdx + 1]
add rdx, 5
bswap eax
jmp 0x697ef053
sub eax, 1
lea rdx, [rsp + 0x48]
mov dword [rbx + 0x228], eax
cdqe
movsd xmm0, qword [rbx + rax*8 + 0x168]
call fcn.6968e0d0
comisd xmm0, xmm6
jne 0x697ef0da
cvttsd2si eax, qword [rsp + 0x48]
test eax, eax
js 0x697ef0da
cmp dword [rbx + 0xb8], eax
jle 0x697ef0da
mov r11, qword [rbx + 0xc0]
cdqe
mov edx, dword [rsp + 0x2c]
mov rcx, rbx
shl rax, 5
mov dword [r11 + rax + 0x1c], 1
add rax, qword [rbx + 0xc0]
mov r9d, dword [rax + 8]
mov r8, qword [rax]
call fcn.697eee60
mov rdx, rbp
mov r15d, eax
jmp 0x697ef029
mov r15d, 0x64
jmp 0x697ef075
movzx eax, byte [rdi]
mov r13d, 1
mov edx, eax
add eax, 0x10ea
imul cx, ax, 0xce6d
xor edx, 0x10
mov byte [r12], dl
lea r8d, [rcx + 0x58bf]
jmp 0x697eeee5
mov rdx, rbp
jmp 0x697ef029
xor r15d, r15d
jmp 0x697ef075