{"type": "func", "start": 5370471888, "end": 5370472175, "name": "EditorUI::cycleCustomGridPreset", "pseudocode": "// \n// EditorUI::cycleCustomGridPreset from 0x1401ae5d0 to 0x1401ae6ef (287 bytes)\n// \n// 5 xrefs:\n// > EditorUI::handleEditorAction @ 0x1401c29a6\n// > EditorUI::handleEditorAction @ 0x1401c29bd\n// > GridSettingsLayer::onCycleUp @ 0x1402c95a7\n// > GridSettingsLayer::onCycleDown @ 0x1402c9617\n// > <???> @ 0x140919e08\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:27:54 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall EditorUI::cycleCustomGridPreset(__int64 a1, char a2, __int64 a3)\n{\n  __int64 v4; // rcx\n  float v6; // xmm0_4\n  float *v7; // rax\n  float v8; // xmm0_4\n  float v9; // xmm1_4\n  float v10; // xmm0_4\n  float *v11; // rcx\n  void *v12; // [rsp+30h] [rbp+8h]\n\n  if ( *(_BYTE *)(a1 + 704) )\n  {\n    v6 = *(float *)(a1 + 700);\n    v7 = flt_1407517A8;\n    if ( a2 )\n    {\n      v8 = v6 + 0.001;\n      while ( 1 )\n      {\n        v9 = *v7;\n        if ( *v7 > v8 )\n          break;\n        if ( (__int64)++v7 >= (__int64)&flt_1407517BC )\n          return EditorUI::setCustomGridNodeSize(a1, 120.0);\n      }\n    }\n    else\n    {\n      v10 = v6 - 0.001;\n      v11 = (float *)&unk_1407517B8;\n      while ( 1 )\n      {\n        v9 = *v11;\n        if ( v10 > *v11 )\n          break;\n        if ( (__int64)--v11 < (__int64)flt_1407517A8 )\n          return EditorUI::setCustomGridNodeSize(a1, 7.5);\n      }\n    }\n    return EditorUI::setCustomGridNodeSize(a1, v9);\n  }\n  else\n  {\n    *(_BYTE *)(a1 + 704) = 1;\n    v4 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v12 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v4 = qword_14090BFD0;\n    }\n    LOBYTE(a3) = 1;\n    GameManager::setGameVariable(v4, \"0194\", a3);\n    return EditorUI::setCustomGridNodeSize(a1, 30.0);\n  }\n}", "assembly": "; \n; EditorUI::cycleCustomGridPreset from 0x1401ae5d0 to 0x1401ae6ef (287 bytes)\n; \n; 5 xrefs:\n; > EditorUI::handleEditorAction @ 0x1401c29a6\n; > EditorUI::handleEditorAction @ 0x1401c29bd\n; > GridSettingsLayer::onCycleUp @ 0x1402c95a7\n; > GridSettingsLayer::onCycleDown @ 0x1402c9617\n; > <???> @ 0x140919e08\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:27:54 +0000\n; \npush    rbx                                                            ; +0x0, 0x1401ae5d0\nsub     rsp, 20h                                                       ; +0x2, 0x1401ae5d2\nmov     rbx, rcx                                                       ; +0x6, 0x1401ae5d6\ncmp     byte ptr [rcx+2C0h], 0                                         ; +0x9, 0x1401ae5d9\njnz     short loc_1401AE64E                                            ; +0x10, 0x1401ae5e0\nmov     byte ptr [rcx+2C0h], 1                                         ; +0x12, 0x1401ae5e2\nmov     rcx, cs:qword_14090BFD0                                        ; +0x19, 0x1401ae5e9\ntest    rcx, rcx                                                       ; +0x20, 0x1401ae5f0\njnz     short loc_1401AE627                                            ; +0x23, 0x1401ae5f3\nmov     ecx, 6E8h; Size                                                ; +0x25, 0x1401ae5f5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2a, 0x1401ae5fa\nmov     [rsp+28h+arg_0], rax                                           ; +0x2f, 0x1401ae5ff\nmov     rcx, rax                                                       ; +0x34, 0x1401ae604\ncall    GameManager__GameManager                                       ; +0x37, 0x1401ae607\nnop                                                                    ; +0x3c, 0x1401ae60c\nmov     cs:qword_14090BFD0, rax                                        ; +0x3d, 0x1401ae60d\nmov     rcx, [rax]                                                     ; +0x44, 0x1401ae614\nmov     rdx, [rcx+48h]                                                 ; +0x47, 0x1401ae617\nmov     rcx, rax                                                       ; +0x4b, 0x1401ae61b\ncall    rdx                                                            ; +0x4e, 0x1401ae61e\nmov     rcx, cs:qword_14090BFD0                                        ; +0x50, 0x1401ae620\nmov     r8b, 1                                                         ; +0x57, 0x1401ae627\nlea     rdx, a0194; \"0194\"                                             ; +0x5a, 0x1401ae62a\ncall    GameManager__setGameVariable                                   ; +0x61, 0x1401ae631\nmovss   xmm2, cs:dword_140835624                                       ; +0x66, 0x1401ae636\nmovaps  xmm1, xmm2                                                     ; +0x6e, 0x1401ae63e\nmov     rcx, rbx                                                       ; +0x71, 0x1401ae641\nadd     rsp, 20h                                                       ; +0x74, 0x1401ae644\npop     rbx                                                            ; +0x78, 0x1401ae648\njmp     EditorUI__setCustomGridNodeSize                                ; +0x79, 0x1401ae649\nmovss   xmm0, dword ptr [rcx+2BCh]                                     ; +0x7e, 0x1401ae64e\nlea     rax, flt_1407517A8                                             ; +0x86, 0x1401ae656\ntest    dl, dl                                                         ; +0x8d, 0x1401ae65d\njz      short loc_1401AE6A2                                            ; +0x8f, 0x1401ae65f\nmovss   xmm2, cs:dword_1408357F4                                       ; +0x91, 0x1401ae661\naddss   xmm0, cs:dword_140834D8C                                       ; +0x99, 0x1401ae669\nlea     rcx, flt_1407517BC                                             ; +0xa1, 0x1401ae671\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xa8, 0x1401ae678\nmovss   xmm1, dword ptr [rax]                                          ; +0xb0, 0x1401ae680\ncomiss  xmm1, xmm0                                                     ; +0xb4, 0x1401ae684\nja      short loc_1401AE6E2                                            ; +0xb7, 0x1401ae687\nadd     rax, 4                                                         ; +0xb9, 0x1401ae689\ncmp     rax, rcx                                                       ; +0xbd, 0x1401ae68d\njl      short loc_1401AE680                                            ; +0xc0, 0x1401ae690\nmovaps  xmm1, xmm2                                                     ; +0xc2, 0x1401ae692\nmov     rcx, rbx                                                       ; +0xc5, 0x1401ae695\nadd     rsp, 20h                                                       ; +0xc8, 0x1401ae698\npop     rbx                                                            ; +0xcc, 0x1401ae69c\njmp     EditorUI__setCustomGridNodeSize                                ; +0xcd, 0x1401ae69d\nmovss   xmm2, cs:dword_1408354B4                                       ; +0xd2, 0x1401ae6a2\nsubss   xmm0, cs:dword_140834D8C                                       ; +0xda, 0x1401ae6aa\nlea     rcx, unk_1407517B8                                             ; +0xe2, 0x1401ae6b2\nnop     dword ptr [rax+00000000h]                                      ; +0xe9, 0x1401ae6b9\nmovss   xmm1, dword ptr [rcx]                                          ; +0xf0, 0x1401ae6c0\ncomiss  xmm0, xmm1                                                     ; +0xf4, 0x1401ae6c4\nja      short loc_1401AE6E2                                            ; +0xf7, 0x1401ae6c7\nsub     rcx, 4                                                         ; +0xf9, 0x1401ae6c9\ncmp     rcx, rax                                                       ; +0xfd, 0x1401ae6cd\njge     short loc_1401AE6C0                                            ; +0x100, 0x1401ae6d0\nmovaps  xmm1, xmm2                                                     ; +0x102, 0x1401ae6d2\nmov     rcx, rbx                                                       ; +0x105, 0x1401ae6d5\nadd     rsp, 20h                                                       ; +0x108, 0x1401ae6d8\npop     rbx                                                            ; +0x10c, 0x1401ae6dc\njmp     EditorUI__setCustomGridNodeSize                                ; +0x10d, 0x1401ae6dd\nmov     rcx, rbx                                                       ; +0x112, 0x1401ae6e2\nadd     rsp, 20h                                                       ; +0x115, 0x1401ae6e5\npop     rbx                                                            ; +0x119, 0x1401ae6e9\njmp     EditorUI__setCustomGridNodeSize                                ; +0x11a, 0x1401ae6ea", "xrefs": ["EditorUI::handleEditorAction @ 0x1401c29a6", "EditorUI::handleEditorAction @ 0x1401c29bd", "GridSettingsLayer::onCycleUp @ 0x1402c95a7", "GridSettingsLayer::onCycleDown @ 0x1402c9617", "<???> @ 0x140919e08"], "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"}