{"type": "func", "start": 10452272, "end": 10452616, "name": "DSO_new", "pseudocode": "// \n// DSO_new from 0x9f7d30 to 0x9f7e88 (344 bytes)\n// \n// 2 xrefs:\n// > sub_AC8090 @ 0xac8244\n// > <???> @ 0x7aa3c\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 *DSO_new()\n{\n  int v0; // r0\n  int *v1; // r4\n  int v2; // r0\n  int v3; // r5\n  int *result; // r0\n  int (__fastcall *v5)(int *); // r3\n  int v6; // r5\n\n  if ( !dword_D340F8 )\n    dword_D340F8 = DSO_METHOD_openssl();\n  v0 = CRYPTO_zalloc(40, \"crypto/dso/dso_lib.c\", 26);\n  v1 = (int *)v0;\n  if ( v0 )\n  {\n    v2 = OPENSSL_sk_new_null(v0);\n    v1[1] = v2;\n    if ( v2 )\n    {\n      *v1 = dword_D340F8;\n      v1[2] = 1;\n      v3 = CRYPTO_THREAD_lock_new(v2);\n      v1[9] = v3;\n      if ( v3 )\n      {\n        result = v1;\n        v5 = *(int (__fastcall **)(int *))(*v1 + 28);\n        if ( v5 )\n        {\n          v6 = v5(v1);\n          result = v1;\n          if ( !v6 )\n          {\n            DSO_free(v1);\n            return nullptr;\n          }\n        }\n      }\n      else\n      {\n        ERR_put_error(37, 113, 65, \"crypto/dso/dso_lib.c\", 42);\n        OPENSSL_sk_free(v1[1]);\n        CRYPTO_free(v1, \"crypto/dso/dso_lib.c\", 44);\n        return nullptr;\n      }\n    }\n    else\n    {\n      ERR_put_error(37, 113, 65, \"crypto/dso/dso_lib.c\", 34);\n      CRYPTO_free(v1, \"crypto/dso/dso_lib.c\", 35);\n      return nullptr;\n    }\n  }\n  else\n  {\n    ERR_put_error(37, 113, 65, \"crypto/dso/dso_lib.c\", 28);\n    return nullptr;\n  }\n  return result;\n}", "assembly": "; \n; DSO_new from 0x9f7d30 to 0x9f7e88 (344 bytes)\n; \n; 2 xrefs:\n; > sub_AC8090 @ 0xac8244\n; > <???> @ 0x7aa3c\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-R6,LR}                                             ; +0x0, 0x9f7d30\nLDR             R4, =(dword_D340F8 - 0x9F7D44)                         ; +0x4, 0x9f7d34\nSUB             SP, SP, #8                                             ; +0x8, 0x9f7d38\nADD             R4, PC, R4; dword_D340F8                               ; +0xc, 0x9f7d3c\nLDR             R3, [R4]                                               ; +0x10, 0x9f7d40\nCMP             R3, #0                                                 ; +0x14, 0x9f7d44\nBEQ             loc_9F7DE8                                             ; +0x18, 0x9f7d48\nLDR             R6, =(aCryptoDsoDsoLi - 0x9F7D5C); \"crypto/dso/dso_lib.c\" ; +0x1c, 0x9f7d4c\nMOV             R0, #0x28 ; '('                                        ; +0x20, 0x9f7d50\nADD             R6, PC, R6; \"crypto/dso/dso_lib.c\"                     ; +0x24, 0x9f7d54\nMOV             R1, R6                                                 ; +0x28, 0x9f7d58\nMOV             R2, #0x1A                                              ; +0x2c, 0x9f7d5c\nBL              CRYPTO_zalloc                                          ; +0x30, 0x9f7d60\nSUBS            R4, R0, #0                                             ; +0x34, 0x9f7d64\nBEQ             loc_9F7DF4                                             ; +0x38, 0x9f7d68\nBL              OPENSSL_sk_new_null                                    ; +0x3c, 0x9f7d6c\nCMP             R0, #0                                                 ; +0x40, 0x9f7d70\nMOV             R5, R0                                                 ; +0x44, 0x9f7d74\nSTR             R0, [R4,#4]                                            ; +0x48, 0x9f7d78\nBEQ             loc_9F7E18                                             ; +0x4c, 0x9f7d7c\nLDR             R2, =(dword_D340F8 - 0x9F7D90)                         ; +0x50, 0x9f7d80\nMOV             R3, #1                                                 ; +0x54, 0x9f7d84\nADD             R2, PC, R2; dword_D340F8                               ; +0x58, 0x9f7d88\nLDR             R2, [R2]                                               ; +0x5c, 0x9f7d8c\nSTR             R2, [R4]                                               ; +0x60, 0x9f7d90\nSTR             R3, [R4,#8]                                            ; +0x64, 0x9f7d94\nBL              CRYPTO_THREAD_lock_new                                 ; +0x68, 0x9f7d98\nCMP             R0, #0                                                 ; +0x6c, 0x9f7d9c\nMOV             R5, R0                                                 ; +0x70, 0x9f7da0\nSTR             R0, [R4,#0x24]                                         ; +0x74, 0x9f7da4\nBEQ             loc_9F7E4C                                             ; +0x78, 0x9f7da8\nLDR             R3, [R4]                                               ; +0x7c, 0x9f7dac\nMOV             R0, R4                                                 ; +0x80, 0x9f7db0\nLDR             R3, [R3,#0x1C]                                         ; +0x84, 0x9f7db4\nCMP             R3, #0                                                 ; +0x88, 0x9f7db8\nBEQ             loc_9F7DD0                                             ; +0x8c, 0x9f7dbc\nBLX             R3                                                     ; +0x90, 0x9f7dc0\nSUBS            R5, R0, #0                                             ; +0x94, 0x9f7dc4\nMOV             R0, R4                                                 ; +0x98, 0x9f7dc8\nBEQ             loc_9F7DD8                                             ; +0x9c, 0x9f7dcc\nADD             SP, SP, #8                                             ; +0xa0, 0x9f7dd0\nPOP             {R4-R6,PC}                                             ; +0xa4, 0x9f7dd4\nBL              DSO_free                                               ; +0xa8, 0x9f7dd8\nMOV             R0, R5                                                 ; +0xac, 0x9f7ddc\nADD             SP, SP, #8                                             ; +0xb0, 0x9f7de0\nPOP             {R4-R6,PC}                                             ; +0xb4, 0x9f7de4\nBL              DSO_METHOD_openssl                                     ; +0xb8, 0x9f7de8\nSTR             R0, [R4]                                               ; +0xbc, 0x9f7dec\nB               loc_9F7D4C                                             ; +0xc0, 0x9f7df0\nMOV             R2, #0x1C                                              ; +0xc4, 0x9f7df4\nSTR             R2, [SP,#8+var_8]                                      ; +0xc8, 0x9f7df8\nMOV             R0, #0x25 ; '%'                                        ; +0xcc, 0x9f7dfc\nMOV             R3, R6                                                 ; +0xd0, 0x9f7e00\nMOV             R1, #0x71 ; 'q'                                        ; +0xd4, 0x9f7e04\nMOV             R2, #0x41 ; 'A'                                        ; +0xd8, 0x9f7e08\nBL              ERR_put_error                                          ; +0xdc, 0x9f7e0c\nMOV             R0, R4                                                 ; +0xe0, 0x9f7e10\nB               loc_9F7DD0                                             ; +0xe4, 0x9f7e14\nMOV             R3, #0x22 ; '\"'                                        ; +0xe8, 0x9f7e18\nSTR             R3, [SP,#8+var_8]                                      ; +0xec, 0x9f7e1c\nMOV             R0, #0x25 ; '%'                                        ; +0xf0, 0x9f7e20\nMOV             R1, #0x71 ; 'q'                                        ; +0xf4, 0x9f7e24\nMOV             R2, #0x41 ; 'A'                                        ; +0xf8, 0x9f7e28\nMOV             R3, R6                                                 ; +0xfc, 0x9f7e2c\nBL              ERR_put_error                                          ; +0x100, 0x9f7e30\nMOV             R0, R4                                                 ; +0x104, 0x9f7e34\nMOV             R1, R6                                                 ; +0x108, 0x9f7e38\nMOV             R2, #0x23 ; '#'                                        ; +0x10c, 0x9f7e3c\nBL              CRYPTO_free                                            ; +0x110, 0x9f7e40\nMOV             R0, R5                                                 ; +0x114, 0x9f7e44\nB               loc_9F7DD0                                             ; +0x118, 0x9f7e48\nMOV             R3, #0x2A ; '*'                                        ; +0x11c, 0x9f7e4c\nMOV             R1, #0x71 ; 'q'                                        ; +0x120, 0x9f7e50\nMOV             R2, #0x41 ; 'A'                                        ; +0x124, 0x9f7e54\nSTR             R3, [SP,#8+var_8]                                      ; +0x128, 0x9f7e58\nMOV             R0, #0x25 ; '%'                                        ; +0x12c, 0x9f7e5c\nMOV             R3, R6                                                 ; +0x130, 0x9f7e60\nBL              ERR_put_error                                          ; +0x134, 0x9f7e64\nLDR             R0, [R4,#4]                                            ; +0x138, 0x9f7e68\nBL              OPENSSL_sk_free                                        ; +0x13c, 0x9f7e6c\nMOV             R0, R4                                                 ; +0x140, 0x9f7e70\nMOV             R1, R6                                                 ; +0x144, 0x9f7e74\nMOV             R2, #0x2C ; ','                                        ; +0x148, 0x9f7e78\nBL              CRYPTO_free                                            ; +0x14c, 0x9f7e7c\nMOV             R0, R5                                                 ; +0x150, 0x9f7e80\nB               loc_9F7DD0                                             ; +0x154, 0x9f7e84", "xrefs": ["sub_AC8090 @ 0xac8244", "<???> @ 0x7aa3c"], "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"}