{"type": "func", "start": 4730852, "end": 4731198, "name": "EditorUI::createNewKeyframeAnim", "pseudocode": "// \n// EditorUI::createNewKeyframeAnim from 0x482fe4 to 0x48313e (346 bytes)\n// \n// 1 xrefs:\n// > SetGroupIDLayer::onAnim @ 0x639832\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:49:23 +0000\n// \n\nint __fastcall EditorUI::createNewKeyframeAnim(int this)\n{\n  int v1; // r4\n  cocos2d::CCArray *v2; // r0\n  cocos2d::CCObject *v3; // r1\n  cocos2d::CCArray *v4; // r5\n  cocos2d::CCArray *v5; // r0\n  cocos2d::CCArray *v6; // r9\n  _DWORD *v7; // r3\n  int *v8; // r7\n  int v9; // r5\n  int v10; // t1\n  int v11; // r0\n  _DWORD *v12; // r3\n  int v13; // r6\n  int *v14; // r3\n  unsigned int v15; // r12\n  int *v16; // r8\n  int v17; // r3\n  int v18; // t1\n  const cocos2d::CCPoint *v19; // r0\n  GameObject *Object; // r6\n  int NewKeyframeAnim; // r0\n  int v22; // r0\n  int *v23; // [sp+4h] [bp-20h]\n  int v24; // [sp+8h] [bp-1Ch]\n  unsigned int v25; // [sp+Ch] [bp-18h]\n  _BYTE v26[8]; // [sp+14h] [bp-10h] BYREF\n\n  v1 = this;\n  if ( *(_DWORD *)(this + 996) || (this = cocos2d::CCArray::count(*(cocos2d::CCArray **)(this + 668))) != 0 )\n  {\n    v2 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)this);\n    v3 = *(cocos2d::CCObject **)(v1 + 996);\n    v4 = v2;\n    if ( v3 )\n      cocos2d::CCArray::addObject(v2, v3);\n    else\n      cocos2d::CCArray::addObjectsFromArray(v2, *(cocos2d::CCArray **)(v1 + 668));\n    EditorUI::deselectAll((EditorUI *)v1);\n    v5 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(v1 + 944) + 596))(\n                               *(_DWORD *)(v1 + 944),\n                               0);\n    v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v5);\n    if ( v4 )\n    {\n      v7 = *((_DWORD **)v4 + 13);\n      if ( *v7 )\n      {\n        v8 = (int *)v7[3];\n        v23 = &v8[*v7 - 1];\n        while ( v8 <= v23 )\n        {\n          v10 = *v8++;\n          v9 = v10;\n          if ( !v10 )\n            break;\n          if ( *(_BYTE *)(v9 + 1022) )\n          {\n            v11 = cocos2d::CCDictionary::objectForKey(\n                    *(cocos2d::CCDictionary **)(*(_DWORD *)(v1 + 944) + 2324),\n                    *(_DWORD *)(v9 + 780));\n            if ( v11 )\n            {\n              v12 = *(_DWORD **)(v11 + 52);\n              if ( *v12 )\n              {\n                v13 = *v12 + 0x40000000;\n                v14 = (int *)v12[3];\n                v15 = (unsigned int)&v14[v13 - 1];\n                v16 = v14;\n                while ( (unsigned int)v16 <= v15 )\n                {\n                  v18 = *v16++;\n                  v17 = v18;\n                  if ( !v18 )\n                    break;\n                  v25 = v15;\n                  v24 = *(_DWORD *)(v17 + 52);\n                  v19 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v9 + 96))(v9);\n                  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, v19);\n                  Object = EditorUI::createObject(v1, (GameObject *)&stru_BCC.st_info, (const cocos2d::CCPoint *)v26);\n                  LevelEditorLayer::removeSpecial(*(LevelEditorLayer **)(v1 + 944), Object);\n                  cocos2d::CCArray::addObject(v6, Object);\n                  EffectGameObject::setTargetID(Object, v24);\n                  KeyframeGameObject::updateShadowObjects(Object, *(GJBaseGameLayer **)(v1 + 944), (EditorUI *)v1);\n                  NewKeyframeAnim = GJBaseGameLayer::createNewKeyframeAnim(*(GJBaseGameLayer **)(v1 + 944));\n                  v22 = (*(int (__fastcall **)(int))(*(_DWORD *)NewKeyframeAnim + 32))(NewKeyframeAnim);\n                  *((_DWORD *)Object + 415) = 0;\n                  *((_DWORD *)Object + 414) = v22;\n                  LevelEditorLayer::addSpecial(*(LevelEditorLayer **)(v1 + 944), Object);\n                  v15 = v25;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n    return EditorUI::selectObjects((EditorUI *)v1, v6, 0);\n  }\n  return this;\n}", "assembly": "; \n; EditorUI::createNewKeyframeAnim from 0x482fe4 to 0x48313e (346 bytes)\n; \n; 1 xrefs:\n; > SetGroupIDLayer::onAnim @ 0x639832\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:49:23 +0000\n; \nLDR             R2, =(__stack_chk_guard_ptr - 0x482FEE)                ; +0x0, 0x482fe4\nPUSH.W          {R4-R11,LR}                                            ; +0x2, 0x482fe6\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x6, 0x482fea\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x8, 0x482fec\nSUB             SP, SP, #0x24                                          ; +0xa, 0x482fee\nMOV             R4, R0                                                 ; +0xc, 0x482ff0\nLDR             R3, [R2]                                               ; +0xe, 0x482ff2\nMOV             R11, R2                                                ; +0x10, 0x482ff4\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x12, 0x482ff6\nLDR.W           R3, [R0,#0x3E4]                                        ; +0x14, 0x482ff8\nCBNZ            R3, loc_48300C                                         ; +0x18, 0x482ffc\nLDR.W           R0, [R0,#0x29C]; this                                  ; +0x1a, 0x482ffe\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1e, 0x483002\nCMP             R0, #0                                                 ; +0x22, 0x483006\nBEQ.W           loc_48312A                                             ; +0x24, 0x483008\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x28, 0x48300c\nLDR.W           R1, [R4,#0x3E4]; cocos2d::CCObject *                   ; +0x2c, 0x483010\nMOV             R5, R0                                                 ; +0x30, 0x483014\nCBZ             R1, loc_48301E                                         ; +0x32, 0x483016\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x34, 0x483018\nB               loc_483026                                             ; +0x38, 0x48301c\nLDR.W           R1, [R4,#0x29C]; cocos2d::CCArray *                    ; +0x3a, 0x48301e\nBL              _ZN7cocos2d7CCArray19addObjectsFromArrayEPS0_; cocos2d::CCArray::addObjectsFromArray(cocos2d::CCArray*) ; +0x3e, 0x483022\nMOV             R0, R4; this                                           ; +0x42, 0x483026\nBL              _ZN8EditorUI11deselectAllEv; EditorUI::deselectAll(void) ; +0x44, 0x483028\nLDR.W           R0, [R4,#0x3B0]                                        ; +0x48, 0x48302c\nMOVS            R1, #0                                                 ; +0x4c, 0x483030\nLDR             R3, [R0]                                               ; +0x4e, 0x483032\nLDR.W           R3, [R3,#0x254]                                        ; +0x50, 0x483034\nBLX             R3                                                     ; +0x54, 0x483038\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x56, 0x48303a\nMOV             R9, R0                                                 ; +0x5a, 0x48303e\nCBNZ            R5, loc_48304E                                         ; +0x5c, 0x483040\nMOV             R0, R4; this                                           ; +0x5e, 0x483042\nMOV             R1, R9; cocos2d::CCArray *                             ; +0x60, 0x483044\nMOVS            R2, #0; bool                                           ; +0x62, 0x483046\nBL              _ZN8EditorUI13selectObjectsEPN7cocos2d7CCArrayEb; EditorUI::selectObjects(cocos2d::CCArray *,bool) ; +0x64, 0x483048\nB               loc_48312A                                             ; +0x68, 0x48304c\nLDR             R3, [R5,#0x34]                                         ; +0x6a, 0x48304e\nLDR             R6, [R3]                                               ; +0x6c, 0x483050\nCMP             R6, #0                                                 ; +0x6e, 0x483052\nBEQ             loc_483042                                             ; +0x70, 0x483054\nADD.W           R5, R6, #0x40000000                                    ; +0x72, 0x483056\nLDR             R7, [R3,#0xC]                                          ; +0x76, 0x48305a\nSUBS            R5, #1                                                 ; +0x78, 0x48305c\nADD.W           R10, SP, #0x24+var_10                                  ; +0x7a, 0x48305e\nADD.W           R3, R7, R5,LSL#2                                       ; +0x7e, 0x483062\nSTR             R3, [SP,#0x24+var_20]                                  ; +0x82, 0x483066\nLDR             R3, [SP,#0x24+var_20]                                  ; +0x84, 0x483068\nCMP             R7, R3                                                 ; +0x86, 0x48306a\nBHI             loc_483042                                             ; +0x88, 0x48306c\nLDR.W           R5, [R7],#4                                            ; +0x8a, 0x48306e\nCMP             R5, #0                                                 ; +0x8e, 0x483072\nBEQ             loc_483042                                             ; +0x90, 0x483074\nLDRB.W          R3, [R5,#0x3FE]                                        ; +0x92, 0x483076\nCMP             R3, #0                                                 ; +0x96, 0x48307a\nBEQ             loc_483068                                             ; +0x98, 0x48307c\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x9a, 0x48307e\nLDR.W           R1, [R5,#0x30C]; int                                   ; +0x9e, 0x483082\nLDR.W           R0, [R3,#0x914]; this                                  ; +0xa2, 0x483086\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0xa6, 0x48308a\nCMP             R0, #0                                                 ; +0xaa, 0x48308e\nBEQ             loc_483068                                             ; +0xac, 0x483090\nLDR             R3, [R0,#0x34]                                         ; +0xae, 0x483092\nLDR             R6, [R3]                                               ; +0xb0, 0x483094\nCMP             R6, #0                                                 ; +0xb2, 0x483096\nBEQ             loc_483068                                             ; +0xb4, 0x483098\nADD.W           R6, R6, #0x40000000                                    ; +0xb6, 0x48309a\nLDR             R3, [R3,#0xC]                                          ; +0xba, 0x48309e\nSUBS            R6, #1                                                 ; +0xbc, 0x4830a0\nADD.W           R12, R3, R6,LSL#2                                      ; +0xbe, 0x4830a2\nMOV             R8, R3                                                 ; +0xc2, 0x4830a6\nCMP             R8, R12                                                ; +0xc4, 0x4830a8\nBHI             loc_483068                                             ; +0xc6, 0x4830aa\nLDR.W           R3, [R8],#4                                            ; +0xc8, 0x4830ac\nCMP             R3, #0                                                 ; +0xcc, 0x4830b0\nBEQ             loc_483068                                             ; +0xce, 0x4830b2\nLDR             R3, [R3,#0x34]                                         ; +0xd0, 0x4830b4\nMOV             R0, R5                                                 ; +0xd2, 0x4830b6\nLDR             R2, [R5]                                               ; +0xd4, 0x4830b8\nSTR.W           R12, [SP,#0x24+var_18]                                 ; +0xd6, 0x4830ba\nSTR             R3, [SP,#0x24+var_1C]                                  ; +0xda, 0x4830be\nLDR             R2, [R2,#0x60]                                         ; +0xdc, 0x4830c0\nBLX             R2                                                     ; +0xde, 0x4830c2\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0xe0, 0x4830c4\nMOV             R0, R10; this                                          ; +0xe2, 0x4830c6\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xe4, 0x4830c8\nMOV             R2, R10                                                ; +0xe8, 0x4830cc\nMOVW            R1, #0xBD8                                             ; +0xea, 0x4830ce\nMOV             R0, R4                                                 ; +0xee, 0x4830d2\nBL              _ZN8EditorUI12createObjectEiN7cocos2d7CCPointE; EditorUI::createObject(int,cocos2d::CCPoint) ; +0xf0, 0x4830d4\nMOV             R6, R0                                                 ; +0xf4, 0x4830d8\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0xf6, 0x4830da\nMOV             R1, R6; GameObject *                                   ; +0xfa, 0x4830de\nBL              _ZN16LevelEditorLayer13removeSpecialEP10GameObject; LevelEditorLayer::removeSpecial(GameObject *) ; +0xfc, 0x4830e0\nMOV             R0, R9; this                                           ; +0x100, 0x4830e4\nMOV             R1, R6; cocos2d::CCObject *                            ; +0x102, 0x4830e6\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x104, 0x4830e8\nLDR             R3, [SP,#0x24+var_1C]                                  ; +0x108, 0x4830ec\nMOV             R0, R6; this                                           ; +0x10a, 0x4830ee\nMOV             R1, R3; int                                            ; +0x10c, 0x4830f0\nBL              _ZN16EffectGameObject11setTargetIDEi; EffectGameObject::setTargetID(int) ; +0x10e, 0x4830f2\nLDR.W           R1, [R4,#0x3B0]; GJBaseGameLayer *                     ; +0x112, 0x4830f6\nMOV             R2, R4; EditorUI *                                     ; +0x116, 0x4830fa\nMOV             R0, R6; this                                           ; +0x118, 0x4830fc\nBL              _ZN18KeyframeGameObject19updateShadowObjectsEP15GJBaseGameLayerP8EditorUI; KeyframeGameObject::updateShadowObjects(GJBaseGameLayer *,EditorUI *) ; +0x11a, 0x4830fe\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0x11e, 0x483102\nBL              _ZN15GJBaseGameLayer21createNewKeyframeAnimEv; GJBaseGameLayer::createNewKeyframeAnim(void) ; +0x122, 0x483106\nLDR             R3, [R0]                                               ; +0x126, 0x48310a\nLDR             R3, [R3,#0x20]                                         ; +0x128, 0x48310c\nBLX             R3                                                     ; +0x12a, 0x48310e\nMOVS            R3, #0                                                 ; +0x12c, 0x483110\nMOV             R1, R6; GameObject *                                   ; +0x12e, 0x483112\nSTR.W           R3, [R6,#0x67C]                                        ; +0x130, 0x483114\nSTR.W           R0, [R6,#0x678]                                        ; +0x134, 0x483118\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0x138, 0x48311c\nBL              _ZN16LevelEditorLayer10addSpecialEP10GameObject; LevelEditorLayer::addSpecial(GameObject *) ; +0x13c, 0x483120\nLDR.W           R12, [SP,#0x24+var_18]                                 ; +0x140, 0x483124\nB               loc_4830A8                                             ; +0x144, 0x483128\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x146, 0x48312a\nLDR.W           R3, [R11]                                              ; +0x148, 0x48312c\nCMP             R2, R3                                                 ; +0x14c, 0x483130\nBEQ             loc_483138                                             ; +0x14e, 0x483132\nBLX             __stack_chk_fail                                       ; +0x150, 0x483134\nADD             SP, SP, #0x24 ; '$'                                    ; +0x154, 0x483138\nPOP.W           {R4-R11,PC}                                            ; +0x156, 0x48313a", "xrefs": ["SetGroupIDLayer::onAnim @ 0x639832"], "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"}