Function at 0x495b80
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rax, qword [rsp + 0xc0]
mov r14d, dword [rax]
mov r13d, dword [rax + 4]
mov rbp, rdx
mov eax, r8d
mov edx, dword [rsp + 0xc8]
mov qword [rsp + 0xa0], rcx
sub eax, 8
mov dword [rsp + 0xb0], r8d
mov rsi, r9
mov dword [rsp + 0x38], eax
test edx, edx
je 0x495cd0
test eax, eax
js 0x495f40
shr eax, 3
mov r15, rcx
lea rbx, [rsp + 0x48]
mov edx, r13d
mov ecx, eax
lea rax, [rcx*8 + 8]
mov rdi, rcx
mov qword [rsp + 0x28], rax
lea r12, [rbp + rax]
mov eax, r14d
nop
mov ecx, dword [r15 + 4]
mov r8d, dword [r15]
add rbp, 8
add r15, 8
xor edx, ecx
xor eax, r8d
mov rcx, rbx
mov dword [rsp + 0x4c], edx
mov rdx, rsi
mov dword [rsp + 0x48], eax
call sym.RC2_encrypt
mov eax, dword [rsp + 0x48]
mov edx, eax
mov byte [rbp - 8], al
shr edx, 0x10
mov byte [rbp - 7], ah
mov byte [rbp - 6], dl
mov edx, eax
shr edx, 0x18
mov byte [rbp - 5], dl
mov edx, dword [rsp + 0x4c]
mov ecx, edx
mov byte [rbp - 4], dl
shr ecx, 0x10
mov byte [rbp - 3], dh
mov byte [rbp - 2], cl
mov ecx, edx
shr ecx, 0x18
mov byte [rbp - 1], cl
cmp r12, rbp
jne 0x495c00
mov r14d, eax
mov rax, qword [rsp + 0x28]
add qword [rsp + 0xa0], rax
mov eax, edi
neg eax
mov edi, dword [rsp + 0xb0]
mov r13d, edx
shl eax, 3
lea ecx, [rdi + rax - 0x10]
add eax, dword [rsp + 0x38]
mov dword [rsp + 0xb0], eax
cmp ecx, 0xfffffff8
je 0x495f60
mov rax, qword [rsp + 0xa0]
movsxd rcx, ecx
cmp dword [rsp + 0xb0], 7
lea rcx, [rax + rcx + 8]
ja case.0x495ccc.0
mov eax, dword [rsp + 0xb0]
lea r9, [0x005e3200]
movsxd r8, dword [r9 + rax*4]
add r8, r9
jmp r8
test eax, eax
js 0x495f50
shr eax, 3
mov r12, rcx
lea rbx, [rsp + 0x48]
mov r15d, r13d
mov ecx, eax
mov dword [rsp + 0x3c], eax
mov r13, r12
lea rax, [rcx*8 + 8]
mov qword [rsp + 0x30], rax
add rax, rbp
mov qword [rsp + 0x28], rax
nop dword [rax]
mov r12d, r14d
mov edi, r15d
mov r14d, dword [r13]
mov r15d, dword [r13 + 4]
mov rdx, rsi
mov rcx, rbx
add rbp, 8
add r13, 8
mov dword [rsp + 0x48], r14d
mov dword [rsp + 0x4c], r15d
call sym.RC2_decrypt
mov edx, dword [rsp + 0x48]
mov eax, dword [rsp + 0x4c]
xor edx, r12d
xor eax, edi
mov byte [rbp - 8], dl
mov ecx, edx
mov byte [rbp - 7], dh
shr edx, 0x18
shr ecx, 0x10
mov byte [rbp - 5], dl
mov edx, eax
mov byte [rbp - 4], al
shr edx, 0x10
mov byte [rbp - 3], ah
shr eax, 0x18
mov byte [rbp - 6], cl
mov byte [rbp - 2], dl
mov byte [rbp - 1], al
cmp qword [rsp + 0x28], rbp
jne 0x495d08
mov ecx, dword [rsp + 0x3c]
mov rax, qword [rsp + 0x30]
mov r13d, r15d
add qword [rsp + 0xa0], rax
mov eax, dword [rsp + 0xb0]
neg ecx
shl ecx, 3
lea ebx, [rax + rcx - 0x10]
add ecx, dword [rsp + 0x38]
mov dword [rsp + 0xb0], ecx
cmp ebx, 0xfffffff8
je 0x495e4d
mov rax, qword [rsp + 0xa0]
lea rcx, [rsp + 0x48]
mov rdx, rsi
movsxd rbx, ebx
mov r12d, dword [rax]
mov edi, dword [rax + 4]
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x4c], edi
call sym.RC2_decrypt
xor r14d, dword [rsp + 0x48]
xor r13d, dword [rsp + 0x4c]
lea rax, [rbp + rbx + 8]
cmp dword [rsp + 0xb0], 7
ja case.0x495e00.0
mov esi, dword [rsp + 0xb0]
lea rcx, [0x005e3220]
movsxd rdx, dword [rcx + rsi*4]
add rdx, rcx
jmp rdx
mov edx, r13d
sub rax, 1
shr edx, 0x10
mov byte [rax], dl
mov ebx, r13d
sub rax, 1
mov byte [rax], bh
mov byte [rax - 1], r13b
lea rdx, [rax - 1]
mov ecx, r14d
lea rax, [rdx - 1]
shr ecx, 0x18
mov byte [rdx - 1], cl
mov ecx, r14d
lea rdx, [rax - 1]
shr ecx, 0x10
mov byte [rax - 1], cl
mov ebx, r14d
lea rax, [rdx - 1]
mov byte [rdx - 1], bh
mov byte [rax - 1], r14b
mov r13d, edi
mov r14d, r12d
mov rax, qword [rsp + 0xc0]
mov dword [rax], r14d
mov dword [rax + 4], r13d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor r9d, r9d
movzx r8d, byte [rcx - 1]
sub rcx, 1
shl r8d, 8
or r8d, r9d
lea r9, [rcx - 1]
movzx ecx, byte [rcx - 1]
or r8d, ecx
xor r13d, r8d
lea rcx, [r9 - 1]
movzx r9d, byte [r9 - 1]
shl r9d, 0x18
movzx r8d, byte [rcx - 1]
lea rbx, [rcx - 1]
shl r8d, 0x10
or r9d, r8d
movzx r8d, byte [rbx - 1]
lea rcx, [rbx - 1]
shl r8d, 8
or r8d, r9d
movzx ecx, byte [rcx - 1]
or r8d, ecx
xor r14d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x48]
mov dword [rsp + 0x48], r14d
mov dword [rsp + 0x4c], r13d
call sym.RC2_encrypt
mov edx, dword [rsp + 0x48]
mov r11, qword [rsp + 0x48]
mov r8d, edx
mov esi, edx
movzx ebx, dh
shr edx, 0x18
mov r10d, edx
mov edx, dword [rsp + 0x4c]
mov qword [rbp], r11
shr r8d, 0x10
movzx edi, dh
mov ecx, edx
mov eax, edx
shr edx, 0x18
mov r9d, edi
shr ecx, 0x10
mov rdi, qword [rsp + 0xc0]
mov byte [rdi], sil
mov byte [rdi + 1], bl
mov byte [rdi + 2], r8b
mov byte [rdi + 3], r10b
mov byte [rdi + 4], al
mov byte [rdi + 5], r9b
mov byte [rdi + 6], cl
mov byte [rdi + 7], dl
jmp 0x495e5c
mov ecx, eax
jmp 0x495c90
mov ebx, eax
jmp 0x495d9e
mov eax, r14d
mov ecx, r13d
mov r8d, r14d
mov esi, r14d
shr r14d, 0x18
movzx edi, ch
movzx ebx, ah
mov eax, r13d
shr r13d, 0x18
shr r8d, 0x10
mov r10d, r14d
mov r9d, edi
shr ecx, 0x10
mov edx, r13d
jmp 0x495f12
xor r8d, r8d
jmp 0x495ebe
mov rbx, rcx
xor r9d, r9d
jmp 0x495eae
xor r9d, r9d
jmp 0x495e9e
mov r9, rcx
jmp 0x495e91
xor r8d, r8d
jmp 0x495e83
movzx r8d, byte [rcx - 1]
sub rcx, 1
mov r9d, r8d
shl r9d, 0x10
jmp 0x495e73
mov rdx, rax
jmp 0x495e1f
mov rdx, rax
jmp 0x495e39
mov r13d, edi
mov r14d, r12d
jmp 0x495e4d