{"type": "func", "start": 15080360, "end": 15080908, "name": "EVP_PBE_CipherInit", "pseudocode": "// \n// EVP_PBE_CipherInit from 0xe61ba8 to 0xe61dcc (548 bytes)\n// \n// 3 xrefs:\n// > cms_RecipientInfo_pwri_crypt @ 0xe20e14\n// > PKCS12_pbe_crypt @ 0xe65c88\n// > <???> @ 0x46698\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\n__int64 __fastcall EVP_PBE_CipherInit(\n        __int64 a1,\n        const char *a2,\n        unsigned int a3,\n        __int64 a4,\n        __int64 a5,\n        unsigned int a6)\n{\n  int v12; // w0\n  unsigned int v13; // w0\n  char *v14; // x0\n  __int64 cipherbyname; // x22\n  unsigned int v16; // w0\n  char *v17; // x0\n  __int64 digestbyname; // x5\n  unsigned int v19; // w19\n  unsigned int v21; // [xsp+50h] [xbp+50h] BYREF\n  unsigned int v22; // [xsp+54h] [xbp+54h] BYREF\n  unsigned int (__fastcall *v23)(__int64, const char *, _QWORD, __int64, __int64, __int64, _QWORD); // [xsp+58h] [xbp+58h] BYREF\n  char v24[80]; // [xsp+60h] [xbp+60h] BYREF\n\n  v12 = OBJ_obj2nid(a1);\n  if ( !(unsigned int)EVP_PBE_find(0, v12, &v21, &v22, &v23) )\n  {\n    ERR_put_error(6, 116, 121, (__int64)\"crypto/evp/evp_pbe.c\", 91);\n    if ( a1 )\n      i2t_ASN1_OBJECT((__int64)v24, 80, a1);\n    else\n      OPENSSL_strlcpy(v24, \"NULL\", 0x50u);\n    ERR_add_error_data(2, \"TYPE=\", v24);\n    return 0;\n  }\n  if ( a2 )\n  {\n    if ( a3 != -1 )\n    {\n      v13 = v21;\n      if ( v21 != -1 )\n        goto LABEL_5;\nLABEL_11:\n      v16 = v22;\n      cipherbyname = 0;\n      if ( v22 != -1 )\n        goto LABEL_7;\n      goto LABEL_12;\n    }\n    a3 = strlen(a2);\n    v13 = v21;\n    if ( v21 == -1 )\n      goto LABEL_11;\n  }\n  else\n  {\n    v13 = v21;\n    a3 = 0;\n    if ( v21 == -1 )\n      goto LABEL_11;\n  }\nLABEL_5:\n  v14 = OBJ_nid2sn(v13);\n  cipherbyname = EVP_get_cipherbyname((__int64)v14);\n  if ( !cipherbyname )\n  {\n    v19 = 0;\n    ERR_put_error(6, 116, 160, (__int64)\"crypto/evp/evp_pbe.c\", 110);\n    return v19;\n  }\n  v16 = v22;\n  if ( v22 != -1 )\n  {\nLABEL_7:\n    v17 = OBJ_nid2sn(v16);\n    digestbyname = EVP_get_digestbyname((__int64)v17);\n    if ( !digestbyname )\n    {\n      v19 = 0;\n      ERR_put_error(6, 116, 161, (__int64)\"crypto/evp/evp_pbe.c\", 120);\n      return v19;\n    }\n    goto LABEL_8;\n  }\nLABEL_12:\n  digestbyname = 0;\nLABEL_8:\n  if ( v23(a5, a2, a3, a4, cipherbyname, digestbyname, a6) )\n    return 1;\n  ERR_put_error(6, 116, 120, (__int64)\"crypto/evp/evp_pbe.c\", 126);\n  return 0;\n}", "assembly": "; \n; EVP_PBE_CipherInit from 0xe61ba8 to 0xe61dcc (548 bytes)\n; \n; 3 xrefs:\n; > cms_RecipientInfo_pwri_crypt @ 0xe20e14\n; > PKCS12_pbe_crypt @ 0xe65c88\n; > <???> @ 0x46698\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\nSTP             X29, X30, [SP,#var_B0]!                                ; +0x0, 0xe61ba8\nMOV             X29, SP                                                ; +0x4, 0xe61bac\nSTP             X19, X20, [SP,#0xB0+var_A0]                            ; +0x8, 0xe61bb0\nSTP             X21, X22, [SP,#0xB0+var_90]                            ; +0xc, 0xe61bb4\nSTP             X23, X24, [SP,#0xB0+var_80]                            ; +0x10, 0xe61bb8\nSTR             X25, [SP,#0xB0+var_70]                                 ; +0x14, 0xe61bbc\nMOV             X20, X1                                                ; +0x18, 0xe61bc0\nMOV             W21, W2                                                ; +0x1c, 0xe61bc4\nMOV             X24, X3                                                ; +0x20, 0xe61bc8\nMOV             X25, X4                                                ; +0x24, 0xe61bcc\nMOV             W23, W5                                                ; +0x28, 0xe61bd0\nMOV             X22, X0                                                ; +0x2c, 0xe61bd4\nBL              OBJ_obj2nid                                            ; +0x30, 0xe61bd8\nADD             X2, X29, #0xB0+var_60                                  ; +0x34, 0xe61bdc\nMOV             W1, W0                                                 ; +0x38, 0xe61be0\nADD             X3, X29, #0xB0+var_5C                                  ; +0x3c, 0xe61be4\nMOV             W0, #0                                                 ; +0x40, 0xe61be8\nADD             X4, X29, #0xB0+var_58                                  ; +0x44, 0xe61bec\nBL              EVP_PBE_find                                           ; +0x48, 0xe61bf0\nMOV             W19, W0                                                ; +0x4c, 0xe61bf4\nCBZ             W0, loc_E61CA0                                         ; +0x50, 0xe61bf8\nCBZ             X20, loc_E61D58                                        ; +0x54, 0xe61bfc\nCMN             W21, #1                                                ; +0x58, 0xe61c00\nB.EQ            loc_E61D3C                                             ; +0x5c, 0xe61c04\nLDR             W0, [X29,#0xB0+var_60]                                 ; +0x60, 0xe61c08\nCMN             W0, #1                                                 ; +0x64, 0xe61c0c\nB.EQ            loc_E61C88                                             ; +0x68, 0xe61c10\nBL              OBJ_nid2sn                                             ; +0x6c, 0xe61c14\nBL              EVP_get_cipherbyname                                   ; +0x70, 0xe61c18\nMOV             X22, X0                                                ; +0x74, 0xe61c1c\nCBZ             X0, loc_E61DA8                                         ; +0x78, 0xe61c20\nLDR             W0, [X29,#0xB0+var_5C]                                 ; +0x7c, 0xe61c24\nCMN             W0, #1                                                 ; +0x80, 0xe61c28\nB.EQ            loc_E61C98                                             ; +0x84, 0xe61c2c\nBL              OBJ_nid2sn                                             ; +0x88, 0xe61c30\nBL              EVP_get_digestbyname                                   ; +0x8c, 0xe61c34\nMOV             X5, X0                                                 ; +0x90, 0xe61c38\nCBZ             X0, loc_E61D84                                         ; +0x94, 0xe61c3c\nLDR             X7, [X29,#0xB0+var_58]                                 ; +0x98, 0xe61c40\nMOV             X0, X25                                                ; +0x9c, 0xe61c44\nMOV             X1, X20                                                ; +0xa0, 0xe61c48\nMOV             W2, W21                                                ; +0xa4, 0xe61c4c\nMOV             X3, X24                                                ; +0xa8, 0xe61c50\nMOV             X4, X22                                                ; +0xac, 0xe61c54\nMOV             W6, W23                                                ; +0xb0, 0xe61c58\nBLR             X7                                                     ; +0xb4, 0xe61c5c\nMOV             W19, W0                                                ; +0xb8, 0xe61c60\nCBZ             W0, loc_E61D04                                         ; +0xbc, 0xe61c64\nMOV             W19, #1                                                ; +0xc0, 0xe61c68\nMOV             W0, W19                                                ; +0xc4, 0xe61c6c\nLDR             X25, [SP,#0xB0+var_70]                                 ; +0xc8, 0xe61c70\nLDP             X19, X20, [SP,#0xB0+var_A0]                            ; +0xcc, 0xe61c74\nLDP             X21, X22, [SP,#0xB0+var_90]                            ; +0xd0, 0xe61c78\nLDP             X23, X24, [SP,#0xB0+var_80]                            ; +0xd4, 0xe61c7c\nLDP             X29, X30, [SP+0xB0+var_B0],#0xB0                       ; +0xd8, 0xe61c80\nRET                                                                    ; +0xdc, 0xe61c84\nLDR             W0, [X29,#0xB0+var_5C]                                 ; +0xe0, 0xe61c88\nMOV             X22, #0                                                ; +0xe4, 0xe61c8c\nCMN             W0, #1                                                 ; +0xe8, 0xe61c90\nB.NE            loc_E61C30                                             ; +0xec, 0xe61c94\nMOV             X5, #0                                                 ; +0xf0, 0xe61c98\nB               loc_E61C40                                             ; +0xf4, 0xe61c9c\nADRP            X3, #aCryptoEvpEvpPb@PAGE; \"crypto/evp/evp_pbe.c\"      ; +0xf8, 0xe61ca0\nMOV             W0, #6                                                 ; +0xfc, 0xe61ca4\nMOV             W1, #0x74 ; 't'                                        ; +0x100, 0xe61ca8\nMOV             W2, #0x79 ; 'y'                                        ; +0x104, 0xe61cac\nADD             X3, X3, #aCryptoEvpEvpPb@PAGEOFF; \"crypto/evp/evp_pbe.c\" ; +0x108, 0xe61cb0\nMOV             W4, #0x5B ; '['                                        ; +0x10c, 0xe61cb4\nADD             X20, X29, #0xB0+var_50                                 ; +0x110, 0xe61cb8\nBL              ERR_put_error                                          ; +0x114, 0xe61cbc\nCBZ             X22, loc_E61D6C                                        ; +0x118, 0xe61cc0\nMOV             W1, #0x50 ; 'P'                                        ; +0x11c, 0xe61cc4\nMOV             X0, X20                                                ; +0x120, 0xe61cc8\nMOV             X2, X22                                                ; +0x124, 0xe61ccc\nBL              i2t_ASN1_OBJECT                                        ; +0x128, 0xe61cd0\nADRP            X1, #aType_3@PAGE; \"TYPE=\"                             ; +0x12c, 0xe61cd4\nMOV             X2, X20                                                ; +0x130, 0xe61cd8\nMOV             W0, #2                                                 ; +0x134, 0xe61cdc\nADD             X1, X1, #aType_3@PAGEOFF; \"TYPE=\"                      ; +0x138, 0xe61ce0\nBL              ERR_add_error_data                                     ; +0x13c, 0xe61ce4\nLDR             X25, [SP,#0xB0+var_70]                                 ; +0x140, 0xe61ce8\nMOV             W0, W19                                                ; +0x144, 0xe61cec\nLDP             X19, X20, [SP,#0xB0+var_A0]                            ; +0x148, 0xe61cf0\nLDP             X21, X22, [SP,#0xB0+var_90]                            ; +0x14c, 0xe61cf4\nLDP             X23, X24, [SP,#0xB0+var_80]                            ; +0x150, 0xe61cf8\nLDP             X29, X30, [SP+0xB0+var_B0],#0xB0                       ; +0x154, 0xe61cfc\nRET                                                                    ; +0x158, 0xe61d00\nADRP            X3, #aCryptoEvpEvpPb@PAGE; \"crypto/evp/evp_pbe.c\"      ; +0x15c, 0xe61d04\nMOV             W0, #6                                                 ; +0x160, 0xe61d08\nMOV             W1, #0x74 ; 't'                                        ; +0x164, 0xe61d0c\nMOV             W2, #0x78 ; 'x'                                        ; +0x168, 0xe61d10\nADD             X3, X3, #aCryptoEvpEvpPb@PAGEOFF; \"crypto/evp/evp_pbe.c\" ; +0x16c, 0xe61d14\nMOV             W4, #0x7E ; '~'                                        ; +0x170, 0xe61d18\nBL              ERR_put_error                                          ; +0x174, 0xe61d1c\nLDR             X25, [SP,#0xB0+var_70]                                 ; +0x178, 0xe61d20\nMOV             W0, W19                                                ; +0x17c, 0xe61d24\nLDP             X19, X20, [SP,#0xB0+var_A0]                            ; +0x180, 0xe61d28\nLDP             X21, X22, [SP,#0xB0+var_90]                            ; +0x184, 0xe61d2c\nLDP             X23, X24, [SP,#0xB0+var_80]                            ; +0x188, 0xe61d30\nLDP             X29, X30, [SP+0xB0+var_B0],#0xB0                       ; +0x18c, 0xe61d34\nRET                                                                    ; +0x190, 0xe61d38\nMOV             X0, X20; char *                                        ; +0x194, 0xe61d3c\nBL              .strlen                                                ; +0x198, 0xe61d40\nMOV             W21, W0                                                ; +0x19c, 0xe61d44\nLDR             W0, [X29,#0xB0+var_60]                                 ; +0x1a0, 0xe61d48\nCMN             W0, #1                                                 ; +0x1a4, 0xe61d4c\nB.NE            loc_E61C14                                             ; +0x1a8, 0xe61d50\nB               loc_E61C88                                             ; +0x1ac, 0xe61d54\nLDR             W0, [X29,#0xB0+var_60]                                 ; +0x1b0, 0xe61d58\nMOV             W21, W20                                               ; +0x1b4, 0xe61d5c\nCMN             W0, #1                                                 ; +0x1b8, 0xe61d60\nB.NE            loc_E61C14                                             ; +0x1bc, 0xe61d64\nB               loc_E61C88                                             ; +0x1c0, 0xe61d68\nADRP            X1, #(aAssertionFaile_14+0x38)@PAGE; \"NULL\"            ; +0x1c4, 0xe61d6c\nMOV             X0, X20                                                ; +0x1c8, 0xe61d70\nADD             X1, X1, #(aAssertionFaile_14+0x38)@PAGEOFF; \"NULL\"     ; +0x1cc, 0xe61d74\nMOV             X2, #0x50 ; 'P'                                        ; +0x1d0, 0xe61d78\nBL              OPENSSL_strlcpy                                        ; +0x1d4, 0xe61d7c\nB               loc_E61CD4                                             ; +0x1d8, 0xe61d80\nADRP            X3, #aCryptoEvpEvpPb@PAGE; \"crypto/evp/evp_pbe.c\"      ; +0x1dc, 0xe61d84\nMOV             W0, #6                                                 ; +0x1e0, 0xe61d88\nMOV             W1, #0x74 ; 't'                                        ; +0x1e4, 0xe61d8c\nMOV             W2, #0xA1                                              ; +0x1e8, 0xe61d90\nADD             X3, X3, #aCryptoEvpEvpPb@PAGEOFF; \"crypto/evp/evp_pbe.c\" ; +0x1ec, 0xe61d94\nMOV             W4, #0x78 ; 'x'                                        ; +0x1f0, 0xe61d98\nMOV             W19, W5                                                ; +0x1f4, 0xe61d9c\nBL              ERR_put_error                                          ; +0x1f8, 0xe61da0\nB               loc_E61C6C                                             ; +0x1fc, 0xe61da4\nADRP            X3, #aCryptoEvpEvpPb@PAGE; \"crypto/evp/evp_pbe.c\"      ; +0x200, 0xe61da8\nMOV             W0, #6                                                 ; +0x204, 0xe61dac\nMOV             W1, #0x74 ; 't'                                        ; +0x208, 0xe61db0\nMOV             W2, #0xA0                                              ; +0x20c, 0xe61db4\nADD             X3, X3, #aCryptoEvpEvpPb@PAGEOFF; \"crypto/evp/evp_pbe.c\" ; +0x210, 0xe61db8\nMOV             W4, #0x6E ; 'n'                                        ; +0x214, 0xe61dbc\nMOV             W19, W22                                               ; +0x218, 0xe61dc0\nBL              ERR_put_error                                          ; +0x21c, 0xe61dc4\nB               loc_E61C6C                                             ; +0x220, 0xe61dc8", "xrefs": ["cms_RecipientInfo_pwri_crypt @ 0xe20e14", "PKCS12_pbe_crypt @ 0xe65c88", "<???> @ 0x46698"], "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"}