// // sub_7424F0 from 0x7424f0 to 0x742aa4 (1460 bytes) // // 0 xrefs: // // 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_7424F0() { signed int v0; // r0 int v1; // r6 void *v2; // r0 void *v3; // r5 int v4; // r6 int v5; // r2 int v6; // r2 int v7; // r0 char *v8; // r0 char *v9; // r4 int v10; // r0 int v11; // r8 unsigned __int8 *v12; // r0 unsigned __int8 *v13; // r9 int v14; // r10 int v15; // r4 char *v16; // lr const char *v17; // r3 int v18; // r0 int v19; // r1 int v20; // r0 int v21; // r8 ssize_t v22; // r0 char *v23; // r0 char *v24; // r7 unsigned __int8 *v25; // r0 unsigned __int8 *v26; // r7 int v27; // r4 __int64 v28; // r2 __int64 v29; // r2 __int64 v30; // r2 void *v31; // r0 int i; // r7 char *v33; // r0 unsigned __int8 *v34; // r4 size_t v35; // r0 unsigned int v36; // r1 unsigned __int8 *v37; // r0 unsigned __int8 *v38; // r12 int v39; // r2 int v40; // r7 __int64 v41; // r2 char *v42; // r0 char *v43; // r6 int v44; // [sp+Ch] [bp-58h] BYREF int v45; // [sp+10h] [bp-54h] BYREF char *buf; // [sp+14h] [bp-50h] BYREF int v47; // [sp+18h] [bp-4Ch] char v48[64]; // [sp+1Ch] [bp-48h] BYREF dword_ACC6B4 = 1; qword_ACC6B8 = 0; dword_ACC6C0 = 1; dword_ACC6B0 = 1; v0 = sub_7423E0(); v1 = v0; if ( v0 >= 0 ) { v2 = malloc(v0); v3 = v2; if ( v2 ) { v4 = sub_742280("/proc/cpuinfo", (int)v2, v1); if ( v4 < 0 ) { LABEL_119: sub_8E4210(v3); return; } v44 = 0; v5 = sub_742280("/sys/devices/system/cpu/present", (int)v48, 64); if ( v5 >= 0 ) sub_742448((unsigned __int8 *)&v44, v48, v5); v45 = 0; v6 = sub_742280("/sys/devices/system/cpu/possible", (int)v48, 64); if ( v6 >= 0 ) sub_742448((unsigned __int8 *)&v45, v48, v6); v7 = _popcountsi2(v45 & v44); if ( v7 ) dword_ACC6C0 = v7; else dword_ACC6C0 = 1; v8 = sub_742364((int)v3, v4, "CPU architecture"); v9 = v8; if ( !v8 ) { LABEL_21: v15 = (int)sub_742324(16); if ( v15 ) goto LABEL_63; v16 = v48; v17 = "/proc/self/auxv"; do { v18 = *(_DWORD *)v17; v17 += 8; v19 = *((_DWORD *)v17 - 1); *(_DWORD *)v16 = v18; *((_DWORD *)v16 + 1) = v19; v16 += 8; } while ( v17 != "CPU implementer" ); while ( 1 ) { v20 = open(v48, 0); v21 = v20; if ( v20 != -1 ) break; if ( *(_DWORD *)_errno() != 4 ) goto LABEL_38; } if ( v20 >= 0 ) { while ( 1 ) { while ( 1 ) { v22 = read(v21, &buf, 8u); if ( v22 != -1 ) break; if ( *(_DWORD *)_errno() != 4 ) goto LABEL_37; } if ( v22 <= 0 ) break; if ( buf ) { if ( buf == (char *)&word_10 ) { v15 = v47; break; } } else if ( !v47 ) { break; } } LABEL_37: close(v21); if ( v15 ) goto LABEL_63; } LABEL_38: v23 = sub_742364((int)v3, v4, "CPU architecture"); v24 = v23; if ( v23 ) { v27 = strtol(v23, nullptr, 10); free(v24); if ( v27 > 7 ) { v15 = 471104; goto LABEL_63; } } v25 = (unsigned __int8 *)sub_742364((int)v3, v4, "Features"); v26 = v25; if ( v25 ) { if ( sub_7422CE(v25, "vfp") ) v15 = 64; else v15 = 0; if ( sub_7422CE(v26, "vfpv3") ) v15 |= 0x2000u; if ( sub_7422CE(v26, "vfpv3d16") ) v15 |= 0x4000u; if ( sub_7422CE(v26, "vfpv4") ) v15 |= 0x10000u; if ( sub_7422CE(v26, "neon") ) v15 |= 0x1000u; if ( sub_7422CE(v26, "idiva") ) v15 |= 0x20000u; if ( sub_7422CE(v26, "idivt") ) v15 |= 0x40000u; if ( sub_7422CE(v26, "idiv") ) v15 |= 0x60000u; if ( sub_7422CE(v26, "iwmmxt") ) v15 |= 0x200u; free(v26); if ( v15 ) { LABEL_63: if ( (v15 & 0x10000) != 0 ) qword_ACC6B8 |= 0xC2uLL; if ( (v15 & 0x6000) != 0 ) qword_ACC6B8 |= 2uLL; if ( (v15 & 0x40) != 0 ) { HIDWORD(v28) = HIDWORD(qword_ACC6B8); if ( (qword_ACC6B8 & 1) != 0 ) LODWORD(v28) = qword_ACC6B8 | 2; else LODWORD(v28) = qword_ACC6B8 | 0x10; qword_ACC6B8 = v28; } if ( (v15 & 0x1000) != 0 ) { HIDWORD(v29) = HIDWORD(qword_ACC6B8); if ( (v15 & 0x10000) != 0 ) LODWORD(v29) = qword_ACC6B8 | 0x126; else LODWORD(v29) = qword_ACC6B8 | 0x26; qword_ACC6B8 = v29; } HIDWORD(v30) = HIDWORD(qword_ACC6B8); if ( (qword_ACC6B8 & 2) != 0 ) { LODWORD(v30) = qword_ACC6B8 | 0x11; qword_ACC6B8 = v30; } if ( (v15 & 0x20000) != 0 ) qword_ACC6B8 |= 0x200uLL; if ( (v15 & 0x40000) != 0 ) qword_ACC6B8 |= 0x400uLL; if ( (v15 & 0x200) != 0 ) qword_ACC6B8 |= 0x800uLL; } } v31 = sub_742324(26); if ( v31 ) { if ( ((unsigned __int8)v31 & 1) != 0 ) qword_ACC6B8 |= 0x1000uLL; if ( ((unsigned __int8)v31 & 2) != 0 ) qword_ACC6B8 |= 0x2000uLL; if ( ((unsigned __int8)v31 & 4) != 0 ) qword_ACC6B8 |= 0x4000uLL; if ( ((unsigned __int8)v31 & 8) != 0 ) qword_ACC6B8 |= 0x8000uLL; if ( ((unsigned __int8)v31 & 0x10) != 0 ) qword_ACC6B8 |= 0x10000uLL; } for ( i = 0; i != 8; i += 2 ) { v33 = sub_742364((int)v3, v4, (&off_A2DC48)[i]); v34 = (unsigned __int8 *)v33; if ( v33 ) { v35 = strlen(v33); buf = nullptr; v36 = (unsigned int)&v34[v35]; if ( *v34 == 48 && (v34[1] & 0xDF) == 0x58 ) { v37 = sub_74222C(v34 + 2, v36, 16, &buf); v38 = v34 + 2; } else { if ( LOBYTE((&off_A2DC48)[i + 1]) == 120 ) v39 = 16; else v39 = 10; v37 = sub_74222C(v34, v36, v39, &buf); v38 = v34; } if ( v37 > v38 ) { buf = (char *)(((unsigned int)buf & ((1 << *((_BYTE *)&off_A2DC48 + 4 * i + 6)) - 1)) << *((_BYTE *)&off_A2DC48 + 4 * i + 5)); dword_ACC6C4 |= (unsigned int)buf; } free(v34); } } v40 = dword_ACC6C4; v41 = qword_ACC6B8; if ( dword_ACC6C4 == 1358956274 ) LODWORD(v41) = qword_ACC6B8 | 0x600; if ( dword_ACC6C4 == 1358956275 ) LODWORD(v41) = v41 | 0x600; qword_ACC6B8 = v41; v42 = sub_742364((int)v3, v4, "Hardware"); v43 = v42; if ( v42 ) { if ( !strcmp(v42, "Goldfish") && v40 == 1090568320 && (dword_ACC6B4 & 1) != 0 ) qword_ACC6B8 |= 0x200uLL; free(v43); } goto LABEL_119; } v10 = strtol(v8, &buf, 10); v11 = v10; if ( buf <= v9 || v10 <= 6 || (v12 = (unsigned __int8 *)sub_742364((int)v3, v4, "Processor"), (v13 = v12) != nullptr) && (v14 = sub_7422CE(v12, "(v6l)"), free(v13), v14) ) { if ( v11 <= 5 ) { LABEL_20: free(v9); goto LABEL_21; } } else { qword_ACC6B8 |= 1uLL; } qword_ACC6B8 |= 8uLL; goto LABEL_20; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source