diff --git a/arm.dec b/arm.dec new file mode 100644 index 0000000..dfe1c3a --- /dev/null +++ b/arm.dec @@ -0,0 +1,32 @@ +// ARM call transform - decode +enum {BLOCK=0x10000}; +char blk[BLOCK]={}; +int min(int a, int b) {return a>26)==0x25 ) { + offset=op&0x3FFFFFF; + offset=offset-(i/4); + op=op&(~0x3FFFFFF); + op=op|(offset&0x3FFFFFF); + } + blk[i]=op; + blk[i+1]=op>>8; + blk[i+2]=op>>16; + blk[i+3]=op>>24; + } + write(blk,bytesRead); + } + return len; +} +int main() { +} \ No newline at end of file diff --git a/arm.det b/arm.det index 32f5786..31ea2be 100644 --- a/arm.det +++ b/arm.det @@ -59,7 +59,7 @@ int detect(int c4,int i) { if (type==DEFAULT && ARMcount>=18 && ARMpos>16){ type=ARM; state=START; - jstart=ARMpos-5; + jstart=ARMpos-(ARMpos%4); //printf("DETECT: ARM start %d\n",jstart); return state; } diff --git a/arm.enc b/arm.enc new file mode 100644 index 0000000..8221048 --- /dev/null +++ b/arm.enc @@ -0,0 +1,32 @@ +// ARM call transform - encode +enum {BLOCK=0x10000}; +char blk[BLOCK]={}; +int min(int a, int b) {return a>26)==0x25) { + offset=op&0x3FFFFFF; + offset=offset+(i/4); + op=op&(~0x3FFFFFF); + op=op|(offset&0x3FFFFFF); + } + blk[i]=op; + blk[i+1]=op>>8; + blk[i+2]=op>>16; + blk[i+3]=op>>24; + } + write(blk,bytesRead); + } +} + +int main() { +} \ No newline at end of file diff --git a/conf.pxv b/conf.pxv index aa0765a..b74450d 100644 --- a/conf.pxv +++ b/conf.pxv @@ -67,8 +67,8 @@ encode text.enc compress 0 type 8 detect dec.det -decode -1 //dec.dec -encode -1 //dec.enc +decode dec.dec +encode dec.enc compress 0 type 9 detect gif.det @@ -77,6 +77,6 @@ encode -1 compress 0 type 10 detect arm.det -decode -1 //arm.dec -encode -1 //arm.enc +decode arm.dec +encode arm.enc compress 0 \ No newline at end of file