Advertisement
Riremito

hwid

May 4th, 2022
1,118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.74 KB | None | 0 0
  1. void GetHWID(byte *hwidBuffer)
  2.  
  3. {
  4.   short sVar1;
  5.   char cVar2;
  6.   int iVar3;
  7.   ulonglong NetworkAdapter;
  8.   short *psVar5;
  9.   ushort uVar6;
  10.   undefined auStack1656 [32];
  11.   undefined *puStack1624;
  12.   undefined *puStack1616;
  13.   undefined *puStack1608;
  14.   undefined4 uStack1600;
  15.   int garbage;
  16.   uint HDDSerialBuffer;
  17.   undefined auStack1584 [4];
  18.   undefined auStack1580 [4];
  19.   undefined auStack1576 [6];
  20.   undefined2 uStack1570;
  21.   undefined uStack1568;
  22.   uint uStack1567;
  23.   undefined uStack1563;
  24.   undefined uStack1562;
  25.   undefined uStack1561;
  26.   undefined cWindowsDir [3];
  27.   undefined uStack1557;
  28.   undefined auStack1048 [512];
  29.   undefined auStack536 [512];
  30.   ulonglong uStack24;
  31.   ulonglong uVar4;
  32.   uint HDDSerial;
  33.  
  34.   uStack24 = _DAT_18000f000 ^ (ulonglong)auStack1656;
  35.   uVar4 = 0;
  36.   auStack1576[0] = 0;
  37.   auStack1576._1_5_ = 0;
  38.   uStack1570 = 0;
  39.   uStack1568 = 0;
  40.   uStack1567 = 0;
  41.   uStack1563 = 0;
  42.   uStack1562 = 0;
  43.   uStack1561 = 0;
  44.   garbage = 0;
  45.   iVar3 = GetAdaptersInfo(0,&garbage);
  46.   NetworkAdapter = uVar4;
  47.   if ((iVar3 == 0x6f) && (garbage != 0)) {
  48.     NetworkAdapter = func_0x000180005d88(garbage);
  49.     iVar3 = GetAdaptersInfo(NetworkAdapter,&garbage);
  50.     if (iVar3 != 0) {
  51.       func_0x000180005d48(NetworkAdapter);
  52.       NetworkAdapter = 0;
  53.     }
  54.   }
  55.   cVar2 = func_0x000180001020(NetworkAdapter,6,auStack1576);
  56.   if (cVar2 == '\0') {
  57.     func_0x000180001020(NetworkAdapter,0x47,auStack1576);
  58.   }
  59.   if (NetworkAdapter != 0) {
  60.     func_0x000180005d48(NetworkAdapter);
  61.   }
  62.   GetWindowsDirectoryA(cWindowsDir,0x200);
  63.   uStack1600 = 0x200;
  64.   puStack1608 = auStack1048;
  65.   puStack1616 = auStack1580;
  66.   puStack1624 = auStack1584;
  67.   uStack1557 = 0;
  68.   iVar3 = GetVolumeInformationA(cWindowsDir,auStack536,0x200,&HDDSerialBuffer);
  69.   HDDSerial = CONCAT13((undefined)uStack1567,CONCAT12(uStack1568,uStack1570));
  70.   if (iVar3 == 1) {
  71.     HDDSerial = HDDSerialBuffer;
  72.   }
  73.   uStack1570 = (undefined2)HDDSerial;
  74.   uStack1568 = (undefined)(HDDSerial >> 0x10);
  75.   uStack1567 = uStack1567 & 0xffffff00 | HDDSerial >> 0x18;
  76.   psVar5 = (short *)auStack1576;
  77.   NetworkAdapter = uVar4;
  78.   do {
  79.     sVar1 = (short)uVar4;
  80.     HDDSerial = (int)uVar4 + 1;
  81.     uVar4 = (ulonglong)HDDSerial;
  82.     uVar6 = (short)NetworkAdapter + (sVar1 + 3) * *psVar5;
  83.     NetworkAdapter = (ulonglong)uVar6;
  84.     psVar5 = psVar5 + 1;
  85.   } while (HDDSerial < 6);
  86.   uStack1562 = (undefined)uVar6;
  87.   uStack1561 = (undefined)(uVar6 >> 8);
  88.   *(ulonglong *)hwidBuffer = CONCAT26(uStack1570,CONCAT51(auStack1576._1_5_,auStack1576[0]));
  89.   *(ulonglong *)(hwidBuffer + 8) =
  90.        CONCAT17(uStack1561,CONCAT16(uStack1562,CONCAT15(uStack1563,CONCAT41(uStack1567,uStack1568)))
  91.                );
  92.   func_0x000180005e50(uStack24 ^ (ulonglong)auStack1656);
  93.   return;
  94. }
  95.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement