{"type": "func", "start": 8271340, "end": 8272064, "name": "DSO_load", "pseudocode": "// \n// DSO_load from 0x7e35ec to 0x7e38c0 (724 bytes)\n// \n// 5 xrefs:\n// > CONF_modules_load @ 0x7da444\n// > DSO_dsobyaddr @ 0x7e3b70\n// > sub_8B3090 @ 0x8b32c4\n// > sub_8B3090 @ 0x8b34ec\n// > <???> @ 0x602ec\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 DSO_load(int *a1, int a2, int a3, int a4)\n{\n  int *v4; // r5\n  int v6; // r4\n  int (__fastcall *v8)(int *); // r3\n  int v10; // r0\n  int v11; // r0\n  int v12; // r0\n  int (__fastcall *v13)(int *); // r3\n\n  v4 = a1;\n  if ( a1 )\n  {\n    v6 = 0;\nLABEL_4:\n    if ( v4[7] )\n    {\n      ERR_put_error(37, 112, 110, \"crypto/dso/dso_lib.c\", 139);\n      goto LABEL_6;\n    }\n    if ( !a2 )\n      goto LABEL_26;\n    if ( !DSO_set_filename((int)v4, a2) )\n    {\n      ERR_put_error(37, 112, 112, \"crypto/dso/dso_lib.c\", 148);\n      goto LABEL_6;\n    }\n    if ( v4[7] )\n    {\n      v8 = *(int (__fastcall **)(int *))(*v4 + 4);\n      if ( v8 )\n      {\n        if ( v8(v4) )\n          return v4;\n        ERR_put_error(37, 112, 103, \"crypto/dso/dso_lib.c\", 161);\n      }\n      else\n      {\n        ERR_put_error(37, 112, 108, \"crypto/dso/dso_lib.c\", 157);\n      }\n    }\n    else\n    {\nLABEL_26:\n      ERR_put_error(37, 112, 111, \"crypto/dso/dso_lib.c\", 153);\n    }\nLABEL_6:\n    if ( !v6 )\n      return nullptr;\nLABEL_24:\n    DSO_free(v4);\n    return nullptr;\n  }\n  if ( !dword_AD2E6C )\n    dword_AD2E6C = DSO_METHOD_openssl();\n  v10 = CRYPTO_zalloc(40, \"crypto/dso/dso_lib.c\", 26);\n  v4 = (int *)v10;\n  if ( v10 )\n  {\n    v11 = OPENSSL_sk_new_null(v10);\n    v4[1] = v11;\n    if ( v11 )\n    {\n      *v4 = dword_AD2E6C;\n      v4[2] = 1;\n      v12 = CRYPTO_THREAD_lock_new(v11);\n      v4[9] = v12;\n      if ( v12 )\n      {\n        v13 = *(int (__fastcall **)(int *))(*v4 + 28);\n        if ( !v13 || v13(v4) )\n        {\n          if ( DSO_ctrl(v4, 2, a4) < 0 )\n          {\n            ERR_put_error(37, 112, 100, \"crypto/dso/dso_lib.c\", 132);\n            goto LABEL_24;\n          }\n          v6 = 1;\n          goto LABEL_4;\n        }\n        DSO_free(v4);\n      }\n      else\n      {\n        ERR_put_error(37, 113, 65, \"crypto/dso/dso_lib.c\", 42);\n        OPENSSL_sk_free(v4[1]);\n        CRYPTO_free(v4, \"crypto/dso/dso_lib.c\", 44);\n      }\n    }\n    else\n    {\n      ERR_put_error(37, 113, 65, \"crypto/dso/dso_lib.c\", 34);\n      CRYPTO_free(v4, \"crypto/dso/dso_lib.c\", 35);\n    }\n  }\n  else\n  {\n    ERR_put_error(37, 113, 65, \"crypto/dso/dso_lib.c\", 28);\n  }\n  ERR_put_error(37, 112, 65, \"crypto/dso/dso_lib.c\", 126);\n  return nullptr;\n}", "assembly": "; \n; DSO_load from 0x7e35ec to 0x7e38c0 (724 bytes)\n; \n; 5 xrefs:\n; > CONF_modules_load @ 0x7da444\n; > DSO_dsobyaddr @ 0x7e3b70\n; > sub_8B3090 @ 0x8b32c4\n; > sub_8B3090 @ 0x8b34ec\n; > <???> @ 0x602ec\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, 0x7e35ec\nSUBS            R5, R0, #0                                             ; +0x4, 0x7e35f0\nSUB             SP, SP, #0xC                                           ; +0x8, 0x7e35f4\nMOV             R6, R1                                                 ; +0xc, 0x7e35f8\nMOVNE           R4, #0                                                 ; +0x10, 0x7e35fc\nBEQ             loc_7E36B4                                             ; +0x14, 0x7e3600\nLDR             R3, [R5,#0x1C]                                         ; +0x18, 0x7e3604\nCMP             R3, #0                                                 ; +0x1c, 0x7e3608\nBEQ             loc_7E3644                                             ; +0x20, 0x7e360c\nMOV             R3, #0x8B                                              ; +0x24, 0x7e3610\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x28, 0x7e3614\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E3630); \"crypto/dso/dso_lib.c\" ; +0x2c, 0x7e3618\nMOV             R0, #0x25 ; '%'                                        ; +0x30, 0x7e361c\nMOV             R1, #0x70 ; 'p'                                        ; +0x34, 0x7e3620\nMOV             R2, #0x6E ; 'n'                                        ; +0x38, 0x7e3624\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x3c, 0x7e3628\nBL              ERR_put_error                                          ; +0x40, 0x7e362c\nCMP             R4, #0                                                 ; +0x44, 0x7e3630\nBNE             loc_7E3774                                             ; +0x48, 0x7e3634\nMOV             R0, #0                                                 ; +0x4c, 0x7e3638\nADD             SP, SP, #0xC                                           ; +0x50, 0x7e363c\nPOP             {R4-R7,PC}                                             ; +0x54, 0x7e3640\nCMP             R6, #0                                                 ; +0x58, 0x7e3644\nBEQ             loc_7E37A4                                             ; +0x5c, 0x7e3648\nMOV             R1, R6                                                 ; +0x60, 0x7e364c\nMOV             R0, R5                                                 ; +0x64, 0x7e3650\nBL              DSO_set_filename                                       ; +0x68, 0x7e3654\nCMP             R0, #0                                                 ; +0x6c, 0x7e3658\nBEQ             loc_7E3780                                             ; +0x70, 0x7e365c\nLDR             R3, [R5,#0x1C]                                         ; +0x74, 0x7e3660\nCMP             R3, #0                                                 ; +0x78, 0x7e3664\nBEQ             loc_7E37A4                                             ; +0x7c, 0x7e3668\nLDR             R3, [R5]                                               ; +0x80, 0x7e366c\nLDR             R3, [R3,#4]                                            ; +0x84, 0x7e3670\nCMP             R3, #0                                                 ; +0x88, 0x7e3674\nBEQ             loc_7E3808                                             ; +0x8c, 0x7e3678\nMOV             R0, R5                                                 ; +0x90, 0x7e367c\nBLX             R3                                                     ; +0x94, 0x7e3680\nCMP             R0, #0                                                 ; +0x98, 0x7e3684\nMOVNE           R0, R5                                                 ; +0x9c, 0x7e3688\nBNE             loc_7E363C                                             ; +0xa0, 0x7e368c\nMOV             R3, #0xA1                                              ; +0xa4, 0x7e3690\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xa8, 0x7e3694\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E36B0); \"crypto/dso/dso_lib.c\" ; +0xac, 0x7e3698\nMOV             R0, #0x25 ; '%'                                        ; +0xb0, 0x7e369c\nMOV             R1, #0x70 ; 'p'                                        ; +0xb4, 0x7e36a0\nMOV             R2, #0x67 ; 'g'                                        ; +0xb8, 0x7e36a4\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0xbc, 0x7e36a8\nBL              ERR_put_error                                          ; +0xc0, 0x7e36ac\nB               loc_7E3630                                             ; +0xc4, 0x7e36b0\nLDR             R5, =(dword_AD2E6C - 0x7E36C4)                         ; +0xc8, 0x7e36b4\nMOV             R4, R3                                                 ; +0xcc, 0x7e36b8\nADD             R5, PC, R5; dword_AD2E6C                               ; +0xd0, 0x7e36bc\nLDR             R3, [R5]                                               ; +0xd4, 0x7e36c0\nCMP             R3, #0                                                 ; +0xd8, 0x7e36c4\nBEQ             loc_7E382C                                             ; +0xdc, 0x7e36c8\nLDR             R7, =(aCryptoDsoDsoLi - 0x7E36DC); \"crypto/dso/dso_lib.c\" ; +0xe0, 0x7e36cc\nMOV             R0, #0x28 ; '('                                        ; +0xe4, 0x7e36d0\nADD             R7, PC, R7; \"crypto/dso/dso_lib.c\"                     ; +0xe8, 0x7e36d4\nMOV             R1, R7                                                 ; +0xec, 0x7e36d8\nMOV             R2, #0x1A                                              ; +0xf0, 0x7e36dc\nBL              CRYPTO_zalloc                                          ; +0xf4, 0x7e36e0\nSUBS            R5, R0, #0                                             ; +0xf8, 0x7e36e4\nBEQ             loc_7E3838                                             ; +0xfc, 0x7e36e8\nBL              OPENSSL_sk_new_null                                    ; +0x100, 0x7e36ec\nCMP             R0, #0                                                 ; +0x104, 0x7e36f0\nSTR             R0, [R5,#4]                                            ; +0x108, 0x7e36f4\nBEQ             loc_7E3858                                             ; +0x10c, 0x7e36f8\nLDR             R2, =(dword_AD2E6C - 0x7E370C)                         ; +0x110, 0x7e36fc\nMOV             R3, #1                                                 ; +0x114, 0x7e3700\nADD             R2, PC, R2; dword_AD2E6C                               ; +0x118, 0x7e3704\nLDR             R2, [R2]                                               ; +0x11c, 0x7e3708\nSTR             R2, [R5]                                               ; +0x120, 0x7e370c\nSTR             R3, [R5,#8]                                            ; +0x124, 0x7e3710\nBL              CRYPTO_THREAD_lock_new                                 ; +0x128, 0x7e3714\nCMP             R0, #0                                                 ; +0x12c, 0x7e3718\nSTR             R0, [R5,#0x24]                                         ; +0x130, 0x7e371c\nBEQ             loc_7E3888                                             ; +0x134, 0x7e3720\nLDR             R3, [R5]                                               ; +0x138, 0x7e3724\nLDR             R3, [R3,#0x1C]                                         ; +0x13c, 0x7e3728\nCMP             R3, #0                                                 ; +0x140, 0x7e372c\nBNE             loc_7E37C8                                             ; +0x144, 0x7e3730\nMOV             R2, R4                                                 ; +0x148, 0x7e3734\nMOV             R0, R5                                                 ; +0x14c, 0x7e3738\nMOV             R1, #2                                                 ; +0x150, 0x7e373c\nMOV             R3, #0                                                 ; +0x154, 0x7e3740\nBL              DSO_ctrl                                               ; +0x158, 0x7e3744\nCMP             R0, #0                                                 ; +0x15c, 0x7e3748\nMOVGE           R4, #1                                                 ; +0x160, 0x7e374c\nBGE             loc_7E3604                                             ; +0x164, 0x7e3750\nMOV             R3, #0x84                                              ; +0x168, 0x7e3754\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x16c, 0x7e3758\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E3774); \"crypto/dso/dso_lib.c\" ; +0x170, 0x7e375c\nMOV             R0, #0x25 ; '%'                                        ; +0x174, 0x7e3760\nMOV             R1, #0x70 ; 'p'                                        ; +0x178, 0x7e3764\nMOV             R2, #0x64 ; 'd'                                        ; +0x17c, 0x7e3768\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x180, 0x7e376c\nBL              ERR_put_error                                          ; +0x184, 0x7e3770\nMOV             R0, R5                                                 ; +0x188, 0x7e3774\nBL              DSO_free                                               ; +0x18c, 0x7e3778\nB               loc_7E3638                                             ; +0x190, 0x7e377c\nMOV             R3, #0x94                                              ; +0x194, 0x7e3780\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x198, 0x7e3784\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E37A0); \"crypto/dso/dso_lib.c\" ; +0x19c, 0x7e3788\nMOV             R1, #0x70 ; 'p'                                        ; +0x1a0, 0x7e378c\nMOV             R2, R1                                                 ; +0x1a4, 0x7e3790\nMOV             R0, #0x25 ; '%'                                        ; +0x1a8, 0x7e3794\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x1ac, 0x7e3798\nBL              ERR_put_error                                          ; +0x1b0, 0x7e379c\nB               loc_7E3630                                             ; +0x1b4, 0x7e37a0\nMOV             R3, #0x99                                              ; +0x1b8, 0x7e37a4\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x1bc, 0x7e37a8\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E37C4); \"crypto/dso/dso_lib.c\" ; +0x1c0, 0x7e37ac\nMOV             R0, #0x25 ; '%'                                        ; +0x1c4, 0x7e37b0\nMOV             R1, #0x70 ; 'p'                                        ; +0x1c8, 0x7e37b4\nMOV             R2, #0x6F ; 'o'                                        ; +0x1cc, 0x7e37b8\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x1d0, 0x7e37bc\nBL              ERR_put_error                                          ; +0x1d4, 0x7e37c0\nB               loc_7E3630                                             ; +0x1d8, 0x7e37c4\nMOV             R0, R5                                                 ; +0x1dc, 0x7e37c8\nBLX             R3                                                     ; +0x1e0, 0x7e37cc\nCMP             R0, #0                                                 ; +0x1e4, 0x7e37d0\nBNE             loc_7E3734                                             ; +0x1e8, 0x7e37d4\nMOV             R0, R5                                                 ; +0x1ec, 0x7e37d8\nBL              DSO_free                                               ; +0x1f0, 0x7e37dc\nMOV             R3, #0x7E ; '~'                                        ; +0x1f4, 0x7e37e0\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x1f8, 0x7e37e4\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E3800); \"crypto/dso/dso_lib.c\" ; +0x1fc, 0x7e37e8\nMOV             R0, #0x25 ; '%'                                        ; +0x200, 0x7e37ec\nMOV             R1, #0x70 ; 'p'                                        ; +0x204, 0x7e37f0\nMOV             R2, #0x41 ; 'A'                                        ; +0x208, 0x7e37f4\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x20c, 0x7e37f8\nBL              ERR_put_error                                          ; +0x210, 0x7e37fc\nMOV             R0, #0                                                 ; +0x214, 0x7e3800\nB               loc_7E363C                                             ; +0x218, 0x7e3804\nMOV             R3, #0x9D                                              ; +0x21c, 0x7e3808\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x220, 0x7e380c\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E3828); \"crypto/dso/dso_lib.c\" ; +0x224, 0x7e3810\nMOV             R0, #0x25 ; '%'                                        ; +0x228, 0x7e3814\nMOV             R1, #0x70 ; 'p'                                        ; +0x22c, 0x7e3818\nMOV             R2, #0x6C ; 'l'                                        ; +0x230, 0x7e381c\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x234, 0x7e3820\nBL              ERR_put_error                                          ; +0x238, 0x7e3824\nB               loc_7E3630                                             ; +0x23c, 0x7e3828\nBL              DSO_METHOD_openssl                                     ; +0x240, 0x7e382c\nSTR             R0, [R5]                                               ; +0x244, 0x7e3830\nB               loc_7E36CC                                             ; +0x248, 0x7e3834\nMOV             R2, #0x1C                                              ; +0x24c, 0x7e3838\nSTR             R2, [SP,#0xC+var_C]                                    ; +0x250, 0x7e383c\nMOV             R3, R7                                                 ; +0x254, 0x7e3840\nMOV             R0, #0x25 ; '%'                                        ; +0x258, 0x7e3844\nMOV             R1, #0x71 ; 'q'                                        ; +0x25c, 0x7e3848\nMOV             R2, #0x41 ; 'A'                                        ; +0x260, 0x7e384c\nBL              ERR_put_error                                          ; +0x264, 0x7e3850\nB               loc_7E37E0                                             ; +0x268, 0x7e3854\nMOV             R3, #0x22 ; '\"'                                        ; +0x26c, 0x7e3858\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x270, 0x7e385c\nMOV             R0, #0x25 ; '%'                                        ; +0x274, 0x7e3860\nMOV             R1, #0x71 ; 'q'                                        ; +0x278, 0x7e3864\nMOV             R2, #0x41 ; 'A'                                        ; +0x27c, 0x7e3868\nMOV             R3, R7                                                 ; +0x280, 0x7e386c\nBL              ERR_put_error                                          ; +0x284, 0x7e3870\nMOV             R0, R5                                                 ; +0x288, 0x7e3874\nMOV             R1, R7                                                 ; +0x28c, 0x7e3878\nMOV             R2, #0x23 ; '#'                                        ; +0x290, 0x7e387c\nBL              CRYPTO_free                                            ; +0x294, 0x7e3880\nB               loc_7E37E0                                             ; +0x298, 0x7e3884\nMOV             R3, #0x2A ; '*'                                        ; +0x29c, 0x7e3888\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x2a0, 0x7e388c\nMOV             R1, #0x71 ; 'q'                                        ; +0x2a4, 0x7e3890\nMOV             R2, #0x41 ; 'A'                                        ; +0x2a8, 0x7e3894\nMOV             R3, R7                                                 ; +0x2ac, 0x7e3898\nMOV             R0, #0x25 ; '%'                                        ; +0x2b0, 0x7e389c\nBL              ERR_put_error                                          ; +0x2b4, 0x7e38a0\nLDR             R0, [R5,#4]                                            ; +0x2b8, 0x7e38a4\nBL              OPENSSL_sk_free                                        ; +0x2bc, 0x7e38a8\nMOV             R0, R5                                                 ; +0x2c0, 0x7e38ac\nMOV             R1, R7                                                 ; +0x2c4, 0x7e38b0\nMOV             R2, #0x2C ; ','                                        ; +0x2c8, 0x7e38b4\nBL              CRYPTO_free                                            ; +0x2cc, 0x7e38b8\nB               loc_7E37E0                                             ; +0x2d0, 0x7e38bc", "xrefs": ["CONF_modules_load @ 0x7da444", "DSO_dsobyaddr @ 0x7e3b70", "sub_8B3090 @ 0x8b32c4", "sub_8B3090 @ 0x8b34ec", "<???> @ 0x602ec"], "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"}