{"type": "func", "start": 4677034, "end": 4677138, "name": "GJBaseGameLayer::updateKeyframeOrder", "pseudocode": "// \n// GJBaseGameLayer::updateKeyframeOrder from 0x475daa to 0x475e12 (104 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::reverseKeyframeAnimationOrder @ 0x3694c8\n// > GJBaseGameLayer::addKeyframe @ 0x475e58\n// > GJBaseGameLayer::removeKeyframe @ 0x475e86\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 GJBaseGameLayer::updateKeyframeOrder(GJBaseGameLayer *a1, int a2)\n{\n  cocos2d::CCArray *v2; // r0\n  cocos2d::CCArray *v3; // r6\n  int v4; // r0\n  unsigned int v5; // r4\n  __int16 v6; // r7\n  int v7; // r8\n  int v8; // r5\n  int v9; // r0\n\n  v2 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_keyframeGroups, a2);\n  v3 = v2;\n  if ( v2 && cocos2d::CCArray::count(v2) )\n  {\n    v4 = cocos2d::CCArray::objectAtIndex(v3, 0);\n    v5 = 0;\n    v6 = *(_WORD *)(v4 + 1030);\n    v7 = *(unsigned __int8 *)(v4 + 1670);\n    v8 = v6 + 1;\n    while ( v5 < cocos2d::CCArray::count(v3) )\n    {\n      v9 = cocos2d::CCArray::objectAtIndex(v3, v5);\n      *(_DWORD *)(v9 + 1648) = v5;\n      *(_BYTE *)(v9 + 1670) = v7;\n      if ( v7 )\n      {\n        *(_WORD *)(v9 + 1032) = v8++;\n        *(_WORD *)(v9 + 1030) = v6;\n      }\n      ++v5;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateKeyframeOrder from 0x475daa to 0x475e12 (104 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::reverseKeyframeAnimationOrder @ 0x3694c8\n; > GJBaseGameLayer::addKeyframe @ 0x475e58\n; > GJBaseGameLayer::removeKeyframe @ 0x475e86\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\nMOVW            R3, #0x2C78                                            ; +0x0, 0x475daa\nPUSH.W          {R4-R8,LR}                                             ; +0x4, 0x475dae\nLDR             R0, [R0,R3]; this                                      ; +0x8, 0x475db2\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0xa, 0x475db4\nMOV             R6, R0                                                 ; +0xe, 0x475db8\nCBZ             R0, locret_475E0E                                      ; +0x10, 0x475dba\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x12, 0x475dbc\nCBNZ            R0, loc_475DC6                                         ; +0x16, 0x475dc0\nPOP.W           {R4-R8,PC}                                             ; +0x18, 0x475dc2\nMOV             R0, R6; this                                           ; +0x1c, 0x475dc6\nMOVS            R1, #0; unsigned int                                   ; +0x1e, 0x475dc8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x20, 0x475dca\nMOVS            R4, #0                                                 ; +0x24, 0x475dce\nLDRH.W          R7, [R0,#0x406]                                        ; +0x26, 0x475dd0\nLDRB.W          R8, [R0,#0x686]                                        ; +0x2a, 0x475dd4\nSXTH            R5, R7                                                 ; +0x2e, 0x475dd8\nADDS            R5, #1                                                 ; +0x30, 0x475dda\nMOV             R0, R6; this                                           ; +0x32, 0x475ddc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x34, 0x475dde\nCMP             R4, R0                                                 ; +0x38, 0x475de2\nBCS             locret_475E0A                                          ; +0x3a, 0x475de4\nMOV             R0, R6; this                                           ; +0x3c, 0x475de6\nMOV             R1, R4; unsigned int                                   ; +0x3e, 0x475de8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x40, 0x475dea\nSTR.W           R4, [R0,#0x670]                                        ; +0x44, 0x475dee\nSTRB.W          R8, [R0,#0x686]                                        ; +0x48, 0x475df2\nCMP.W           R8, #0                                                 ; +0x4c, 0x475df6\nBEQ             loc_475E06                                             ; +0x50, 0x475dfa\nSTRH.W          R5, [R0,#0x408]                                        ; +0x52, 0x475dfc\nADDS            R5, #1                                                 ; +0x56, 0x475e00\nSTRH.W          R7, [R0,#0x406]                                        ; +0x58, 0x475e02\nADDS            R4, #1                                                 ; +0x5c, 0x475e06\nB               loc_475DDC                                             ; +0x5e, 0x475e08\nPOP.W           {R4-R8,PC}                                             ; +0x60, 0x475e0a\nPOP.W           {R4-R8,PC}                                             ; +0x64, 0x475e0e", "xrefs": ["LevelEditorLayer::reverseKeyframeAnimationOrder @ 0x3694c8", "GJBaseGameLayer::addKeyframe @ 0x475e58", "GJBaseGameLayer::removeKeyframe @ 0x475e86"], "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"}