{"type": "func", "start": 5370542336, "end": 5370542557, "name": "EditorUI::getGridSnappedPos", "pseudocode": "// \n// EditorUI::getGridSnappedPos from 0x1401bf900 to 0x1401bf9dd (221 bytes)\n// \n// 11 xrefs:\n// > EditorUI::onCreateObject @ 0x1401b2983\n// > EditorUI::createPrefab @ 0x1401b74b8\n// > EditorUI::createGradientFromSelection @ 0x1401b9df3\n// > EditorUI::findSnapObject_1 @ 0x1401bf625\n// > EditorUI::findSnapObject_1 @ 0x1401bf7ad\n// > EditorUI::swipeToPosition @ 0x1401bfe2c\n// > EditorUI::ccTouchEnded @ 0x1401c1092\n// > EditorUI::doPasteObjects @ 0x1401c60a8\n// > EditorUI::applySpecialOffset @ 0x1402020a6\n// > SetupSmartBlockLayer::onPasteTemplate @ 0x1405ed961\n// > <???> @ 0x14091a624\n// \n// This function is hookable on this platform (idp: pc, 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 11:28:02 +0000\n// \n\n__int64 __fastcall EditorUI::getGridSnappedPos(__int64 a1, __int64 a2, float *a3)\n{\n  float v6; // xmm9_4\n  float v7; // xmm7_4\n  float v8; // xmm8_4\n  float v9; // xmm0_4\n  __int64 v10; // rax\n  char v12; // [rsp+60h] [rbp+8h] BYREF\n\n  v6 = *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 14944LL) + 636LL);\n  v7 = fmodf(90.0, v6);\n  v8 = floorf((float)(a3[1] - v7) / v6);\n  v9 = (float)(floorf(*a3 / v6) + 0.5) * v6;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v12, v9, (float)((float)(v8 + 0.5) * v6) + v7);\n  EditorUI::getLimitedPosition(a1, a2, v10);\n  return a2;\n}", "assembly": "; \n; EditorUI::getGridSnappedPos from 0x1401bf900 to 0x1401bf9dd (221 bytes)\n; \n; 11 xrefs:\n; > EditorUI::onCreateObject @ 0x1401b2983\n; > EditorUI::createPrefab @ 0x1401b74b8\n; > EditorUI::createGradientFromSelection @ 0x1401b9df3\n; > EditorUI::findSnapObject_1 @ 0x1401bf625\n; > EditorUI::findSnapObject_1 @ 0x1401bf7ad\n; > EditorUI::swipeToPosition @ 0x1401bfe2c\n; > EditorUI::ccTouchEnded @ 0x1401c1092\n; > EditorUI::doPasteObjects @ 0x1401c60a8\n; > EditorUI::applySpecialOffset @ 0x1402020a6\n; > SetupSmartBlockLayer::onPasteTemplate @ 0x1405ed961\n; > <???> @ 0x14091a624\n; \n; This function is hookable on this platform (idp: pc, 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 11:28:02 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401bf900\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1401bf905\npush    rdi                                                            ; +0xa, 0x1401bf90a\nsub     rsp, 50h                                                       ; +0xb, 0x1401bf90b\nmov     rax, [rcx+5E8h]                                                ; +0xf, 0x1401bf90f\nmov     rbx, r8                                                        ; +0x16, 0x1401bf916\nmovss   xmm0, cs:flt_140835780; X                                      ; +0x19, 0x1401bf919\nmov     rsi, rdx                                                       ; +0x21, 0x1401bf921\nmovaps  [rsp+58h+var_18], xmm7                                         ; +0x24, 0x1401bf924\nmov     rdi, rcx                                                       ; +0x29, 0x1401bf929\nmovaps  [rsp+58h+var_28], xmm8                                         ; +0x2c, 0x1401bf92c\nmov     r9, [rax+3A60h]                                                ; +0x32, 0x1401bf932\nmovaps  [rsp+58h+var_38], xmm9                                         ; +0x39, 0x1401bf939\nmovss   xmm9, dword ptr [r9+27Ch]                                      ; +0x3f, 0x1401bf93f\nmovaps  xmm1, xmm9; Y                                                  ; +0x48, 0x1401bf948\ncall    fmodf                                                          ; +0x4c, 0x1401bf94c\nmovaps  xmm7, xmm0                                                     ; +0x51, 0x1401bf951\nmovss   xmm0, dword ptr [rbx+4]                                        ; +0x54, 0x1401bf954\nsubss   xmm0, xmm7                                                     ; +0x59, 0x1401bf959\ndivss   xmm0, xmm9; X                                                  ; +0x5d, 0x1401bf95d\ncall    floorf                                                         ; +0x62, 0x1401bf962\nmovaps  xmm8, xmm0                                                     ; +0x67, 0x1401bf967\nmovss   xmm0, dword ptr [rbx]                                          ; +0x6b, 0x1401bf96b\naddss   xmm8, cs:dword_140834F20                                       ; +0x6f, 0x1401bf96f\ndivss   xmm0, xmm9; X                                                  ; +0x78, 0x1401bf978\nmulss   xmm8, xmm9                                                     ; +0x7d, 0x1401bf97d\naddss   xmm8, xmm7                                                     ; +0x82, 0x1401bf982\ncall    floorf                                                         ; +0x87, 0x1401bf987\naddss   xmm0, cs:dword_140834F20                                       ; +0x8c, 0x1401bf98c\nmovaps  xmm2, xmm8                                                     ; +0x94, 0x1401bf994\nlea     rcx, [rsp+58h+arg_0]                                           ; +0x98, 0x1401bf998\nmulss   xmm0, xmm9                                                     ; +0x9d, 0x1401bf99d\nmovaps  xmm1, xmm0                                                     ; +0xa2, 0x1401bf9a2\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xa5, 0x1401bf9a5\nmov     rdx, rsi                                                       ; +0xab, 0x1401bf9ab\nmov     rcx, rdi                                                       ; +0xae, 0x1401bf9ae\nmov     r8, rax                                                        ; +0xb1, 0x1401bf9b1\ncall    EditorUI__getLimitedPosition                                   ; +0xb4, 0x1401bf9b4\nmov     rbx, [rsp+58h+arg_8]                                           ; +0xb9, 0x1401bf9b9\nmov     rax, rsi                                                       ; +0xbe, 0x1401bf9be\nmov     rsi, [rsp+58h+arg_10]                                          ; +0xc1, 0x1401bf9c1\nmovaps  xmm7, [rsp+58h+var_18]                                         ; +0xc6, 0x1401bf9c6\nmovaps  xmm8, [rsp+58h+var_28]                                         ; +0xcb, 0x1401bf9cb\nmovaps  xmm9, [rsp+58h+var_38]                                         ; +0xd1, 0x1401bf9d1\nadd     rsp, 50h                                                       ; +0xd7, 0x1401bf9d7\npop     rdi                                                            ; +0xdb, 0x1401bf9db\nretn                                                                   ; +0xdc, 0x1401bf9dc", "xrefs": ["EditorUI::onCreateObject @ 0x1401b2983", "EditorUI::createPrefab @ 0x1401b74b8", "EditorUI::createGradientFromSelection @ 0x1401b9df3", "EditorUI::findSnapObject_1 @ 0x1401bf625", "EditorUI::findSnapObject_1 @ 0x1401bf7ad", "EditorUI::swipeToPosition @ 0x1401bfe2c", "EditorUI::ccTouchEnded @ 0x1401c1092", "EditorUI::doPasteObjects @ 0x1401c60a8", "EditorUI::applySpecialOffset @ 0x1402020a6", "SetupSmartBlockLayer::onPasteTemplate @ 0x1405ed961", "<???> @ 0x14091a624"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}