Guest User

Untitled

a guest
Feb 12th, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.12 KB | None | 0 0
  1. void sub_1000379B()
  2. {
  3.   SFSAMP *SAMP; // eax
  4.   const char *v1; // edi
  5.   struct SFSAMP *v2; // eax
  6.   struct SFSAMP *v3; // eax
  7.   struct SFRender *Render; // eax
  8.   struct SFRakNet *RakNet; // eax
  9.   SFGame *v6; // eax
  10.   SFSAMP *v7; // eax
  11.   SFSAMP *v8; // eax
  12.   stMiscInfo *v9; // eax
  13.   SFGame *v10; // eax
  14.   SFGame *v11; // eax
  15.   int j; // edi
  16.   SFSAMP *v13; // eax
  17.   struct stSAMP *v14; // eax
  18.   SFSAMP *v15; // eax
  19.   SFSAMP *v16; // eax
  20.   stMiscInfo *Misc; // eax
  21.   SFGame *Game; // eax
  22.   int i; // edi
  23.   SFSAMP *v20; // eax
  24.   struct stSAMP *Info; // eax
  25.   SFSAMP *v22; // eax
  26.   struct stSAMP *v23; // eax
  27.   struct stTextdraw *Textdraw; // eax
  28.   const char *v25; // eax
  29.   bool v26; // cf
  30.   SFSAMP *v27; // eax
  31.   stMiscInfo *v28; // eax
  32.   SFSAMP *v29; // eax
  33.   stMiscInfo *v30; // eax
  34.   _DWORD v31[5]; // [esp-10h] [ebp-68h] BYREF
  35.   int v32; // [esp+4h] [ebp-54h] BYREF
  36.   int v33; // [esp+8h] [ebp-50h] BYREF
  37.   int v34; // [esp+Ch] [ebp-4Ch]
  38.   int v35; // [esp+10h] [ebp-48h]
  39.   int v36; // [esp+14h] [ebp-44h]
  40.   int v37; // [esp+18h] [ebp-40h]
  41.   int v38; // [esp+1Ch] [ebp-3Ch]
  42.   unsigned __int16 v39; // [esp+20h] [ebp-38h]
  43.   char v40[24]; // [esp+2Ch] [ebp-2Ch] BYREF
  44.   int *v41; // [esp+44h] [ebp-14h]
  45.   int *v42; // [esp+48h] [ebp-10h]
  46.   int v43; // [esp+54h] [ebp-4h]
  47.  
  48.   if ( !byte_10020884 )
  49.   {
  50.     if ( !GAME )
  51.       return;
  52.     if ( (*(int (__thiscall **)(struct CGame *))(*(_DWORD *)GAME + 208))(GAME) != 9 )
  53.       return;
  54.     SAMP = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  55.     if ( !SFSAMP::IsInitialized(SAMP) )
  56.       return;
  57.     v1 = (const char *)&dword_10020010;
  58.     sub_1000367E(&v33, &dword_10020010, ".sf");
  59.     if ( !(unsigned __int8)SAMPFUNCS::isPluginLoaded(dword_10020880, v33, v34, v35, v36, v37, v38) )
  60.       return;
  61.     if ( (unsigned int)dword_10020024 >= 0x10 )
  62.       v1 = (const char *)dword_10020010;
  63.     SAMPFUNCS::Log(
  64.       (SAMPFUNCS *)dword_10020880,
  65.       "{109C00}[loaded] {FFFFFF}- {D5B200}%s {FFFFFF}| Version: {CD0000}%.1f {FFFFFF}[by Artyom Ivanov]",
  66.       v1,
  67.       *(double *)&qword_10020008);
  68.     v38 = (int)sub_100019D7;
  69.     v42 = &v32;
  70.     sub_10001138("htd");
  71.     v43 = 0;
  72.     v2 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  73.     v43 = -1;
  74.     SFSAMP::registerChatCommand(v2);
  75.     v42 = &v33;
  76.     sub_10001138("/htd cmd - Информация о параметрах команды");
  77.     v43 = 1;
  78.     v41 = v31;
  79.     sub_10001138("htd");
  80.     LOBYTE(v43) = 2;
  81.     v3 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  82.     v43 = -1;
  83.     SFSAMP::setChatCommandDescription(v3);
  84.     v38 = (int)sub_10001D9F;
  85.     sub_10001138("htd");
  86.     SAMPFUNCS::registerConsoleCommand(dword_10020880, v32, v33, v34, v35, v36, v37, v38);
  87.     v41 = &v33;
  88.     sub_10001138("/htd cmd console - Информация о параметрах команды");
  89.     v43 = 3;
  90.     sub_10001138("htd");
  91.     v43 = -1;
  92.     SAMPFUNCS::setConsoleCommandDescription(
  93.       dword_10020880,
  94.       v31[0],
  95.       v31[1],
  96.       v31[2],
  97.       v31[3],
  98.       v31[4],
  99.       v32,
  100.       v33,
  101.       v34,
  102.       v35,
  103.       v36,
  104.       v37,
  105.       v38);
  106.     v38 = (int)sub_10003C9B;
  107.     v37 = 17;
  108.     Render = SAMPFUNCS::getRender((SAMPFUNCS *)dword_10020880);
  109.     SFRender::registerD3DCallback(Render);
  110.     v38 = (int)sub_100032C3;
  111.     v37 = 2;
  112.     RakNet = SAMPFUNCS::getRakNet((SAMPFUNCS *)dword_10020880);
  113.     SFRakNet::registerRakNetCallback(RakNet);
  114.     byte_10020884 = 1;
  115.   }
  116.   if ( byte_10020873 && GetTickCount() - dword_10020878 > dword_10020000 )
  117.   {
  118.     byte_10020873 = 0;
  119.     sub_10002DA1(dword_1002087C);
  120.   }
  121.   if ( !byte_10020870 || (v6 = SAMPFUNCS::getGame((SAMPFUNCS *)dword_10020880), SFGame::isGTAMenuActive(v6)) )
  122.   {
  123.     if ( byte_10020875 )
  124.     {
  125.       v15 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  126.       if ( !*(_DWORD *)((char *)SFSAMP::getMisc(v15) + 85) && byte_10020871 )
  127.       {
  128.         v38 = 1;
  129.         v16 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  130.         Misc = SFSAMP::getMisc(v16);
  131.         stMiscInfo::ToggleCursor(Misc, v39);
  132.       }
  133.       v38 = 1;
  134.       Game = SAMPFUNCS::getGame((SAMPFUNCS *)dword_10020880);
  135.       if ( SFGame::isKeyPressed(Game, v39) )
  136.       {
  137.         for ( i = 0; i < 0x8000; ++i )
  138.         {
  139.           v38 = (unsigned __int16)i;
  140.           v42 = (int *)(unsigned __int16)i;
  141.           v20 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  142.           Info = SFSAMP::getInfo(v20);
  143.           if ( stTextdrawPool::IsExists(*(stTextdrawPool **)(*(_DWORD *)((char *)Info + 973) + 16), v39)
  144.             && (unsigned __int8)sub_10002614(i, 1) )
  145.           {
  146.             v38 = (int)v42;
  147.             v22 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  148.             v23 = SFSAMP::getInfo(v22);
  149.             Textdraw = stTextdrawPool::GetTextdraw(*(stTextdrawPool **)(*(_DWORD *)((char *)v23 + 973) + 16), v39);
  150.             sub_10001138(Textdraw);
  151.             v25 = (const char *)sub_10002042(v40, v33, v34, v35, v36, v37, v38);
  152.             v26 = *((_DWORD *)v25 + 5) < 0x10u;
  153.             v43 = 4;
  154.             if ( !v26 )
  155.               v25 = *(const char **)v25;
  156.             SAMPFUNCS::Log((SAMPFUNCS *)dword_10020880, "{C4C4C4}[{C7BA08}HideTextDraws{C4C4C4}]: %s", v25);
  157.             v43 = -1;
  158.             sub_100016E3(v40, 1, 0);
  159.           }
  160.         }
  161.         sub_10002175(2);
  162.         v38 = 0;
  163.         byte_10020875 = 0;
  164.         byte_10020871 = 0;
  165.         v27 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  166.         v28 = SFSAMP::getMisc(v27);
  167.         stMiscInfo::ToggleCursor(v28, v39);
  168.       }
  169.     }
  170.     else
  171.     {
  172.       if ( byte_10020871 )
  173.       {
  174.         v38 = 0;
  175.         byte_10020871 = 0;
  176.         v29 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  177.         v30 = SFSAMP::getMisc(v29);
  178.         stMiscInfo::ToggleCursor(v30, v39);
  179.       }
  180.       if ( byte_10020872 )
  181.       {
  182.         byte_10020870 = 0;
  183.         byte_10020872 = 0;
  184.       }
  185.     }
  186.   }
  187.   else
  188.   {
  189.     v7 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  190.     if ( !*(_DWORD *)((char *)SFSAMP::getMisc(v7) + 85) )
  191.     {
  192.       v38 = 1;
  193.       byte_10020871 = 1;
  194.       v8 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  195.       v9 = SFSAMP::getMisc(v8);
  196.       stMiscInfo::ToggleCursor(v9, v39);
  197.     }
  198.     v38 = 1;
  199.     v10 = SAMPFUNCS::getGame((SAMPFUNCS *)dword_10020880);
  200.     if ( SFGame::isKeyPressed(v10, v39) )
  201.     {
  202.       sub_1000305C(dword_1002087C);
  203.       byte_10020872 = 1;
  204.     }
  205.     v38 = 1;
  206.     v11 = SAMPFUNCS::getGame((SAMPFUNCS *)dword_10020880);
  207.     if ( SFGame::isKeyDown(v11, v39) )
  208.     {
  209.       sub_10003170(dword_1002087C);
  210.     }
  211.     else if ( byte_10020872 )
  212.     {
  213.       byte_10020870 = 0;
  214.       byte_10020872 = 0;
  215.       if ( (unsigned __int8)sub_10002325(1) )
  216.       {
  217.         for ( j = 0; j < 0x8000; ++j )
  218.         {
  219.           v38 = j;
  220.           v13 = SAMPFUNCS::getSAMP((SAMPFUNCS *)dword_10020880);
  221.           v14 = SFSAMP::getInfo(v13);
  222.           if ( stTextdrawPool::IsExists(*(stTextdrawPool **)(*(_DWORD *)((char *)v14 + 973) + 16), v39) )
  223.           {
  224.             if ( (unsigned __int8)sub_10002614(j, 0) )
  225.               sub_1000233D(j);
  226.           }
  227.         }
  228.         sub_10002175(2);
  229.       }
  230.     }
  231.   }
  232. }
Add Comment
Please, Sign In to add comment