{"type": "func", "start": 5372959216, "end": 5372959383, "name": "SetupAreaMoveTriggerPopup::onNextFreeEffectID", "pseudocode": "// \n// SetupAreaMoveTriggerPopup::onNextFreeEffectID from 0x14040d9f0 to 0x14040da97 (167 bytes)\n// \n// 4 xrefs:\n// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040c6d1\n// > SetupEnterEffectPopup::init @ 0x14041fe1e\n// > <???> @ 0x1406d8b88\n// > <???> @ 0x1406d8b94\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\n// Merged with: SetupAreaMoveTriggerPopup::onNextFreeEffectID, SetupEnterEffectPopup::onNextFreeEnterEffectID\nvoid __fastcall SetupAreaMoveTriggerPopup::onNextFreeEffectID(SetupTriggerPopup *a1, __int64 a2, __int64 a3)\n{\n  __int64 v4; // rcx\n  int NextFreeAreaEffectID; // ebx\n  std::unordered_set<int> v6; // [rsp+20h] [rbp-48h] BYREF\n  void *v7; // [rsp+80h] [rbp+18h] BYREF\n\n  LODWORD(v7) = 0;\n  sub_14005E660((__int64)&v6, &v7, a3);\n  v4 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v7 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v4 = qword_1406C2ED8;\n  }\n  NextFreeAreaEffectID = LevelEditorLayer::getNextFreeAreaEffectID(*(LevelEditorLayer **)(v4 + 528), &v6);\n  sub_14005D100((__int64)&v6._Vec);\n  sub_14005D870((void **)&v6._List._Mypair._Myval2._Myhead);\n  SetupTriggerPopup::updateValue(a1, 225, (float)NextFreeAreaEffectID);\n}", "assembly": "; \n; SetupAreaMoveTriggerPopup::onNextFreeEffectID from 0x14040d9f0 to 0x14040da97 (167 bytes)\n; \n; 4 xrefs:\n; > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040c6d1\n; > SetupEnterEffectPopup::init @ 0x14041fe1e\n; > <???> @ 0x1406d8b88\n; > <???> @ 0x1406d8b94\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\nmov     rax, rsp                                                       ; +0x0, 0x14040d9f0\nmov     [rax+8], rbx                                                   ; +0x3, 0x14040d9f3\npush    rdi                                                            ; +0x7, 0x14040d9f7\nsub     rsp, 60h                                                       ; +0x8, 0x14040d9f8\nmov     rdi, rcx                                                       ; +0xc, 0x14040d9fc\nmov     dword ptr [rax+18h], 0                                         ; +0xf, 0x14040d9ff\nlea     rdx, [rax+18h]                                                 ; +0x16, 0x14040da06\nlea     rcx, [rax-48h]                                                 ; +0x1a, 0x14040da0a\ncall    sub_14005E660                                                  ; +0x1e, 0x14040da0e\nnop                                                                    ; +0x23, 0x14040da13\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x24, 0x14040da14\ntest    rcx, rcx                                                       ; +0x2b, 0x14040da1b\njnz     short loc_14040DA52                                            ; +0x2e, 0x14040da1e\nmov     ecx, 668h; Size                                                ; +0x30, 0x14040da20\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x35, 0x14040da25\nmov     [rsp+68h+arg_10], rax                                          ; +0x3a, 0x14040da2a\nmov     rcx, rax                                                       ; +0x42, 0x14040da32\ncall    sub_14017AB00                                                  ; +0x45, 0x14040da35\nnop                                                                    ; +0x4a, 0x14040da3a\nmov     cs:qword_1406C2ED8, rax                                        ; +0x4b, 0x14040da3b\nmov     rdx, [rax]                                                     ; +0x52, 0x14040da42\nmov     rcx, rax                                                       ; +0x55, 0x14040da45\ncall    qword ptr [rdx+48h]                                            ; +0x58, 0x14040da48\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x5b, 0x14040da4b\nlea     rdx, [rsp+68h+var_48]                                          ; +0x62, 0x14040da52\nmov     rcx, [rcx+210h]                                                ; +0x67, 0x14040da57\ncall    LevelEditorLayer__getNextFreeAreaEffectID                      ; +0x6e, 0x14040da5e\nmov     ebx, eax                                                       ; +0x73, 0x14040da63\nlea     rcx, [rsp+68h+var_30]                                          ; +0x75, 0x14040da65\ncall    sub_14005D100                                                  ; +0x7a, 0x14040da6a\nlea     rcx, [rsp+68h+var_40]                                          ; +0x7f, 0x14040da6f\ncall    sub_14005D870                                                  ; +0x84, 0x14040da74\nmovd    xmm2, ebx                                                      ; +0x89, 0x14040da79\ncvtdq2ps xmm2, xmm2                                                    ; +0x8d, 0x14040da7d\nmov     edx, 0E1h                                                      ; +0x90, 0x14040da80\nmov     rcx, rdi                                                       ; +0x95, 0x14040da85\nmov     rbx, [rsp+68h+arg_0]                                           ; +0x98, 0x14040da88\nadd     rsp, 60h                                                       ; +0x9d, 0x14040da8d\npop     rdi                                                            ; +0xa1, 0x14040da91\njmp     SetupTriggerPopup__updateValue                                 ; +0xa2, 0x14040da92", "xrefs": ["SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040c6d1", "SetupEnterEffectPopup::init @ 0x14041fe1e", "<???> @ 0x1406d8b88", "<???> @ 0x1406d8b94"], "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"}