{"type": "func", "start": 4295160016, "end": 4295160155, "name": "EditorUI::valueFromXPos", "pseudocode": "// \n// EditorUI::valueFromXPos from 0x10002f0d0 to 0x10002f15b (139 bytes)\n// \n// 0 xrefs:\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\nfloat __fastcall EditorUI::valueFromXPos(EditorUI *a1, float a2)\n{\n  int SectionCount; // eax\n  int v3; // ecx\n  float XMin; // [rsp+10h] [rbp-10h]\n\n  XMin = EditorUI::getXMin(a1, 0);\n  SectionCount = LevelEditorLayer::getSectionCount(a1->m_editorLayer);\n  v3 = 100;\n  if ( SectionCount >= 101 )\n    v3 = SectionCount;\n  return fminf(\n           fmaxf(\n             (float)(a2 - XMin)\n           / (float)(((float (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer)\n                   * (float)((float)v3 * -100.0)),\n             0.0),\n           1.0);\n}", "assembly": "; \n; EditorUI::valueFromXPos from 0x10002f0d0 to 0x10002f15b (139 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x10002f0d0\nmov     rbp, rsp                                                       ; +0x1, 0x10002f0d1\npush    rbx                                                            ; +0x4, 0x10002f0d4\nsub     rsp, 18h                                                       ; +0x5, 0x10002f0d5\nmovss   [rbp+var_14], xmm0                                             ; +0x9, 0x10002f0d9\nmov     rbx, rdi                                                       ; +0xe, 0x10002f0de\nxor     esi, esi                                                       ; +0x11, 0x10002f0e1\ncall    EditorUI__getXMin                                              ; +0x13, 0x10002f0e3\nmovss   [rbp+var_10], xmm0                                             ; +0x18, 0x10002f0e8\nmov     rdi, [rbx+4E8h]                                                ; +0x1d, 0x10002f0ed\ncall    LevelEditorLayer__getSectionCount                              ; +0x24, 0x10002f0f4\ncmp     eax, 65h ; 'e'                                                 ; +0x29, 0x10002f0f9\nmov     ecx, 64h ; 'd'                                                 ; +0x2c, 0x10002f0fc\ncmovge  ecx, eax                                                       ; +0x31, 0x10002f101\nxorps   xmm0, xmm0                                                     ; +0x34, 0x10002f104\ncvtsi2ss xmm0, ecx                                                     ; +0x37, 0x10002f107\nmulss   xmm0, cs:dword_10081501C                                       ; +0x3b, 0x10002f10b\nmovss   [rbp+var_C], xmm0                                              ; +0x43, 0x10002f113\nmov     rax, [rbx+4E8h]                                                ; +0x48, 0x10002f118\nmov     rdi, [rax+0EB8h]                                               ; +0x4f, 0x10002f11f\nmov     rax, [rdi]                                                     ; +0x56, 0x10002f126\ncall    qword ptr [rax+0A8h]                                           ; +0x59, 0x10002f129\nmulss   xmm0, [rbp+var_C]                                              ; +0x5f, 0x10002f12f\nmovss   xmm1, [rbp+var_14]                                             ; +0x64, 0x10002f134\nsubss   xmm1, [rbp+var_10]                                             ; +0x69, 0x10002f139\ndivss   xmm1, xmm0                                                     ; +0x6e, 0x10002f13e\nxorps   xmm0, xmm0                                                     ; +0x72, 0x10002f142\nmaxss   xmm1, xmm0                                                     ; +0x75, 0x10002f145\nminss   xmm1, cs:alpha                                                 ; +0x79, 0x10002f149\nmovaps  xmm0, xmm1                                                     ; +0x81, 0x10002f151\nadd     rsp, 18h                                                       ; +0x84, 0x10002f154\npop     rbx                                                            ; +0x88, 0x10002f158\npop     rbp                                                            ; +0x89, 0x10002f159\nretn                                                                   ; +0x8a, 0x10002f15a", "xrefs": [], "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"}