{"type": "func", "start": 7401024, "end": 7401380, "name": "EditorUI::activateScaleControl", "pseudocode": "// \n// EditorUI::activateScaleControl from 0x70ee40 to 0x70efa4 (356 bytes)\n// \n// 1 xrefs:\n// > EditorUI::handleEditorAction @ 0x6f22d8\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:57:43 +0000\n// \n\nvoid __fastcall EditorUI::activateScaleControl(cocos2d::CCArray **this, cocos2d::CCObject *a2)\n{\n  EditorSFXManager *v4; // r0\n  EditorSFXManager *v5; // r0\n  int v6; // r0\n  int v7; // r5\n  int v8; // r8\n  const char *v9; // r0\n  char *v10; // r0\n  _BYTE *v11; // r1\n  int v12; // r9\n  int v13; // r7\n  void (__fastcall *v14)(int, _BYTE *); // r10\n  int v15; // r5\n  void (__fastcall *v16)(int, _DWORD); // r7\n  float v17; // r0\n  _BYTE v18[8]; // [sp+4h] [bp-14h] BYREF\n  _BYTE v19[8]; // [sp+Ch] [bp-Ch] BYREF\n\n  v4 = (EditorSFXManager *)cocos2d::CCArray::count(*(this + 167));\n  if ( v4 || *(this + 249) )\n  {\n    v5 = (EditorSFXManager *)EditorSFXManager::sharedState(v4);\n    EditorSFXManager::playAction(v5, 189);\n    EditorUI::deactivateTransformControl((EditorUI *)this);\n    if ( !(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 148) + 176))(*(this + 148))\n      || (v6 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2),\n          v7 = *((_DWORD *)*(this + 148) + 106),\n          v8 = v6,\n          EditorUI::deactivateScaleControl((EditorUI *)this),\n          v8 != v7) )\n    {\n      if ( !(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 148) + 176))(*(this + 148)) || *((_BYTE *)this + 588) )\n      {\n        v9 = (const char *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n        EditorUI::updateEditButtonColor((int)this, v9, 10921638);\n        *((_BYTE *)this + 588) = 0;\n        if ( cocos2d::CCArray::count(*(this + 167)) )\n        {\n          EditorUI::getGroupCenter((EditorUI *)v19, (cocos2d::CCArray *)this, *(this + 167), 0);\n          v10 = (char *)(this + 145);\n          v11 = v19;\n        }\n        else\n        {\n          v11 = (_BYTE *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 249) + 96))(*(this + 249));\n          v10 = (char *)(this + 145);\n        }\n        cocos2d::CCPoint::operator=(v10, v11);\n        v12 = (int)*(this + 148);\n        *(_DWORD *)(v12 + 424) = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n        v13 = (int)*(this + 148);\n        v14 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 92);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, 40.0);\n        cocos2d::CCPoint::operator+(v19, this + 145, v18);\n        v14(v13, v19);\n        v15 = (int)*(this + 148);\n        v16 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v15 + 80);\n        v17 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)*(this + 236) + 609) + 84))(*((_DWORD *)*(this + 236) + 609)));\n        v16(v15, 1.0 / v17);\n        (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 148) + 172))(*(this + 148), 1);\n        (*((void (__fastcall **)(cocos2d::CCArray **))*this + 169))(this);\n      }\n    }\n  }\n}", "assembly": "; \n; EditorUI::activateScaleControl from 0x70ee40 to 0x70efa4 (356 bytes)\n; \n; 1 xrefs:\n; > EditorUI::handleEditorAction @ 0x6f22d8\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:57:43 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x70ee40\nSUB             SP, SP, #0x18                                          ; +0x4, 0x70ee44\nLDR             R6, =(__stack_chk_guard_ptr - 0x70EE54)                ; +0x6, 0x70ee46\nMOV             R4, R0                                                 ; +0x8, 0x70ee48\nLDR.W           R0, [R0,#0x29C]; this                                  ; +0xa, 0x70ee4a\nMOV             R7, R1                                                 ; +0xe, 0x70ee4e\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x70ee50\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x70ee52\nLDR             R3, [R6]                                               ; +0x14, 0x70ee54\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x16, 0x70ee56\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x18, 0x70ee58\nCBNZ            R0, loc_70EE68                                         ; +0x1c, 0x70ee5c\nLDR.W           R3, [R4,#0x3E4]                                        ; +0x1e, 0x70ee5e\nCMP             R3, #0                                                 ; +0x22, 0x70ee62\nBEQ.W           loc_70EF92                                             ; +0x24, 0x70ee64\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x28, 0x70ee68\nMOVS            R1, #0xBD; int                                         ; +0x2c, 0x70ee6c\nBL              _ZN16EditorSFXManager10playActionEi; EditorSFXManager::playAction(int) ; +0x2e, 0x70ee6e\nMOV             R0, R4; this                                           ; +0x32, 0x70ee72\nBL              _ZN8EditorUI26deactivateTransformControlEv; EditorUI::deactivateTransformControl(void) ; +0x34, 0x70ee74\nLDR.W           R0, [R4,#0x250]                                        ; +0x38, 0x70ee78\nLDR             R3, [R0]                                               ; +0x3c, 0x70ee7c\nLDR.W           R3, [R3,#0xB0]                                         ; +0x3e, 0x70ee7e\nBLX             R3                                                     ; +0x42, 0x70ee82\nCBZ             R0, loc_70EEA2                                         ; +0x44, 0x70ee84\nLDR             R3, [R7]                                               ; +0x46, 0x70ee86\nMOV             R0, R7                                                 ; +0x48, 0x70ee88\nLDR             R3, [R3,#0x20]                                         ; +0x4a, 0x70ee8a\nBLX             R3                                                     ; +0x4c, 0x70ee8c\nLDR.W           R3, [R4,#0x250]                                        ; +0x4e, 0x70ee8e\nLDR.W           R5, [R3,#0x1A8]                                        ; +0x52, 0x70ee92\nMOV             R8, R0                                                 ; +0x56, 0x70ee96\nMOV             R0, R4; this                                           ; +0x58, 0x70ee98\nBL              _ZN8EditorUI22deactivateScaleControlEv; EditorUI::deactivateScaleControl(void) ; +0x5a, 0x70ee9a\nCMP             R8, R5                                                 ; +0x5e, 0x70ee9e\nBEQ             loc_70EF92                                             ; +0x60, 0x70eea0\nLDR.W           R0, [R4,#0x250]                                        ; +0x62, 0x70eea2\nLDR             R3, [R0]                                               ; +0x66, 0x70eea6\nLDR.W           R3, [R3,#0xB0]                                         ; +0x68, 0x70eea8\nBLX             R3                                                     ; +0x6c, 0x70eeac\nCBZ             R0, loc_70EEB8                                         ; +0x6e, 0x70eeae\nLDRB.W          R3, [R4,#0x24C]                                        ; +0x70, 0x70eeb0\nCMP             R3, #0                                                 ; +0x74, 0x70eeb4\nBEQ             loc_70EF92                                             ; +0x76, 0x70eeb6\nLDR             R3, [R7]                                               ; +0x78, 0x70eeb8\nMOV             R0, R7                                                 ; +0x7a, 0x70eeba\nMOV.W           R9, #0                                                 ; +0x7c, 0x70eebc\nADD             R5, SP, #0x18+var_C                                    ; +0x80, 0x70eec0\nADD.W           R8, R4, #0x244                                         ; +0x82, 0x70eec2\nLDR             R3, [R3,#0x20]                                         ; +0x86, 0x70eec6\nBLX             R3                                                     ; +0x88, 0x70eec8\nMOV             R1, R0                                                 ; +0x8a, 0x70eeca\nLDR             R0, =(dword_BF0310 - 0x70EED2)                         ; +0x8c, 0x70eecc\nADD             R0, PC; dword_BF0310                                   ; +0x8e, 0x70eece\nLDRB            R2, [R0,#(byte_BF0324 - 0xBF0310)]                     ; +0x90, 0x70eed0\nLDRB            R3, [R0,#(byte_BF0323 - 0xBF0310)]                     ; +0x92, 0x70eed2\nORR.W           R3, R3, R2,LSL#8                                       ; +0x94, 0x70eed4\nLDRB            R2, [R0,#(byte_BF0325 - 0xBF0310)]                     ; +0x98, 0x70eed8\nMOV             R0, R4                                                 ; +0x9a, 0x70eeda\nORR.W           R2, R3, R2,LSL#16                                      ; +0x9c, 0x70eedc\nBL              _ZN8EditorUI21updateEditButtonColorEiN7cocos2d10_ccColor3BE; EditorUI::updateEditButtonColor(int,cocos2d::_ccColor3B) ; +0xa0, 0x70eee0\nSTRB.W          R9, [R4,#0x24C]                                        ; +0xa4, 0x70eee4\nLDR.W           R0, [R4,#0x29C]; this                                  ; +0xa8, 0x70eee8\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xac, 0x70eeec\nCBZ             R0, loc_70EF06                                         ; +0xb0, 0x70eef0\nMOV             R0, R5; this                                           ; +0xb2, 0x70eef2\nMOV             R1, R4; cocos2d::CCArray *                             ; +0xb4, 0x70eef4\nLDR.W           R2, [R4,#0x29C]; cocos2d::CCArray *                    ; +0xb6, 0x70eef6\nMOV             R3, R9                                                 ; +0xba, 0x70eefa\nBL              _ZN8EditorUI14getGroupCenterEPN7cocos2d7CCArrayEb; EditorUI::getGroupCenter(cocos2d::CCArray *,bool) ; +0xbc, 0x70eefc\nMOV             R0, R8                                                 ; +0xc0, 0x70ef00\nMOV             R1, R5                                                 ; +0xc2, 0x70ef02\nB               loc_70EF14                                             ; +0xc4, 0x70ef04\nLDR.W           R0, [R4,#0x3E4]                                        ; +0xc6, 0x70ef06\nLDR             R3, [R0]                                               ; +0xca, 0x70ef0a\nLDR             R3, [R3,#0x60]                                         ; +0xcc, 0x70ef0c\nBLX             R3                                                     ; +0xce, 0x70ef0e\nMOV             R1, R0                                                 ; +0xd0, 0x70ef10\nMOV             R0, R8                                                 ; +0xd2, 0x70ef12\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xd4, 0x70ef14\nLDR             R3, [R7]                                               ; +0xd8, 0x70ef18\nMOV             R0, R7                                                 ; +0xda, 0x70ef1a\nLDR.W           R9, [R4,#0x250]                                        ; +0xdc, 0x70ef1c\nLDR             R3, [R3,#0x20]                                         ; +0xe0, 0x70ef20\nBLX             R3                                                     ; +0xe2, 0x70ef22\nMOVS            R1, #0; float                                          ; +0xe4, 0x70ef24\nLDR             R2, flt_70EFA4; float                                  ; +0xe6, 0x70ef26\nSTR.W           R0, [R9,#0x1A8]                                        ; +0xe8, 0x70ef28\nADD.W           R9, SP, #0x18+var_14                                   ; +0xec, 0x70ef2c\nLDR.W           R7, [R4,#0x250]                                        ; +0xf0, 0x70ef30\nMOV             R0, R9; this                                           ; +0xf4, 0x70ef34\nLDR             R3, [R7]                                               ; +0xf6, 0x70ef36\nLDR.W           R10, [R3,#0x5C]                                        ; +0xf8, 0x70ef38\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xfc, 0x70ef3c\nMOV             R2, R9                                                 ; +0x100, 0x70ef40\nMOV             R0, R5                                                 ; +0x102, 0x70ef42\nMOV             R1, R8                                                 ; +0x104, 0x70ef44\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x106, 0x70ef46\nMOV             R1, R5                                                 ; +0x10a, 0x70ef4a\nMOV             R0, R7                                                 ; +0x10c, 0x70ef4c\nBLX             R10                                                    ; +0x10e, 0x70ef4e\nLDR.W           R5, [R4,#0x250]                                        ; +0x110, 0x70ef50\nLDR             R3, [R5]                                               ; +0x114, 0x70ef54\nLDR             R7, [R3,#0x50]                                         ; +0x116, 0x70ef56\nLDR.W           R3, [R4,#0x3B0]                                        ; +0x118, 0x70ef58\nLDR.W           R0, [R3,#0x984]                                        ; +0x11c, 0x70ef5c\nLDR             R3, [R0]                                               ; +0x120, 0x70ef60\nLDR             R3, [R3,#0x54]                                         ; +0x122, 0x70ef62\nBLX             R3                                                     ; +0x124, 0x70ef64\nVMOV.F32        S15, #1.0                                              ; +0x126, 0x70ef66\nVMOV            S14, R0                                                ; +0x12a, 0x70ef6a\nMOV             R0, R5                                                 ; +0x12e, 0x70ef6e\nVDIV.F32        S15, S15, S14                                          ; +0x130, 0x70ef70\nVMOV            R1, S15                                                ; +0x134, 0x70ef74\nBLX             R7                                                     ; +0x138, 0x70ef78\nLDR.W           R0, [R4,#0x250]                                        ; +0x13a, 0x70ef7a\nMOVS            R1, #1                                                 ; +0x13e, 0x70ef7e\nLDR             R3, [R0]                                               ; +0x140, 0x70ef80\nLDR.W           R3, [R3,#0xAC]                                         ; +0x142, 0x70ef82\nBLX             R3                                                     ; +0x146, 0x70ef86\nLDR             R3, [R4]                                               ; +0x148, 0x70ef88\nMOV             R0, R4                                                 ; +0x14a, 0x70ef8a\nLDR.W           R3, [R3,#0x2A4]                                        ; +0x14c, 0x70ef8c\nBLX             R3                                                     ; +0x150, 0x70ef90\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x152, 0x70ef92\nLDR             R3, [R6]                                               ; +0x154, 0x70ef94\nCMP             R2, R3                                                 ; +0x156, 0x70ef96\nBEQ             loc_70EF9E                                             ; +0x158, 0x70ef98\nBLX             __stack_chk_fail                                       ; +0x15a, 0x70ef9a\nADD             SP, SP, #0x18                                          ; +0x15e, 0x70ef9e\nPOP.W           {R4-R10,PC}                                            ; +0x160, 0x70efa0", "xrefs": ["EditorUI::handleEditorAction @ 0x6f22d8"], "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"}