Function at 0x4f7fe6
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebx
mov ebx, esp
push ecx
push ecx
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x1c], eax
xor eax, eax
push esi
mov esi, dword [ebx + 0x14]
inc eax
xor ecx, ecx
push edi
mov dword [ebp - 8], eax
cmp dword [0x529500], ecx
je 0x4f8076
movd mm0, eax
or eax, 0xffffffff
movd mm3, eax
movq mm1, mm0
cmp esi, ecx
je 0x4f806c
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0xc]
sub ecx, eax
sub edx, eax
mov edi, dword [ecx + eax]
movd mm2, edi
mov edi, dword [eax]
movq mm4, mm3
pxor mm2, mm4
movd mm4, edi
mov edi, dword [edx + eax]
paddq mm0, mm4
movq mm4, mm2
paddq mm0, mm4
psrlq mm0, 0x20
movd mm4, edi
paddq mm1, mm4
add eax, 4
dec esi
paddq mm1, mm2
psrlq mm1, 0x20
jne 0x4f8038
por mm0, mm1
movd eax, mm0
emms
jmp 0x4f80e6
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], ecx
cmp esi, ecx
je 0x4f80de
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0xc]
sub ecx, eax
sub edx, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], esi
jmp 0x4f809b
mov ecx, dword [ebp - 0x14]
mov edx, dword [eax]
mov ecx, dword [ecx + eax]
mov esi, edx
sub esi, ecx
sub esi, dword [ebp - 4]
mov edi, edx
xor esi, edx
xor edi, ecx
or esi, edi
xor esi, edx
mov edx, dword [ebp - 0x18]
mov edx, dword [edx + eax]
shr esi, 0x1f
mov dword [ebp - 4], esi
mov esi, edx
sub esi, ecx
sub esi, dword [ebp - 0x10]
mov edi, edx
xor esi, edx
xor edi, ecx
or esi, edi
xor esi, edx
shr esi, 0x1f
mov ecx, esi
add eax, 4
dec dword [ebp - 0xc]
mov dword [ebp - 0x10], ecx
jne 0x4f8098
and ecx, dword [ebp - 4]
xor eax, eax
inc eax
sub eax, ecx
test eax, eax
je 0x4f8102
push dword [ebp - 0x1c]
and dword [ebp - 8], 0
push 0
push 7
call fcn.004f4ab4
dec ebx
add byte [eax], al
jo 0x4f8152
jo 0x4f810f
mov al, byte [0x5ff8458b]
mov eax, dword [ebp - 8]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x18
add byte [ebx - 0x1374aa01], cl
push ecx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 4], 1
cmp esi, edi
jb 0x4f8173
mov eax, esi
or eax, edi
test eax, eax
js 0x4f8173
push ebx
mov ebx, dword [ebp + 0x18]
push edi
push ebx
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.004fdc7b
mov ecx, edi
shl ecx, 2
sub esi, edi
push esi
lea edx, [ecx + ebx]
push edx
push eax
mov eax, dword [ebp + 8]
add ecx, eax
push ecx
call fcn.004fdc7b
mov ecx, dword [ebp + 0x1c]
pop ebx
test ecx, ecx
je 0x4f8166
mov dword [ecx], eax
jmp 0x4f818b
test eax, eax
je 0x4f818b
push dword [ebp + 0x20]
push 0
push 0xd
jmp 0x4f817a
push dword [ebp + 0x20]
push 0
push 6
and dword [ebp - 4], 0
call fcn.004f4ab4
dec ebx
add byte [eax], al
loopne 0x4f81db
jo 0x4f8198
nop
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 0x1c
in al, dx
push ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
and dword [ebp - 4], 0
push esi
mov esi, eax
cmp eax, ecx
ja 0x4f81ad
mov esi, ecx
cmp dword [ebp + 0x1c], esi
jb 0x4f81e0
push dword [ebp + 0x24]
lea edx, [ebp - 4]
push edx
push dword [ebp + 0x18]
cmp eax, ecx
jae 0x4f81f8
push eax
push dword [ebp + 8]
push ecx
push dword [ebp + 0x10]
call fcn.004fdc7b
test eax, eax
je 0x4f81f4
mov ecx, dword [ebp - 4]
xor eax, eax
inc eax
test ecx, ecx
je 0x4f8209
cmp esi, dword [ebp + 0x1c]
jne 0x4f8202
push dword [ebp + 0x24]
push 0
push 1
call fcn.004f4ab4
dec ebx
add byte [eax], al
xor byte [ebx + 0x70], dl
push cs
xor byte [ebx], 0xc0
xor eax, eax
jmp 0x4f820e
push ecx
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
jmp 0x4f81c8
mov edx, dword [ebp + 0x18]
mov dword [edx + esi*4], ecx
inc esi
mov ecx, dword [ebp + 0x20]
mov dword [ecx], esi
pop esi
leave
ret 0x20