Function at 0x10016650
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100669b5
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x1007c040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [0x1007f8dc], 0
je 0x100168e4
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount64]
call esi
sub eax, dword [0x1007f958]
sbb edx, dword [0x1007f95c]
mov dword [ebp - 0x4c], edx
jne 0x100166ab
cmp eax, 0xbb8
jb 0x100168e4
call esi
movaps xmm0, xmmword [0x10074840]
xor ecx, ecx
mov dword [0x1007f958], eax
mov dword [0x1007f95c], edx
movups xmmword [ebp - 0x60], xmm0
mov al, byte [ebp - 0x60]
xor byte [ebp + ecx - 0x5f], al
inc ecx
cmp ecx, 0xe
jb 0x100166c5
sub esp, 0x18
mov byte [ebp - 0x51], 0
mov edx, esp
lea ecx, [ebp - 0x5f]
xorps xmm0, xmm0
lea esi, [ecx + 1]
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100166f5
sub ecx, esi
lea eax, [ebp - 0x5f]
push ecx
push eax
mov ecx, edx
call fcn.100051a0
lea ecx, [ebp - 0x48]
call fcn.10059820
add esp, 0x18
mov dword [ebp - 4], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x2c], vtable.ByteBuffer.0
mov byte [ebp - 0x28], 1
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x30], 0x1000
call fcn.1000c6a0
mov byte [ebp - 4], 2
mov edi, dword [ebp - 0x18]
mov esi, edi
mov ecx, dword [ebp - 0x1c]
sub esi, ecx
mov dword [ebp - 0x2c], vtable.Packet.0
cmp esi, 0x989680
ja 0x100167d5
mov edx, dword [ebp - 0x20]
inc edx
cmp esi, edx
jae 0x100167c5
mov eax, dword [ebp - 0x14]
sub eax, ecx
cmp edx, eax
jbe 0x100167ae
push ecx
push edx
lea ecx, [ebp - 0x1c]
call fcn.1000c8f0
jmp 0x100167c2
sub edx, esi
push edx
push 0
push edi
lea esi, [edi + edx]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x18], esi
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov byte [ecx + eax], 0xa1
inc dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, edi
mov byte [ebp - 4], 3
sub edx, ecx
cmp edx, 0x989680
ja 0x10016823
mov esi, dword [ebp - 0x20]
inc esi
cmp edx, esi
jae 0x10016819
mov eax, dword [ebp - 0x14]
sub eax, ecx
cmp esi, eax
jbe 0x10016802
push ecx
push esi
lea ecx, [ebp - 0x1c]
call fcn.1000c8f0
jmp 0x10016816
sub esi, edx
push esi
push 0
push edi
call sub.VCRUNTIME140.dll_memset
lea eax, [esi + edi]
add esp, 0xc
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov byte [ecx + eax], 0xa2
inc dword [ebp - 0x20]
cmp dword [ebp - 0x34], 0xf
lea eax, [ebp - 0x48]
lea ecx, [ebp - 0x2c]
cmova eax, dword [ebp - 0x48]
push eax
call fcn.1000c460
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
sub eax, ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x4c], ecx
cmp eax, 0x4000
ja 0x10016865
mov ecx, dword ds:[0x1006abc4]
mov ecx, dword ds:[ecx]
push dword [ebp - 0x30]
push dword [ebp - 0x4c]
call dword [0x1006abc0]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], vtable.ByteBuffer.0
test ecx, ecx
je 0x100168ae
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x1001688f
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100168d4
push edx
push ecx
call fcn.100641c5
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x34]
cmp ecx, 0xf
jbe 0x100168e4
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100168da
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100168da
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100641c5
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10064164
mov esp, ebp
pop ebp
ret