Function at 0x4f663c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
cmp dword [ecx], 0
push ebx
push edi
mov edi, edx
mov dword [ebp - 0x2c], ecx
je 0x4f6656
push 0xfffffffffffffffb
pop eax
jmp 0x4f699a
push esi
mov esi, dword [ecx + 4]
cmp esi, 2
je 0x4f666d
cmp dword [ecx + 8], 0
jne 0x4f666d
push 0xfffffffffffffffa
pop eax
jmp 0x4f6999
test edi, edi
je 0x4f6997
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4f6997
cdq
and edx, 0x7f
lea ebx, [edx + eax]
sar ebx, 7
mov dword [ebp - 0x40], ebx
sub esi, 0
je 0x4f696d
dec esi
je 0x4f68c4
dec esi
je 0x4f66a8
or eax, 0xffffffff
jmp 0x4f6999
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], ebx
test ebx, ebx
jle 0x4f6990
mov al, byte [ebp - 0x11]
mov byte [ebp - 5], al
mov al, byte [ebp - 0x12]
mov byte [ebp - 3], al
mov al, byte [ebp - 0x13]
mov byte [ebp - 1], al
mov al, byte [ebp - 0x14]
mov byte [ebp - 7], al
mov al, byte [ebp - 0x15]
mov byte [ebp - 8], al
mov al, byte [ebp - 0x16]
mov byte [ebp - 0xf], al
mov al, byte [ebp - 0x17]
mov byte [ebp - 0xb], al
mov al, byte [ebp - 0x18]
mov byte [ebp - 0xd], al
mov al, byte [ebp - 0x19]
mov byte [ebp - 0xa], al
mov al, byte [ebp - 0x1a]
mov byte [ebp - 9], al
mov al, byte [ebp - 0x1b]
mov byte [ebp - 0x10], al
mov al, byte [ebp - 0x1c]
mov byte [ebp - 6], al
mov al, byte [ebp - 0x1d]
mov byte [ebp - 0xe], al
mov al, byte [ebp - 0x1e]
mov byte [ebp - 4], al
mov al, byte [ebp - 0x1f]
mov byte [ebp - 0xc], al
mov al, byte [ebp - 0x20]
mov byte [ebp - 2], al
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x3c]
push eax
mov edx, eax
call fcn.004f6c3b
mov dl, byte [ebp - 0xc]
mov al, dl
add dl, dl
shr al, 7
pop ecx
mov cl, byte [ebp - 2]
add cl, cl
or cl, al
mov byte [ebp - 2], cl
mov byte [ebp - 0x20], cl
mov cl, byte [ebp - 4]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 0xc], dl
mov byte [ebp - 0x1f], dl
mov dl, byte [ebp - 0xe]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 4], cl
mov byte [ebp - 0x1e], cl
mov cl, byte [ebp - 6]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 0xe], dl
mov byte [ebp - 0x1d], dl
mov dl, byte [ebp - 0x10]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 6], cl
mov byte [ebp - 0x1c], cl
mov cl, byte [ebp - 9]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 0x10], dl
mov byte [ebp - 0x1b], dl
mov dl, byte [ebp - 0xa]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 9], cl
mov byte [ebp - 0x1a], cl
mov cl, byte [ebp - 0xd]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 0xa], dl
mov byte [ebp - 0x19], dl
mov dl, byte [ebp - 0xb]
mov al, dl
shr al, 7
or cl, al
mov byte [ebp - 0xd], cl
mov byte [ebp - 0x18], cl
mov cl, byte [ebp - 0xf]
mov al, cl
shr al, 7
add dl, dl
or dl, al
mov ch, byte [ebp - 5]
mov byte [ebp - 0xb], dl
add cl, cl
mov byte [ebp - 0x17], dl
and bl, 7
mov dl, byte [ebp - 8]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 0xf], cl
mov byte [ebp - 0x16], cl
mov cl, byte [ebp - 7]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 8], dl
mov byte [ebp - 0x15], dl
mov dl, byte [ebp - 1]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 7], cl
mov byte [ebp - 0x14], cl
mov cl, byte [ebp - 3]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov al, ch
shr al, 7
add ch, ch
or cl, al
mov byte [ebp - 1], dl
mov eax, dword [ebp - 0x24]
mov byte [ebp - 0x13], dl
cdq
and edx, 7
mov byte [ebp - 3], cl
mov byte [ebp - 0x12], cl
mov cl, 7
sub cl, bl
lea esi, [edx + eax]
mov al, byte [ebp - 0x3c]
sar esi, 3
and al, 0x80
mov dl, byte [esi + edi]
shr dl, cl
mov cl, bl
mov ebx, dword [ebp - 0x24]
and dl, 1
or ch, dl
shr al, cl
mov byte [ebp - 5], ch
mov byte [ebp - 0x11], ch
mov ecx, dword [ebp + 0xc]
xor byte [esi + ecx], al
inc ebx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x24], ebx
cmp ebx, 0x80
jl 0x4f6730
mov eax, dword [ebp - 0x28]
dec eax
mov dword [ebp - 0x28], eax
test eax, eax
jg 0x4f672b
jmp 0x4f698d
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x48], eax
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x44], ebx
test ebx, ebx
jle 0x4f6990
lea eax, [edi + 8]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0xc]
sub edi, eax
mov dword [ebp - 0x54], edi
lea ebx, [eax + 8]
lea eax, [ebp - 0x3c]
lea edx, [ebx - 8]
push eax
add edx, edi
call fcn.004f6ffa
mov edi, dword [edi + ebx - 8]
mov esi, dword [ebp - 0x3c]
xor esi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x38]
xor edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
xor eax, dword [ebp - 0x50]
mov dword [ebx - 8], esi
mov dword [ebp - 0x3c], esi
mov esi, dword [ebp - 0x4c]
pop ecx
mov ecx, dword [ebp - 0x34]
xor ecx, dword [ebp - 0x48]
mov dword [ebp - 0x28], edi
mov edi, dword [esi - 4]
mov dword [ebx - 4], edx
mov dword [ebp - 0x38], edx
mov edx, dword [esi]
mov dword [ebx], ecx
lea ebx, [ebx + 0x10]
mov dword [ebp - 0x34], ecx
mov ecx, dword [esi + 4]
add esi, 0x10
mov dword [ebx - 0xc], eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x44]
dec eax
mov dword [ebp - 0x24], edi
mov edi, dword [ebp - 0x54]
mov dword [ebp - 0x50], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x44], eax
test eax, eax
jg 0x4f68f8
jmp 0x4f698d
mov esi, ebx
test ebx, ebx
jle 0x4f6990
mov ebx, dword [ebp + 0xc]
push ebx
mov edx, edi
call fcn.004f6ffa
add edi, 0x10
add ebx, 0x10
dec esi
pop ecx
mov ecx, dword [ebp - 0x2c]
test esi, esi
jg 0x4f6976
mov ebx, dword [ebp - 0x40]
shl ebx, 7
mov eax, ebx
jmp 0x4f6999
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret