{"type": "func", "start": 4298657056, "end": 4298657336, "name": "AnimatedGameObject::playAnimation", "pseudocode": "// \n// AnimatedGameObject::playAnimation from 0x100384d20 to 0x100384e38 (280 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::loadActiveSaveObjects @ 0x10012156c\n// > GJBaseGameLayer::playAnimationCommand @ 0x1001ea61c\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\n// local variable allocation has failed, the output may be wrong!\nvoid __fastcall AnimatedGameObject::playAnimation(AnimatedGameObject *a1, int a2)\n{\n  std::string::size_type size; // x8\n  _BOOL4 m_isActivated; // w9\n  CCAnimatedSprite *m_animatedSprite; // x19\n  std::string *p_dst; // x8\n  std::string v8; // [xsp+0h] [xbp-60h] BYREF\n  std::string __dst; // [xsp+20h] [xbp-40h] BYREF\n  std::string __str; // [xsp+38h] [xbp-28h] BYREF\n\n  AnimatedGameObject::animationForID(&__str, *(_QWORD *)&a2, (unsigned int)a1->m_objectID);\n  size = HIBYTE(__str.__r_.__value_.__r.__words[2]);\n  if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )\n    size = __str.__r_.__value_.__l.__size_;\n  if ( size )\n  {\n    a1->m_animationID = a2;\n    std::string::operator=((std::string *)&a1->m_currentAnimation, &__str);\n    a1->m_playingAnimation = 1;\n    m_isActivated = a1->m_isActivated;\n    m_animatedSprite = a1->m_animatedSprite;\n    if ( m_isActivated )\n    {\n      if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n        sub_1000097D0(&__dst, __str.__r_.__value_.__l.__data_, __str.__r_.__value_.__l.__size_);\n      else\n        __dst = __str;\n      CCAnimatedSprite::tweenToAnimation((__int64)m_animatedSprite, (__int64)&__dst, 0.05);\n      if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )\n      {\n        p_dst = &__dst;\nLABEL_15:\n        operator delete(p_dst->__r_.__value_.__l.__data_);\n      }\n    }\n    else\n    {\n      if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n        sub_1000097D0(&v8, __str.__r_.__value_.__l.__data_, __str.__r_.__value_.__l.__size_);\n      else\n        v8 = __str;\n      CCAnimatedSprite::runAnimationForced((__int64)m_animatedSprite, (__int64)&v8);\n      if ( SHIBYTE(v8.__r_.__value_.__r.__words[2]) < 0 )\n      {\n        p_dst = &v8;\n        goto LABEL_15;\n      }\n    }\n  }\n  if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__str.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; AnimatedGameObject::playAnimation from 0x100384d20 to 0x100384e38 (280 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::loadActiveSaveObjects @ 0x10012156c\n; > GJBaseGameLayer::playAnimationCommand @ 0x1001ea61c\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, 0x100384d20\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x4, 0x100384d24\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x8, 0x100384d28\nADD             X29, SP, #0x60                                         ; +0xc, 0x100384d2c\nMOV             X20, X1                                                ; +0x10, 0x100384d30\nMOV             X19, X0                                                ; +0x14, 0x100384d34\nLDR             W1, [X0,#0x404]                                        ; +0x18, 0x100384d38\nSUB             X8, X29, #-__str                                       ; +0x1c, 0x100384d3c\nMOV             X0, X20                                                ; +0x20, 0x100384d40\nBL              AnimatedGameObject__animationForID                     ; +0x24, 0x100384d44\nLDURB           W8, [X29,#__str.__r_.__value_+0x17]                    ; +0x28, 0x100384d48\nSXTB            W9, W8                                                 ; +0x2c, 0x100384d4c\nLDUR            X10, [X29,#__str.__r_.__value_+8]                      ; +0x30, 0x100384d50\nCMP             W9, #0                                                 ; +0x34, 0x100384d54\nCSEL            X8, X10, X8, LT                                        ; +0x38, 0x100384d58\nCBZ             X8, loc_100384E18                                      ; +0x3c, 0x100384d5c\nSTR             W20, [X19,#0x5F4]                                      ; +0x40, 0x100384d60\nADD             X0, X19, #0x5D8; this                                  ; +0x44, 0x100384d64\nSUB             X1, X29, #-__str; __str                                ; +0x48, 0x100384d68\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x4c, 0x100384d6c\nMOV             W8, #1                                                 ; +0x50, 0x100384d70\nSTRB            W8, [X19,#0x5D1]                                       ; +0x54, 0x100384d74\nLDRB            W9, [X19,#0x305]                                       ; +0x58, 0x100384d78\nLDR             X19, [X19,#0x5B8]                                      ; +0x5c, 0x100384d7c\nLDURSB          W8, [X29,#__str.__r_.__value_+0x17]                    ; +0x60, 0x100384d80\nCMP             W9, #1                                                 ; +0x64, 0x100384d84\nB.NE            loc_100384DA4                                          ; +0x68, 0x100384d88\nTBNZ            W8, #0x1F, loc_100384DBC                               ; +0x6c, 0x100384d8c\nLDUR            Q0, [X29,#__str]                                       ; +0x70, 0x100384d90\nSTR             Q0, [SP,#0x60+__dst]                                   ; +0x74, 0x100384d94\nLDUR            X8, [X29,#-0x18]                                       ; +0x78, 0x100384d98\nSTR             X8, [SP,#0x60+var_30]                                  ; +0x7c, 0x100384d9c\nB               loc_100384DC8                                          ; +0x80, 0x100384da0\nTBNZ            W8, #0x1F, loc_100384DEC                               ; +0x84, 0x100384da4\nLDUR            Q0, [X29,#__str]                                       ; +0x88, 0x100384da8\nSTR             Q0, [SP,#0x60+var_60]                                  ; +0x8c, 0x100384dac\nLDUR            X8, [X29,#-0x18]                                       ; +0x90, 0x100384db0\nSTR             X8, [SP,#0x60+var_50]                                  ; +0x94, 0x100384db4\nB               loc_100384DF8                                          ; +0x98, 0x100384db8\nLDP             X1, X2, [X29,#__str]; __src                            ; +0x9c, 0x100384dbc\nADD             X0, SP, #0x60+__dst; __dst                             ; +0xa0, 0x100384dc0\nBL              sub_1000097D0                                          ; +0xa4, 0x100384dc4\nADRP            X8, #dword_1006356A0@PAGE                              ; +0xa8, 0x100384dc8\nLDR             S0, [X8,#dword_1006356A0@PAGEOFF]                      ; +0xac, 0x100384dcc\nADD             X1, SP, #0x60+__dst                                    ; +0xb0, 0x100384dd0\nMOV             X0, X19                                                ; +0xb4, 0x100384dd4\nBL              CCAnimatedSprite__tweenToAnimation                     ; +0xb8, 0x100384dd8\nLDRSB           W8, [SP,#0x60+var_30+7]                                ; +0xbc, 0x100384ddc\nTBZ             W8, #0x1F, loc_100384E18                               ; +0xc0, 0x100384de0\nADD             X8, SP, #0x60+__dst                                    ; +0xc4, 0x100384de4\nB               loc_100384E10                                          ; +0xc8, 0x100384de8\nLDP             X1, X2, [X29,#__str]; __src                            ; +0xcc, 0x100384dec\nMOV             X0, SP; __dst                                          ; +0xd0, 0x100384df0\nBL              sub_1000097D0                                          ; +0xd4, 0x100384df4\nMOV             X1, SP                                                 ; +0xd8, 0x100384df8\nMOV             X0, X19                                                ; +0xdc, 0x100384dfc\nBL              CCAnimatedSprite__runAnimationForced                   ; +0xe0, 0x100384e00\nLDRSB           W8, [SP,#0x60+var_50+7]                                ; +0xe4, 0x100384e04\nTBZ             W8, #0x1F, loc_100384E18                               ; +0xe8, 0x100384e08\nMOV             X8, SP                                                 ; +0xec, 0x100384e0c\nLDR             X0, [X8]; __p                                          ; +0xf0, 0x100384e10\nBL              __ZdlPv; operator delete(void *)                       ; +0xf4, 0x100384e14\nLDURSB          W8, [X29,#__str.__r_.__value_+0x17]                    ; +0xf8, 0x100384e18\nTBZ             W8, #0x1F, loc_100384E28                               ; +0xfc, 0x100384e1c\nLDUR            X0, [X29,#__str]; __p                                  ; +0x100, 0x100384e20\nBL              __ZdlPv; operator delete(void *)                       ; +0x104, 0x100384e24\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x108, 0x100384e28\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x10c, 0x100384e2c\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x110, 0x100384e30\nRET                                                                    ; +0x114, 0x100384e34", "xrefs": ["PlayLayer::loadActiveSaveObjects @ 0x10012156c", "GJBaseGameLayer::playAnimationCommand @ 0x1001ea61c"], "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"}