{"type": "func", "start": 8195032, "end": 8195308, "name": "BIO_gets", "pseudocode": "// \n// BIO_gets from 0x7d0bd8 to 0x7d0cec (276 bytes)\n// \n// 18 xrefs:\n// > OBJ_create_objects @ 0x81d038\n// > PEM_read_bio @ 0x822664\n// > PEM_read_bio @ 0x8227b4\n// > PEM_read_bio @ 0x822914\n// > PEM_read_bio @ 0x8229ec\n// > TXT_DB_read @ 0x839090\n// > TXT_DB_read @ 0x839194\n// > a2i_ASN1_INTEGER @ 0x866d28\n// > a2i_ASN1_INTEGER @ 0x866ec0\n// > a2i_ASN1_STRING @ 0x86719c\n// > a2i_ASN1_STRING @ 0x867300\n// > sub_8791C0 @ 0x879378\n// > OCSP_REQ_CTX_nbio @ 0x8b9528\n// > sub_8C4CA8 @ 0x8c4d14\n// > sub_8C4EEC @ 0x8c4f38\n// > SMIME_crlf_copy @ 0x8c5ec0\n// > sub_8D59A8 @ 0x8d59cc\n// > <???> @ 0x5f74c\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_gets(_DWORD *a1, int a2, int a3)\n{\n  int (*v4)(void); // r3\n  int (__fastcall *v5)(_DWORD *, int); // r5\n  int result; // r0\n  int v9; // r0\n\n  if ( !a1 || !*a1 || (v4 = *(int (**)(void))(*a1 + 20)) == nullptr )\n  {\n    ERR_put_error(32, 104, 121, \"crypto/bio/bio_lib.c\", 276);\n    return -2;\n  }\n  v5 = (int (__fastcall *)(_DWORD *, int))a1[1];\n  if ( !v5 )\n  {\n    if ( a1[3] )\n      return v4();\n    goto LABEL_11;\n  }\n  result = v5(a1, 5);\n  if ( result <= 0 )\n    return result;\n  if ( !a1[3] )\n  {\nLABEL_11:\n    ERR_put_error(32, 104, 120, \"crypto/bio/bio_lib.c\", 286);\n    return -2;\n  }\n  v9 = (*(int (__fastcall **)(_DWORD *, int, int))(*a1 + 20))(a1, a2, a3);\n  return ((int (__fastcall *)(_DWORD *, int, int, int, _DWORD, int))v5)(a1, 133, a2, a3, 0, v9);\n}", "assembly": "; \n; BIO_gets from 0x7d0bd8 to 0x7d0cec (276 bytes)\n; \n; 18 xrefs:\n; > OBJ_create_objects @ 0x81d038\n; > PEM_read_bio @ 0x822664\n; > PEM_read_bio @ 0x8227b4\n; > PEM_read_bio @ 0x822914\n; > PEM_read_bio @ 0x8229ec\n; > TXT_DB_read @ 0x839090\n; > TXT_DB_read @ 0x839194\n; > a2i_ASN1_INTEGER @ 0x866d28\n; > a2i_ASN1_INTEGER @ 0x866ec0\n; > a2i_ASN1_STRING @ 0x86719c\n; > a2i_ASN1_STRING @ 0x867300\n; > sub_8791C0 @ 0x879378\n; > OCSP_REQ_CTX_nbio @ 0x8b9528\n; > sub_8C4CA8 @ 0x8c4d14\n; > sub_8C4EEC @ 0x8c4f38\n; > SMIME_crlf_copy @ 0x8c5ec0\n; > sub_8D59A8 @ 0x8d59cc\n; > <???> @ 0x5f74c\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-R8,LR}                                             ; +0x0, 0x7d0bd8\nSUBS            R4, R0, #0                                             ; +0x4, 0x7d0bdc\nSUB             SP, SP, #8                                             ; +0x8, 0x7d0be0\nBEQ             loc_7D0CC4                                             ; +0xc, 0x7d0be4\nLDR             R12, [R4]                                              ; +0x10, 0x7d0be8\nCMP             R12, #0                                                ; +0x14, 0x7d0bec\nBEQ             loc_7D0CC4                                             ; +0x18, 0x7d0bf0\nLDR             R3, [R12,#0x14]                                        ; +0x1c, 0x7d0bf4\nCMP             R3, #0                                                 ; +0x20, 0x7d0bf8\nBEQ             loc_7D0CC4                                             ; +0x24, 0x7d0bfc\nLDR             R5, [R4,#4]                                            ; +0x28, 0x7d0c00\nCMP             R5, #0                                                 ; +0x2c, 0x7d0c04\nBEQ             loc_7D0C84                                             ; +0x30, 0x7d0c08\nMOV             R6, R1                                                 ; +0x34, 0x7d0c0c\nMOV             R7, R2                                                 ; +0x38, 0x7d0c10\nMOV             R3, #1                                                 ; +0x3c, 0x7d0c14\nMOV             R8, #0                                                 ; +0x40, 0x7d0c18\nSTR             R3, [SP,#8+var_4]                                      ; +0x44, 0x7d0c1c\nSTR             R8, [SP,#8+var_8]                                      ; +0x48, 0x7d0c20\nMOV             R1, #5                                                 ; +0x4c, 0x7d0c24\nMOV             R2, R6                                                 ; +0x50, 0x7d0c28\nMOV             R3, R7                                                 ; +0x54, 0x7d0c2c\nBLX             R5                                                     ; +0x58, 0x7d0c30\nCMP             R0, #0                                                 ; +0x5c, 0x7d0c34\nBLE             loc_7D0C7C                                             ; +0x60, 0x7d0c38\nLDR             R3, [R4,#0xC]                                          ; +0x64, 0x7d0c3c\nCMP             R3, #0                                                 ; +0x68, 0x7d0c40\nBEQ             loc_7D0C9C                                             ; +0x6c, 0x7d0c44\nLDR             R3, [R4]                                               ; +0x70, 0x7d0c48\nMOV             R1, R6                                                 ; +0x74, 0x7d0c4c\nLDR             R3, [R3,#0x14]                                         ; +0x78, 0x7d0c50\nMOV             R2, R7                                                 ; +0x7c, 0x7d0c54\nMOV             R0, R4                                                 ; +0x80, 0x7d0c58\nBLX             R3                                                     ; +0x84, 0x7d0c5c\nSTR             R8, [SP,#8+var_8]                                      ; +0x88, 0x7d0c60\nMOV             R2, R6                                                 ; +0x8c, 0x7d0c64\nMOV             R3, R7                                                 ; +0x90, 0x7d0c68\nMOV             R1, #0x85                                              ; +0x94, 0x7d0c6c\nSTR             R0, [SP,#8+var_4]                                      ; +0x98, 0x7d0c70\nMOV             R0, R4                                                 ; +0x9c, 0x7d0c74\nBLX             R5                                                     ; +0xa0, 0x7d0c78\nADD             SP, SP, #8                                             ; +0xa4, 0x7d0c7c\nPOP             {R4-R8,PC}                                             ; +0xa8, 0x7d0c80\nLDR             R12, [R4,#0xC]                                         ; +0xac, 0x7d0c84\nCMP             R12, #0                                                ; +0xb0, 0x7d0c88\nBEQ             loc_7D0C9C                                             ; +0xb4, 0x7d0c8c\nADD             SP, SP, #8                                             ; +0xb8, 0x7d0c90\nPOP             {R4-R8,LR}                                             ; +0xbc, 0x7d0c94\nBX              R3                                                     ; +0xc0, 0x7d0c98\nLDR             R3, =0x11E                                             ; +0xc4, 0x7d0c9c\nSTR             R3, [SP,#8+var_8]                                      ; +0xc8, 0x7d0ca0\nLDR             R3, =(aCryptoBioBioLi - 0x7D0CBC); \"crypto/bio/bio_lib.c\" ; +0xcc, 0x7d0ca4\nMOV             R0, #0x20 ; ' '                                        ; +0xd0, 0x7d0ca8\nMOV             R1, #0x68 ; 'h'                                        ; +0xd4, 0x7d0cac\nMOV             R2, #0x78 ; 'x'                                        ; +0xd8, 0x7d0cb0\nADD             R3, PC, R3; \"crypto/bio/bio_lib.c\"                     ; +0xdc, 0x7d0cb4\nBL              ERR_put_error                                          ; +0xe0, 0x7d0cb8\nMOV             R0, #0xFFFFFFFE                                        ; +0xe4, 0x7d0cbc\nB               loc_7D0C7C                                             ; +0xe8, 0x7d0cc0\nMOV             R3, #0x114                                             ; +0xec, 0x7d0cc4\nSTR             R3, [SP,#8+var_8]                                      ; +0xf0, 0x7d0cc8\nLDR             R3, =(aCryptoBioBioLi - 0x7D0CE4); \"crypto/bio/bio_lib.c\" ; +0xf4, 0x7d0ccc\nMOV             R0, #0x20 ; ' '                                        ; +0xf8, 0x7d0cd0\nMOV             R1, #0x68 ; 'h'                                        ; +0xfc, 0x7d0cd4\nMOV             R2, #0x79 ; 'y'                                        ; +0x100, 0x7d0cd8\nADD             R3, PC, R3; \"crypto/bio/bio_lib.c\"                     ; +0x104, 0x7d0cdc\nBL              ERR_put_error                                          ; +0x108, 0x7d0ce0\nMOV             R0, #0xFFFFFFFE                                        ; +0x10c, 0x7d0ce4\nB               loc_7D0C7C                                             ; +0x110, 0x7d0ce8", "xrefs": ["OBJ_create_objects @ 0x81d038", "PEM_read_bio @ 0x822664", "PEM_read_bio @ 0x8227b4", "PEM_read_bio @ 0x822914", "PEM_read_bio @ 0x8229ec", "TXT_DB_read @ 0x839090", "TXT_DB_read @ 0x839194", "a2i_ASN1_INTEGER @ 0x866d28", "a2i_ASN1_INTEGER @ 0x866ec0", "a2i_ASN1_STRING @ 0x86719c", "a2i_ASN1_STRING @ 0x867300", "sub_8791C0 @ 0x879378", "OCSP_REQ_CTX_nbio @ 0x8b9528", "sub_8C4CA8 @ 0x8c4d14", "sub_8C4EEC @ 0x8c4f38", "SMIME_crlf_copy @ 0x8c5ec0", "sub_8D59A8 @ 0x8d59cc", "<???> @ 0x5f74c"], "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"}