// // sub_CCB6A4 from 0xccb6a4 to 0xccb8f4 (592 bytes) // // 6 xrefs: // > android_getCpuFamily @ 0xccb8f8 // > android_getCpuFamily @ 0xccb90c // > android_getCpuFeatures @ 0xccb92c // > android_getCpuFeatures @ 0xccb940 // > android_getCpuCount @ 0xccb960 // > android_getCpuCount @ 0xccb974 // // 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_CCB6A4() { int v0; // w20 int v1; // w19 int v2; // w0 bool v3; // zf void *v4; // x20 int v5; // w0 void *v6; // x0 void *v7; // x21 __int64 (__fastcall *v8)(__int64); // x1 int v9; // w19 _BYTE buf[256]; // [xsp+48h] [xbp+48h] BYREF qword_1249078 = 0; dword_1249074 = 4; dword_1249080 = 1; dword_1249070 = 1; v0 = open("/proc/cpuinfo", 0); if ( (v0 & 0x80000000) == 0 ) { v1 = 0; while ( 1 ) { v2 = read(v0, buf, 0x100u); v3 = v2 == 0; if ( v2 >= 0 ) break; LABEL_6: if ( *(_DWORD *)__errno() != 4 ) goto LABEL_7; } while ( !v3 ) { v1 += v2; v2 = read(v0, buf, 0x100u); v3 = v2 == 0; if ( v2 < 0 ) goto LABEL_6; } LABEL_7: close(v0); v4 = malloc(v1); if ( v4 ) { if ( (sub_CCB380("/proc/cpuinfo", (__int64)v4, v1) & 0x80000000) == 0 ) { v5 = sub_CCB5F8(); dword_1249080 = v5 ? v5 : 1; dlerror(); v6 = dlopen("libc.so", 2); v7 = v6; if ( v6 ) { v8 = (__int64 (__fastcall *)(__int64))dlsym(v6, "getauxval"); if ( v8 ) { v9 = v8(16); dlclose(v7); if ( v9 ) { if ( (v9 & 1) != 0 ) qword_1249078 |= 1uLL; if ( (v9 & 2) != 0 ) qword_1249078 |= 2uLL; if ( (v9 & 8) != 0 ) qword_1249078 |= 4uLL; if ( (v9 & 0x10) != 0 ) qword_1249078 |= 8uLL; if ( (v9 & 0x20) != 0 ) qword_1249078 |= 0x10uLL; if ( (v9 & 0x40) != 0 ) qword_1249078 |= 0x20uLL; if ( (v9 & 0x80) != 0 ) qword_1249078 |= 0x40uLL; } } else { dlclose(v7); } } } free(v4); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source