{"type": "func", "start": 5369889040, "end": 5369889182, "name": "EditorUI::getLimitedPosition", "pseudocode": "// \n// EditorUI::getLimitedPosition from 0x140120110 to 0x14012019e (142 bytes)\n// \n// 10 xrefs:\n// > EditorUI::onCreateObject @ 0x14010f6af\n// > EditorUI::doPasteObjects @ 0x14011353c\n// > EditorUI::createPrefab @ 0x140117b0d\n// > EditorUI::applySpecialOffset @ 0x140122732\n// > EditorUI::findSnapObject_1 @ 0x1401234d0\n// > EditorUI::findSnapObject_1 @ 0x1401236cd\n// > EditorUI::ccTouchMoved @ 0x140124439\n// > EditorUI::ccTouchEnded @ 0x140124980\n// > SetupSmartBlockLayer::onPasteTemplate @ 0x140457fcd\n// > <???> @ 0x1406c9600\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::getLimitedPosition(EditorUI *a1, cocos2d::CCPoint a2)\n{\n  float *v2; // r8\n  LevelEditorLayer *m_editorLayer; // rax\n  float v5; // xmm2_4\n  float v6; // xmm1_4\n  LevelSettingsObject *m_levelSettings; // rcx\n  int v8; // eax\n\n  m_editorLayer = a1->m_editorLayer;\n  v5 = fmaxf(-3000.0, v2[1]);\n  v6 = fmaxf(-3000.0, *v2);\n  v2[1] = v5;\n  *v2 = fminf(240000.0, v6);\n  m_levelSettings = m_editorLayer->m_levelSettings;\n  v8 = 80;\n  if ( m_levelSettings->m_dynamicLevelHeight )\n    v8 = 1000;\n  v2[1] = fminf((float)((float)v8 * 30.0) + 90.0, v5);\n  cocos2d::CCPoint::CCPoint(*(cocos2d::CCPoint **)&a2);\n  return a2;\n}", "assembly": "; \n; EditorUI::getLimitedPosition from 0x140120110 to 0x14012019e (142 bytes)\n; \n; 10 xrefs:\n; > EditorUI::onCreateObject @ 0x14010f6af\n; > EditorUI::doPasteObjects @ 0x14011353c\n; > EditorUI::createPrefab @ 0x140117b0d\n; > EditorUI::applySpecialOffset @ 0x140122732\n; > EditorUI::findSnapObject_1 @ 0x1401234d0\n; > EditorUI::findSnapObject_1 @ 0x1401236cd\n; > EditorUI::ccTouchMoved @ 0x140124439\n; > EditorUI::ccTouchEnded @ 0x140124980\n; > SetupSmartBlockLayer::onPasteTemplate @ 0x140457fcd\n; > <???> @ 0x1406c9600\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    rbx                                                            ; +0x0, 0x140120110\nsub     rsp, 20h                                                       ; +0x2, 0x140120112\nmov     rax, [rcx+500h]                                                ; +0x6, 0x140120116\nmov     rbx, rdx                                                       ; +0xd, 0x14012011d\nmovss   xmm2, cs:dword_140623AE4                                       ; +0x10, 0x140120120\nmov     edx, 3E8h                                                      ; +0x18, 0x140120128\nmovss   xmm0, cs:dword_140623670                                       ; +0x1d, 0x14012012d\nmovaps  xmm1, xmm2                                                     ; +0x25, 0x140120135\nmaxss   xmm2, dword ptr [r8+4]                                         ; +0x28, 0x140120138\nmaxss   xmm1, dword ptr [r8]                                           ; +0x2e, 0x14012013e\nmovss   dword ptr [r8+4], xmm2                                         ; +0x33, 0x140120143\nminss   xmm0, xmm1                                                     ; +0x39, 0x140120149\nmovss   dword ptr [r8], xmm0                                           ; +0x3d, 0x14012014d\nmov     rcx, [rax+0DB0h]                                               ; +0x42, 0x140120152\nmov     eax, 50h ; 'P'                                                 ; +0x49, 0x140120159\ncmp     byte ptr [rcx+1CDh], 0                                         ; +0x4e, 0x14012015e\nmov     rcx, rbx                                                       ; +0x55, 0x140120165\ncmovnz  eax, edx                                                       ; +0x58, 0x140120168\nmov     rdx, r8                                                        ; +0x5b, 0x14012016b\nmovd    xmm0, eax                                                      ; +0x5e, 0x14012016e\ncvtdq2ps xmm0, xmm0                                                    ; +0x62, 0x140120172\nmulss   xmm0, cs:dword_140623164                                       ; +0x65, 0x140120175\naddss   xmm0, cs:dword_140623294                                       ; +0x6d, 0x14012017d\nminss   xmm0, xmm2                                                     ; +0x75, 0x140120185\nmovss   dword ptr [r8+4], xmm0                                         ; +0x79, 0x140120189\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x7f, 0x14012018f\nmov     rax, rbx                                                       ; +0x85, 0x140120195\nadd     rsp, 20h                                                       ; +0x88, 0x140120198\npop     rbx                                                            ; +0x8c, 0x14012019c\nretn                                                                   ; +0x8d, 0x14012019d", "xrefs": ["EditorUI::onCreateObject @ 0x14010f6af", "EditorUI::doPasteObjects @ 0x14011353c", "EditorUI::createPrefab @ 0x140117b0d", "EditorUI::applySpecialOffset @ 0x140122732", "EditorUI::findSnapObject_1 @ 0x1401234d0", "EditorUI::findSnapObject_1 @ 0x1401236cd", "EditorUI::ccTouchMoved @ 0x140124439", "EditorUI::ccTouchEnded @ 0x140124980", "SetupSmartBlockLayer::onPasteTemplate @ 0x140457fcd", "<???> @ 0x1406c9600"], "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"}