Function at 0x10162ae0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x102e5cc0]
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 0x10162e68
mov ebx, dword [eax + 0x120]
test ebx, ebx
je 0x10162e68
push ebx
call fcn.1015eb80
add esp, 4
test eax, eax
je 0x10162e68
cmp dword [ebx + 0xa0], 0
je 0x10162e68
cmp dword [ebx + 0x14f10], 0
jle 0x10162e68
mov eax, dword [ebx + 0x14f24]
cmp dword [ebp + 0x10], eax
jb 0x10162e6a
test edi, edi
je 0x10162e68
push esi
push eax
push 0
push edi
call fcn.1010f560
push edi
push ebx
call fcn.10162e80
push 0x64
lea eax, [ebp - 0x68]
push 0
push eax
call fcn.1010f560
add esp, 0x20
cmp dword [ebx + 0x9c], 0
je 0x10162cb1
cmp dword [0x103211f4], 2
mov ecx, 1
jl 0x10162c80
movaps xmm3, xmmword [0x1027e220]
lea eax, [ecx + 4]
movaps xmm4, xmmword [0x102a2840]
movaps xmm2, xmmword [0x102a2850]
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 [0x101ffd70]
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 [0x101ffd70]
packuswb xmm0, xmm0
movd dword [ebp + eax - 0x68], xmm0
add eax, 8
cmp eax, 0x65
jl 0x10162bb0
cmp ecx, 0x64
jge 0x10162d60
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 0x10162c86
jmp 0x10162d60
mov eax, dword [ebx + 0x14f10]
test eax, eax
jle 0x10162d60
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 [0x102a224c]
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x78], xmm0
fld qword [ebp - 0x78]
fstp qword [esp]
call fcn.101166f0
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 [0x101ffd50]
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 0x10162cd3
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.101622e0
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.101622e0
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 0x10162e19
push esi
push ebx
call fcn.101645b0
add esp, 8
xor ecx, ecx
xor edx, edx
test edi, edi
je 0x10162e3e
movzx eax, byte [esi + edx]
inc edx
xor eax, ecx
shr cx, 8
movzx eax, al
xor cx, word [eax*4 + 0x102a2400]
movzx ecx, cx
cmp edx, edi
jb 0x10162e21
push ecx
lea eax, [esi + edi]
push eax
push dword [ebp - 0x74]
push dword [ebp - 0x7c]
call fcn.101626d0
mov eax, dword [ebx + 0x14f24]
add esp, 0x10
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1010d06f
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.1010d06f
mov esp, ebp
pop ebp
ret