Function at 0x496070
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x138
mov qword [rsp + 0x180], rcx
mov rax, qword [rsp + 0x180]
mov rdi, qword [rsp + 0x180]
mov ecx, edx
mov qword [rsp + 0x198], r9
mov edx, dword [rax + 4]
mov eax, r8d
add rax, qword [rdi + 0xa0]
bswap rax
mov qword [rsp + 0x64], rax
mov eax, edx
or eax, r8d
je 0x4960f0
cmp edx, 3
jbe 0x496bf0
test r8d, r8d
jne 0x496bf0
mov r8d, 0x10
lea r9, [rsp + rdx + 0x60]
sub r8, rdx
jmp 0x4960fb
lea r9, [rsp + 0x64]
mov r8d, 0xc
mov rcx, qword [rsp + 0x180]
mov rdx, r9
mov ebx, 0x1e
mov ebp, 0xa
call fcn.0048d9c0
mov rax, qword [rsp + 0x180]
mov rdi, qword [rsp + 0x180]
mov eax, dword [rax + 8]
lea r14, [rdi + 0xc]
lea rdi, [rsp + 0xb0]
mov rcx, rdi
mov qword [rsp + 0x58], r14
lea eax, [rax + rax*2]
add eax, eax
lea rsi, [rax*4]
sub rbx, rax
mov rax, qword [rsp + 0x180]
mov r8, rsi
lea rdx, [rax + rbx*4 + 0xc]
call sub.msvcrt.dll_memcpy
mov r8d, ebx
lea rcx, [rdi + rsi]
mov rdx, r14
shl r8, 2
call sub.msvcrt.dll_memcpy
lea rax, [rsp + 0xbc]
mov qword [rsp + 0x30], rax
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [rsp + 0x11c]
mov r8d, 0x6c
mov rdx, rdi
lea r15, [0x006cd100]
mov rcx, qword [rsp + 0x30]
lea r13, [0x006ccd00]
lea r12, [0x006cc900]
mov qword [rsp + 0x70], rax
mov eax, dword [rsp + 0x124]
mov dword [rsp + 0x78], eax
call sub.msvcrt.dll_memmove
mov rax, qword [rsp + 0x70]
vmovq xmm0, qword [rsp + 0xec]
mov edx, dword [rsp + 0xc8]
vmovq xmm1, qword [rsp + 0xc0]
vpxor xmm0, xmm0, xmm1
mov r11d, dword [rsp + 0x78]
xor dword [rsp + 0xf4], edx
mov rbx, rax
shr rbx, 0x20
mov r10, rbx
mov ebx, dword [rsp + 0xc0]
xor r11d, edx
xor r10d, dword [rsp + 0xc4]
xor eax, ebx
mov dword [rsp + 0x38], ebx
xor ebx, dword [rsp + 0xec]
vmovq qword [rsp + 0xec], xmm0
mov edx, eax
movzx ecx, ah
movzx r8d, al
shr edx, 0x10
shr eax, 0x18
mov ecx, dword [r13 + rcx*4]
mov r8d, dword [r12 + r8*4]
movzx edx, dl
movzx esi, r10b
mov edx, dword [r15 + rdx*4]
mov esi, dword [r12 + rsi*4]
mov dword [rsp + 0x2c], ebx
lea rbx, [0x006cd500]
mov r14d, dword [rbx + rax*4]
mov eax, edx
xor eax, ecx
xor r14d, r8d
xor r8d, esi
xor r14d, eax
mov eax, r10d
shr eax, 0x18
mov eax, dword [rbx + rax*4]
mov ebx, r10d
shr r10d, 0x10
movzx ebx, bh
movzx r10d, r10b
mov r9d, dword [r13 + rbx*4]
mov rbx, r12
movzx r12d, r11b
mov r12d, dword [rbx + r12*4]
mov ebx, r11d
movzx ebx, bh
xor ecx, r9d
xor r9d, dword [r15 + r10*4]
mov r10d, eax
xor r10d, esi
lea rsi, [0x006cd500]
xor r8d, r12d
xor r9d, r10d
mov r10d, r11d
shr r10d, 0x18
mov esi, dword [rsi + r10*4]
mov r10d, r11d
shr r10d, 0x10
movzx r10d, r10b
mov r10d, dword [r15 + r10*4]
xor eax, esi
xor esi, r12d
lea r12, [0x006cd500]
xor edx, r10d
xor r10d, dword [r13 + rbx*4]
xor r10d, esi
mov esi, dword [rsp + 0xbc]
mov r11d, esi
mov ebx, esi
shr r11d, 0x18
movzx ebx, bh
mov r11d, dword [r12 + r11*4]
mov r12d, esi
mov r13, rbx
lea rbx, [0x006ccd00]
shr r12d, 0x10
mov r13d, dword [rbx + r13*4]
movzx esi, sil
lea rbx, [0x006cc900]
movzx r12d, r12b
mov r12d, dword [r15 + r12*4]
xor eax, r11d
xor ecx, r13d
mov r15d, ecx
xor edx, r12d
xor r11d, dword [rbx + rsi*4]
xor r12d, r13d
mov esi, r14d
xor esi, eax
mov r13d, r8d
shl r15d, 8
and esi, 0xff000000
xor r11d, r12d
mov r12d, r9d
xor r12d, edx
xor r13d, r11d
xor r15d, r11d
and r12d, 0xff0000
movzx r13d, r13b
and r15d, 0xff00
or esi, r12d
mov r12d, r10d
xor r12d, ecx
and r12d, 0xff00
or r12d, r13d
mov r13d, r8d
or esi, r12d
mov r12d, eax
shr r13d, 0x18
shl r12d, 8
xor r13d, r14d
mov dword [rsp + 0xb0], esi
xor r12d, r9d
movzx r13d, r13b
and r12d, 0xff000000
or r12d, r13d
mov r13d, edx
shl r13d, 8
xor r13d, r10d
and r13d, 0xff0000
or r13d, r15d
mov r15d, ecx
or r13d, r12d
mov r12d, eax
mov dword [rsp + 0xb4], r13d
mov r13d, r8d
shl r12d, 0x10
shr r13d, 0x10
xor r12d, r10d
xor r13d, r9d
and r12d, 0xff000000
movzx r13d, r13b
or r12d, r13d
mov r13d, edx
shr r8d, 8
shr r15d, 0x10
shl r13d, 0x10
shl eax, 0x18
shr edx, 8
shr ecx, 8
xor r13d, r11d
xor r15d, r14d
xor r11d, eax
xor r10d, r8d
xor r14d, edx
xor r9d, ecx
and r13d, 0xff0000
and r15d, 0xff00
and r11d, 0xff000000
and r14d, 0xff0000
and r9d, 0xff00
movzx r8d, r10b
or r13d, r15d
or r11d, r8d
or r14d, r9d
or r13d, r12d
or r11d, r14d
dec ebp
mov dword [rsp + 0xb8], r13d
mov dword [rsp + 0xbc], r11d
jne 0x496190
lea rbp, [rsp + 0xec]
lea rax, [rsp + 0xe8]
mov dword [rsp + 0x44], 0xd
mov ebx, dword [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rbp
jmp 0x4964a7
mov ebx, dword [rsp + 0xc0]
xor ebx, esi
mov eax, dword [rsp + 0x2c]
mov r14, qword [rsp + 0x50]
lea rbp, [0x006cc900]
mov dword [rsp + 0xc0], ebx
vmovdqu xmm2, xmmword [rdi]
mov rcx, qword [rsp + 0xfc]
mov dword [rsp + 0x30], ebx
mov r13, qword [rsp + 0xf4]
mov r9, qword [rsp + 0x104]
xor eax, esi
mov r10, qword [rsp + 0x10c]
mov r11, qword [rsp + 0x114]
mov r8, qword [rsp + 0x11c]
mov edx, dword [rsp + 0x124]
mov dword [rsp + 0xec], eax
mov dword [rsp + 0x38], ecx
mov r12, qword [rsp + 0xec]
vmovdqu xmmword [r14], xmm2
vmovdqu xmm3, xmmword [rdi + 0x10]
mov dword [rsp + 0xa8], edx
vmovdqu xmmword [r14 + 0x10], xmm3
vmovdqu xmm4, xmmword [rdi + 0x20]
vmovdqu xmmword [r14 + 0x20], xmm4
mov rsi, qword [rdi + 0x30]
mov qword [r14 + 0x30], rsi
mov esi, dword [rdi + 0x38]
mov qword [rsp + 0xb0], r12
mov qword [rsp + 0xb8], r13
mov qword [rsp + 0xc0], rcx
lea rcx, [0x006cd100]
mov qword [rsp + 0xc8], r9
mov qword [rsp + 0xd0], r10
mov qword [rsp + 0xd8], r11
mov qword [rsp + 0xe0], r8
lea r8, [0x006cd500]
mov dword [r14 + 0x38], esi
mov dword [rsp + 0xe8], edx
mov edx, eax
lea r14, [0x006ccd00]
shr edx, 0x10
mov rbx, r8
movzx edx, dl
mov esi, dword [rcx + rdx*4]
movzx edx, ah
mov r15d, dword [r14 + rdx*4]
movzx edx, al
shr eax, 0x18
mov r11d, dword [rbp + rdx*4]
mov r13d, dword [r8 + rax*4]
mov eax, esi
xor eax, r15d
xor r13d, r11d
xor r13d, eax
mov eax, dword [rsp + 0xb4]
mov edx, eax
shr edx, 0x18
mov r9d, dword [r8 + rdx*4]
movzx edx, ah
mov r8d, dword [r14 + rdx*4]
movzx edx, al
shr eax, 0x10
movzx eax, al
mov r10d, dword [rbp + rdx*4]
mov r12d, dword [rcx + rax*4]
mov eax, r9d
xor eax, r10d
xor r12d, r8d
xor r12d, eax
mov eax, dword [rsp + 0xb8]
mov edx, eax
shr edx, 0x18
mov r14d, dword [rbx + rdx*4]
mov edx, eax
shr edx, 0x10
movzx edx, dl
mov ebx, dword [rcx + rdx*4]
movzx ecx, al
lea rdx, [0x006ccd00]
movzx eax, ah
mov ecx, dword [rbp + rcx*4]
mov ebp, dword [rdx + rax*4]
xor r9d, r14d
lea rdx, [0x006cd100]
mov eax, dword [rsp + 0xbc]
xor r14d, ecx
xor ecx, r10d
xor ebp, ebx
mov r10d, eax
xor ecx, r11d
lea r11, [0x006cd500]
xor r14d, ebp
shr r10d, 0x18
lea rbp, [0x006ccd00]
mov r10d, dword [r11 + r10*4]
mov r11d, eax
shr r11d, 0x10
movzx r11d, r11b
mov r11d, dword [rdx + r11*4]
mov edx, ebx
mov rbx, rbp
xor r9d, r10d
xor edx, r11d
xor edx, esi
movzx esi, ah
movzx eax, al
mov esi, dword [rbp + rsi*4]
lea rbp, [0x006cc900]
xor r10d, dword [rbp + rax*4]
mov eax, r12d
xor eax, edx
and eax, 0xff0000
xor r8d, esi
xor r11d, esi
mov esi, r14d
xor r8d, r15d
xor r10d, r11d
xor esi, r8d
mov r11d, esi
mov esi, r13d
xor esi, r9d
and r11d, 0xff00
or eax, r11d
mov r11d, esi
mov esi, ecx
xor esi, r10d
and r11d, 0xff000000
movzx esi, sil
or r11d, esi
mov esi, edx
shl esi, 8
or eax, r11d
xor esi, r14d
mov dword [rsp + 0xb0], eax
and esi, 0xff0000
mov r15d, esi
mov esi, r8d
shl esi, 8
xor esi, r10d
and esi, 0xff00
mov r11d, esi
mov esi, r15d
mov r15d, r9d
shl r15d, 8
or esi, r11d
mov r11d, r15d
mov r15d, ecx
shr r15d, 0x18
xor r11d, r12d
xor r15d, r13d
and r11d, 0xff000000
movzx r15d, r15b
or r11d, r15d
or esi, r11d
mov dword [rsp + 0x2c], esi
mov dword [rsp + 0xb4], esi
mov esi, edx
shl esi, 0x10
xor esi, r10d
and esi, 0xff0000
mov r15d, esi
mov esi, r8d
shr esi, 0x10
xor esi, r13d
and esi, 0xff00
mov r11d, esi
mov esi, r15d
mov r15d, r9d
shl r15d, 0x10
or esi, r11d
mov r11d, r15d
mov r15d, ecx
xor r11d, r14d
and r11d, 0xff000000
shr r15d, 0x10
shl r9d, 0x18
shr ecx, 8
xor r9d, r10d
xor ecx, r14d
shr edx, 8
shr r8d, 8
xor r15d, r12d
xor r13d, edx
xor r12d, r8d
and r9d, 0xff000000
movzx ecx, cl
and r12d, 0xff00
and r13d, 0xff0000
movzx r15d, r15b
or r9d, ecx
or r13d, r12d
or r11d, r15d
mov r8d, 0x40
mov ecx, r9d
or esi, r11d
mov rdx, rdi
or ecx, r13d
mov dword [rsp + 0x3c], esi
mov dword [rsp + 0xb8], esi
mov dword [rsp + 0x40], ecx
mov dword [rsp + 0xbc], ecx
mov ecx, dword [rsp + 0x38]
xor ecx, eax
xor eax, dword [rsp + 0xf0]
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0xc0], ecx
mov dword [rsp + 0xf0], eax
vmovdqu xmm5, xmmword [rsp + 0xf0]
mov r12d, eax
vmovdqu xmmword [rsp + 0x70], xmm5
vmovdqu xmm1, xmmword [rsp + 0x100]
vmovdqu xmm2, xmmword [rsp + 0x110]
mov rax, qword [rsp + 0x120]
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0xa0], rax
vmovdqu xmmword [rsp + 0x80], xmm1
vmovdqu xmmword [rsp + 0x90], xmm2
call sub.msvcrt.dll_memmove
mov rax, qword [rsp + 0xa0]
lea r8, [0x006cd100]
vmovdqu xmm3, xmmword [rsp + 0x70]
vmovdqu xmm4, xmmword [rsp + 0x80]
vmovdqu xmm5, xmmword [rsp + 0x90]
mov qword [rsp + 0xe0], rax
mov eax, r12d
shr eax, 0x10
movzx eax, al
mov r15d, dword [r8 + rax*4]
mov eax, r12d
movzx eax, ah
mov esi, dword [rbx + rax*4]
movzx eax, r12b
mov r10d, dword [rbp + rax*4]
mov eax, r12d
lea r12, [0x006cd500]
vmovdqu xmmword [rsp + 0xb0], xmm3
shr eax, 0x18
vmovdqu xmmword [rsp + 0xc0], xmm4
vmovdqu xmmword [rsp + 0xd0], xmm5
mov r14d, dword [r12 + rax*4]
mov eax, r15d
xor eax, esi
xor r14d, r10d
xor r14d, eax
mov eax, dword [rsp + 0xb4]
movzx ecx, ah
mov edx, eax
mov r11d, dword [rbx + rcx*4]
shr edx, 0x18
movzx ecx, al
shr eax, 0x10
mov edx, dword [r12 + rdx*4]
movzx eax, al
mov r9d, dword [rbp + rcx*4]
mov r13d, dword [r8 + rax*4]
mov eax, edx
xor eax, r9d
xor r13d, r11d
xor r13d, eax
mov eax, dword [rsp + 0xb8]
mov ecx, eax
shr ecx, 0x18
mov r12d, dword [r12 + rcx*4]
mov ecx, eax
xor edx, r12d
shr ecx, 0x10
movzx ecx, cl
mov r8d, dword [r8 + rcx*4]
movzx ecx, al
movzx eax, ah
mov ecx, dword [rbp + rcx*4]
mov rbp, rbx
mov ebx, dword [rbx + rax*4]
xor r12d, ecx
xor ebx, r8d
xor ecx, r9d
lea r9, [0x006cd500]
xor r12d, ebx
mov ebx, dword [rsp + 0x30]
xor ecx, r10d
lea r10, [0x006cd100]
mov eax, ebx
shr eax, 0x18
mov r9d, dword [r9 + rax*4]
mov eax, ebx
shr eax, 0x10
movzx eax, al
mov r10d, dword [r10 + rax*4]
movzx eax, bh
movzx ebx, bl
xor edx, r9d
xor r8d, r10d
xor r8d, r15d
mov r15d, dword [rbp + rax*4]
lea rbp, [0x006cc900]
mov eax, r11d
xor r9d, dword [rbp + rbx*4]
mov ebx, r10d
mov r11d, ecx
mov r10d, edx
shl r10d, 8
shr r11d, 0x18
xor r11d, r14d
xor r10d, r13d
xor eax, r15d
xor ebx, r15d
mov r15d, ecx
and r10d, 0xff000000
xor eax, esi
mov esi, r13d
xor ebx, r9d
mov r9d, r12d
xor esi, r8d
xor r9d, eax
and esi, 0xff0000
xor r15d, ebx
and r9d, 0xff00
movzx r15d, r15b
or esi, r9d
mov r9d, r14d
xor r9d, edx
and r9d, 0xff000000
or r15d, r9d
movzx r9d, r11b
or esi, r15d
or r10d, r9d
mov r9d, r8d
mov r11d, r10d
mov r10d, eax
shl r9d, 8
mov dword [rsp + 0xb0], esi
shl r10d, 8
xor r9d, r12d
xor r10d, ebx
and r9d, 0xff0000
and r10d, 0xff00
or r10d, r9d
mov r9d, r8d
shr r8d, 8
shl r9d, 0x10
or r10d, r11d
mov r11d, edx
xor r8d, r14d
xor r9d, ebx
shl r11d, 0x10
and r8d, 0xff0000
shl edx, 0x18
mov r15d, r9d
mov r9d, eax
shr eax, 8
xor r11d, r12d
shr r9d, 0x10
and r15d, 0xff0000
xor eax, r13d
and r11d, 0xff000000
xor r9d, r14d
and eax, 0xff00
xor edx, ebx
mov dword [rsp + 0xb4], r10d
and r9d, 0xff00
or r8d, eax
mov eax, ecx
or r15d, r9d
mov r9d, r15d
mov r15d, ecx
shr r15d, 0x10
xor r15d, r13d
movzx r15d, r15b
or r11d, r15d
or r11d, r9d
and edx, 0xff000000
shr eax, 8
xor r12d, eax
mov dword [rsp + 0xb8], r11d
movzx eax, r12b
or edx, eax
or r8d, edx
mov dword [rsp + 0xbc], r8d
dec dword [rsp + 0x44]
jne 0x4964a0
mov eax, dword [rsp + 0xc0]
mov r9d, r11d
xor eax, esi
xor esi, dword [rsp + 0x2c]
bswap r10d
mov rdi, qword [rsp + 0x198]
mov dword [rdi], r10d
bswap r9d
mov dword [rdi + 4], r9d
bswap r8d
mov dword [rdi + 8], r8d
bswap eax
mov dword [rdi + 0xc], eax
mov r11d, esi
bswap r11d
mov dword [rdi + 0x10], r11d
mov r11d, dword [rsp + 0x3c]
bswap r11d
mov r9d, dword [rsp + 0x40]
mov dword [rdi + 0x14], r11d
bswap r9d
cmp qword [rsp + 0x1a0], 8
mov dword [rdi + 0x18], r9d
je 0x496c60
mov rax, qword [rsp + 0x180]
vmovdqu xmm0, xmmword [0x006cd9a0]
mov qword [rax + 0xc], 0
mov rax, qword [rsp + 0x180]
mov qword [rax + 0x60], 0
lea rdx, [rax + 0x68]
mov rax, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x58]
lea rdi, [rax + 0x14]
xor eax, eax
and rdi, 0xfffffffffffffff8
sub rcx, rdi
add ecx, 0x5c
shr ecx, 3
rep stosq qword [rdi], rax
mov rax, qword [rsp + 0x180]
vmovdqu xmmword [rax + 0x68], xmm0
mov rax, qword [0x006cd9b0]
mov qword [rdx + 0x10], rax
mov eax, dword [0x006cd9b8]
mov dword [rdx + 0x18], eax
mov rax, qword [rsp + 0x180]
mov qword [rax], 0
mov dword [rax + 8], 0
mov qword [rax + 0xa0], 0
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0xff
shrx r8d, eax, r8d
andn ecx, r8d, ecx
cmp edx, 4
je 0x496cef
mov r9d, edx
mov r8d, 0x10
lea eax, [rdx + 1]
mov byte [rsp + r9 + 0x60], cl
sub r8, r9
lea r9, [rsp + r9 + 0x60]
cmp eax, 3
ja 0x4960fb
mov byte [rsp + rax + 0x60], 0
lea eax, [rdx + 2]
cmp edx, 2
je 0x4960fb
mov byte [rsp + rax + 0x60], 0
lea eax, [rdx + 3]
cmp edx, 1
jne 0x496d0a
jmp 0x4960fb
mov r14d, dword [rsp + 0x38]
bswap r14d
mov rax, qword [rsp + 0x180]
mov dword [rdi + 0x1c], r14d
vmovdqu xmm0, xmmword [0x006cd980]
mov qword [rax + 0xc], 0
mov rax, qword [rsp + 0x180]
mov qword [rax + 0x5c], 0
mov rax, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x58]
lea rdi, [rax + 0x14]
xor eax, eax
and rdi, 0xfffffffffffffff8
sub rcx, rdi
add ecx, 0x58
shr ecx, 3
rep stosq qword [rdi], rax
mov rax, qword [rsp + 0x180]
vmovdqu xmmword [rax + 0x64], xmm0
vmovdqu xmm0, xmmword [0x006cd990]
mov qword [rax], 0
mov dword [rax + 8], 0
mov qword [rax + 0xa0], 0
vmovdqu xmmword [rax + 0x74], xmm0
jmp 0x496bd7
mov byte [rsp + 0x60], cl
mov word [rsp + 0x61], 0
mov eax, 3
mov r8d, 0x10
lea r9, [rsp + 0x60]
mov edx, eax
mov byte [rsp + rdx + 0x60], 0
cmp eax, 2
jne 0x4960fb
mov byte [rsp + 0x63], 0
jmp 0x4960fb