Function at 0x1002c680
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, 0x28
push esi
mov esi, ecx
mov dword [ebp - 8], edx
push edi
mov edi, dword [ebx + 0xc]
mov ecx, 0x100843da
mov dword [ebp - 0xc], esi
call fcn.10048ed5
test esi, esi
je 0x1002ca9a
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x1002ca9a
mov esi, dword [ebx + 8]
test esi, esi
je 0x1002ca9a
test edi, edi
jle 0x1002ca9a
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x1002ca9a
cmp dword [ebx + 0x14], 0
je 0x1002ca9a
cmp dword [eax], 0
jne 0x1002ca9a
mov eax, dword [ecx + 0x2c]
test eax, eax
jne 0x1002c7e8
mov eax, dword [ebp - 0xc]
push edi
mov eax, dword [eax + 8]
call eax
mov edx, eax
add esp, 4
mov dword [ebp - 8], edx
test edx, edx
je 0x1002ca6d
xor ecx, ecx
mov dword [ebp - 0xc], ecx
cmp edi, 0x40
jb 0x1002c7a9
lea eax, [esi - 1]
mov dword [ebp - 0xc], ecx
add eax, edi
cmp edx, eax
ja 0x1002c73b
lea eax, [edi - 1]
add eax, edx
cmp eax, esi
jae 0x1002c7a9
mov eax, edi
and eax, 0x8000003f
jns 0x1002c749
dec eax
or eax, 0xffffffc0
inc eax
movups xmm1, xmmword [0x100635f0]
mov dword [ebp - 0xc], edi
mov edi, esi
sub dword [ebp - 0xc], eax
sub edi, edx
mov dword [ebp - 0x10], edi
mov eax, edx
mov edi, dword [ebx + 0xc]
mov edx, dword [ebp - 0x10]
movups xmm0, xmmword [edx + eax]
lea eax, [eax + 0x40]
pandn xmm0, xmm1
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [esi + ecx + 0x10]
pandn xmm0, xmm1
movups xmmword [eax - 0x30], xmm0
movups xmm0, xmmword [esi + ecx + 0x20]
pandn xmm0, xmm1
movups xmmword [eax - 0x20], xmm0
movups xmm0, xmmword [esi + ecx + 0x30]
add ecx, 0x40
pandn xmm0, xmm1
movups xmmword [eax - 0x10], xmm0
cmp ecx, dword [ebp - 0xc]
jl 0x1002c765
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
cmp ecx, edi
jge 0x1002ca58
add ecx, edx
mov dword [ebp - 0x10], edi
sub esi, edx
sub edi, dword [ebp - 0xc]
nop dword [eax + eax]
mov al, byte [ecx + esi]
lea ecx, [ecx + 1]
not al
mov byte [ecx - 1], al
sub edi, 1
jne 0x1002c7c0
mov esi, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0xc]
mov dword [esi], edx
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
cmp eax, 1
jne 0x1002c8f8
mov al, byte [ecx + 0x30]
mov byte [ebp - 1], al
movsx eax, al
push edi
movd xmm0, eax
mov eax, dword [ebp - 0xc]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm0, xmm0, 0
mov eax, dword [eax + 8]
movaps xmmword [ebp - 0x20], xmm0
call eax
mov edx, eax
add esp, 4
mov dword [ebp - 8], edx
test edx, edx
je 0x1002ca6d
xor ecx, ecx
mov dword [ebp - 0xc], ecx
cmp edi, 0x40
jb 0x1002c8b5
lea eax, [esi - 1]
mov dword [ebp - 0xc], ecx
add eax, edi
cmp edx, eax
ja 0x1002c84b
lea eax, [edi - 1]
add eax, edx
cmp eax, esi
jae 0x1002c8b5
mov eax, edi
and eax, 0x8000003f
jns 0x1002c859
dec eax
or eax, 0xffffffc0
inc eax
movaps xmm1, xmmword [ebp - 0x20]
mov dword [ebp - 0xc], edi
mov edi, esi
sub dword [ebp - 0xc], eax
sub edi, edx
mov dword [ebp - 0x10], edi
mov eax, edx
mov edi, dword [ebx + 0xc]
mov edx, dword [ebp - 0x10]
movups xmm0, xmmword [edx + eax]
pxor xmm0, xmm1
movups xmmword [eax], xmm0
movups xmm0, xmmword [esi + ecx + 0x10]
pxor xmm0, xmm1
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [esi + ecx + 0x20]
pxor xmm0, xmm1
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [esi + ecx + 0x30]
add ecx, 0x40
pxor xmm0, xmm1
movups xmmword [eax + 0x30], xmm0
add eax, 0x40
cmp ecx, dword [ebp - 0xc]
jl 0x1002c872
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
cmp ecx, edi
jge 0x1002ca58
mov ah, byte [ebp - 1]
add ecx, edx
sub esi, edx
mov dword [ebp - 0x10], edi
sub edi, dword [ebp - 0xc]
nop word [eax + eax]
mov al, byte [ecx + esi]
lea ecx, [ecx + 1]
xor al, ah
mov byte [ecx - 1], al
sub edi, 1
jne 0x1002c8d0
mov esi, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0xc]
mov dword [esi], edx
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
cmp eax, 2
jne 0x1002ca16
mov al, byte [ecx + 0x30]
mov byte [ebp - 1], al
movsx eax, al
push edi
movd xmm0, eax
mov eax, dword [ebp - 0xc]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm0, xmm0, 0
mov eax, dword [eax + 8]
movups xmmword [ebp - 0x20], xmm0
call eax
mov edx, eax
add esp, 4
mov dword [ebp - 8], edx
test edx, edx
je 0x1002ca6d
xor ecx, ecx
cmp edi, 0x10
jb 0x1002c9ca
lea eax, [esi - 1]
add eax, edi
cmp edx, eax
ja 0x1002c955
lea eax, [edi - 1]
add eax, edx
cmp eax, esi
jae 0x1002c9ca
mov eax, edi
and eax, 0x8000000f
jns 0x1002c963
dec eax
or eax, 0xfffffff0
inc eax
movups xmm5, xmmword [0x100635f0]
mov dword [ebp - 0xc], edi
mov edi, esi
sub dword [ebp - 0xc], eax
xorps xmm4, xmm4
movups xmm6, xmmword [ebp - 0x20]
sub edi, edx
mov eax, edx
mov dword [ebp - 0x10], edi
mov edi, dword [ebx + 0xc]
mov edx, dword [ebp - 0x10]
movups xmm3, xmmword [edx + eax]
add ecx, 0x10
lea eax, [eax + 0x10]
movaps xmm2, xmm4
pcmpeqb xmm2, xmm3
pxor xmm3, xmm6
pandn xmm2, xmm5
pand xmm3, xmm2
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x10]
pandn xmm1, xmm0
por xmm3, xmm1
pand xmm3, xmm2
pandn xmm2, xmm4
por xmm3, xmm2
movups xmmword [eax - 0x10], xmm3
cmp ecx, dword [ebp - 0xc]
jl 0x1002c986
mov edx, dword [ebp - 8]
cmp ecx, edi
jge 0x1002ca58
lea eax, [ecx + edx]
sub esi, edx
mov edx, edi
mov dword [ebp - 0x10], eax
mov edi, eax
sub edx, ecx
mov ah, byte [ebp - 1]
mov cl, byte [edi + esi]
lea edi, [edi + 1]
mov al, ah
xor al, cl
neg cl
sbb cl, cl
and cl, al
mov byte [edi - 1], cl
sub edx, 1
jne 0x1002c9e3
mov esi, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
mov edx, dword [ebp - 8]
mov edi, dword [ebx + 0xc]
mov dword [esi], edx
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
cmp eax, 3
jne 0x1002ca6d
mov al, byte [ecx + 0x30]
mov byte [ebp - 1], al
mov eax, dword [ebp - 0xc]
push edi
mov eax, dword [eax + 8]
call eax
mov edx, eax
add esp, 4
test edx, edx
je 0x1002ca6d
xor ecx, ecx
test edi, edi
jle 0x1002ca58
nop dword [eax]
mov al, byte [ecx + esi]
test al, al
je 0x1002ca50
mov ah, byte [ebp - 1]
cmp al, ah
je 0x1002ca50
xor al, ah
mov byte [edx + ecx], al
inc ecx
cmp ecx, edi
jl 0x1002ca40
mov esi, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
mov dword [esi], edx
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov esi, dword [ebx + 0x10]
mov eax, dword [ebp - 0xc]
push dword [esi]
mov eax, dword [eax + 0xc]
call eax
mov eax, dword [ebx + 0x14]
add esp, 4
mov dword [esi], 0
mov dword [eax], 0
mov eax, 0xfffffffd
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret