{"type": "func", "start": 14199756, "end": 14199948, "name": "DSO_ctrl", "pseudocode": "// \n// DSO_ctrl from 0xd8abcc to 0xd8ac8c (192 bytes)\n// \n// 3 xrefs:\n// > DSO_load @ 0xd8af10\n// > sub_E5D098 @ 0xe5d628\n// > <???> @ 0x59e20\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 DSO_ctrl(_DWORD *a1, int a2, int a3)\n{\n  __int64 (*v3)(void); // x4\n\n  if ( a1 )\n  {\n    switch ( a2 )\n    {\n      case 2:\n        a1[5] = a3;\n        return 0;\n      case 3:\n        a1[5] |= a3;\n        return 0;\n      case 1:\n        return (int)a1[5];\n      default:\n        if ( *(_QWORD *)a1 && (v3 = *(__int64 (**)(void))(*(_QWORD *)a1 + 32LL)) != nullptr )\n        {\n          return v3();\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 0xd8abcc to 0xd8ac8c (192 bytes)\n; \n; 3 xrefs:\n; > DSO_load @ 0xd8af10\n; > sub_E5D098 @ 0xe5d628\n; > <???> @ 0x59e20\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\nSTP             X29, X30, [SP,#-0x10+var_s0]!                          ; +0x0, 0xd8abcc\nMOV             X4, X0                                                 ; +0x4, 0xd8abd0\nMOV             X29, SP                                                ; +0x8, 0xd8abd4\nCBZ             X0, loc_D8AC68                                         ; +0xc, 0xd8abd8\nCMP             W1, #2                                                 ; +0x10, 0xd8abdc\nB.EQ            loc_D8AC34                                             ; +0x14, 0xd8abe0\nCMP             W1, #3                                                 ; +0x18, 0xd8abe4\nB.EQ            loc_D8AC10                                             ; +0x1c, 0xd8abe8\nCMP             W1, #1                                                 ; +0x20, 0xd8abec\nB.EQ            loc_D8AC28                                             ; +0x24, 0xd8abf0\nLDR             X4, [X0]                                               ; +0x28, 0xd8abf4\nCBZ             X4, loc_D8AC44                                         ; +0x2c, 0xd8abf8\nLDR             X4, [X4,#0x20]                                         ; +0x30, 0xd8abfc\nCBZ             X4, loc_D8AC44                                         ; +0x34, 0xd8ac00\nBLR             X4                                                     ; +0x38, 0xd8ac04\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x3c, 0xd8ac08\nRET                                                                    ; +0x40, 0xd8ac0c\nLDR             W1, [X0,#0x14]                                         ; +0x44, 0xd8ac10\nMOV             X0, #0                                                 ; +0x48, 0xd8ac14\nORR             W6, W1, W2                                             ; +0x4c, 0xd8ac18\nSTR             W6, [X4,#0x14]                                         ; +0x50, 0xd8ac1c\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x54, 0xd8ac20\nRET                                                                    ; +0x58, 0xd8ac24\nLDRSW           X0, [X0,#0x14]                                         ; +0x5c, 0xd8ac28\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x60, 0xd8ac2c\nRET                                                                    ; +0x64, 0xd8ac30\nSTR             W2, [X4,#0x14]                                         ; +0x68, 0xd8ac34\nMOV             X0, #0                                                 ; +0x6c, 0xd8ac38\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x70, 0xd8ac3c\nRET                                                                    ; +0x74, 0xd8ac40\nADRP            X3, #aCryptoDsoDsoLi@PAGE; \"crypto/dso/dso_lib.c\"      ; +0x78, 0xd8ac44\nMOV             W0, #0x25 ; '%'                                        ; +0x7c, 0xd8ac48\nMOV             W1, #0x6E ; 'n'                                        ; +0x80, 0xd8ac4c\nMOV             W2, #0x6C ; 'l'                                        ; +0x84, 0xd8ac50\nADD             X3, X3, #aCryptoDsoDsoLi@PAGEOFF; \"crypto/dso/dso_lib.c\" ; +0x88, 0xd8ac54\nMOV             W4, #0xE0                                              ; +0x8c, 0xd8ac58\nBL              ERR_put_error                                          ; +0x90, 0xd8ac5c\nMOV             X0, #0xFFFFFFFFFFFFFFFF                                ; +0x94, 0xd8ac60\nB               loc_D8AC08                                             ; +0x98, 0xd8ac64\nADRP            X3, #aCryptoDsoDsoLi@PAGE; \"crypto/dso/dso_lib.c\"      ; +0x9c, 0xd8ac68\nMOV             W0, #0x25 ; '%'                                        ; +0xa0, 0xd8ac6c\nMOV             W1, #0x6E ; 'n'                                        ; +0xa4, 0xd8ac70\nMOV             W2, #0x43 ; 'C'                                        ; +0xa8, 0xd8ac74\nADD             X3, X3, #aCryptoDsoDsoLi@PAGEOFF; \"crypto/dso/dso_lib.c\" ; +0xac, 0xd8ac78\nMOV             W4, #0xCC                                              ; +0xb0, 0xd8ac7c\nBL              ERR_put_error                                          ; +0xb4, 0xd8ac80\nMOV             X0, #0xFFFFFFFFFFFFFFFF                                ; +0xb8, 0xd8ac84\nB               loc_D8AC08                                             ; +0xbc, 0xd8ac88", "xrefs": ["DSO_load @ 0xd8af10", "sub_E5D098 @ 0xe5d628", "<???> @ 0x59e20"], "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"}