Function at 0x778050
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x40
mov r13, rdx
mov rax, qword [rcx + 0x270]
mov rax, qword [rax + 0x30]
mov qword [rsp + 8], rax
mov r11d, dword [r13]
mov r10d, dword [r13 + 4]
movsxd rcx, r10d
mov eax, dword [r13 + 8]
mov r8, rax
movsxd r15, eax
mov eax, dword [r13 + 0xc]
mov dword [rsp + 4], eax
movsxd rbx, eax
mov r12d, dword [r13 + 0x10]
movsxd r14, r12d
mov eax, dword [r13 + 0x14]
cmp ecx, r11d
jle 0x778129
movsxd rdx, r11d
lea ebp, [r12 - 1]
mov dword [rsp + 0x10], ebp
jmp 0x778110
mov rbp, qword [rsp + 8]
mov r9, qword [rbp + rdx*8]
mov rbp, r15
cmp r12d, eax
jg 0x778100
mov rsi, rbp
shl rsi, 6
add rsi, r9
lea rdi, [rsi + r14*2]
mov esi, dword [rsp + 0x10]
nop word cs:[rax + rax]
cmp word [rdi], 0
jne 0x778122
add rdi, 2
inc esi
cmp esi, eax
jl 0x7780f0
cmp rbp, rbx
lea rbp, [rbp + 1]
jl 0x7780cd
jmp 0x778117
cmp r8d, dword [rsp + 4]
jle 0x7780c0
cmp rdx, rcx
lea rdx, [rdx + 1]
jl 0x778110
jmp 0x778129
mov dword [r13], edx
mov r11d, edx
cmp r10d, r11d
jle 0x7781ab
movsxd rdx, r11d
mov qword [rsp + 0x10], rdx
lea r9d, [r12 - 1]
jmp 0x778190
mov rdx, qword [rsp + 8]
mov rdx, qword [rdx + rcx*8]
mov rbp, r15
cmp r12d, eax
jg 0x778180
mov rsi, rbp
shl rsi, 6
add rsi, rdx
lea rdi, [rsi + r14*2]
mov esi, r9d
nop word cs:[rax + rax]
cmp word [rdi], 0
jne 0x7781a4
add rdi, 2
inc esi
cmp esi, eax
jl 0x778170
cmp rbp, rbx
lea rbp, [rbp + 1]
jl 0x77814c
jmp 0x778197
cmp r8d, dword [rsp + 4]
jle 0x778140
cmp rcx, qword [rsp + 0x10]
lea rcx, [rcx - 1]
jg 0x778190
jmp 0x7781ab
mov dword [r13 + 4], ecx
mov r10d, ecx
cmp dword [rsp + 4], r8d
jle 0x77820e
movsxd r9, r11d
movsxd rdx, r10d
lea esi, [r12 - 1]
jmp 0x778200
mov rcx, r9
cmp r12d, eax
jg 0x7781f0
mov rbp, r15
shl rbp, 6
mov rdi, qword [rsp + 8]
add rbp, qword [rdi + rcx*8]
lea rdi, [rbp + r14*2]
mov ebp, esi
nop
cmp word [rdi], 0
jne 0x77821d
add rdi, 2
inc ebp
cmp ebp, eax
jl 0x7781e0
cmp rcx, rdx
lea rcx, [rcx + 1]
jl 0x7781c3
jmp 0x778205
cmp r10d, r11d
jge 0x7781c0
cmp r15, rbx
lea r15, [r15 + 1]
jl 0x778200
mov r15, r8
cmp dword [rsp + 4], r15d
jg 0x778228
jmp 0x77829a
mov dword [r13 + 8], r15d
cmp dword [rsp + 4], r15d
jle 0x77829a
movsxd r8, r11d
movsxd rdx, r10d
movsxd r9, r15d
lea ebp, [r12 - 1]
jmp 0x778280
mov rcx, r8
cmp r12d, eax
jg 0x778270
mov rsi, rbx
shl rsi, 6
mov rdi, qword [rsp + 8]
add rsi, qword [rdi + rcx*8]
lea rdi, [rsi + r14*2]
mov esi, ebp
nop
cmp word [rdi], 0
jne 0x778290
add rdi, 2
inc esi
cmp esi, eax
jl 0x778260
cmp rcx, rdx
lea rcx, [rcx + 1]
jl 0x778243
jmp 0x778285
cmp r10d, r11d
jge 0x778240
cmp rbx, r9
lea rbx, [rbx - 1]
jg 0x778280
jmp 0x77829a
mov dword [r13 + 0xc], ebx
mov ecx, ebx
mov dword [rsp + 4], ecx
movsxd rcx, eax
cmp eax, r12d
jle 0x778317
movsxd rdx, r15d
movsxd r8, r11d
movsxd rbx, r10d
lea r9d, [r15 - 1]
shl rdx, 6
jmp 0x778300
mov rbp, r8
cmp dword [rsp + 4], r15d
jl 0x7782f2
mov rsi, qword [rsp + 8]
mov rsi, qword [rsi + rbp*8]
add rsi, rdx
lea rdi, [rsi + r14*2]
mov esi, r9d
nop dword [rax]
cmp word [rdi], 0
jne 0x778310
add rdi, 0x40
inc esi
cmp esi, dword [rsp + 4]
jl 0x7782e0
cmp rbp, rbx
lea rbp, [rbp + 1]
jl 0x7782c3
jmp 0x778305
cmp r10d, r11d
jge 0x7782c0
cmp r14, rcx
lea r14, [r14 + 1]
jl 0x778300
jmp 0x778317
mov dword [r13 + 0x10], r14d
mov r12d, r14d
cmp eax, r12d
jle 0x778396
movsxd rdx, r15d
movsxd r8, r11d
movsxd rbx, r10d
movsxd r9, r12d
lea r14d, [r15 - 1]
shl rdx, 6
jmp 0x778380
mov rbp, r8
cmp dword [rsp + 4], r15d
jl 0x778372
mov rsi, qword [rsp + 8]
mov rsi, qword [rsi + rbp*8]
add rsi, rdx
lea rdi, [rsi + rcx*2]
mov esi, r14d
nop dword [rax]
cmp word [rdi], 0
jne 0x778390
add rdi, 0x40
inc esi
cmp esi, dword [rsp + 4]
jl 0x778360
cmp rbp, rbx
lea rbp, [rbp + 1]
jl 0x778343
jmp 0x778385
cmp r10d, r11d
jge 0x778340
cmp rcx, r9
lea rcx, [rcx - 1]
jg 0x778380
jmp 0x778396
mov dword [r13 + 0x14], ecx
mov eax, ecx
mov ecx, r10d
sub ecx, r11d
shl ecx, 3
mov edx, dword [rsp + 4]
mov qword [rsp + 0x18], r15
sub edx, r15d
shl edx, 2
lea edx, [rdx + rdx*2]
mov ebp, eax
sub ebp, r12d
shl ebp, 4
imul ecx, ecx
imul edx, edx
add edx, ecx
imul ebp, ebp
add ebp, edx
xor r15d, r15d
cmp r10d, r11d
mov qword [rsp + 0x20], r13
mov dword [r13 + 0x18], ebp
jl 0x778553
movsxd r13, r12d
movsxd rcx, dword [rsp + 0x18]
mov qword [rsp + 0x30], rcx
movsxd rbx, dword [rsp + 4]
movsxd r14, r11d
movsxd rcx, r10d
mov qword [rsp + 0x38], rcx
cmp eax, r12d
mov ecx, eax
cmovl ecx, r12d
sub ecx, r12d
lea rdi, [rcx + 1]
inc ecx
and ecx, 7
mov r10, rdi
mov qword [rsp + 0x10], rcx
sub r10, rcx
lea esi, [r10 + r12]
lea rcx, [r13 + 4]
mov qword [rsp + 0x28], rcx
xor r15d, r15d
pxor xmm0, xmm0
pcmpeqd xmm1, xmm1
mov ecx, dword [rsp + 4]
cmp ecx, dword [rsp + 0x18]
jl 0x778544
mov rcx, qword [rsp + 8]
mov rdx, qword [rcx + r14*8]
mov rbp, qword [rsp + 0x30]
mov rcx, rbp
shl rcx, 6
add rcx, rdx
mov r8d, esi
mov rsi, qword [rsp + 0x28]
lea r9, [rcx + rsi*2]
mov esi, r8d
mov r8, rbp
nop dword [rax + rax]
cmp eax, r12d
jl 0x778533
mov rcx, r8
shl rcx, 6
add rcx, rdx
cmp rdi, 8
lea r11, [rcx + r13*2]
jae 0x7784a0
mov ecx, r12d
jmp 0x778518
lea r11, [r11 + r10*2]
movd xmm3, r15d
pxor xmm2, xmm2
mov rcx, r10
mov rbp, r9
nop word cs:[rax + rax]
movq xmm4, qword [rbp - 8]
punpcklwd xmm4, xmm0
movq xmm5, qword [rbp]
punpcklwd xmm5, xmm0
pcmpeqd xmm4, xmm0
pxor xmm4, xmm1
psubd xmm3, xmm4
pcmpeqd xmm5, xmm0
pxor xmm5, xmm1
psubd xmm2, xmm5
add rbp, 0x10
add rcx, 0xfffffffffffffff8
jne 0x7784c0
cmp dword [rsp + 0x10], 0
paddd xmm2, xmm3
pshufd xmm3, xmm2, 0x4e
paddd xmm3, xmm2
pshufd xmm2, xmm3, 0xe5
paddd xmm2, xmm3
movd r15d, xmm2
mov ecx, esi
je 0x778533
dec ecx
nop word [rax + rax]
cmp word [r11], 1
sbb r15d, 0xffffffff
add r11, 2
inc ecx
cmp ecx, eax
jl 0x778520
add r9, 0x40
cmp r8, rbx
lea r8, [r8 + 1]
jl 0x778470
cmp r14, qword [rsp + 0x38]
lea r14, [r14 + 1]
jl 0x778430
mov rax, qword [rsp + 0x20]
mov dword [rax + 0x1c], r15d
add rsp, 0x40
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret