{"type": "func", "start": 5160972, "end": 5161302, "name": "AnimatedGameObject::init", "pseudocode": "// \n// AnimatedGameObject::init from 0x4ec00c to 0x4ec156 (330 bytes)\n// \n// 1 xrefs:\n// > AnimatedGameObject::create @ 0x4ec1e0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:51:08 +0000\n// \n\nint __fastcall AnimatedGameObject::init(AnimatedGameObject *this, int a2)\n{\n  void *v2; // r3\n  char *v5; // r0\n  int v6; // r7\n  cocos2d::CCSprite *v8; // r0\n  cocos2d::CCTexture2D *v9; // r0\n  const cocos2d::CCSize *v10; // r0\n  int v11; // r8\n  void (__fastcall *v12)(int, _BYTE *); // r9\n  float v13[2]; // [sp+4h] [bp-18h] BYREF\n  _BYTE v14[8]; // [sp+Ch] [bp-10h] BYREF\n\n  v2 = &_stack_chk_guard;\n  *((_DWORD *)this + 271) = 2;\n  *((_DWORD *)this + 223) = a2;\n  if ( a2 == 1327 )\n  {\n    v5 = \"GJBeast02\";\n  }\n  else if ( a2 >= 1328 )\n  {\n    if ( a2 == 1584 )\n    {\n      LOBYTE(v2) = 1;\n      *((_BYTE *)this + 1304) = 1;\n      v5 = \"GJBeast04\";\n    }\n    else\n    {\n      LOBYTE(v2) = -36;\n      if ( a2 == 2012 )\n      {\n        LOBYTE(v2) = 1;\n        *((_BYTE *)this + 1304) = 1;\n        v5 = \"GJBeast05\";\n      }\n      else\n      {\n        if ( a2 != 1328 )\n          return 0;\n        v5 = \"GJBeast03\";\n      }\n    }\n  }\n  else\n  {\n    if ( a2 != 918 )\n    {\n      LOBYTE(v2) = -105;\n      if ( a2 == 919 )\n      {\n        v5 = \"BlackSludge\";\n        goto LABEL_16;\n      }\n      return 0;\n    }\n    LOBYTE(v2) = 1;\n    *((_BYTE *)this + 1304) = 1;\n    v5 = \"GJBeast01\";\n  }\nLABEL_16:\n  v8 = CCAnimatedSprite::createWithType((CCAnimatedSprite *)v5, nullptr, nullptr, (bool)v2);\n  *((_DWORD *)this + 319) = v8;\n  SpriteAnimationManager::stopAnimations(*((SpriteAnimationManager **)v8 + 133));\n  *(_DWORD *)(*((_DWORD *)this + 319) + 564) = (char *)this + 1268;\n  v9 = (cocos2d::CCTexture2D *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 319) + 536))(*((_DWORD *)this + 319));\n  v6 = GameObject::initWithTexture(this, v9);\n  if ( v6 )\n  {\n    AnimatedGameObject::setupAnimatedSize(this, a2);\n    (*(void (__fastcall **)(AnimatedGameObject *, _DWORD))(*(_DWORD *)this + 228))(this, *((_DWORD *)this + 319));\n    v10 = (const cocos2d::CCSize *)(*(int (__fastcall **)(AnimatedGameObject *))(*(_DWORD *)this + 164))(this);\n    cocos2d::CCSize::CCSize((cocos2d::CCSize *)v13, v10);\n    v11 = *((_DWORD *)this + 319);\n    v12 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v11 + 92);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, v13[0] * 0.5, v13[1] * 0.5);\n    v12(v11, v14);\n    *((_BYTE *)this + 755) = 1;\n    *((_BYTE *)this + 261) = 0;\n    AnimatedGameObject::setupChildSprites(this);\n  }\n  return v6;\n}", "assembly": "; \n; AnimatedGameObject::init from 0x4ec00c to 0x4ec156 (330 bytes)\n; \n; 1 xrefs:\n; > AnimatedGameObject::create @ 0x4ec1e0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:51:08 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x4EC016)                ; +0x0, 0x4ec00c\nPUSH.W          {R4-R9,LR}                                             ; +0x2, 0x4ec00e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x4ec012\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x4ec014\nSUB             SP, SP, #0x1C                                          ; +0xa, 0x4ec016\nMOV             R4, R0                                                 ; +0xc, 0x4ec018\nLDR             R2, [R3]                                               ; +0xe, 0x4ec01a\nMOV             R5, R1                                                 ; +0x10, 0x4ec01c\nMOV             R6, R3                                                 ; +0x12, 0x4ec01e\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x14, 0x4ec020\nMOVS            R2, #2                                                 ; +0x16, 0x4ec022\nSTR.W           R2, [R0,#0x43C]                                        ; +0x18, 0x4ec024\nMOVW            R2, #0x52F                                             ; +0x1c, 0x4ec028\nCMP             R1, R2                                                 ; +0x20, 0x4ec02c\nSTR.W           R1, [R4,#0x37C]                                        ; +0x22, 0x4ec02e\nBEQ             loc_4EC09A                                             ; +0x26, 0x4ec032\nCMP.W           R1, #0x530                                             ; +0x28, 0x4ec034\nBGE             loc_4EC050                                             ; +0x2c, 0x4ec038\nMOVW            R3, #0x396                                             ; +0x2e, 0x4ec03a\nCMP             R1, R3                                                 ; +0x32, 0x4ec03e\nBEQ             loc_4EC066                                             ; +0x34, 0x4ec040\nMOVW            R3, #0x397                                             ; +0x36, 0x4ec042\nCMP             R1, R3                                                 ; +0x3a, 0x4ec046\nBNE             loc_4EC08A                                             ; +0x3c, 0x4ec048\nLDR             R0, =(aBlacksludge - 0x4EC050); \"BlackSludge\"          ; +0x3e, 0x4ec04a\nADD             R0, PC; \"BlackSludge\"                                  ; +0x40, 0x4ec04c\nB               loc_4EC0A4                                             ; +0x42, 0x4ec04e\nCMP.W           R1, #0x630                                             ; +0x44, 0x4ec050\nBEQ             loc_4EC072                                             ; +0x48, 0x4ec054\nMOVW            R3, #0x7DC; bool                                       ; +0x4a, 0x4ec056\nCMP             R1, R3                                                 ; +0x4e, 0x4ec05a\nBEQ             loc_4EC07E                                             ; +0x50, 0x4ec05c\nCMP.W           R1, #0x530                                             ; +0x52, 0x4ec05e\nBNE             loc_4EC08A                                             ; +0x56, 0x4ec062\nB               loc_4EC0A0                                             ; +0x58, 0x4ec064\nMOVS            R3, #1                                                 ; +0x5a, 0x4ec066\nSTRB.W          R3, [R0,#0x518]                                        ; +0x5c, 0x4ec068\nLDR             R0, =(aGjbeast01 - 0x4EC072); \"GJBeast01\"              ; +0x60, 0x4ec06c\nADD             R0, PC; \"GJBeast01\"                                    ; +0x62, 0x4ec06e\nB               loc_4EC0A4                                             ; +0x64, 0x4ec070\nMOVS            R3, #1                                                 ; +0x66, 0x4ec072\nSTRB.W          R3, [R0,#0x518]                                        ; +0x68, 0x4ec074\nLDR             R0, =(aGjbeast04 - 0x4EC07E); \"GJBeast04\"              ; +0x6c, 0x4ec078\nADD             R0, PC; \"GJBeast04\"                                    ; +0x6e, 0x4ec07a\nB               loc_4EC0A4                                             ; +0x70, 0x4ec07c\nMOVS            R3, #1                                                 ; +0x72, 0x4ec07e\nSTRB.W          R3, [R0,#0x518]                                        ; +0x74, 0x4ec080\nLDR             R0, =(aGjbeast05 - 0x4EC08A); \"GJBeast05\"              ; +0x78, 0x4ec084\nADD             R0, PC; \"GJBeast05\"                                    ; +0x7a, 0x4ec086\nB               loc_4EC0A4                                             ; +0x7c, 0x4ec088\nMOVS            R7, #0                                                 ; +0x7e, 0x4ec08a\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x80, 0x4ec08c\nMOV             R0, R7                                                 ; +0x82, 0x4ec08e\nLDR             R3, [R6]                                               ; +0x84, 0x4ec090\nCMP             R2, R3                                                 ; +0x86, 0x4ec092\nBEQ             loc_4EC150                                             ; +0x88, 0x4ec094\nBLX             __stack_chk_fail                                       ; +0x8a, 0x4ec096\nLDR             R0, =(aGjbeast02 - 0x4EC0A0); \"GJBeast02\"              ; +0x8e, 0x4ec09a\nADD             R0, PC; \"GJBeast02\"                                    ; +0x90, 0x4ec09c\nB               loc_4EC0A4                                             ; +0x92, 0x4ec09e\nLDR             R0, =(aGjbeast03 - 0x4EC0A6); \"GJBeast03\"              ; +0x94, 0x4ec0a0\nADD             R0, PC; \"GJBeast03\"                                    ; +0x96, 0x4ec0a2\nMOVS            R1, #0; char *                                         ; +0x98, 0x4ec0a4\nMOV             R2, R1; cocos2d::CCTexture2D *                         ; +0x9a, 0x4ec0a6\nBL              _ZN16CCAnimatedSprite14createWithTypeEPKcPN7cocos2d11CCTexture2DEb; CCAnimatedSprite::createWithType(char const*,cocos2d::CCTexture2D *,bool) ; +0x9c, 0x4ec0a8\nSTR.W           R0, [R4,#0x4FC]                                        ; +0xa0, 0x4ec0ac\nLDR.W           R0, [R0,#0x214]; this                                  ; +0xa4, 0x4ec0b0\nBL              _ZN22SpriteAnimationManager14stopAnimationsEv; SpriteAnimationManager::stopAnimations(void) ; +0xa8, 0x4ec0b4\nLDR.W           R3, [R4,#0x4FC]                                        ; +0xac, 0x4ec0b8\nADDW            R2, R4, #0x4F4                                         ; +0xb0, 0x4ec0bc\nSTR.W           R2, [R3,#0x234]                                        ; +0xb4, 0x4ec0c0\nLDR.W           R0, [R4,#0x4FC]                                        ; +0xb8, 0x4ec0c4\nLDR             R3, [R0]                                               ; +0xbc, 0x4ec0c8\nLDR.W           R3, [R3,#0x218]                                        ; +0xbe, 0x4ec0ca\nBLX             R3                                                     ; +0xc2, 0x4ec0ce\nMOV             R1, R0; cocos2d::CCTexture2D *                         ; +0xc4, 0x4ec0d0\nMOV             R0, R4; this                                           ; +0xc6, 0x4ec0d2\nBL              _ZN10GameObject15initWithTextureEPN7cocos2d11CCTexture2DE; GameObject::initWithTexture(cocos2d::CCTexture2D *) ; +0xc8, 0x4ec0d4\nMOV             R7, R0                                                 ; +0xcc, 0x4ec0d8\nCMP             R0, #0                                                 ; +0xce, 0x4ec0da\nBEQ             loc_4EC08C                                             ; +0xd0, 0x4ec0dc\nMOV             R0, R4; this                                           ; +0xd2, 0x4ec0de\nMOV             R1, R5; int                                            ; +0xd4, 0x4ec0e0\nBL              _ZN18AnimatedGameObject17setupAnimatedSizeEi; AnimatedGameObject::setupAnimatedSize(int) ; +0xd6, 0x4ec0e2\nLDR             R3, [R4]                                               ; +0xda, 0x4ec0e6\nLDR.W           R1, [R4,#0x4FC]                                        ; +0xdc, 0x4ec0e8\nMOV             R0, R4                                                 ; +0xe0, 0x4ec0ec\nADD             R5, SP, #0x1C+var_10                                   ; +0xe2, 0x4ec0ee\nLDR.W           R3, [R3,#0xE4]                                         ; +0xe4, 0x4ec0f0\nBLX             R3                                                     ; +0xe8, 0x4ec0f4\nLDR             R3, [R4]                                               ; +0xea, 0x4ec0f6\nMOV             R0, R4                                                 ; +0xec, 0x4ec0f8\nLDR.W           R3, [R3,#0xA4]                                         ; +0xee, 0x4ec0fa\nBLX             R3                                                     ; +0xf2, 0x4ec0fe\nMOV             R1, R0; cocos2d::CCSize *                              ; +0xf4, 0x4ec100\nADD             R0, SP, #0x1C+var_18; this                             ; +0xf6, 0x4ec102\nBL              _ZN7cocos2d6CCSizeC1ERKS0_; cocos2d::CCSize::CCSize(cocos2d::CCSize const&) ; +0xf8, 0x4ec104\nVMOV.F32        S15, #0.5                                              ; +0xfc, 0x4ec108\nVLDR            S14, [SP,#0x1C+var_18]                                 ; +0x100, 0x4ec10c\nMOV             R0, R5; this                                           ; +0x104, 0x4ec110\nLDR.W           R8, [R4,#0x4FC]                                        ; +0x106, 0x4ec112\nLDR.W           R3, [R8]                                               ; +0x10a, 0x4ec116\nLDR.W           R9, [R3,#0x5C]                                         ; +0x10e, 0x4ec11a\nVMUL.F32        S14, S14, S15                                          ; +0x112, 0x4ec11e\nVMOV            R1, S14; float                                         ; +0x116, 0x4ec122\nVLDR            S14, [SP,#0x1C+var_14]                                 ; +0x11a, 0x4ec126\nVMUL.F32        S15, S14, S15                                          ; +0x11e, 0x4ec12a\nVMOV            R2, S15; float                                         ; +0x122, 0x4ec12e\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x126, 0x4ec132\nMOV             R0, R8                                                 ; +0x12a, 0x4ec136\nMOV             R1, R5                                                 ; +0x12c, 0x4ec138\nBLX             R9                                                     ; +0x12e, 0x4ec13a\nMOVS            R3, #1                                                 ; +0x130, 0x4ec13c\nMOV             R0, R4; this                                           ; +0x132, 0x4ec13e\nSTRB.W          R3, [R4,#0x2F3]                                        ; +0x134, 0x4ec140\nMOVS            R3, #0                                                 ; +0x138, 0x4ec144\nSTRB.W          R3, [R4,#0x105]                                        ; +0x13a, 0x4ec146\nBL              _ZN18AnimatedGameObject17setupChildSpritesEv; AnimatedGameObject::setupChildSprites(void) ; +0x13e, 0x4ec14a\nB               loc_4EC08C                                             ; +0x142, 0x4ec14e\nADD             SP, SP, #0x1C                                          ; +0x144, 0x4ec150\nPOP.W           {R4-R9,PC}                                             ; +0x146, 0x4ec152", "xrefs": ["AnimatedGameObject::create @ 0x4ec1e0"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}