{"type": "func", "start": 10452952, "end": 10453152, "name": "DSO_ctrl", "pseudocode": "// \n// DSO_ctrl from 0x9f7fd8 to 0x9f80a0 (200 bytes)\n// \n// 3 xrefs:\n// > DSO_load @ 0x9f8344\n// > sub_AC8090 @ 0xac8670\n// > <???> @ 0x7aa7c\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 12:07:33 +0000\n// \n\nint __fastcall DSO_ctrl(_DWORD *a1, int a2, int a3)\n{\n  int (*v4)(void); // r12\n\n  if ( a1 )\n  {\n    switch ( a2 )\n    {\n      case 2:\n        a1[3] = a3;\n        return 0;\n      case 3:\n        a1[3] |= a3;\n        return 0;\n      case 1:\n        return a1[3];\n      default:\n        if ( *a1 && (v4 = *(int (**)(void))(*a1 + 16)) != nullptr )\n        {\n          return v4();\n        }\n        else\n        {\n          ERR_put_error(37, 110, 108, \"crypto/dso/dso_lib.c\", 224);\n          return -1;\n        }\n    }\n  }\n  else\n  {\n    ERR_put_error(37, 110, 67, \"crypto/dso/dso_lib.c\", 204);\n    return -1;\n  }\n}", "assembly": "; \n; DSO_ctrl from 0x9f7fd8 to 0x9f80a0 (200 bytes)\n; \n; 3 xrefs:\n; > DSO_load @ 0x9f8344\n; > sub_AC8090 @ 0xac8670\n; > <???> @ 0x7aa7c\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 12:07:33 +0000\n; \nPUSH            {R4,LR}                                                ; +0x0, 0x9f7fd8\nSUBS            LR, R0, #0                                             ; +0x4, 0x9f7fdc\nSUB             SP, SP, #8                                             ; +0x8, 0x9f7fe0\nBEQ             loc_9F8078                                             ; +0xc, 0x9f7fe4\nCMP             R1, #2                                                 ; +0x10, 0x9f7fe8\nBEQ             loc_9F8040                                             ; +0x14, 0x9f7fec\nCMP             R1, #3                                                 ; +0x18, 0x9f7ff0\nBEQ             loc_9F8028                                             ; +0x1c, 0x9f7ff4\nCMP             R1, #1                                                 ; +0x20, 0x9f7ff8\nLDREQ           R0, [LR,#0xC]                                          ; +0x24, 0x9f7ffc\nBEQ             loc_9F8038                                             ; +0x28, 0x9f8000\nLDR             R12, [LR]                                              ; +0x2c, 0x9f8004\nCMP             R12, #0                                                ; +0x30, 0x9f8008\nBEQ             loc_9F8050                                             ; +0x34, 0x9f800c\nLDR             R12, [R12,#0x10]                                       ; +0x38, 0x9f8010\nCMP             R12, #0                                                ; +0x3c, 0x9f8014\nBEQ             loc_9F8050                                             ; +0x40, 0x9f8018\nADD             SP, SP, #8                                             ; +0x44, 0x9f801c\nPOP             {R4,LR}                                                ; +0x48, 0x9f8020\nBX              R12                                                    ; +0x4c, 0x9f8024\nLDR             R3, [LR,#0xC]                                          ; +0x50, 0x9f8028\nMOV             R0, #0                                                 ; +0x54, 0x9f802c\nORR             R4, R3, R2                                             ; +0x58, 0x9f8030\nSTR             R4, [LR,#0xC]                                          ; +0x5c, 0x9f8034\nADD             SP, SP, #8                                             ; +0x60, 0x9f8038\nPOP             {R4,PC}                                                ; +0x64, 0x9f803c\nMOV             R0, #0                                                 ; +0x68, 0x9f8040\nSTR             R2, [LR,#0xC]                                          ; +0x6c, 0x9f8044\nADD             SP, SP, #8                                             ; +0x70, 0x9f8048\nPOP             {R4,PC}                                                ; +0x74, 0x9f804c\nMOV             R3, #0xE0                                              ; +0x78, 0x9f8050\nSTR             R3, [SP,#8+var_8]                                      ; +0x7c, 0x9f8054\nLDR             R3, =(aCryptoDsoDsoLi - 0x9F8070); \"crypto/dso/dso_lib.c\" ; +0x80, 0x9f8058\nMOV             R0, #0x25 ; '%'                                        ; +0x84, 0x9f805c\nMOV             R1, #0x6E ; 'n'                                        ; +0x88, 0x9f8060\nMOV             R2, #0x6C ; 'l'                                        ; +0x8c, 0x9f8064\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x90, 0x9f8068\nBL              ERR_put_error                                          ; +0x94, 0x9f806c\nMOV             R0, #0xFFFFFFFF                                        ; +0x98, 0x9f8070\nB               loc_9F8038                                             ; +0x9c, 0x9f8074\nMOV             R3, #0xCC                                              ; +0xa0, 0x9f8078\nSTR             R3, [SP,#8+var_8]                                      ; +0xa4, 0x9f807c\nLDR             R3, =(aCryptoDsoDsoLi - 0x9F8098); \"crypto/dso/dso_lib.c\" ; +0xa8, 0x9f8080\nMOV             R0, #0x25 ; '%'                                        ; +0xac, 0x9f8084\nMOV             R1, #0x6E ; 'n'                                        ; +0xb0, 0x9f8088\nMOV             R2, #0x43 ; 'C'                                        ; +0xb4, 0x9f808c\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0xb8, 0x9f8090\nBL              ERR_put_error                                          ; +0xbc, 0x9f8094\nMOV             R0, #0xFFFFFFFF                                        ; +0xc0, 0x9f8098\nB               loc_9F8038                                             ; +0xc4, 0x9f809c", "xrefs": ["DSO_load @ 0x9f8344", "sub_AC8090 @ 0xac8670", "<???> @ 0x7aa7c"], "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"}