Function at 0x4e1990
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov dword [rsp + 0x3c], r9d
mov dword [rsp + 0x2c], r8d
mov r13, rdx
mov r15, rcx
mov r12, qword [rcx]
movsxd rbp, r8d
mov rax, rbp
shl rax, 5
mov r14, qword [r12 + 0x20]
mov qword [rsp + 0x40], rax
add r14, rax
call fcn.004c6120
mov rbx, rax
mov rdi, qword [r15 + 0xa0]
test rdi, rdi
cmove rdi, r15
mov esi, 1
mov ecx, ebp
shl esi, cl
mov eax, dword [rdi + 0x74]
mov ecx, eax
btc ecx, ebp
not ecx
test ecx, eax
mov qword [rsp + 0x30], rbx
jne 0x4e1a42
mov ecx, eax
not ecx
mov edx, esi
not edx
mov ebp, ecx
and ebp, 0xe24c5629
and eax, 0x1db3a9d6
or eax, ebp
or ecx, edx
and edx, 0xe24c5629
mov ebx, esi
and ebx, 0x1db3a9d6
or ebx, edx
xor ebx, eax
not ecx
or ecx, ebx
mov rbx, qword [rsp + 0x30]
mov dword [rdi + 0x74], ecx
cmp dword [rsp + 0x2c], 1
jne 0x4e1a42
mov rcx, rdi
call fcn.004306d0
mov eax, dword [rdi + 0x70]
mov ecx, eax
and ecx, esi
xor eax, esi
or eax, ecx
mov dword [rdi + 0x70], eax
mov al, byte [rdi + 0x20]
mov ecx, eax
and cl, 1
xor al, 1
or al, cl
mov byte [rdi + 0x20], al
cmp byte [r13 + 0x3f], 1
jne 0x4e1abb
movsxd rax, dword [rbx + 0x90]
cmp dword [rbx + 0x94], eax
jle 0x4e1aa0
lea ecx, [rax + 1]
mov dword [rbx + 0x90], ecx
mov rcx, qword [rbx + 0x88]
lea rax, [rax + rax*2]
mov byte [rcx + rax*8], 0xaa
xorps xmm0, xmm0
movups xmmword [rcx + rax*8 + 1], xmm0
mov qword [rcx + rax*8 + 0x10], 0
jmp 0x4e1abb
mov dword [rsp + 0x20], 0
mov rcx, rbx
mov edx, 0xaa
xor r8d, r8d
xor r9d, r9d
call fcn.0047df60
mov rax, qword [r15]
mov rax, qword [rax + 0x20]
mov r8, qword [rax + 0x38]
mov r10, qword [r13 + 0x58]
mov rcx, qword [r8 + 0x40]
test rcx, rcx
je 0x4e1b75
mov r9, qword [r13 + 0x60]
cmp r9, r8
je 0x4e1b7d
lea r8, [0x005fade0]
jmp 0x4e1aff
mov rdi, r10
mov rcx, qword [rcx]
test rcx, rcx
je 0x4e1c2f
mov rdi, qword [rcx + 0x10]
cmp qword [rdi + 0x30], r9
je 0x4e1b20
cmp byte [rdi + 0x10], 0x96
jne 0x4e1af0
mov rax, qword [r13]
mov qword [rdi + 8], rax
mov qword [rdi + 0x30], r9
jmp 0x4e1b61
mov rbx, qword [rdi + 8]
test rbx, rbx
je 0x4e1b09
mov rsi, qword [r13]
xor edx, edx
jmp 0x4e1b50
movzx eax, byte [rax + r8]
cmp al, byte [rbp + r8]
jne 0x4e1b09
add rdx, 1
movzx eax, byte [rbx + rdx]
movzx ebp, byte [rsi + rdx]
cmp al, bpl
jne 0x4e1b40
test al, al
jne 0x4e1b4c
mov qword [rdi + 0x40], r10
mov r10, rdi
mov rcx, qword [rcx]
test rcx, rcx
jne 0x4e1aff
jmp 0x4e1c2f
mov rdi, r10
jmp 0x4e1c2f
lea r11, [0x005fade0]
jmp 0x4e1baf
mov rax, qword [r13]
mov qword [rdi + 8], rax
mov qword [rdi + 0x30], r9
mov qword [rdi + 0x40], r10
mov r10, rdi
mov rcx, qword [rcx]
test rcx, rcx
je 0x4e1c2f
mov rdi, qword [rcx + 0x10]
cmp qword [rdi + 0x30], r8
je 0x4e1bd0
cmp byte [rdi + 0x10], 0x96
je 0x4e1b90
mov rdi, r10
mov rcx, qword [rcx]
test rcx, rcx
jne 0x4e1baf
jmp 0x4e1c2f
mov rbp, qword [rdi + 8]
test rbp, rbp
je 0x4e1bb9
mov rsi, qword [r13]
xor edx, edx
jmp 0x4e1bf8
test al, al
je 0x4e1bb9
add rdx, 1
movzx eax, byte [rbp + rdx]
movzx ebx, byte [rsi + rdx]
cmp al, bl
je 0x4e1bf0
movzx eax, byte [rax + r11]
cmp al, byte [rbx + r11]
je 0x4e1bf4
jmp 0x4e1bb9
mov rcx, r15
mov rdx, rdi
call fcn.004e2030
mov rdi, qword [rdi + 0x40]
test rdi, rdi
jne 0x4e1c20
mov eax, dword [r13 + 0x30]
mov ecx, eax
xor ecx, 0xfffffff7
test ecx, eax
je 0x4e1c57
mov r8, qword [r14]
mov r9, qword [r13]
lea rdx, [0x0060408a]
mov rcx, r15
call fcn.004d54f0
mov r8, qword [r14]
mov r9, qword [r13]
lea rdx, [0x006040b7]
mov rcx, r15
call fcn.004d54f0
cmp dword [rsp + 0x3c], 0
je 0x4e1cdb
cmp byte [r13 + 0x3f], 1
mov esi, dword [rsp + 0x2c]
mov rbx, qword [rsp + 0x30]
je 0x4e1cef
mov rdi, qword [r13]
mov eax, dword [rbx + 0x90]
cmp dword [rbx + 0x94], eax
jle 0x4e1dae
movsxd rcx, eax
lea edx, [rcx + 1]
mov dword [rbx + 0x90], edx
mov rdx, qword [rbx + 0x88]
lea rcx, [rcx + rcx*2]
mov dword [rdx + rcx*8], 0x97
mov dword [rdx + rcx*8 + 4], esi
xorps xmm0, xmm0
movups xmmword [rdx + rcx*8 + 8], xmm0
mov r14, qword [rsp + 0x40]
mov rcx, qword [rbx]
cmp byte [rcx + 0x67], 0
jne 0x4e1e03
jmp 0x4e1dd7
cmp byte [r13 + 0x3f], 1
mov esi, dword [rsp + 0x2c]
mov rbx, qword [rsp + 0x30]
jne 0x4e1f79
mov rdi, qword [r13]
mov eax, dword [rbx + 0x90]
cmp dword [rbx + 0x94], eax
jle 0x4e1d36
movsxd rcx, eax
lea edx, [rcx + 1]
mov dword [rbx + 0x90], edx
mov rdx, qword [rbx + 0x88]
lea rcx, [rcx + rcx*2]
mov dword [rdx + rcx*8], 0xac
mov dword [rdx + rcx*8 + 4], esi
xorps xmm0, xmm0
movups xmmword [rdx + rcx*8 + 8], xmm0
mov rcx, qword [rbx]
cmp byte [rcx + 0x67], 0
jne 0x4e1d86
jmp 0x4e1d5a
mov dword [rsp + 0x20], 0
mov rcx, rbx
mov edx, 0xac
mov r8d, esi
xor r9d, r9d
call fcn.0047df60
mov rcx, qword [rbx]
cmp byte [rcx + 0x67], 0
jne 0x4e1d86
test eax, eax
jns 0x4e1d67
mov eax, dword [rbx + 0x90]
add eax, 0xffffffff
cdqe
lea rdx, [rax + rax*2]
shl rdx, 3
add rdx, qword [rbx + 0x88]
mov rcx, rbx
mov r8, rdi
xor r9d, r9d
call fcn.0047e190
mov rax, qword [r15 + 0xa0]
test rax, rax
cmove rax, r15
mov byte [rax + 0x21], 1
mov rdi, qword [r13]
mov eax, dword [rbx + 0x90]
cmp dword [rbx + 0x94], eax
jg 0x4e1c9a
mov dword [rsp + 0x20], 0
mov rcx, rbx
mov edx, 0x97
mov r8d, esi
xor r9d, r9d
call fcn.0047df60
mov r14, qword [rsp + 0x40]
mov rcx, qword [rbx]
cmp byte [rcx + 0x67], 0
jne 0x4e1e03
test eax, eax
jns 0x4e1de4
mov eax, dword [rbx + 0x90]
add eax, 0xffffffff
cdqe
lea rdx, [rax + rax*2]
shl rdx, 3
add rdx, qword [rbx + 0x88]
mov rcx, rbx
mov r8, rdi
xor r9d, r9d
call fcn.0047e190
mov rax, qword [r15]
mov rcx, qword [r15 + 0x10]
mov rax, qword [rax + 0x20]
mov rax, qword [rax + r14 + 0x18]
mov eax, dword [rax]
add eax, 1
movsxd rdx, dword [rcx + 0x90]
cmp dword [rcx + 0x94], edx
jle 0x4e1e5d
lea ebp, [rdx + 1]
mov dword [rcx + 0x90], ebp
mov rcx, qword [rcx + 0x88]
lea rdx, [rdx + rdx*2]
mov dword [rcx + rdx*8], 0x64
mov dword [rcx + rdx*8 + 4], esi
mov dword [rcx + rdx*8 + 8], 1
mov dword [rcx + rdx*8 + 0xc], eax
mov qword [rcx + rdx*8 + 0x10], 0
jmp 0x4e1e74
mov dword [rsp + 0x20], eax
mov edx, 0x64
mov r8d, esi
mov r9d, 1
call fcn.0047df60
mov rax, qword [r12 + 0x20]
mov rax, qword [rax + r14 + 0x18]
movzx ecx, word [rax + 0x72]
mov edx, ecx
xor edx, 0xfffd
test dx, cx
je 0x4e1f68
mov rbx, qword [rax + 0x10]
test rbx, rbx
jne 0x4e1ebc
jmp 0x4e1f5e
mov rbx, qword [rbx]
test rbx, rbx
je 0x4e1f50
mov rbp, qword [rbx + 0x10]
cmp byte [rbp + 0x3f], 2
jne 0x4e1eb0
mov rdi, qword [rbp + 8]
test rdi, rdi
je 0x4e1eb0
cmp word [rbp + 0x36], 0
jle 0x4e1efe
xor esi, esi
mov rdx, qword [rdi]
mov rcx, r12
call fcn.00408130
add esi, 1
add rdi, 0x18
movsx eax, word [rbp + 0x36]
cmp esi, eax
jl 0x4e1ee0
mov rdi, qword [rbp + 8]
mov rcx, r12
mov rdx, rdi
call fcn.00408130
cmp byte [rbp + 0x3f], 0
jne 0x4e1f20
mov rdx, qword [rbp + 0x50]
test rdx, rdx
je 0x4e1f20
mov rcx, r12
call fcn.0047fbe0
cmp qword [r12 + 0x300], 0
jne 0x4e1eb0
mov qword [rbp + 8], 0
mov word [rbp + 0x36], 0
cmp byte [rbp + 0x3f], 0
jne 0x4e1eb0
mov qword [rbp + 0x50], 0
jmp 0x4e1eb0
mov rax, qword [r12 + 0x20]
mov rax, qword [rax + r14 + 0x18]
movzx ecx, word [rax + 0x72]
and ecx, 0xfffd
mov word [rax + 0x72], cx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebp, dword [r13 + 0x28]
xor r14d, r14d
xor edi, edi
jmp 0x4e1fa0
mov r8d, 0xffff8000
mov rcx, r15
mov edx, edi
call fcn.004e2410
mov esi, edi
add esi, 0xffffffff
cmp esi, ebp
mov edi, ebp
cmovb edi, r14d
mov rcx, qword [r13 + 0x10]
test rcx, rcx
je 0x4e1fde
nop word [rax + rax]
mov edx, dword [rcx + 0x58]
cmp edx, edi
seta bl
cmp esi, edx
setae al
cmovb edx, edi
xor al, bl
cmove edi, edx
mov rcx, qword [rcx + 0x28]
test rcx, rcx
jne 0x4e1fc0
test edi, edi
je 0x4e1c74
mov rax, qword [r13 + 0x60]
test rax, rax
je 0x4e1f90
mov rcx, qword [r15]
mov rcx, qword [rcx + 0x20]
add rcx, 0x18
mov r8d, 0xffffffff
xor edx, edx
nop word cs:[rax + rax]
add rdx, 1
add r8d, 1
lea rbx, [rcx + 0x20]
cmp qword [rcx], rax
mov rcx, rbx
jne 0x4e2010
jmp 0x4e1f96