{"type": "func", "start": 4301192768, "end": 4301192959, "name": "CCSpriteWithHue::createWithSpriteFrame", "pseudocode": "// \n// CCSpriteWithHue::createWithSpriteFrame from 0x1005efe40 to 0x1005efeff (191 bytes)\n// \n// 1 xrefs:\n// > CCSpriteWithHue::createWithSpriteFrameName @ 0x1005eff50\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 *v1; // rax\n  CCSpriteWithHue *v2; // rbx\n  __int64 (__fastcall **v3)(); // rax\n  cocos2d::CCTexture2D *Texture; // rax\n  char v5; // r15\n\n  v1 = (CCSpriteWithHue *)operator new(0x298u, &std::nothrow);\n  if ( !v1 )\n    return nullptr;\n  v2 = v1;\n  __bzero(v1, 664);\n  cocos2d::CCSprite::CCSprite((__int64)v2, 664);\n  v3 = off_10097A1A8;\n  v2->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCSpriteWithHue_vtbl *)off_10097A1A8;\n  v2->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)off_10097A698;\n  v2->cocos2d::CCSprite::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)off_10097A718;\n  if ( !a1 )\n  {\nLABEL_6:\n    ((void (__fastcall *)(CCSpriteWithHue *))v3[2])(v2);\n    return nullptr;\n  }\n  Texture = cocos2d::CCSpriteFrame::getTexture(a1);\n  v5 = ((__int64 (__fastcall *)(CCSpriteWithHue *, cocos2d::CCTexture2D *, cocos2d::CCRect *))v2->initWithTexture_0)(\n         v2,\n         Texture,\n         &a1->m_obRect);\n  ((void (__fastcall *)(CCSpriteWithHue *, cocos2d::CCSpriteFrame *))v2->setDisplayFrame)(v2, a1);\n  if ( !v5 )\n  {\n    v3 = (__int64 (__fastcall **)())v2->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    goto LABEL_6;\n  }\n  cocos2d::CCObject::autorelease(v2);\n  return v2;\n}", "assembly": "; \n; CCSpriteWithHue::createWithSpriteFrame from 0x1005efe40 to 0x1005efeff (191 bytes)\n; \n; 1 xrefs:\n; > CCSpriteWithHue::createWithSpriteFrameName @ 0x1005eff50\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\npush    rbp                                                            ; +0x0, 0x1005efe40\nmov     rbp, rsp                                                       ; +0x1, 0x1005efe41\npush    r15                                                            ; +0x4, 0x1005efe44\npush    r14                                                            ; +0x6, 0x1005efe46\npush    rbx                                                            ; +0x8, 0x1005efe48\npush    rax                                                            ; +0x9, 0x1005efe49\nmov     r14, rdi                                                       ; +0xa, 0x1005efe4a\nmov     rsi, cs:__ZSt7nothrow_ptr; std::nothrow_t *                    ; +0xd, 0x1005efe4d\nmov     edi, 298h; __sz                                                ; +0x14, 0x1005efe54\ncall    __ZnwmRKSt9nothrow_t; operator new(ulong,std::nothrow_t const&) ; +0x19, 0x1005efe59\ntest    rax, rax                                                       ; +0x1e, 0x1005efe5e\njz      loc_1005EFEEF                                                  ; +0x21, 0x1005efe61\nmov     rbx, rax                                                       ; +0x27, 0x1005efe67\nmov     esi, 298h                                                      ; +0x2a, 0x1005efe6a\nmov     rdi, rax                                                       ; +0x2f, 0x1005efe6f\ncall    ___bzero                                                       ; +0x32, 0x1005efe72\nmov     rdi, rbx                                                       ; +0x37, 0x1005efe77\ncall    cocos2d__CCSprite__CCSprite                                    ; +0x3a, 0x1005efe7a\nlea     rax, off_10097A1A8                                             ; +0x3f, 0x1005efe7f\nmov     [rbx], rax                                                     ; +0x46, 0x1005efe86\nlea     rcx, off_10097A698                                             ; +0x49, 0x1005efe89\nmov     [rbx+140h], rcx                                                ; +0x50, 0x1005efe90\nlea     rcx, off_10097A718                                             ; +0x57, 0x1005efe97\nmov     [rbx+158h], rcx                                                ; +0x5e, 0x1005efe9e\ntest    r14, r14                                                       ; +0x65, 0x1005efea5\njz      short loc_1005EFEE9                                            ; +0x68, 0x1005efea8\nmov     rdi, r14                                                       ; +0x6a, 0x1005efeaa\ncall    cocos2d__CCSpriteFrame__getTexture                             ; +0x6d, 0x1005efead\nlea     rdx, [r14+5Ch]                                                 ; +0x72, 0x1005efeb2\nmov     rcx, [rbx]                                                     ; +0x76, 0x1005efeb6\nmov     rdi, rbx                                                       ; +0x79, 0x1005efeb9\nmov     rsi, rax                                                       ; +0x7c, 0x1005efebc\ncall    qword ptr [rcx+3E8h]                                           ; +0x7f, 0x1005efebf\nmov     r15d, eax                                                      ; +0x85, 0x1005efec5\nmov     rax, [rbx]                                                     ; +0x88, 0x1005efec8\nmov     rdi, rbx                                                       ; +0x8b, 0x1005efecb\nmov     rsi, r14                                                       ; +0x8e, 0x1005efece\ncall    qword ptr [rax+478h]                                           ; +0x91, 0x1005efed1\ntest    r15b, r15b                                                     ; +0x97, 0x1005efed7\njz      short loc_1005EFEE6                                            ; +0x9a, 0x1005efeda\nmov     rdi, rbx                                                       ; +0x9c, 0x1005efedc\ncall    cocos2d__CCObject__autorelease                                 ; +0x9f, 0x1005efedf\njmp     short loc_1005EFEF1                                            ; +0xa4, 0x1005efee4\nmov     rax, [rbx]                                                     ; +0xa6, 0x1005efee6\nmov     rdi, rbx                                                       ; +0xa9, 0x1005efee9\ncall    qword ptr [rax+10h]                                            ; +0xac, 0x1005efeec\nxor     ebx, ebx                                                       ; +0xaf, 0x1005efeef\nmov     rax, rbx                                                       ; +0xb1, 0x1005efef1\nadd     rsp, 8                                                         ; +0xb4, 0x1005efef4\npop     rbx                                                            ; +0xb8, 0x1005efef8\npop     r14                                                            ; +0xb9, 0x1005efef9\npop     r15                                                            ; +0xbb, 0x1005efefb\npop     rbp                                                            ; +0xbd, 0x1005efefd\nretn                                                                   ; +0xbe, 0x1005efefe", "xrefs": ["CCSpriteWithHue::createWithSpriteFrameName @ 0x1005eff50"], "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"}