{"type": "func", "start": 335604, "end": 335764, "name": "sub_51EF4", "pseudocode": "// \n// sub_51EF4 from 0x51ef4 to 0x51f94 (160 bytes)\n// \n// 1 xrefs:\n// > sub_51FA4 @ 0x52068\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall sub_51EF4(__int64 a1, int a2)\n{\n  __int64 result; // x0\n  _BYTE v4[256]; // [xsp+10h] [xbp-110h] BYREF\n\n  *(_DWORD *)(a1 + 368) = a2;\n  result = FMOD_OS_CriticalSection_Create(a1 + 360, 0);\n  if ( !(_DWORD)result )\n  {\n    sub_E3FC8(v4, 256, \"FMOD nonblocking thread (%d)\", *(_DWORD *)(a1 + 368));\n    result = sub_E42FC(a1, v4, sub_51A54, a1, 4, 1, 0, 0, 1);\n    if ( !(_DWORD)result )\n      *((_QWORD *)off_114000 + *(int *)(a1 + 368) + 40) = *(_QWORD *)(a1 + 272);\n  }\n  return result;\n}", "assembly": "; \n; sub_51EF4 from 0x51ef4 to 0x51f94 (160 bytes)\n; \n; 1 xrefs:\n; > sub_51FA4 @ 0x52068\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x130                                         ; +0x0, 0x51ef4\nSTP             X28, X19, [SP,#0x120+var_10]                           ; +0x4, 0x51ef8\nSTP             X29, X30, [SP,#0x120+var_s0]                           ; +0x8, 0x51efc\nMOV             X19, X0                                                ; +0xc, 0x51f00\nSTR             W1, [X0,#0x170]                                        ; +0x10, 0x51f04\nADD             X0, X0, #0x168                                         ; +0x14, 0x51f08\nMOV             W1, WZR                                                ; +0x18, 0x51f0c\nADD             X29, SP, #0x120                                        ; +0x1c, 0x51f10\nBL              .FMOD_OS_CriticalSection_Create                        ; +0x20, 0x51f14\nCBNZ            W0, loc_51F84                                          ; +0x24, 0x51f18\nLDR             W3, [X19,#0x170]                                       ; +0x28, 0x51f1c\nADRL            X2, aFmodNonblockin; \"FMOD nonblocking thread (%d)\"    ; +0x2c, 0x51f20\nADD             X0, SP, #0x120+var_110                                 ; +0x34, 0x51f28\nMOV             W1, #0x100                                             ; +0x38, 0x51f2c\nBL              sub_E3FC8                                              ; +0x3c, 0x51f30\nADRP            X2, #sub_51A54@PAGE                                    ; +0x40, 0x51f34\nMOV             W8, #1                                                 ; +0x44, 0x51f38\nADD             X2, X2, #sub_51A54@PAGEOFF                             ; +0x48, 0x51f3c\nADD             X1, SP, #0x120+var_110                                 ; +0x4c, 0x51f40\nMOV             W4, #4                                                 ; +0x50, 0x51f44\nMOV             W5, #1                                                 ; +0x54, 0x51f48\nMOV             X0, X19                                                ; +0x58, 0x51f4c\nMOV             X3, X19                                                ; +0x5c, 0x51f50\nMOV             W6, WZR                                                ; +0x60, 0x51f54\nMOV             X7, XZR                                                ; +0x64, 0x51f58\nSTRB            W8, [SP,#0x120+var_120]                                ; +0x68, 0x51f5c\nBL              sub_E42FC                                              ; +0x6c, 0x51f60\nCBNZ            W0, loc_51F84                                          ; +0x70, 0x51f64\nADRP            X8, #off_10F7A0@PAGE                                   ; +0x74, 0x51f68\nLDR             X8, [X8,#off_10F7A0@PAGEOFF]; off_114000               ; +0x78, 0x51f6c\nLDRSW           X9, [X19,#0x170]                                       ; +0x7c, 0x51f70\nLDR             X10, [X19,#0x110]                                      ; +0x80, 0x51f74\nLDR             X8, [X8]; unk_11F800                                   ; +0x84, 0x51f78\nADD             X8, X8, X9,LSL#3                                       ; +0x88, 0x51f7c\nSTR             X10, [X8,#0x140]                                       ; +0x8c, 0x51f80\nLDP             X29, X30, [SP,#0x120+var_s0]                           ; +0x90, 0x51f84\nLDP             X28, X19, [SP,#0x120+var_10]                           ; +0x94, 0x51f88\nADD             SP, SP, #0x130                                         ; +0x98, 0x51f8c\nRET                                                                    ; +0x9c, 0x51f90", "xrefs": ["sub_51FA4 @ 0x52068"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}