{"type": "func", "start": 12583712, "end": 12584100, "name": "EditorUI::applySpecialOffset", "pseudocode": "// \n// EditorUI::applySpecialOffset from 0xc00320 to 0xc004a4 (388 bytes)\n// \n// 4 xrefs:\n// > EditorUI::findSnapObject @ 0x7c76b8\n// > EditorUI::findSnapObject @ 0x7c77f8\n// > EditorUI::ccTouchEnded @ 0xbd6728\n// > <???> @ 0x63d90\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:03:48 +0000\n// \n\ncocos2d::CCPoint *__usercall EditorUI::applySpecialOffset@<X0>(\n        __int64 a1@<X0>,\n        float *a2@<X1>,\n        int *a3@<X2>,\n        cocos2d::CCPoint *a4@<X3>,\n        cocos2d::CCPoint *a5@<X8>)\n{\n  const cocos2d::CCPoint *v11; // x0\n  const cocos2d::CCPoint *v12; // x0\n  float v13; // s0\n  float v14; // s0\n  float v15; // [xsp+58h] [xbp+58h] BYREF\n  float v16; // [xsp+5Ch] [xbp+5Ch]\n  float v17; // [xsp+60h] [xbp+60h] BYREF\n  float v18; // [xsp+64h] [xbp+64h]\n\n  if ( isSpecialSnapObject(a3[257]) )\n  {\n    v11 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)a3 + 192LL))(a3);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, v11);\n    EditorUI::getGridSnappedPos(a1, &v17, (__int64)&v15);\n    if ( !(unsigned __int8)cocos2d::CCPoint::equals(a4, (const cocos2d::CCPoint *)&unk_155EAE0) )\n      cocos2d::CCPoint::operator=(&v15, a4);\n    v12 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)a3 + 192LL))(a3);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, v12);\n    v13 = fabsf(*a2);\n    if ( v13 > 0.0 )\n    {\n      if ( vabds_f32(v17 + v13, v15) < vabds_f32(v17 - v13, v15) )\n        v13 = -v13;\n      *a2 = v13;\n    }\n    v14 = fabsf(a2[1]);\n    if ( v14 > 0.0 )\n    {\n      if ( vabds_f32(v18 + v14, v16) < vabds_f32(v18 - v14, v16) )\n        a2[1] = -v14;\n      else\n        a2[1] = v14;\n    }\n  }\n  cocos2d::CCPoint::CCPoint(a5, (const cocos2d::CCPoint *)a2);\n  return a5;\n}", "assembly": "; \n; EditorUI::applySpecialOffset from 0xc00320 to 0xc004a4 (388 bytes)\n; \n; 4 xrefs:\n; > EditorUI::findSnapObject @ 0x7c76b8\n; > EditorUI::findSnapObject @ 0x7c77f8\n; > EditorUI::ccTouchEnded @ 0xbd6728\n; > <???> @ 0x63d90\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:03:48 +0000\n; \nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0xc00320\nMOV             X29, SP                                                ; +0x4, 0xc00324\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0xc00328\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0xc0032c\nMOV             X20, X2                                                ; +0x10, 0xc00330\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x14, 0xc00334\nMOV             X21, X1                                                ; +0x18, 0xc00338\nMOV             X22, X8                                                ; +0x1c, 0xc0033c\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0xc00340\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x24, 0xc00344\nSTP             X25, X26, [SP,#0x70+var_30]                            ; +0x28, 0xc00348\nMOV             X25, X0                                                ; +0x2c, 0xc0034c\nMOV             X24, X3                                                ; +0x30, 0xc00350\nLDR             X1, [X1]                                               ; +0x34, 0xc00354\nLDR             W0, [X2,#0x404]; int                                   ; +0x38, 0xc00358\nSTR             X1, [X29,#0x70+var_8]                                  ; +0x3c, 0xc0035c\nBL              _Z19isSpecialSnapObjecti; isSpecialSnapObject(int)     ; +0x40, 0xc00360\nUXTB            W0, W0                                                 ; +0x44, 0xc00364\nCBNZ            W0, loc_C003A8                                         ; +0x48, 0xc00368\nMOV             X0, X22; this                                          ; +0x4c, 0xc0036c\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0x50, 0xc00370\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x54, 0xc00374\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x58, 0xc00378\nLDR             X2, [X29,#0x70+var_8]                                  ; +0x5c, 0xc0037c\nMOV             X0, X22                                                ; +0x60, 0xc00380\nLDR             X1, [X19]                                              ; +0x64, 0xc00384\nCMP             X2, X1                                                 ; +0x68, 0xc00388\nB.NE            loc_C004A0                                             ; +0x6c, 0xc0038c\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x70, 0xc00390\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x74, 0xc00394\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0x78, 0xc00398\nLDP             X25, X26, [SP,#0x70+var_30]                            ; +0x7c, 0xc0039c\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x80, 0xc003a0\nRET                                                                    ; +0x84, 0xc003a4\nLDR             X1, [X20]                                              ; +0x88, 0xc003a8\nMOV             X0, X20                                                ; +0x8c, 0xc003ac\nADD             X23, X29, #0x70+var_10                                 ; +0x90, 0xc003b0\nADD             X26, X29, #0x70+var_18                                 ; +0x94, 0xc003b4\nLDR             X1, [X1,#0xC0]                                         ; +0x98, 0xc003b8\nBLR             X1                                                     ; +0x9c, 0xc003bc\nMOV             X1, X0; cocos2d::CCPoint *                             ; +0xa0, 0xc003c0\nMOV             X0, X23; this                                          ; +0xa4, 0xc003c4\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xa8, 0xc003c8\nMOV             X8, X26                                                ; +0xac, 0xc003cc\nMOV             X0, X25                                                ; +0xb0, 0xc003d0\nMOV             X1, X23                                                ; +0xb4, 0xc003d4\nBL              _ZN8EditorUI17getGridSnappedPosEN7cocos2d7CCPointE; EditorUI::getGridSnappedPos(cocos2d::CCPoint) ; +0xb8, 0xc003d8\nADRP            X1, #unk_155EAE0@PAGE                                  ; +0xbc, 0xc003dc\nMOV             X0, X24; this                                          ; +0xc0, 0xc003e0\nADD             X1, X1, #unk_155EAE0@PAGEOFF; cocos2d::CCPoint *       ; +0xc4, 0xc003e4\nBL              _ZNK7cocos2d7CCPoint6equalsERKS0_; cocos2d::CCPoint::equals(cocos2d::CCPoint const&) ; +0xc8, 0xc003e8\nUXTB            W0, W0                                                 ; +0xcc, 0xc003ec\nCBZ             W0, loc_C00490                                         ; +0xd0, 0xc003f0\nLDR             X1, [X20]                                              ; +0xd4, 0xc003f4\nMOV             X0, X20                                                ; +0xd8, 0xc003f8\nLDR             X1, [X1,#0xC0]                                         ; +0xdc, 0xc003fc\nBLR             X1                                                     ; +0xe0, 0xc00400\nMOV             X1, X0; cocos2d::CCPoint *                             ; +0xe4, 0xc00404\nMOV             X0, X23; this                                          ; +0xe8, 0xc00408\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xec, 0xc0040c\nLDR             S0, [X21]                                              ; +0xf0, 0xc00410\nFABS            S0, S0                                                 ; +0xf4, 0xc00414\nFCMPE           S0, #0.0                                               ; +0xf8, 0xc00418\nB.LE            loc_C00444                                             ; +0xfc, 0xc0041c\nLDR             S1, [X29,#0x70+var_10]                                 ; +0x100, 0xc00420\nLDR             S3, [X29,#0x70+var_18]                                 ; +0x104, 0xc00424\nFADD            S2, S1, S0                                             ; +0x108, 0xc00428\nFSUB            S1, S1, S0                                             ; +0x10c, 0xc0042c\nFABD            S2, S2, S3                                             ; +0x110, 0xc00430\nFABD            S1, S1, S3                                             ; +0x114, 0xc00434\nFCMPE           S2, S1                                                 ; +0x118, 0xc00438\nB.LT            loc_C00488                                             ; +0x11c, 0xc0043c\nSTR             S0, [X21]                                              ; +0x120, 0xc00440\nLDR             S0, [X21,#4]                                           ; +0x124, 0xc00444\nFABS            S0, S0                                                 ; +0x128, 0xc00448\nFCMPE           S0, #0.0                                               ; +0x12c, 0xc0044c\nB.LE            loc_C0036C                                             ; +0x130, 0xc00450\nLDR             S1, [X29,#0x70+var_C]                                  ; +0x134, 0xc00454\nLDR             S3, [X29,#0x70+var_14]                                 ; +0x138, 0xc00458\nFADD            S2, S1, S0                                             ; +0x13c, 0xc0045c\nFSUB            S1, S1, S0                                             ; +0x140, 0xc00460\nFABD            S2, S2, S3                                             ; +0x144, 0xc00464\nFABD            S1, S1, S3                                             ; +0x148, 0xc00468\nFCMPE           S2, S1                                                 ; +0x14c, 0xc0046c\nB.LT            loc_C0047C                                             ; +0x150, 0xc00470\nSTR             S0, [X21,#4]                                           ; +0x154, 0xc00474\nB               loc_C0036C                                             ; +0x158, 0xc00478\nFNEG            S0, S0                                                 ; +0x15c, 0xc0047c\nSTR             S0, [X21,#4]                                           ; +0x160, 0xc00480\nB               loc_C0036C                                             ; +0x164, 0xc00484\nFNEG            S0, S0                                                 ; +0x168, 0xc00488\nB               loc_C00440                                             ; +0x16c, 0xc0048c\nMOV             X0, X26                                                ; +0x170, 0xc00490\nMOV             X1, X24                                                ; +0x174, 0xc00494\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x178, 0xc00498\nB               loc_C003F4                                             ; +0x17c, 0xc0049c\nBL              .__stack_chk_fail                                      ; +0x180, 0xc004a0", "xrefs": ["EditorUI::findSnapObject @ 0x7c76b8", "EditorUI::findSnapObject @ 0x7c77f8", "EditorUI::ccTouchEnded @ 0xbd6728", "<???> @ 0x63d90"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}