Raised This Month: $51 Target: $400
 12% 

Lysis: An experimental .smx decompiler


Post New Thread Reply   
 
Thread Tools Display Modes
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-30-2016 , 21:56   Re: Lysis: An experimental .smx decompiler
Reply With Quote #331

Quote:
Originally Posted by Peace-Maker View Post
This should be validated in the VM.
This is a horrible idea. I don't want my server to be wasting CPU time (at the location where it matters the absolute most) validating binaries during bytecode execution just because a minority < 1% of smx files ever made were purposely malformed.
Potato Uno is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-30-2016 , 22:05   Re: Lysis: An experimental .smx decompiler
Reply With Quote #332

Quote:
Originally Posted by Potato Uno View Post
This is a horrible idea. I don't want my server to be wasting CPU time (at the location where it matters the absolute most) validating binaries during bytecode execution just because a minority < 1% of smx files ever made were purposely malformed.
You posted your opinion a little to late I'm afraid (It was already merged into SP which will eventually be merged into SM 1.9): https://github.com/alliedmodders/sou...2b398e620634ce
__________________
WildCard65 is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-30-2016 , 22:59   Re: Lysis: An experimental .smx decompiler
Reply With Quote #333

Well it looks like I am not upgrading to 1.9 unless Valve does something that really breaks 1.8 for good.

The paused plugin spam is bad enough but avoidable. The VM wasting CPU cycles pointlessly trying to break plugins I will never run is even worse. It probably will only get worse from now on as they continue to bolt in more validation to the JIT just to break like 0.1% of smx files ever made.

If license violators are smart enough to still break Lysis to this day, they will be smart enough to thwart anything the SM teams put in the VM. It's a cat and mouse situation that only will end up hurting everybody who uses SM. The real solutions (and not monkey patches) is to ditch the smx format and make the server compile source code every time it starts up.

Last edited by Potato Uno; 08-30-2016 at 23:12.
Potato Uno is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-31-2016 , 02:50   Re: Lysis: An experimental .smx decompiler
Reply With Quote #334

You are over reacting, the method verifier is not expensive and only run once with the rest of the verification checks (which have been there a long time). It is necessary to protect against corrupt plugins just as much as intentional tampering.

I can assure you that compiling from source at runtime will take a lot longer that some basic static analysis. Loading from source was ruled out a long time ago until we have spcomp2.
__________________
asherkin is offline
Danyas1337
Member
Join Date: May 2013
Location: Kyiv, Ukraine
Old 09-30-2016 , 13:07   Re: Lysis: An experimental .smx decompiler
Reply With Quote #335

Hello again, i need some help with decompile.
EventWeaponFire wont decompilling, wanna to see what in this function
Attached Files
File Type: smx target.smx (21.2 KB, 164 views)
__________________
<3 AM

Last edited by Danyas1337; 09-30-2016 at 13:08.
Danyas1337 is offline
Send a message via Skype™ to Danyas1337
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 09-30-2016 , 13:20   Re: Lysis: An experimental .smx decompiler
Reply With Quote #336

Quote:
Originally Posted by Danyas1337 View Post
Hello again, i need some help with decompile.
EventWeaponFire wont decompilling, wanna to see what in this function
See https://forums.alliedmods.net/showpo...&postcount=338

Last edited by Maxximou5; 09-30-2016 at 22:35.
Maxximou5 is offline
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 09-30-2016 , 13:37   Re: Lysis: An experimental .smx decompiler
Reply With Quote #337

Quote:
Originally Posted by Maxximou5 View Post
Decompiled with SPEdit.

Edit: You should download SPEdit so you can do this yourself, since you've asked a few times now.
https://forums.alliedmods.net/showthread.php?t=259917
That's useless...
Quote:
}


/* ERROR! Unable to cast object of type 'Lysis.DJump' to type 'Lysis.DJumpCondition'. */
function "EventWeaponFire" (number 42)

/* ERROR! Unable to cast object of type 'Lysis.DJump' to type 'Lysis.DJumpCondition'. */
function "OnPlayerRunCmd" (number 43)
public int OnPreThinkPost(int client)
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-30-2016 , 22:15   Re: Lysis: An experimental .smx decompiler
Reply With Quote #338

The version of the C# implementation of Lysis in SPEdit is from a really old version of Lysis and shouldn't be called "improved". Why did you post that output which explicitly lacks the function he asked for and defend it?

