{"type": "func", "start": 361284, "end": 361368, "name": "sub_58344", "pseudocode": "// \n// sub_58344 from 0x58344 to 0x58398 (84 bytes)\n// \n// 4 xrefs:\n// > sub_58398 @ 0x583aa\n// > sub_60EF4 @ 0x60fd8\n// > sub_61228 @ 0x6123e\n// > FMOD::System::getNumDrivers @ 0xb7070\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\nint __fastcall sub_58344(int a1, _DWORD *a2)\n{\n  int result; // r0\n  int v5; // r0\n  int (__fastcall *v6)(int, _DWORD *); // r2\n\n  if ( !a2 )\n    return 31;\n  if ( *(_BYTE *)(a1 + 4) || (result = sub_610FC(a1, *(_DWORD *)(a1 + 1116), *(_DWORD *)(a1 + 1120))) == 0 )\n  {\n    result = sub_60EF4(a1, 0);\n    if ( !result )\n    {\n      v5 = *(_DWORD *)(a1 + 1112);\n      v6 = *(int (__fastcall **)(int, _DWORD *))(v5 + 696);\n      if ( v6 )\n      {\n        if ( v5 )\n          v5 += 4;\n        return v6(v5, a2);\n      }\n      else\n      {\n        *a2 = 0;\n        return 0;\n      }\n    }\n  }\n  else\n  {\n    *a2 = 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_58344 from 0x58344 to 0x58398 (84 bytes)\n; \n; 4 xrefs:\n; > sub_58398 @ 0x583aa\n; > sub_60EF4 @ 0x60fd8\n; > sub_61228 @ 0x6123e\n; > FMOD::System::getNumDrivers @ 0xb7070\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\nPUSH            {R4,R5,R7,LR}                                          ; +0x0, 0x58344\nADD             R7, SP, #8                                             ; +0x2, 0x58346\nCBZ             R1, loc_5835E                                          ; +0x4, 0x58348\nMOV             R5, R0                                                 ; +0x6, 0x5834a\nLDRB            R0, [R0,#4]                                            ; +0x8, 0x5834c\nMOV             R4, R1                                                 ; +0xa, 0x5834e\nCBZ             R0, loc_58362                                          ; +0xc, 0x58350\nMOV             R0, R5                                                 ; +0xe, 0x58352\nMOVS            R1, #0                                                 ; +0x10, 0x58354\nBL              sub_60EF4                                              ; +0x12, 0x58356\nCBZ             R0, loc_5837A                                          ; +0x16, 0x5835a\nPOP             {R4,R5,R7,PC}                                          ; +0x18, 0x5835c\nMOVS            R0, #0x1F                                              ; +0x1a, 0x5835e\nPOP             {R4,R5,R7,PC}                                          ; +0x1c, 0x58360\nLDR.W           R1, [R5,#0x45C]                                        ; +0x1e, 0x58362\nMOV             R0, R5                                                 ; +0x22, 0x58366\nLDR.W           R2, [R5,#0x460]                                        ; +0x24, 0x58368\nBL              sub_610FC                                              ; +0x28, 0x5836c\nCMP             R0, #0                                                 ; +0x2c, 0x58370\nBEQ             loc_58352                                              ; +0x2e, 0x58372\nMOVS            R1, #0                                                 ; +0x30, 0x58374\nSTR             R1, [R4]                                               ; +0x32, 0x58376\nPOP             {R4,R5,R7,PC}                                          ; +0x34, 0x58378\nLDR.W           R0, [R5,#0x458]                                        ; +0x36, 0x5837a\nLDR.W           R2, [R0,#0x2B8]                                        ; +0x3a, 0x5837e\nCBZ             R2, loc_58392                                          ; +0x3e, 0x58382\nCMP             R0, #0                                                 ; +0x40, 0x58384\nIT NE                                                                  ; +0x42, 0x58386\nADDNE           R0, #4                                                 ; +0x44, 0x58388\nMOV             R1, R4                                                 ; +0x46, 0x5838a\nPOP.W           {R4,R5,R7,LR}                                          ; +0x48, 0x5838c\nBX              R2                                                     ; +0x4c, 0x58390\nMOVS            R0, #0                                                 ; +0x4e, 0x58392\nSTR             R0, [R4]                                               ; +0x50, 0x58394\nPOP             {R4,R5,R7,PC}                                          ; +0x52, 0x58396", "xrefs": ["sub_58398 @ 0x583aa", "sub_60EF4 @ 0x60fd8", "sub_61228 @ 0x6123e", "FMOD::System::getNumDrivers @ 0xb7070"], "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"}