// // sub_3D6E64 from 0x3d6e64 to 0x3d6f10 (172 bytes) // // 2 xrefs: // > ObjectManager::replaceAllOccurencesOfString @ 0x3d700c // > ObjectManager::replaceAllOccurencesOfString @ 0x3d719a // // 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:46:44 +0000 // unsigned __int8 **__fastcall sub_3D6E64(unsigned __int8 **result, unsigned __int8 *a2, unsigned __int8 *a3) { unsigned __int8 **v4; // r7 unsigned __int8 *i; // r1 int v7; // r4 int v8; // r2 unsigned int v9; // r4 unsigned __int8 *v10; // r9 unsigned __int8 *v11; // r3 unsigned int v12; // r2 unsigned __int8 *v13; // r4 unsigned __int8 *v14; // r9 int v15; // r2 int v16; // r1 unsigned int v17; // r2 size_t v18; // r1 char *v19; // r3 int v20; // r1 int v21; // r1 unsigned __int8 *v22; // [sp+10h] [bp-Ch] BYREF v4 = result; for ( i = nullptr; ; i = &v14[v21] ) { v7 = *(unsigned __int8 *)v4; v8 = *a2; if ( (v7 & 1) != 0 ) { v9 = (unsigned int)v4[1]; v10 = v4[2]; } else { v9 = v7 >> 1; v10 = (unsigned __int8 *)v4 + 1; } if ( (v8 & 1) != 0 ) { v11 = *((unsigned __int8 **)a2 + 2); v12 = *((_DWORD *)a2 + 1); } else { v11 = a2 + 1; v12 = v8 >> 1; } if ( (unsigned int)i > v9 ) break; result = (unsigned __int8 **)(v9 - (_DWORD)i); if ( v9 - (unsigned int)i < v12 ) break; if ( v12 ) { v13 = &v10[v9]; result = std::__search( &v22, &v10[(_DWORD)i], v13, v11, &v11[v12], (int (__fastcall *)(int, _DWORD))std::char_traits::eq); if ( v22 == v13 ) return result; v14 = (unsigned __int8 *)(v22 - v10); } else { v14 = i; } if ( v14 == (unsigned __int8 *)-1 ) break; v15 = *a2; v16 = *a3; if ( (v15 & 1) != 0 ) v17 = *((_DWORD *)a2 + 1); else v17 = v15 >> 1; if ( (v16 & 1) != 0 ) { v18 = *((_DWORD *)a3 + 1); v19 = *((char **)a3 + 2); } else { v18 = v16 >> 1; v19 = (char *)(a3 + 1); } std::string::replace(v4, (size_t)v14, v17, v19, v18); v20 = *a3; result = (unsigned __int8 **)(v20 << 31); if ( (v20 & 1) != 0 ) v21 = *((_DWORD *)a3 + 1); else v21 = v20 >> 1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source