{"type": "func", "start": 4095768, "end": 4095972, "name": "AnimatedGameObject::updateObjectAnimation", "pseudocode": "// \n// AnimatedGameObject::updateObjectAnimation from 0x3e7f18 to 0x3e7fe4 (204 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::updatePreviewAnim @ 0x368eb8\n// > AnimatedGameObject::activateObject @ 0x3e8002\n// > AnimatedGameObject::resetObject @ 0x3e802a\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\nvoid AnimatedGameObject::updateObjectAnimation(AnimatedGameObject *a1)\n{\n  SpriteAnimationManager *m_animationManager; // r7\n  stl::StringData<char>::Internal *v3; // r2\n  stl::StringData<char>::Internal *v4; // r3\n  stl::StringData<char>::Internal *v5; // r2\n  stl::StringData<char>::Internal *v6; // r3\n  SpriteAnimationManager *v7; // r4\n  unsigned int v8; // r0\n  AnimatedGameObject *v9; // [sp+0h] [bp-Ch] BYREF\n\n  v9 = a1;\n  SpriteAnimationManager::stopAnimations(a1->m_animatedSprite->m_animationManager);\n  if ( a1->m_isActivated\n    && (!a1->m_editorEnabled || GameManager::sharedState()->m_levelEditorLayer->m_previewAnimations) )\n  {\n    m_animationManager = a1->m_animatedSprite->m_animationManager;\n    if ( a1->m_playingAnimation )\n    {\n      sub_775C20(&v9);\n      SpriteAnimationManager::runAnimation((int)m_animationManager, (int)&v9, v3, v4);\n      sub_774008(&v9);\n    }\n    else\n    {\n      sub_775C20(&v9);\n      SpriteAnimationManager::runAnimation((int)m_animationManager, (int)&v9, v5, v6);\n      sub_774008(&v9);\n      v7 = a1->m_animatedSprite->m_animationManager;\n      v8 = rand();\n      SpriteAnimationManager::offsetCurrentAnimation(v7, vcvts_n_f32_s32(v8, 0x1Fu));\n    }\n  }\n}", "assembly": "; \n; AnimatedGameObject::updateObjectAnimation from 0x3e7f18 to 0x3e7fe4 (204 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::updatePreviewAnim @ 0x368eb8\n; > AnimatedGameObject::activateObject @ 0x3e8002\n; > AnimatedGameObject::resetObject @ 0x3e802a\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            {R0-R2,R4-R7,LR}                                       ; +0x0, 0x3e7f18\nMOV             R5, R0                                                 ; +0x2, 0x3e7f1a\nLDR             R6, =(__stack_chk_guard_ptr - 0x3E7F22)                ; +0x4, 0x3e7f1c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x6, 0x3e7f1e\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x8, 0x3e7f20\nLDR             R3, [R6]                                               ; +0xa, 0x3e7f22\nSTR             R3, [SP,#0xC+var_8]                                    ; +0xc, 0x3e7f24\nLDR.W           R3, [R0,#0x4F4]                                        ; +0xe, 0x3e7f26\nLDR.W           R0, [R3,#0x204]; this                                  ; +0x12, 0x3e7f2a\nBL              _ZN22SpriteAnimationManager14stopAnimationsEv; SpriteAnimationManager::stopAnimations(void) ; +0x16, 0x3e7f2e\nLDRB.W          R3, [R5,#0x291]                                        ; +0x1a, 0x3e7f32\nCMP             R3, #0                                                 ; +0x1e, 0x3e7f36\nBEQ             loc_3E7FD4                                             ; +0x20, 0x3e7f38\nLDRB.W          R3, [R5,#0x225]                                        ; +0x22, 0x3e7f3a\nCBZ             R3, loc_3E7F52                                         ; +0x26, 0x3e7f3e\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x28, 0x3e7f40\nMOVW            R3, #0x2DFC                                            ; +0x2c, 0x3e7f44\nLDR.W           R2, [R0,#0x170]                                        ; +0x30, 0x3e7f48\nLDRB            R3, [R2,R3]                                            ; +0x34, 0x3e7f4c\nCMP             R3, #0                                                 ; +0x36, 0x3e7f4e\nBEQ             loc_3E7FD4                                             ; +0x38, 0x3e7f50\nLDRB.W          R3, [R5,#0x501]                                        ; +0x3a, 0x3e7f52\nMOV             R4, SP                                                 ; +0x3e, 0x3e7f56\nLDR.W           R1, [R5,#0x4F4]                                        ; +0x40, 0x3e7f58\nCBZ             R3, loc_3E7F8C                                         ; +0x44, 0x3e7f5c\nLDR.W           R3, [R5,#0x504]                                        ; +0x46, 0x3e7f5e\nMOV             R0, R4                                                 ; +0x4a, 0x3e7f62\nLDR.W           R7, [R1,#0x204]                                        ; +0x4c, 0x3e7f64\nLDR.W           R3, [R3,#-0xC]                                         ; +0x50, 0x3e7f68\nCBNZ            R3, loc_3E7F74                                         ; +0x54, 0x3e7f6c\nADD.W           R1, R1, #0x218                                         ; +0x56, 0x3e7f6e\nB               loc_3E7F78                                             ; +0x5a, 0x3e7f72\nADDW            R1, R5, #0x504                                         ; +0x5c, 0x3e7f74\nBL              sub_775C20                                             ; +0x60, 0x3e7f78\nMOV             R0, R7                                                 ; +0x64, 0x3e7f7c\nMOV             R1, R4                                                 ; +0x66, 0x3e7f7e\nBL              _ZN22SpriteAnimationManager12runAnimationESs; SpriteAnimationManager::runAnimation(std::string) ; +0x68, 0x3e7f80\nMOV             R0, R4                                                 ; +0x6c, 0x3e7f84\nBL              sub_774008                                             ; +0x6e, 0x3e7f86\nB               loc_3E7FD4                                             ; +0x72, 0x3e7f8a\nLDR.W           R7, [R1,#0x204]                                        ; +0x74, 0x3e7f8c\nMOV             R0, R4                                                 ; +0x78, 0x3e7f90\nADD.W           R1, R1, #0x218                                         ; +0x7a, 0x3e7f92\nBL              sub_775C20                                             ; +0x7e, 0x3e7f96\nMOV             R1, R4                                                 ; +0x82, 0x3e7f9a\nMOV             R0, R7                                                 ; +0x84, 0x3e7f9c\nBL              _ZN22SpriteAnimationManager12runAnimationESs; SpriteAnimationManager::runAnimation(std::string) ; +0x86, 0x3e7f9e\nMOV             R0, R4                                                 ; +0x8a, 0x3e7fa2\nBL              sub_774008                                             ; +0x8c, 0x3e7fa4\nLDR.W           R3, [R5,#0x4F4]                                        ; +0x90, 0x3e7fa8\nLDR.W           R4, [R3,#0x204]                                        ; +0x94, 0x3e7fac\nBLX             rand                                                   ; +0x98, 0x3e7fb0\nVMOV            S15, R0                                                ; +0x9c, 0x3e7fb4\nMOV             R0, R4; this                                           ; +0xa0, 0x3e7fb8\nVCVT.F32.S32    S15, S15, #0x1F                                        ; +0xa2, 0x3e7fba\nVMOV            R1, S15; float                                         ; +0xa6, 0x3e7fbe\nBL              _ZN22SpriteAnimationManager22offsetCurrentAnimationEf; SpriteAnimationManager::offsetCurrentAnimation(float) ; +0xaa, 0x3e7fc2\nB               loc_3E7FD4                                             ; +0xae, 0x3e7fc6\nB               loc_3E7FCA                                             ; +0xb0, 0x3e7fc8\nMOV             R0, R4                                                 ; +0xb2, 0x3e7fca\nBL              sub_774008                                             ; +0xb4, 0x3e7fcc\nBL              __cxa_end_cleanup                                      ; +0xb8, 0x3e7fd0\nLDR             R2, [SP,#0xC+var_8]                                    ; +0xbc, 0x3e7fd4\nLDR             R3, [R6]                                               ; +0xbe, 0x3e7fd6\nCMP             R2, R3                                                 ; +0xc0, 0x3e7fd8\nBEQ             loc_3E7FE0                                             ; +0xc2, 0x3e7fda\nBLX             __stack_chk_fail                                       ; +0xc4, 0x3e7fdc\nADD             SP, SP, #0xC                                           ; +0xc8, 0x3e7fe0\nPOP             {R4-R7,PC}                                             ; +0xca, 0x3e7fe2", "xrefs": ["LevelEditorLayer::updatePreviewAnim @ 0x368eb8", "AnimatedGameObject::activateObject @ 0x3e8002", "AnimatedGameObject::resetObject @ 0x3e802a"], "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"}