{"type": "func", "start": 11324052, "end": 11324532, "name": "EVP_PBE_CipherInit", "pseudocode": "// \n// EVP_PBE_CipherInit from 0xacca94 to 0xaccc74 (480 bytes)\n// \n// 3 xrefs:\n// > cms_RecipientInfo_pwri_crypt @ 0xa8b088\n// > PKCS12_pbe_crypt @ 0xad0764\n// > <???> @ 0x83fdc\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:09:21 +0000\n// \n\nint __fastcall EVP_PBE_CipherInit(int a1, const char *a2, size_t a3, int a4, int a5, int a6)\n{\n  char *v10; // r0\n  unsigned int v11; // r0\n  char *v12; // r0\n  int cipherbyname; // r8\n  unsigned int v14; // r0\n  char *v15; // r0\n  int digestbyname; // r4\n  unsigned int v18; // [sp+14h] [bp-5Ch] BYREF\n  unsigned int v19; // [sp+18h] [bp-58h] BYREF\n  int (__fastcall *v20)(int, const char *, size_t, int, int, int, int); // [sp+1Ch] [bp-54h] BYREF\n  char v21[80]; // [sp+20h] [bp-50h] BYREF\n\n  v10 = OBJ_obj2nid(a1);\n  if ( EVP_PBE_find(0, (int)v10, &v18, &v19, &v20) )\n  {\n    if ( a2 )\n    {\n      if ( a3 == -1 )\n      {\n        a3 = strlen(a2);\n        v11 = v18;\n        if ( v18 != -1 )\n        {\nLABEL_6:\n          v12 = OBJ_nid2sn(v11);\n          cipherbyname = EVP_get_cipherbyname((int)v12);\n          if ( !cipherbyname )\n          {\n            digestbyname = 0;\n            ERR_put_error(6, 116, 160, (int)\"crypto/evp/evp_pbe.c\", 110);\n            return digestbyname;\n          }\n          v14 = v19;\n          if ( v19 != -1 )\n          {\nLABEL_8:\n            v15 = OBJ_nid2sn(v14);\n            digestbyname = EVP_get_digestbyname((int)v15);\n            if ( digestbyname )\n              goto LABEL_9;\n            ERR_put_error(6, 116, 161, (int)\"crypto/evp/evp_pbe.c\", 120);\n            return digestbyname;\n          }\nLABEL_14:\n          digestbyname = 0;\nLABEL_9:\n          digestbyname = v20(a5, a2, a3, a4, cipherbyname, digestbyname, a6);\n          if ( digestbyname )\n            return 1;\n          ERR_put_error(6, 116, 120, (int)\"crypto/evp/evp_pbe.c\", 126);\n          return digestbyname;\n        }\nLABEL_13:\n        v14 = v19;\n        cipherbyname = 0;\n        if ( v19 != -1 )\n          goto LABEL_8;\n        goto LABEL_14;\n      }\n    }\n    else\n    {\n      a3 = 0;\n    }\n    v11 = v18;\n    if ( v18 != -1 )\n      goto LABEL_6;\n    goto LABEL_13;\n  }\n  ERR_put_error(6, 116, 121, (int)\"crypto/evp/evp_pbe.c\", 91);\n  if ( a1 )\n    i2t_ASN1_OBJECT((int)v21, 80, a1);\n  else\n    OPENSSL_strlcpy(v21, \"NULL\", 0x50u);\n  ERR_add_error_data(2, \"TYPE=\", v21);\n  return 0;\n}", "assembly": "; \n; EVP_PBE_CipherInit from 0xacca94 to 0xaccc74 (480 bytes)\n; \n; 3 xrefs:\n; > cms_RecipientInfo_pwri_crypt @ 0xa8b088\n; > PKCS12_pbe_crypt @ 0xad0764\n; > <???> @ 0x83fdc\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:09:21 +0000\n; \nPUSH            {R4-R8,LR}                                             ; +0x0, 0xacca94\nSUB             SP, SP, #0x70                                          ; +0x4, 0xacca98\nMOV             R5, R1                                                 ; +0x8, 0xacca9c\nMOV             R6, R2                                                 ; +0xc, 0xaccaa0\nMOV             R7, R3                                                 ; +0x10, 0xaccaa4\nMOV             R8, R0                                                 ; +0x14, 0xaccaa8\nBL              OBJ_obj2nid                                            ; +0x18, 0xaccaac\nADD             R12, SP, #0x70+var_54                                  ; +0x1c, 0xaccab0\nSTR             R12, [SP,#0x70+var_70]                                 ; +0x20, 0xaccab4\nADD             R2, SP, #0x70+var_5C                                   ; +0x24, 0xaccab8\nADD             R3, SP, #0x70+var_58                                   ; +0x28, 0xaccabc\nMOV             R1, R0                                                 ; +0x2c, 0xaccac0\nMOV             R0, #0                                                 ; +0x30, 0xaccac4\nBL              EVP_PBE_find                                           ; +0x34, 0xaccac8\nSUBS            R4, R0, #0                                             ; +0x38, 0xaccacc\nBEQ             loc_ACCB98                                             ; +0x3c, 0xaccad0\nCMP             R5, #0                                                 ; +0x40, 0xaccad4\nMOVEQ           R6, R5                                                 ; +0x44, 0xaccad8\nBEQ             loc_ACCAE8                                             ; +0x48, 0xaccadc\nCMN             R6, #1                                                 ; +0x4c, 0xaccae0\nBEQ             loc_ACCBF4                                             ; +0x50, 0xaccae4\nLDR             R0, [SP,#0x70+var_5C]                                  ; +0x54, 0xaccae8\nCMN             R0, #1                                                 ; +0x58, 0xaccaec\nBEQ             loc_ACCB80                                             ; +0x5c, 0xaccaf0\nBL              OBJ_nid2sn                                             ; +0x60, 0xaccaf4\nBL              EVP_get_cipherbyname                                   ; +0x64, 0xaccaf8\nSUBS            R8, R0, #0                                             ; +0x68, 0xaccafc\nBEQ             loc_ACCC4C                                             ; +0x6c, 0xaccb00\nLDR             R0, [SP,#0x70+var_58]                                  ; +0x70, 0xaccb04\nCMN             R0, #1                                                 ; +0x74, 0xaccb08\nBEQ             loc_ACCB90                                             ; +0x78, 0xaccb0c\nBL              OBJ_nid2sn                                             ; +0x7c, 0xaccb10\nBL              EVP_get_digestbyname                                   ; +0x80, 0xaccb14\nSUBS            R4, R0, #0                                             ; +0x84, 0xaccb18\nBEQ             loc_ACCC28                                             ; +0x88, 0xaccb1c\nLDR             R3, [SP,#0x70+arg_4]                                   ; +0x8c, 0xaccb20\nSTR             R4, [SP,#0x70+var_6C]                                  ; +0x90, 0xaccb24\nSTR             R3, [SP,#0x70+var_68]                                  ; +0x94, 0xaccb28\nSTR             R8, [SP,#0x70+var_70]                                  ; +0x98, 0xaccb2c\nMOV             R1, R5                                                 ; +0x9c, 0xaccb30\nMOV             R2, R6                                                 ; +0xa0, 0xaccb34\nMOV             R3, R7                                                 ; +0xa4, 0xaccb38\nLDR             R12, [SP,#0x70+var_54]                                 ; +0xa8, 0xaccb3c\nLDR             R0, [SP,#0x70+arg_0]                                   ; +0xac, 0xaccb40\nBLX             R12                                                    ; +0xb0, 0xaccb44\nSUBS            R4, R0, #0                                             ; +0xb4, 0xaccb48\nMOVNE           R4, #1                                                 ; +0xb8, 0xaccb4c\nBNE             loc_ACCB74                                             ; +0xbc, 0xaccb50\nMOV             R3, #0x7E ; '~'                                        ; +0xc0, 0xaccb54\nSTR             R3, [SP,#0x70+var_70]                                  ; +0xc4, 0xaccb58\nLDR             R3, =(aCryptoEvpEvpPb - 0xACCB74); \"crypto/evp/evp_pbe.c\" ; +0xc8, 0xaccb5c\nMOV             R0, #6                                                 ; +0xcc, 0xaccb60\nMOV             R1, #0x74 ; 't'                                        ; +0xd0, 0xaccb64\nMOV             R2, #0x78 ; 'x'                                        ; +0xd4, 0xaccb68\nADD             R3, PC, R3; \"crypto/evp/evp_pbe.c\"                     ; +0xd8, 0xaccb6c\nBL              ERR_put_error                                          ; +0xdc, 0xaccb70\nMOV             R0, R4                                                 ; +0xe0, 0xaccb74\nADD             SP, SP, #0x70 ; 'p'                                    ; +0xe4, 0xaccb78\nPOP             {R4-R8,PC}                                             ; +0xe8, 0xaccb7c\nLDR             R0, [SP,#0x70+var_58]                                  ; +0xec, 0xaccb80\nMOV             R8, #0                                                 ; +0xf0, 0xaccb84\nCMN             R0, #1                                                 ; +0xf4, 0xaccb88\nBNE             loc_ACCB10                                             ; +0xf8, 0xaccb8c\nMOV             R4, #0                                                 ; +0xfc, 0xaccb90\nB               loc_ACCB20                                             ; +0x100, 0xaccb94\nMOV             R3, #0x5B ; '['                                        ; +0x104, 0xaccb98\nSTR             R3, [SP,#0x70+var_70]                                  ; +0x108, 0xaccb9c\nLDR             R3, =(aCryptoEvpEvpPb - 0xACCBB8); \"crypto/evp/evp_pbe.c\" ; +0x10c, 0xaccba0\nMOV             R0, #6                                                 ; +0x110, 0xaccba4\nMOV             R1, #0x74 ; 't'                                        ; +0x114, 0xaccba8\nMOV             R2, #0x79 ; 'y'                                        ; +0x118, 0xaccbac\nADD             R3, PC, R3; \"crypto/evp/evp_pbe.c\"                     ; +0x11c, 0xaccbb0\nBL              ERR_put_error                                          ; +0x120, 0xaccbb4\nCMP             R8, #0                                                 ; +0x124, 0xaccbb8\nADD             R5, SP, #0x70+var_50                                   ; +0x128, 0xaccbbc\nBEQ             loc_ACCC10                                             ; +0x12c, 0xaccbc0\nMOV             R2, R8                                                 ; +0x130, 0xaccbc4\nMOV             R0, R5                                                 ; +0x134, 0xaccbc8\nMOV             R1, #0x50 ; 'P'                                        ; +0x138, 0xaccbcc\nBL              i2t_ASN1_OBJECT                                        ; +0x13c, 0xaccbd0\nLDR             R1, =(aType_1 - 0xACCBE8); \"TYPE=\"                     ; +0x140, 0xaccbd4\nMOV             R2, R5                                                 ; +0x144, 0xaccbd8\nMOV             R0, #2                                                 ; +0x148, 0xaccbdc\nADD             R1, PC, R1; \"TYPE=\"                                    ; +0x14c, 0xaccbe0\nBL              ERR_add_error_data                                     ; +0x150, 0xaccbe4\nMOV             R0, R4                                                 ; +0x154, 0xaccbe8\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x158, 0xaccbec\nPOP             {R4-R8,PC}                                             ; +0x15c, 0xaccbf0\nMOV             R0, R5; char *                                         ; +0x160, 0xaccbf4\nBL              strlen                                                 ; +0x164, 0xaccbf8\nMOV             R6, R0                                                 ; +0x168, 0xaccbfc\nLDR             R0, [SP,#0x70+var_5C]                                  ; +0x16c, 0xaccc00\nCMN             R0, #1                                                 ; +0x170, 0xaccc04\nBNE             loc_ACCAF4                                             ; +0x174, 0xaccc08\nB               loc_ACCB80                                             ; +0x178, 0xaccc0c\nLDR             R1, =(aNull_0 - 0xACCC20); \"NULL\"                      ; +0x17c, 0xaccc10\nMOV             R0, R5                                                 ; +0x180, 0xaccc14\nADD             R1, PC, R1; \"NULL\"                                     ; +0x184, 0xaccc18\nMOV             R2, #0x50 ; 'P'                                        ; +0x188, 0xaccc1c\nBL              OPENSSL_strlcpy                                        ; +0x18c, 0xaccc20\nB               loc_ACCBD4                                             ; +0x190, 0xaccc24\nMOV             R3, #0x78 ; 'x'                                        ; +0x194, 0xaccc28\nSTR             R3, [SP,#0x70+var_70]                                  ; +0x198, 0xaccc2c\nLDR             R3, =(aCryptoEvpEvpPb - 0xACCC48); \"crypto/evp/evp_pbe.c\" ; +0x19c, 0xaccc30\nMOV             R0, #6                                                 ; +0x1a0, 0xaccc34\nMOV             R1, #0x74 ; 't'                                        ; +0x1a4, 0xaccc38\nMOV             R2, #0xA1                                              ; +0x1a8, 0xaccc3c\nADD             R3, PC, R3; \"crypto/evp/evp_pbe.c\"                     ; +0x1ac, 0xaccc40\nBL              ERR_put_error                                          ; +0x1b0, 0xaccc44\nB               loc_ACCB74                                             ; +0x1b4, 0xaccc48\nMOV             R3, #0x6E ; 'n'                                        ; +0x1b8, 0xaccc4c\nSTR             R3, [SP,#0x70+var_70]                                  ; +0x1bc, 0xaccc50\nLDR             R3, =(aCryptoEvpEvpPb - 0xACCC6C); \"crypto/evp/evp_pbe.c\" ; +0x1c0, 0xaccc54\nMOV             R0, #6                                                 ; +0x1c4, 0xaccc58\nMOV             R1, #0x74 ; 't'                                        ; +0x1c8, 0xaccc5c\nMOV             R2, #0xA0                                              ; +0x1cc, 0xaccc60\nADD             R3, PC, R3; \"crypto/evp/evp_pbe.c\"                     ; +0x1d0, 0xaccc64\nMOV             R4, R8                                                 ; +0x1d4, 0xaccc68\nBL              ERR_put_error                                          ; +0x1d8, 0xaccc6c\nB               loc_ACCB74                                             ; +0x1dc, 0xaccc70", "xrefs": ["cms_RecipientInfo_pwri_crypt @ 0xa8b088", "PKCS12_pbe_crypt @ 0xad0764", "<???> @ 0x83fdc"], "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"}