Advertisement
Shiny_

serial

Feb 1st, 2021
1,742
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.36 KB | None | 0 0
  1.     void __stdcall GetSerial(char *serial, int serialSize) // netc.dll + 0x7CCB0 (I compiled the module using the github version of date  04/08/ 2016, not sure what version is)
  2.     {
  3.       int v2; // edi@4
  4.       int v3; // ebx@4
  5.       int v4; // esi@4
  6.       int v5; // ecx@4
  7.       int v6; // ebx@6
  8.       const char *serialGenerated; // eax@8
  9.       char *v8; // [sp+Ch] [bp-1Ch]@6
  10.       size_t v9; // [sp+1Ch] [bp-Ch]@6
  11.       unsigned int v10; // [sp+20h] [bp-8h]@8
  12.      
  13.       if ( serialSize == 1 )
  14.       {
  15.         sub_10047E90(*(_DWORD *)serial, *((char **)serial + 1), *((_DWORD *)serial + 2), *((char **)serial + 3));
  16.       }
  17.       else if ( serialSize == 2 )
  18.       {
  19.         v2 = *((_DWORD *)serial + 2);
  20.         v3 = *(_DWORD *)serial;
  21.         v4 = *((_WORD *)serial + 2);
  22.         v5 = *(_DWORD *)(sub_10047730() + 136);
  23.         if ( v5 )
  24.         {
  25.           *(_BYTE *)(v5 + 1) = 1;
  26.           sub_10046340(v4, v3, v2);
  27.         }
  28.       }
  29.       else
  30.       {
  31.         GenerateSerial((char *)&v8);    // netc.dll + 0x95F60
  32.         v6 = v9;
  33.         if ( v9 >= serialSize )
  34.           v6 = serialSize - 1;
  35.         serialGenerated = (const char *)&v8;
  36.         if ( v10 >= 0x10 )
  37.           serialGenerated = v8;
  38.         strncpy(serial, serialGenerated, v6);
  39.         serial[v6] = 0;
  40.         if ( v10 >= 0x10 )
  41.           operator delete(v8);
  42.       }
  43.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement