// // llvm::ConvertUTF8toWide from 0xb1cba4 to 0xb1ccf8 (340 bytes) // // 2 xrefs: // > cocos2d::cc_utf8_to_utf16 @ 0xb1d3c8 // > @ 0x65aa8 // // 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 // __int64 __fastcall llvm::ConvertUTF8toWide(int a1, const void **a2, void **a3, _QWORD *a4) { __int64 result; // x0 _WORD *v9; // x3 __int64 v10; // x5 int v11; // w0 _BYTE *v12; // x1 __int64 v13; // x2 _WORD *v14; // x3 __int64 v15; // x5 _BYTE *v16; // [xsp+48h] [xbp+48h] BYREF _WORD *v17; // [xsp+50h] [xbp+50h] BYREF if ( a1 != 1 ) { if ( a1 == 2 ) { v14 = *a3; v16 = *a2; v15 = *((_QWORD *)v16 - 3); v17 = v14; v11 = ConvertUTF8toUTF16(&v16, (unsigned __int64)&v16[v15], &v17, (unsigned __int64)&v14[2 * v15], 0); if ( !v11 ) { LABEL_5: *a3 = v17; return v11 == 0; } } else { result = 1; if ( a1 != 4 ) return result; v9 = *a3; v16 = *a2; v10 = *((_QWORD *)v16 - 3); v17 = v9; v11 = ConvertUTF8toUTF32( &v16, (unsigned __int64)&v16[v10], (unsigned __int64 *)&v17, (unsigned __int64)&v9[8 * v10], 0); if ( !v11 ) goto LABEL_5; } *a4 = v16; return v11 == 0; } v12 = *a2; v13 = *((_QWORD *)v12 - 3); v17 = v12; result = (unsigned __int8)isLegalUTF8String((const unsigned __int8 **)&v17, &v12[v13]); if ( (_BYTE)result ) { memcpy(*a3, *a2, *((_QWORD *)*a2 - 3)); *a3 = (char *)*a3 + *((_QWORD *)*a2 - 3); return 1; } else { *a4 = v17; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source