{"type": "func", "start": 4298101472, "end": 4298101780, "name": "CCAnimatedSprite::initWithType", "pseudocode": "// \n// CCAnimatedSprite::initWithType from 0x1002fd2e0 to 0x1002fd414 (308 bytes)\n// \n// 3 xrefs:\n// > AnimatedShopKeeper::init @ 0x10014e640\n// > GJRobotSprite::init @ 0x10023f444\n// > CCAnimatedSprite::createWithType @ 0x1002fd290\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\nbool __fastcall CCAnimatedSprite::initWithType(CCAnimatedSprite *a1, const char *a2, cocos2d::CCTexture2D *a3, bool a4)\n{\n  cocos2d::CCTexture2D *v5; // x22\n  ObjectManager *v8; // x0\n  cocos2d::CCDictionary *Definition; // x22\n  cocos2d::CCString *v10; // x0\n  char *CString; // x0\n  cocos2d::CCTextureCache *v12; // x0\n  std::string *v13; // x1\n  _BOOL4 v14; // w23\n  void *__p[2]; // [xsp+0h] [xbp-60h] BYREF\n  char v17; // [xsp+17h] [xbp-49h]\n  std::string v18; // [xsp+18h] [xbp-48h] BYREF\n\n  v5 = a3;\n  if ( !a3 )\n  {\n    v8 = ObjectManager::instance();\n    Definition = ObjectManager::getDefinition(v8, a2);\n    sub_100009900(__p, \"spriteSheet\");\n    v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(Definition, __p);\n    CString = (char *)cocos2d::CCString::getCString(v10);\n    sub_100009900(&v18, CString);\n    if ( v17 < 0 )\n      operator delete(__p[0]);\n    std::string::append(&v18, \".png\");\n    v12 = cocos2d::CCTextureCache::sharedTextureCache();\n    if ( (v18.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n      v13 = &v18;\n    else\n      v13 = (std::string *)v18.__r_.__value_.__r.__words[0];\n    v5 = cocos2d::CCTextureCache::addImage(v12, (const char *)v13, 0);\n    if ( SHIBYTE(v18.__r_.__value_.__r.__words[2]) < 0 )\n      operator delete(v18.__r_.__value_.__l.__data_);\n  }\n  sub_100022990((float *)&v18, 0.0, 0.0, 0.0, 0.0);\n  v14 = cocos2d::CCSprite::initWithTexture_1(a1, v5, (const cocos2d::CCRect *)&v18);\n  if ( v14 )\n  {\n    a1->m_bDontDraw = 1;\n    std::string::assign((std::string *)&a1->m_unkString1, \"\");\n    CCAnimatedSprite::loadType(a1, a2, v5, a4);\n  }\n  return v14;\n}", "assembly": "; \n; CCAnimatedSprite::initWithType from 0x1002fd2e0 to 0x1002fd414 (308 bytes)\n; \n; 3 xrefs:\n; > AnimatedShopKeeper::init @ 0x10014e640\n; > GJRobotSprite::init @ 0x10023f444\n; > CCAnimatedSprite::createWithType @ 0x1002fd290\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x1002fd2e0\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x4, 0x1002fd2e4\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x8, 0x1002fd2e8\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0xc, 0x1002fd2ec\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x10, 0x1002fd2f0\nADD             X29, SP, #0x60                                         ; +0x14, 0x1002fd2f4\nMOV             X19, X3                                                ; +0x18, 0x1002fd2f8\nMOV             X22, X2                                                ; +0x1c, 0x1002fd2fc\nMOV             X20, X1                                                ; +0x20, 0x1002fd300\nMOV             X21, X0                                                ; +0x24, 0x1002fd304\nCBNZ            X2, loc_1002FD39C                                      ; +0x28, 0x1002fd308\nBL              ObjectManager__instance                                ; +0x2c, 0x1002fd30c\nMOV             X1, X20                                                ; +0x30, 0x1002fd310\nBL              ObjectManager__getDefinition                           ; +0x34, 0x1002fd314\nMOV             X22, X0                                                ; +0x38, 0x1002fd318\nADRL            X1, aSpritesheet; \"spriteSheet\"                        ; +0x3c, 0x1002fd31c\nMOV             X0, SP; int                                            ; +0x44, 0x1002fd324\nBL              sub_100009900                                          ; +0x48, 0x1002fd328\nMOV             X1, SP                                                 ; +0x4c, 0x1002fd32c\nMOV             X0, X22                                                ; +0x50, 0x1002fd330\nBL              cocos2d__CCDictionary__valueForKey_1                   ; +0x54, 0x1002fd334\nBL              cocos2d__CCString__getCString                          ; +0x58, 0x1002fd338\nMOV             X1, X0; __s                                            ; +0x5c, 0x1002fd33c\nADD             X0, SP, #0x60+var_48; int                              ; +0x60, 0x1002fd340\nBL              sub_100009900                                          ; +0x64, 0x1002fd344\nLDRSB           W8, [SP,#0x60+var_49]                                  ; +0x68, 0x1002fd348\nTBZ             W8, #0x1F, loc_1002FD358                               ; +0x6c, 0x1002fd34c\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x70, 0x1002fd350\nBL              __ZdlPv; operator delete(void *)                       ; +0x74, 0x1002fd354\nADRL            X1, aPng; \".png\"                                       ; +0x78, 0x1002fd358\nADD             X0, SP, #0x60+var_48; this                             ; +0x80, 0x1002fd360\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0x84, 0x1002fd364\nBL              cocos2d__CCTextureCache__sharedTextureCache            ; +0x88, 0x1002fd368\nLDRSB           W8, [SP,#0x60+var_48.__r_.__value_+0x17]               ; +0x8c, 0x1002fd36c\nLDR             X9, [SP,#0x60+var_48]                                  ; +0x90, 0x1002fd370\nCMP             W8, #0                                                 ; +0x94, 0x1002fd374\nADD             X8, SP, #0x60+var_48                                   ; +0x98, 0x1002fd378\nCSEL            X1, X9, X8, LT                                         ; +0x9c, 0x1002fd37c\nMOV             W2, #0                                                 ; +0xa0, 0x1002fd380\nBL              cocos2d__CCTextureCache__addImage                      ; +0xa4, 0x1002fd384\nMOV             X22, X0                                                ; +0xa8, 0x1002fd388\nLDRSB           W8, [SP,#0x60+var_48.__r_.__value_+0x17]               ; +0xac, 0x1002fd38c\nTBZ             W8, #0x1F, loc_1002FD39C                               ; +0xb0, 0x1002fd390\nLDR             X0, [SP,#0x60+var_48]; __p                             ; +0xb4, 0x1002fd394\nBL              __ZdlPv; operator delete(void *)                       ; +0xb8, 0x1002fd398\nADD             X0, SP, #0x60+var_48                                   ; +0xbc, 0x1002fd39c\nFMOV            S0, WZR                                                ; +0xc0, 0x1002fd3a0\nFMOV            S1, WZR                                                ; +0xc4, 0x1002fd3a4\nFMOV            S2, WZR                                                ; +0xc8, 0x1002fd3a8\nFMOV            S3, WZR                                                ; +0xcc, 0x1002fd3ac\nBL              sub_100022990                                          ; +0xd0, 0x1002fd3b0\nADD             X2, SP, #0x60+var_48                                   ; +0xd4, 0x1002fd3b4\nMOV             X0, X21                                                ; +0xd8, 0x1002fd3b8\nMOV             X1, X22                                                ; +0xdc, 0x1002fd3bc\nBL              cocos2d__CCSprite__initWithTexture_1                   ; +0xe0, 0x1002fd3c0\nMOV             X23, X0                                                ; +0xe4, 0x1002fd3c4\nCBZ             W0, loc_1002FD3F8                                      ; +0xe8, 0x1002fd3c8\nMOV             W8, #1                                                 ; +0xec, 0x1002fd3cc\nSTRB            W8, [X21,#0x22F]                                       ; +0xf0, 0x1002fd3d0\nADRL            X1, asc_100746688; \"\"                                  ; +0xf4, 0x1002fd3d4\nADD             X0, X21, #0x258; this                                  ; +0xfc, 0x1002fd3dc\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x100, 0x1002fd3e0\nMOV             X0, X21                                                ; +0x104, 0x1002fd3e4\nMOV             X1, X20                                                ; +0x108, 0x1002fd3e8\nMOV             X2, X22                                                ; +0x10c, 0x1002fd3ec\nMOV             X3, X19                                                ; +0x110, 0x1002fd3f0\nBL              CCAnimatedSprite__loadType                             ; +0x114, 0x1002fd3f4\nMOV             X0, X23                                                ; +0x118, 0x1002fd3f8\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x11c, 0x1002fd3fc\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x120, 0x1002fd400\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x124, 0x1002fd404\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x128, 0x1002fd408\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x12c, 0x1002fd40c\nRET                                                                    ; +0x130, 0x1002fd410", "xrefs": ["AnimatedShopKeeper::init @ 0x10014e640", "GJRobotSprite::init @ 0x10023f444", "CCAnimatedSprite::createWithType @ 0x1002fd290"], "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"}