Here are some things you will need for this tutorial

For an AS2 Game
flasm
A swf file
A basic knowledge of flasm


For an AS3 Game
Sothink SWF Decompiler
HxD (or a Hex editor of your choice)
A swf file
A knowledge of Hex editing


AS2 Score Removing

The first thing we need to do is get a game. If you want to use the game I am using for this tutorial,you can get it here, but you can use this with pretty much any AS2 game.

Once you've downloaded the swf, decompile it with flasm, and open up the .txt file. The easiest way to get rid of the score submits are by searching the file for "submit".

So we press ctrl+f in notepad, and search submit. We should have have one variable called "but_submit". We need to change the variable to "null". When we switch the variable to "null", we're telling the game that instead of submitting our score, we want it to do nothing.

So this is what we had:

Code:
      constants '_root', 'myscore', 'but_submit', '_visible', 'sc', 'text', '', 'SCORE: ', 'onPress', 'duderscores', 'com', 'newgrounds', 'API', 'postScore', 'showScoreBoard'
And this is what we should have after we delete it:

Code:
      constants '_root', 'myscore', 'null', '_visible', 'sc', 'text', '', 'SCORE: ', 'onPress', 'duderscores', 'com', 'newgrounds', 'API', 'postScore', 'showScoreBoard'
Now we need search again to see if there is another variable. If there is, we need to change it too.

Sometimes, we have something like this:

Code:
      branchIfTrue label1
      push 'but_submit'
      getVariable
      push '_visible', FALSE
To take the score submit out from here, we have to change the variable "but_submit" to a null.

So highlight "push 'but_submit' " and change it

The code should look like this after we are done

Code:
      branchIfTrue label1
      push 'null'
      getVariable
      push '_visible', FALSE
After this, we keep searching for the submits have changed them all.
So next we have this:

Code:
      setMember
      push 'but_submit'
      getVariable
      push 'onPress'
      function2 () (r:1='_root')
        push r:_root, 'myscore'
        getMember
        push 'duderscores', 2, 'com'
        getVariable
        push 'newgrounds'
        getMember
        push 'API'
        getMember
        push 'postScore'
        callMethod
        pop
        push r:_root, 'myscore', UNDEF
        setMember
        push 0.0, r:_root, 'showScoreBoard'
        callMethod
        pop
      end // of function
Now we just do the same thing as before. We change the "push 'but_submit' "


Code:
      setMember
      push 'null'
      getVariable
      push 'onPress'
      function2 () (r:1='_root')
        push r:_root, 'myscore'
        getMember
        push 'duderscores', 2, 'com'
        getVariable
        push 'newgrounds'
        getMember
        push 'API'
        getMember
        push 'postScore'
        callMethod
        pop
        push r:_root, 'myscore', UNDEF
        setMember
        push 0.0, r:_root, 'showScoreBoard'
        callMethod
        pop
      end // of function
We should do this until the search shows no more matches for "submit"

After we have delete all the "submits", we recompile the game, and the submit button should no longer work. If it does, we need to go back through the file, searching for "score"

If it has a word similar to "post" or "submit", it needs to be changed.

For example, I have this in my game:

Code:
      function2 () (r:1='_root')
        push r:_root, 'myscore'
        getMember
        push 'duderscores', 2, 'com'
        getVariable
        push 'newgrounds'
        getMember
        push 'API'
        getMember
        push 'postScore' <----
        callMethod
        pop
        push r:_root, 'myscore', UNDEF
        setMember
        push 0.0, r:_root, 'showScoreBoard'
        callMethod
        pop
      end // of function
"push 'postScore' " needs to be changed as well. Any time you come across "push 'postScore' " in the game, you need to change it.


Code:
      function2 () (r:1='_root')
        push r:_root, 'myscore'
        getMember
        push 'duderscores', 2, 'com'
        getVariable
        push 'newgrounds'
        getMember
        push 'API'
        getMember
        push 'null' <----
        callMethod
        pop
        push r:_root, 'myscore', UNDEF
        setMember
        push 0.0, r:_root, 'showScoreBoard'
        callMethod
        pop
      end // of function
One more way of taking highscore submits out is by deleting the url.

Here is an example (courtesy of roflmao897)

Quote Originally Posted by roflmao987

On others just take out the link:

'POST' http://games.com/submithighscores

to 'POST' 'null'
Same basic concept as the rest.

And now, we should have a submit-free game!




AS3 Score Removing

Before we start, you have to have a good understanding of Hex Bytes.

I'm using this game.

Alright, first we need to decompress our game. ( You need your own decompressor, I won't give you one) Then we open it up in Sothink SWF Decompiler.

First thing we need to search for is submit. So switch to ActionScript, and search submit on Raw Data.

We're ignoring the pushstrings, because they have nothing to do with actually submitting the score.

The first thing we need to worry about is this:

Code:
        public static function submit(param1:Number, param2:String, param3:Object = null, param4:Object = null) : void
        {
//d0 
_as3_getlocal <0> 
//30 
_as3_pushscope 
//5d 07 
_as3_findpropstrict Number
But the only thing we actually need to worry about is "_as3_getlocal <0>".

We need to change the byte to a returnvoid (byte is 47)

So it needs to be:

Code:
        public static function submit(param1:Number, param2:String, param3:Object = null, param4:Object = null) : void
        {
//47
_as3_returnvoid
//30 
_as3_pushscope 
//5d 07 
_as3_findpropstrict Number
Now we search the rest of the file, replacing all the "public function submits"

The next one we come across is this:

Code:
        public function submitScore(event:MouseEvent) : void
        {
//d0 
_as3_getlocal <0> 
//30 
_as3_pushscope 
//60 82 08 
_as3_getlex gameOverScreen
//66 a3 06 
_as3_getproperty _Submit_Score_
We do the same thing to this one as well.

So we replace "_as3_getlocal <0>" with returnvoid


Code:
        public function submitScore(event:MouseEvent) : void
        {
//47
_as3_returnvoid 
//30 
_as3_pushscope 
//60 82 08 
_as3_getlex gameOverScreen
//66 a3 06 
_as3_getproperty _Submit_Score_
Any variation of submit should also be dealt with.

Example:

Code:
        public function showSubmissionScreen(event:MouseEvent) : void
        {
//d0 
_as3_getlocal <0> 
//30 
_as3_pushscope 
//60 82 08 
_as3_getlex gameOverScreen
//66 a4 11 
_as3_getproperty submit
It's name is submission here, but it's the same thing. It needs to be dealt with as well.

Code:
        public function showSubmissionScreen(event:MouseEvent) : void
        {
//47
_as3_returnvoid
//30 
_as3_pushscope 
//60 82 08 
_as3_getlex gameOverScreen
//66 a4 11 
_as3_getproperty submit
After you've changed all the "public function submits", recompile the game and test the submit.

And there we have it, a submit-free AS3 game!

Thanks to these people
roflmao987 - For explaining AS3 to me & telling me about returnvoids and getlocals in the first place
Sublimity - For trying to help me understand "_as3_getlocal <0>"
ZuckeR - For explaining what "_as3_getlocal <0>" meant to me