Raised This Month: $ Target: $400
 0% 

Duels decompile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Saint Sinner
Senior Member
Join Date: Feb 2016
Old 12-07-2016 , 09:10   Duels decompile
Reply With Quote #1

My friend decompile this for me and now have error can someone make this functional>??

Code:
// Ignored xs__ variables
#pragma semicolon 1
#pragma ctrlchar '\'

new PLUGIN[12] =
{
    88, 51, 77, 32, 124, 32, 65, 114, 101, 110, 97, 0
}
new VERSION[4] =
{
    49, 46, 48, 0
}
new AUTHOR[5] =
{
    65, 73, 84, 68, 0
}
new gszInfoTarget[12] =
{
    105, 110, 102, 111, 95, 116, 97, 114, 103, 101, 116, 0
}
new gszBlockModel[17] =
{
    109, 111, 100, 101, 108, 115, 47, 97, 114, 101, 110, 97, 46, 109, 100, 108, 0
}
new Float:BlockAnglesX[3] =
{
    0, 1119092736, 1119092736
}
new Float:BlockSizeMinX[3] =
{
    -1045692416, -1090519040, -1029963776
}
new Float:BlockSizeMaxX[3] =
{
    1125679104, 1056964608, 1117519872
}
new Float:BlockAnglesY[3] =
{
    1119092736, 0, 0
}
new Float:BlockSizeMinY[3] =
{
    -1021804544, -1029898240, -1090519040
}
new Float:BlockSizeMaxY[3] =
{
    1101791232, 1117585408, 1056964608
}
new Float:BlockAnglesZ[3];
new Float:BlockSizeMinZ[3] =
{
    -1090519040, -1029963776, -1045692416
}
new Float:BlockSizeMaxZ[3] =
{
    1056964608, 1117519872, 1125679104
}
new Float:ArrayArenaA[38][3] =
{
    {
        1145896960, -1006338048, -1000767488
    },
    {
        1148682240, -1006338048, -1000767488
    },

Error on write global ArrayArenaA: Индекс находился вне границ массива.

    new Float:ArrayArenaB[38][3] =
    {
        {
            1145896960, -990904320, -1000767488
        },
        {
            1148682240, -990904320, -1000767488
        },

Error on write global ArrayArenaB: Индекс находился вне границ массива.

        new bool:g_bArenaCreate[4];
new ArenaEnt[4][38];
new ids[33][33];
new menu[33];
new mpl;
new Duel[33];
new InDuel[33];
new g_DuelKills[33];
new g_Origin[4][3] =
{
    {
        687, -375, -800
    },
    {
        1330, -375, -800
    },

Error on write global g_Origin: Индекс находился вне границ массива.

    new Float:g_Angles[4][3] =
    {
        {
            0, ...
        },
        {
            0, 1127481344, 0
        },

Error on write global g_Angles: Индекс находился вне границ массива.

        
set_rendering(index, fx, r, g, b, render, amount)
{
    entity_set_int(index, EV_INT_renderfx, fx);
    new Float:RenderColor[3];
    RenderColor[0] = float(r);
    RenderColor[1] = float(g);
    RenderColor[2] = float(b);
    entity_set_vector(index, 17, RenderColor);
    entity_set_int(index, EV_INT_rendermode, render);
    entity_set_float(index, EV_FL_renderamt, float(amount));
    return 1;
}

fm_set_user_health(index, health)
{
    !!! Removed Phi
    if (health > 0)
    {
        set_pev(index, pev_health, float(health));
    }
    else
    {
        dllfunc(DLLFunc_ClientKill, index);
    }
    return 1;
}

public plugin_precache()
{
    precache_model(gszBlockModel);
    return 0;
}

public plugin_init()
{
    register_plugin(PLUGIN, "1.0", "AITD");
    register_event("ResetHUD", "eventPlayerSpawn", "b", "");
    register_event("DeathMsg", "eventDeathMsg", "a", "1>0", "4=knife");
    register_clcmd("say /kdc", "show_kdc", -1, "", -1);
    register_clcmd("say /duel", "show_kdc", -1, "", -1);
    register_menucmd(register_menuid("knife duel", 0), 1023, "knifeduel_menu");
    mpl = get_maxplayers();
    set_task(45.00, "arenamsg", 0, "", 0, "b", 0);
    return 0;
}

public eventPlayerSpawn(id)
{
    new var3 = InDuel;
    new var2;
    if (var3[id][0][0])
    {
        new var4 = InDuel;
        new var1;
        switch (var4[id][0][0])
        {
            case 1:
            {
                if (cs_get_user_team(id, 0) != 1)
                {
                    cs_set_user_team(id, 1, _}:0);
                }
                new var6 = g_Origin;
                set_user_origin(id, var6[0][0][var6]);
                new var7 = g_Angles;
                set_pev(id, pev_angles, var7[0][0][var7]);
                set_pev(id, pev_fixangle, 1);
                var1 = Heap_-4;
            }
            case 2:
            {
                if (cs_get_user_team(id, 0) != 2)
                {
                    cs_set_user_team(id, 2, _}:0);
                }
                set_user_origin(id, g_Origin[1][0]);
                set_pev(id, pev_angles, g_Angles[1][0]);
                set_pev(id, pev_fixangle, 1);
                var1 = Heap_-4;
            }
            case 3:
            {
                if (cs_get_user_team(id, 0) != 1)
                {
                    cs_set_user_team(id, 1, _}:0);
                }
                set_user_origin(id, g_Origin[2][0]);
                set_pev(id, pev_angles, g_Angles[2][0]);
                set_pev(id, pev_fixangle, 1);
                var1 = Heap_-4;
            }
            case 4:
            {
                if (cs_get_user_team(id, 0) != 2)
                {
                    cs_set_user_team(id, 2, _}:0);
                }
                set_user_origin(id, g_Origin[3][0]);
                new var5 = g_Angles[3];
                set_pev(id, pev_angles, var5[0]);
                var1 = var5;
            }
            default:
            {
                var1 = var4;
            }
        }
        fm_set_user_health(id, 35);
        give_item(id, "weapon_knife");
        var2 = var1;
    }
    else
    {
        var2 = var3;
    }
    return 0;
}

