// // cocos2d::_base64Encode from 0xb205a8 to 0xb20768 (448 bytes) // // 2 xrefs: // > base64Encode @ 0xb208bc // > @ 0x86778 // // 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 cocos2d::_base64Encode(__int64 this, const unsigned __int8 *a2, __int64 a3, char *a4) { __int64 v4; // x5 unsigned int v5; // w7 unsigned __int64 v6; // x8 unsigned int v7; // w6 unsigned __int64 v8; // x4 __int64 v9; // x10 unsigned int v10; // w9 __int64 v11; // x15 __int64 v12; // x14 __int64 v13; // x12 __int64 v14; // x13 __int64 v15; // x11 unsigned int v16; // w16 __int64 v17; // x4 unsigned int v18; // w4 unsigned int v19; // w7 if ( !(_DWORD)a2 ) { v17 = 0; goto LABEL_15; } v4 = 0; v5 = 0; LODWORD(v6) = 0; v7 = 0; do { while ( 1 ) { ++v7; v8 = (unsigned int)v6 | *(unsigned __int8 *)(this + v4); LODWORD(v6) = (_DWORD)v8 << 8; if ( v7 == 3 ) break; LABEL_3: if ( (unsigned int)a2 <= (unsigned int)++v4 ) goto LABEL_7; } v9 = v8 & 0x3F; v10 = v5 + 3; v11 = (v8 >> 18) & 0x3F; v12 = (v8 >> 12) & 0x3F; v13 = (v8 >> 6) & 0x3F; v14 = v5 + 1; v15 = v5 + 2; v16 = v5 + 3; LODWORD(v6) = 0; v7 = 0; if ( (_BYTE)a4 ) { *(_BYTE *)(a3 + v5) = cocos2d::urlAlphabet[v11]; v5 += 4; *(_BYTE *)(a3 + v14) = cocos2d::urlAlphabet[v12]; *(_BYTE *)(a3 + v15) = cocos2d::urlAlphabet[v13]; *(_BYTE *)(a3 + v10) = cocos2d::urlAlphabet[v9]; goto LABEL_3; } ++v4; *(_BYTE *)(a3 + v5) = cocos2d::alphabet[v11]; v5 += 4; *(_BYTE *)(a3 + v14) = cocos2d::alphabet[v12]; *(_BYTE *)(a3 + v15) = cocos2d::alphabet[v13]; *(_BYTE *)(a3 + v16) = cocos2d::alphabet[v9]; } while ( (unsigned int)a2 > (unsigned int)v4 ); LABEL_7: v17 = v5; if ( v7 ) { if ( v7 == 1 ) v6 = (unsigned int)((_DWORD)v6 << 8); else v6 = (unsigned int)v6; if ( (_BYTE)a4 ) { v18 = v5 + 2; *(_BYTE *)(a3 + v5) = cocos2d::urlAlphabet[(v6 >> 18) & 0x3F]; *(_BYTE *)(a3 + v5 + 1) = cocos2d::urlAlphabet[(v6 >> 12) & 0x3F]; if ( v7 > 1 ) { v19 = v5 + 3; *(_BYTE *)(a3 + v18) = cocos2d::urlAlphabet[(v6 >> 6) & 0x3F]; goto LABEL_14; } LABEL_19: v19 = v18 + 1; *(_BYTE *)(a3 + v18) = 61; } else { v18 = v5 + 2; *(_BYTE *)(a3 + v5) = cocos2d::alphabet[(v6 >> 18) & 0x3F]; *(_BYTE *)(a3 + v5 + 1) = cocos2d::alphabet[(v6 >> 12) & 0x3F]; if ( v7 <= 1 ) goto LABEL_19; v19 = v5 + 3; *(_BYTE *)(a3 + v18) = cocos2d::alphabet[(v6 >> 6) & 0x3F]; } LABEL_14: this = 61; v17 = v19 + 1; *(_BYTE *)(a3 + v19) = 61; } LABEL_15: *(_BYTE *)(a3 + v17) = 0; return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source