{"type": "func", "start": 4295039760, "end": 4295039936, "name": "EditorUI::getGridSnappedPos", "pseudocode": "// \n// EditorUI::getGridSnappedPos from 0x100011b10 to 0x100011bc0 (176 bytes)\n// \n// 5 xrefs:\n// > SetupSmartBlockLayer::onPasteTemplate @ 0x1004e197e\n// > EditorUI::doPasteObjects @ 0x1005b8096\n// > EditorUI::swipeToPosition @ 0x100609c03\n// > EditorUI::ccTouchEnded @ 0x10060ac14\n// > EditorUI::applySpecialOffset @ 0x100611a7c\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 12:18:52 +0000\n// \n\n__int64 __fastcall EditorUI::getGridSnappedPos(\n        __int64 a1,\n        __int64 a2,\n        unsigned int *a3,\n        double a4,\n        double a5,\n        __m128 a6)\n{\n  float v7; // xmm0_4\n  __m128 v8; // xmm1\n  __m128 v9; // xmm3\n  _BYTE v11[8]; // [rsp+Ch] [rbp-24h] BYREF\n  float v12; // [rsp+14h] [rbp-1Ch]\n\n  v12 = *(float *)(*(_QWORD *)(*(_QWORD *)(a2 + 1440) + 14288LL) + 604LL);\n  v7 = fmodf(90.0, v12);\n  v8 = (__m128)*a3;\n  v9 = (__m128)a3[1];\n  v8.f32[0] = v8.f32[0] / v12;\n  v9.f32[0] = (float)(v9.f32[0] - v7) / v12;\n  sub_100278250(\n    v11,\n    (float)(_mm_round_ss(a6, v8, 9).f32[0] + 0.5) * v12,\n    (float)((float)(_mm_round_ss((__m128)0LL, v9, 9).f32[0] + 0.5) * v12) + v7);\n  EditorUI::getLimitedPosition(a1, a2, v11);\n  return a1;\n}", "assembly": "; \n; EditorUI::getGridSnappedPos from 0x100011b10 to 0x100011bc0 (176 bytes)\n; \n; 5 xrefs:\n; > SetupSmartBlockLayer::onPasteTemplate @ 0x1004e197e\n; > EditorUI::doPasteObjects @ 0x1005b8096\n; > EditorUI::swipeToPosition @ 0x100609c03\n; > EditorUI::ccTouchEnded @ 0x10060ac14\n; > EditorUI::applySpecialOffset @ 0x100611a7c\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 12:18:52 +0000\n; \npush    rbp                                                            ; +0x0, 0x100011b10\nmov     rbp, rsp                                                       ; +0x1, 0x100011b11\npush    r15                                                            ; +0x4, 0x100011b14\npush    r14                                                            ; +0x6, 0x100011b16\npush    rbx                                                            ; +0x8, 0x100011b18\nsub     rsp, 18h                                                       ; +0x9, 0x100011b19\nmov     r15, rdx                                                       ; +0xd, 0x100011b1d\nmov     r14, rsi                                                       ; +0x10, 0x100011b20\nmov     rbx, rdi                                                       ; +0x13, 0x100011b23\nmov     rax, [rsi+5A0h]                                                ; +0x16, 0x100011b26\nmov     rax, [rax+37D0h]                                               ; +0x1d, 0x100011b2d\nmovss   xmm1, dword ptr [rax+25Ch]; float                              ; +0x24, 0x100011b34\nmovss   [rbp+var_1C], xmm1                                             ; +0x2c, 0x100011b3c\nmovss   xmm0, cs:flt_100A035A4; float                                  ; +0x31, 0x100011b41\ncall    _fmodf                                                         ; +0x39, 0x100011b49\nmovss   xmm1, dword ptr [r15]                                          ; +0x3e, 0x100011b4e\nmovss   xmm3, dword ptr [r15+4]                                        ; +0x43, 0x100011b53\nmovss   xmm5, [rbp+var_1C]                                             ; +0x49, 0x100011b59\ndivss   xmm1, xmm5                                                     ; +0x4e, 0x100011b5e\nsubss   xmm3, xmm0                                                     ; +0x52, 0x100011b62\ndivss   xmm3, xmm5                                                     ; +0x56, 0x100011b66\nroundss xmm2, xmm1, 9                                                  ; +0x5a, 0x100011b6a\nmovss   xmm4, cs:dword_100A03578                                       ; +0x60, 0x100011b70\naddss   xmm2, xmm4                                                     ; +0x68, 0x100011b78\nmulss   xmm2, xmm5                                                     ; +0x6c, 0x100011b7c\nxorps   xmm1, xmm1                                                     ; +0x70, 0x100011b80\nroundss xmm1, xmm3, 9                                                  ; +0x73, 0x100011b83\naddss   xmm1, xmm4                                                     ; +0x79, 0x100011b89\nmulss   xmm1, xmm5                                                     ; +0x7d, 0x100011b8d\naddss   xmm1, xmm0                                                     ; +0x81, 0x100011b91\nlea     r15, [rbp+var_24]                                              ; +0x85, 0x100011b95\nmov     rdi, r15                                                       ; +0x89, 0x100011b99\nmovaps  xmm0, xmm2                                                     ; +0x8c, 0x100011b9c\ncall    sub_100278250                                                  ; +0x8f, 0x100011b9f\nmov     rdi, rbx                                                       ; +0x94, 0x100011ba4\nmov     rsi, r14                                                       ; +0x97, 0x100011ba7\nmov     rdx, r15                                                       ; +0x9a, 0x100011baa\ncall    EditorUI__getLimitedPosition                                   ; +0x9d, 0x100011bad\nmov     rax, rbx                                                       ; +0xa2, 0x100011bb2\nadd     rsp, 18h                                                       ; +0xa5, 0x100011bb5\npop     rbx                                                            ; +0xa9, 0x100011bb9\npop     r14                                                            ; +0xaa, 0x100011bba\npop     r15                                                            ; +0xac, 0x100011bbc\npop     rbp                                                            ; +0xae, 0x100011bbe\nretn                                                                   ; +0xaf, 0x100011bbf", "xrefs": ["SetupSmartBlockLayer::onPasteTemplate @ 0x1004e197e", "EditorUI::doPasteObjects @ 0x1005b8096", "EditorUI::swipeToPosition @ 0x100609c03", "EditorUI::ccTouchEnded @ 0x10060ac14", "EditorUI::applySpecialOffset @ 0x100611a7c"], "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"}