Function at 0x140359170
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov rdi, rcx
mov rsi, rdx
mov rdx, r8
mov rcx, r9
mov r8, qword [rsp + 0xb0]
mov r9, qword [rsp + 0xb8]
mov qword [rsp + 0x28], rsi
mov rsi, qword [rsp + 0x110]
mov r11, rdx
mov r12, rcx
mov esi, dword [rsi]
mov qword [rsp], rdi
mov qword [rsp + 8], r8
mov r8, qword [rsp + 0xc8]
mov ecx, dword [rsp + 0xd0]
sub ecx, 1
xor eax, eax
mov r10d, ecx
mov qword [rsp + 0x10], rax
mov qword [rsp + 0x18], rax
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], rax
jmp 0x1403591ea
add esi, 1
cmp esi, dword [rsp + 0xe0]
jge 0x140359458
cmp eax, dword [rsp + 0xe8]
jge 0x140359458
movzx ebp, byte [rsi + rdi]
movzx edx, byte [rsi + rdi + 1]
movzx ebx, byte [rsi + rdi + 2]
movsx ebp, word [r9 + rbp*2]
movsx edx, word [r9 + rdx*2 + 0x200]
movsx ebx, word [r9 + rbx*2 + 0x400]
xor ebp, edx
mov rdx, qword [rsp + 0xc0]
xor ebp, ebx
and ebp, dword [rsp + 0xd8]
movsxd r13, dword [rdx + rbp*4]
mov dword [rdx + rbp*4], esi
mov edx, r10d
mov rbp, r13
and edx, esi
mov eax, esi
mov dword [r8 + rdx*4], r13d
mov ecx, 2
sub rax, rbp
mov dword [rsp + 0x38], ecx
xor edx, edx
jmp 0x140359274
mov ecx, dword [rsp + 0x38]
and ebp, r10d
movsxd rbp, dword [r8 + rbp*4]
mov eax, esi
add edx, 1
sub rax, rbp
mov ebx, ebp
sub ebx, dword [rsp + 0xf0]
shr ebx, 0x1f
mov r15, qword [rsp + rbx*8]
cmp eax, dword [rsp + 0xd0]
jge 0x140359305
cmp ecx, 0x102
jge 0x140359305
cmp edx, 0x200
jge 0x140359305
lea r14, [rsi + rdi]
lea r15, [rbp + r15]
movzx eax, word [rcx + r14 - 1]
movzx ebx, word [rcx + r15 - 1]
cmp eax, ebx
jne 0x140359265
mov dword [rsp + 0x38], ecx
xor ecx, ecx
mov rax, qword [rcx + r14]
mov rbx, qword [rcx + r15]
xor rax, rbx
jne 0x1403592e7
add ecx, 8
cmp ecx, 0x100
jl 0x1403592bc
movzx eax, word [rcx + r14]
movzx ebx, word [rcx + r15]
xor eax, ebx
jne 0x1403592e7
add ecx, 2
jmp 0x1403592f1
bsf rax, rax
shr rax, 3
add ecx, eax
mov eax, dword [rsp + 0x38]
cmp eax, ecx
jge 0x140359261
mov r13, rbp
jmp 0x140359265
mov edx, esi
mov rax, r13
sub rdx, rax
cmp ecx, 3
jne 0x14035931f
cmp edx, 0x1000
jle 0x14035931f
mov ecx, 2
mov eax, dword [rsp + 0x10]
cmp eax, 1
jle 0x140359443
cmp eax, ecx
jl 0x140359414
cmp eax, 2
jle 0x140359414
lea rbp, [rax - 2]
lea rcx, [rsi + 1]
lea rsi, [rbp + rsi]
mov r14, qword [rsp + 0xc0]
mov r15d, dword [rsp + 0xd8]
movzx ebp, byte [rcx + rdi]
movzx edx, byte [rcx + rdi + 1]
movzx ebx, byte [rcx + rdi + 2]
movsx ebp, word [r9 + rbp*2]
movsx edx, word [r9 + rdx*2 + 0x200]
movsx ebx, word [r9 + rbx*2 + 0x400]
xor ebp, edx
mov edx, r10d
xor ebp, ebx
and edx, ecx
and ebp, r15d
movsxd rax, dword [r14 + rbp*4]
mov dword [r14 + rbp*4], ecx
mov dword [r8 + rdx*4], eax
add ecx, 1
cmp ecx, esi
jle 0x14035935a
mov eax, dword [rsp + 0x30]
mov edx, dword [rsp + 0x18]
mov ecx, dword [rsp + 0x10]
mov rbp, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x100]
sub ecx, 3
mov word [rbp + rax*2], dx
mov byte [rax + rbx], cl
add eax, 1
mov dword [rsp + 0x30], eax
lea rax, [rdx - 1]
cmp edx, 0x101
jl 0x1403593e0
shr eax, 7
add eax, 0x100
mov r14, qword [rsp + 0x28]
movzx eax, byte [rax + r14 + 0x100]
add word [r12 + rax*4], 1
movzx ebp, byte [rcx + r14]
add ebp, 0x101
add word [r11 + rbp*4], 1
mov edx, esi
mov rax, r13
xor ecx, ecx
sub edx, eax
mov eax, dword [rsp + 0x30]
jmp 0x140359443
mov ebx, dword [rsp + 0x20]
mov eax, dword [rsp + 0x30]
add word [r11 + rbx*4], 1
mov rbp, qword [rsp + 0x108]
mov word [rbp + rax*2], 0
mov rbp, qword [rsp + 0x100]
mov byte [rax + rbp], bl
add eax, 1
mov dword [rsp + 0x30], eax
movzx ebx, byte [rsi + rdi]
mov dword [rsp + 0x18], edx
mov dword [rsp + 0x10], ecx
mov dword [rsp + 0x20], ebx
jmp 0x1403591e7
mov eax, dword [rsp + 0x30]
mov rdi, qword [rsp + 0x110]
mov rbp, qword [rsp + 0xf8]
mov dword [rdi], esi
mov ebx, dword [rsp + 0x10]
mov dword [rbp], ebx
mov ebx, dword [rsp + 0x18]
mov dword [rbp + 4], ebx
mov ebx, dword [rsp + 0x20]
mov dword [rbp + 8], ebx
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
pop rdi
pop rsi
ret