// // sub_F80404 from 0xf80404 to 0xf80540 (316 bytes) // // 0 xrefs: // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:13:50 +0000 // unsigned __int64 __fastcall sub_F80404(unsigned __int8 *a1, wchar_t *s, unsigned __int64 a3) { unsigned __int64 v3; // x8 unsigned __int8 *v6; // x21 unsigned __int64 v7; // x22 size_t v8; // x0 __int64 v9; // x8 unsigned __int8 *v10; // x10 unsigned __int8 *v11; // x8 unsigned __int8 *v12; // x9 __int64 v13; // x12 wchar_t v14; // w11 wchar_t *v15; // x19 wchar_t v16; // t1 __int64 v17; // x12 __int64 v18; // x13 unsigned __int8 *v19; // x0 unsigned __int64 v20; // x14 int v21; // w15 wchar_t v22; // w16 v3 = *a1; if ( (v3 & 1) != 0 ) { v7 = *((_QWORD *)a1 + 1); v6 = *((unsigned __int8 **)a1 + 2); } else { v6 = a1 + 4; v7 = v3 >> 1; } v8 = wcslen(s); v9 = -1; if ( v7 >= a3 && v7 - a3 >= v8 ) { if ( v8 ) { v10 = &v6[4 * a3]; v11 = &v6[4 * v7]; v12 = v10; if ( (v8 & 0x3FFFFFFFFFFFFFFFLL) != 0 ) { v12 = &v6[4 * v7]; v13 = (__int64)(4 * v8) >> 2; if ( (v11 - v10) >> 2 >= v13 && &v11[4 * (1 - v13)] != v10 ) { v16 = *s; v15 = s + 1; v14 = v16; v17 = -(__int64)&v6[4 * (v7 - v13)]; v18 = 4 * v8 - 4; v19 = &v6[4 * a3]; while ( 2 ) { v10 += 4; while ( *((_DWORD *)v10 - 1) != v14 ) { v19 = v10; v10 += 4; if ( &v10[v17] == (unsigned __int8 *)byte_8 ) goto LABEL_22; } v20 = 0; do { if ( v18 == v20 ) { v12 = v19; goto LABEL_22; } v21 = *(_DWORD *)&v10[v20]; v22 = v15[v20 / 4]; v20 += 4LL; } while ( v21 == v22 ); v19 = v10; if ( &v10[v17] != (unsigned __int8 *)byte_4 ) continue; break; } } } LABEL_22: if ( v12 == v11 ) return -1; else return (v12 - v6) >> 2; } else { return a3; } } return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source