Function at 0x4083c3
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x48
mov r15, rcx
mov r14, qword [rsp + 0xb0]
mov edi, edx
xor esi, esi
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x30], r8
lea r13, [r15 + rdi]
mov eax, dword [r13 - 8]
cmp eax, dword [r14 + 0x14]
jne 0x40865a
mov r8d, 4
lea rdx, [r14 + 0x30]
lea rcx, [rsp + 0x40]
call fcn.004086b3
mov r8d, 4
lea rdx, [r14 + 0x110]
lea rcx, [rsp + 0x44]
call fcn.004086b3
xor ebp, ebp
add rdi, 0xfffffffffffffff8
xor r12d, r12d
xor r8d, r8d
xor eax, eax
add edi, 0xfffffff8
je 0x40865a
mov qword [rsp + 0x38], r12
mov r12d, r8d
xor r9d, r9d
lea rbx, [r15 + rax]
mov r10b, byte [rbx + r9 + 1]
mov r11b, byte [rsp + r9 + 0x40]
cmp r10b, r11b
je 0x408468
cmp r11b, 0x3f
jne 0x4086a1
inc r9d
cmp r9d, 8
jb 0x40844f
lea r15, [r15 + rax + 1]
test r15, r15
je 0x40864c
mov edx, dword [rbx + 1]
mov r9d, edx
shr r9d, 8
mov eax, edx
movzx r9d, r9b
mov ebx, edx
shr eax, 0x10
shl ebx, 0x18
shl r9d, 0x10
movzx eax, al
add ebx, r9d
shl eax, 8
lea r9, [r15 + 8]
add ebx, eax
shr edx, 0x18
mov edi, dword [r9]
add ebx, edx
cmp edi, dword [r14 + 0x68]
jne 0x4084c1
test rbp, rbp
je 0x4085ea
test rbp, rbp
je 0x40868a
lea edi, [rsi + rbx]
cmp edi, r12d
ja 0x40866d
mov rdx, r9
add rsi, rbp
mov r8d, ebx
mov rcx, rsi
call fcn.004086b3
mov esi, edi
mov rdi, r13
sub rdi, r15
xor eax, eax
add rdi, 0xfffffffffffffff8
add edi, 0xfffffff8
jne 0x408448
mov r12, qword [rsp + 0x38]
mov edx, dword [r12 + 8]
mov eax, dword [r12 + 4]
test dl, 3
je 0x408519
dec edx
test dl, 3
jne 0x408512
test edx, edx
jbe 0x4085c3
lea edi, [rdx + 3]
sar edi, 1
shr edi, 0x1e
lea edx, [rdi + rdx + 3]
sar edx, 2
movsxd r9, edx
cmp r9, 4
jl 0x4085e6
lea r10, [rbp + 0x10]
and r10, 0xf
test r10d, r10d
je 0x408562
test r10d, 3
jne 0x4085e6
neg r10d
add r10d, 0x10
shr r10d, 2
mov r8d, r10d
lea rdi, [r8 + 4]
cmp r9, rdi
jl 0x4085e6
mov edi, edx
sub edi, r10d
and edi, 3
sub edx, edi
xor edi, edi
movsxd rdx, edx
test r10d, r10d
jbe 0x40858e
xor dword [rbp + rdi*4 + 0x10], eax
inc rdi
cmp rdi, r8
jb 0x408582
movd xmm0, eax
pshufd xmm0, xmm0, 0
movdqu xmm1, xmmword [rbp + r8*4 + 0x10]
pxor xmm1, xmm0
movdqu xmmword [rbp + r8*4 + 0x10], xmm1
add r8, 4
cmp r8, rdx
jb 0x408597
cmp rdx, r9
jae 0x4085c3
xor dword [rbp + rdx*4 + 0x10], eax
inc rdx
cmp rdx, r9
jb 0x4085b7
mov rax, qword [rsp + 0x30]
test esi, esi
mov qword [rax], rbp
mov eax, 0
seta al
add rsp, 0x48
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
xor edx, edx
jmp 0x4085b2
mov rax, qword [rsp + 0x28]
mov r12d, dword [r9 + 8]
add r12d, 0x10
mov qword [rsp + 0x38], r9
mov rax, qword [rax]
jne 0x408609
mov edx, dword [rax + 0xf0]
jmp 0x40860c
mov edx, r12d
mov ecx, dword [rax + 0xbc]
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x20], r9
call qword [rax + 0x10]
mov r9, qword [rsp + 0x20]
mov rbp, rax
mov rcx, rbp
mov rdx, r9
mov r8d, ebx
call fcn.004086b3
mov rdi, r13
add esi, ebx
sub rdi, r15
xor eax, eax
add rdi, 0xfffffffffffffff8
add edi, 0xfffffff8
jne 0x408448
mov r12, qword [rsp + 0x38]
test rbp, rbp
jne 0x408503
xor eax, eax
add rsp, 0x48
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r8d, r12d
mov rdx, r9
mov ecx, esi
sub r8d, esi
add rcx, rbp
mov r12, qword [rsp + 0x38]
call fcn.004086b3
jmp 0x408503
mov rdi, r13
xor eax, eax
sub rdi, r15
add rdi, 0xfffffffffffffff8
add edi, 0xfffffff8
jne 0x408448
jmp 0x40865a
inc eax
cmp eax, edi
jb 0x408448
jmp 0x40864c