Quote Originally Posted by Musicman View Post
Basic action format - inside an actions tag - is either one byte (values in the 1-127 range), or one byte (values in the 128-255 range), followed by two length bytes, followed by data. Looking at simple example, you would need to handle at least geturl, loadvariables, push, and constants.

Musicman
I don't understand exactly how is this, I tryed to take the data direct on your function:

PHP Code:
function readtag()
    {    
$this->bufbits=1;
        
$this->buffer=0;
        
$res=new object();
        
$buf=fread($this->fp2);
        
$res->tag=$buf;     
        
$tmp=unpack("vx"$buf);
        
$val=$tmp["x"];
        
$res->type=$val >> 6;
        
$res->nbytes=$val 63;
        if(
$res->nbytes == 63)
        {    
$buf=fread($this->fp4);
            
$res->tag.=$buf;
            
$tmp=unpack("Vx"$buf);
            
$res->nbytes=$tmp["x"];
        }                          
        if (
$res->type==12) {
        while (
$res->nbytes>$this->bufbits) {
            
$data['tag']=fread($this->fp1);
            
$this->bufbits+=1;
            
$buf=fread($this->fp2);
            
$this->bufbits+=2;
            
$data['tag'].=$buf;
            
$tmp=unpack("v"$buf);
            
$data['bytes']=$tmp[1];
            if (
$data['bytes']) $data['data']=fread($this->fp$data['bytes']);
            
$this->bufbits+=$data['bytes'];
            
$data['end']=fread($this->fp1);
            
$this->bufbits+=1;
            
$res->data[]=$data;
        }
            
$res->end=fread($this->fp1);
        }
        elseif (
$res->nbytes)
          
$res->data=fread($this->fp$res->nbytes);
        return 
$res;
    } 
But don't work allways, have problems to read lengths inside an actions tag for each action.

I need to replace the name of variables and functions to obfuscate the swf files, have many swf files cannot use Flash program for this becouse is very hard.