{"type": "func", "start": 369432, "end": 369556, "name": "sub_5A318", "pseudocode": "// \n// sub_5A318 from 0x5a318 to 0x5a394 (124 bytes)\n// \n// 7 xrefs:\n// > sub_44ED8 @ 0x44f04\n// > sub_44ED8 @ 0x44f1c\n// > sub_753C4 @ 0x75b12\n// > sub_753C4 @ 0x75c88\n// > sub_753C4 @ 0x75dee\n// > sub_753C4 @ 0x7745e\n// > FMOD::System::createDSPByType @ 0xb962c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:40:48 +0000\n// \n\nint __fastcall sub_5A318(int a1, int a2, _DWORD *a3)\n{\n  int result; // r0\n  int *v6; // r5\n  _DWORD *v7[10]; // [sp+8h] [bp-38h] BYREF\n\n  if ( !*(_DWORD *)(a1 + 68272) )\n    return 67;\n  if ( !a3 )\n    return 31;\n  *a3 = 0;\n  result = 31;\n  if ( a2 && a2 <= 36 )\n  {\n    if ( a2 == 1 )\n    {\n      memset(v7, 0, 0x24u);\n      v7[4] = &dword_0 + 1;\n      v7[1] = \"FMOD Mixer unit\";\n      result = sub_617B8(a1, v7, 0, a3, 1);\n    }\n    else\n    {\n      v6 = (int *)(a1 + 68272);\n      v7[0] = nullptr;\n      result = sub_51BCE(*v6, a2, v7);\n      if ( result )\n        return result;\n      result = sub_51CA4(*v6, v7[0], nullptr, a3);\n    }\n    if ( !result )\n      return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_5A318 from 0x5a318 to 0x5a394 (124 bytes)\n; \n; 7 xrefs:\n; > sub_44ED8 @ 0x44f04\n; > sub_44ED8 @ 0x44f1c\n; > sub_753C4 @ 0x75b12\n; > sub_753C4 @ 0x75c88\n; > sub_753C4 @ 0x75dee\n; > sub_753C4 @ 0x7745e\n; > FMOD::System::createDSPByType @ 0xb962c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:40:48 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x5a318\nADD             R7, SP, #0xC                                           ; +0x2, 0x5a31a\nPUSH.W          {R11}                                                  ; +0x4, 0x5a31c\nSUB             SP, SP, #0x30                                          ; +0x8, 0x5a320\nMOV             R4, R2                                                 ; +0xa, 0x5a322\nLDR             R2, =0x10AB0                                           ; +0xc, 0x5a324\nMOV             R5, R0                                                 ; +0xe, 0x5a326\nLDR             R0, [R0,R2]                                            ; +0x10, 0x5a328\nCBZ             R0, loc_5A364                                          ; +0x12, 0x5a32a\nCBZ             R4, loc_5A368                                          ; +0x14, 0x5a32c\nMOVS            R0, #0                                                 ; +0x16, 0x5a32e\nSTR             R0, [R4]                                               ; +0x18, 0x5a330\nMOV.W           R0, #0x1F                                              ; +0x1a, 0x5a332\nCBZ             R1, loc_5A38C                                          ; +0x1e, 0x5a336\nCMP             R1, #0x24 ; '$'                                        ; +0x20, 0x5a338\nBGT             loc_5A38C                                              ; +0x22, 0x5a33a\nCMP             R1, #1                                                 ; +0x24, 0x5a33c\nBNE             loc_5A36C                                              ; +0x26, 0x5a33e\nADD             R6, SP, #0x30+var_28                                   ; +0x28, 0x5a340\nMOVS            R1, #0x24 ; '$'                                        ; +0x2a, 0x5a342\nMOV             R0, R6                                                 ; +0x2c, 0x5a344\nBLX             __aeabi_memclr8                                        ; +0x2e, 0x5a346\nMOVS            R0, #1                                                 ; +0x32, 0x5a34a\nMOVS            R2, #0                                                 ; +0x34, 0x5a34c\nSTR             R0, [SP,#0x30+var_18]                                  ; +0x36, 0x5a34e\nMOV             R3, R4                                                 ; +0x38, 0x5a350\nLDR             R1, =(aFmodMixerUnit - 0x5A35C); \"FMOD Mixer unit\" ... ; +0x3a, 0x5a352\nSTR             R0, [SP,#0x30+var_30]                                  ; +0x3c, 0x5a354\nMOV             R0, R5                                                 ; +0x3e, 0x5a356\nADD             R1, PC; \"FMOD Mixer unit\"                              ; +0x40, 0x5a358\nSTR             R1, [SP,#0x30+var_24]                                  ; +0x42, 0x5a35a\nMOV             R1, R6                                                 ; +0x44, 0x5a35c\nBL              sub_617B8                                              ; +0x46, 0x5a35e\nB               loc_5A388                                              ; +0x4a, 0x5a362\nMOVS            R0, #0x43 ; 'C'                                        ; +0x4c, 0x5a364\nB               loc_5A38C                                              ; +0x4e, 0x5a366\nMOVS            R0, #0x1F                                              ; +0x50, 0x5a368\nB               loc_5A38C                                              ; +0x52, 0x5a36a\nADD             R5, R2                                                 ; +0x54, 0x5a36c\nMOVS            R0, #0                                                 ; +0x56, 0x5a36e\nSTR             R0, [SP,#0x30+var_28]                                  ; +0x58, 0x5a370\nADD             R2, SP, #0x30+var_28                                   ; +0x5a, 0x5a372\nLDR             R0, [R5]                                               ; +0x5c, 0x5a374\nBL              sub_51BCE                                              ; +0x5e, 0x5a376\nCBNZ            R0, loc_5A38C                                          ; +0x62, 0x5a37a\nLDR             R0, [R5]                                               ; +0x64, 0x5a37c\nMOVS            R2, #0                                                 ; +0x66, 0x5a37e\nLDR             R1, [SP,#0x30+var_28]                                  ; +0x68, 0x5a380\nMOV             R3, R4                                                 ; +0x6a, 0x5a382\nBL              sub_51CA4                                              ; +0x6c, 0x5a384\nCBNZ            R0, loc_5A38C                                          ; +0x70, 0x5a388\nMOVS            R0, #0                                                 ; +0x72, 0x5a38a\nADD             SP, SP, #0x30 ; '0'                                    ; +0x74, 0x5a38c\nPOP.W           {R11}                                                  ; +0x76, 0x5a38e\nPOP             {R4-R7,PC}                                             ; +0x7a, 0x5a392", "xrefs": ["sub_44ED8 @ 0x44f04", "sub_44ED8 @ 0x44f1c", "sub_753C4 @ 0x75b12", "sub_753C4 @ 0x75c88", "sub_753C4 @ 0x75dee", "sub_753C4 @ 0x7745e", "FMOD::System::createDSPByType @ 0xb962c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}