{"type": "func", "start": 4296684868, "end": 4296685076, "name": "CCSpriteWithHue::createWithSpriteFrame", "pseudocode": "// \n// CCSpriteWithHue::createWithSpriteFrame from 0x1001a3544 to 0x1001a3614 (208 bytes)\n// \n// 1 xrefs:\n// > CCSpriteWithHue::createWithSpriteFrameName @ 0x1001a3660\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\nCCSpriteWithHue *__fastcall CCSpriteWithHue::createWithSpriteFrame(cocos2d::CCSpriteFrame *a1)\n{\n  CCSpriteWithHue *v2; // x0\n  CCSpriteWithHue *v3; // x19\n  __int64 (__fastcall **v4)(); // x8\n  cocos2d::CCTexture2D *Texture; // x0\n  char v6; // w21\n\n  v2 = (CCSpriteWithHue *)operator new(0x298u, &std::nothrow);\n  v3 = v2;\n  if ( v2 )\n  {\n    bzero(v2, 0x298u);\n    cocos2d::CCSprite::CCSprite(v3);\n    v4 = &off_1007ACA18;\n    v3->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCSpriteWithHue_vtbl *)&off_1007ACA18;\n    v3->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)off_1007ACF08;\n    v3->cocos2d::CCSprite::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)off_1007ACF88;\n    if ( a1 )\n    {\n      Texture = cocos2d::CCSpriteFrame::getTexture(a1);\n      v6 = ((__int64 (__fastcall *)(CCSpriteWithHue *, cocos2d::CCTexture2D *, cocos2d::CCRect *))v3->initWithTexture_0)(\n             v3,\n             Texture,\n             &a1->m_obRect);\n      ((void (__fastcall *)(CCSpriteWithHue *, cocos2d::CCSpriteFrame *))v3->setDisplayFrame)(v3, a1);\n      if ( (v6 & 1) != 0 )\n      {\n        cocos2d::CCObject::autorelease(v3);\n        return v3;\n      }\n      v4 = (__int64 (__fastcall **)())v3->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    }\n    ((void (__fastcall *)(CCSpriteWithHue *))v4[2])(v3);\n    return nullptr;\n  }\n  return v3;\n}", "assembly": "; \n; CCSpriteWithHue::createWithSpriteFrame from 0x1001a3544 to 0x1001a3614 (208 bytes)\n; \n; 1 xrefs:\n; > CCSpriteWithHue::createWithSpriteFrameName @ 0x1001a3660\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\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1001a3544\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001a3548\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001a354c\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001a3550\nMOV             X20, X0                                                ; +0x10, 0x1001a3554\nADRP            X1, #__ZSt7nothrow_ptr@PAGE                            ; +0x14, 0x1001a3558\nLDR             X1, [X1,#__ZSt7nothrow_ptr@PAGEOFF]; std::nothrow_t *  ; +0x18, 0x1001a355c\nMOV             W0, #0x298; __sz                                       ; +0x1c, 0x1001a3560\nBL              __ZnwmRKSt9nothrow_t; operator new(ulong,std::nothrow_t const&) ; +0x20, 0x1001a3564\nMOV             X19, X0                                                ; +0x24, 0x1001a3568\nCBZ             X0, loc_1001A3600                                      ; +0x28, 0x1001a356c\nMOV             X0, X19; void *                                        ; +0x2c, 0x1001a3570\nMOV             W1, #0x298; size_t                                     ; +0x30, 0x1001a3574\nBL              _bzero                                                 ; +0x34, 0x1001a3578\nMOV             X0, X19                                                ; +0x38, 0x1001a357c\nBL              cocos2d__CCSprite__CCSprite                            ; +0x3c, 0x1001a3580\nADRL            X8, off_1007ACA18                                      ; +0x40, 0x1001a3584\nSTR             X8, [X19]                                              ; +0x48, 0x1001a358c\nADD             X9, X8, #(off_1007ACF08 - 0x1007ACA18)                 ; +0x4c, 0x1001a3590\nSTR             X9, [X19,#0x140]                                       ; +0x50, 0x1001a3594\nADD             X9, X8, #(off_1007ACF88 - 0x1007ACA18)                 ; +0x54, 0x1001a3598\nSTR             X9, [X19,#0x158]                                       ; +0x58, 0x1001a359c\nCBZ             X20, loc_1001A35F0                                     ; +0x5c, 0x1001a35a0\nMOV             X0, X20                                                ; +0x60, 0x1001a35a4\nBL              cocos2d__CCSpriteFrame__getTexture                     ; +0x64, 0x1001a35a8\nMOV             X1, X0                                                 ; +0x68, 0x1001a35ac\nLDR             X8, [X19]                                              ; +0x6c, 0x1001a35b0\nLDR             X8, [X8,#0x3E8]                                        ; +0x70, 0x1001a35b4\nADD             X2, X20, #0x5C ; '\\'                                   ; +0x74, 0x1001a35b8\nMOV             X0, X19                                                ; +0x78, 0x1001a35bc\nBLR             X8                                                     ; +0x7c, 0x1001a35c0\nMOV             X21, X0                                                ; +0x80, 0x1001a35c4\nLDR             X8, [X19]                                              ; +0x84, 0x1001a35c8\nLDR             X8, [X8,#0x478]                                        ; +0x88, 0x1001a35cc\nMOV             X0, X19                                                ; +0x8c, 0x1001a35d0\nMOV             X1, X20                                                ; +0x90, 0x1001a35d4\nBLR             X8                                                     ; +0x94, 0x1001a35d8\nTBZ             W21, #0, loc_1001A35EC                                 ; +0x98, 0x1001a35dc\nMOV             X0, X19                                                ; +0x9c, 0x1001a35e0\nBL              cocos2d__CCObject__autorelease                         ; +0xa0, 0x1001a35e4\nB               loc_1001A3600                                          ; +0xa4, 0x1001a35e8\nLDR             X8, [X19]                                              ; +0xa8, 0x1001a35ec\nLDR             X8, [X8,#0x10]                                         ; +0xac, 0x1001a35f0\nMOV             X0, X19                                                ; +0xb0, 0x1001a35f4\nBLR             X8                                                     ; +0xb4, 0x1001a35f8\nMOV             X19, #0                                                ; +0xb8, 0x1001a35fc\nMOV             X0, X19                                                ; +0xbc, 0x1001a3600\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xc0, 0x1001a3604\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xc4, 0x1001a3608\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xc8, 0x1001a360c\nRET                                                                    ; +0xcc, 0x1001a3610", "xrefs": ["CCSpriteWithHue::createWithSpriteFrameName @ 0x1001a3660"], "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"}