{"type": "func", "start": 8194160, "end": 8194444, "name": "BIO_read", "pseudocode": "// \n// BIO_read from 0x7d0870 to 0x7d098c (284 bytes)\n// \n// 20 xrefs:\n// > ssl3_read_n @ 0x7887ac\n// > DTLSv1_listen @ 0x7b6698\n// > DTLSv1_listen @ 0x7b6734\n// > DTLSv1_listen @ 0x7b69dc\n// > sub_7D0120 @ 0x7d0214\n// > sub_7D0270 @ 0x7d0328\n// > sub_7D0270 @ 0x7d036c\n// > sub_858480 @ 0x8588e0\n// > ASN1_d2i_bio @ 0x8600e0\n// > ASN1_d2i_bio @ 0x8601ec\n// > ASN1_item_d2i_bio @ 0x860584\n// > ASN1_item_d2i_bio @ 0x860690\n// > sub_8B4BBC @ 0x8b4de8\n// > sub_8B565C @ 0x8b56a0\n// > OCSP_REQ_CTX_nbio @ 0x8b9394\n// > SMIME_crlf_copy @ 0x8c5f40\n// > SMIME_text @ 0x8c6ad8\n// > sub_8D1D58 @ 0x8d1ea0\n// > sub_8D59D0 @ 0x8d59f4\n// > <???> @ 0x5a8ec\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 BIO_read(int a1, int a2, int a3)\n{\n  int (__fastcall *v4)(int, int); // r5\n  int result; // r0\n\n  if ( a1 && *(_DWORD *)a1 && *(_DWORD *)(*(_DWORD *)a1 + 12) )\n  {\n    v4 = *(int (__fastcall **)(int, int))(a1 + 4);\n    if ( !v4 || (result = v4(a1, 2), result > 0) )\n    {\n      if ( *(_DWORD *)(a1 + 12) )\n      {\n        result = (*(int (__fastcall **)(int, int, int))(*(_DWORD *)a1 + 12))(a1, a2, a3);\n        if ( result > 0 )\n          *(_QWORD *)(a1 + 48) += result;\n        if ( v4 )\n          return ((int (__fastcall *)(int, int, int, int, _DWORD, int))v4)(a1, 130, a2, a3, 0, result);\n      }\n      else\n      {\n        ERR_put_error(32, 111, 120, \"crypto/bio/bio_lib.c\", 193);\n        return -2;\n      }\n    }\n  }\n  else\n  {\n    ERR_put_error(32, 111, 121, \"crypto/bio/bio_lib.c\", 183);\n    return -2;\n  }\n  return result;\n}", "assembly": "; \n; BIO_read from 0x7d0870 to 0x7d098c (284 bytes)\n; \n; 20 xrefs:\n; > ssl3_read_n @ 0x7887ac\n; > DTLSv1_listen @ 0x7b6698\n; > DTLSv1_listen @ 0x7b6734\n; > DTLSv1_listen @ 0x7b69dc\n; > sub_7D0120 @ 0x7d0214\n; > sub_7D0270 @ 0x7d0328\n; > sub_7D0270 @ 0x7d036c\n; > sub_858480 @ 0x8588e0\n; > ASN1_d2i_bio @ 0x8600e0\n; > ASN1_d2i_bio @ 0x8601ec\n; > ASN1_item_d2i_bio @ 0x860584\n; > ASN1_item_d2i_bio @ 0x860690\n; > sub_8B4BBC @ 0x8b4de8\n; > sub_8B565C @ 0x8b56a0\n; > OCSP_REQ_CTX_nbio @ 0x8b9394\n; > SMIME_crlf_copy @ 0x8c5f40\n; > SMIME_text @ 0x8c6ad8\n; > sub_8D1D58 @ 0x8d1ea0\n; > sub_8D59D0 @ 0x8d59f4\n; > <???> @ 0x5a8ec\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-R9,LR}                                             ; +0x0, 0x7d0870\nSUBS            R4, R0, #0                                             ; +0x4, 0x7d0874\nSUB             SP, SP, #0xC                                           ; +0x8, 0x7d0878\nBEQ             loc_7D0964                                             ; +0xc, 0x7d087c\nLDR             R3, [R4]                                               ; +0x10, 0x7d0880\nCMP             R3, #0                                                 ; +0x14, 0x7d0884\nBEQ             loc_7D0964                                             ; +0x18, 0x7d0888\nLDR             R3, [R3,#0xC]                                          ; +0x1c, 0x7d088c\nCMP             R3, #0                                                 ; +0x20, 0x7d0890\nBEQ             loc_7D0964                                             ; +0x24, 0x7d0894\nLDR             R5, [R4,#4]                                            ; +0x28, 0x7d0898\nMOV             R9, R1                                                 ; +0x2c, 0x7d089c\nCMP             R5, #0                                                 ; +0x30, 0x7d08a0\nMOV             R8, R2                                                 ; +0x34, 0x7d08a4\nBEQ             loc_7D08D0                                             ; +0x38, 0x7d08a8\nMOV             R2, #0                                                 ; +0x3c, 0x7d08ac\nMOV             R3, #1                                                 ; +0x40, 0x7d08b0\nSTMEA           SP, {R2,R3}                                            ; +0x44, 0x7d08b4\nMOV             R1, #2                                                 ; +0x48, 0x7d08b8\nMOV             R2, R9                                                 ; +0x4c, 0x7d08bc\nMOV             R3, R8                                                 ; +0x50, 0x7d08c0\nBLX             R5                                                     ; +0x54, 0x7d08c4\nCMP             R0, #0                                                 ; +0x58, 0x7d08c8\nBLE             loc_7D0934                                             ; +0x5c, 0x7d08cc\nLDR             R3, [R4,#0xC]                                          ; +0x60, 0x7d08d0\nCMP             R3, #0                                                 ; +0x64, 0x7d08d4\nBEQ             loc_7D093C                                             ; +0x68, 0x7d08d8\nLDR             R3, [R4]                                               ; +0x6c, 0x7d08dc\nMOV             R0, R4                                                 ; +0x70, 0x7d08e0\nLDR             R3, [R3,#0xC]                                          ; +0x74, 0x7d08e4\nMOV             R1, R9                                                 ; +0x78, 0x7d08e8\nMOV             R2, R8                                                 ; +0x7c, 0x7d08ec\nBLX             R3                                                     ; +0x80, 0x7d08f0\nCMP             R0, #0                                                 ; +0x84, 0x7d08f4\nBLE             loc_7D090C                                             ; +0x88, 0x7d08f8\nLDRD            R6, R7, [R4,#0x30]                                     ; +0x8c, 0x7d08fc\nADDS            R6, R6, R0                                             ; +0x90, 0x7d0900\nADC             R7, R7, R0,ASR#31                                      ; +0x94, 0x7d0904\nSTRD            R6, R7, [R4,#0x30]                                     ; +0x98, 0x7d0908\nCMP             R5, #0                                                 ; +0x9c, 0x7d090c\nBEQ             loc_7D0934                                             ; +0xa0, 0x7d0910\nMOV             R1, #0                                                 ; +0xa4, 0x7d0914\nSTR             R0, [SP,#0xC+var_8]                                    ; +0xa8, 0x7d0918\nSTR             R1, [SP,#0xC+var_C]                                    ; +0xac, 0x7d091c\nMOV             R0, R4                                                 ; +0xb0, 0x7d0920\nMOV             R2, R9                                                 ; +0xb4, 0x7d0924\nMOV             R3, R8                                                 ; +0xb8, 0x7d0928\nMOV             R1, #0x82                                              ; +0xbc, 0x7d092c\nBLX             R5                                                     ; +0xc0, 0x7d0930\nADD             SP, SP, #0xC                                           ; +0xc4, 0x7d0934\nPOP             {R4-R9,PC}                                             ; +0xc8, 0x7d0938\nMOV             R3, #0xC1                                              ; +0xcc, 0x7d093c\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xd0, 0x7d0940\nLDR             R3, =(aCryptoBioBioLi - 0x7D095C); \"crypto/bio/bio_lib.c\" ; +0xd4, 0x7d0944\nMOV             R0, #0x20 ; ' '                                        ; +0xd8, 0x7d0948\nMOV             R1, #0x6F ; 'o'                                        ; +0xdc, 0x7d094c\nMOV             R2, #0x78 ; 'x'                                        ; +0xe0, 0x7d0950\nADD             R3, PC, R3; \"crypto/bio/bio_lib.c\"                     ; +0xe4, 0x7d0954\nBL              ERR_put_error                                          ; +0xe8, 0x7d0958\nMOV             R0, #0xFFFFFFFE                                        ; +0xec, 0x7d095c\nB               loc_7D0934                                             ; +0xf0, 0x7d0960\nMOV             R3, #0xB7                                              ; +0xf4, 0x7d0964\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xf8, 0x7d0968\nLDR             R3, =(aCryptoBioBioLi - 0x7D0984); \"crypto/bio/bio_lib.c\" ; +0xfc, 0x7d096c\nMOV             R0, #0x20 ; ' '                                        ; +0x100, 0x7d0970\nMOV             R1, #0x6F ; 'o'                                        ; +0x104, 0x7d0974\nMOV             R2, #0x79 ; 'y'                                        ; +0x108, 0x7d0978\nADD             R3, PC, R3; \"crypto/bio/bio_lib.c\"                     ; +0x10c, 0x7d097c\nBL              ERR_put_error                                          ; +0x110, 0x7d0980\nMOV             R0, #0xFFFFFFFE                                        ; +0x114, 0x7d0984\nB               loc_7D0934                                             ; +0x118, 0x7d0988", "xrefs": ["ssl3_read_n @ 0x7887ac", "DTLSv1_listen @ 0x7b6698", "DTLSv1_listen @ 0x7b6734", "DTLSv1_listen @ 0x7b69dc", "sub_7D0120 @ 0x7d0214", "sub_7D0270 @ 0x7d0328", "sub_7D0270 @ 0x7d036c", "sub_858480 @ 0x8588e0", "ASN1_d2i_bio @ 0x8600e0", "ASN1_d2i_bio @ 0x8601ec", "ASN1_item_d2i_bio @ 0x860584", "ASN1_item_d2i_bio @ 0x860690", "sub_8B4BBC @ 0x8b4de8", "sub_8B565C @ 0x8b56a0", "OCSP_REQ_CTX_nbio @ 0x8b9394", "SMIME_crlf_copy @ 0x8c5f40", "SMIME_text @ 0x8c6ad8", "sub_8D1D58 @ 0x8d1ea0", "sub_8D59D0 @ 0x8d59f4", "<???> @ 0x5a8ec"], "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"}