Function at 0x4c7930
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], 0
call fcn.004b5ca0
mov dword [ebp - 0x10], eax
test eax, eax
js 0x4c7bab
cmp edi, eax
je 0x4c796b
mov eax, 0xffffff53
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x20]
mov ebx, dword [ebp + 8]
lea ecx, [edx - 1]
and ecx, 7
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp + 0xc]
jne 0x4c7984
mov byte [ebx], 0
inc ebx
dec ecx
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 8], ecx
cmp esi, 0xffffffff
jne 0x4c79a3
mov esi, eax
cmp edx, 0x400
jne 0x4c79b4
cmp eax, 0x40
jne 0x4c79b4
lea esi, [eax - 2]
jmp 0x4c79b4
cmp esi, eax
jg 0x4c7ba6
cmp esi, 0xffffffff
jl 0x4c7ba6
mov edx, ecx
sub edx, eax
lea eax, [esi + 2]
cmp edx, eax
jl 0x4c7ba6
lea eax, [edx - 1]
mov dword [ebp - 0xc], eax
lea eax, [edi + 8]
add eax, esi
cmp ecx, eax
jae 0x4c79f0
mov ecx, eax
call fcn.00472840
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4c79ec
mov eax, 0xffffff83
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, eax
jmp 0x4c79f2
mov edi, ebx
push dword [ebp - 4]
xorps xmm0, xmm0
mov dword [ebp - 0x1c], edi
push dword [ebp - 0x18]
movq qword [edi], xmm0
add edi, 8
push edi
call fcn.0041d170
add edi, dword [ebp - 4]
add esp, 0xc
test esi, esi
jle 0x4c7a41
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x60]
push esi
call fcn.004cfb40
mov ecx, eax
add esp, 4
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x4c7b73
push esi
lea eax, [ebp - 0x60]
push eax
push edi
call fcn.0041d170
add esp, 0xc
add edi, esi
mov eax, dword [ebp - 0xc]
push dword [ebp - 0x10]
sub edi, dword [ebp - 0x1c]
add eax, ebx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x14]
push eax
push edi
call fcn.004b5a30
mov ecx, eax
add esp, 0xc
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x4c7b73
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push ecx
mov ecx, dword [ebp + 0x18]
push edi
push ebx
push dword [ebp - 0x10]
lea edx, [edi + ebx]
mov byte [ebx + eax - 1], 0xbc
call fcn.004c7da0
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c7b73
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x4c7aa2
mov al, 1
shl al, cl
dec al
and byte [ebx], al
sub edi, esi
xor edx, edx
add edi, ebx
mov dword [ebp - 0x18], edi
xor byte [edi - 1], 1
test esi, esi
jle 0x4c7b73
cmp esi, 0x40
jb 0x4c7b5b
lea ecx, [edi - 1]
lea eax, [ebp + esi - 0x61]
add ecx, esi
cmp edi, eax
ja 0x4c7ad8
lea eax, [ebp - 0x60]
cmp ecx, eax
jae 0x4c7b5b
mov eax, esi
and eax, 0x8000003f
jns 0x4c7ae6
dec eax
or eax, 0xffffffc0
inc eax
mov ecx, esi
lea ebx, [ebp - 0x60]
sub ecx, eax
sub ebx, edi
mov dword [ebp - 0x20], ecx
lea eax, [edi + 0x20]
lea ecx, [ebp - 0x50]
sub ecx, edi
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x1c]
movups xmm0, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
movups xmm1, xmmword [ebp + edx - 0x60]
pxor xmm1, xmm0
movups xmmword [eax - 0x60], xmm1
movups xmm0, xmmword [eax - 0x50]
movups xmm1, xmmword [ebp + edx - 0x50]
add edx, 0x40
pxor xmm1, xmm0
movups xmmword [eax - 0x50], xmm1
movups xmm0, xmmword [eax - 0x40]
movups xmm1, xmmword [ebx + eax - 0x40]
pxor xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movups xmm0, xmmword [eax - 0x30]
movups xmm1, xmmword [edi + eax - 0x40]
pxor xmm1, xmm0
movups xmmword [eax - 0x30], xmm1
cmp edx, ecx
jl 0x4c7b03
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x20], edx
cmp edx, esi
jge 0x4c7b73
lea ebx, [ebp - 0x60]
sub ebx, edi
lea ecx, [edx + edi]
sub esi, edx
mov al, byte [ecx + ebx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub esi, 1
jne 0x4c7b65
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c7b9c
mov ecx, dword [0x55587c]
push eax
test ecx, ecx
je 0x4c7b94
call ecx
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0042a4fb
add esp, 4
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff06
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret