Function at 0x180065680
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x20], r9
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
lea r12d, [r8 + 0x743]
mov rbp, r9
mov dword [rsp + 0x40], r12d
mov rsi, rcx
cmp r8d, r12d
jae 0x180065e69
mov r10d, dword [rsp + 0xb0]
xor ebx, ebx
mov r14d, dword [rsp + 0xb0]
mov eax, r8d
mov edi, dword [rsp + 0xb0]
mov r15d, dword [rsp + 0x30]
mov qword [rsp + 0x50], r10
lea r11, [0x180000000]
mov ecx, 0xfffffff0
cmp eax, 0x1c7
ja 0x18006596b
je 0x180065958
sub eax, 0xb1
je 0x1800657de
sub eax, 0x2f
je 0x18006579a
sub eax, 0x3e
je 0x180065779
sub eax, 0x3c
je 0x18006594e
cmp eax, 0x2f
jne 0x18006574b
test rsi, rsi
je 0x180065735
mov rax, qword [rbp]
mov ecx, dword [rax + 4]
mov dword [rsi], ecx
test rdx, rdx
je 0x180065743
mov rax, qword [rbp]
mov ecx, dword [rax + 8]
mov dword [rdx], ecx
mov dword [rsp + 0x30], 1
mov eax, dword [rsp + 0xb0]
add eax, 0xa9
mov dword [rsp + 0xb0], eax
cmp eax, r12d
jae 0x180065e69
mov rdx, qword [rsp + 0xa8]
mov r10, qword [rsp + 0x50]
jmp 0x1800656e3
cmp byte [0x180091059], bl
mov qword [rsp + 0x58], rbp
jne 0x18006574b
xor edx, edx
mov ecx, 0x10001
call fcn.180025910
mov rax, rbx
jmp 0x180065e6e
mov r9d, 0x10
mov dword [rsp + 0x38], 2
xor r8d, r8d
lea rdx, [rsp + 0x38]
mov rcx, rbp
call fcn.180045c80
test eax, eax
je 0x180065e4d
mov rdx, qword [rsp + 0xc0]
test rdx, rdx
je 0x18006574b
mov rax, qword [rbp]
mov ecx, dword [rax]
mov dword [rdx], ecx
jmp 0x18006574b
test byte [rsi], 4
movzx r10d, byte [rbp + 0x19]
mov qword [rsp + 0x50], r10
mov r9d, r10d
mov edx, r10d
je 0x18006588c
mov rax, rbx
test r10d, r10d
je 0x180065876
cmp r10d, 0x10
jb 0x180065876
movdqa xmm2, xmmword [str._a_a_a_a]
mov r8d, r10d
and r8, rcx
lea rcx, [rsi + 0x20]
nop word [rax + rax]
movdqu xmm0, xmmword [rcx - 0x20]
lea rcx, [rcx + 0x40]
add rax, 0x10
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x60], xmm1
movdqa xmm1, xmm2
movdqu xmm0, xmmword [rcx - 0x50]
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x50], xmm1
movdqa xmm1, xmm2
movdqu xmm0, xmmword [rcx - 0x40]
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x40], xmm1
movdqu xmm0, xmmword [rcx - 0x30]
pxor xmm0, xmm2
movdqu xmmword [rcx - 0x30], xmm0
cmp rax, r8
jl 0x180065820
mov ecx, 0xfffffff0
cmp rax, rdx
jge 0x18006588c
nop dword [rax + rax]
xor dword [rsi + rax*4], 7
inc rax
cmp rax, rdx
jl 0x180065880
test byte [rsi], 0x20
je 0x18006591c
mov rax, rbx
test r9d, r9d
je 0x180065903
cmp r10d, 0x10
jb 0x180065903
movdqa xmm2, xmmword [0x180082830]
and r9, rcx
lea rcx, [rsi + 0x20]
movdqu xmm0, xmmword [rcx - 0x20]
lea rcx, [rcx + 0x40]
add rax, 0x10
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x60], xmm1
movdqa xmm1, xmm2
movdqu xmm0, xmmword [rcx - 0x50]
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x50], xmm1
movdqa xmm1, xmm2
movdqu xmm0, xmmword [rcx - 0x40]
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x40], xmm1
movdqu xmm0, xmmword [rcx - 0x30]
pxor xmm0, xmm2
movdqu xmmword [rcx - 0x30], xmm0
cmp rax, r9
jl 0x1800658b2
cmp rax, rdx
jge 0x18006591c
nop dword [rax + rax]
xor dword [rsi + rax*4], 0x38
inc rax
cmp rax, rdx
jl 0x180065910
mov r14d, ebx
mov rcx, rbx
test r10d, r10d
je 0x18006574b
nop dword [rax + rax]
movsxd rax, dword [rsi + rcx*4]
cmp byte [rax + r11 + 0x78d60], bl
jne 0x18006594e
inc r14d
inc rcx
cmp rcx, rdx
jl 0x180065930
jmp 0x18006574b
mov eax, 0x15a
jmp 0x180065752
mov rax, qword [rsp + 0x58]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x30], rax
jmp 0x18006574b
sub eax, 0x203
je 0x180065bf9
sub eax, 0x2f
je 0x180065e69
sub eax, 0x3e
je 0x180065e69
sub eax, 0x3c
je 0x18006599d
cmp eax, 0xa9
je 0x180065e69
jmp 0x18006574b
movsxd rax, dword [rdx]
mov rdx, qword [rsp + 0x48]
imul rdx, rax
mov qword [rsp + 0x48], rdx
cmp r14d, r10d
jge 0x180065bef
nop word [rax + rax]
mov eax, 0x1c
mov dword [rsp + 0x38], eax
nop dword [rax]
sub eax, 0x1c
je 0x1800659e6
cmp eax, 1
jne 0x180065bc4
add r14d, r15d
jmp 0x180065bc4
mov rax, qword [rsp + 0xc0]
mov edi, r14d
movsxd r13, r14d
movzx eax, byte [rax + r13]
mov dword [rsp + 0x30], eax
lea r11d, [rax + r14]
cmp r14d, r11d
jge 0x180065a5a
mov eax, r11d
lea r10d, [r14 + 1]
sub eax, r14d
lea r8, [rsi + r13*4]
mov ebp, eax
lea edi, [r14 + rax]
nop word [rax + rax]
cmp r10d, r11d
jge 0x180065a48
mov r9d, r11d
lea rcx, [r8 + 4]
sub r9d, r10d
nop
mov eax, dword [r8]
mov edx, dword [rcx]
cmp eax, edx
jle 0x180065a3e
mov dword [r8], edx
mov dword [rcx], eax
add rcx, 4
sub r9, 1
jne 0x180065a30
inc r10d
add r8, 4
sub rbp, 1
jne 0x180065a20
mov rdx, qword [rsp + 0x48]
movsxd r12, r11d
mov r15d, ebx
cmp r13, r12
jge 0x180065ba4
mov r11, r13
mov rbp, rbx
nop
mov r8d, dword [rsi + r11*4]
mov edi, ebx
mov rax, rbx
movd xmm3, r8d
pshufd xmm3, xmm3, 0
test r14d, r14d
jle 0x180065b1e
cmp r14d, 8
jb 0x180065b1e
mov edx, r14d
xorps xmm5, xmm5
xorps xmm2, xmm2
and edx, 0x80000007
jge 0x180065aae
dec edx
or edx, 0xfffffff8
inc edx
movdqa xmm4, xmmword [0x1800827b0]
mov ecx, r14d
sub ecx, edx
movsxd rdx, ecx
nop
movdqu xmm0, xmmword [rsi + rax*4]
movdqa xmm1, xmm3
pcmpgtd xmm1, xmm0
movdqu xmm0, xmmword [rsi + rax*4 + 0x10]
add rax, 8
pand xmm1, xmm4
paddd xmm1, xmm5
movdqa xmm5, xmm1
movdqa xmm1, xmm3
pcmpgtd xmm1, xmm0
pand xmm1, xmm4
paddd xmm1, xmm2
movdqa xmm2, xmm1
cmp rax, rdx
jl 0x180065ac0
paddd xmm2, xmm5
movdqa xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movdqa xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movd edi, xmm2
mov edx, ebx
mov r9d, ebx
cmp rax, r13
jge 0x180065b77
mov rcx, r13
sub rcx, rax
cmp rcx, 2
jl 0x180065b61
lea r10, [r13 - 1]
nop dword [rax + rax]
cmp r8d, dword [rsi + rax*4]
mov ecx, ebx
setg cl
add edx, ecx
mov ecx, ebx
cmp r8d, dword [rsi + rax*4 + 4]
setg cl
add rax, 2
add r9d, ecx
cmp rax, r10
jl 0x180065b40
cmp rax, r13
jge 0x180065b71
cmp r8d, dword [rsi + rax*4]
mov ecx, ebx
setg cl
add edi, ecx
lea eax, [r9 + rdx]
add edi, eax
sub r8d, edi
lea rcx, [0x180000000]
movsxd rax, r8d
inc r11
add rax, rbp
add rbp, 0x40
add r15d, dword [rcx + rax*4 + 0x115f80]
cmp r11, r12
jl 0x180065a70
mov rdx, qword [rsp + 0x48]
mov rax, qword [rsp + 0xa8]
movsxd rcx, dword [rax + r13*4]
movsxd rax, r15d
mov r15d, dword [rsp + 0x30]
imul rcx, rax
add rdx, rcx
mov qword [rsp + 0x48], rdx
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
cmp eax, 0x1e
jb 0x1800659d0
cmp r14d, dword [rsp + 0x50]
jl 0x1800659c0
mov rbp, qword [rsp + 0xb8]
mov r12d, dword [rsp + 0x40]
mov qword [rsp + 0x30], rdx
jmp 0x18006574b
movzx r9d, byte [rbp + 0x1c]
movzx eax, r9b
movzx r8d, r9b
neg al
sbb ecx, ecx
add ecx, 3
cmp r14d, ecx
jge 0x180065c4d
movsxd rax, r14d
movsxd rcx, dword [rsi + rax*4]
cmp byte [rcx + r11 + 0x78d60], bl
jle 0x180065c4d
movsxd rdx, r10d
mov rcx, rbx
test r10d, r10d
jle 0x180065c4d
nop
movsxd rax, dword [rsi + rcx*4]
movzx eax, byte [rax + r11 + 0x78e00]
mov dword [rsi + rcx*4], eax
inc rcx
cmp rcx, rdx
jl 0x180065c30
movzx r8d, byte [rbp + 0x1c]
movzx ecx, r8b
test r8b, r8b
je 0x180065d70
cmp ecx, 1
jne 0x180065cec
mov edx, 0x109
nop dword [rax + rax]
mov eax, edx
sub eax, 0x109
je 0x180065ccd
cmp eax, 1
jne 0x180065ce2
movsxd rax, dword [rsi]
movzx ecx, byte [rax + r11 + 0x78da0]
movsxd rax, dword [rsi + 4]
shl rcx, 6
add rcx, rax
movsx rdx, word [r11 + rcx*2 + 0x78f90]
cmp rdx, 0x1b9
jae 0x180065d21
mov eax, dword [rsi + 8]
mov r14d, 3
sub eax, edi
imul eax, eax, 0x1b9
movsxd rcx, eax
mov eax, 0x203
add rdx, rcx
mov qword [rsp + 0x48], rdx
jmp 0x180065752
mov ecx, dword [rsi + 8]
mov edi, ebx
cmp ecx, dword [rsi + 4]
mov eax, ebx
setg dil
cmp ecx, dword [rsi]
setg al
add edi, eax
inc edx
cmp edx, 0x10b
jb 0x180065c70
movsxd rax, dword [rsi]
mov r14d, 2
movzx ecx, byte [rax + r11 + 0x78da0]
movsxd rax, dword [rsi + 4]
shl rcx, 6
add rcx, rax
movsx rax, word [r11 + rcx*2 + 0x78f90]
mov qword [rsp + 0x48], rax
mov eax, 0x203
jmp 0x180065752
movsxd rcx, dword [rsi + 8]
movzx eax, byte [rcx + r11 + 0x78e40]
add rax, 0x501
imul rax, rax, 0x15
add rdx, rax
mov qword [rsp + 0x48], rdx
cmp byte [rcx + r11 + 0x78d60], bl
jne 0x180065e3d
imul eax, edi, 0x15
mov r14d, 3
movsxd rcx, eax
mov eax, 0x203
sub rdx, rcx
mov qword [rsp + 0x48], rdx
jmp 0x180065752
movsxd rcx, dword [rsi]
mov edi, ebx
movsxd rdx, dword [rsi + 4]
mov eax, ebx
movsxd r8, dword [rsi + 8]
cmp edx, ecx
mov r9d, ebx
setg r9b
cmp r8d, ecx
setg dil
cmp r8d, edx
setg al
add edi, eax
cmp byte [rcx + r11 + 0x78d60], bl
je 0x180065dbc
movzx eax, byte [rcx + r11 + 0x78da0]
imul ecx, eax, 0x3f
sub ecx, r9d
add ecx, edx
imul edx, ecx, 0x3e
sub edx, edi
add edx, r8d
jmp 0x180065e35
movzx eax, byte [r11 + rcx + 0x78e80]
cmp byte [rdx + r11 + 0x78d60], bl
je 0x180065ded
movzx edx, byte [rdx + r11 + 0x78e40]
add edx, 0x17a
imul eax, eax, 0x1c
add eax, edx
imul edx, eax, 0x3e
sub edx, edi
add edx, r8d
jmp 0x180065e35
movzx edx, byte [rdx + r11 + 0x78e80]
imul ecx, eax, 7
add edx, ecx
sub edx, r9d
cmp byte [r8 + r11 + 0x78d60], bl
je 0x180065e1e
movzx eax, byte [r8 + r11 + 0x78e40]
add edx, 0x43d
imul edx, edx, 0x1c
add edx, eax
jmp 0x180065e35
movzx eax, byte [r8 + r11 + 0x78e80]
add edx, 0x144a
lea ecx, [rdx + rdx*2]
lea edx, [rax + rcx*2]
sub edx, edi
movsxd rax, edx
mov qword [rsp + 0x48], rax
mov r14d, 3
mov eax, 0x203
jmp 0x180065752
mov r9, qword [rbp]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
mov r8d, 0xd8
call fcn.18006e170
mov dword [rsp + 0x30], ebx
mov rax, qword [rsp + 0x30]
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret