{"type": "func", "start": 4299976312, "end": 4299976480, "name": "EditorSFXActionConfigLayer::onEditSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onEditSound from 0x1004c6e78 to 0x1004c6f20 (168 bytes)\n// \n// 1 xrefs:\n// > EditorSFXActionConfigLayer::refreshRows @ 0x1004c6b84\n// \n// This function is hookable on this platform (idp: arm, 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:06:23 +0000\n// \n\n__int64 __fastcall EditorSFXActionConfigLayer::onEditSound(__int64 a1, __int64 a2)\n{\n  int v3; // w20\n  __n128 v4; // q0\n  int v5; // w21\n  __int64 v6; // x0\n  __int64 result; // x0\n  __int64 v8; // x19\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( v3 >= 1000 )\n    v5 = v3 - 1000;\n  else\n    v5 = v3 - 993;\n  v6 = EditorSFXManager::sharedState(v4);\n  result = EditorSFXManager::soundsForAction(v6, *(unsigned int *)(a1 + 1024));\n  if ( result )\n  {\n    if ( v3 >= 993 )\n    {\n      v8 = result;\n      result = sub_1002E757C(result);\n      if ( v5 >> 3 < (int)result )\n      {\n        result = sub_1002E75A0(v8, v5 >> 3);\n        if ( result )\n        {\n          result = (__int64)SetupSFXPopup::create(result, 0, 1);\n          if ( result )\n            return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)result + 1312LL))(result);\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onEditSound from 0x1004c6e78 to 0x1004c6f20 (168 bytes)\n; \n; 1 xrefs:\n; > EditorSFXActionConfigLayer::refreshRows @ 0x1004c6b84\n; \n; This function is hookable on this platform (idp: arm, 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:06:23 +0000\n; \nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1004c6e78\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1004c6e7c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1004c6e80\nADD             X29, SP, #0x20                                         ; +0xc, 0x1004c6e84\nMOV             X19, X0                                                ; +0x10, 0x1004c6e88\nLDR             X8, [X1]                                               ; +0x14, 0x1004c6e8c\nLDR             X8, [X8,#0x40]                                         ; +0x18, 0x1004c6e90\nMOV             X0, X1                                                 ; +0x1c, 0x1004c6e94\nBLR             X8                                                     ; +0x20, 0x1004c6e98\nMOV             X20, X0                                                ; +0x24, 0x1004c6e9c\nSUBS            W8, W0, #0x3E8                                         ; +0x28, 0x1004c6ea0\nSUB             W9, W0, #0x3E1                                         ; +0x2c, 0x1004c6ea4\nCSEL            W21, W9, W8, LT                                        ; +0x30, 0x1004c6ea8\nBL              EditorSFXManager__sharedState                          ; +0x34, 0x1004c6eac\nLDR             W1, [X19,#0x400]                                       ; +0x38, 0x1004c6eb0\nBL              EditorSFXManager__soundsForAction                      ; +0x3c, 0x1004c6eb4\nCBZ             X0, loc_1004C6F10                                      ; +0x40, 0x1004c6eb8\nCMP             W20, #0x3E1                                            ; +0x44, 0x1004c6ebc\nB.LT            loc_1004C6F10                                          ; +0x48, 0x1004c6ec0\nMOV             X19, X0                                                ; +0x4c, 0x1004c6ec4\nASR             W20, W21, #3                                           ; +0x50, 0x1004c6ec8\nBL              sub_1002E757C                                          ; +0x54, 0x1004c6ecc\nCMP             W20, W0                                                ; +0x58, 0x1004c6ed0\nB.GE            loc_1004C6F10                                          ; +0x5c, 0x1004c6ed4\nMOV             X0, X19                                                ; +0x60, 0x1004c6ed8\nMOV             X1, X20                                                ; +0x64, 0x1004c6edc\nBL              sub_1002E75A0                                          ; +0x68, 0x1004c6ee0\nCBZ             X0, loc_1004C6F10                                      ; +0x6c, 0x1004c6ee4\nMOV             X1, #0                                                 ; +0x70, 0x1004c6ee8\nMOV             W2, #1                                                 ; +0x74, 0x1004c6eec\nBL              SetupSFXPopup__create                                  ; +0x78, 0x1004c6ef0\nCBZ             X0, loc_1004C6F10                                      ; +0x7c, 0x1004c6ef4\nLDR             X8, [X0]                                               ; +0x80, 0x1004c6ef8\nLDR             X1, [X8,#0x520]                                        ; +0x84, 0x1004c6efc\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x88, 0x1004c6f00\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x8c, 0x1004c6f04\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x90, 0x1004c6f08\nBR              X1                                                     ; +0x94, 0x1004c6f0c\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x98, 0x1004c6f10\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x9c, 0x1004c6f14\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xa0, 0x1004c6f18\nRET                                                                    ; +0xa4, 0x1004c6f1c", "xrefs": ["EditorSFXActionConfigLayer::refreshRows @ 0x1004c6b84"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}