// // cocos2d::CCConfiguration::gatherGPUInfo from 0xaaf7d8 to 0xab0250 (2680 bytes) // // 2 xrefs: // > cocos2d::CCDirector::setOpenGLView @ 0xad785c // > @ 0x51198 // // 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 // void cocos2d::CCConfiguration::gatherGPUInfo(cocos2d::CCConfiguration *a1) { __int64 v2; // x27 char *String; // x0 const std::string *v4; // x1 cocos2d::CCObject *v5; // x22 char *v6; // x0 void *v7; // x0 __int64 v8; // x28 char *v9; // x0 const std::string *v10; // x1 cocos2d::CCObject *v11; // x27 char *v12; // x0 void *v13; // x0 __int64 v14; // x27 char *v15; // x0 const std::string *v16; // x1 cocos2d::CCObject *v17; // x26 char *v18; // x0 void *v19; // x0 __int64 v20; // x27 int v21; // w28 __int64 v22; // x26 char *v23; // x0 __int64 v24; // x27 unsigned int m_uReference; // w28 __int64 v26; // x26 char *v27; // x0 bool v28; // w0 char m_uID; // w26 char *v30; // x0 __int64 v31; // x28 __int64 v32; // x27 char *v33; // x0 __int64 v34; // x28 __int64 v35; // x26 char *v36; // x0 bool v37; // w0 char v38; // w26 char *v39; // x0 __int64 v40; // x28 __int64 v41; // x27 char *v42; // x0 bool v43; // w0 char m_uID_high; // w26 char *v45; // x0 __int64 v46; // x28 __int64 v47; // x27 char *v48; // x0 bool v49; // w0 char m_nLuaID; // w26 char *v51; // x0 __int64 v52; // x27 __int64 v53; // x20 char *v54; // x0 unsigned int *v55; // x1 int v56; // w2 unsigned int *v57; // x1 int v58; // w2 unsigned int *v59; // x1 int v60; // w2 unsigned int *v61; // x1 int v62; // w2 unsigned int *v63; // x1 int v64; // w2 unsigned int *v65; // x1 int v66; // w2 unsigned int *v67; // x1 int v68; // w2 unsigned int *v69; // x1 int v70; // w2 unsigned int *v71; // x1 int v72; // w2 unsigned int *v73; // x1 int v74; // w2 unsigned int *v75; // x1 int v76; // w2 unsigned int *v77; // x1 int v78; // w2 unsigned int *v79; // x1 int v80; // w2 unsigned int *v81; // x1 int v82; // w2 unsigned int *v83; // x1 int v84; // w2 unsigned int *v85; // x1 int v86; // w2 unsigned int *v87; // x1 int v88; // w2 __int64 v89; // [xsp+78h] [xbp+78h] BYREF const char *v90; // [xsp+80h] [xbp+80h] BYREF v2 = *(_QWORD *)&a1[1].m_uIndexInArray; String = (char *)glGetString(); sub_D153B8((int)&v89, String); v5 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v89, v4); sub_D153B8((int)&v90, "gl.vendor"); cocos2d::CCDictionary::setObject(v2, v5); v6 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v55 = (unsigned int *)(v90 - 8); do v56 = __ldaxr(v55); while ( __stlxr(v56 - 1, v55) ); } else { v56 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v56 - 1; } if ( v56 <= 0 ) operator delete(v6); } v7 = (void *)(v89 - 24); if ( (__int64 *)(v89 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v57 = (unsigned int *)(v89 - 8); do v58 = __ldaxr(v57); while ( __stlxr(v58 - 1, v57) ); } else { v58 = *(_DWORD *)(v89 - 8); *(_DWORD *)(v89 - 8) = v58 - 1; } if ( v58 <= 0 ) operator delete(v7); } v8 = *(_QWORD *)&a1[1].m_uIndexInArray; v9 = (char *)glGetString(); sub_D153B8((int)&v89, v9); v11 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v89, v10); sub_D153B8((int)&v90, "gl.renderer"); cocos2d::CCDictionary::setObject(v8, v11); v12 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v59 = (unsigned int *)(v90 - 8); do v60 = __ldaxr(v59); while ( __stlxr(v60 - 1, v59) ); } else { v60 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v60 - 1; } if ( v60 <= 0 ) operator delete(v12); } v13 = (void *)(v89 - 24); if ( (__int64 *)(v89 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v61 = (unsigned int *)(v89 - 8); do v62 = __ldaxr(v61); while ( __stlxr(v62 - 1, v61) ); } else { v62 = *(_DWORD *)(v89 - 8); *(_DWORD *)(v89 - 8) = v62 - 1; } if ( v62 <= 0 ) operator delete(v13); } v14 = *(_QWORD *)&a1[1].m_uIndexInArray; v15 = (char *)glGetString(); sub_D153B8((int)&v89, v15); v17 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v89, v16); sub_D153B8((int)&v90, "gl.version"); cocos2d::CCDictionary::setObject(v14, v17); v18 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v63 = (unsigned int *)(v90 - 8); do v64 = __ldaxr(v63); while ( __stlxr(v64 - 1, v63) ); } else { v64 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v64 - 1; } if ( v64 <= 0 ) operator delete(v18); } v19 = (void *)(v89 - 24); if ( (__int64 *)(v89 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v65 = (unsigned int *)(v89 - 8); do v66 = __ldaxr(v65); while ( __stlxr(v66 - 1, v65) ); } else { v66 = *(_DWORD *)(v89 - 8); *(_DWORD *)(v89 - 8) = v66 - 1; } if ( v66 <= 0 ) operator delete(v19); } *(_QWORD *)&a1[1].m_uAutoReleaseCount = glGetString(); glGetIntegerv(); v20 = *(_QWORD *)&a1[1].m_uIndexInArray; v21 = (int)a1[1].__vftable; v22 = operator new(0x40u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v22); *(_DWORD *)(v22 + 56) = v21; *(_QWORD *)v22 = &off_1148430; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v22); sub_D153B8((int)&v90, "gl.max_texture_size"); cocos2d::CCDictionary::setObject(v20, (cocos2d::CCObject *)v22); v23 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v67 = (unsigned int *)(v90 - 8); do v68 = __ldaxr(v67); while ( __stlxr(v68 - 1, v67) ); } else { v68 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v68 - 1; } if ( v68 <= 0 ) operator delete(v23); } glGetIntegerv(); v24 = *(_QWORD *)&a1[1].m_uIndexInArray; m_uReference = a1[1].m_uReference; v26 = operator new(0x40u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v26); *(_DWORD *)(v26 + 56) = m_uReference; *(_QWORD *)v26 = &off_1148430; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v26); sub_D153B8((int)&v90, "gl.max_texture_units"); cocos2d::CCDictionary::setObject(v24, (cocos2d::CCObject *)v26); v27 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v69 = (unsigned int *)(v90 - 8); do v70 = __ldaxr(v69); while ( __stlxr(v70 - 1, v69) ); } else { v70 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v70 - 1; } if ( v70 <= 0 ) operator delete(v27); } sub_D153B8((int)&v90, "GL_IMG_texture_compression_pvrtc"); v28 = cocos2d::CCConfiguration::checkForGLExtension((__int64)a1, &v90); LOBYTE(a1[1].m_uID) = v28; m_uID = v28; v30 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v71 = (unsigned int *)(v90 - 8); do v72 = __ldaxr(v71); while ( __stlxr(v72 - 1, v71) ); } else { v72 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v72 - 1; } if ( v72 <= 0 ) operator delete(v30); m_uID = a1[1].m_uID; } v31 = *(_QWORD *)&a1[1].m_uIndexInArray; v32 = operator new(0x40u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v32); *(_BYTE *)(v32 + 56) = m_uID; *(_QWORD *)v32 = &off_11FB020; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v32); sub_D153B8((int)&v90, "gl.supports_PVRTC"); cocos2d::CCDictionary::setObject(v31, (cocos2d::CCObject *)v32); v33 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v73 = (unsigned int *)(v90 - 8); do v74 = __ldaxr(v73); while ( __stlxr(v74 - 1, v73) ); } else { v74 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v74 - 1; } if ( v74 <= 0 ) operator delete(v33); } BYTE1(a1[1].m_uID) = 1; v34 = *(_QWORD *)&a1[1].m_uIndexInArray; v35 = operator new(0x40u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v35); *(_BYTE *)(v35 + 56) = 1; *(_QWORD *)v35 = &off_11FB020; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v35); sub_D153B8((int)&v90, "gl.supports_NPOT"); cocos2d::CCDictionary::setObject(v34, (cocos2d::CCObject *)v35); v36 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v75 = (unsigned int *)(v90 - 8); do v76 = __ldaxr(v75); while ( __stlxr(v76 - 1, v75) ); } else { v76 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v76 - 1; } if ( v76 <= 0 ) operator delete(v36); } sub_D153B8((int)&v90, "GL_IMG_texture_format_BGRA888"); v37 = cocos2d::CCConfiguration::checkForGLExtension((__int64)a1, &v90); BYTE2(a1[1].m_uID) = v37; v38 = v37; v39 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v77 = (unsigned int *)(v90 - 8); do v78 = __ldaxr(v77); while ( __stlxr(v78 - 1, v77) ); } else { v78 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v78 - 1; } if ( v78 <= 0 ) operator delete(v39); v38 = BYTE2(a1[1].m_uID); } v40 = *(_QWORD *)&a1[1].m_uIndexInArray; v41 = operator new(0x40u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v41); *(_BYTE *)(v41 + 56) = v38; *(_QWORD *)v41 = &off_11FB020; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v41); sub_D153B8((int)&v90, "gl.supports_BGRA8888"); cocos2d::CCDictionary::setObject(v40, (cocos2d::CCObject *)v41); v42 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v79 = (unsigned int *)(v90 - 8); do v80 = __ldaxr(v79); while ( __stlxr(v80 - 1, v79) ); } else { v80 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v80 - 1; } if ( v80 <= 0 ) operator delete(v42); } sub_D153B8((int)&v90, "GL_EXT_discard_framebuffer"); v43 = cocos2d::CCConfiguration::checkForGLExtension((__int64)a1, &v90); HIBYTE(a1[1].m_uID) = v43; m_uID_high = v43; v45 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v81 = (unsigned int *)(v90 - 8); do v82 = __ldaxr(v81); while ( __stlxr(v82 - 1, v81) ); } else { v82 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v82 - 1; } if ( v82 <= 0 ) operator delete(v45); m_uID_high = HIBYTE(a1[1].m_uID); } v46 = *(_QWORD *)&a1[1].m_uIndexInArray; v47 = operator new(0x40u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v47); *(_BYTE *)(v47 + 56) = m_uID_high; *(_QWORD *)v47 = &off_11FB020; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v47); sub_D153B8((int)&v90, "gl.supports_discard_framebuffer"); cocos2d::CCDictionary::setObject(v46, (cocos2d::CCObject *)v47); v48 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v83 = (unsigned int *)(v90 - 8); do v84 = __ldaxr(v83); while ( __stlxr(v84 - 1, v83) ); } else { v84 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v84 - 1; } if ( v84 <= 0 ) operator delete(v48); } sub_D153B8((int)&v90, "vertex_array_object"); v49 = cocos2d::CCConfiguration::checkForGLExtension((__int64)a1, &v90); LOBYTE(a1[1].m_nLuaID) = v49; m_nLuaID = v49; v51 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v85 = (unsigned int *)(v90 - 8); do v86 = __ldaxr(v85); while ( __stlxr(v86 - 1, v85) ); } else { v86 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v86 - 1; } if ( v86 <= 0 ) operator delete(v51); m_nLuaID = a1[1].m_nLuaID; } v52 = *(_QWORD *)&a1[1].m_uIndexInArray; v53 = operator new(0x40u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v53); *(_BYTE *)(v53 + 56) = m_nLuaID; *(_QWORD *)v53 = &off_11FB020; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v53); sub_D153B8((int)&v90, "gl.supports_vertex_array_object"); cocos2d::CCDictionary::setObject(v52, (cocos2d::CCObject *)v53); v54 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v87 = (unsigned int *)(v90 - 8); do v88 = __ldaxr(v87); while ( __stlxr(v88 - 1, v87) ); } else { v88 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v88 - 1; } if ( v88 <= 0 ) operator delete(v54); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source