{"type": "func", "start": 4304274992, "end": 4304275162, "name": "EditorSFXActionConfigLayer::onEditSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onEditSound from 0x1008e0630 to 0x1008e06da (170 bytes)\n// \n// 1 xrefs:\n// > EditorSFXActionConfigLayer::refreshRows @ 0x1008e02cd\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:37:45 +0000\n// \n\nchar __fastcall EditorSFXActionConfigLayer::onEditSound(__int64 a1, __int64 a2)\n{\n  int v2; // r15d\n  int v3; // ebx\n  __int64 v4; // rax\n  __int64 v5; // r14\n  __int64 v6; // rax\n  signed int v7; // ebx\n\n  v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  v3 = v2 - 993;\n  if ( v2 - 1000 >= 0 )\n    v3 = v2 - 1000;\n  v4 = EditorSFXManager::sharedState(a2);\n  v5 = EditorSFXManager::soundsForAction(v4, *(unsigned int *)(a1 + 1024));\n  LOBYTE(v6) = v5 == 0;\n  if ( v5 != 0 && v2 >= 993 )\n  {\n    v7 = v3 >> 3;\n    LODWORD(v6) = sub_1007FEF90(v5);\n    if ( v7 < (int)v6 )\n    {\n      v6 = sub_1007FEFE0(v5, v7);\n      if ( v6 )\n      {\n        v6 = (__int64)SetupSFXPopup::create(v6, 0, 1u);\n        if ( v6 )\n          LOBYTE(v6) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);\n      }\n    }\n  }\n  return v6;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onEditSound from 0x1008e0630 to 0x1008e06da (170 bytes)\n; \n; 1 xrefs:\n; > EditorSFXActionConfigLayer::refreshRows @ 0x1008e02cd\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:37:45 +0000\n; \npush    rbp                                                            ; +0x0, 0x1008e0630\nmov     rbp, rsp                                                       ; +0x1, 0x1008e0631\npush    r15                                                            ; +0x4, 0x1008e0634\npush    r14                                                            ; +0x6, 0x1008e0636\npush    rbx                                                            ; +0x8, 0x1008e0638\npush    rax                                                            ; +0x9, 0x1008e0639\nmov     r14, rdi                                                       ; +0xa, 0x1008e063a\nmov     rax, [rsi]                                                     ; +0xd, 0x1008e063d\nmov     rdi, rsi                                                       ; +0x10, 0x1008e0640\ncall    qword ptr [rax+40h]                                            ; +0x13, 0x1008e0643\nmov     r15d, eax                                                      ; +0x16, 0x1008e0646\nlea     eax, [r15-3E8h]                                                ; +0x19, 0x1008e0649\nlea     ebx, [r15-3E1h]                                                ; +0x20, 0x1008e0650\ntest    eax, eax                                                       ; +0x27, 0x1008e0657\ncmovns  ebx, eax                                                       ; +0x29, 0x1008e0659\ncall    EditorSFXManager__sharedState                                  ; +0x2c, 0x1008e065c\nmov     esi, [r14+400h]                                                ; +0x31, 0x1008e0661\nmov     rdi, rax                                                       ; +0x38, 0x1008e0668\ncall    EditorSFXManager__soundsForAction                              ; +0x3b, 0x1008e066b\nmov     r14, rax                                                       ; +0x40, 0x1008e0670\ntest    rax, rax                                                       ; +0x43, 0x1008e0673\nsetz    al                                                             ; +0x46, 0x1008e0676\ncmp     r15d, 3E1h                                                     ; +0x49, 0x1008e0679\nsetl    cl                                                             ; +0x50, 0x1008e0680\nor      cl, al                                                         ; +0x53, 0x1008e0683\njnz     short loc_1008E06CF                                            ; +0x55, 0x1008e0685\nsar     ebx, 3                                                         ; +0x57, 0x1008e0687\nmov     rdi, r14                                                       ; +0x5a, 0x1008e068a\ncall    sub_1007FEF90                                                  ; +0x5d, 0x1008e068d\ncmp     ebx, eax                                                       ; +0x62, 0x1008e0692\njge     short loc_1008E06CF                                            ; +0x64, 0x1008e0694\nmov     rdi, r14                                                       ; +0x66, 0x1008e0696\nmov     esi, ebx                                                       ; +0x69, 0x1008e0699\ncall    sub_1007FEFE0                                                  ; +0x6b, 0x1008e069b\ntest    rax, rax                                                       ; +0x70, 0x1008e06a0\njz      short loc_1008E06CF                                            ; +0x73, 0x1008e06a3\nmov     rdi, rax                                                       ; +0x75, 0x1008e06a5\nxor     esi, esi                                                       ; +0x78, 0x1008e06a8\nmov     edx, 1                                                         ; +0x7a, 0x1008e06aa\ncall    SetupSFXPopup__create                                          ; +0x7f, 0x1008e06af\ntest    rax, rax                                                       ; +0x84, 0x1008e06b4\njz      short loc_1008E06CF                                            ; +0x87, 0x1008e06b7\nmov     rcx, [rax]                                                     ; +0x89, 0x1008e06b9\nmov     rdi, rax                                                       ; +0x8c, 0x1008e06bc\nadd     rsp, 8                                                         ; +0x8f, 0x1008e06bf\npop     rbx                                                            ; +0x93, 0x1008e06c3\npop     r14                                                            ; +0x94, 0x1008e06c4\npop     r15                                                            ; +0x96, 0x1008e06c6\npop     rbp                                                            ; +0x98, 0x1008e06c8\njmp     qword ptr [rcx+520h]                                           ; +0x99, 0x1008e06c9\nadd     rsp, 8                                                         ; +0x9f, 0x1008e06cf\npop     rbx                                                            ; +0xa3, 0x1008e06d3\npop     r14                                                            ; +0xa4, 0x1008e06d4\npop     r15                                                            ; +0xa6, 0x1008e06d6\npop     rbp                                                            ; +0xa8, 0x1008e06d8\nretn                                                                   ; +0xa9, 0x1008e06d9", "xrefs": ["EditorSFXActionConfigLayer::refreshRows @ 0x1008e02cd"], "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"}