Function at 0x1008a6f0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0xf8
mov eax, dword [0x100f529c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebx + 0x14]
mov edx, dword [ebx + 0x18]
mov eax, dword [ebx + 0x10]
push esi
mov esi, dword [ebx + 8]
movd xmm0, ecx
mov dword [ebp - 0x84], eax
lea eax, [edx*8]
push edi
cmp dword [esi + 0x18], 0
mov edi, dword [ebx + 0xc]
pshufd xmm3, xmm0, 0
mov dword [ebp - 0x80], esi
movups xmmword [ebp - 0xc0], xmm3
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x6c], eax
jne 0x1008ac7d
shr eax, 3
cmp eax, edx
jne 0x1008ac7d
lea eax, [edx*8]
add eax, dword [esi + 0x14]
cmp eax, dword [ebp - 0x6c]
jb 0x1008ac7d
mov eax, dword [esi + 0x14]
lea edi, [ecx + 0x48]
add edi, dword [esi + 0x5c]
shr edi, 6
dec edi
lea eax, [eax + ecx*8]
mov dword [ebp - 0x8c], edi
mov ecx, eax
mov dword [ebp - 0x9c], eax
shr ecx, 0x18
lea edi, [edx + 0x48]
add edi, dword [esi + 0x5c]
mov dword [ebp - 0x90], ecx
mov ecx, eax
shr eax, 8
push 0x40
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x48]
shr ecx, 0x10
push 0
shr edi, 6
push eax
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x94], ecx
call fcn.100a7e90
xor edx, edx
mov dword [ebp - 0x4c], 0
xor eax, eax
mov dword [ebp - 0x68], edx
add esp, 0xc
mov dword [ebp - 0x70], eax
xorps xmm0, xmm0
test edi, edi
mov edi, dword [ebp - 0x74]
movups xmmword [ebp - 0x5c], xmm0
je 0x1008ac4d
movd xmm0, edx
xor edi, edi
pshufd xmm0, xmm0, 0
mov dword [ebp - 0x6c], edi
movups xmmword [ebp - 0xd0], xmm0
test eax, eax
jne 0x1008a829
mov edi, dword [esi + 0x5c]
mov dword [ebp - 0x6c], edi
test edi, edi
je 0x1008a829
push edi
lea eax, [esi + 0x1c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.100a7910
mov edx, dword [ebp - 0x68]
add esp, 0xc
mov ecx, dword [ebx + 0x18]
movd xmm0, edi
pshufd xmm2, xmm0, 0
movups xmmword [ebp - 0xb0], xmm2
cmp edx, ecx
jae 0x1008a874
mov eax, 0x40
sub ecx, edx
sub eax, edi
cmp eax, ecx
cmovbe ecx, eax
test ecx, ecx
je 0x1008a874
mov eax, dword [ebp - 0x84]
add eax, edx
push ecx
push eax
lea eax, [ebp - 0x48]
add eax, edi
push eax
call fcn.100a7910
movups xmm2, xmmword [ebp - 0xb0]
mov edx, dword [ebp - 0x68]
add esp, 0xc
mov eax, 0x40
mov ecx, edi
sub eax, edi
mov dword [ebp - 0x64], ecx
cmp edi, 0x40
jae 0x1008abae
cmp eax, 8
jb 0x1008ab22
movups xmm3, xmmword [ebp - 0xc0]
and eax, 7
mov esi, 0x40
movaps xmm6, xmmword [0x100d4b30]
sub esi, eax
movaps xmm7, xmmword [0x100cf090]
mov eax, 0x1f
movaps xmm0, xmm3
movd xmm5, eax
psrld xmm0, xmm5
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x100cf0a0]
packuswb xmm0, xmm0
movaps xmmword [ebp - 0xe0], xmm0
movaps xmm0, xmmword [0x100d4b50]
movaps xmmword [ebp - 0xf0], xmm0
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm1, xmm0, 0
movaps xmm4, xmm3
paddd xmm1, xmm6
psubd xmm1, xmm2
paddd xmm1, xmmword [ebp - 0xd0]
pxor xmm4, xmm1
movaps xmm0, xmm1
psrld xmm0, xmm5
psubd xmm1, xmm3
xorps xmm3, xmm3
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm2, xmm0, 0xd8
pand xmm2, xmmword [0x100cf0a0]
psrld xmm1, xmm5
packuswb xmm2, xmm2
pshuflw xmm0, xmm1, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x100cf0a0]
movd xmm0, dword [ebp - 0xe0]
pxor xmm0, xmm2
packuswb xmm1, xmm1
pxor xmm1, xmm2
por xmm1, xmm0
movd xmm0, dword [ebp + ecx - 0x48]
pxor xmm1, xmm2
psubb xmm3, xmm1
xorps xmm1, xmm1
pand xmm3, xmm0
movaps xmm0, xmm4
pandn xmm4, xmmword [0x100c8740]
psubd xmm0, xmm7
psrld xmm0, xmm5
psrld xmm4, xmm5
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm2, xmm0, 0xd8
pand xmm2, xmmword [0x100cf0a0]
pshuflw xmm0, xmm4, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x100cf0a0]
movups xmm4, xmmword [ebp - 0xc0]
packuswb xmm0, xmm0
packuswb xmm2, xmm2
pand xmm2, xmm0
movd xmm0, dword [ebp - 0xf0]
psubb xmm1, xmm2
pand xmm1, xmm0
movd xmm0, eax
por xmm3, xmm1
pshufd xmm1, xmm0, 0
paddd xmm1, xmm6
movd dword [ebp + ecx - 0x48], xmm3
psubd xmm1, xmmword [ebp - 0xb0]
xorps xmm3, xmm3
paddd xmm1, xmmword [ebp - 0xd0]
movaps xmm0, xmm1
pxor xmm4, xmm1
psubd xmm1, xmmword [ebp - 0xc0]
psrld xmm0, xmm5
psrld xmm1, xmm5
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm2, xmm0, 0xd8
pand xmm2, xmmword [0x100cf0a0]
pshuflw xmm0, xmm1, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x100cf0a0]
movd xmm0, dword [ebp - 0xe0]
packuswb xmm2, xmm2
packuswb xmm1, xmm1
pxor xmm0, xmm2
pxor xmm1, xmm2
por xmm1, xmm0
pxor xmm1, xmm2
psubb xmm3, xmm1
movd xmm0, dword [ebp + ecx - 0x44]
xorps xmm1, xmm1
pand xmm3, xmm0
movaps xmm0, xmm4
pandn xmm4, xmmword [0x100c8740]
psubd xmm0, xmm7
psrld xmm0, xmm5
psrld xmm4, xmm5
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm2, xmm0, 0xd8
pand xmm2, xmmword [0x100cf0a0]
pshuflw xmm0, xmm4, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x100cf0a0]
packuswb xmm2, xmm2
packuswb xmm0, xmm0
pand xmm2, xmm0
movd xmm0, dword [ebp - 0xf0]
psubb xmm1, xmm2
movups xmm2, xmmword [ebp - 0xb0]
pand xmm1, xmm0
por xmm3, xmm1
movd dword [ebp + ecx - 0x44], xmm3
add ecx, 8
mov eax, ecx
movups xmm3, xmmword [ebp - 0xc0]
cmp ecx, esi
jb 0x1008a8f1
mov esi, dword [ebp - 0x80]
mov dword [ebp - 0x64], ecx
cmp eax, 0x40
jae 0x1008abae
mov eax, dword [ebx + 0x14]
lea esi, [ebp - 0x48]
shr eax, 0x1f
add esi, ecx
mov dword [ebp - 0x88], eax
mov eax, ecx
sub eax, edi
mov ecx, 0x40
lea edi, [eax + edx]
sub eax, dword [ebx + 0x14]
add eax, edx
sub ecx, dword [ebp - 0x64]
mov dword [ebp - 0x7c], ecx
nop word [eax + eax]
mov ecx, edi
lea esi, [esi + 1]
xor ecx, dword [ebx + 0x14]
mov edx, edi
mov dword [ebp - 0x60], ecx
inc edi
not dword [ebp - 0x60]
dec ecx
shr dword [ebp - 0x60], 0x1f
mov dword [ebp - 0x78], ecx
mov ecx, eax
shr ecx, 0x1f
inc eax
shr edx, 0x1f
xor cl, dl
mov dword [ebp - 0x64], ecx
mov cl, dl
xor cl, byte [ebp - 0x88]
or byte [ebp - 0x64], cl
mov ecx, dword [ebp - 0x64]
xor cl, dl
mov edx, dword [ebp - 0x78]
shr edx, 0x1f
neg cl
and byte [ebp - 0x60], dl
mov edx, dword [ebp - 0x60]
and cl, byte [esi - 1]
neg dl
and dl, 0x80
or cl, dl
sub dword [ebp - 0x7c], 1
mov byte [esi - 1], cl
jne 0x1008ab50
mov edi, dword [ebp - 0x6c]
mov esi, dword [ebp - 0x80]
mov eax, 0x40
sub eax, edi
add dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x70]
xor eax, dword [ebp - 0x8c]
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and ecx, eax
neg ecx
mov al, cl
mov dword [ebp - 0x78], ecx
and al, byte [ebp - 0x90]
or byte [ebp - 0xc], al
mov al, cl
and al, byte [ebp - 0x94]
or byte [ebp - 0xb], al
mov al, cl
and al, byte [ebp - 0x98]
or byte [ebp - 0xa], al
mov al, cl
and al, byte [ebp - 0x9c]
or byte [ebp - 9], al
lea eax, [ebp - 0x48]
push eax
push esi
call fcn.10053900
mov ecx, dword [ebp - 0x78]
add esp, 8
mov eax, dword [esi]
and eax, ecx
mov edx, dword [ebp - 0x68]
or dword [ebp - 0x5c], eax
mov eax, dword [esi + 4]
and eax, ecx
or dword [ebp - 0x58], eax
mov eax, ecx
and eax, dword [esi + 8]
or dword [ebp - 0x54], eax
mov eax, dword [esi + 0xc]
and eax, ecx
and ecx, dword [esi + 0x10]
or dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x70]
or dword [ebp - 0x4c], ecx
inc eax
mov dword [ebp - 0x70], eax
cmp eax, dword [ebp - 0xa0]
jb 0x1008a7f2
mov edi, dword [ebp - 0x74]
lea edx, [ebp - 0x5c]
mov ecx, 5
sub edx, edi
mov eax, dword [edx + edi]
lea edi, [edi + 4]
bswap eax
mov dword [edi - 4], eax
sub ecx, 1
jne 0x1008ac57
lea eax, [ecx + 1]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100a69cd
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.100a69cd
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret