Function at 0x4c7bb0
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.004b5f10
mov dword [ebp - 0x10], eax
test eax, eax
js 0x4c7e2b
cmp edi, eax
je 0x4c7beb
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 0x4c7c04
mov byte [ebx], 0
inc ebx
dec ecx
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 8], ecx
cmp esi, 0xffffffff
jne 0x4c7c23
mov esi, eax
cmp edx, 0x400
jne 0x4c7c34
cmp eax, 0x40
jne 0x4c7c34
lea esi, [eax - 2]
jmp 0x4c7c34
cmp esi, eax
jg 0x4c7e26
cmp esi, 0xffffffff
jl 0x4c7e26
mov edx, ecx
sub edx, eax
lea eax, [esi + 2]
cmp edx, eax
jl 0x4c7e26
lea eax, [edx - 1]
mov dword [ebp - 0xc], eax
lea eax, [edi + 8]
add eax, esi
cmp ecx, eax
jae 0x4c7c70
mov ecx, eax
call fcn.00472af0
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4c7c6c
mov eax, 0xffffff83
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, eax
jmp 0x4c7c72
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.0041d1d0
add edi, dword [ebp - 4]
add esp, 0xc
test esi, esi
jle 0x4c7cc1
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x60]
push esi
call fcn.004cfdb0
mov ecx, eax
add esp, 4
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x4c7df3
push esi
lea eax, [ebp - 0x60]
push eax
push edi
call fcn.0041d1d0
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.004b5ca0
mov ecx, eax
add esp, 0xc
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x4c7df3
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.004c8020
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c7df3
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x4c7d22
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 0x4c7df3
cmp esi, 0x40
jb 0x4c7ddb
lea ecx, [edi - 1]
lea eax, [ebp + esi - 0x61]
add ecx, esi
cmp edi, eax
ja 0x4c7d58
lea eax, [ebp - 0x60]
cmp ecx, eax
jae 0x4c7ddb
mov eax, esi
and eax, 0x8000003f
jns 0x4c7d66
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 0x4c7d83
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x20], edx
cmp edx, esi
jge 0x4c7df3
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 0x4c7de5
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c7e1c
mov ecx, dword [0x420ede8]
push eax
test ecx, ecx
je 0x4c7e14
call ecx
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0042a55b
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