Function at 0x10173350
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x102f0d80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x7c], eax
push ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x6c], edi
test eax, eax
je 0x101736d8
mov ebx, dword [eax + 0x120]
test ebx, ebx
je 0x101736d8
push ebx
call fcn.1016f3e0
add esp, 4
test eax, eax
je 0x101736d8
cmp dword [ebx + 0xa0], 0
je 0x101736d8
cmp dword [ebx + 0x14f10], 0
jle 0x101736d8
mov eax, dword [ebx + 0x14f24]
cmp dword [ebp + 0x10], eax
jb 0x101736da
test edi, edi
je 0x101736d8
push esi
push eax
push 0
push edi
call fcn.1011e7c0
push edi
push ebx
call fcn.101736f0
push 0x64
lea eax, [ebp - 0x68]
push 0
push eax
call fcn.1011e7c0
add esp, 0x20
cmp dword [ebx + 0x9c], 0
je 0x10173521
cmp dword [0x1032d5f4], 2
mov ecx, 1
jl 0x101734f0
movaps xmm3, xmmword [0x10212750]
lea eax, [ecx + 4]
movaps xmm4, xmmword [0x1020f8b0]
movaps xmm2, xmmword [0x102b00b0]
nop
movd xmm0, ecx
add ecx, 8
pshufd xmm0, xmm0, 0
paddd xmm0, xmm3
pmulld xmm0, xmm4
movaps xmm1, xmm0
punpckldq xmm1, xmm0
punpckhdq xmm0, xmm0
pmuldq xmm0, xmm2
pmuldq xmm1, xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, 5
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x102095c0]
packuswb xmm0, xmm0
movd dword [ebp + eax - 0x6c], xmm0
movd xmm0, eax
pshufd xmm0, xmm0, 0
paddd xmm0, xmm3
pmulld xmm0, xmm4
movaps xmm1, xmm0
punpckldq xmm1, xmm0
punpckhdq xmm0, xmm0
pmuldq xmm0, xmm2
pmuldq xmm1, xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, 5
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x102095c0]
packuswb xmm0, xmm0
movd dword [ebp + eax - 0x68], xmm0
add eax, 8
cmp eax, 0x65
jl 0x10173420
cmp ecx, 0x64
jge 0x101735d0
imul esi, ecx, 0xff
mov eax, 0x51eb851f
lea ecx, [ecx + 1]
imul esi
add esi, 0xff
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [ebp + ecx - 0x69], al
cmp esi, 0x639c
jl 0x101734f6
jmp 0x101735d0
mov eax, dword [ebx + 0x14f10]
test eax, eax
jle 0x101735d0
movd xmm1, eax
lea edi, [eax - 1]
cvtdq2ps xmm1, xmm1
mov esi, 1
movss dword [ebp - 0x70], xmm1
movd xmm0, esi
sub esp, 8
cvtdq2ps xmm0, xmm0
divss xmm0, dword [0x102de63c]
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x78], xmm0
fld qword [ebp - 0x78]
fstp qword [esp]
call fcn.10130060
fstp qword [ebp - 0x78]
cvttsd2si eax, qword [ebp - 0x78]
add esp, 8
mov ecx, edi
cmp eax, edi
cmovle ecx, eax
mov eax, dword [ebx + 0x14f18]
movd xmm0, dword [eax + ecx*4]
mov ecx, 0xff
cvtdq2ps xmm0, xmm0
cvtps2pd xmm1, xmm0
movd xmm0, dword [ebx + 0x14f04]
mulsd xmm1, qword [0x102095a0]
cvtdq2ps xmm0, xmm0
cvtps2pd xmm0, xmm0
divsd xmm1, xmm0
cvttsd2si eax, xmm1
movss xmm1, dword [ebp - 0x70]
cmp eax, 0xff
cmovg eax, ecx
mov byte [ebp + esi - 0x68], al
inc esi
cmp esi, 0x64
jl 0x10173543
mov edi, dword [ebp - 0x6c]
mov eax, dword [ebx + 0x1c]
mov esi, 0x58
cmp dword [ebx + 0xa4], 0
mov ecx, dword [ebx + 0x6c]
lea edx, [eax - 2]
cmove edx, eax
test ecx, ecx
mov eax, 0x49
cmovne eax, esi
mov esi, 0x69
mov byte [edi + edx], al
mov eax, 0x6e
cmovne eax, esi
lea esi, [edx + 8]
mov byte [edi + edx + 1], al
setne al
lea eax, [eax*8 + 0x66]
mov byte [edx + edi + 2], al
sete al
lea eax, [eax*8 + 0x67]
mov byte [edx + edi + 3], al
lea eax, [edi + esi]
mov dword [edx + edi + 4], 0xf000000
push dword [ebx + 0x14f1c]
push eax
call fcn.10172b40
mov eax, dword [ebx + 0x14f20]
add esi, 4
add eax, dword [ebx + 0x14f24]
push eax
mov dword [ebp - 0x74], eax
lea eax, [edi + esi]
push eax
call fcn.10172b40
add esi, 4
mov ecx, 0x19
add edi, esi
mov dword [ebp - 0x70], esi
lea esi, [ebp - 0x68]
add esp, 0x10
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x70]
mov esi, dword [ebp - 0x6c]
add edi, 0x64
cmp dword [ebx + 0xa4], 0
je 0x10173689
push esi
push ebx
call fcn.10174e20
add esp, 8
xor ecx, ecx
xor edx, edx
test edi, edi
je 0x101736ae
movzx eax, byte [esi + edx]
inc edx
xor eax, ecx
shr cx, 8
movzx eax, al
xor cx, word [eax*4 + 0x102afc80]
movzx ecx, cx
cmp edx, edi
jb 0x10173691
push ecx
lea eax, [esi + edi]
push eax
push dword [ebp - 0x74]
push dword [ebp - 0x7c]
call fcn.10172f40
mov eax, dword [ebx + 0x14f24]
add esp, 0x10
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1011bad5
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.1011bad5
mov esp, ebp
pop ebp
ret