{"type": "func", "start": 3699416, "end": 3699742, "name": "EditorUI::updateZoom", "pseudocode": "// \n// EditorUI::updateZoom from 0x3872d8 to 0x38741e (326 bytes)\n// \n// 2 xrefs:\n// > EditorUI::playtestStopped @ 0x3874ac\n// > EditorUI::zoomGameLayer @ 0x387668\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 EditorUI::updateZoom(EditorUI *a1, float a2)\n{\n  cocos2d::CCDirector *v4; // r0\n  LevelEditorLayer *m_editorLayer; // r0\n  cocos2d::CCNode *m_objectLayer; // r6\n  int v7; // r0\n  int v8; // r10\n  cocos2d::CCNode *v9; // r0\n  int v10; // r0\n  cocos2d::CCNode *v11; // r0\n  float v12; // s16\n  cocos2d::CCSize v13; // [sp+4h] [bp-2Ch] BYREF\n  cocos2d::CCPoint v14; // [sp+Ch] [bp-24h] BYREF\n  cocos2d::CCPoint v15; // [sp+14h] [bp-1Ch] BYREF\n  _BYTE v16[8]; // [sp+1Ch] [bp-14h] BYREF\n  cocos2d::CCPoint v17; // [sp+24h] [bp-Ch] BYREF\n\n  v4 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(&v13, v4);\n  m_editorLayer = a1->m_editorLayer;\n  m_objectLayer = m_editorLayer->m_objectLayer;\n  v7 = (int)m_editorLayer->getParent(m_editorLayer);\n  v8 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 84))(v7);\n  v9 = a1->m_editorLayer->getParent(a1->m_editorLayer);\n  ((void (__fastcall *)(cocos2d::CCNode *, int))v9->setScale)(v9, 1065353216);\n  cocos2d::CCPoint::CCPoint(&v17, v13.width * 0.5, v13.height * 0.5);\n  cocos2d::CCNode::convertToNodeSpace(&v14, m_objectLayer, &v17);\n  ((void (__fastcall *)(cocos2d::CCLayer *, _DWORD))a1->m_editorLayer->m_objectLayer->setScale)(\n    a1->m_editorLayer->m_objectLayer,\n    LODWORD(a2));\n  cocos2d::CCNode::convertToWorldSpace(&v15, m_objectLayer, &v14);\n  cocos2d::CCPoint::CCPoint(&v17, v13.width * 0.5, v13.height * 0.5);\n  cocos2d::CCPoint::operator-(v16, &v17, &v15);\n  v10 = (int)m_objectLayer->getPosition(m_objectLayer);\n  cocos2d::CCPoint::operator+(&v17, v10, v16);\n  m_objectLayer->setPosition(m_objectLayer, &v17);\n  EditorUI::constrainGameLayerPosition(a1);\n  v11 = a1->m_editorLayer->getParent(a1->m_editorLayer);\n  ((void (__fastcall *)(cocos2d::CCNode *, int))v11->setScale)(v11, v8);\n  EditorUI::updateSlider(a1);\n  v12 = 1.0 / a2;\n  ((void (__fastcall *)(GJRotationControl *, _DWORD))a1->m_rotationControl->setScale)(\n    a1->m_rotationControl,\n    LODWORD(v12));\n  GJTransformControl::scaleButtons(a1->m_transformControl, v12);\n}", "assembly": "; \n; EditorUI::updateZoom from 0x3872d8 to 0x38741e (326 bytes)\n; \n; 2 xrefs:\n; > EditorUI::playtestStopped @ 0x3874ac\n; > EditorUI::zoomGameLayer @ 0x387668\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          {R4-R10,LR}                                            ; +0x0, 0x3872d8\nMOV             R4, R0                                                 ; +0x4, 0x3872dc\nLDR             R7, =(__stack_chk_guard_ptr - 0x3872E8)                ; +0x6, 0x3872de\nVPUSH           {D8}                                                   ; +0x8, 0x3872e0\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xc, 0x3872e4\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xe, 0x3872e6\nLDR             R3, [R7]                                               ; +0x10, 0x3872e8\nVMOV            S16, R1                                                ; +0x12, 0x3872ea\nSUB             SP, SP, #0x30                                          ; +0x16, 0x3872ee\nVMOV.F32        S17, #0.5                                              ; +0x18, 0x3872f0\nADD             R5, SP, #0x30+var_C                                    ; +0x1c, 0x3872f4\nADD.W           R8, SP, #0x30+var_24                                   ; +0x1e, 0x3872f6\nSTR             R3, [SP,#0x30+var_4]                                   ; +0x22, 0x3872fa\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x24, 0x3872fc\nADD.W           R9, SP, #0x30+var_1C                                   ; +0x28, 0x387300\nMOV             R1, R0                                                 ; +0x2c, 0x387304\nADD             R0, SP, #0x30+var_2C; this                             ; +0x2e, 0x387306\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x30, 0x387308\nLDR.W           R0, [R4,#0x340]                                        ; +0x34, 0x38730c\nLDR             R3, [R0]                                               ; +0x38, 0x387310\nLDR.W           R6, [R0,#0x9F0]                                        ; +0x3a, 0x387312\nLDR.W           R3, [R3,#0xF8]                                         ; +0x3e, 0x387316\nBLX             R3                                                     ; +0x42, 0x38731a\nLDR             R3, [R0]                                               ; +0x44, 0x38731c\nLDR             R3, [R3,#0x54]                                         ; +0x46, 0x38731e\nBLX             R3                                                     ; +0x48, 0x387320\nMOV             R10, R0                                                ; +0x4a, 0x387322\nLDR.W           R0, [R4,#0x340]                                        ; +0x4c, 0x387324\nLDR             R3, [R0]                                               ; +0x50, 0x387328\nLDR.W           R3, [R3,#0xF8]                                         ; +0x52, 0x38732a\nBLX             R3                                                     ; +0x56, 0x38732e\nMOV.W           R1, #0x3F800000                                        ; +0x58, 0x387330\nLDR             R3, [R0]                                               ; +0x5c, 0x387334\nLDR             R3, [R3,#0x50]                                         ; +0x5e, 0x387336\nBLX             R3                                                     ; +0x60, 0x387338\nVLDR            S15, [SP,#0x30+var_2C]                                 ; +0x62, 0x38733a\nMOV             R0, R5; this                                           ; +0x66, 0x38733e\nVMUL.F32        S15, S15, S17                                          ; +0x68, 0x387340\nVMOV            R1, S15; float                                         ; +0x6c, 0x387344\nVLDR            S15, [SP,#0x30+var_28]                                 ; +0x70, 0x387348\nVMUL.F32        S15, S15, S17                                          ; +0x74, 0x38734c\nVMOV            R2, S15; float                                         ; +0x78, 0x387350\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x7c, 0x387354\nMOV             R0, R8; this                                           ; +0x80, 0x387358\nMOV             R2, R5                                                 ; +0x82, 0x38735a\nMOV             R1, R6; cocos2d::CCPoint *                             ; +0x84, 0x38735c\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x86, 0x38735e\nLDR.W           R3, [R4,#0x340]                                        ; +0x8a, 0x387362\nVMOV            R1, S16                                                ; +0x8e, 0x387366\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x92, 0x38736a\nLDR             R3, [R0]                                               ; +0x96, 0x38736e\nLDR             R3, [R3,#0x50]                                         ; +0x98, 0x387370\nBLX             R3                                                     ; +0x9a, 0x387372\nMOV             R2, R8                                                 ; +0x9c, 0x387374\nMOV             R0, R9; this                                           ; +0x9e, 0x387376\nMOV             R1, R6; cocos2d::CCPoint *                             ; +0xa0, 0x387378\nBL              _ZN7cocos2d6CCNode19convertToWorldSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToWorldSpace(cocos2d::CCPoint const&) ; +0xa2, 0x38737a\nVLDR            S15, [SP,#0x30+var_2C]                                 ; +0xa6, 0x38737e\nADD.W           R8, SP, #0x30+var_14                                   ; +0xaa, 0x387382\nMOV             R0, R5; this                                           ; +0xae, 0x387386\nVMUL.F32        S15, S15, S17                                          ; +0xb0, 0x387388\nVMOV            R1, S15; float                                         ; +0xb4, 0x38738c\nVLDR            S15, [SP,#0x30+var_28]                                 ; +0xb8, 0x387390\nVMUL.F32        S15, S15, S17                                          ; +0xbc, 0x387394\nVMOV            R2, S15; float                                         ; +0xc0, 0x387398\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xc4, 0x38739c\nMOV             R1, R5                                                 ; +0xc8, 0x3873a0\nMOV             R2, R9                                                 ; +0xca, 0x3873a2\nMOV             R0, R8                                                 ; +0xcc, 0x3873a4\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0xce, 0x3873a6\nLDR             R3, [R6]                                               ; +0xd2, 0x3873aa\nMOV             R0, R6                                                 ; +0xd4, 0x3873ac\nLDR             R3, [R3,#0x60]                                         ; +0xd6, 0x3873ae\nBLX             R3                                                     ; +0xd8, 0x3873b0\nMOV             R2, R8                                                 ; +0xda, 0x3873b2\nMOV             R1, R0                                                 ; +0xdc, 0x3873b4\nMOV             R0, R5                                                 ; +0xde, 0x3873b6\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xe0, 0x3873b8\nLDR             R3, [R6]                                               ; +0xe4, 0x3873bc\nMOV             R1, R5                                                 ; +0xe6, 0x3873be\nMOV             R0, R6                                                 ; +0xe8, 0x3873c0\nLDR             R3, [R3,#0x5C]                                         ; +0xea, 0x3873c2\nBLX             R3                                                     ; +0xec, 0x3873c4\nMOV             R0, R4; this                                           ; +0xee, 0x3873c6\nBL              _ZN8EditorUI26constrainGameLayerPositionEv; EditorUI::constrainGameLayerPosition(void) ; +0xf0, 0x3873c8\nLDR.W           R0, [R4,#0x340]                                        ; +0xf4, 0x3873cc\nLDR             R3, [R0]                                               ; +0xf8, 0x3873d0\nLDR.W           R3, [R3,#0xF8]                                         ; +0xfa, 0x3873d2\nBLX             R3                                                     ; +0xfe, 0x3873d6\nMOV             R1, R10                                                ; +0x100, 0x3873d8\nLDR             R3, [R0]                                               ; +0x102, 0x3873da\nLDR             R3, [R3,#0x50]                                         ; +0x104, 0x3873dc\nBLX             R3                                                     ; +0x106, 0x3873de\nMOV             R0, R4; this                                           ; +0x108, 0x3873e0\nBL              _ZN8EditorUI12updateSliderEv; EditorUI::updateSlider(void) ; +0x10a, 0x3873e2\nVMOV.F32        S15, #1.0                                              ; +0x10e, 0x3873e6\nLDR.W           R0, [R4,#0x204]                                        ; +0x112, 0x3873ea\nLDR             R3, [R0]                                               ; +0x116, 0x3873ee\nLDR             R3, [R3,#0x50]                                         ; +0x118, 0x3873f0\nVDIV.F32        S16, S15, S16                                          ; +0x11a, 0x3873f2\nVMOV            R1, S16                                                ; +0x11e, 0x3873f6\nBLX             R3                                                     ; +0x122, 0x3873fa\nLDR.W           R0, [R4,#0x218]; this                                  ; +0x124, 0x3873fc\nVMOV            R1, S16; float                                         ; +0x128, 0x387400\nBL              _ZN18GJTransformControl12scaleButtonsEf; GJTransformControl::scaleButtons(float) ; +0x12c, 0x387404\nLDR             R2, [SP,#0x30+var_4]                                   ; +0x130, 0x387408\nLDR             R3, [R7]                                               ; +0x132, 0x38740a\nCMP             R2, R3                                                 ; +0x134, 0x38740c\nBEQ             loc_387414                                             ; +0x136, 0x38740e\nBLX             __stack_chk_fail                                       ; +0x138, 0x387410\nADD             SP, SP, #0x30 ; '0'                                    ; +0x13c, 0x387414\nVPOP            {D8}                                                   ; +0x13e, 0x387416\nPOP.W           {R4-R10,PC}                                            ; +0x142, 0x38741a", "xrefs": ["EditorUI::playtestStopped @ 0x3874ac", "EditorUI::zoomGameLayer @ 0x387668"], "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"}