// // sub_FF918 from 0xff918 to 0xffb28 (528 bytes) // // 1 xrefs: // > sub_FFB28 @ 0xffb34 // // 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 // void sub_FF918() { int v0; // w0 int v1; // w19 int v2; // w20 int v3; // w0 void *v4; // x0 void *v5; // x19 uint8x8_t v6; // d0 int v7; // w8 void *v8; // x0 void *v9; // x21 __int64 (__fastcall *v10)(__int64); // x0 int v11; // w20 _DWORD buf[64]; // [xsp+8h] [xbp-128h] BYREF unsigned int v13; // [xsp+108h] [xbp-28h] BYREF byte_15E7A0 = 1; qword_15E7B0 = 0; dword_15E7AC = 1; byte_15E7A4 = 1; v0 = open("/proc/cpuinfo", 0); if ( (v0 & 0x80000000) == 0 ) { v1 = v0; v2 = 0; do { while ( 1 ) { v3 = read(v1, buf, 0x100u); if ( (v3 & 0x80000000) == 0 ) break; if ( *(_DWORD *)__errno() != 4 ) goto LABEL_7; } v2 += v3; } while ( v3 ); LABEL_7: close(v1); if ( (v2 & 0x80000000) == 0 ) { v4 = malloc(v2); if ( v4 ) { v5 = v4; if ( (sub_FFB58("/proc/cpuinfo", v4, v2) & 0x80000000) != 0 ) goto LABEL_32; sub_FFBFC(buf, "/sys/devices/system/cpu/present"); sub_FFBFC(&v13, "/sys/devices/system/cpu/possible"); v6.n64_u64[0] = vcnt_s8((int8x8_t)(buf[0] & v13)).n64_u64[0]; v6.n64_u16[0] = vaddlv_u8(v6); v7 = v6.n64_u32[0]; if ( (buf[0] & v13) == 0 ) v7 = 1; dword_15E7AC = v7; dlerror(); v8 = dlopen("libc.so", 2); if ( !v8 ) goto LABEL_32; v9 = v8; v10 = (__int64 (__fastcall *)(__int64))dlsym(v8, "getauxval"); if ( !v10 ) { dlclose(v9); goto LABEL_32; } v11 = v10(16); dlclose(v9); if ( !v11 ) { LABEL_32: free(v5); return; } if ( (v11 & 1) != 0 ) { qword_15E7B0 |= 1uLL; if ( (v11 & 2) == 0 ) { LABEL_17: if ( (v11 & 8) == 0 ) goto LABEL_18; goto LABEL_27; } } else if ( (v11 & 2) == 0 ) { goto LABEL_17; } qword_15E7B0 |= 2uLL; if ( (v11 & 8) == 0 ) { LABEL_18: if ( (v11 & 0x10) == 0 ) goto LABEL_19; goto LABEL_28; } LABEL_27: qword_15E7B0 |= 4uLL; if ( (v11 & 0x10) == 0 ) { LABEL_19: if ( (v11 & 0x20) == 0 ) goto LABEL_20; goto LABEL_29; } LABEL_28: qword_15E7B0 |= 8uLL; if ( (v11 & 0x20) == 0 ) { LABEL_20: if ( (v11 & 0x40) == 0 ) goto LABEL_21; LABEL_30: qword_15E7B0 |= 0x20uLL; if ( (v11 & 0x80) != 0 ) { LABEL_31: qword_15E7B0 |= 0x40uLL; goto LABEL_32; } goto LABEL_32; } LABEL_29: qword_15E7B0 |= 0x10uLL; if ( (v11 & 0x40) == 0 ) { LABEL_21: if ( (v11 & 0x80) == 0 ) goto LABEL_32; goto LABEL_31; } goto LABEL_30; } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source