{"type": "func", "start": 4304275168, "end": 4304275334, "name": "EditorSFXActionConfigLayer::onPreviewSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onPreviewSound from 0x1008e06e0 to 0x1008e0786 (166 bytes)\n// \n// 1 xrefs:\n// > EditorSFXActionConfigLayer::refreshRows @ 0x1008e0375\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::onPreviewSound(__int64 a1, __int64 a2, double a3, __m128 a4)\n{\n  int v4; // r15d\n  int v5; // ebx\n  __int64 v6; // rax\n  __int64 v7; // r14\n  __int64 v8; // rax\n  signed int v9; // ebx\n  __int64 v10; // rbx\n  __int64 v11; // rax\n\n  v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  v5 = v4 - 993;\n  if ( v4 - 1000 >= 0 )\n    v5 = v4 - 1000;\n  v6 = EditorSFXManager::sharedState(a2);\n  v7 = EditorSFXManager::soundsForAction(v6, *(unsigned int *)(a1 + 1024));\n  LOBYTE(v8) = v7 == 0;\n  if ( v7 != 0 && v4 >= 993 )\n  {\n    v9 = v5 >> 3;\n    LODWORD(v8) = sub_1007FEF90(v7);\n    if ( v9 < (int)v8 )\n    {\n      v8 = sub_1007FEFE0(v7, v9);\n      if ( v8 )\n      {\n        v10 = v8;\n        if ( *(int *)(v8 + 1864) > 0 )\n        {\n          v11 = GameManager::sharedState();\n          LOBYTE(v8) = GameManager::playSFXTrigger(v11, v10, a3, a4);\n        }\n      }\n    }\n  }\n  return v8;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onPreviewSound from 0x1008e06e0 to 0x1008e0786 (166 bytes)\n; \n; 1 xrefs:\n; > EditorSFXActionConfigLayer::refreshRows @ 0x1008e0375\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, 0x1008e06e0\nmov     rbp, rsp                                                       ; +0x1, 0x1008e06e1\npush    r15                                                            ; +0x4, 0x1008e06e4\npush    r14                                                            ; +0x6, 0x1008e06e6\npush    rbx                                                            ; +0x8, 0x1008e06e8\npush    rax                                                            ; +0x9, 0x1008e06e9\nmov     r14, rdi                                                       ; +0xa, 0x1008e06ea\nmov     rax, [rsi]                                                     ; +0xd, 0x1008e06ed\nmov     rdi, rsi                                                       ; +0x10, 0x1008e06f0\ncall    qword ptr [rax+40h]                                            ; +0x13, 0x1008e06f3\nmov     r15d, eax                                                      ; +0x16, 0x1008e06f6\nlea     eax, [r15-3E8h]                                                ; +0x19, 0x1008e06f9\nlea     ebx, [r15-3E1h]                                                ; +0x20, 0x1008e0700\ntest    eax, eax                                                       ; +0x27, 0x1008e0707\ncmovns  ebx, eax                                                       ; +0x29, 0x1008e0709\ncall    EditorSFXManager__sharedState                                  ; +0x2c, 0x1008e070c\nmov     esi, [r14+400h]                                                ; +0x31, 0x1008e0711\nmov     rdi, rax                                                       ; +0x38, 0x1008e0718\ncall    EditorSFXManager__soundsForAction                              ; +0x3b, 0x1008e071b\nmov     r14, rax                                                       ; +0x40, 0x1008e0720\ntest    rax, rax                                                       ; +0x43, 0x1008e0723\nsetz    al                                                             ; +0x46, 0x1008e0726\ncmp     r15d, 3E1h                                                     ; +0x49, 0x1008e0729\nsetl    cl                                                             ; +0x50, 0x1008e0730\nor      cl, al                                                         ; +0x53, 0x1008e0733\njnz     short loc_1008E077B                                            ; +0x55, 0x1008e0735\nsar     ebx, 3                                                         ; +0x57, 0x1008e0737\nmov     rdi, r14                                                       ; +0x5a, 0x1008e073a\ncall    sub_1007FEF90                                                  ; +0x5d, 0x1008e073d\ncmp     ebx, eax                                                       ; +0x62, 0x1008e0742\njge     short loc_1008E077B                                            ; +0x64, 0x1008e0744\nmov     rdi, r14                                                       ; +0x66, 0x1008e0746\nmov     esi, ebx                                                       ; +0x69, 0x1008e0749\ncall    sub_1007FEFE0                                                  ; +0x6b, 0x1008e074b\ntest    rax, rax                                                       ; +0x70, 0x1008e0750\njz      short loc_1008E077B                                            ; +0x73, 0x1008e0753\nmov     rbx, rax                                                       ; +0x75, 0x1008e0755\ncmp     dword ptr [rax+748h], 0                                        ; +0x78, 0x1008e0758\njle     short loc_1008E077B                                            ; +0x7f, 0x1008e075f\ncall    GameManager__sharedState                                       ; +0x81, 0x1008e0761\nmov     rdi, rax                                                       ; +0x86, 0x1008e0766\nmov     rsi, rbx                                                       ; +0x89, 0x1008e0769\nadd     rsp, 8                                                         ; +0x8c, 0x1008e076c\npop     rbx                                                            ; +0x90, 0x1008e0770\npop     r14                                                            ; +0x91, 0x1008e0771\npop     r15                                                            ; +0x93, 0x1008e0773\npop     rbp                                                            ; +0x95, 0x1008e0775\njmp     GameManager__playSFXTrigger                                    ; +0x96, 0x1008e0776\nadd     rsp, 8                                                         ; +0x9b, 0x1008e077b\npop     rbx                                                            ; +0x9f, 0x1008e077f\npop     r14                                                            ; +0xa0, 0x1008e0780\npop     r15                                                            ; +0xa2, 0x1008e0782\npop     rbp                                                            ; +0xa4, 0x1008e0784\nretn                                                                   ; +0xa5, 0x1008e0785", "xrefs": ["EditorSFXActionConfigLayer::refreshRows @ 0x1008e0375"], "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"}