{"type": "func", "start": 8397696, "end": 8397844, "name": "EVP_CIPHER_CTX_reset", "pseudocode": "// \n// EVP_CIPHER_CTX_reset from 0x802380 to 0x802414 (148 bytes)\n// \n// 14 xrefs:\n// > ssl3_change_cipher_state @ 0x7b8254\n// > ssl3_change_cipher_state @ 0x7b82f4\n// > ssl3_change_cipher_state @ 0x7b8314\n// > tls1_change_cipher_state @ 0x7ba570\n// > tls1_change_cipher_state @ 0x7ba68c\n// > EVP_CIPHER_CTX_free @ 0x802438\n// > EVP_CipherInit_ex @ 0x802f78\n// > EVP_CipherInit @ 0x803374\n// > EVP_CIPHER_CTX_copy @ 0x80352c\n// > CMS_RecipientInfo_kari_decrypt @ 0x874940\n// > CMS_RecipientInfo_kari_decrypt @ 0x8749d4\n// > cms_RecipientInfo_kari_encrypt @ 0x874dac\n// > cms_RecipientInfo_kari_encrypt @ 0x874e58\n// > <???> @ 0x5dd0c\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 EVP_CIPHER_CTX_reset(int *a1)\n{\n  int (*v2)(void); // r3\n  int result; // r0\n  _BYTE *v4; // r0\n  unsigned int v5; // r1\n\n  if ( !a1 )\n    return 1;\n  if ( !*a1 )\n    goto LABEL_10;\n  v2 = *(int (**)(void))(*a1 + 28);\n  if ( !v2 || (result = v2()) != 0 )\n  {\n    v4 = (_BYTE *)a1[24];\n    if ( !v4 )\n      goto LABEL_7;\n    v5 = *(_DWORD *)(*a1 + 32);\n    if ( !v5 )\n      goto LABEL_7;\n    OPENSSL_cleanse(v4, v5);\nLABEL_10:\n    v4 = (_BYTE *)a1[24];\nLABEL_7:\n    CRYPTO_free(v4, \"crypto/evp/evp_enc.c\", 31);\n    ENGINE_finish(a1[1]);\n    memset(a1, 0, 0x8Cu);\n    return 1;\n  }\n  return result;\n}", "assembly": "; \n; EVP_CIPHER_CTX_reset from 0x802380 to 0x802414 (148 bytes)\n; \n; 14 xrefs:\n; > ssl3_change_cipher_state @ 0x7b8254\n; > ssl3_change_cipher_state @ 0x7b82f4\n; > ssl3_change_cipher_state @ 0x7b8314\n; > tls1_change_cipher_state @ 0x7ba570\n; > tls1_change_cipher_state @ 0x7ba68c\n; > EVP_CIPHER_CTX_free @ 0x802438\n; > EVP_CipherInit_ex @ 0x802f78\n; > EVP_CipherInit @ 0x803374\n; > EVP_CIPHER_CTX_copy @ 0x80352c\n; > CMS_RecipientInfo_kari_decrypt @ 0x874940\n; > CMS_RecipientInfo_kari_decrypt @ 0x8749d4\n; > cms_RecipientInfo_kari_encrypt @ 0x874dac\n; > cms_RecipientInfo_kari_encrypt @ 0x874e58\n; > <???> @ 0x5dd0c\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,LR}                                                ; +0x0, 0x802380\nSUBS            R4, R0, #0                                             ; +0x4, 0x802384\nBEQ             loc_80240C                                             ; +0x8, 0x802388\nLDR             R3, [R4]                                               ; +0xc, 0x80238c\nCMP             R3, #0                                                 ; +0x10, 0x802390\nBEQ             loc_802404                                             ; +0x14, 0x802394\nLDR             R3, [R3,#0x1C]                                         ; +0x18, 0x802398\nCMP             R3, #0                                                 ; +0x1c, 0x80239c\nBEQ             loc_8023B0                                             ; +0x20, 0x8023a0\nBLX             R3                                                     ; +0x24, 0x8023a4\nCMP             R0, #0                                                 ; +0x28, 0x8023a8\nBEQ             locret_8023FC                                          ; +0x2c, 0x8023ac\nLDR             R0, [R4,#0x60]                                         ; +0x30, 0x8023b0\nCMP             R0, #0                                                 ; +0x34, 0x8023b4\nBEQ             loc_8023CC                                             ; +0x38, 0x8023b8\nLDR             R3, [R4]                                               ; +0x3c, 0x8023bc\nLDR             R1, [R3,#0x20]                                         ; +0x40, 0x8023c0\nCMP             R1, #0                                                 ; +0x44, 0x8023c4\nBNE             loc_802400                                             ; +0x48, 0x8023c8\nLDR             R1, =(aCryptoEvpEvpEn - 0x8023DC); \"crypto/evp/evp_enc.c\" ; +0x4c, 0x8023cc\nMOV             R2, #0x1F                                              ; +0x50, 0x8023d0\nADD             R1, PC, R1; \"crypto/evp/evp_enc.c\"                     ; +0x54, 0x8023d4\nBL              CRYPTO_free                                            ; +0x58, 0x8023d8\nLDR             R0, [R4,#4]                                            ; +0x5c, 0x8023dc\nBL              ENGINE_finish                                          ; +0x60, 0x8023e0\nMOV             R0, R4; void *                                         ; +0x64, 0x8023e4\nMOV             R1, #0; int                                            ; +0x68, 0x8023e8\nMOV             R2, #0x8C; size_t                                      ; +0x6c, 0x8023ec\nBL              memset                                                 ; +0x70, 0x8023f0\nMOV             R0, #1                                                 ; +0x74, 0x8023f4\nPOP             {R4,PC}                                                ; +0x78, 0x8023f8\nPOP             {R4,PC}                                                ; +0x7c, 0x8023fc\nBL              OPENSSL_cleanse                                        ; +0x80, 0x802400\nLDR             R0, [R4,#0x60]                                         ; +0x84, 0x802404\nB               loc_8023CC                                             ; +0x88, 0x802408\nMOV             R0, #1                                                 ; +0x8c, 0x80240c\nPOP             {R4,PC}                                                ; +0x90, 0x802410", "xrefs": ["ssl3_change_cipher_state @ 0x7b8254", "ssl3_change_cipher_state @ 0x7b82f4", "ssl3_change_cipher_state @ 0x7b8314", "tls1_change_cipher_state @ 0x7ba570", "tls1_change_cipher_state @ 0x7ba68c", "EVP_CIPHER_CTX_free @ 0x802438", "EVP_CipherInit_ex @ 0x802f78", "EVP_CipherInit @ 0x803374", "EVP_CIPHER_CTX_copy @ 0x80352c", "CMS_RecipientInfo_kari_decrypt @ 0x874940", "CMS_RecipientInfo_kari_decrypt @ 0x8749d4", "cms_RecipientInfo_kari_encrypt @ 0x874dac", "cms_RecipientInfo_kari_encrypt @ 0x874e58", "<???> @ 0x5dd0c"], "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"}