Arcade Prehacks

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Join Date
    Mar 2010
    Location
    Hungary
    Posts
    6

    Pushing an integer to the stack

    Hi
    Is it possible to push an integer to the stack instead of getting a property from the current scope?
    Here is the code:
    Code:
    getlex playerscore
    and I would like to do something like this:
    Code:
    pushint *a large number*
    How can I check the constant pool if there is any large value? Or is it possible to add a number to the constant pool?

  2. #2
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,775

    Re: Pushing an integer to the stack

    Are we talking about hacking with flasm or is it AS3, because with flasm you don't need the constant pool?

  3. #3

    Join Date
    Mar 2010
    Location
    Hungary
    Posts
    6

    Re: Pushing an integer to the stack

    We are talking about AS3 (because if we were talking about AS2 (AS1?) we wouldn't need the constant pool.)
    An other question: What is the maximum value that can be pushed with pushshort?

  4. #4
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,775

    Re: Pushing an integer to the stack

    The maximum size of an short can vary as the size increases. Short values can have a different hex size depending on the original value.
    Code:
    ff 7f       -      16.383
    ff ff 7f    -   2.097.151
    ff ff ff 7f - 268.435.455
    To find a higher value that is in the pool you can either use RJTs decompiler (viewtopic.php?f=46&t=3967) and look at the constant pool or use sothink swf decompiler and search in raw mode for a higher value.

  5. #5
    Senior Member
    Join Date
    May 2010
    Location
    Pen Island
    Posts
    3,838

    Re: Pushing an integer to the stack

    RJT's decomp doesn't work though...

  6. #6
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,775

    Re: Pushing an integer to the stack

    It works fine for me and always did, i don't know what the problem is others are having.

  7. #7
    Banned
    Join Date
    Jul 2009
    Posts
    67

    Re: Pushing an integer to the stack

    What link did you download it from?
    Because there is one version uploaded on the forum and 2 other mirros

  8. #8
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,775

    Re: Pushing an integer to the stack

    Quote Originally Posted by MartinRistov
    Because there is one version uploaded on the forum and 2 other mirros
    Nope, both mirrors are dead so there is only one version! And this version works fine for me!

  9. #9

    Join Date
    Mar 2010
    Location
    Hungary
    Posts
    6

    Re: Pushing an integer to the stack

    Quote Originally Posted by ZuckeR
    The maximum size of an short can vary as the size increases. Short values can have a different hex size depending on the original value ...
    Then, I think pushshort would be a good solution for this problem.
    Is it possible to replace a shorter statement with a longer?
    I mean replace this:
    Code:
    25 0A
    //pushshort 10
    to a bigger number like this:
    Code:
    25 E8 07
    //pushshort 1000

  10. #10
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,775

    Re: Pushing an integer to the stack

    Changing 25 0A to 25 E8 07 obviously adds one byte which is enough to corrupt the SWF. You can't change a short value from a one to two bytes. The other way you could do it with nop which would then fill the rest of the unneeded bytes. Sometimes there can be ways to still do it by changing more code or deleting some but that is more advanced and different from game to game.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •