Advertisement
Rootware

Decompile

Sep 22nd, 2019
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 25.48 KB | None | 0 0
  1. char __usercall sub_486D38@<al>(__int64 a1@<rcx>, const wchar_t *a2@<rdx>, const wchar_t *a3@<r8>, double a4@<xmm0>, __m128i *a5@<xmm6>, __m128i *a6@<xmm7>, __m128i *a7@<xmm8>)
  2. {
  3.   const wchar_t *v7; // rbp
  4.   const wchar_t *v8; // rdi
  5.   __int64 v9; // r14
  6.   __int64 v10; // r13
  7.   __int64 v11; // r9
  8.   __int64 v12; // r8
  9.   __int64 v13; // rax
  10.   __int64 v14; // rbx
  11.   int v15; // er15
  12.   char result; // al
  13.   signed int v17; // esi
  14.   signed int v18; // er12
  15.   signed __int64 v19; // rbp
  16.   __int64 v20; // rax
  17.   __int64 v21; // rdi
  18.   struct CObject *v22; // rsi
  19.   __int64 v23; // rax
  20.   int v24; // edi
  21.   int v25; // ebx
  22.   unsigned int v26; // eax
  23.   __int64 v27; // rax
  24.   __int64 v28; // rax
  25.   __int64 v29; // [rsp+88h] [rbp-170h]
  26.   __int64 v30; // [rsp+90h] [rbp-168h]
  27.   __int64 v31; // [rsp+98h] [rbp-160h]
  28.   __int64 v32; // [rsp+A0h] [rbp-158h]
  29.   __int64 v33; // [rsp+A8h] [rbp-150h]
  30.   __int64 v34; // [rsp+B0h] [rbp-148h]
  31.   double v35; // [rsp+C8h] [rbp-130h]
  32.   double v36; // [rsp+D0h] [rbp-128h]
  33.   double v37; // [rsp+D8h] [rbp-120h]
  34.   struct _SYSTEMTIME SystemTime; // [rsp+E0h] [rbp-118h]
  35.   __int64 v39; // [rsp+F0h] [rbp-108h]
  36.   wchar_t v40; // [rsp+F8h] [rbp-100h]
  37.   wchar_t v41; // [rsp+118h] [rbp-E0h]
  38.   wchar_t v42; // [rsp+138h] [rbp-C0h]
  39.   char Dst; // [rsp+170h] [rbp-88h]
  40.   int v44; // [rsp+200h] [rbp+8h]
  41.   unsigned int v45; // [rsp+218h] [rbp+20h]
  42.  
  43.   v39 = -2i64;
  44.   v7 = a3;
  45.   v8 = a2;
  46.   v9 = a1;
  47.   v10 = *(_QWORD *)(__readgsqword(0x58u) + 8i64 * (unsigned int)TlsIndex);
  48.   v11 = *(signed int *)(v10 + 32024);
  49.   v12 = GuardData1[v11 + 0x100000];
  50.   GuardData1[v11 + 0x100000] = v12 + 1;
  51.   GuardData2[v12 + 1000 * v11] = (__int64)&off_A89930;
  52.   v13 = (*(__int64 (**)(void))(*(_QWORD *)a1 + 160i64))();
  53.   v14 = v13;
  54.   v15 = 0;
  55.   if ( !v13 )
  56.   {
  57.     --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  58.     return 1;
  59.   }
  60.   CYieldLock::Enter(*(struct CYieldLock **)(v13 + 2720), L".\\BuilderCmdHandler.cpp", 625);
  61.   v17 = *(_DWORD *)(*(_QWORD *)(v14 + 2704) + 2248i64);
  62.   CYieldLock::Leave(*(struct CYieldLock **)(v14 + 2720), 0i64, 0);
  63.   if ( v17 && v17 <= 2 )
  64.   {
  65.     if ( wcsicmp(v8, L"level") )
  66.     {
  67.       if ( wcsicmp(v8, L"str") )
  68.       {
  69.         if ( wcsicmp(v8, L"dex") )
  70.         {
  71.           if ( wcsicmp(v8, L"con") )
  72.           {
  73.             if ( wcsicmp(v8, L"int") )
  74.             {
  75.               if ( wcsicmp(v8, L"men") )
  76.               {
  77.                 if ( wcsicmp(v8, L"wit") )
  78.                 {
  79.                   if ( wcsicmp(v8, L"undying") )
  80.                   {
  81.                     if ( wcsicmp(v8, L"exp") )
  82.                     {
  83.                       if ( wcsicmp(v8, L"sp") )
  84.                       {
  85.                         if ( wcsicmp(v8, L"org_hp") )
  86.                         {
  87.                           if ( wcsicmp(v8, L"org_mp") )
  88.                           {
  89.                             if ( wcsicmp(v8, L"org_hp_regen") )
  90.                             {
  91.                               if ( wcsicmp(v8, L"org_speed") )
  92.                               {
  93.                                 if ( wcsicmp(v8, L"noise") )
  94.                                 {
  95.                                   if ( wcsicmp(v8, L"base_physical_attack") )
  96.                                   {
  97.                                     if ( wcsicmp(v8, L"base_attack_speed") )
  98.                                     {
  99.                                       if ( wcsicmp(v8, L"base_critical") )
  100.                                       {
  101.                                         if ( wcsicmp(v8, L"magic_attack") )
  102.                                         {
  103.                                           if ( wcsicmp(v8, L"magic_defend") )
  104.                                           {
  105.                                             if ( wcsicmp(v8, L"pk_counter") )
  106.                                             {
  107.                                               if ( wcsicmp(v8, L"social") )
  108.                                               {
  109.                                                 if ( wcsicmp(v8, &off_A89798) )
  110.                                                 {
  111.                                                   if ( wcsicmp(v8, &off_A89790) )
  112.                                                   {
  113.                                                     if ( wcsicmp(v8, &off_A89788) )
  114.                                                     {
  115.                                                       if ( wcsicmp(v8, &off_A89778) )
  116.                                                       {
  117.                                                         if ( wcsicmp(v8, &off_A89768) )
  118.                                                         {
  119.                                                           if ( wcsicmp(v8, &off_A8975C) )
  120.                                                           {
  121.                                                             v18 = 0;
  122.                                                             if ( !wcsicmp(v8, &off_A89748) )
  123.                                                               v18 = 32;
  124.                                                           }
  125.                                                           else
  126.                                                           {
  127.                                                             v18 = 31;
  128.                                                           }
  129.                                                         }
  130.                                                         else
  131.                                                         {
  132.                                                           v18 = 30;
  133.                                                         }
  134.                                                       }
  135.                                                       else
  136.                                                       {
  137.                                                         v18 = 29;
  138.                                                       }
  139.                                                     }
  140.                                                     else
  141.                                                     {
  142.                                                       v18 = 28;
  143.                                                     }
  144.                                                   }
  145.                                                   else
  146.                                                   {
  147.                                                     v18 = 27;
  148.                                                   }
  149.                                                 }
  150.                                                 else
  151.                                                 {
  152.                                                   v18 = 26;
  153.                                                 }
  154.                                               }
  155.                                               else
  156.                                               {
  157.                                                 v18 = 25;
  158.                                               }
  159.                                             }
  160.                                             else
  161.                                             {
  162.                                               v18 = 19;
  163.                                             }
  164.                                           }
  165.                                           else
  166.                                           {
  167.                                             v18 = 18;
  168.                                           }
  169.                                         }
  170.                                         else
  171.                                         {
  172.                                           v18 = 17;
  173.                                         }
  174.                                       }
  175.                                       else
  176.                                       {
  177.                                         v18 = 16;
  178.                                       }
  179.                                     }
  180.                                     else
  181.                                     {
  182.                                       v18 = 15;
  183.                                     }
  184.                                   }
  185.                                   else
  186.                                   {
  187.                                     v18 = 14;
  188.                                   }
  189.                                 }
  190.                                 else
  191.                                 {
  192.                                   v18 = 13;
  193.                                 }
  194.                               }
  195.                               else
  196.                               {
  197.                                 v18 = 12;
  198.                               }
  199.                             }
  200.                             else
  201.                             {
  202.                               v18 = 11;
  203.                             }
  204.                           }
  205.                           else
  206.                           {
  207.                             v18 = 10;
  208.                           }
  209.                         }
  210.                         else
  211.                         {
  212.                           v18 = 9;
  213.                         }
  214.                       }
  215.                       else
  216.                       {
  217.                         v18 = 24;
  218.                       }
  219.                     }
  220.                     else
  221.                     {
  222.                       v18 = 7;
  223.                     }
  224.                   }
  225.                   else
  226.                   {
  227.                     v18 = 8;
  228.                   }
  229.                 }
  230.                 else
  231.                 {
  232.                   v18 = 6;
  233.                 }
  234.               }
  235.               else
  236.               {
  237.                 v18 = 5;
  238.               }
  239.             }
  240.             else
  241.             {
  242.               v18 = 4;
  243.             }
  244.           }
  245.           else
  246.           {
  247.             v18 = 3;
  248.           }
  249.         }
  250.         else
  251.         {
  252.           v18 = 2;
  253.         }
  254.       }
  255.       else
  256.       {
  257.         v18 = 1;
  258.       }
  259.     }
  260.     else
  261.     {
  262.       v18 = 0;
  263.     }
  264.     v19 = wtoi64(v7);
  265.     v20 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 160i64))(v9);
  266.     v21 = v20;
  267.     if ( !v20 )
  268.     {
  269.       --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  270.       return 1;
  271.     }
  272.     CYieldLock::Enter(*(struct CYieldLock **)(v20 + 2720), L".\\BuilderCmdHandler.cpp", 665);
  273.     memset(&Dst, 0, 0x32ui64);
  274.     memset(&v41, 0, 0x1Eui64);
  275.     LODWORD(v30) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 1120i64))(v21);
  276.     v45 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 2752i64))(v21);
  277.     wcscpy_s((wchar_t *)&Dst, 0x19ui64, (const wchar_t *)(*(_QWORD *)(v21 + 2704) + 164i64));
  278.     wcscpy_s(&v41, 0xFui64, (const wchar_t *)(v21 + 13800));
  279.     (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v21 + 216i64))(v21, &v35);
  280.     CYieldLock::Leave(*(struct CYieldLock **)(v21 + 2720), 0i64, 0);
  281.     v22 = sub_86E4E4((int *)(v21 + 5216));
  282.     if ( !v22 )
  283.     {
  284.       sub_88BAC0(v21, (__int64)L"SYS", (const wchar_t *)&off_A88820);
  285.       --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  286.       return 0;
  287.     }
  288.     memset(&v31, 0, 0x30ui64);
  289.     v44 = 0;
  290.     memset(&v42, 0, 0x32ui64);
  291.     memset(&v40, 0, 0x1Eui64);
  292.     if ( ((unsigned __int8 (__fastcall *)(struct CObject *))v22->vtable->IsUser)(v22) )
  293.     {
  294.       v15 = ((__int64 (__fastcall *)(struct CObject *))v22->vtable->field_3C8[19])(v22);
  295.       v44 = ((__int64 (__fastcall *)(struct CObject *))v22->vtable->field_828[83])(v22);
  296.       wcscpy_s(&v42, 0x19ui64, (const wchar_t *)(v22[42].field_10 + 164));
  297.       wcscpy_s(&v40, 0xFui64, (const wchar_t *)&v22[215].field_28);
  298.     }
  299.     if ( v18 > 15 )
  300.     {
  301.       if ( v18 > 26 )
  302.       {
  303.         switch ( v18 )
  304.         {
  305.           case 27:
  306.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 962);
  307.             *(double *)(v22[42].field_10 + 472) = (double)(signed int)v19;
  308.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  309.             break;
  310.           case 28:
  311.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 970);
  312.             sub_478AB0(
  313.               v22[42].field_10,
  314.               COERCE__M128I__((double)(signed int)v19),
  315.               (__int128 *)a5->m128i_i64,
  316.               (__int128 *)a6->m128i_i64);
  317.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  318.             break;
  319.           case 29:
  320.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 978);
  321.             v22[77].SID = v19;
  322.             if ( !v22[77].objectType )
  323.               v22[77].objectType = GetTickCount();
  324.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  325.             if ( ((unsigned __int8 (__fastcall *)(struct CObject *))v22->vtable->IsUser)(v22) )
  326.             {
  327.               v27 = ((__int64 (__fastcall *)(struct CObject *))v22->vtable->CastUser)(v22);
  328.               (*(void (__fastcall **)(__int64))(*(_QWORD *)v27 + 2912i64))(v27);
  329.             }
  330.             break;
  331.           case 30:
  332.             ((void (__fastcall *)(struct CObject *, _QWORD, _QWORD))v22->vtable->field_828[66])(
  333.               v22,
  334.               (unsigned int)v19,
  335.               (unsigned int)v22->SID);
  336.             break;
  337.           case 31:
  338.             if ( ((unsigned __int8 (__fastcall *)(struct CObject *))v22->vtable->IsUser)(v22) )
  339.             {
  340.               sub_891C48((__int64)v22, 6);
  341.               JUMPOUT(unk_487FCE);
  342.             }
  343.             break;
  344.           default:
  345.             if ( v18 == 32 && ((unsigned __int8 (__fastcall *)(struct CObject *))v22->vtable->IsUser)(v22) )
  346.               sub_891F90((__int64)v22, 5, v19);
  347.             break;
  348.         }
  349.       }
  350.       else
  351.       {
  352.         switch ( v18 )
  353.         {
  354.           case 26:
  355.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 954);
  356.             sub_4788C8(
  357.               v22[42].field_10,
  358.               COERCE__M128I__((double)(signed int)v19),
  359.               (__int128 *)a5->m128i_i64,
  360.               (__int128 *)a6->m128i_i64);
  361.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  362.             break;
  363.           case 16:
  364.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 891);
  365.             *(_DWORD *)(v22[42].field_10 + 1900) = v19;
  366.             ((void (__fastcall *)(struct CObject *))v22->vtable->field_3C8[81])(v22);
  367.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  368.             wcscpy_s((wchar_t *)&v31, 0x18ui64, L"base_critical");
  369.             break;
  370.           case 17:
  371.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 901);
  372.             *(double *)(v22[42].field_10 + 2184) = (double)(signed int)v19;
  373.             ((void (__fastcall *)(struct CObject *))v22->vtable->field_3C8[71])(v22);
  374.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  375.             wcscpy_s((wchar_t *)&v31, 0x18ui64, L"magic_attack");
  376.             break;
  377.           case 18:
  378.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 911);
  379.             *(double *)(v22[42].field_10 + 2192) = (double)(signed int)v19;
  380.             ((void (__fastcall *)(struct CObject *))v22->vtable->field_3C8[74])(v22);
  381.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  382.             wcscpy_s((wchar_t *)&v31, 0x18ui64, L"magic_defend");
  383.             break;
  384.           case 19:
  385.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 921);
  386.             *(_DWORD *)(v22[42].field_10 + 520) = v19;
  387.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  388.             wcscpy_s((wchar_t *)&v31, 0x18ui64, L"pk_counter");
  389.             break;
  390.           case 24:
  391.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 810);
  392.             sub_52C36C((__int64)v22, v19);
  393.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  394.             wcscpy_s((wchar_t *)&v31, 0x18ui64, L"sp");
  395.             break;
  396.           case 25:
  397.             if ( v19 <= 255 )
  398.             {
  399.               if ( v19 < 0 )
  400.                 v19 = 0i64;
  401.             }
  402.             else
  403.             {
  404.               v19 = 255i64;
  405.             }
  406.             CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 940);
  407.             *(_DWORD *)(v22[42].field_10 + 536) = v19;
  408.             CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  409.             GetLocalTime(&SystemTime);
  410.             v24 = *(signed __int16 *)(v22[42].field_10 + 534);
  411.             v25 = sub_88EC4C((__int64)v22);
  412.             v26 = ((__int64 (__fastcall *)(struct CObject *))v22->vtable->field_3C8[19])(v22);
  413.             sub_58CB90((__int64)&CDB::instance, v26, v25, v24, (__int64)&SystemTime);
  414.             wcscpy_s((wchar_t *)&v31, 0x18ui64, L"social");
  415.             break;
  416.         }
  417.       }
  418.     }
  419.     else if ( v18 == 15 )
  420.     {
  421.       CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 881);
  422.       *(_DWORD *)(v22[42].field_10 + 1896) = v19;
  423.       ((void (__fastcall *)(struct CObject *))v22->vtable->field_3C8[96])(v22);
  424.       CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  425.       wcscpy_s((wchar_t *)&v31, 0x18ui64, L"base_attack_speed");
  426.     }
  427.     else if ( v18 > 7 )
  428.     {
  429.       switch ( v18 )
  430.       {
  431.         case 8:
  432.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 819);
  433.           *(_BYTE *)(v22[42].field_10 + 214) = v19 != 0;
  434.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  435.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"undying");
  436.           break;
  437.         case 9:
  438.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 828);
  439.           *(double *)(v22[42].field_10 + 1984) = (double)(signed int)v19;
  440.           ((void (__fastcall *)(struct CObject *))v22->vtable->field_3C8[67])(v22);
  441.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  442.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"org_hp");
  443.           break;
  444.         case 10:
  445.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 838);
  446.           *(double *)(v22[42].field_10 + 1992) = (double)(signed int)v19;
  447.           sub_52CC30((__int64)v22, a4, (__int128 *)a5->m128i_i64);
  448.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  449.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"org_mp");
  450.           break;
  451.         case 11:
  452.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 848);
  453.           *(double *)(v22[42].field_10 + 2032) = (double)(signed int)v19;
  454.           sub_52CF98((double *)v22, a4, (__int128 *)a5->m128i_i64);
  455.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  456.           break;
  457.         case 12:
  458.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 856);
  459.           *(double *)(v22[42].field_10 + 2080) = (double)(signed int)v19;
  460.           ((void (__fastcall *)(struct CObject *))v22->vtable->field_3C8[94])(v22);
  461.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  462.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"org_speed");
  463.           break;
  464.         case 14:
  465.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 871);
  466.           *(_DWORD *)(v22[42].field_10 + 1888) = v19;
  467.           ((void (__fastcall *)(struct CObject *))v22->vtable->field_3C8[70])(v22);
  468.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  469.           wcscpy_s((wchar_t *)&v31, 0x18ui64, &off_A89698);
  470.           break;
  471.       }
  472.     }
  473.     else if ( v18 == 7 )
  474.     {
  475.       CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 801);
  476.       ((void (__fastcall *)(struct CObject *, signed __int64))v22->vtable->field_3C8[52])(v22, v19);
  477.       CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  478.       wcscpy_s((wchar_t *)&v31, 0x18ui64, L"exp");
  479.     }
  480.     else if ( v18 )
  481.     {
  482.       switch ( v18 )
  483.       {
  484.         case 1:
  485.           if ( v19 < 0 && v19 > 99 )
  486.           {
  487.             sub_9244F0(v9, (__int64)L"SYS", (const wchar_t *)&off_A896B8);
  488.             --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  489.             return 0;
  490.           }
  491.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 722);
  492.           *(_DWORD *)(v22[42].field_10 + 432) = v19;
  493.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  494.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"str");
  495.           break;
  496.         case 2:
  497.           if ( v19 < 0 && v19 > 99 )
  498.           {
  499.             sub_9244F0(v9, (__int64)L"SYS", (const wchar_t *)&off_A896D0);
  500.             --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  501.             return 0;
  502.           }
  503.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 736);
  504.           *(_DWORD *)(v22[42].field_10 + 444) = v19;
  505.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  506.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"dex");
  507.           break;
  508.         case 3:
  509.           if ( v19 < 0 && v19 > 99 )
  510.           {
  511.             sub_9244F0(v9, (__int64)L"SYS", (const wchar_t *)&off_A896E8);
  512.             --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  513.             return 0;
  514.           }
  515.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 750);
  516.           *(_DWORD *)(v22[42].field_10 + 436) = v19;
  517.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  518.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"con");
  519.           break;
  520.         case 4:
  521.           if ( v19 < 0 && v19 > 99 )
  522.           {
  523.             sub_9244F0(v9, (__int64)L"SYS", (const wchar_t *)&off_A89700);
  524.             --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  525.             return 0;
  526.           }
  527.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 764);
  528.           *(_DWORD *)(v22[42].field_10 + 428) = v19;
  529.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  530.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"int");
  531.           break;
  532.         case 5:
  533.           if ( v19 < 0 && v19 > 99 )
  534.           {
  535.             sub_9244F0(v9, (__int64)L"SYS", (const wchar_t *)&off_A89718);
  536.             --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  537.             return 0;
  538.           }
  539.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 778);
  540.           *(_DWORD *)(v22[42].field_10 + 440) = v19;
  541.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  542.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"men");
  543.           break;
  544.         case 6:
  545.           if ( v19 < 0 && v19 > 99 )
  546.           {
  547.             sub_9244F0(v9, (__int64)L"SYS", (const wchar_t *)&off_A89730);
  548.             --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  549.             return 0;
  550.           }
  551.           CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 792);
  552.           *(_DWORD *)(v22[42].field_10 + 448) = v19;
  553.           CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  554.           wcscpy_s((wchar_t *)&v31, 0x18ui64, L"wit");
  555.           break;
  556.       }
  557.     }
  558.     else if ( (unsigned __int64)(v19 - 1) <= 84 )
  559.     {
  560.       if ( ((unsigned __int8 (__fastcall *)(struct CObject *))v22->vtable->field_150[1])(v22) )
  561.       {
  562.         CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 701);
  563.         v23 = ((__int64 (__fastcall *)(struct CObject *))v22->vtable->field_150[17])(v22);
  564.         sub_7AFA40(v23);
  565.       }
  566.       else
  567.       {
  568.         CYieldLock::Enter((struct CYieldLock *)v22[42].field_20, L".\\BuilderCmdHandler.cpp", 706);
  569.         ((void (__fastcall *)(struct CObject *, __int64))v22->vtable->field_3C8[52])(v22, g_expPenalty[v19]); // qword_A7C388
  570.       }
  571.       CYieldLock::Leave((struct CYieldLock *)v22[42].field_20, 0i64, 0);
  572.       wcscpy_s((wchar_t *)&v31, 0x18ui64, L"level");
  573.     }
  574.     sub_485DB0(
  575.       &CLog::instance,
  576.       6,
  577.       (char *)&off_A895F0,
  578.       504,
  579.       v30,
  580.       v45,
  581.       v15,
  582.       v44,
  583.       (signed int)v35,
  584.       (signed int)v36,
  585.       (signed int)v37,
  586.       (__int64)&v31,
  587.       v19,
  588.       (__int64)&Dst,
  589.       (__int64)&v41,
  590.       (__int64)&v42,
  591.       (__int64)&v40,
  592.       v29,
  593.       v30,
  594.       v31,
  595.       v32,
  596.       v33,
  597.       v34);
  598.     if ( ((unsigned __int8 (__fastcall *)(struct CObject *))v22->vtable->IsUser)(v22) )
  599.     {
  600.       CCreature::ValidateParameters((CCreature *)v22);
  601.       ((void (__fastcall *)(struct CObject *, _QWORD))v22->vtable->field_B30[1])(v22, 0i64);
  602.       ((void (__fastcall *)(struct CObject *, _QWORD, _QWORD))v22->vtable->field_B30[2])(v22, 0i64, 0i64);
  603.       if ( !v18 )
  604.       {
  605.         v28 = ((__int64 (__fastcall *)(struct CObject *))v22->vtable->CastUser)(v22);
  606.         sub_907EF0(0i64, v28, (__int128 *)a5->m128i_i64, (__int128 *)a6->m128i_i64, (__int128 *)a7->m128i_i64);
  607.       }
  608.     }
  609.     --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  610.     result = 0;
  611.   }
  612.   else
  613.   {
  614.     --GuardData1[*(signed int *)(v10 + 32024) + 0x100000];
  615.     result = 0;
  616.   }
  617.   return result;
  618. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement