//
// __isa_available_init from 0x18001fd68 to 0x18001ff14 (428 bytes)
//
// 3 xrefs:
// > __scrt_dllmain_after_initialize_c @ 0x18001f3d9
// > __scrt_initialize_crt @ 0x18001f50b
// > ??> @ 0x18004b2b0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __cdecl _isa_available_init()
{
int v5; // r11d
int v6; // r9d
int v7; // esi
int v9; // r10d
int v14; // edi
int v15; // eax
unsigned __int64 v16; // rax
__int64 v17; // rcx
int v18; // r8d
int v23; // eax
char v25; // [rsp+20h] [rbp+8h]
_RAX = 0;
__asm { cpuid }
v5 = 0;
v6 = _RBX;
v7 = _RAX;
_RAX = 1;
v9 = _RCX ^ 0x6C65746E | _RDX ^ 0x49656E69;
__asm { cpuid }
v14 = _RCX;
if ( !(v6 ^ 0x756E6547 | v9)
&& ((qword_180047098 = -1, v15 = _RAX & 0xFFF3FF0, qword_180047090 = 0x8000, v15 == 67264)
|| v15 == 132704
|| v15 == 132720
|| (v16 = (unsigned int)(v15 - 198224), (unsigned int)v16 <= 0x20) && (v17 = 0x100010001LL, _bittest64(&v17, v16))) )
{
v18 = dword_1800485B4 | 1;
dword_1800485B4 |= 1u;
}
else
{
v18 = dword_1800485B4;
}
_RAX = 7;
if ( v7 >= 7 )
{
__asm { cpuid }
v5 = _RBX;
if ( (_RBX & 0x200) != 0 )
dword_1800485B4 = v18 | 2;
}
dword_180047088 = 1;
dword_18004708C = 2;
if ( (v14 & 0x100000) != 0 )
{
dword_180047088 = 2;
dword_18004708C = 6;
if ( (v14 & 0x8000000) != 0 && (v14 & 0x10000000) != 0 )
{
__asm { xgetbv }
v25 = _RAX;
if ( (_RAX & 6) == 6 )
{
v23 = dword_18004708C | 8;
dword_180047088 = 3;
dword_18004708C |= 8u;
if ( (v5 & 0x20) != 0 )
{
dword_180047088 = 5;
dword_18004708C = v23 | 0x20;
if ( (v5 & 0xD0030000) == 0xD0030000 && (v25 & 0xE0) == 0xE0 )
{
dword_18004708C |= 0x40u;
dword_180047088 = 6;
}
}
}
}
}
return 0;
}