public eventDeathMsg()
{
    new killer = read_data(1);
    new victim = read_data(2);
    new var6 = InDuel;
    new var1;
    new var2;
    if (var6[killer][0][0])
    {
        new var7 = InDuel;
        if (var7[victim][0][0])
        {
            var2 = var7;
            if (ERROR: Phi)
            {
                new killerName[32];
                new victimName[32];
                get_user_name(killer, killerName, 31);
                get_user_name(victim, victimName, 31);
                g_DuelKills[killer]++;
                ColorMessage(killer, "\4[ %s ] \1%s \4vs \1%s - \4%d \1/ \4%d", PLUGIN, killerName, victimName, g_DuelKills[killer], g_DuelKills[victim]);
                ColorMessage(victim, "\4[ %s ] \1%s \4vs \1%s - \4%d \1/ \4%d", PLUGIN, victimName, killerName, g_DuelKills[victim], g_DuelKills[killer]);
                new var8 = g_DuelKills;
                new var5;
                if (var8[killer][0][0] == 10)
                {
                    new var9 = InDuel;
                    new var3;
                    new var4;
                    if (var9[killer][0][0] == 1)
                    {
                        var3 = var9;
                    }
                    else
                    {
                        new var10 = InDuel;
                        if (var10[killer][0][0] == 2)
                        {
                            var3 = var10;
                        }
                        var4 = var10;
                        if (ERROR: Phi)
                        {
                            deleteArena(0);
                        }
                        else
                        {
                            deleteArena(1);
                        }
                        g_DuelKills[killer] = 0;
                        g_DuelKills[victim] = 0;
                        InDuel[killer] = 0;
                        new var11 = InDuel[victim];
                        var11 = 0;
                        var5 = var11;
                    }
                    var4 = var3;
                    if (ERROR: Phi)
                    {
                        deleteArena(0);
                    }
                    else
                    {
                        deleteArena(1);
                    }
                    g_DuelKills[killer] = 0;
                    g_DuelKills[victim] = 0;
                    InDuel[killer] = 0;
                    new var11 = InDuel[victim];
                    var11 = 0;
                    var5 = var11;
                }
                else
                {
                    var5 = var8;
                }
                new svIndex[2];
                svIndex[0] = killer;
                svIndex[1] = victim;
                set_task(0.50, "respawn", 0, svIndex, 2, "", 0);
            }
            return 0;
        }
        var1 = var7;
    }
    else
    {
        var1 = var6;
    }
    var2 = var1;
    if (ERROR: Phi)
    {
        new killerName[32];
        new victimName[32];
        get_user_name(killer, killerName, 31);
        get_user_name(victim, victimName, 31);
        g_DuelKills[killer]++;
        ColorMessage(killer, "\4[ %s ] \1%s \4vs \1%s - \4%d \1/ \4%d", PLUGIN, killerName, victimName, g_DuelKills[killer], g_DuelKills[victim]);
        ColorMessage(victim, "\4[ %s ] \1%s \4vs \1%s - \4%d \1/ \4%d", PLUGIN, victimName, killerName, g_DuelKills[victim], g_DuelKills[killer]);
        new var8 = g_DuelKills;
        new var5;
        if (var8[killer][0][0] == 10)
        {
            new var9 = InDuel;
            new var3;
            new var4;
            if (var9[killer][0][0] == 1)
            {
                var3 = var9;
            }
            else
            {
                new var10 = InDuel;
                if (var10[killer][0][0] == 2)
                {
                    var3 = var10;
                }
                var4 = var10;
                if (ERROR: Phi)
                {
                    deleteArena(0);
                }
                else
                {
                    deleteArena(1);
                }
                g_DuelKills[killer] = 0;
                g_DuelKills[victim] = 0;
                InDuel[killer] = 0;
                new var11 = InDuel[victim];
                var11 = 0;
                var5 = var11;
            }
            var4 = var3;
            if (ERROR: Phi)
            {
                deleteArena(0);
            }
            else
            {
                deleteArena(1);
            }
            g_DuelKills[killer] = 0;
            g_DuelKills[victim] = 0;
            InDuel[killer] = 0;
            new var11 = InDuel[victim];
            var11 = 0;
            var5 = var11;
        }
        else
        {
            var5 = var8;
        }
        new svIndex[2];
        svIndex[0] = killer;
        svIndex[1] = victim;
        set_task(0.50, "respawn", 0, svIndex, 2, "", 0);
    }
    return 0;
}

public respawn(String:svIndex[])
{
    new vIndex = svIndex[0];
    new vIndex2 = svIndex[1];
    spawn(vIndex);
    spawn(vIndex2);
    return 0;
}

public show_kdc(id)
{
    !!! Removed Phi
    if (InDuel[id][0][0])
    {
        ColorMessage(id, "\4[ %s ] \1please wait\4!", PLUGIN);
    }
    else
    {
        if (g_bArenaCreate[0][0] && g_bArenaCreate[1][0])
        {
            ColorMessage(id, "\4[ %s ] \1no free arenas\4!", PLUGIN);
        }
        menu[id] = 0;
        show_duel_menu(id, 0);
    }
    return 0;
}

public show_duel_menu(id, pos)
{
    !!! Removed Phi
    if (0 > pos)
    {
        return 1;
    }
    new body[1024];
    new name[32];
    new keys = 512;
    new len = 0;
    new num = 0;
    new pid = 0;
    new key = 0;
    new p = 0;
    while (p < mpl)
    {
        if (!is_user_connected(p) || is_user_bot(p) || is_user_hltv(p))
        {
        }
        else
        {
            num++;
            ids[id][0][0][num] = p;
        }
        p++;
    }
    new start = pos * 8;
    if (start > num)
    {
        return show_duel_menu(id, pos + -1);
    }
    new end = start + 8;
    if (end > num)
    {
        end = num;
    }
    len = format(body, 1023, "\w[ \r%s\w ]\n\n", PLUGIN);
    new i = start;
    while (i < end)
    {
        pid = ids[id][0][0][i];
        get_user_name(pid, name, 31);
        if (get_user_userid(pid) == get_user_userid(id))
        {
            key++;
            len = format(body[len], 1023 - len, "\d%d. %s \n", key, name) + len;
            i++;
        }
        else
        {
            if (InDuel[pid][0][0])
            {
                key++;
                len = format(body[len], 1023 - len, "\d%d. \w%s \r (\win duel\r) \n", key, name) + len;
                i++;
            }
            keys = 1 << key | keys;
            key++;
            len = format(body[len], 1023 - len, "\r%d. \w%s\n", key, name) + len;
            i++;
        }
        i++;
    }
    if (num != end)
    {
        new var2;
        if (pos)
        {
            var2 = 8796;
        }
        else
        {
            var2 = 8816;
        }
        format(body[len], 1023 - len, "\n\r9.\w%L\n\r0.\w%L", id, "MORE", id, var2);
        keys |= 256;
    }
    else
    {
        new var3;
        if (pos)
        {
            var3 = 8876;
        }
        else
        {
            var3 = 8896;
        }
        format(body[len], 1023 - len, "\n\r0.\w%L", id, var3);
    }
    show_menu(id, keys, body, -1, "knife duel");
    return 1;
}

public knifeduel_menu(id, key)
{
    switch (key)
    {
        case 8:
        {
            new var2 = menu[id];
            var2++;
            return show_duel_menu(id, var2[0][0]);
        }
        case 9:
        {
            new var1 = menu[id];
            var1--;
            return show_duel_menu(id, var1[0][0]);
        }
        default:
        {
            new pid = ids[id][0][0][key + menu[id][0][0] * 8];
            if (!is_user_connected(pid))
            {
                ColorMessage(id, "\4[ %s ] \1This player has left the server\4!", PLUGIN);
                return show_duel_menu(id, menu[id][0][0]);
            }
            if (id == pid)
            {
                return show_duel_menu(id, menu[id][0][0]);
            }
            if (InDuel[pid][0][0])
            {
                ColorMessage(id, "\4[ %s ] \1This player in duel\4!", PLUGIN);
                return show_duel_menu(id, menu[id][0][0]);
            }
            OpponentMenu(pid, id);
            return 1;
        }
    }
}

public OpponentMenu(id, opponent)
{
    new szOppName[32];
    get_user_name(opponent, szOppName, 31);
    Duel[id] = opponent;
    new szTitle[64];
    formatex(szTitle, 63, "\w[ \r%s\w ] - Play vs. \r%s", PLUGIN, szOppName);
    new menu = menu_create(szTitle, "opponent_menu_handler", 0);
    menu_additem(menu, "\wYes", "1", 0, -1);
    menu_additem(menu, "\wNo", "2", 0, -1);
    menu_setprop(menu, 6, 1);
    menu_display(id, menu, 0);
    return 0;
}

public opponent_menu_handler(id, menu, item, pid)
{
    if (item == -3)
    {
        menu_destroy(menu);
        return 1;
    }
    new data[6];
    new szName[64];
    new access = 0;
    new callback = 0;
    menu_item_getinfo(menu, item, access, data, 5, szName, 63, callback);
    new key = str_to_num(data);
    new var3;
    switch (key)
    {
        case 1:
        {
            new opponent = Duel[id][0][0];
            if (!is_user_connected(opponent))
            {
                ColorMessage(id, "\4[ %s ] \1This player has left the server\4!", PLUGIN);
                return 1;
            }
            new var5 = InDuel;
            new var2;
            if (var5[opponent][0][0])
            {
                ColorMessage(id, "\4[ %s ] \1This player in duel\4!", PLUGIN);
                var2 = var5;
            }
            else
            {
                new var1;
                if (!g_bArenaCreate[0][0])
                {
                    Duel[opponent] = id;
                    InDuel[opponent] = 1;
                    new var6 = InDuel[id];
                    var6 = 2;
                    createArenaA(id);
                    spawn(id);
                    spawn(opponent);
                    var1 = var6;
                }
                else
                {
                    if (!g_bArenaCreate[1][0])
                    {
                        Duel[opponent] = id;
                        InDuel[opponent] = 3;
                        new var7 = InDuel[id];
                        var7 = 4;
                        createArenaB(id);
                        spawn(id);
                        spawn(opponent);
                        var1 = var7;
                    }
                    ColorMessage(id, "\4[ %s ] \1no free arenas, please wait\4!", PLUGIN);
                    var1 = var5;
                }
                var2 = var1;
            }
            var3 = var2;
        }
        case 2:
        {
            new szOppName[32];
            get_user_name(id, szOppName, 31);
            new var4 = Duel;
            ColorMessage(var4[id][0][0], "\4[\1%s\4] \1%s \4refused duel!", PLUGIN, szOppName);
            var3 = var4;
        }
        default:
        {
            var3 = szName;
        }
    }
    menu_destroy(menu);
    return 1;
}

public client_connect(id)
{
    g_DuelKills[id] = 0;
    InDuel[id] = 0;
    return 0;
}

public client_disconnect(id)
{
    new opponent = Duel[id][0][0];
    new var6 = InDuel;
    new var1;
    new var2;
    if (var6[id][0][0] == 1)
    {
        var1 = var6;
    }
    else
    {
        new var7 = InDuel;
        if (var7[id][0][0] == 2)
        {
            var1 = var7;
        }
        var2 = var7;
        if (ERROR: Phi)
        {
            deleteArena(0);
        }
        else
        {
            new var8 = InDuel;
            new var3;
            new var4;
            if (var8[id][0][0] == 3)
            {
                var3 = var8;
            }
            else
            {
                new var9 = InDuel;
                if (var9[id][0][0] == 4)
                {
                    var3 = var9;
                }
                var4 = var9;
                if (ERROR: Phi)
                {
                    deleteArena(1);
                }
            }
            var4 = var3;
            if (ERROR: Phi)
            {
                deleteArena(1);
            }
        }
        g_DuelKills[id] = 0;
        g_DuelKills[opponent] = 0;
        InDuel[id] = 0;
        new var10 = InDuel;
        new var5;
        if (var10[opponent][0][0])
        {
            new var11 = InDuel[opponent];
            var11 = 0;
            spawn(opponent);
            var5 = var11;
        }
        else
        {
            var5 = var10;
        }
        return 0;
    }
    var2 = var1;
    if (ERROR: Phi)
    {
        deleteArena(0);
    }
    else
    {
        new var8 = InDuel;
        new var3;
        new var4;
        if (var8[id][0][0] == 3)
        {
            var3 = var8;
        }
        else
        {
            new var9 = InDuel;
            if (var9[id][0][0] == 4)
            {
                var3 = var9;
            }
            var4 = var9;
            if (ERROR: Phi)
            {
                deleteArena(1);
            }
        }
        var4 = var3;
        if (ERROR: Phi)
        {
            deleteArena(1);
        }
    }
    g_DuelKills[id] = 0;
    g_DuelKills[opponent] = 0;
    InDuel[id] = 0;
    new var10 = InDuel;
    new var5;
    if (var10[opponent][0][0])
    {
        new var11 = InDuel[opponent];
        var11 = 0;
        spawn(opponent);
        var5 = var11;
    }
    else
    {
        var5 = var10;
    }
    return 0;
}

public arenamsg()
{
    new iPlayers[32];
    new iNum = 0;
    new i = 0;
    get_players(iPlayers, iNum, "c", "");
    i = 0;
    while (i <= iNum)
    {
        new id = iPlayers[i];
        if (is_user_connected(id))
        {
            ColorMessage(id, "\4[ %s ] \1write \4/kdc \1or \4/duel \1for play\4 1vs1", PLUGIN);
        }
        i++;
    }
    return 0;
}

ColorMessage(id, String:input[])
{
    new count = 1;
    new players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
    if (id)
    {
        players[0] = id;
    }
    else
    {
        get_players(players, count, "ch", "");
    }
    new i = 0;
    while (i < count)
    {
        if (is_user_connected(players[i]))
        {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), 11092, players[i]);
            write_byte(players[i]);
            write_string("");
            message_end();
            i++;
        }
        i++;
    }
    return 0;
}

public createArenaA(id)
{
    if (g_bArenaCreate[0][0])
    {
        return 1;
    }
    new i = 0;
    while (i < 24)
    {
        createBlock(0, i, ArrayArenaA[i][0][0], BlockAnglesY, BlockSizeMinY, BlockSizeMaxY);
        i++;
    }
    new i = 24;
    while (i < 32)
    {
        createBlock(0, i, ArrayArenaA[i][0][0], BlockAnglesX, BlockSizeMinX, BlockSizeMaxX);
        i++;
    }
    new i = 32;
    while (i < 38)
    {
        createBlock(0, i, ArrayArenaA[i][0][0], BlockAnglesZ, BlockSizeMinZ, BlockSizeMaxZ);
        i++;
    }
    g_bArenaCreate[0] = 1;
    return 1;
}

public createArenaB(id)
{
    if (g_bArenaCreate[1][0])
    {
        return 1;
    }
    new i = 0;
    while (i < 24)
    {
        createBlock(1, i, ArrayArenaB[i][0][0], BlockAnglesY, BlockSizeMinY, BlockSizeMaxY);
        i++;
    }
    new i = 24;
    while (i < 32)
    {
        createBlock(1, i, ArrayArenaB[i][0][0], BlockAnglesX, BlockSizeMinX, BlockSizeMaxX);
        i++;
    }
    new i = 32;
    while (i < 38)
    {
        createBlock(1, i, ArrayArenaB[i][0][0], BlockAnglesZ, BlockSizeMinZ, BlockSizeMaxZ);
        i++;
    }
    g_bArenaCreate[1] = 1;
    return 1;
}

deleteArena(arenaID)
{
    new i = 0;
    while (i < 38)
    {
        remove_entity(ArenaEnt[arenaID][0][0][i]);
        i++;
    }
    g_bArenaCreate[arenaID] = 0;
    return 0;
}

createBlock(arenaID, blockNum, Float:vOrigin[3], Float:vAngles[3], Float:vSizeMin[3], Float:vSizeMax[3])
{
    new ent = create_entity("info_target");
    ArenaEnt[arenaID][0][0][blockNum] = ent;
    if (is_valid_ent(ent))
    {
        entity_set_int(ent, EV_INT_solid, 2);
        entity_set_int(ent, EV_INT_movetype, 0);
        entity_set_model(ent, "models/arena.mdl");
        entity_set_vector(ent, 6, vAngles);
        entity_set_size(ent, vSizeMin, vSizeMax);
        entity_set_origin(ent, vOrigin);
        if (blockNum > 11)
        {
            set_rendering(ent, 19, 0, 0, 0, 1, 0);
        }
        return ent;
    }
    return 0;
}
Saint Sinner is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 12-08-2016 , 17:19   Re: Duels decompile
Reply With Quote #2

Too much crap in it. I suppose it needs custom .inc files
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-09-2016 , 18:42   Re: Duels decompile
Reply With Quote #3

What do u mean decompiled? From amxx to sma? Last time I checked, the best "decompiler" was not that good.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-09-2016 , 19:26   Re: Duels decompile
Reply With Quote #4

There's no way the code you posted is a result of a decompile. The variable names would not be what they are in that code unless you replaced everything, which I doubt.
__________________
Bugsy is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-09-2016 , 20:50   Re: Duels decompile
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
There's no way the code you posted is a result of a decompile. The variable names would not be what they are in that code unless you replaced everything, which I doubt.
Well all variables' names are saved in debug info header in the AMXX file I believe. Those "var0" and similar ones are probably just temporary variables that the compiler created.
klippy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-09-2016 , 21:00   Re: Duels decompile
Reply With Quote #6

Quote:
Originally Posted by KliPPy View Post
Well all variables' names are saved in debug info header in the AMXX file I believe. Those "var0" and similar ones are probably just temporary variables that the compiler created.
Really? Back in the day when I wrote programs in VB3, when decompiled the code was broken down into complete garbage in terms of function names and variable names. Interesting that out of all languages, Pawn is able to be decompiled back to nearly original source.
__________________
Bugsy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-10-2016 , 03:35   Re: Duels decompile
Reply With Quote #7

I do know that all public functions will be in there by name because they can be called dynamically. There is actually quite a bit of variable info in a decompile but I don't remember seeing any program that took that assembly and reconstructed pawn code from it.
__________________
fysiks is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-10-2016 , 06:40   Re: Duels decompile
Reply With Quote #8

Well there is Lysis for SP. If Lysis exist, someone has probably made a similar thing for AMXX. This reconstructed code is far from perfect anyway.

Quote:
Originally Posted by Bugsy View Post
Really? Back in the day when I wrote programs in VB3, when decompiled the code was broken down into complete garbage in terms of function names and variable names. Interesting that out of all languages, Pawn is able to be decompiled back to nearly original source.
If you compiled it in debug mode it would have such info too probably, just like C or C++ does with DRAWF on Linux for example, so GDB can use that info. The thing is that Pawn scripts are by default compiled with debug level 2. Turning it off might yield some performance and memory usage improvements (negligible though), but it's a big trade-off for leaving out debug info and basically having no debug information at all when a run-time error occurs, like the stack trace.

https://github.com/compuphase/pawn/b...uage_Guide.pdf
Page 169, -dlevel.

It looks like it gets rid of bounds checking as well, which actually may be dangerous.

Also: https://github.com/compuphase/pawn/b...nter_Guide.pdf
Page 104.

That's how debug info looks in the .amxx file if it is present. Now I don't know if AMXX has changed anything compared to the original one, but that's pretty much it.

Last edited by klippy; 12-10-2016 at 06:46.
klippy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-10-2016 , 16:01   Re: Duels decompile
Reply With Quote #9

There is a tool that decompile code with decent accuracy, but I forgot it's name. I think I saw it in a plugin thread(Lysis for amxx or something like that).
__________________

Last edited by HamletEagle; 12-10-2016 at 16:01.
HamletEagle 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 00:34.


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