{"type": "func", "start": 6443129328, "end": 6443129430, "name": "cocos2d::CCTexture2D::initWithImage", "pseudocode": "// \n// cocos2d::CCTexture2D::initWithImage from 0x1800a59f0 to 0x1800a5a56 (102 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCTextureCache::addImage @ 0x1800a7d84\n// > cocos2d::CCTextureCache::addImageAsyncCallBack @ 0x1800a8592\n// > cocos2d::CCTextureCache::addUIImage @ 0x1800a8d05\n// > cocos2d::CCTextureCache::reloadTexture @ 0x1800a97bb\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7c5c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nchar __fastcall cocos2d::CCTexture2D::initWithImage(cocos2d::CCTexture2D *this, struct cocos2d::CCImage *a2)\n{\n  unsigned int m_nWidth; // esi\n  unsigned int m_nHeight; // edi\n  cocos2d::CCInteger *v6; // rax\n  unsigned int Value; // eax\n\n  if ( a2\n    && (m_nWidth = a2->m_nWidth,\n        m_nHeight = a2->m_nHeight,\n        v6 = (cocos2d::CCInteger *)cocos2d::CCConfiguration::sharedConfiguration(),\n        Value = cocos2d::CCInteger::getValue(v6),\n        m_nWidth <= Value)\n    && m_nHeight <= Value )\n  {\n    return cocos2d::CCTexture2D::initPremultipliedATextureWithImage(this, a2, m_nWidth, m_nHeight);\n  }\n  else\n  {\n    return 0;\n  }\n}", "assembly": "; \n; cocos2d::CCTexture2D::initWithImage from 0x1800a59f0 to 0x1800a5a56 (102 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCTextureCache::addImage @ 0x1800a7d84\n; > cocos2d::CCTextureCache::addImageAsyncCallBack @ 0x1800a8592\n; > cocos2d::CCTextureCache::addUIImage @ 0x1800a8d05\n; > cocos2d::CCTextureCache::reloadTexture @ 0x1800a97bb\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7c5c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800a59f0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800a59f5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800a59fa\npush    rdi                                                            ; +0xf, 0x1800a59ff\nsub     rsp, 20h                                                       ; +0x10, 0x1800a5a00\nmov     rbx, rdx                                                       ; +0x14, 0x1800a5a04\nmov     rbp, rcx                                                       ; +0x17, 0x1800a5a07\ntest    rdx, rdx                                                       ; +0x1a, 0x1800a5a0a\njz      short loc_1800A5A3F                                            ; +0x1d, 0x1800a5a0d\nmovzx   esi, word ptr [rdx+38h]                                        ; +0x1f, 0x1800a5a0f\nmovzx   edi, word ptr [rdx+3Ah]                                        ; +0x23, 0x1800a5a13\ncall    ?sharedConfiguration@CCConfiguration@cocos2d@@SAPEAV12@XZ; cocos2d::CCConfiguration::sharedConfiguration(void) ; +0x27, 0x1800a5a17\nmov     rcx, rax; this                                                 ; +0x2c, 0x1800a5a1c\ncall    ?getValue@CCInteger@cocos2d@@QEBAHXZ; cocos2d::CCInteger::getValue(void) ; +0x2f, 0x1800a5a1f\ncmp     esi, eax                                                       ; +0x34, 0x1800a5a24\nja      short loc_1800A5A3F                                            ; +0x36, 0x1800a5a26\ncmp     edi, eax                                                       ; +0x38, 0x1800a5a28\nja      short loc_1800A5A3F                                            ; +0x3a, 0x1800a5a2a\nmov     r9d, edi; unsigned int                                         ; +0x3c, 0x1800a5a2c\nmov     r8d, esi; unsigned int                                         ; +0x3f, 0x1800a5a2f\nmov     rdx, rbx; struct cocos2d::CCImage *                            ; +0x42, 0x1800a5a32\nmov     rcx, rbp; this                                                 ; +0x45, 0x1800a5a35\ncall    ?initPremultipliedATextureWithImage@CCTexture2D@cocos2d@@AEAA_NPEAVCCImage@2@II@Z; cocos2d::CCTexture2D::initPremultipliedATextureWithImage(cocos2d::CCImage *,uint,uint) ; +0x48, 0x1800a5a38\njmp     short loc_1800A5A41                                            ; +0x4d, 0x1800a5a3d\nxor     al, al                                                         ; +0x4f, 0x1800a5a3f\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x51, 0x1800a5a41\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x56, 0x1800a5a46\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x5b, 0x1800a5a4b\nadd     rsp, 20h                                                       ; +0x60, 0x1800a5a50\npop     rdi                                                            ; +0x64, 0x1800a5a54\nretn                                                                   ; +0x65, 0x1800a5a55", "xrefs": ["cocos2d::CCTextureCache::addImage @ 0x1800a7d84", "cocos2d::CCTextureCache::addImageAsyncCallBack @ 0x1800a8592", "cocos2d::CCTextureCache::addUIImage @ 0x1800a8d05", "cocos2d::CCTextureCache::reloadTexture @ 0x1800a97bb", "<???> @ 0x1801438a8", "<???> @ 0x1801b7c5c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}