{"type": "func", "start": 10378556, "end": 10378776, "name": "BIO_dup_chain", "pseudocode": "// \n// BIO_dup_chain from 0x9e5d3c to 0x9e5e18 (220 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x7921c\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:23 +0000\n// \n\nint __fastcall BIO_dup_chain(int *a1)\n{\n  int *v1; // r4\n  _DWORD *v2; // r6\n  int v3; // r9\n  int v4; // r11\n  int v5; // r10\n  int v6; // r8\n  int v7; // r7\n  int v8; // lr\n  _DWORD *v9; // r5\n\n  v1 = a1;\n  if ( a1 )\n  {\n    v2 = nullptr;\n    v3 = 0;\n    while ( 1 )\n    {\n      v9 = BIO_new(*v1);\n      if ( !v9 )\n        break;\n      v4 = v1[1];\n      v5 = v1[2];\n      v6 = v1[3];\n      v7 = v1[4];\n      v8 = v1[5];\n      v9[7] = v1[7];\n      v9[1] = v4;\n      v9[2] = v5;\n      v9[3] = v6;\n      v9[4] = v7;\n      v9[5] = v8;\n      if ( !BIO_ctrl(v1, 12, 0, (int)v9) || !CRYPTO_dup_ex_data(12, v9 + 16, v1 + 16) )\n      {\n        BIO_free(v9);\n        break;\n      }\n      if ( v3 )\n        BIO_push(v2, (int)v9);\n      else\n        v3 = (int)v9;\n      v1 = (int *)v1[9];\n      v2 = v9;\n      if ( !v1 )\n        return v3;\n    }\n    BIO_free_all(v3);\n    return 0;\n  }\n  else\n  {\n    return 0;\n  }\n}", "assembly": "; \n; BIO_dup_chain from 0x9e5d3c to 0x9e5e18 (220 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x7921c\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:23 +0000\n; \nPUSH            {R3-R11,LR}                                            ; +0x0, 0x9e5d3c\nSUBS            R4, R0, #0                                             ; +0x4, 0x9e5d40\nBEQ             loc_9E5E0C                                             ; +0x8, 0x9e5d44\nMOV             R6, #0                                                 ; +0xc, 0x9e5d48\nMOV             R9, R6                                                 ; +0x10, 0x9e5d4c\nB               loc_9E5DD0                                             ; +0x14, 0x9e5d50\nLDR             R11, [R4,#4]                                           ; +0x18, 0x9e5d54\nLDR             R10, [R4,#8]                                           ; +0x1c, 0x9e5d58\nLDR             R8, [R4,#0xC]                                          ; +0x20, 0x9e5d5c\nLDR             R7, [R4,#0x10]                                         ; +0x24, 0x9e5d60\nLDR             LR, [R4,#0x14]                                         ; +0x28, 0x9e5d64\nLDR             R12, [R4,#0x1C]                                        ; +0x2c, 0x9e5d68\nSTR             R12, [R5,#0x1C]                                        ; +0x30, 0x9e5d6c\nSTR             R11, [R5,#4]                                           ; +0x34, 0x9e5d70\nSTR             R10, [R5,#8]                                           ; +0x38, 0x9e5d74\nSTR             R8, [R5,#0xC]                                          ; +0x3c, 0x9e5d78\nSTR             R7, [R5,#0x10]                                         ; +0x40, 0x9e5d7c\nSTR             LR, [R5,#0x14]                                         ; +0x44, 0x9e5d80\nBL              BIO_ctrl                                               ; +0x48, 0x9e5d84\nADD             R2, R4, #0x40 ; '@'                                    ; +0x4c, 0x9e5d88\nADD             R1, R5, #0x40 ; '@'                                    ; +0x50, 0x9e5d8c\nCMP             R0, #0                                                 ; +0x54, 0x9e5d90\nMOV             R0, #0xC                                               ; +0x58, 0x9e5d94\nBEQ             loc_9E5E00                                             ; +0x5c, 0x9e5d98\nBL              CRYPTO_dup_ex_data                                     ; +0x60, 0x9e5d9c\nMOV             R1, R5                                                 ; +0x64, 0x9e5da0\nCMP             R0, #0                                                 ; +0x68, 0x9e5da4\nMOV             R0, R6                                                 ; +0x6c, 0x9e5da8\nBEQ             loc_9E5E00                                             ; +0x70, 0x9e5dac\nCMP             R9, #0                                                 ; +0x74, 0x9e5db0\nMOVEQ           R9, R5                                                 ; +0x78, 0x9e5db4\nBEQ             loc_9E5DC0                                             ; +0x7c, 0x9e5db8\nBL              BIO_push                                               ; +0x80, 0x9e5dbc\nLDR             R4, [R4,#0x24]                                         ; +0x84, 0x9e5dc0\nMOV             R6, R5                                                 ; +0x88, 0x9e5dc4\nCMP             R4, #0                                                 ; +0x8c, 0x9e5dc8\nBEQ             loc_9E5E10                                             ; +0x90, 0x9e5dcc\nLDR             R0, [R4]                                               ; +0x94, 0x9e5dd0\nBL              BIO_new                                                ; +0x98, 0x9e5dd4\nMOV             R1, #0xC                                               ; +0x9c, 0x9e5dd8\nMOV             R2, #0                                                 ; +0xa0, 0x9e5ddc\nSUBS            R5, R0, #0                                             ; +0xa4, 0x9e5de0\nMOV             R3, R5                                                 ; +0xa8, 0x9e5de4\nMOV             R0, R4                                                 ; +0xac, 0x9e5de8\nBNE             loc_9E5D54                                             ; +0xb0, 0x9e5dec\nMOV             R0, R9                                                 ; +0xb4, 0x9e5df0\nBL              BIO_free_all                                           ; +0xb8, 0x9e5df4\nMOV             R0, #0                                                 ; +0xbc, 0x9e5df8\nPOP             {R3-R11,PC}                                            ; +0xc0, 0x9e5dfc\nMOV             R0, R5                                                 ; +0xc4, 0x9e5e00\nBL              BIO_free                                               ; +0xc8, 0x9e5e04\nB               loc_9E5DF0                                             ; +0xcc, 0x9e5e08\nMOV             R9, R4                                                 ; +0xd0, 0x9e5e0c\nMOV             R0, R9                                                 ; +0xd4, 0x9e5e10\nPOP             {R3-R11,PC}                                            ; +0xd8, 0x9e5e14", "xrefs": ["<???> @ 0x7921c"], "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"}