{"type": "func", "start": 4304283200, "end": 4304283541, "name": "EditorSFXManager::hasSoundsForAction", "pseudocode": "// \n// EditorSFXManager::hasSoundsForAction from 0x1008e2640 to 0x1008e2795 (341 bytes)\n// \n// 10 xrefs:\n// > EditorUI::playSoundForCreatedObject @ 0x1000119dd\n// > EditorSFXManager::playAction @ 0x1008e2612\n// > PlayLayer::tryShowDeathMarkers @ 0x10096206a\n// > PlayLayer::tryShowDeathMarkers @ 0x100962080\n// > PlayLayer::tryShowDeathMarkers @ 0x100962131\n// > PlayLayer::tryShowDeathMarkers @ 0x100962147\n// > PlayLayer::tryShowDeathMarkers @ 0x1009623bf\n// > PlayLayer::tryShowDeathMarkers @ 0x10096240b\n// > PlayLayer::tryShowDeathMarkers @ 0x100962427\n// > PlayLayer::tryShowDeathMarkers @ 0x100962461\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:46 +0000\n// \n\nbool __fastcall EditorSFXManager::hasSoundsForAction(_QWORD *a1, int a2)\n{\n  unsigned __int64 v2; // r9\n  unsigned __int64 v3; // r10\n  unsigned __int64 v4; // r8\n  __int64 **v6; // rax\n  __int64 *v7; // rdi\n  unsigned __int64 v8; // r9\n  __int64 v9; // rax\n  unsigned __int64 v10; // rax\n  __int64 *v11; // rax\n\n  v2 = a1[1];\n  if ( !v2 )\n    return 0;\n  v3 = (0x101010101010101LL\n      * ((((v2 - ((v2 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)\n        + (((v2 - ((v2 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)\n        + ((((v2 - ((v2 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)\n          + (((v2 - ((v2 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4))\n       & 0xF0F0F0F0F0F0F0FLL)) >> 56;\n  if ( v3 > 1 )\n  {\n    v4 = a2;\n    if ( v2 <= a2 )\n    {\n      if ( (v2 | a2) >> 32 )\n        v4 = a2 % v2;\n      else\n        v4 = a2 % (unsigned int)v2;\n    }\n  }\n  else\n  {\n    v4 = a2 & (v2 - 1);\n  }\n  v6 = *(__int64 ***)(*a1 + 8 * v4);\n  if ( !v6 )\n    return 0;\n  v7 = *v6;\n  if ( !*v6 )\n    return 0;\n  if ( (unsigned int)v3 < 2 )\n  {\n    v8 = v2 - 1;\n    while ( 1 )\n    {\n      v9 = v7[1];\n      if ( v9 == a2 )\n      {\n        if ( *((_DWORD *)v7 + 4) == a2 )\n          goto LABEL_28;\n      }\n      else if ( (v8 & v9) != v4 )\n      {\n        return 0;\n      }\n      v7 = (__int64 *)*v7;\n      if ( !v7 )\n        return 0;\n    }\n  }\n  while ( 1 )\n  {\n    v10 = v7[1];\n    if ( v10 == a2 )\n      break;\n    if ( v10 < v2 )\n      goto LABEL_24;\n    if ( (v2 | v10) >> 32 )\n    {\n      v10 %= v2;\nLABEL_24:\n      if ( v10 != v4 )\n        return 0;\n      goto LABEL_19;\n    }\n    if ( (unsigned int)v10 % (unsigned int)v2 != v4 )\n      return 0;\nLABEL_19:\n    v7 = (__int64 *)*v7;\n    if ( !v7 )\n      return 0;\n  }\n  if ( *((_DWORD *)v7 + 4) != a2 )\n    goto LABEL_19;\nLABEL_28:\n  v11 = (__int64 *)v7[3];\n  if ( v11 && *v11 )\n    return (unsigned int)sub_1007FEF90(*v11) != 0;\n  return 0;\n}", "assembly": "; \n; EditorSFXManager::hasSoundsForAction from 0x1008e2640 to 0x1008e2795 (341 bytes)\n; \n; 10 xrefs:\n; > EditorUI::playSoundForCreatedObject @ 0x1000119dd\n; > EditorSFXManager::playAction @ 0x1008e2612\n; > PlayLayer::tryShowDeathMarkers @ 0x10096206a\n; > PlayLayer::tryShowDeathMarkers @ 0x100962080\n; > PlayLayer::tryShowDeathMarkers @ 0x100962131\n; > PlayLayer::tryShowDeathMarkers @ 0x100962147\n; > PlayLayer::tryShowDeathMarkers @ 0x1009623bf\n; > PlayLayer::tryShowDeathMarkers @ 0x10096240b\n; > PlayLayer::tryShowDeathMarkers @ 0x100962427\n; > PlayLayer::tryShowDeathMarkers @ 0x100962461\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:46 +0000\n; \nmov     r9, [rdi+8]                                                    ; +0x0, 0x1008e2640\ntest    r9, r9                                                         ; +0x4, 0x1008e2644\njz      short loc_1008E26B7                                            ; +0x7, 0x1008e2647\nmovsxd  rcx, esi                                                       ; +0x9, 0x1008e2649\nmov     rax, r9                                                        ; +0xc, 0x1008e264c\nshr     rax, 1                                                         ; +0xf, 0x1008e264f\nmov     rdx, 5555555555555555h                                         ; +0x12, 0x1008e2652\nand     rdx, rax                                                       ; +0x1c, 0x1008e265c\nmov     rax, r9                                                        ; +0x1f, 0x1008e265f\nsub     rax, rdx                                                       ; +0x22, 0x1008e2662\nmov     rdx, 3333333333333333h                                         ; +0x25, 0x1008e2665\nmov     r8, rax                                                        ; +0x2f, 0x1008e266f\nand     r8, rdx                                                        ; +0x32, 0x1008e2672\nshr     rax, 2                                                         ; +0x35, 0x1008e2675\nand     rax, rdx                                                       ; +0x39, 0x1008e2679\nadd     rax, r8                                                        ; +0x3c, 0x1008e267c\nmov     rdx, rax                                                       ; +0x3f, 0x1008e267f\nshr     rdx, 4                                                         ; +0x42, 0x1008e2682\nadd     rdx, rax                                                       ; +0x46, 0x1008e2686\nmov     rax, 0F0F0F0F0F0F0F0Fh                                         ; +0x49, 0x1008e2689\nand     rax, rdx                                                       ; +0x53, 0x1008e2693\nmov     r10, 101010101010101h                                          ; +0x56, 0x1008e2696\nimul    r10, rax                                                       ; +0x60, 0x1008e26a0\nshr     r10, 38h                                                       ; +0x64, 0x1008e26a4\ncmp     r10, 1                                                         ; +0x68, 0x1008e26a8\nja      short loc_1008E26BA                                            ; +0x6c, 0x1008e26ac\nlea     r8, [r9-1]                                                     ; +0x6e, 0x1008e26ae\nand     r8, rcx                                                        ; +0x72, 0x1008e26b2\njmp     short loc_1008E26E5                                            ; +0x75, 0x1008e26b5\nxor     eax, eax                                                       ; +0x77, 0x1008e26b7\nretn                                                                   ; +0x79, 0x1008e26b9\nmov     r8, rcx                                                        ; +0x7a, 0x1008e26ba\ncmp     r9, rcx                                                        ; +0x7d, 0x1008e26bd\nja      short loc_1008E26E5                                            ; +0x80, 0x1008e26c0\nmov     rax, rcx                                                       ; +0x82, 0x1008e26c2\nor      rax, r9                                                        ; +0x85, 0x1008e26c5\nshr     rax, 20h                                                       ; +0x88, 0x1008e26c8\njz      short loc_1008E26DB                                            ; +0x8c, 0x1008e26cc\nmov     rax, rcx                                                       ; +0x8e, 0x1008e26ce\nxor     edx, edx                                                       ; +0x91, 0x1008e26d1\ndiv     r9                                                             ; +0x93, 0x1008e26d3\nmov     r8, rdx                                                        ; +0x96, 0x1008e26d6\njmp     short loc_1008E26E5                                            ; +0x99, 0x1008e26d9\nmov     eax, esi                                                       ; +0x9b, 0x1008e26db\nxor     edx, edx                                                       ; +0x9d, 0x1008e26dd\ndiv     r9d                                                            ; +0x9f, 0x1008e26df\nmov     r8d, edx                                                       ; +0xa2, 0x1008e26e2\npush    rbp                                                            ; +0xa5, 0x1008e26e5\nmov     rbp, rsp                                                       ; +0xa6, 0x1008e26e6\nmov     rax, [rdi]                                                     ; +0xa9, 0x1008e26e9\nmov     rax, [rax+r8*8]                                                ; +0xac, 0x1008e26ec\ntest    rax, rax                                                       ; +0xb0, 0x1008e26f0\njz      loc_1008E2791                                                  ; +0xb3, 0x1008e26f3\nmov     rdi, [rax]                                                     ; +0xb9, 0x1008e26f9\ntest    rdi, rdi                                                       ; +0xbc, 0x1008e26fc\njz      loc_1008E2791                                                  ; +0xbf, 0x1008e26ff\ncmp     r10d, 2                                                        ; +0xc5, 0x1008e2705\njnb     short loc_1008E273D                                            ; +0xc9, 0x1008e2709\ndec     r9                                                             ; +0xcb, 0x1008e270b\njmp     short loc_1008E271D                                            ; +0xce, 0x1008e270e\ncmp     [rdi+10h], esi                                                 ; +0xd0, 0x1008e2710\njz      short loc_1008E2774                                            ; +0xd3, 0x1008e2713\nmov     rdi, [rdi]                                                     ; +0xd5, 0x1008e2715\ntest    rdi, rdi                                                       ; +0xd8, 0x1008e2718\njz      short loc_1008E2791                                            ; +0xdb, 0x1008e271b\nmov     rax, [rdi+8]                                                   ; +0xdd, 0x1008e271d\ncmp     rax, rcx                                                       ; +0xe1, 0x1008e2721\njz      short loc_1008E2710                                            ; +0xe4, 0x1008e2724\nand     rax, r9                                                        ; +0xe6, 0x1008e2726\ncmp     rax, r8                                                        ; +0xe9, 0x1008e2729\njz      short loc_1008E2715                                            ; +0xec, 0x1008e272c\njmp     short loc_1008E2791                                            ; +0xee, 0x1008e272e\ncmp     [rdi+10h], esi                                                 ; +0xf0, 0x1008e2730\njz      short loc_1008E2774                                            ; +0xf3, 0x1008e2733\nmov     rdi, [rdi]                                                     ; +0xf5, 0x1008e2735\ntest    rdi, rdi                                                       ; +0xf8, 0x1008e2738\njz      short loc_1008E2791                                            ; +0xfb, 0x1008e273b\nmov     rax, [rdi+8]                                                   ; +0xfd, 0x1008e273d\ncmp     rax, rcx                                                       ; +0x101, 0x1008e2741\njz      short loc_1008E2730                                            ; +0x104, 0x1008e2744\ncmp     rax, r9                                                        ; +0x106, 0x1008e2746\njb      short loc_1008E275F                                            ; +0x109, 0x1008e2749\nmov     rdx, rax                                                       ; +0x10b, 0x1008e274b\nor      rdx, r9                                                        ; +0x10e, 0x1008e274e\nshr     rdx, 20h                                                       ; +0x111, 0x1008e2751\njz      short loc_1008E2766                                            ; +0x115, 0x1008e2755\nxor     edx, edx                                                       ; +0x117, 0x1008e2757\ndiv     r9                                                             ; +0x119, 0x1008e2759\nmov     rax, rdx                                                       ; +0x11c, 0x1008e275c\ncmp     rax, r8                                                        ; +0x11f, 0x1008e275f\njz      short loc_1008E2735                                            ; +0x122, 0x1008e2762\njmp     short loc_1008E2791                                            ; +0x124, 0x1008e2764\nxor     edx, edx                                                       ; +0x126, 0x1008e2766\ndiv     r9d                                                            ; +0x128, 0x1008e2768\nmov     eax, edx                                                       ; +0x12b, 0x1008e276b\ncmp     rax, r8                                                        ; +0x12d, 0x1008e276d\njz      short loc_1008E2735                                            ; +0x130, 0x1008e2770\njmp     short loc_1008E2791                                            ; +0x132, 0x1008e2772\nmov     rax, [rdi+18h]                                                 ; +0x134, 0x1008e2774\ntest    rax, rax                                                       ; +0x138, 0x1008e2778\njz      short loc_1008E2791                                            ; +0x13b, 0x1008e277b\nmov     rdi, [rax]                                                     ; +0x13d, 0x1008e277d\ntest    rdi, rdi                                                       ; +0x140, 0x1008e2780\njz      short loc_1008E2791                                            ; +0x143, 0x1008e2783\ncall    sub_1007FEF90                                                  ; +0x145, 0x1008e2785\ntest    eax, eax                                                       ; +0x14a, 0x1008e278a\nsetnz   al                                                             ; +0x14c, 0x1008e278c\npop     rbp                                                            ; +0x14f, 0x1008e278f\nretn                                                                   ; +0x150, 0x1008e2790\nxor     eax, eax                                                       ; +0x151, 0x1008e2791\npop     rbp                                                            ; +0x153, 0x1008e2793\nretn                                                                   ; +0x154, 0x1008e2794", "xrefs": ["EditorUI::playSoundForCreatedObject @ 0x1000119dd", "EditorSFXManager::playAction @ 0x1008e2612", "PlayLayer::tryShowDeathMarkers @ 0x10096206a", "PlayLayer::tryShowDeathMarkers @ 0x100962080", "PlayLayer::tryShowDeathMarkers @ 0x100962131", "PlayLayer::tryShowDeathMarkers @ 0x100962147", "PlayLayer::tryShowDeathMarkers @ 0x1009623bf", "PlayLayer::tryShowDeathMarkers @ 0x10096240b", "PlayLayer::tryShowDeathMarkers @ 0x100962427", "PlayLayer::tryShowDeathMarkers @ 0x100962461"], "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"}