{"type": "func", "start": 3678292, "end": 3678390, "name": "EditorUI::getCycledObject", "pseudocode": "// \n// EditorUI::getCycledObject from 0x382054 to 0x3820b6 (98 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onDelete @ 0x3a43be\n// > EditorUI::ccTouchEnded @ 0x3a57c6\n// > EditorUI::ccTouchEnded @ 0x3a587a\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\nGameObject *EditorUI::getCycledObject(EditorUI *a1, cocos2d::CCArray *a2, bool a3)\n{\n  unsigned int v3; // r6\n  _BOOL4 v6; // r9\n  int v7; // r4\n  int v8; // r0\n  int v9; // r5\n\n  v3 = 0;\n  v6 = a3;\n  v7 = 0;\n  while ( v3 < cocos2d::CCArray::count(a2) )\n  {\n    v8 = cocos2d::CCArray::objectAtIndex(a2, v3);\n    v9 = v8;\n    if ( *(_BYTE *)(v8 + 981) && !v6\n      || v7 && *(_DWORD *)(v8 + 984) >= *(_DWORD *)(v7 + 984)\n      || !EditorUI::canSelectObject(a1, (GameObject *)v8) )\n    {\n      v9 = v7;\n    }\n    ++v3;\n    v7 = v9;\n  }\n  if ( v7 )\n    *(_DWORD *)(v7 + 984) = a1->m_cycledObjectIndex;\n  return (GameObject *)v7;\n}", "assembly": "; \n; EditorUI::getCycledObject from 0x382054 to 0x3820b6 (98 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onDelete @ 0x3a43be\n; > EditorUI::ccTouchEnded @ 0x3a57c6\n; > EditorUI::ccTouchEnded @ 0x3a587a\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.W          {R3-R9,LR}                                             ; +0x0, 0x382054\nMOVS            R6, #0                                                 ; +0x4, 0x382058\nMOV             R7, R0                                                 ; +0x6, 0x38205a\nMOV             R8, R1                                                 ; +0x8, 0x38205c\nMOV             R9, R2                                                 ; +0xa, 0x38205e\nMOV             R4, R6                                                 ; +0xc, 0x382060\nMOV             R0, R8; this                                           ; +0xe, 0x382062\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x10, 0x382064\nCMP             R6, R0                                                 ; +0x14, 0x382068\nBCS             loc_3820A0                                             ; +0x16, 0x38206a\nMOV             R0, R8; this                                           ; +0x18, 0x38206c\nMOV             R1, R6; unsigned int                                   ; +0x1a, 0x38206e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x1c, 0x382070\nLDRB.W          R3, [R0,#0x3D5]                                        ; +0x20, 0x382074\nMOV             R5, R0                                                 ; +0x24, 0x382078\nCBZ             R3, loc_382082                                         ; +0x26, 0x38207a\nCMP.W           R9, #0                                                 ; +0x28, 0x38207c\nBEQ             loc_3820AC                                             ; +0x2c, 0x382080\nCBZ             R4, loc_382090                                         ; +0x2e, 0x382082\nLDR.W           R2, [R5,#0x3D8]                                        ; +0x30, 0x382084\nLDR.W           R3, [R4,#0x3D8]                                        ; +0x34, 0x382088\nCMP             R2, R3                                                 ; +0x38, 0x38208c\nBGE             loc_3820AC                                             ; +0x3a, 0x38208e\nMOV             R0, R7; this                                           ; +0x3c, 0x382090\nMOV             R1, R5; GameObject *                                   ; +0x3e, 0x382092\nBL              _ZN8EditorUI15canSelectObjectEP10GameObject; EditorUI::canSelectObject(GameObject *) ; +0x40, 0x382094\nCBZ             R0, loc_3820AC                                         ; +0x44, 0x382098\nADDS            R6, #1                                                 ; +0x46, 0x38209a\nMOV             R4, R5                                                 ; +0x48, 0x38209c\nB               loc_382062                                             ; +0x4a, 0x38209e\nCBZ             R4, loc_3820B0                                         ; +0x4c, 0x3820a0\nLDR.W           R3, [R7,#0x388]                                        ; +0x4e, 0x3820a2\nSTR.W           R3, [R4,#0x3D8]                                        ; +0x52, 0x3820a6\nB               loc_3820B0                                             ; +0x56, 0x3820aa\nMOV             R5, R4                                                 ; +0x58, 0x3820ac\nB               loc_38209A                                             ; +0x5a, 0x3820ae\nMOV             R0, R4                                                 ; +0x5c, 0x3820b0\nPOP.W           {R3-R9,PC}                                             ; +0x5e, 0x3820b2", "xrefs": ["EditorUI::onDelete @ 0x3a43be", "EditorUI::ccTouchEnded @ 0x3a57c6", "EditorUI::ccTouchEnded @ 0x3a587a"], "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"}