{"type": "func", "start": 8401948, "end": 8402084, "name": "EVP_CIPHER_CTX_set_key_length", "pseudocode": "// \n// EVP_CIPHER_CTX_set_key_length from 0x80341c to 0x8034a4 (136 bytes)\n// \n// 5 xrefs:\n// > CMAC_Init @ 0x7d91e4\n// > sub_8011CC @ 0x8012c4\n// > PKCS7_dataDecode @ 0x827760\n// > cms_EncryptedContent_init_bio @ 0x8cf504\n// > <???> @ 0x6008c\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_set_key_length(_DWORD *a1, int a2)\n{\n  int v2; // r2\n\n  v2 = *(_DWORD *)(*a1 + 16);\n  if ( (v2 & 0x80) != 0 )\n    return EVP_CIPHER_CTX_ctrl((int)a1);\n  if ( a1[22] == a2 )\n    return 1;\n  if ( a2 > 0 && (v2 & 8) != 0 )\n  {\n    a1[22] = a2;\n    return 1;\n  }\n  else\n  {\n    ERR_put_error(6, 122, 130, (int)\"crypto/evp/evp_enc.c\", 557);\n    return 0;\n  }\n}", "assembly": "; \n; EVP_CIPHER_CTX_set_key_length from 0x80341c to 0x8034a4 (136 bytes)\n; \n; 5 xrefs:\n; > CMAC_Init @ 0x7d91e4\n; > sub_8011CC @ 0x8012c4\n; > PKCS7_dataDecode @ 0x827760\n; > cms_EncryptedContent_init_bio @ 0x8cf504\n; > <???> @ 0x6008c\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\nLDR             R2, [R0]                                               ; +0x0, 0x80341c\nPUSH            {LR}                                                   ; +0x4, 0x803420\nLDR             R2, [R2,#0x10]                                         ; +0x8, 0x803424\nSUB             SP, SP, #0xC                                           ; +0xc, 0x803428\nTST             R2, #0x80                                              ; +0x10, 0x80342c\nMOV             R3, R0                                                 ; +0x14, 0x803430\nBNE             loc_80348C                                             ; +0x18, 0x803434\nLDR             R0, [R0,#0x58]                                         ; +0x1c, 0x803438\nCMP             R0, R1                                                 ; +0x20, 0x80343c\nMOVEQ           R0, #1                                                 ; +0x24, 0x803440\nBEQ             loc_803484                                             ; +0x28, 0x803444\nCMP             R1, #0                                                 ; +0x2c, 0x803448\nBLE             loc_803460                                             ; +0x30, 0x80344c\nTST             R2, #8                                                 ; +0x34, 0x803450\nSTRNE           R1, [R3,#0x58]                                         ; +0x38, 0x803454\nMOVNE           R0, #1                                                 ; +0x3c, 0x803458\nBNE             loc_803484                                             ; +0x40, 0x80345c\nLDR             R3, =0x22D                                             ; +0x44, 0x803460\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x48, 0x803464\nLDR             R3, =(aCryptoEvpEvpEn - 0x803480); \"crypto/evp/evp_enc.c\" ; +0x4c, 0x803468\nMOV             R0, #6                                                 ; +0x50, 0x80346c\nMOV             R1, #0x7A ; 'z'                                        ; +0x54, 0x803470\nMOV             R2, #0x82                                              ; +0x58, 0x803474\nADD             R3, PC, R3; \"crypto/evp/evp_enc.c\"                     ; +0x5c, 0x803478\nBL              ERR_put_error                                          ; +0x60, 0x80347c\nMOV             R0, #0                                                 ; +0x64, 0x803480\nADD             SP, SP, #0xC                                           ; +0x68, 0x803484\nPOP             {PC}                                                   ; +0x6c, 0x803488\nMOV             R2, R1                                                 ; +0x70, 0x80348c\nMOV             R3, #0                                                 ; +0x74, 0x803490\nMOV             R1, #1                                                 ; +0x78, 0x803494\nADD             SP, SP, #0xC                                           ; +0x7c, 0x803498\nPOP             {LR}                                                   ; +0x80, 0x80349c\nB               EVP_CIPHER_CTX_ctrl                                    ; +0x84, 0x8034a0", "xrefs": ["CMAC_Init @ 0x7d91e4", "sub_8011CC @ 0x8012c4", "PKCS7_dataDecode @ 0x827760", "cms_EncryptedContent_init_bio @ 0x8cf504", "<???> @ 0x6008c"], "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"}