{"type": "func", "start": 4296687256, "end": 4296687464, "name": "CCSpriteGrayscale::createWithSpriteFrame", "pseudocode": "// \n// CCSpriteGrayscale::createWithSpriteFrame from 0x1001a3e98 to 0x1001a3f68 (208 bytes)\n// \n// 1 xrefs:\n// > CCSpriteGrayscale::createWithSpriteFrameName @ 0x1001a3fb4\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\nCCSpriteGrayscale *__fastcall CCSpriteGrayscale::createWithSpriteFrame(cocos2d::CCSpriteFrame *a1)\n{\n  CCSpriteGrayscale *v2; // x0\n  CCSpriteGrayscale *v3; // x19\n  __int64 (__fastcall **v4)(); // x8\n  cocos2d::CCTexture2D *Texture; // x0\n  char v6; // w21\n\n  v2 = (CCSpriteGrayscale *)operator new(0x298u, &std::nothrow);\n  v3 = v2;\n  if ( v2 )\n  {\n    bzero(v2, 0x298u);\n    cocos2d::CCSprite::CCSprite(v3);\n    v4 = &off_1007ACFD0;\n    v3->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCSpriteGrayscale_vtbl *)&off_1007ACFD0;\n    v3->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)off_1007AD4C0;\n    v3->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)off_1007AD540;\n    if ( a1 )\n    {\n      Texture = cocos2d::CCSpriteFrame::getTexture(a1);\n      v6 = ((__int64 (__fastcall *)(CCSpriteGrayscale *, cocos2d::CCTexture2D *, cocos2d::CCRect *))v3->initWithTexture_0)(\n             v3,\n             Texture,\n             &a1->m_obRect);\n      ((void (__fastcall *)(CCSpriteGrayscale *, 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->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    }\n    ((void (__fastcall *)(CCSpriteGrayscale *))v4[2])(v3);\n    return nullptr;\n  }\n  return v3;\n}", "assembly": "; \n; CCSpriteGrayscale::createWithSpriteFrame from 0x1001a3e98 to 0x1001a3f68 (208 bytes)\n; \n; 1 xrefs:\n; > CCSpriteGrayscale::createWithSpriteFrameName @ 0x1001a3fb4\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, 0x1001a3e98\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001a3e9c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001a3ea0\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001a3ea4\nMOV             X20, X0                                                ; +0x10, 0x1001a3ea8\nADRP            X1, #__ZSt7nothrow_ptr@PAGE                            ; +0x14, 0x1001a3eac\nLDR             X1, [X1,#__ZSt7nothrow_ptr@PAGEOFF]; std::nothrow_t *  ; +0x18, 0x1001a3eb0\nMOV             W0, #0x298; __sz                                       ; +0x1c, 0x1001a3eb4\nBL              __ZnwmRKSt9nothrow_t; operator new(ulong,std::nothrow_t const&) ; +0x20, 0x1001a3eb8\nMOV             X19, X0                                                ; +0x24, 0x1001a3ebc\nCBZ             X0, loc_1001A3F54                                      ; +0x28, 0x1001a3ec0\nMOV             X0, X19; void *                                        ; +0x2c, 0x1001a3ec4\nMOV             W1, #0x298; size_t                                     ; +0x30, 0x1001a3ec8\nBL              _bzero                                                 ; +0x34, 0x1001a3ecc\nMOV             X0, X19                                                ; +0x38, 0x1001a3ed0\nBL              cocos2d__CCSprite__CCSprite                            ; +0x3c, 0x1001a3ed4\nADRL            X8, off_1007ACFD0                                      ; +0x40, 0x1001a3ed8\nSTR             X8, [X19]                                              ; +0x48, 0x1001a3ee0\nADD             X9, X8, #(off_1007AD4C0 - 0x1007ACFD0)                 ; +0x4c, 0x1001a3ee4\nSTR             X9, [X19,#0x140]                                       ; +0x50, 0x1001a3ee8\nADD             X9, X8, #(off_1007AD540 - 0x1007ACFD0)                 ; +0x54, 0x1001a3eec\nSTR             X9, [X19,#0x158]                                       ; +0x58, 0x1001a3ef0\nCBZ             X20, loc_1001A3F44                                     ; +0x5c, 0x1001a3ef4\nMOV             X0, X20                                                ; +0x60, 0x1001a3ef8\nBL              cocos2d__CCSpriteFrame__getTexture                     ; +0x64, 0x1001a3efc\nMOV             X1, X0                                                 ; +0x68, 0x1001a3f00\nLDR             X8, [X19]                                              ; +0x6c, 0x1001a3f04\nLDR             X8, [X8,#0x3E8]                                        ; +0x70, 0x1001a3f08\nADD             X2, X20, #0x5C ; '\\'                                   ; +0x74, 0x1001a3f0c\nMOV             X0, X19                                                ; +0x78, 0x1001a3f10\nBLR             X8                                                     ; +0x7c, 0x1001a3f14\nMOV             X21, X0                                                ; +0x80, 0x1001a3f18\nLDR             X8, [X19]                                              ; +0x84, 0x1001a3f1c\nLDR             X8, [X8,#0x478]                                        ; +0x88, 0x1001a3f20\nMOV             X0, X19                                                ; +0x8c, 0x1001a3f24\nMOV             X1, X20                                                ; +0x90, 0x1001a3f28\nBLR             X8                                                     ; +0x94, 0x1001a3f2c\nTBZ             W21, #0, loc_1001A3F40                                 ; +0x98, 0x1001a3f30\nMOV             X0, X19                                                ; +0x9c, 0x1001a3f34\nBL              cocos2d__CCObject__autorelease                         ; +0xa0, 0x1001a3f38\nB               loc_1001A3F54                                          ; +0xa4, 0x1001a3f3c\nLDR             X8, [X19]                                              ; +0xa8, 0x1001a3f40\nLDR             X8, [X8,#0x10]                                         ; +0xac, 0x1001a3f44\nMOV             X0, X19                                                ; +0xb0, 0x1001a3f48\nBLR             X8                                                     ; +0xb4, 0x1001a3f4c\nMOV             X19, #0                                                ; +0xb8, 0x1001a3f50\nMOV             X0, X19                                                ; +0xbc, 0x1001a3f54\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xc0, 0x1001a3f58\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xc4, 0x1001a3f5c\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xc8, 0x1001a3f60\nRET                                                                    ; +0xcc, 0x1001a3f64", "xrefs": ["CCSpriteGrayscale::createWithSpriteFrameName @ 0x1001a3fb4"], "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"}