// // cocos2d::_base64Decode from 0x5ebe54 to 0x5ebf36 (226 bytes) // // 1 xrefs: // > base64Decode @ 0x5ec0f0 // // 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 // int __fastcall cocos2d::_base64Decode( cocos2d *this, const unsigned __int8 *a2, unsigned int a3, unsigned __int8 *a4, unsigned int *a5, bool a6) { int v7; // r4 int v8; // r7 bool v9; // cf int v10; // r4 cocos2d *v11; // r1 int v12; // r5 int v13; // lr int v14; // r6 int v15; // r6 int v16; // r5 int v17; // r3 int v18; // t1 unsigned __int8 *v19; // r3 bool v20; // zf int v21; // r1 int result; // r0 if ( (_BYTE)a5 ) { v15 = 64; do { v16 = (unsigned __int8)cocos2d::urlAlphabet[v15]; byte_AC965C[v16] = 1; byte_AC965C[v16 + 256] = v15; v9 = v15-- != 0; } while ( v9 ); } else { v7 = 64; do { v8 = (unsigned __int8)cocos2d::alphabet[v7]; byte_AC965C[v8] = 1; byte_AC965C[v8 + 256] = v7; v9 = v7-- != 0; } while ( v9 ); } v10 = 0; v11 = (cocos2d *)((char *)this + (_DWORD)a2); v12 = 0; v13 = 0; v14 = 0; while ( this != v11 ) { v18 = *(unsigned __int8 *)this; this = (cocos2d *)((char *)this + 1); v17 = v18; v13 = v18; if ( v18 == 61 ) goto LABEL_19; if ( byte_AC965C[v17] ) { v19 = &byte_AC965C[v13]; v20 = ++v12 == 4; if ( v12 == 4 ) v12 = a3 + v10; v14 += byte_AC965C[v13 + 256]; if ( v20 ) { *(_BYTE *)(a3 + v10) = BYTE2(v14); v19 = (unsigned __int8 *)(v10 + 2); v10 += 3; *(_BYTE *)(v12 + 1) = BYTE1(v14); } else { v14 <<= 6; } if ( v20 ) { v12 = 0; v19[a3] = v14; v14 = 0; } } } if ( v13 != 61 ) goto LABEL_25; LABEL_19: v21 = v10; switch ( v12 ) { case 2: ++v10; *(_BYTE *)(a3 + v21) = v14 >> 10; break; case 3: *(_BYTE *)(a3 + v10) = BYTE2(v14); v10 += 2; *(_BYTE *)(a3 + v21 + 1) = BYTE1(v14); break; case 1: fputs("base64Decode: encoding incomplete: at least 2 bits missing", (FILE *)((char *)&_sF + 168)); result = 1; goto LABEL_26; } LABEL_25: result = 0; LABEL_26: *(_DWORD *)a4 = v10; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source