// // DS_Dictionary::cleanStringWhiteSpace from 0xdb730c to 0xdb748c (384 bytes) // // 3 xrefs: // > DS_Dictionary::rectFromString @ 0xdb8bf8 // > DS_Dictionary::vec2FromString @ 0xdb9428 // > @ 0xf4d20 // // 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:08:42 +0000 // __int64 *__usercall DS_Dictionary::cleanStringWhiteSpace@(__int64 a1@, __int64 *a2@) { __int64 v4; // x0 __int64 v5; // x1 unsigned __int8 v6; // w20 int v7; // w22 unsigned __int8 *v8; // x19 __int64 v9; // x21 unsigned __int8 *v10; // x21 unsigned __int8 *v11; // x20 int v12; // w22 __int64 v13; // x21 __int64 v14; // x20 unsigned __int8 *v15; // x0 unsigned __int64 v16; // x19 size_t v17; // x2 __int64 v18; // x20 *a2 = 0; a2[1] = 0; a2[2] = 0; if ( (*(_BYTE *)a1 & 1) != 0 ) { std::string::__init(a2, *(void **)(a1 + 16), *(_QWORD *)(a1 + 8)); } else { v4 = *(_QWORD *)a1; v5 = *(_QWORD *)(a1 + 8); *a2 = v4; a2[1] = v5; a2[2] = *(_QWORD *)(a1 + 16); } v6 = *(_BYTE *)a2; v7 = *(_BYTE *)a2 & 1; if ( (*(_BYTE *)a2 & 1) != 0 ) { v8 = (unsigned __int8 *)a2[2]; v9 = a2[1]; } else { v8 = (unsigned __int8 *)a2 + 1; v9 = v6 >> 1; } v10 = &v8[v9]; if ( v10 != v8 ) { while ( !isspace(*v8) ) { if ( v10 == ++v8 ) goto LABEL_14; } v11 = v8 + 1; while ( v11 != v10 ) { while ( 1 ) { v12 = *v11++; if ( isspace(v12) ) break; *v8++ = v12; if ( v11 == v10 ) goto LABEL_13; } } LABEL_13: v6 = *(_BYTE *)a2; v7 = *(_BYTE *)a2 & 1; } LABEL_14: if ( !v7 ) { v13 = (__int64)a2 + 1; v14 = v6 >> 1; v15 = (unsigned __int8 *)(v8 - ((unsigned __int8 *)a2 + 1)); v16 = (char *)a2 + v14 + 1 - (char *)v8; if ( !v16 ) return a2; if ( v14 - (__int64)v15 <= v16 ) v16 = v14 - (_QWORD)v15; v17 = v14 - (_QWORD)v15 - v16; if ( !v17 ) goto LABEL_20; goto LABEL_19; } v13 = a2[2]; v14 = a2[1]; v15 = &v8[-v13]; v16 = v13 + v14 - (_QWORD)v8; if ( !v16 ) return a2; if ( v14 - (__int64)v15 <= v16 ) v16 = v14 - (_QWORD)v15; v17 = v14 - (_QWORD)v15 - v16; if ( v17 ) { LABEL_19: memmove(&v15[v13], &v15[v16 + v13], v17); v7 = *(_BYTE *)a2 & 1; } LABEL_20: v18 = v14 - v16; if ( v7 ) a2[1] = v18; else *(_BYTE *)a2 = 2 * v18; *(_BYTE *)(v13 + v18) = 0; return a2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source