#include <Rpc.h>
#include <stdio.h>
#pragma comment(lib, "rpcrt4")
int main()
{
UUID id;
int nRet = UuidCreateSequential(&id);
if (nRet == RPC_S_OK)
{
unsigned int
EAX = id.Data4[2];
unsigned char
BL = id.Data4[7],
CH = BL + 0x53,
CL = (BL - 0x12),
BH = (BL + 0x32),
EDX = BL * 0x37;
EAX = id.Data4[3];
BL -= 0x11;
EAX = BL;
EAX = EAX << 3;
EAX -= BL;
EAX = EAX << 3;
char szOut[32];
wsprintf(szOut, "%02X%02X-%02X%02X-%02X%02X", BH, CH, EDX, CL, BL, (EAX & 0xFF));
printf("%s", szOut);
}
return 0;
}