{"type": "func", "start": 4096928, "end": 4097230, "name": "AnimatedGameObject::animationForID", "pseudocode": "// \n// AnimatedGameObject::animationForID from 0x3e83a0 to 0x3e84ce (302 bytes)\n// \n// 4 xrefs:\n// > AnimatedGameObject::playAnimation @ 0x3e8552\n// > SetupAnimationPopup::init @ 0x4f31e2\n// > SetupAnimationPopup::init @ 0x4f3246\n// > SetupAnimationPopup::init @ 0x4f32aa\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\nAnimatedGameObject *__fastcall AnimatedGameObject::animationForID(AnimatedGameObject *this, int a2, int a3)\n{\n  char *v4; // r1\n\n  switch ( a3 )\n  {\n    case 1584:\n      switch ( a2 )\n      {\n        case 0:\n          v4 = \"idle01\";\n          break;\n        case 1:\n          v4 = \"idle02\";\n          break;\n        case 2:\n          v4 = \"idle03\";\n          break;\n        case 3:\n          v4 = \"attack01\";\n          break;\n        case 4:\n          v4 = \"attack02\";\n          break;\n        case 5:\n          v4 = \"attack02_end\";\n          break;\n        case 6:\n          v4 = \"sleep\";\n          break;\n        case 7:\n          v4 = \"sleep_loop\";\n          break;\n        case 8:\n          v4 = \"sleep_end\";\n          break;\n        case 9:\n          v4 = \"attack02_loop\";\n          break;\n        default:\n          goto LABEL_30;\n      }\n      break;\n    case 2012:\n      switch ( a2 )\n      {\n        case 0:\n          v4 = \"idle01\";\n          break;\n        case 1:\n          v4 = \"idle02\";\n          break;\n        case 2:\n          v4 = \"toAttack01\";\n          break;\n        case 3:\n          v4 = \"attack01\";\n          break;\n        case 4:\n          v4 = \"attack02\";\n          break;\n        case 5:\n          v4 = \"toAttack03\";\n          break;\n        case 6:\n          v4 = \"attack03\";\n          break;\n        case 7:\n          v4 = \"idle03\";\n          break;\n        case 8:\n          v4 = \"fromAttack03\";\n          break;\n        default:\n          goto LABEL_30;\n      }\n      break;\n    case 918:\n      switch ( a2 )\n      {\n        case 0:\n          v4 = \"bite\";\n          break;\n        case 1:\n          v4 = \"attack01\";\n          break;\n        case 2:\n          v4 = \"attack01_end\";\n          break;\n        case 3:\n          v4 = \"idle01\";\n          break;\n        default:\n          goto LABEL_30;\n      }\n      break;\n    default:\nLABEL_30:\n      v4 = (char *)&unk_939830;\n      break;\n  }\n  sub_776584((int)this, v4);\n  return this;\n}", "assembly": "; \n; AnimatedGameObject::animationForID from 0x3e83a0 to 0x3e84ce (302 bytes)\n; \n; 4 xrefs:\n; > AnimatedGameObject::playAnimation @ 0x3e8552\n; > SetupAnimationPopup::init @ 0x4f31e2\n; > SetupAnimationPopup::init @ 0x4f3246\n; > SetupAnimationPopup::init @ 0x4f32aa\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x3E83A8)                ; +0x0, 0x3e83a0\nPUSH            {R0-R2,R4,R5,LR}                                       ; +0x2, 0x3e83a2\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x3e83a4\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x3e83a6\nMOV             R4, R0                                                 ; +0x8, 0x3e83a8\nMOV             R0, R2                                                 ; +0xa, 0x3e83aa\nLDR             R2, [R3]                                               ; +0xc, 0x3e83ac\nCMP.W           R0, #0x630                                             ; +0xe, 0x3e83ae\nMOV             R5, R3                                                 ; +0x12, 0x3e83b2\nSTR             R2, [SP,#0xC+var_8]                                    ; +0x14, 0x3e83b4\nMOV             R2, SP                                                 ; +0x16, 0x3e83b6\nBEQ             loc_3E83F6                                             ; +0x18, 0x3e83b8\nMOVW            R3, #0x7DC                                             ; +0x1a, 0x3e83ba\nCMP             R0, R3                                                 ; +0x1e, 0x3e83be\nBEQ             loc_3E8458                                             ; +0x20, 0x3e83c0\nMOVW            R3, #0x396                                             ; +0x22, 0x3e83c2\nCMP             R0, R3                                                 ; +0x26, 0x3e83c6\nBNE             def_3E83CE; jumptable 003E83CE default case            ; +0x28, 0x3e83c8\nCMP             R1, #3; switch 4 cases                                 ; +0x2a, 0x3e83ca\nBHI             def_3E83CE; jumptable 003E83CE default case            ; +0x2c, 0x3e83cc\nTBB.W           [PC,R1]; switch jump                                   ; +0x2e, 0x3e83ce\nDCB 2; jump table for switch statement                                 ; +0x32, 0x3e83d2\nDCB 6                                                                  ; +0x33, 0x3e83d3\nDCB 0xA                                                                ; +0x34, 0x3e83d4\nDCB 0xE                                                                ; +0x35, 0x3e83d5\nLDR             R1, =(aBite - 0x3E83DE); jumptable 003E83CE case 0     ; +0x36, 0x3e83d6\nMOV             R0, R4                                                 ; +0x38, 0x3e83d8\nADD             R1, PC; \"bite\"                                         ; +0x3a, 0x3e83da\nB               loc_3E84B8                                             ; +0x3c, 0x3e83dc\nLDR             R1, =(aAttack01 - 0x3E83E6); jumptable 003E83CE case 1 ; +0x3e, 0x3e83de\nMOV             R0, R4                                                 ; +0x40, 0x3e83e0\nADD             R1, PC; \"attack01\"                                     ; +0x42, 0x3e83e2\nB               loc_3E84B8                                             ; +0x44, 0x3e83e4\nLDR             R1, =(aAttack01End - 0x3E83EE); jumptable 003E83CE case 2 ; +0x46, 0x3e83e6\nMOV             R0, R4                                                 ; +0x48, 0x3e83e8\nADD             R1, PC; \"attack01_end\"                                 ; +0x4a, 0x3e83ea\nB               loc_3E84B8                                             ; +0x4c, 0x3e83ec\nLDR             R1, =(aIdle01 - 0x3E83F6); jumptable 003E83CE case 3   ; +0x4e, 0x3e83ee\nMOV             R0, R4                                                 ; +0x50, 0x3e83f0\nADD             R1, PC; \"idle01\"                                       ; +0x52, 0x3e83f2\nB               loc_3E84B8                                             ; +0x54, 0x3e83f4\nCMP             R1, #9; switch 10 cases                                ; +0x56, 0x3e83f6\nBHI             def_3E83CE; jumptable 003E83CE default case            ; +0x58, 0x3e83f8\nTBB.W           [PC,R1]; switch jump                                   ; +0x5a, 0x3e83fa\nDCB 5; jump table for switch statement                                 ; +0x5e, 0x3e83fe\nDCB 9                                                                  ; +0x5f, 0x3e83ff\nDCB 0xD                                                                ; +0x60, 0x3e8400\nDCB 0x11                                                               ; +0x61, 0x3e8401\nDCB 0x15                                                               ; +0x62, 0x3e8402\nDCB 0x19                                                               ; +0x63, 0x3e8403\nDCB 0x1D                                                               ; +0x64, 0x3e8404\nDCB 0x21                                                               ; +0x65, 0x3e8405\nDCB 0x25                                                               ; +0x66, 0x3e8406\nDCB 0x29                                                               ; +0x67, 0x3e8407\nLDR             R1, =(aIdle01 - 0x3E8410); jumptable 003E83FA case 0   ; +0x68, 0x3e8408\nMOV             R0, R4                                                 ; +0x6a, 0x3e840a\nADD             R1, PC; \"idle01\"                                       ; +0x6c, 0x3e840c\nB               loc_3E84B8                                             ; +0x6e, 0x3e840e\nLDR             R1, =(aIdle02 - 0x3E8418); jumptable 003E83FA case 1   ; +0x70, 0x3e8410\nMOV             R0, R4                                                 ; +0x72, 0x3e8412\nADD             R1, PC; \"idle02\"                                       ; +0x74, 0x3e8414\nB               loc_3E84B8                                             ; +0x76, 0x3e8416\nLDR             R1, =(aIdle03 - 0x3E8420); jumptable 003E83FA case 2   ; +0x78, 0x3e8418\nMOV             R0, R4                                                 ; +0x7a, 0x3e841a\nADD             R1, PC; \"idle03\"                                       ; +0x7c, 0x3e841c\nB               loc_3E84B8                                             ; +0x7e, 0x3e841e\nLDR             R1, =(aAttack01 - 0x3E8428); jumptable 003E83FA case 3 ; +0x80, 0x3e8420\nMOV             R0, R4                                                 ; +0x82, 0x3e8422\nADD             R1, PC; \"attack01\"                                     ; +0x84, 0x3e8424\nB               loc_3E84B8                                             ; +0x86, 0x3e8426\nLDR             R1, =(aAttack02 - 0x3E8430); jumptable 003E83FA case 4 ; +0x88, 0x3e8428\nMOV             R0, R4                                                 ; +0x8a, 0x3e842a\nADD             R1, PC; \"attack02\"                                     ; +0x8c, 0x3e842c\nB               loc_3E84B8                                             ; +0x8e, 0x3e842e\nLDR             R1, =(aAttack02End - 0x3E8438); jumptable 003E83FA case 5 ; +0x90, 0x3e8430\nMOV             R0, R4                                                 ; +0x92, 0x3e8432\nADD             R1, PC; \"attack02_end\"                                 ; +0x94, 0x3e8434\nB               loc_3E84B8                                             ; +0x96, 0x3e8436\nLDR             R1, =(aSleep - 0x3E8440); jumptable 003E83FA case 6    ; +0x98, 0x3e8438\nMOV             R0, R4                                                 ; +0x9a, 0x3e843a\nADD             R1, PC; \"sleep\"                                        ; +0x9c, 0x3e843c\nB               loc_3E84B8                                             ; +0x9e, 0x3e843e\nLDR             R1, =(aSleepLoop - 0x3E8448); jumptable 003E83FA case 7 ; +0xa0, 0x3e8440\nMOV             R0, R4                                                 ; +0xa2, 0x3e8442\nADD             R1, PC; \"sleep_loop\"                                   ; +0xa4, 0x3e8444\nB               loc_3E84B8                                             ; +0xa6, 0x3e8446\nLDR             R1, =(aSleepEnd - 0x3E8450); jumptable 003E83FA case 8 ; +0xa8, 0x3e8448\nMOV             R0, R4                                                 ; +0xaa, 0x3e844a\nADD             R1, PC; \"sleep_end\"                                    ; +0xac, 0x3e844c\nB               loc_3E84B8                                             ; +0xae, 0x3e844e\nLDR             R1, =(aAttack02Loop - 0x3E8458); jumptable 003E83FA case 9 ; +0xb0, 0x3e8450\nMOV             R0, R4                                                 ; +0xb2, 0x3e8452\nADD             R1, PC; \"attack02_loop\"                                ; +0xb4, 0x3e8454\nB               loc_3E84B8                                             ; +0xb6, 0x3e8456\nCMP             R1, #8; switch 9 cases                                 ; +0xb8, 0x3e8458\nBHI             def_3E83CE; jumptable 003E83CE default case            ; +0xba, 0x3e845a\nTBB.W           [PC,R1]; switch jump                                   ; +0xbc, 0x3e845c\nDCB 5; jump table for switch statement                                 ; +0xc0, 0x3e8460\nDCB 9                                                                  ; +0xc1, 0x3e8461\nDCB 0xD                                                                ; +0xc2, 0x3e8462\nDCB 0x11                                                               ; +0xc3, 0x3e8463\nDCB 0x15                                                               ; +0xc4, 0x3e8464\nDCB 0x19                                                               ; +0xc5, 0x3e8465\nDCB 0x1D                                                               ; +0xc6, 0x3e8466\nDCB 0x21                                                               ; +0xc7, 0x3e8467\nDCB 0x25                                                               ; +0xc8, 0x3e8468\nALIGN 2                                                                ; +0xc9, 0x3e8469\nLDR             R1, =(aIdle01 - 0x3E8472); jumptable 003E845C case 0   ; +0xca, 0x3e846a\nMOV             R0, R4                                                 ; +0xcc, 0x3e846c\nADD             R1, PC; \"idle01\"                                       ; +0xce, 0x3e846e\nB               loc_3E84B8                                             ; +0xd0, 0x3e8470\nLDR             R1, =(aIdle02 - 0x3E847A); jumptable 003E845C case 1   ; +0xd2, 0x3e8472\nMOV             R0, R4                                                 ; +0xd4, 0x3e8474\nADD             R1, PC; \"idle02\"                                       ; +0xd6, 0x3e8476\nB               loc_3E84B8                                             ; +0xd8, 0x3e8478\nLDR             R1, =(aToattack01 - 0x3E8482); jumptable 003E845C case 2 ; +0xda, 0x3e847a\nMOV             R0, R4                                                 ; +0xdc, 0x3e847c\nADD             R1, PC; \"toAttack01\"                                   ; +0xde, 0x3e847e\nB               loc_3E84B8                                             ; +0xe0, 0x3e8480\nLDR             R1, =(aAttack01 - 0x3E848A); jumptable 003E845C case 3 ; +0xe2, 0x3e8482\nMOV             R0, R4                                                 ; +0xe4, 0x3e8484\nADD             R1, PC; \"attack01\"                                     ; +0xe6, 0x3e8486\nB               loc_3E84B8                                             ; +0xe8, 0x3e8488\nLDR             R1, =(aAttack02 - 0x3E8492); jumptable 003E845C case 4 ; +0xea, 0x3e848a\nMOV             R0, R4                                                 ; +0xec, 0x3e848c\nADD             R1, PC; \"attack02\"                                     ; +0xee, 0x3e848e\nB               loc_3E84B8                                             ; +0xf0, 0x3e8490\nLDR             R1, =(aToattack03 - 0x3E849A); jumptable 003E845C case 5 ; +0xf2, 0x3e8492\nMOV             R0, R4                                                 ; +0xf4, 0x3e8494\nADD             R1, PC; \"toAttack03\"                                   ; +0xf6, 0x3e8496\nB               loc_3E84B8                                             ; +0xf8, 0x3e8498\nLDR             R1, =(aAttack03 - 0x3E84A2); jumptable 003E845C case 6 ; +0xfa, 0x3e849a\nMOV             R0, R4                                                 ; +0xfc, 0x3e849c\nADD             R1, PC; \"attack03\"                                     ; +0xfe, 0x3e849e\nB               loc_3E84B8                                             ; +0x100, 0x3e84a0\nLDR             R1, =(aIdle03 - 0x3E84AA); jumptable 003E845C case 7   ; +0x102, 0x3e84a2\nMOV             R0, R4                                                 ; +0x104, 0x3e84a4\nADD             R1, PC; \"idle03\"                                       ; +0x106, 0x3e84a6\nB               loc_3E84B8                                             ; +0x108, 0x3e84a8\nLDR             R1, =(aFromattack03 - 0x3E84B2); jumptable 003E845C case 8 ; +0x10a, 0x3e84aa\nMOV             R0, R4                                                 ; +0x10c, 0x3e84ac\nADD             R1, PC; \"fromAttack03\"                                 ; +0x10e, 0x3e84ae\nB               loc_3E84B8                                             ; +0x110, 0x3e84b0\nLDR             R1, =(unk_939830 - 0x3E84BA); jumptable 003E83CE default case ; +0x112, 0x3e84b2\nMOV             R0, R4; int                                            ; +0x114, 0x3e84b4\nADD             R1, PC; unk_939830 ; char *                            ; +0x116, 0x3e84b6\nBL              sub_776584                                             ; +0x118, 0x3e84b8\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x11c, 0x3e84bc\nLDR             R3, [R5]                                               ; +0x11e, 0x3e84be\nMOV             R0, R4                                                 ; +0x120, 0x3e84c0\nCMP             R2, R3                                                 ; +0x122, 0x3e84c2\nBEQ             loc_3E84CA                                             ; +0x124, 0x3e84c4\nBLX             __stack_chk_fail                                       ; +0x126, 0x3e84c6\nADD             SP, SP, #0xC                                           ; +0x12a, 0x3e84ca\nPOP             {R4,R5,PC}                                             ; +0x12c, 0x3e84cc", "xrefs": ["AnimatedGameObject::playAnimation @ 0x3e8552", "SetupAnimationPopup::init @ 0x4f31e2", "SetupAnimationPopup::init @ 0x4f3246", "SetupAnimationPopup::init @ 0x4f32aa"], "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"}