{"type": "func", "start": 8865772, "end": 8865872, "name": "CMS_RecipientInfo_kari_set0_pkey", "pseudocode": "// \n// CMS_RecipientInfo_kari_set0_pkey from 0x8747ec to 0x874850 (100 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6a38c\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 CMS_RecipientInfo_kari_set0_pkey(int a1, int a2)\n{\n  int v2; // r4\n  int *v4; // r0\n  int v5; // r5\n\n  v2 = *(_DWORD *)(a1 + 4);\n  EVP_PKEY_CTX_free(*(_DWORD *)(v2 + 20));\n  *(_DWORD *)(v2 + 20) = 0;\n  if ( !a2 )\n    return 1;\n  v4 = (int *)EVP_PKEY_CTX_new(a2, nullptr);\n  v5 = (int)v4;\n  if ( v4 && EVP_PKEY_derive_init(v4) )\n  {\n    *(_DWORD *)(v2 + 20) = v5;\n    return 1;\n  }\n  else\n  {\n    EVP_PKEY_CTX_free(v5);\n    return 0;\n  }\n}", "assembly": "; \n; CMS_RecipientInfo_kari_set0_pkey from 0x8747ec to 0x874850 (100 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6a38c\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            {R3-R5,LR}                                             ; +0x0, 0x8747ec\nLDR             R4, [R0,#4]                                            ; +0x4, 0x8747f0\nMOV             R5, R1                                                 ; +0x8, 0x8747f4\nLDR             R0, [R4,#0x14]                                         ; +0xc, 0x8747f8\nBL              EVP_PKEY_CTX_free                                      ; +0x10, 0x8747fc\nMOV             R1, #0                                                 ; +0x14, 0x874800\nCMP             R5, #0                                                 ; +0x18, 0x874804\nSTR             R1, [R4,#0x14]                                         ; +0x1c, 0x874808\nBEQ             loc_874848                                             ; +0x20, 0x87480c\nMOV             R0, R5                                                 ; +0x24, 0x874810\nBL              EVP_PKEY_CTX_new                                       ; +0x28, 0x874814\nSUBS            R5, R0, #0                                             ; +0x2c, 0x874818\nBEQ             loc_87482C                                             ; +0x30, 0x87481c\nBL              EVP_PKEY_derive_init                                   ; +0x34, 0x874820\nCMP             R0, #0                                                 ; +0x38, 0x874824\nBNE             loc_87483C                                             ; +0x3c, 0x874828\nMOV             R0, R5                                                 ; +0x40, 0x87482c\nBL              EVP_PKEY_CTX_free                                      ; +0x44, 0x874830\nMOV             R0, #0                                                 ; +0x48, 0x874834\nPOP             {R3-R5,PC}                                             ; +0x4c, 0x874838\nSTR             R5, [R4,#0x14]                                         ; +0x50, 0x87483c\nMOV             R0, #1                                                 ; +0x54, 0x874840\nPOP             {R3-R5,PC}                                             ; +0x58, 0x874844\nMOV             R0, #1                                                 ; +0x5c, 0x874848\nPOP             {R3-R5,PC}                                             ; +0x60, 0x87484c", "xrefs": ["<???> @ 0x6a38c"], "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"}