PHP Code:
public Action:EventWeaponFire(Handle:eventString:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    new 
var1;
    if (
IsAdmin[client] && g_iNoFlash[client])
    {
        
SetEntDataFloat(clientg_iFlashAlpha0.5false);
    }
    new 
m_Offset FindSendPropOffs("CCSPlayer""m_iTeamNum");
    new 
Float:angles[3] = 0.0;
    new 
var5 view_angles[client];
    
angles var5;
    if (
Aimbot[client])
    {
        new 
i;
        while (
AimbotMulti[client] >= i)
        {
            new 
cnt 1;
            while (
cnt <= MaxClients)
            {
                new 
t1;
                new 
t2;
                if (
IsClientInGame(cnt))
                {
                    
t1 GetEntData(clientm_Offset4);
                    
t2 GetEntData(cntm_Offset4);
                    if (!(
IsClientObserver(cnt)))
                    {
                        if (
IsPlayerAlive(cnt))
                        {
                            if (!(
t2 == t1))
                            {
                                new 
var2;
                                if (!(
t2 == || t2 == 3))
                                {
                                    if (!(
client == cnt))
                                    {
                                        new 
Float:p1[3] = 0.0;
                                        new 
Float:p2[3] = 0.0;
                                        new 
Float:p3[3] = 0.0;
                                        
GetClientEyePosition(clientp1);
                                        
GetClientEyePosition(cntp2);
                                        
TR_TraceRayFilter(p1p233636363RayType:0TraceRayDontHitSelfclient);
                                        new 
var3;
                                        if (!(
TR_GetFraction(Handle:0) < 1064682127 && cnt != TR_GetEntityIndex(Handle:0) && AimT[client]))
                                        {
                                            new 
Float:delta[3] = 0.0;
                                            
delta[0] = p1[0] - p2[0];
                                            
delta[1] = p1[1] - p2[1];
                                            
delta[2] = p1[2] - p2[2];
                                            new 
Float:hyp SquareRoot(delta[0] * delta[0] + delta[1] * delta[1]);
                                            
p3[0] = ArcTangent(delta[2] / hyp) * 180 3.141;
                                            
p3[1] = ArcTangent(delta[1] / delta[0]) * 180 3.141;
                                            
p3[2] = 0.0;
                                            if (
delta[0] >= 0.0)
                                            {
                                                
p3[1] += 180.0;
                                            }
                                            new 
var4;
                                            if (!(
FloatAbs(p3[0] - angles[0]) > aFov[client] || FloatAbs(p3[1] - angles[1]) > aFov[client]))
                                            {
                                                if (
Aimbot[client] == 2)
                                                {
                                                    new 
int:dmgt 2;
                                                    
aimbot_event cnt;
                                                    if (
GetRandomFloat(0.01.0) > HeadChance[client])
                                                    {
                                                        
HeadChanceF[client] = 0;
                                                    }
                                                    else
                                                    {
                                                        
HeadChanceF[client] = 1;
                                                    }
                                                    if (!(
AimChance[client] < GetRandomFloat(0.01.0)))
                                                    {
                                                        
SDKHooks_TakeDamage(cntclientclientGetDmg(clientcnt), dmgt, -1NULL_VECTORNULL_VECTOR);
                                                        
i++;
                                                    }
                                                    
cnt++;
                                                }
                                            }
                                            
cnt++;
                                        }
                                        
cnt++;
                                    }
                                    
cnt++;
                                }
                                
cnt++;
                            }
                            
cnt++;
                        }
                        
cnt++;
                    }
                    
cnt++;
                }
                
cnt++;
            }
            
i++;
        }
    }
    return 
Action:0;

Something like this.
__________________
Peace-Maker is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 09-30-2016 , 22:34   Re: Lysis: An experimental .smx decompiler
Reply With Quote #339

Quote:
Originally Posted by Peace-Maker View Post
The version of the C# implementation of Lysis in SPEdit is from a really old version of Lysis and shouldn't be called "improved". Why did you post that output which explicitly lacks the function he asked for and defend it?
You're right. I did not fully realize that, my mistake. However, I did not defend state such a thing or make such a claim towards it being "improved".
Maxximou5 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-30-2016 , 22:48   Re: Lysis: An experimental .smx decompiler
Reply With Quote #340

Quote:
Originally Posted by Maxximou5 View Post
You're right. I did not fully realize that, my mistake. However, I did not defend state such a thing or make such a claim towards it being "improved".
Yes, it just says that the decompiler is "improved" in SPEdit's thread. Just wanted to make this clear, since you use it.
You kinda defended your output in the response to Bara, which you deleted now. But nevermind.
__________________
Peace-Maker is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode