Function at 0x1001f850
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x24]
sub esp, 0x10
test ecx, ecx
je 0x1001fa3a
mov eax, dword [ebp + 0x20]
movdqa xmm3, xmmword [0x1019b490]
add eax, 0xfffffffc
mov edx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov dword [ebp - 8], eax
lea ebx, [ebx]
dec ecx
xor eax, eax
cmp byte [0x101fd8ec], al
mov edi, dword [ebp + 0x20]
mov dword [ebp + 0x24], ecx
mov dword [ebp - 0xc], edi
je 0x1001f92a
lea ecx, [edi - 0x20]
mov dword [ebp - 0x10], ecx
test ecx, ecx
js 0x1001f8e8
movdqa xmm2, xmmword [0x1019b490]
mov ecx, edx
mov dword [ebp - 4], esi
sub dword [ebp - 4], edx
mov edx, dword [ebp - 4]
jmp 0x1001f8c0
movdqu xmm0, xmmword [ecx]
lea ecx, [ecx + 0x20]
movdqu xmm1, xmmword [ecx - 0x10]
pxor xmm0, xmm2
pxor xmm1, xmm2
movdqu xmmword [edx + ecx - 0x20], xmm0
movdqu xmmword [eax + esi + 0x10], xmm1
add eax, 0x20
cmp eax, dword [ebp - 0x10]
jle 0x1001f8c0
lea edx, [edi - 8]
cmp eax, edx
jg 0x1001f92a
mov ecx, dword [ebp + 8]
sub edx, eax
movdqa xmm1, xmmword [0x1019b490]
mov edi, esi
sub edi, dword [ebp + 8]
add ecx, eax
shr edx, 3
inc edx
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 0x10]
lea eax, [eax + edx*8]
movq xmm0, qword [ecx]
lea ecx, [ecx + 8]
pxor xmm0, xmm1
movq qword [ecx + esi - 8], xmm0
dec edx
jne 0x1001f913
mov esi, dword [ebp + 0x18]
cmp eax, dword [ebp - 8]
jg 0x1001f979
mov ecx, dword [ebp + 8]
mov edx, esi
sub edx, ecx
mov dword [ebp - 0x10], edx
lea edi, [eax + ecx]
lea esp, [esp]
movzx ecx, byte [edi]
lea edi, [edi + 4]
mov dl, byte [edi - 3]
not cl
mov esi, dword [ebp - 0x10]
not dl
mov byte [edi + esi - 4], cl
mov esi, dword [ebp + 0x18]
mov byte [esi + eax + 1], dl
mov dl, byte [edi - 1]
movzx ecx, byte [edi - 2]
not dl
not cl
mov byte [esi + eax + 3], dl
mov byte [esi + eax + 2], cl
add eax, 4
cmp eax, dword [ebp - 8]
jle 0x1001f940
mov edi, dword [ebp - 0xc]
mov ecx, edi
sub ecx, eax
mov dword [ebp - 0xc], ecx
cmp eax, edi
jge 0x1001fa1e
cmp ecx, 0x20
jb 0x1001f9fc
lea ecx, [esi - 1]
add ecx, edi
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 8]
lea edx, [ecx - 1]
lea esi, [eax + ecx]
add edx, edi
mov ecx, dword [ebp + 0x18]
add ecx, eax
cmp ecx, edx
ja 0x1001f9ae
cmp dword [ebp - 0x10], esi
jae 0x1001f9fc
mov ecx, dword [ebp - 0xc]
and ecx, 0x8000001f
jns 0x1001f9be
dec ecx
or ecx, 0xffffffe0
inc ecx
mov edx, edi
sub edx, ecx
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp + 8]
mov dword [ebp - 4], ecx
sub dword [ebp - 4], edx
mov edx, dword [ebp - 4]
movdqu xmm0, xmmword [esi]
lea esi, [esi + 0x20]
pandn xmm0, xmm3
movdqu xmmword [esi + edx - 0x20], xmm0
movdqu xmm0, xmmword [esi - 0x10]
pandn xmm0, xmm3
movdqu xmmword [eax + ecx + 0x10], xmm0
add eax, 0x20
cmp eax, dword [ebp - 0x10]
jl 0x1001f9d4
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x18]
cmp eax, edi
jge 0x1001fa1e
sub edx, esi
lea ecx, [eax + esi]
sub edi, eax
lea ecx, [ecx]
mov al, byte [ecx + edx]
lea ecx, [ecx + 1]
not al
mov byte [ecx - 1], al
dec edi
jne 0x1001fa10
mov edx, dword [ebp + 8]
add edx, dword [ebp + 0xc]
add esi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x24]
mov dword [ebp + 8], edx
mov dword [ebp + 0x18], esi
test ecx, ecx
jne 0x1001f880
pop edi
pop esi
mov esp, ebp
pop ebp
ret