{"type": "func", "start": 8944856, "end": 8945328, "name": "AnimatedGameObject::init", "pseudocode": "// \n// AnimatedGameObject::init from 0x887cd8 to 0x887eb0 (472 bytes)\n// \n// 2 xrefs:\n// > AnimatedGameObject::create @ 0x8883d0\n// > <???> @ 0xca930\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:56:00 +0000\n// \n\n__int64 __fastcall AnimatedGameObject::init(AnimatedGameObject *this, int a2)\n{\n  unsigned int v4; // w22\n  char *v5; // x0\n  __int64 v6; // x0\n  cocos2d::CCTexture2D *v7; // x0\n  unsigned __int8 v8; // w0\n  const cocos2d::CCSize *v9; // x0\n  __int64 v10; // x23\n  void (__fastcall *v11)(__int64, _BYTE *); // x21\n  float v13[2]; // [xsp+58h] [xbp+58h] BYREF\n  _BYTE v14[8]; // [xsp+60h] [xbp+60h] BYREF\n\n  *((_DWORD *)this + 257) = a2;\n  *((_DWORD *)this + 312) = 2;\n  if ( a2 == 1327 )\n  {\n    v5 = \"GJBeast02\";\n  }\n  else if ( a2 <= 1327 )\n  {\n    if ( a2 == 918 )\n    {\n      v5 = \"GJBeast01\";\n      *((_BYTE *)this + 1520) = 1;\n    }\n    else\n    {\n      if ( a2 != 919 )\n        return 0;\n      v5 = \"BlackSludge\";\n    }\n  }\n  else\n  {\n    switch ( a2 )\n    {\n      case 1584:\n        v5 = \"GJBeast04\";\n        *((_BYTE *)this + 1520) = 1;\n        break;\n      case 2012:\n        v5 = \"GJBeast05\";\n        *((_BYTE *)this + 1520) = 1;\n        break;\n      case 1328:\n        v5 = \"GJBeast03\";\n        break;\n      default:\n        return 0;\n    }\n  }\n  v6 = CCAnimatedSprite::createWithType((CCAnimatedSprite *)v5, nullptr, nullptr);\n  *((_QWORD *)this + 183) = v6;\n  SpriteAnimationManager::stopAnimations(*(SpriteAnimationManager **)(v6 + 648));\n  *(_QWORD *)(*((_QWORD *)this + 183) + 712LL) = (char *)this + 1448;\n  v7 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 183) + 1072LL))(*((_QWORD *)this + 183));\n  v8 = GameObject::initWithTexture(this, v7);\n  v4 = v8;\n  if ( v8 )\n  {\n    AnimatedGameObject::setupAnimatedSize(this, a2);\n    (*(void (__fastcall **)(AnimatedGameObject *, _QWORD))(*(_QWORD *)this + 456LL))(this, *((_QWORD *)this + 183));\n    v9 = (const cocos2d::CCSize *)(*(__int64 (__fastcall **)(AnimatedGameObject *))(*(_QWORD *)this + 328LL))(this);\n    cocos2d::CCSize::CCSize((cocos2d::CCSize *)v13, v9);\n    v10 = *((_QWORD *)this + 183);\n    v11 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v10 + 184LL);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, v13[0] * 0.5, v13[1] * 0.5);\n    v11(v10, v14);\n    *((_BYTE *)this + 313) = 0;\n    *((_BYTE *)this + 887) = 1;\n    AnimatedGameObject::setupChildSprites(this);\n  }\n  return v4;\n}", "assembly": "; \n; AnimatedGameObject::init from 0x887cd8 to 0x887eb0 (472 bytes)\n; \n; 2 xrefs:\n; > AnimatedGameObject::create @ 0x8883d0\n; > <???> @ 0xca930\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:56:00 +0000\n; \nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x887cd8\nCMP             W1, #0x52F                                             ; +0x4, 0x887cdc\nMOV             X29, SP                                                ; +0x8, 0x887ce0\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0xc, 0x887ce4\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x887ce8\nMOV             X19, X0                                                ; +0x14, 0x887cec\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x18, 0x887cf0\nSTR             X23, [SP,#0x70+var_40]                                 ; +0x1c, 0x887cf4\nMOV             W21, W1                                                ; +0x20, 0x887cf8\nLDR             X0, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x887cfc\nMOV             W1, #2                                                 ; +0x28, 0x887d00\nSTR             W21, [X19,#0x404]                                      ; +0x2c, 0x887d04\nSTR             W1, [X19,#0x4E0]                                       ; +0x30, 0x887d08\nLDR             X0, [X0]                                               ; +0x34, 0x887d0c\nSTR             X0, [X29,#0x70+var_8]                                  ; +0x38, 0x887d10\nB.EQ            loc_887EA0                                             ; +0x3c, 0x887d14\nB.LE            loc_887D3C                                             ; +0x40, 0x887d18\nCMP             W21, #0x630                                            ; +0x44, 0x887d1c\nB.EQ            loc_887E58                                             ; +0x48, 0x887d20\nCMP             W21, #0x7DC                                            ; +0x4c, 0x887d24\nB.EQ            loc_887E8C                                             ; +0x50, 0x887d28\nCMP             W21, #0x530                                            ; +0x54, 0x887d2c\nB.EQ            loc_887E6C                                             ; +0x58, 0x887d30\nMOV             W22, #0                                                ; +0x5c, 0x887d34\nB               loc_887E2C                                             ; +0x60, 0x887d38\nCMP             W21, #0x396                                            ; +0x64, 0x887d3c\nB.EQ            loc_887E78                                             ; +0x68, 0x887d40\nCMP             W21, #0x397                                            ; +0x6c, 0x887d44\nB.NE            loc_887D34                                             ; +0x70, 0x887d48\nADRL            X0, aBlacksludge; \"BlackSludge\"                        ; +0x74, 0x887d4c\nMOV             W2, #0; cocos2d::CCTexture2D *                         ; +0x7c, 0x887d54\nMOV             X1, #0; char *                                         ; +0x80, 0x887d58\nBL              _ZN16CCAnimatedSprite14createWithTypeEPKcPN7cocos2d11CCTexture2DEb; CCAnimatedSprite::createWithType(char const*,cocos2d::CCTexture2D *,bool) ; +0x84, 0x887d5c\nSTR             X0, [X19,#0x5B8]                                       ; +0x88, 0x887d60\nLDR             X0, [X0,#0x288]; this                                  ; +0x8c, 0x887d64\nBL              _ZN22SpriteAnimationManager14stopAnimationsEv; SpriteAnimationManager::stopAnimations(void) ; +0x90, 0x887d68\nLDR             X0, [X19,#0x5B8]                                       ; +0x94, 0x887d6c\nADD             X1, X19, #0x5A8                                        ; +0x98, 0x887d70\nSTR             X1, [X0,#0x2C8]                                        ; +0x9c, 0x887d74\nLDR             X1, [X19,#0x5B8]                                       ; +0xa0, 0x887d78\nMOV             X0, X1                                                 ; +0xa4, 0x887d7c\nLDR             X1, [X1]                                               ; +0xa8, 0x887d80\nLDR             X1, [X1,#0x430]                                        ; +0xac, 0x887d84\nBLR             X1                                                     ; +0xb0, 0x887d88\nMOV             X1, X0; cocos2d::CCTexture2D *                         ; +0xb4, 0x887d8c\nMOV             X0, X19; this                                          ; +0xb8, 0x887d90\nBL              _ZN10GameObject15initWithTextureEPN7cocos2d11CCTexture2DE; GameObject::initWithTexture(cocos2d::CCTexture2D *) ; +0xbc, 0x887d94\nUXTB            W22, W0                                                ; +0xc0, 0x887d98\nCBZ             W22, loc_887E2C                                        ; +0xc4, 0x887d9c\nMOV             W1, W21; int                                           ; +0xc8, 0x887da0\nMOV             X0, X19; this                                          ; +0xcc, 0x887da4\nADD             X21, X29, #0x70+var_10                                 ; +0xd0, 0x887da8\nBL              _ZN18AnimatedGameObject17setupAnimatedSizeEi; AnimatedGameObject::setupAnimatedSize(int) ; +0xd4, 0x887dac\nLDR             X2, [X19]                                              ; +0xd8, 0x887db0\nMOV             X0, X19                                                ; +0xdc, 0x887db4\nLDR             X1, [X19,#0x5B8]                                       ; +0xe0, 0x887db8\nLDR             X2, [X2,#0x1C8]                                        ; +0xe4, 0x887dbc\nBLR             X2                                                     ; +0xe8, 0x887dc0\nLDR             X1, [X19]                                              ; +0xec, 0x887dc4\nMOV             X0, X19                                                ; +0xf0, 0x887dc8\nLDR             X1, [X1,#0x148]                                        ; +0xf4, 0x887dcc\nBLR             X1                                                     ; +0xf8, 0x887dd0\nMOV             X1, X0; cocos2d::CCSize *                              ; +0xfc, 0x887dd4\nADD             X0, X29, #0x70+var_18; this                            ; +0x100, 0x887dd8\nBL              _ZN7cocos2d6CCSizeC1ERKS0_; cocos2d::CCSize::CCSize(cocos2d::CCSize const&) ; +0x104, 0x887ddc\nLDR             X23, [X19,#0x5B8]                                      ; +0x108, 0x887de0\nLDR             S2, [X29,#0x70+var_14]                                 ; +0x10c, 0x887de4\nMOV             X0, X21; this                                          ; +0x110, 0x887de8\nFMOV            S1, #0.5                                               ; +0x114, 0x887dec\nSTR             X21, [X29,#0x70+var_28]                                ; +0x118, 0x887df0\nLDR             S0, [X29,#0x70+var_18]                                 ; +0x11c, 0x887df4\nLDR             X2, [X23]                                              ; +0x120, 0x887df8\nFMUL            S0, S0, S1; float                                      ; +0x124, 0x887dfc\nFMUL            S1, S2, S1; float                                      ; +0x128, 0x887e00\nLDR             X21, [X2,#0xB8]                                        ; +0x12c, 0x887e04\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x130, 0x887e08\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x134, 0x887e0c\nMOV             X0, X23                                                ; +0x138, 0x887e10\nBLR             X21                                                    ; +0x13c, 0x887e14\nSTRB            WZR, [X19,#0x139]                                      ; +0x140, 0x887e18\nMOV             W1, #1                                                 ; +0x144, 0x887e1c\nMOV             X0, X19; this                                          ; +0x148, 0x887e20\nSTRB            W1, [X19,#0x377]                                       ; +0x14c, 0x887e24\nBL              _ZN18AnimatedGameObject17setupChildSpritesEv; AnimatedGameObject::setupChildSprites(void) ; +0x150, 0x887e28\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x154, 0x887e2c\nMOV             W0, W22                                                ; +0x158, 0x887e30\nLDR             X19, [X29,#0x70+var_8]                                 ; +0x15c, 0x887e34\nLDR             X1, [X20]                                              ; +0x160, 0x887e38\nCMP             X19, X1                                                ; +0x164, 0x887e3c\nB.NE            loc_887EAC                                             ; +0x168, 0x887e40\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x16c, 0x887e44\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x170, 0x887e48\nLDR             X23, [SP,#0x70+var_40]                                 ; +0x174, 0x887e4c\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x178, 0x887e50\nRET                                                                    ; +0x17c, 0x887e54\nADRP            X0, #aGjbeast04@PAGE; \"GJBeast04\"                      ; +0x180, 0x887e58\nMOV             W1, #1                                                 ; +0x184, 0x887e5c\nADD             X0, X0, #aGjbeast04@PAGEOFF; \"GJBeast04\"               ; +0x188, 0x887e60\nSTRB            W1, [X19,#0x5F0]                                       ; +0x18c, 0x887e64\nB               loc_887D54                                             ; +0x190, 0x887e68\nADRL            X0, aGjbeast03; \"GJBeast03\"                            ; +0x194, 0x887e6c\nB               loc_887D54                                             ; +0x19c, 0x887e74\nADRP            X0, #aGjbeast01@PAGE; \"GJBeast01\"                      ; +0x1a0, 0x887e78\nMOV             W1, #1                                                 ; +0x1a4, 0x887e7c\nADD             X0, X0, #aGjbeast01@PAGEOFF; \"GJBeast01\"               ; +0x1a8, 0x887e80\nSTRB            W1, [X19,#0x5F0]                                       ; +0x1ac, 0x887e84\nB               loc_887D54                                             ; +0x1b0, 0x887e88\nADRP            X0, #aGjbeast05@PAGE; \"GJBeast05\"                      ; +0x1b4, 0x887e8c\nMOV             W1, #1                                                 ; +0x1b8, 0x887e90\nADD             X0, X0, #aGjbeast05@PAGEOFF; \"GJBeast05\"               ; +0x1bc, 0x887e94\nSTRB            W1, [X19,#0x5F0]                                       ; +0x1c0, 0x887e98\nB               loc_887D54                                             ; +0x1c4, 0x887e9c\nADRL            X0, aGjbeast02; \"GJBeast02\"                            ; +0x1c8, 0x887ea0\nB               loc_887D54                                             ; +0x1d0, 0x887ea8\nBL              .__stack_chk_fail                                      ; +0x1d4, 0x887eac", "xrefs": ["AnimatedGameObject::create @ 0x8883d0", "<???> @ 0xca930"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}