Wtf are these traps

Started by EK.IceFlake, May 24, 2017, 05:16 PM

Previous topic - Next topic

EK.IceFlake

When trying to reverse engineer squirrel bytecode I get some traps

Are they to simply make life hard for reverse engineers or do they serve some actual purpose?

.

#1
Just a random guess. A scope/context. That is: a pair of curly braces.

function A(x)
{
    local y;
    if (x == y)
    {
        local z = x+y;
        print(z);
    } // <- Trap variables (z) in this scope and release them here
    // `z` doesn't exist here
} // <- Trap variables (x/y) in this scope and release them here
 A(3);
 // x,y don't exist here
.

Stormeus

Fun fact, these actually aren't TRAPs, they're PARTs in little-endian.


EK.IceFlake

Quote from: Stormeus on May 31, 2017, 05:33 AMFun fact, these actually aren't TRAPs, they're PARTs in little-endian.


Is that Visual Studio?

Stormeus

Quote from: EK.IceFlake on May 31, 2017, 05:41 AM
Quote from: Stormeus on May 31, 2017, 05:33 AMFun fact, these actually aren't TRAPs, they're PARTs in little-endian.


Is that Visual Studio?

Yes