Function at 0x687380
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov r12d, 0xffffffff
mov rbp, r9
mov qword [rsp + 0xe0], rcx
mov rcx, r9
mov r13, rdx
mov rdi, r8
call fcn.005f0f80
mov rcx, rbp
call fcn.005f1150
mov rbx, rax
test rax, rax
jne 0x6873d0
jmp 0x6873ed
mov rcx, rbx
call fcn.004fb1f0
test eax, eax
je 0x687410
mov rcx, rdi
call fcn.004f9ad0
xor r9d, r9d
mov r8d, r12d
mov rcx, rbx
lea edx, [rax - 1]
call fcn.005f95c0
test eax, eax
jne 0x6873c4
xor esi, esi
mov rcx, rbp
call fcn.005f10a0
mov eax, esi
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x20], rbp
mov r9, rdi
mov r8, rbx
mov rdx, r13
mov rcx, qword [rsp + 0xe0]
mov esi, eax
call fcn.00687090
test eax, eax
je 0x6873ed
mov rcx, rbp
call fcn.005f0f80
mov rcx, rbp
call fcn.005f1150
mov rcx, rbp
mov qword [rsp + 0x40], rax
call fcn.005f1150
mov rcx, rbp
mov qword [rsp + 0x50], rax
call fcn.005f1150
mov rcx, rbp
mov qword [rsp + 0x38], rax
call fcn.005f1150
mov qword [rsp + 0x48], rax
test rax, rax
je 0x6874a0
mov r15, qword [rsp + 0x38]
mov rdx, qword [rsp + 0xe0]
mov r8, rdi
mov rcx, r15
call fcn.00685e20
test eax, eax
je 0x6874a0
mov rcx, r15
call fcn.004fb1f0
test eax, eax
je 0x6874ad
nop word [rax + rax]
mov rcx, rbp
call fcn.005f10a0
jmp 0x6873ef
mov r14, qword [rsp + 0x48]
mov rdx, rdi
mov rcx, r14
call fcn.004fa0a0
test rax, rax
je 0x6874a0
mov rcx, r15
call fcn.004f9ad0
mov rcx, r14
mov dword [rsp + 0x68], eax
call fcn.004f9ad0
mov r14d, dword [rdi + 8]
mov rcx, r15
mov dword [rsp + 0x88], eax
mov edx, r14d
mov dword [rsp + 0x5c], r14d
call fcn.004fb3e0
test rax, rax
je 0x6874a0
movsxd rdx, dword [r15 + 8]
mov r12, qword [r15]
cmp r14d, edx
jle 0x687520
mov eax, dword [rsp + 0x5c]
lea ecx, [rax - 1]
mov eax, ecx
lea rcx, [r12 + rdx*8]
sub eax, edx
xor edx, edx
lea r8, [rax*8 + 8]
call sub.msvcrt.dll_memset
mov rdx, qword [rsp + 0x38]
mov eax, dword [rsp + 0x5c]
mov rcx, qword [rsp + 0x40]
mov dword [rdx + 8], eax
mov edx, eax
call fcn.004fb3e0
test rax, rax
je 0x6874a0
mov r14, qword [rsp + 0x40]
mov r15d, dword [rsp + 0x5c]
mov r13, qword [r14]
mov qword [r13], 1
cmp r15d, 1
jle 0x68796f
lea eax, [r15 - 2]
xor edx, edx
lea rcx, [r13 + 8]
lea r8, [rax*8 + 8]
call sub.msvcrt.dll_memset
mov dword [r14 + 8], r15d
mov rcx, qword [rsp + 0x50]
mov edx, r15d
call fcn.004fb3e0
test rax, rax
je 0x6874a0
mov rax, qword [rsp + 0x50]
mov r15, qword [rax]
mov edx, dword [rsp + 0x5c]
mov rcx, r15
lea eax, [rdx - 1]
test edx, edx
lea r8, [rax*8 + 8]
mov dword [rsp + 0x60], eax
mov eax, 8
cmovle r8, rax
xor edx, edx
call sub.msvcrt.dll_memset
mov edx, dword [rsp + 0x5c]
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x80], rbx
mov dword [rsp + 0x8c], esi
mov esi, dword [rsp + 0x68]
mov dword [rax + 8], edx
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0xf8], rbp
mov ebp, dword [rsp + 0x88]
mov r10, qword [rax]
mov eax, edx
mov qword [rsp + 0xf0], rdi
shr eax, 1
shl rax, 4
mov rcx, rax
mov eax, edx
and eax, 0xfffffffe
mov rdi, rcx
movsxd r14, eax
mov dword [rsp + 0x64], eax
movsxd rax, dword [rsp + 0x60]
shl r14, 3
shl rax, 3
mov qword [rsp + 0x70], rax
lea eax, [rdx - 2]
add rax, 2
mov qword [rsp + 0x78], rax
nop word [rax + rax]
mov rax, qword [r12]
test esi, esi
je 0x687861
test al, 1
je 0x6878b2
cmp esi, 0x40
jle 0x6877e2
cmp esi, ebp
jge 0x6876a1
mov rdx, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x40]
mov eax, esi
mov esi, ebp
mov ebp, eax
mov r13, r15
mov r12, r10
mov rax, rdx
mov r15, qword [rbx]
mov r10, qword [rdx]
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x48], rax
mov rax, rbx
mov rbx, qword [rsp + 0x50]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x40], rbx
mov eax, dword [rsp + 0x5c]
test eax, eax
jle 0x687772
lea rdx, [r12 + 0x10]
lea r8, [r13 + 0x10]
cmp rdx, r13
lea r9, [r10 + 0x10]
lea r11, [r15 + 0x10]
setbe cl
cmp r8, r12
setbe al
or ecx, eax
cmp rdx, r10
setbe al
cmp r12, r9
setae bl
or eax, ebx
and ecx, eax
cmp dword [rsp + 0x60], 1
seta al
and ecx, eax
cmp rdx, r15
setbe al
cmp r11, r12
setbe dl
or eax, edx
and ecx, eax
cmp r8, r10
setbe al
cmp r13, r9
setae dl
or eax, edx
test cl, al
je 0x68787f
cmp r11, r13
setbe al
cmp r8, r15
setbe dl
or al, dl
je 0x68787f
xor eax, eax
movdqu xmm0, xmmword [r10 + rax]
movdqu xmm1, xmmword [r12 + rax]
pxor xmm0, xmm1
movups xmmword [r12 + rax], xmm0
movdqu xmm0, xmmword [r13 + rax]
movdqu xmm2, xmmword [r15 + rax]
pxor xmm0, xmm2
movups xmmword [r13 + rax], xmm0
add rax, 0x10
cmp rax, rdi
jne 0x687722
mov ebx, dword [rsp + 0x64]
cmp dword [rsp + 0x5c], ebx
je 0x687772
mov rax, qword [r10 + r14]
xor qword [r12 + r14], rax
mov rax, qword [r15 + r14]
xor qword [r13 + r14], rax
cmp esi, ebp
jne 0x687640
mov edx, ebp
lea eax, [rbp + 0x3e]
sub edx, 1
cmovns eax, edx
sar eax, 6
movsxd rdx, eax
mov ebx, eax
mov rcx, qword [r12 + rdx*8]
test rcx, rcx
jne 0x6877c8
test eax, eax
je 0x6877cb
lea ecx, [rax - 1]
sub rdx, 2
movsxd rax, ecx
mov ecx, ecx
sub rdx, rcx
jmp 0x6877bd
sub rax, 1
cmp rax, rdx
je 0x68795a
mov rcx, qword [r12 + rax*8]
mov ebx, eax
test rcx, rcx
je 0x6877b0
shl ebx, 6
mov qword [rsp + 0x68], r10
call fcn.004f9a00
mov r10, qword [rsp + 0x68]
lea esi, [rax + rbx]
jmp 0x687640
cmp rax, 1
jne 0x68765d
mov r15, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x80]
mov esi, dword [rsp + 0x8c]
mov rdi, qword [rsp + 0xf0]
mov rcx, r15
mov rbp, qword [rsp + 0xf8]
call fcn.004fb560
mov rcx, qword [rsp + 0xe0]
mov rdx, r15
call fcn.004fa0a0
test rax, rax
je 0x6874a0
mov rcx, rbp
xor esi, esi
call fcn.005f10a0
mov qword [rsp + 0x20], rbp
mov r9, rdi
mov r8, rbx
mov rdx, qword [rsp + 0xe0]
mov rcx, rdx
call fcn.00687090
test eax, eax
setne sil
jmp 0x6873ef
test rax, rax
jne 0x6877e2
mov rbp, qword [rsp + 0xf8]
mov rcx, rbp
call fcn.005f10a0
jmp 0x6873ed
mov ecx, dword [rsp + 0x60]
xor eax, eax
jmp 0x687893
mov rax, rdx
mov rdx, qword [r10 + rax*8]
xor qword [r12 + rax*8], rdx
mov rdx, qword [r15 + rax*8]
xor qword [r13 + rax*8], rdx
lea rdx, [rax + 1]
cmp rax, rcx
jne 0x687890
jmp 0x687772
mov rbx, qword [rsp + 0xf0]
mov rdx, qword [r13]
mov r11, qword [rbx]
mov r9, rdx
and r9d, 1
mov rcx, qword [r11]
neg r9
and rcx, r9
xor rcx, rdx
mov edx, dword [rsp + 0x60]
test edx, edx
jle 0x687961
mov qword [rsp + 0x68], r10
mov r10, qword [rsp + 0x78]
mov edx, 1
nop
mov r8, qword [r12 + rdx*8]
shr rax, 1
shr rcx, 1
mov rbx, r8
shl rbx, 0x3f
or rax, rbx
mov qword [r12 + rdx*8 - 8], rax
mov rbx, qword [r11 + rdx*8]
and rbx, r9
xor rbx, qword [r13 + rdx*8]
mov rax, rbx
shl rax, 0x3f
or rcx, rax
mov rax, r8
mov qword [r13 + rdx*8 - 8], rcx
add rdx, 1
mov rcx, rbx
cmp r10, rdx
jne 0x6878f0
mov rax, qword [rsp + 0x70]
mov r10, qword [rsp + 0x68]
lea r9, [r12 + rax]
lea rdx, [r13 + rax]
shr r8, 1
shr rbx, 1
sub esi, 1
mov qword [r9], r8
mov qword [rdx], rbx
jmp 0x687640
xor ebx, ebx
jmp 0x6877cb
mov rdx, r13
mov r9, r12
mov rbx, rcx
mov r8, rax
jmp 0x687946
mov rax, r14
mov r14d, dword [rsp + 0x5c]
mov r15, qword [rsp + 0x50]
mov dword [rax + 8], r14d
mov edx, r14d
mov rcx, r15
call fcn.004fb3e0
test rax, rax
je 0x6874a0
mov r15, qword [r15]
cmp r14d, 1
je 0x687599
lea eax, [r14 - 1]
mov dword [rsp + 0x60], eax
jmp 0x6875c1