Function at 0x1004c2be
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x390
mov eax, dword [0x101db764]
mov edx, dword [ebp + 8]
mov ecx, 0x1004c883
mov ebx, dword [ebp + 0x10]
xor eax, ebp
cmp dword [ebp + 0x14], 0
mov dword [esp + 0x388], eax
mov eax, 0x1004c771
cmovne ecx, eax
xor eax, eax
mov dword [edx + 0x114], ecx
cmp dword [0x1029ef9c], eax
jne 0x1004c3e5
xor edx, edx
mov ecx, 0xff
inc edx
lea esi, [edx + edx]
mov byte [esp + eax + 0x167], dl
mov byte [esp + eax + 0x68], dl
mov byte [esp + edx + 0x268], al
xor esi, edx
mov edx, esi
xor edx, 0x11b
cmp esi, ecx
cmovle edx, esi
inc eax
cmp eax, ecx
jne 0x1004c30e
xor eax, eax
test eax, eax
mov ecx, 0
je 0x1004c355
movzx ecx, byte [esp + eax + 0x268]
xor ecx, 0xff
movzx ecx, byte [esp + ecx + 0x68]
lea esi, [ecx*4]
lea edi, [ecx*8]
lea edx, [ecx + ecx]
xor edi, esi
mov esi, ecx
shl esi, 4
xor esi, edi
xor esi, edx
mov edx, esi
shr edx, 8
xor edx, ecx
xor edx, esi
movzx ecx, dl
xor ecx, 0x63
mov byte [ecx + 0x1029efa0], al
mov byte [eax + 0x1029f0a0], cl
inc eax
cmp eax, 0x100
jne 0x1004c339
movaps xmm0, xmmword [0x101a4150]
lea edx, [esp + 0x40]
lea esi, [esp + 0x68]
lea edi, [esp + 0x268]
mov ecx, 0x1029f1a0
movaps xmmword [edx], xmm0
push 0x1029efa0
push esi
push edi
call fcn.1004c9ff
add esp, 0xc
movdqa xmm0, xmmword [0x101a4160]
lea edx, [esp + 0x30]
mov ecx, 0x1029dfa0
movdqa xmmword [edx], xmm0
push 0x1029f0a0
push esi
push edi
call fcn.1004c9ff
add esp, 0xc
cmp ebx, 0x80
je 0x1004c406
cmp ebx, 0x100
je 0x1004c406
mov edi, 0xffffffea
cmp ebx, 0xc0
jne 0x1004c759
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
sar ebx, 5
lea ecx, [ebx + 6]
lea edi, [ebx*4]
mov dword [esp + 0x10], ecx
mov dword [eax + 0x110], ecx
lea eax, [esp + 0x368]
push edi
push esi
push eax
call fcn.101613e0
add esp, 0xc
push edi
push esi
mov esi, ebx
push dword [ebp + 8]
call fcn.101613e0
add esp, 0xc
lea eax, [ebx + 7]
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], eax
shl eax, 4
cmp edi, eax
mov dword [esp + 0x20], eax
jge 0x1004c597
mov ecx, dword [ebp + 0x10]
lea eax, [esi - 1]
movdqa xmm2, xmmword [0x10191c60]
xor edx, edx
mov dword [esp + 0x2c], esi
lea ebx, [esp + eax*4 + 0x368]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], ebx
shr ecx, 6
lea edi, [esp + ecx*4 + 0x368]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x14], eax
xor eax, eax
inc eax
mov ecx, eax
and ecx, 3
movzx ecx, byte [ecx + ebx]
mov cl, byte [ecx + 0x1029f0a0]
xor byte [esp + eax + 0x367], cl
inc eax
cmp eax, 5
jne 0x1004c496
mov al, byte [edx + 0x101a4170]
inc edx
lea ecx, [esp + 0x368]
mov dword [esp + 0x24], edx
lea edx, [esp + 0x36c]
xor byte [esp + 0x368], al
xor eax, eax
xor ebx, ebx
inc ebx
cmp esi, 8
mov dword [esp + 8], eax
jne 0x1004c4ff
cmp ebx, dword [esp + 0x28]
jne 0x1004c4ff
mov esi, 0xfffffffc
movzx eax, byte [ecx + esi + 4]
mov al, byte [eax + 0x1029f0a0]
xor byte [edi + esi + 4], al
inc esi
jne 0x1004c4eb
jmp 0x1004c542
movd xmm0, dword [esp + eax*4 + 0x368]
mov esi, 0xfffffffc
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
movd xmm1, dword [edx + esi + 4]
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
pxor xmm0, xmm1
movdqa xmm1, xmm0
pand xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword [edx + esi + 4], xmm1
add esi, 4
jne 0x1004c515
mov eax, dword [esp + 8]
mov esi, dword [esp + 0x2c]
inc ebx
add edx, 4
add ecx, 4
inc eax
cmp ebx, esi
jl 0x1004c4d7
mov ebx, dword [esp + 0x14]
mov eax, dword [ebp + 8]
lea eax, [eax + ebx]
push dword [esp + 0xc]
lea ecx, [esp + 0x36c]
push ecx
push eax
call fcn.101613e0
movdqa xmm2, xmmword [0x10191c60]
add esp, 0xc
add ebx, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x14], ebx
cmp ebx, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
jl 0x1004c493
xor edi, edi
cmp dword [ebp + 0x14], 0
je 0x1004c6ff
cmp dword [ebp + 0x10], 0xffffff80
mov eax, dword [ebp + 8]
jl 0x1004c759
add eax, 0x1f
xor ecx, ecx
inc ecx
mov dword [esp + 8], ecx
movzx edi, byte [eax - 0xe]
movzx esi, byte [eax - 0xf]
movzx ebx, byte [eax - 0xd]
movzx ecx, byte [eax - 0xb]
movzx edx, byte [eax - 0xc]
movzx edi, byte [edi + 0x1029f0a0]
movzx esi, byte [esi + 0x1029f0a0]
movzx ebx, byte [ebx + 0x1029f0a0]
movzx ecx, byte [ecx + 0x1029f0a0]
movzx edx, byte [edx + 0x1029f0a0]
mov edi, dword [edi*4 + 0x1029f5a0]
xor edi, dword [esi*4 + 0x1029f1a0]
movzx esi, byte [eax - 0xa]
movzx esi, byte [esi + 0x1029f0a0]
xor edi, dword [ebx*4 + 0x1029f9a0]
movzx ebx, byte [eax - 9]
mov esi, dword [esi*4 + 0x1029f5a0]
movzx ebx, byte [ebx + 0x1029f0a0]
xor edi, dword [edx*4 + 0x1029fda0]
movzx edx, byte [eax - 8]
xor esi, dword [ecx*4 + 0x1029f1a0]
movzx ecx, byte [eax - 7]
movzx edx, byte [edx + 0x1029f0a0]
xor esi, dword [ebx*4 + 0x1029f9a0]
movzx ebx, byte [eax - 6]
movzx ecx, byte [ecx + 0x1029f0a0]
movzx ebx, byte [ebx + 0x1029f0a0]
xor esi, dword [edx*4 + 0x1029fda0]
movzx edx, byte [eax - 5]
mov ebx, dword [ebx*4 + 0x1029f5a0]
movzx edx, byte [edx + 0x1029f0a0]
xor ebx, dword [ecx*4 + 0x1029f1a0]
movzx ecx, byte [eax - 4]
xor ebx, dword [edx*4 + 0x1029f9a0]
movzx ecx, byte [ecx + 0x1029f0a0]
movzx edx, byte [eax - 3]
xor ebx, dword [ecx*4 + 0x1029fda0]
movzx ecx, byte [eax - 2]
movzx edx, byte [edx + 0x1029f0a0]
movzx ecx, byte [ecx + 0x1029f0a0]
mov ecx, dword [ecx*4 + 0x1029f5a0]
xor ecx, dword [edx*4 + 0x1029f1a0]
movzx edx, byte [eax - 1]
movzx edx, byte [edx + 0x1029f0a0]
xor ecx, dword [edx*4 + 0x1029f9a0]
movzx edx, byte [eax]
movzx edx, byte [edx + 0x1029f0a0]
xor ecx, dword [edx*4 + 0x1029fda0]
mov edx, dword [esp + 8]
mov dword [eax - 0xf], edi
mov dword [eax - 0xb], esi
mov dword [eax - 7], ebx
inc edx
mov dword [eax - 3], ecx
add eax, 0x10
cmp edx, dword [esp + 0x10]
mov dword [esp + 8], edx
jl 0x1004c5ba
xor edi, edi
jmp 0x1004c759
cmp dword [ebp + 0x10], 0xffffff60
mov edx, dword [esp + 0x10]
jl 0x1004c759
mov esi, dword [esp + 0x18]
mov ecx, dword [ebp + 8]
shl edx, 4
xor edi, edi
xor eax, eax
sar esi, 1
add edx, ecx
movsd xmm0, qword [edx]
movq xmm1, qword [edx + 8]
inc eax
movq qword [esp + 0x60], xmm1
movsd qword [esp + 0x58], xmm0
movaps xmm0, xmmword [ecx]
movaps xmmword [edx], xmm0
add edx, 0xfffffff0
movsd xmm0, qword [esp + 0x60]
movsd qword [ecx + 8], xmm0
movq xmm0, qword [esp + 0x58]
movq qword [ecx], xmm0
add ecx, 0x10
cmp eax, esi
jl 0x1004c71e
mov ecx, dword [esp + 0x388]
xor ecx, ebp
call fcn.1015e65c
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret