Function at 0x10002640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
mov dword [0x10053758], ecx
push ebx
push esi
push edi
test dl, dl
je 0x10002915
mov ebx, dword [0x10052c78]
test ecx, ecx
jne 0x100027bc
mov ecx, 0x1b
lea edi, [esp + 0x10]
mov esi, str.lXXeHLX_5xc
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor esi, esi
cmp ebx, 2
jl 0x10002787
movaps xmm4, xmmword [0x1004be40]
movaps xmm3, xmmword [0x1004be70]
movaps xmm5, xmmword [str.1111]
movaps xmm6, xmmword [0x1004be60]
movd xmm0, esi
lea eax, [esi + 4]
pshufd xmm2, xmm0, 0
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
punpckldq xmm1, xmm2
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [esp + esi*2 + 0x10]
xorps xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movq qword [esp + esi*2 + 0x10], xmm1
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [esp + esi*2 + 0x18]
xorps xmm1, xmm0
movq qword [esp + esi*2 + 0x18], xmm1
add esi, 8
cmp esi, 0x30
jl 0x100026a1
cmp esi, 0x37
jge 0x100027ad
mov eax, 0x5397829d
mov ecx, esi
imul esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x31
sub ecx, eax
add ecx, 0x38
xor word [esp + esi*2 + 0x10], cx
inc esi
cmp esi, 0x37
jl 0x10002787
lea ecx, [esp + 0x10]
call fcn.10001af0
mov ecx, dword [0x10053758]
cmp ecx, 1
jne 0x10002915
mov ecx, 0x1b
lea edi, [esp + 0x10]
mov esi, 0x1004bc10
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
movsw word es:[edi], word [esi]
cmp ebx, 2
jl 0x100028e6
movaps xmm4, xmmword [0x1004be40]
movaps xmm3, xmmword [0x1004be70]
movaps xmm5, xmmword [str.1111]
movaps xmm6, xmmword [0x1004be60]
nop
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm2, xmm0, 0
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
punpckldq xmm1, xmm2
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [esp + ecx*2 + 0x10]
xorps xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movq qword [esp + ecx*2 + 0x10], xmm1
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [esp + ecx*2 + 0x18]
xorps xmm1, xmm0
movq qword [esp + ecx*2 + 0x18], xmm1
add ecx, 8
cmp ecx, 0x30
jl 0x10002800
cmp ecx, 0x37
jge 0x1000290c
mov eax, 0x5397829d
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, ecx
imul eax, eax, 0x31
sub edx, eax
add edx, 0x38
xor word [esp + ecx*2 + 0x10], dx
inc ecx
cmp ecx, 0x37
jl 0x100028e6
lea ecx, [esp + 0x10]
call fcn.10001af0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret