It is currently Wed Jan 20, 2021 5:26 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: thefool's obfuscation routine :(
PostPosted: Wed Jan 23, 2013 3:38 am 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
No longer works in PB5b5 x86 (enable inline asm)
Code:
Macro osR(w,msk,shft)
  ((w & msk) >> shft)
EndMacro
Macro osL(w,msk,shft)
  ((w & msk) << shft)
EndMacro
Procedure ob_obsfucate_sillier(mem.l, sz.l, skip.l = #False)
    Protected i.l, wk.l
    Protected *ps.byte
   
    Goto oc
    ooa:
    wk = *ps\b & $FF
    ;return to ba
    Goto ba
    oc:
   
    myooa = ?ooa
    Goto ob
    begin:
   
    For i = 1 To sz
        PUSH myooa
        ;do some stuff?
        RET
        ba:
       
        Goto ooo3
        ;do the *ps+1
        orpa:
        *ps + 1
        Goto ooo4
        ooo3:
       
       
        ;do
        Goto a1
        r2:
        Goto a2
        r3:
        Goto a3
        a2:
        teos|(osR(wk, $08, 3) | osL(wk, $01, 3) | osR(wk, $04, 1))
        Goto r3:
        a1:
        teos = osR(wk, $C0, 2) | osL(wk, $30, 2)
        Goto r2
        a3:
        teos|(osL(wk, $02, 1))
       
        *ps\b = teos
       
        PUSH l_orpa  ;=======ERROR============
        RET
        ooo4:
       
       
    Next
   
    Goto oa
    ob:
    *ps = mem
    Goto begin
    oa:
   
EndProcedure

Code:
---------------------------
PureBasic - Assembler error
---------------------------
PureBasic.asm [448]:

MP0

PureBasic.asm [229] MP0 [140]:

PUSH l_orpa

error: undefined symbol 'l_orpa'.


---------------------------
OK   
---------------------------


assistance please :)


Top
 Profile  
Reply with quote  
 Post subject: Re: thefool's obfuscation routine :(
PostPosted: Wed Jan 23, 2013 3:47 am 
Offline
Addict
Addict
User avatar

Joined: Fri Jan 21, 2011 8:25 am
Posts: 1021
Location: 'stralia!
Change it to PUSH l_ob_obsfucate_sillier_orpa. :)

_________________
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds


Top
 Profile  
Reply with quote  
 Post subject: Re: thefool's obfuscation routine :(
PostPosted: Wed Jan 23, 2013 4:24 am 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
Shield wrote:
Change it to PUSH l_ob_obsfucate_sillier_orpa. :)


:D

cheers


Top
 Profile  
Reply with quote  
 Post subject: Re: thefool's obfuscation routine :(
PostPosted: Thu Jul 25, 2013 1:35 am 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
And with PB5.2b7 things have changed once again :(

PUSH myooa = syntax error.

every new release brings a new set of challenges :)


Top
 Profile  
Reply with quote  
 Post subject: Re: thefool's obfuscation routine :(
PostPosted: Thu Jul 25, 2013 5:59 am 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 8:26 am
Posts: 2999
Location: Planet Earth
rsts wrote:
And with PB5.2b7 things have changed once again :(

PUSH myooa = syntax error.

every new release brings a new set of challenges :)

Just put "EnableASM" in front of the code, or put EnableASM / DisableASM combination within the procedure.


Top
 Profile  
Reply with quote  
 Post subject: Re: thefool's obfuscation routine :(
PostPosted: Thu Jul 25, 2013 2:58 pm 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
Whoops :oops:
Thought compiler options took care of that.

Many thanks. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: thefool's obfuscation routine :(
PostPosted: Thu Jul 25, 2013 3:27 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
It did before the update, but it is now removed as it was redundant with the compiler directive.


Top
 Profile  
Reply with quote  
 Post subject: Re: thefool's obfuscation routine :(
PostPosted: Sun Aug 24, 2014 3:55 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Nov 09, 2010 10:15 pm
Posts: 1719
For those wanting to use this with Unicode, you need to replace the Len() arguments in the obfuscation calls with StringByteLength(). Otherwise it only does the first half, since Unicode is 2-bytes per char.

Another alternative would be mod the code to work on a character level, rather than a byte level...but clearly, more work.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye