{"type": "func", "start": 4299976480, "end": 4299976648, "name": "EditorSFXActionConfigLayer::onPreviewSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onPreviewSound from 0x1004c6f20 to 0x1004c6fc8 (168 bytes)\n// \n// 1 xrefs:\n// > EditorSFXActionConfigLayer::refreshRows @ 0x1004c6c20\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::onPreviewSound(__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  __int64 v9; // x19\n  __int64 v10; // x0\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          v9 = result;\n          if ( *(int *)(result + 1864) >= 1 )\n          {\n            v10 = GameManager::sharedState();\n            return sub_1003AF1A8(v10, v9);\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onPreviewSound from 0x1004c6f20 to 0x1004c6fc8 (168 bytes)\n; \n; 1 xrefs:\n; > EditorSFXActionConfigLayer::refreshRows @ 0x1004c6c20\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, 0x1004c6f20\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1004c6f24\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1004c6f28\nADD             X29, SP, #0x20                                         ; +0xc, 0x1004c6f2c\nMOV             X19, X0                                                ; +0x10, 0x1004c6f30\nLDR             X8, [X1]                                               ; +0x14, 0x1004c6f34\nLDR             X8, [X8,#0x40]                                         ; +0x18, 0x1004c6f38\nMOV             X0, X1                                                 ; +0x1c, 0x1004c6f3c\nBLR             X8                                                     ; +0x20, 0x1004c6f40\nMOV             X20, X0                                                ; +0x24, 0x1004c6f44\nSUBS            W8, W0, #0x3E8                                         ; +0x28, 0x1004c6f48\nSUB             W9, W0, #0x3E1                                         ; +0x2c, 0x1004c6f4c\nCSEL            W21, W9, W8, LT                                        ; +0x30, 0x1004c6f50\nBL              EditorSFXManager__sharedState                          ; +0x34, 0x1004c6f54\nLDR             W1, [X19,#0x400]                                       ; +0x38, 0x1004c6f58\nBL              EditorSFXManager__soundsForAction                      ; +0x3c, 0x1004c6f5c\nCBZ             X0, loc_1004C6FB8                                      ; +0x40, 0x1004c6f60\nCMP             W20, #0x3E1                                            ; +0x44, 0x1004c6f64\nB.LT            loc_1004C6FB8                                          ; +0x48, 0x1004c6f68\nMOV             X19, X0                                                ; +0x4c, 0x1004c6f6c\nASR             W20, W21, #3                                           ; +0x50, 0x1004c6f70\nBL              sub_1002E757C                                          ; +0x54, 0x1004c6f74\nCMP             W20, W0                                                ; +0x58, 0x1004c6f78\nB.GE            loc_1004C6FB8                                          ; +0x5c, 0x1004c6f7c\nMOV             X0, X19                                                ; +0x60, 0x1004c6f80\nMOV             X1, X20                                                ; +0x64, 0x1004c6f84\nBL              sub_1002E75A0                                          ; +0x68, 0x1004c6f88\nCBZ             X0, loc_1004C6FB8                                      ; +0x6c, 0x1004c6f8c\nMOV             X19, X0                                                ; +0x70, 0x1004c6f90\nLDR             W8, [X0,#0x748]                                        ; +0x74, 0x1004c6f94\nCMP             W8, #1                                                 ; +0x78, 0x1004c6f98\nB.LT            loc_1004C6FB8                                          ; +0x7c, 0x1004c6f9c\nBL              GameManager__sharedState                               ; +0x80, 0x1004c6fa0\nMOV             X1, X19                                                ; +0x84, 0x1004c6fa4\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x88, 0x1004c6fa8\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x8c, 0x1004c6fac\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x90, 0x1004c6fb0\nB               sub_1003AF1A8                                          ; +0x94, 0x1004c6fb4\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x98, 0x1004c6fb8\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x9c, 0x1004c6fbc\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xa0, 0x1004c6fc0\nRET                                                                    ; +0xa4, 0x1004c6fc4", "xrefs": ["EditorSFXActionConfigLayer::refreshRows @ 0x1004c6c20"], "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"}