// // cocos2d::CCGLProgram::dCCGLProgram from 0x1004173e0 to 0x10041755d (381 bytes) // // 2 xrefs: // > sub_100417570 @ 0x100417575 // > sub_100417580 @ 0x100417589 // // This function is hookable on this platform (idp: pc, 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 12:30:11 +0000 // __int64 __fastcall cocos2d::CCGLProgram::dCCGLProgram(__int64 a1) { GLuint v2; // edi __int64 v3; // r14 __int64 *v4; // r15 __int64 v5; // rax __int64 v6; // r12 __int64 v7; // rcx __int64 v8; // rdx __int64 v9; // rsi __int64 v10; // rdx _QWORD *v11; // rsi __int64 *v12; // rcx __int64 v13; // rdx __int64 v14; // rax __int64 v15; // rax __int64 v16; // rdx *(_QWORD *)a1 = off_100B3F1E8; v2 = *(_DWORD *)(a1 + 56); if ( v2 ) cocos2d::ccGLDeleteProgram(v2); v3 = *(_QWORD *)(a1 + 104); if ( v3 ) { v4 = (__int64 *)(a1 + 104); while ( 1 ) { v5 = *(_QWORD *)(v3 + 24); v6 = *(_QWORD *)(v3 + 32); if ( v5 ) break; v7 = *v4; if ( v6 ) goto LABEL_10; free(**(void ***)(v7 + 16)); free(*(void **)(*v4 + 16)); *v4 = 0; LABEL_6: free(*(void **)v3); free((void *)v3); v3 = v6; if ( !v6 ) return sub_10047FF60(a1); } v7 = *v4; LABEL_10: v8 = *(_QWORD *)(v7 + 16); v9 = *(_QWORD *)(v8 + 32); if ( v3 == *(_QWORD *)(v8 + 24) - v9 ) *(_QWORD *)(v8 + 24) = v9 + v5; v10 = *(_QWORD *)(v3 + 32); v11 = (_QWORD *)(v9 + v5 + 16); if ( !v5 ) { v11 = (_QWORD *)(a1 + 104); v7 = *(_QWORD *)(v3 + 32); } *v11 = v10; v12 = *(__int64 **)(v7 + 16); if ( v10 ) *(_QWORD *)(v12[4] + v10 + 8) = v5; v13 = *v12; v14 = 16LL * (*(_DWORD *)(v3 + 68) & (unsigned int)(*((_DWORD *)v12 + 2) - 1)); --*(_DWORD *)(v13 + v14 + 8); if ( *(_QWORD *)(v13 + v14) == v3 + 16 ) { *(_QWORD *)(v14 + v13) = *(_QWORD *)(v3 + 48); v15 = *(_QWORD *)(v3 + 40); v16 = *(_QWORD *)(v3 + 48); if ( !v15 ) goto LABEL_19; } else { v15 = *(_QWORD *)(v3 + 40); v16 = *(_QWORD *)(v3 + 48); if ( !v15 ) { LABEL_19: if ( v16 ) *(_QWORD *)(v16 + 24) = v15; --*((_DWORD *)v12 + 4); goto LABEL_6; } } *(_QWORD *)(v15 + 32) = v16; goto LABEL_19; } return sub_10047FF60(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source