{"type": "func", "start": 6876100, "end": 6876752, "name": "EditorUI::moveForCommand", "pseudocode": "// \n// EditorUI::moveForCommand from 0x68ebc4 to 0x68ee50 (652 bytes)\n// \n// 2 xrefs:\n// > EditorUI::moveObjectCall @ 0x6b93ac\n// > <???> @ 0xbd180\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\ncocos2d::CCPoint EditorUI::moveForCommand(EditorUI *a1, EditCommand a2)\n{\n  cocos2d::CCPoint *v2; // x8\n  cocos2d::CCPoint *v3; // x20\n  float m_gridSize; // s10\n  float v5; // s9\n  float v6; // s8\n  float v9; // s0\n  float v10; // s1\n  float v11; // s0\n  float v12; // s1\n  float v13; // s0\n  float v14; // s1\n  float v15; // s0\n  float v16; // s1\n  float v17; // s0\n  float v18; // s1\n  float v19; // s0\n  float v20; // s1\n  float v21; // s0\n  float v22; // s1\n  float v23; // s0\n  float v24; // s1\n  float v25; // s0\n  float v26; // s1\n  float v27; // s0\n  float v28; // s1\n  cocos2d::CCPoint v30; // [xsp+50h] [xbp+50h] BYREF\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v3 = v2;\n  m_gridSize = a1->m_gridSize;\n  v5 = m_gridSize * 5.0;\n  v6 = m_gridSize * 0.5;\n  cocos2d::CCPoint::CCPoint(v2);\n  switch ( a2 )\n  {\n    case SmallLeft:\n      cocos2d::CCPoint::CCPoint(&v30, -2.0, 0.0);\n      cocos2d::CCPoint::operator=(v3, v27, v28);\n      return result;\n    case SmallRight:\n      cocos2d::CCPoint::CCPoint(&v30, 2.0, 0.0);\n      cocos2d::CCPoint::operator=(v3, v25, v26);\n      return result;\n    case SmallUp:\n      cocos2d::CCPoint::CCPoint(&v30, 0.0, 2.0);\n      cocos2d::CCPoint::operator=(v3, v23, v24);\n      return result;\n    case SmallDown:\n      cocos2d::CCPoint::CCPoint(&v30, 0.0, -2.0);\n      cocos2d::CCPoint::operator=(v3, v21, v22);\n      return result;\n    case Left:\n      v9 = -m_gridSize;\n      goto LABEL_6;\n    case Right:\n      v9 = m_gridSize;\n      goto LABEL_6;\n    case Up:\n      v9 = 0.0;\n      v10 = m_gridSize;\n      goto LABEL_3;\n    case Down:\n      v9 = 0.0;\n      v10 = -m_gridSize;\n      goto LABEL_3;\n    case BigLeft:\n      v9 = -v5;\n      goto LABEL_6;\n    case BigRight:\n      v9 = m_gridSize * 5.0;\n      goto LABEL_6;\n    case BigUp:\n      v9 = 0.0;\n      v10 = m_gridSize * 5.0;\n      goto LABEL_3;\n    case BigDown:\n      v9 = 0.0;\n      v10 = -v5;\n      goto LABEL_3;\n    case TinyLeft:\n      cocos2d::CCPoint::CCPoint(&v30, -0.5, 0.0);\n      cocos2d::CCPoint::operator=(v3, v19, v20);\n      return result;\n    case TinyRight:\n      cocos2d::CCPoint::CCPoint(&v30, 0.5, 0.0);\n      cocos2d::CCPoint::operator=(v3, v17, v18);\n      return result;\n    case TinyUp:\n      cocos2d::CCPoint::CCPoint(&v30, 0.0, 0.5);\n      cocos2d::CCPoint::operator=(v3, v15, v16);\n      return result;\n    case TinyDown:\n      cocos2d::CCPoint::CCPoint(&v30, 0.0, -0.5);\n      cocos2d::CCPoint::operator=(v3, v13, v14);\n      return result;\n    case HalfLeft:\n      v9 = -v6;\n      goto LABEL_6;\n    case HalfRight:\n      v9 = m_gridSize * 0.5;\nLABEL_6:\n      v10 = 0.0;\n      goto LABEL_3;\n    case HalfUp:\n      v9 = 0.0;\n      v10 = m_gridSize * 0.5;\n      goto LABEL_3;\n    case HalfDown:\n      v9 = 0.0;\n      v10 = -v6;\nLABEL_3:\n      cocos2d::CCPoint::CCPoint(&v30, v9, v10);\n      cocos2d::CCPoint::operator=(v3, v11, v12);\n      break;\n    default:\n      return result;\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::moveForCommand from 0x68ebc4 to 0x68ee50 (652 bytes)\n; \n; 2 xrefs:\n; > EditorUI::moveObjectCall @ 0x6b93ac\n; > <???> @ 0xbd180\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\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x68ebc4\nFMOV            S2, #5.0                                               ; +0x4, 0x68ebc8\nMOV             X29, SP                                                ; +0x8, 0x68ebcc\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0xc, 0x68ebd0\nSTP             D8, D9, [SP,#0x60+var_40]                              ; +0x10, 0x68ebd4\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0x68ebd8\nMOV             X20, X8                                                ; +0x18, 0x68ebdc\nSTR             D10, [SP,#0x60+var_30]                                 ; +0x1c, 0x68ebe0\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x20, 0x68ebe4\nLDR             S10, [X0,#0x270]                                       ; +0x24, 0x68ebe8\nMOV             X0, X8; this                                           ; +0x28, 0x68ebec\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x2c, 0x68ebf0\nFMOV            S0, #0.5                                               ; +0x30, 0x68ebf4\nFMUL            S9, S10, S2                                            ; +0x34, 0x68ebf8\nFMUL            S8, S10, S0                                            ; +0x38, 0x68ebfc\nLDR             X2, [X2]                                               ; +0x3c, 0x68ec00\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x40, 0x68ec04\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0x44, 0x68ec08\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x48, 0x68ec0c\nSUB             W1, W1, #1; switch 20 cases                            ; +0x4c, 0x68ec10\nCMP             W1, #0x13                                              ; +0x50, 0x68ec14\nB.HI            def_68EC30; jumptable 000000000068EC30 default case    ; +0x54, 0x68ec18\nADRL            X0, jpt_68EC30                                         ; +0x58, 0x68ec1c\nLDRH            W0, [X0,W1,UXTW#1]                                     ; +0x60, 0x68ec24\nADR             X1, loc_68EC34; jumptable 000000000068EC30 case 19     ; +0x64, 0x68ec28\nADD             X0, X1, W0,SXTH#2                                      ; +0x68, 0x68ec2c\nBR              X0; switch jump                                        ; +0x6c, 0x68ec30\nFMOV            S0, WZR; jumptable 000000000068EC30 case 19            ; +0x70, 0x68ec34\nADD             X1, X29, #0x60+var_10                                  ; +0x74, 0x68ec38\nFMOV            S1, S8; float                                          ; +0x78, 0x68ec3c\nMOV             X0, X1; this                                           ; +0x7c, 0x68ec40\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x80, 0x68ec44\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x84, 0x68ec48\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x88, 0x68ec4c\nMOV             X0, X20                                                ; +0x8c, 0x68ec50\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x90, 0x68ec54\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; jumptable 000000000068EC30 default case ; +0x94, 0x68ec58\nMOV             X0, X20                                                ; +0x98, 0x68ec5c\nLDR             X2, [X29,#0x60+var_8]                                  ; +0x9c, 0x68ec60\nLDR             X1, [X19]                                              ; +0xa0, 0x68ec64\nCMP             X2, X1                                                 ; +0xa4, 0x68ec68\nB.NE            loc_68EE4C                                             ; +0xa8, 0x68ec6c\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xac, 0x68ec70\nLDP             D8, D9, [SP,#0x60+var_40]                              ; +0xb0, 0x68ec74\nLDR             D10, [SP,#0x60+var_30]                                 ; +0xb4, 0x68ec78\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xb8, 0x68ec7c\nRET                                                                    ; +0xbc, 0x68ec80\nFMOV            S0, S8; jumptable 000000000068EC30 case 18             ; +0xc0, 0x68ec84\nADD             X1, X29, #0x60+var_10                                  ; +0xc4, 0x68ec88\nFMOV            S1, WZR                                                ; +0xc8, 0x68ec8c\nB               loc_68EC40                                             ; +0xcc, 0x68ec90\nFNEG            S0, S8; jumptable 000000000068EC30 case 17             ; +0xd0, 0x68ec94\nB               loc_68EC88                                             ; +0xd4, 0x68ec98\nFMOV            S0, WZR; jumptable 000000000068EC30 case 16            ; +0xd8, 0x68ec9c\nADD             X1, X29, #0x60+var_10                                  ; +0xdc, 0x68eca0\nMOV             X0, X1; this                                           ; +0xe0, 0x68eca4\nSTR             X1, [X29,#0x60+var_18]                                 ; +0xe4, 0x68eca8\nFMOV            S1, #-0.5; float                                       ; +0xe8, 0x68ecac\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xec, 0x68ecb0\nLDR             X1, [X29,#0x60+var_18]                                 ; +0xf0, 0x68ecb4\nMOV             X0, X20                                                ; +0xf4, 0x68ecb8\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xf8, 0x68ecbc\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0xfc, 0x68ecc0\nFMOV            S0, WZR; jumptable 000000000068EC30 case 15            ; +0x100, 0x68ecc4\nADD             X1, X29, #0x60+var_10                                  ; +0x104, 0x68ecc8\nMOV             X0, X1; this                                           ; +0x108, 0x68eccc\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x10c, 0x68ecd0\nFMOV            S1, #0.5; float                                        ; +0x110, 0x68ecd4\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x114, 0x68ecd8\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x118, 0x68ecdc\nMOV             X0, X20                                                ; +0x11c, 0x68ece0\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x120, 0x68ece4\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0x124, 0x68ece8\nFMOV            S1, WZR; jumptable 000000000068EC30 case 14            ; +0x128, 0x68ecec\nADD             X1, X29, #0x60+var_10                                  ; +0x12c, 0x68ecf0\nMOV             X0, X1; this                                           ; +0x130, 0x68ecf4\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x134, 0x68ecf8\nFMOV            S0, #0.5; float                                        ; +0x138, 0x68ecfc\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x13c, 0x68ed00\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x140, 0x68ed04\nMOV             X0, X20                                                ; +0x144, 0x68ed08\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x148, 0x68ed0c\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0x14c, 0x68ed10\nFMOV            S1, WZR; jumptable 000000000068EC30 case 13            ; +0x150, 0x68ed14\nADD             X1, X29, #0x60+var_10                                  ; +0x154, 0x68ed18\nMOV             X0, X1; this                                           ; +0x158, 0x68ed1c\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x15c, 0x68ed20\nFMOV            S0, #-0.5; float                                       ; +0x160, 0x68ed24\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x164, 0x68ed28\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x168, 0x68ed2c\nMOV             X0, X20                                                ; +0x16c, 0x68ed30\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x170, 0x68ed34\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0x174, 0x68ed38\nFMOV            S0, WZR; jumptable 000000000068EC30 case 12            ; +0x178, 0x68ed3c\nADD             X1, X29, #0x60+var_10                                  ; +0x17c, 0x68ed40\nFNEG            S1, S9                                                 ; +0x180, 0x68ed44\nB               loc_68EC40                                             ; +0x184, 0x68ed48\nFMOV            S0, WZR; jumptable 000000000068EC30 case 11            ; +0x188, 0x68ed4c\nADD             X1, X29, #0x60+var_10                                  ; +0x18c, 0x68ed50\nFMOV            S1, S9                                                 ; +0x190, 0x68ed54\nB               loc_68EC40                                             ; +0x194, 0x68ed58\nFMOV            S0, S9; jumptable 000000000068EC30 case 10             ; +0x198, 0x68ed5c\nB               loc_68EC88                                             ; +0x19c, 0x68ed60\nFNEG            S0, S9; jumptable 000000000068EC30 case 9              ; +0x1a0, 0x68ed64\nB               loc_68EC88                                             ; +0x1a4, 0x68ed68\nFMOV            S0, WZR; jumptable 000000000068EC30 case 8             ; +0x1a8, 0x68ed6c\nADD             X1, X29, #0x60+var_10                                  ; +0x1ac, 0x68ed70\nFNEG            S1, S10                                                ; +0x1b0, 0x68ed74\nB               loc_68EC40                                             ; +0x1b4, 0x68ed78\nFMOV            S0, WZR; jumptable 000000000068EC30 case 7             ; +0x1b8, 0x68ed7c\nADD             X1, X29, #0x60+var_10                                  ; +0x1bc, 0x68ed80\nFMOV            S1, S10                                                ; +0x1c0, 0x68ed84\nB               loc_68EC40                                             ; +0x1c4, 0x68ed88\nFMOV            S0, S10; jumptable 000000000068EC30 case 6             ; +0x1c8, 0x68ed8c\nB               loc_68EC88                                             ; +0x1cc, 0x68ed90\nFNEG            S0, S10; jumptable 000000000068EC30 case 5             ; +0x1d0, 0x68ed94\nB               loc_68EC88                                             ; +0x1d4, 0x68ed98\nFMOV            S0, WZR; jumptable 000000000068EC30 case 4             ; +0x1d8, 0x68ed9c\nADD             X1, X29, #0x60+var_10                                  ; +0x1dc, 0x68eda0\nMOV             X0, X1; this                                           ; +0x1e0, 0x68eda4\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x1e4, 0x68eda8\nFMOV            S1, #-2.0; float                                       ; +0x1e8, 0x68edac\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x1ec, 0x68edb0\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x1f0, 0x68edb4\nMOV             X0, X20                                                ; +0x1f4, 0x68edb8\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x1f8, 0x68edbc\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0x1fc, 0x68edc0\nFMOV            S0, WZR; jumptable 000000000068EC30 case 3             ; +0x200, 0x68edc4\nADD             X1, X29, #0x60+var_10                                  ; +0x204, 0x68edc8\nMOV             X0, X1; this                                           ; +0x208, 0x68edcc\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x20c, 0x68edd0\nFMOV            S1, #2.0; float                                        ; +0x210, 0x68edd4\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x214, 0x68edd8\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x218, 0x68eddc\nMOV             X0, X20                                                ; +0x21c, 0x68ede0\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x220, 0x68ede4\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0x224, 0x68ede8\nFMOV            S1, WZR; jumptable 000000000068EC30 case 2             ; +0x228, 0x68edec\nADD             X1, X29, #0x60+var_10                                  ; +0x22c, 0x68edf0\nMOV             X0, X1; this                                           ; +0x230, 0x68edf4\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x234, 0x68edf8\nFMOV            S0, #2.0; float                                        ; +0x238, 0x68edfc\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x23c, 0x68ee00\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x240, 0x68ee04\nMOV             X0, X20                                                ; +0x244, 0x68ee08\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x248, 0x68ee0c\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0x24c, 0x68ee10\nFMOV            S1, WZR; jumptable 000000000068EC30 case 1             ; +0x250, 0x68ee14\nADD             X1, X29, #0x60+var_10                                  ; +0x254, 0x68ee18\nMOV             X0, X1; this                                           ; +0x258, 0x68ee1c\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x25c, 0x68ee20\nFMOV            S0, #-2.0; float                                       ; +0x260, 0x68ee24\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x264, 0x68ee28\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x268, 0x68ee2c\nMOV             X0, X20                                                ; +0x26c, 0x68ee30\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x270, 0x68ee34\nB               def_68EC30; jumptable 000000000068EC30 default case    ; +0x274, 0x68ee38\nFMOV            S0, WZR; jumptable 000000000068EC30 case 20            ; +0x278, 0x68ee3c\nADD             X1, X29, #0x60+var_10                                  ; +0x27c, 0x68ee40\nFNEG            S1, S8                                                 ; +0x280, 0x68ee44\nB               loc_68EC40                                             ; +0x284, 0x68ee48\nBL              .__stack_chk_fail                                      ; +0x288, 0x68ee4c", "xrefs": ["EditorUI::moveObjectCall @ 0x6b93ac", "<???> @ 0xbd180"], "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"}