// // sub_798A40 from 0x798a40 to 0x798b7e (318 bytes) // // 5 xrefs: // > sub_798FF8 @ 0x79902c // > LevelControlConfig::decode @ 0x799bb4 // > LevelControlConfig::decode @ 0x799c6e // > LevelControlConfig::decode @ 0x799c92 // > LevelControlConfig::decode @ 0x799d36 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:59:47 +0000 // int __fastcall sub_798A40(unsigned __int8 *a1, char *a2, int *a3) { int v3; // r7 int v7; // r6 unsigned __int8 *v8; // r4 size_t v9; // r0 unsigned __int8 *v10; // r6 char *v11; // r0 unsigned __int8 *i; // r3 char *v13; // r2 int v14; // t1 int v15; // r4 int v16; // r7 unsigned int v17; // r9 int v18; // r3 int *v19; // r0 int v20; // r6 unsigned int v21; // r6 unsigned __int8 *v22; // r4 size_t v23; // r0 unsigned __int8 *v24; // r3 unsigned __int8 *v25; // r6 char *v26; // r0 char *v27; // r2 int v28; // t1 int v30[3]; // [sp+10h] [bp-14h] BYREF v3 = *a1; if ( (v3 & 1) != 0 ) v7 = *((_DWORD *)a1 + 1); else v7 = v3 >> 1; if ( (v3 & 1) != 0 ) v8 = *((unsigned __int8 **)a1 + 2); else v8 = a1 + 1; v9 = strlen(a2); if ( v7 && v9 ) { v10 = &v8[v7]; v11 = &a2[v9]; for ( i = v8; i != v10; ++i ) { v13 = a2; while ( v13 != v11 ) { v14 = (unsigned __int8)*v13++; if ( *i == v14 ) { v15 = i - v8; goto LABEL_17; } } } } v15 = -1; LABEL_17: if ( (v3 & 1) != 0 ) v16 = *((_DWORD *)a1 + 1); else v16 = v3 >> 1; v17 = 0; while ( 1 ) { std::string::basic_string(v30, a1, v17, v15 - v17); if ( (v30[0] & 1) != 0 ) v18 = v30[1]; else v18 = (int)LOBYTE(v30[0]) >> 1; if ( v18 || v17 != v16 ) { v19 = (int *)a3[1]; if ( v19 == (int *)a3[2] ) { std::vector::__push_back_slow_path(a3, (int)v30); } else { if ( v19 ) std::string::basic_string(v19, (int)v30); a3[1] += 12; } } if ( v15 == -1 ) return std::string::~string((int)v30); v20 = *a1; v17 = v15 + 1; if ( (v20 & 1) != 0 ) { v21 = *((_DWORD *)a1 + 1); v22 = *((unsigned __int8 **)a1 + 2); } else { v21 = v20 >> 1; v22 = a1 + 1; } v23 = strlen(a2); if ( v17 < v21 && v23 ) { v24 = &v22[v17]; v25 = &v22[v21]; v26 = &a2[v23]; while ( v24 != v25 ) { v27 = a2; while ( v27 != v26 ) { v28 = (unsigned __int8)*v27++; if ( *v24 == v28 ) { v15 = v24 - v22; goto LABEL_44; } } ++v24; } } v15 = -1; LABEL_44: std::string::~string((int)v30); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source