PsWow64GetSupportedArchitectures

INT64 __fastcall PsWow64GetSupportedArchitectures(INT64 result, UINT64 a2, UINT64 *a3, INT64 a4){
  unsigned int v6; 
  BOOL IsMachineSupported; 
  BOOL v9; 
  int v10; 
  unsigned int v11; 
  __int16 v12; 
  unsigned int v13; 
  int v14; 
  unsigned int v15; 
  unsigned int v16; 
  int v17; 
  unsigned int v18; 
  int v19; 
  __int64 v21; 
  v6 = a2;
  IsMachineSupported = PsWow64IsMachineSupported(332i64);
  v9 = PsWow64IsMachineSupported(452i64);
  v10 = IsMachineSupported + 2;
  if( !v9 )
    v10 = IsMachineSupported + 1;
  v11 = 4 * v10 + 4;
  *(_DWORD *)a3 = v11;
  if( v11 > v6 )
    return 3221225507i64;
  v12 = 0;
  if( a4 )
  {
    v21 = *(_QWORD *)(a4 + 1408);
    if( !v21 || (v12 = *(_WORD *)(v21 + 8)) == 0 )
      v12 = -31132;
  }
  memset(result, 0i64);
  v13 = *(_DWORD *)result & 0xFFFF0000 | 0x8664;
  *(_DWORD *)result = v13;
  v13 |= 0x10000u;
  *(_DWORD *)result = v13;
  v13 |= 0x20000u;
  *(_DWORD *)result = v13;
  v14 = v13 | 0x40000;
  *(_DWORD *)result = v14;
  if( v12 == -31132 )
    *(_DWORD *)result = v14 | 0x80000;
  v15 = 1;
  if( IsMachineSupported )
  {
    v16 = *(_DWORD *)(result + 4) & 0xFFFF0000 | 0x14C;
    *(_DWORD *)(result + 4) = v16;
    v17 = v16 | 0x20000;
    *(_DWORD *)(result + 4) = v17;
    if( v12 == 332 )
      *(_DWORD *)(result + 4) = v17 | 0x80000;
    v15 = 2;
  }
  if( v9 )
  {
    v18 = *(_DWORD *)(result + 4i64 * v15) & 0xFFFF0000 | 0x1C4;
    *(_DWORD *)(result + 4i64 * v15) = v18;
    v19 = v18 | 0x20000;
    *(_DWORD *)(result + 4i64 * v15) = v19;
    if( v12 == 452 )
      *(_DWORD *)(result + 4i64 * v15) = v19 | 0x80000;
  }
  return 0i64;
}

Referenced by:

ExpQuerySystemInformation