// // sub_100391190 from 0x100391190 to 0x1003914bb (811 bytes) // // 1 xrefs: // > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x100391fb8 // // 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:29:14 +0000 // __int64 __fastcall sub_100391190(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7) { __int64 v12; // rsi __int64 result; // rax __int64 v14; // rdi __int64 v15; // rdi __int64 v16; // rdi __int64 v17; // rdi __int64 v18; // rdi __int64 v19; // rax __int64 v20; // rdi __int64 v21; // r14 void *v22; // r14 __int64 v23; // rax __int64 v24; // rax __int64 v25; // rax __int64 v26; // rax __int64 v27; // rax __int64 v28; // rax __int64 v29; // rax _BYTE v30[8]; // [rsp+0h] [rbp-40h] BYREF __int64 v31; // [rsp+8h] [rbp-38h] float v32; // [rsp+10h] [rbp-30h] unsigned __int8 v33; // [rsp+17h] [rbp-29h] v31 = a6; v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2); result = cocos2d::CCSprite::initWithTexture_2(a1, v12); if ( (_BYTE)result ) { v33 = result; *(_DWORD *)(a1 + 612) = 0; v32 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a3 + 328LL))(a3); *(float *)(a1 + 616) = (float)(*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a5 + 328LL))(a5) * 0.5) - v32; *(_DWORD *)(a1 + 608) = *(_DWORD *)(a1 + 612); if ( *(_QWORD *)(a1 + 640) != a3 ) { cocos2d::CCObject::retain(a3); v14 = *(_QWORD *)(a1 + 640); if ( v14 ) cocos2d::CCObject::release(v14); *(_QWORD *)(a1 + 640) = a3; } v15 = *(_QWORD *)(a1 + 648); if ( v15 != a4 ) { if ( a4 ) { cocos2d::CCObject::retain(a4); v15 = *(_QWORD *)(a1 + 648); } if ( v15 ) cocos2d::CCObject::release(v15); *(_QWORD *)(a1 + 648) = a4; } if ( *(_QWORD *)(a1 + 656) != a5 ) { cocos2d::CCObject::retain(a5); v16 = *(_QWORD *)(a1 + 656); if ( v16 ) cocos2d::CCObject::release(v16); *(_QWORD *)(a1 + 656) = a5; } v17 = *(_QWORD *)(a1 + 664); if ( v17 != v31 ) { if ( v31 ) { cocos2d::CCObject::retain(v31); v17 = *(_QWORD *)(a1 + 664); } if ( v17 ) cocos2d::CCObject::release(v17); *(_QWORD *)(a1 + 664) = v31; } v18 = *(_QWORD *)(a1 + 672); if ( v18 != a7 ) { if ( a7 ) { cocos2d::CCObject::retain(a7); v18 = *(_QWORD *)(a1 + 672); } if ( v18 ) cocos2d::CCObject::release(v18); *(_QWORD *)(a1 + 672) = a7; } (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 656)); v19 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2); v20 = *(_QWORD *)(a1 + 624); if ( v20 != v19 ) { v21 = v19; if ( v19 ) { cocos2d::CCObject::retain(v19); v20 = *(_QWORD *)(a1 + 624); } if ( v20 ) cocos2d::CCObject::release(v20); *(_QWORD *)(a1 + 624) = v21; } v22 = operator new(0x78u); cocos2d::CCGLProgram::CCGLProgram(v22); cocos2d::CCGLProgram::initWithVertexShaderByteArray(v22, off_100BDEAC0[0], off_100BDEAE0[0]); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 664LL))(a1, v22); cocos2d::CCObject::release(v22); v23 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1); cocos2d::CCGLProgram::addAttribute(v23, "a_position", 0); v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1); cocos2d::CCGLProgram::addAttribute(v24, "a_color", 1); v25 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1); cocos2d::CCGLProgram::addAttribute(v25, "a_texCoord", 2); v26 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1); cocos2d::CCGLProgram::link(v26); v27 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1); cocos2d::CCGLProgram::updateUniforms(v27); v28 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1); *(_DWORD *)(a1 + 632) = glGetUniformLocation(*(_DWORD *)(v28 + 56), "u_texture"); v29 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1); *(_DWORD *)(a1 + 636) = glGetUniformLocation(*(_DWORD *)(v29 + 56), "u_mask"); (*(void (__fastcall **)(_BYTE *))(**(_QWORD **)(a1 + 624) + 144LL))(v30); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)a1 + 320LL))(a1, v30); sub_1003914D0(a1); return v33; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source