{"type": "func", "start": 10596780, "end": 10596908, "name": "EVP_PKEY_derive_init", "pseudocode": "// \n// EVP_PKEY_derive_init from 0xa1b1ac to 0xa1b22c (128 bytes)\n// \n// 7 xrefs:\n// > ssl_derive @ 0x9a3dac\n// > sub_9CEC08 @ 0x9cec44\n// > tls1_final_finish_mac @ 0x9cf740\n// > tls1_generate_master_secret @ 0x9cf928\n// > CMS_RecipientInfo_kari_set0_pkey @ 0xa89420\n// > cms_RecipientInfo_kari_init @ 0xa89720\n// > <???> @ 0x7492c\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:07:52 +0000\n// \n\nint __fastcall EVP_PKEY_derive_init(int *a1)\n{\n  int v2; // r3\n  int (*v3)(void); // r3\n  int result; // r0\n\n  if ( a1 && (v2 = *a1) != 0 && *(_DWORD *)(v2 + 96) )\n  {\n    v3 = *(int (**)(void))(v2 + 92);\n    a1[4] = 1024;\n    if ( v3 )\n    {\n      result = v3();\n      if ( result <= 0 )\n        a1[4] = 0;\n    }\n    else\n    {\n      return 1;\n    }\n  }\n  else\n  {\n    ERR_put_error(6, 154, 150, (int)\"crypto/evp/pmeth_fn.c\", 207);\n    return -2;\n  }\n  return result;\n}", "assembly": "; \n; EVP_PKEY_derive_init from 0xa1b1ac to 0xa1b22c (128 bytes)\n; \n; 7 xrefs:\n; > ssl_derive @ 0x9a3dac\n; > sub_9CEC08 @ 0x9cec44\n; > tls1_final_finish_mac @ 0x9cf740\n; > tls1_generate_master_secret @ 0x9cf928\n; > CMS_RecipientInfo_kari_set0_pkey @ 0xa89420\n; > cms_RecipientInfo_kari_init @ 0xa89720\n; > <???> @ 0x7492c\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:07:52 +0000\n; \nPUSH            {R4,LR}                                                ; +0x0, 0xa1b1ac\nSUBS            R4, R0, #0                                             ; +0x4, 0xa1b1b0\nSUB             SP, SP, #8                                             ; +0x8, 0xa1b1b4\nBEQ             loc_A1B204                                             ; +0xc, 0xa1b1b8\nLDR             R3, [R4]                                               ; +0x10, 0xa1b1bc\nCMP             R3, #0                                                 ; +0x14, 0xa1b1c0\nBEQ             loc_A1B204                                             ; +0x18, 0xa1b1c4\nLDR             R2, [R3,#0x60]                                         ; +0x1c, 0xa1b1c8\nCMP             R2, #0                                                 ; +0x20, 0xa1b1cc\nBEQ             loc_A1B204                                             ; +0x24, 0xa1b1d0\nLDR             R3, [R3,#0x5C]                                         ; +0x28, 0xa1b1d4\nMOV             R2, #0x400                                             ; +0x2c, 0xa1b1d8\nCMP             R3, #0                                                 ; +0x30, 0xa1b1dc\nSTR             R2, [R4,#0x10]                                         ; +0x34, 0xa1b1e0\nMOVEQ           R0, #1                                                 ; +0x38, 0xa1b1e4\nBEQ             loc_A1B1FC                                             ; +0x3c, 0xa1b1e8\nBLX             R3                                                     ; +0x40, 0xa1b1ec\nCMP             R0, #0                                                 ; +0x44, 0xa1b1f0\nMOVLE           R3, #0                                                 ; +0x48, 0xa1b1f4\nSTRLE           R3, [R4,#0x10]                                         ; +0x4c, 0xa1b1f8\nADD             SP, SP, #8                                             ; +0x50, 0xa1b1fc\nPOP             {R4,PC}                                                ; +0x54, 0xa1b200\nMOV             R3, #0xCF                                              ; +0x58, 0xa1b204\nSTR             R3, [SP,#8+var_8]                                      ; +0x5c, 0xa1b208\nLDR             R3, =(aCryptoEvpPmeth - 0xA1B224); \"crypto/evp/pmeth_fn.c\" ; +0x60, 0xa1b20c\nMOV             R0, #6                                                 ; +0x64, 0xa1b210\nMOV             R1, #0x9A                                              ; +0x68, 0xa1b214\nMOV             R2, #0x96                                              ; +0x6c, 0xa1b218\nADD             R3, PC, R3; \"crypto/evp/pmeth_fn.c\"                    ; +0x70, 0xa1b21c\nBL              ERR_put_error                                          ; +0x74, 0xa1b220\nMOV             R0, #0xFFFFFFFE                                        ; +0x78, 0xa1b224\nB               loc_A1B1FC                                             ; +0x7c, 0xa1b228", "xrefs": ["ssl_derive @ 0x9a3dac", "sub_9CEC08 @ 0x9cec44", "tls1_final_finish_mac @ 0x9cf740", "tls1_generate_master_secret @ 0x9cf928", "CMS_RecipientInfo_kari_set0_pkey @ 0xa89420", "cms_RecipientInfo_kari_init @ 0xa89720", "<???> @ 0x7492c"], "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"}