{"type": "func", "start": 362552, "end": 362638, "name": "sub_58838", "pseudocode": "// \n// sub_58838 from 0x58838 to 0x5888e (86 bytes)\n// \n// 1 xrefs:\n// > FMOD::System::getNumPlugins @ 0xb7f10\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_58838(int a1, int a2, int *a3)\n{\n  int result; // r0\n\n  if ( !a3 )\n    return 31;\n  if ( *(_BYTE *)(a1 + 5) || (result = sub_56BEC(a1)) == 0 )\n  {\n    switch ( a2 )\n    {\n      case 2:\n        sub_51AAC(*(_DWORD *)(a1 + 68272), a3);\n        return 0;\n      case 1:\n        sub_51A92(*(_DWORD *)(a1 + 68272), a3);\n        return 0;\n      case 0:\n        sub_51ADA(*(_DWORD *)(a1 + 68272), a3);\n        return 0;\n    }\n    return 31;\n  }\n  return result;\n}", "assembly": "; \n; sub_58838 from 0x58838 to 0x5888e (86 bytes)\n; \n; 1 xrefs:\n; > FMOD::System::getNumPlugins @ 0xb7f10\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-R7,LR}                                             ; +0x0, 0x58838\nADD             R7, SP, #0xC                                           ; +0x2, 0x5883a\nPUSH.W          {R11}                                                  ; +0x4, 0x5883c\nCBZ             R2, loc_58862                                          ; +0x8, 0x58840\nMOV             R5, R0                                                 ; +0xa, 0x58842\nLDRB            R0, [R0,#5]                                            ; +0xc, 0x58844\nMOV             R4, R2                                                 ; +0xe, 0x58846\nMOV             R6, R1                                                 ; +0x10, 0x58848\nCBZ             R0, loc_58866                                          ; +0x12, 0x5884a\nCMP             R6, #2                                                 ; +0x14, 0x5884c\nBEQ             loc_58870                                              ; +0x16, 0x5884e\nCMP             R6, #1                                                 ; +0x18, 0x58850\nBEQ             loc_5887C                                              ; +0x1a, 0x58852\nCBNZ            R6, loc_58862                                          ; +0x1c, 0x58854\nLDR             R0, =0x10AB0                                           ; +0x1e, 0x58856\nMOV             R1, R4                                                 ; +0x20, 0x58858\nLDR             R0, [R5,R0]                                            ; +0x22, 0x5885a\nBL              sub_51ADA                                              ; +0x24, 0x5885c\nB               loc_58886                                              ; +0x28, 0x58860\nMOVS            R0, #0x1F                                              ; +0x2a, 0x58862\nB               loc_58888                                              ; +0x2c, 0x58864\nMOV             R0, R5                                                 ; +0x2e, 0x58866\nBL              sub_56BEC                                              ; +0x30, 0x58868\nCBNZ            R0, loc_58888                                          ; +0x34, 0x5886c\nB               loc_5884C                                              ; +0x36, 0x5886e\nLDR             R0, =0x10AB0                                           ; +0x38, 0x58870\nMOV             R1, R4                                                 ; +0x3a, 0x58872\nLDR             R0, [R5,R0]                                            ; +0x3c, 0x58874\nBL              sub_51AAC                                              ; +0x3e, 0x58876\nB               loc_58886                                              ; +0x42, 0x5887a\nLDR             R0, =0x10AB0                                           ; +0x44, 0x5887c\nMOV             R1, R4                                                 ; +0x46, 0x5887e\nLDR             R0, [R5,R0]                                            ; +0x48, 0x58880\nBL              sub_51A92                                              ; +0x4a, 0x58882\nMOVS            R0, #0                                                 ; +0x4e, 0x58886\nPOP.W           {R11}                                                  ; +0x50, 0x58888\nPOP             {R4-R7,PC}                                             ; +0x54, 0x5888c", "xrefs": ["FMOD::System::getNumPlugins @ 0xb7f10"], "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"}