Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __int64 sub_1429CF280()
- {
- int cpuFamily; // ecx
- __int64 result; // rax
- int Str1; // [rsp+20h] [rbp-18h]
- int v13; // [rsp+24h] [rbp-14h]
- int v14; // [rsp+28h] [rbp-10h]
- char v15; // [rsp+2Ch] [rbp-Ch]
- unsigned int coreCount; // [rsp+40h] [rbp+8h]
- unsigned int threadCount; // [rsp+48h] [rbp+10h]
- GeThreadAndCoreCount(&threadCount, &coreCount);
- v15 = 0;
- _RAX = 0i64;
- __asm { cpuid }
- v13 = _RDX;
- v14 = _RCX;
- Str1 = _RBX;
- if ( (unsigned int)strcmp(&Str1, "AuthenticAMD") )
- return coreCount;
- _RAX = 1i64;
- __asm { cpuid }
- cpuFamily = ((signed int)_RAX >> 8) & 0xF;
- if ( cpuFamily == 15 ) // CPUID says is family is 15 then family = 15 + extended family
- cpuFamily = (unsigned __int8)((signed int)_RAX >> 20) + 15;
- result = threadCount;
- if ( cpuFamily == 21 ) // intel cpu family 21 only uses cores and not threads for some reason
- result = coreCount;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement