Function at 0x4987e0
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0x38
mov r10, qword [rcx + 0x20]
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x30], r12
mov ebp, r8d
mov rsi, rcx
mov r12, rdx
mov r8d, 0x31
mov r11d, 8
nop
mov r9d, dword [r10 + 4]
mov eax, r8d
cmp r11d, r9d
cmovb r9d, r11d
movzx ecx, r9b
sub r11d, r9d
shl byte [r10 + 8], cl
movzx edx, byte [r10 + 8]
mov ecx, r11d
shr eax, cl
or dl, al
shl eax, cl
sub r8d, eax
sub dword [r10 + 4], r9d
mov byte [r10 + 8], dl
jne 0x498859
mov ecx, dword [r10]
mov rax, qword [r10 + 0x10]
mov byte [rcx + rax], dl
inc dword [r10]
mov dword [r10 + 4], 8
test r11d, r11d
jne 0x498810
mov r8, qword [rsi + 0x20]
mov r11d, 0x41
mov r9d, 8
nop
mov edx, dword [r8 + 4]
mov eax, r11d
cmp r9d, edx
cmovb edx, r9d
movzx ecx, dl
sub r9d, edx
shl byte [r8 + 8], cl
movzx r10d, byte [r8 + 8]
mov ecx, r9d
shr eax, cl
or r10b, al
shl eax, cl
sub r11d, eax
sub dword [r8 + 4], edx
mov byte [r8 + 8], r10b
jne 0x4988ba
mov ecx, dword [r8]
mov rax, qword [r8 + 0x10]
mov byte [rcx + rax], r10b
inc dword [r8]
mov dword [r8 + 4], 8
test r9d, r9d
jne 0x498870
mov r8, qword [rsi + 0x20]
mov qword [rsp + 0x40], rbx
mov ebx, 0x59
mov r11d, ebx
mov r9d, 8
nop
nop
nop
mov edx, dword [r8 + 4]
mov eax, r11d
cmp r9d, edx
cmovb edx, r9d
movzx ecx, dl
sub r9d, edx
shl byte [r8 + 8], cl
movzx r10d, byte [r8 + 8]
mov ecx, r9d
shr eax, cl
or r10b, al
shl eax, cl
sub r11d, eax
sub dword [r8 + 4], edx
mov byte [r8 + 8], r10b
jne 0x49892a
mov ecx, dword [r8]
mov rax, qword [r8 + 0x10]
mov byte [rcx + rax], r10b
inc dword [r8]
mov dword [r8 + 4], 8
test r9d, r9d
jne 0x4988e0
mov r8, qword [rsi + 0x20]
lea r11d, [r9 + 0x26]
mov r9d, 8
nop
mov edx, dword [r8 + 4]
mov eax, r11d
cmp r9d, edx
cmovb edx, r9d
movzx ecx, dl
sub r9d, edx
shl byte [r8 + 8], cl
movzx r10d, byte [r8 + 8]
mov ecx, r9d
shr eax, cl
or r10b, al
shl eax, cl
sub r11d, eax
sub dword [r8 + 4], edx
mov byte [r8 + 8], r10b
jne 0x49898a
mov ecx, dword [r8]
mov rax, qword [r8 + 0x10]
mov byte [rcx + rax], r10b
inc dword [r8]
mov dword [r8 + 4], 8
test r9d, r9d
jne 0x498940
mov r8, qword [rsi + 0x20]
lea r11d, [r9 + 0x53]
mov r9d, 8
nop
mov edx, dword [r8 + 4]
mov eax, r11d
cmp r9d, edx
cmovb edx, r9d
movzx ecx, dl
sub r9d, edx
shl byte [r8 + 8], cl
movzx r10d, byte [r8 + 8]
mov ecx, r9d
shr eax, cl
or r10b, al
shl eax, cl
sub r11d, eax
sub dword [r8 + 4], edx
mov byte [r8 + 8], r10b
jne 0x4989ea
mov ecx, dword [r8]
mov rax, qword [r8 + 0x10]
mov byte [rcx + rax], r10b
inc dword [r8]
mov dword [r8 + 4], 8
test r9d, r9d
jne 0x4989a0
mov r8, qword [rsi + 0x20]
mov r9d, 8
nop
nop
mov edx, dword [r8 + 4]
mov eax, ebx
cmp r9d, edx
cmovb edx, r9d
movzx ecx, dl
sub r9d, edx
shl byte [r8 + 8], cl
movzx r10d, byte [r8 + 8]
mov ecx, r9d
shr eax, cl
or r10b, al
shl eax, cl
sub ebx, eax
sub dword [r8 + 4], edx
mov byte [r8 + 8], r10b
jne 0x498a48
mov ecx, dword [r8]
mov rax, qword [r8 + 0x10]
mov byte [rcx + rax], r10b
inc dword [r8]
mov dword [r8 + 4], 8
test r9d, r9d
jne 0x498a00
movzx r10d, byte [r12]
xor r11d, r11d
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x28], r13
mov r8d, r11d
mov edi, r11d
mov ebx, 0xffffffff
mov r9, r12
lea r13, [0x00504f60]
cmp r8d, 4
movzx edx, byte [r9]
jne 0x498aaf
test dl, dl
je 0x498aaa
movzx r8d, r10b
nop
nop
nop
mov ecx, ebx
mov eax, ebx
shr rcx, 0x18
shl eax, 8
xor rcx, r8
mov ebx, dword [r13 + rcx*4]
xor ebx, eax
add dl, 0xff
jne 0x498a90
mov r8d, r11d
jmp 0x498ada
cmp r10b, dl
jne 0x498ab9
inc r8d
jmp 0x498ac2
mov r8d, 1
mov r10b, dl
mov ecx, ebx
movzx eax, dl
shr rcx, 0x18
xor rcx, rax
mov eax, ebx
mov ebx, dword [r13 + rcx*4]
shl eax, 8
xor ebx, eax
inc edi
inc r9
cmp edi, ebp
jb 0x498a74
mov r13, qword [rsp + 0x28]
not ebx
nop
nop
mov r8, qword [rsi + 0x20]
mov ecx, 3
mov eax, ebx
sub ecx, r11d
mov r9d, 8
shl ecx, 3
shr eax, cl
movzx edi, al
nop
mov edx, dword [r8 + 4]
mov eax, edi
cmp r9d, edx
cmovb edx, r9d
movzx ecx, dl
sub r9d, edx
shl byte [r8 + 8], cl
movzx r10d, byte [r8 + 8]
mov ecx, r9d
shr eax, cl
or r10b, al
shl eax, cl
sub edi, eax
sub dword [r8 + 4], edx
mov byte [r8 + 8], r10b
jne 0x498b58
mov ecx, dword [r8]
mov rax, qword [r8 + 0x10]
mov byte [rcx + rax], r10b
inc dword [r8]
mov dword [r8 + 4], 8
test r9d, r9d
jne 0x498b10
inc r11d
cmp r11d, 4
jb 0x498af0
mov r8d, ebp
mov rdx, r12
mov rcx, rsi
call fcn.00497b50
mov r12, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x38
ret