{"type": "func", "start": 10596480, "end": 10596768, "name": "EVP_PKEY_decrypt", "pseudocode": "// \n// EVP_PKEY_decrypt from 0xa1b080 to 0xa1b1a0 (288 bytes)\n// \n// 6 xrefs:\n// > tls_process_client_key_exchange @ 0x9c0390\n// > sub_A3B4D4 @ 0xa3b54c\n// > sub_A3B4D4 @ 0xa3b594\n// > CMS_RecipientInfo_decrypt @ 0xa883d0\n// > CMS_RecipientInfo_decrypt @ 0xa88414\n// > <???> @ 0x770fc\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_decrypt(int *a1, int a2, unsigned int *a3, int a4, int a5)\n{\n  int v6; // r12\n  unsigned int v10; // r0\n  int (__fastcall *v12)(int *, int, unsigned int *, int, int); // r12\n\n  if ( a1 && (v6 = *a1) != 0 && *(_DWORD *)(v6 + 88) )\n  {\n    if ( a1[4] == 512 )\n    {\n      if ( (*(_DWORD *)(v6 + 4) & 2) == 0 )\n      {\n        v12 = *(int (__fastcall **)(int *, int, unsigned int *, int, int))(v6 + 88);\n        return v12(a1, a2, a3, a4, a5);\n      }\n      v10 = EVP_PKEY_size(a1[2]);\n      if ( !a2 )\n      {\n        *a3 = v10;\n        return 1;\n      }\n      if ( v10 <= *a3 )\n      {\n        v12 = *(int (__fastcall **)(int *, int, unsigned int *, int, int))(*a1 + 88);\n        return v12(a1, a2, a3, a4, a5);\n      }\n      ERR_put_error(6, 104, 155, (int)\"crypto/evp/pmeth_fn.c\", 198);\n      return 0;\n    }\n    else\n    {\n      ERR_put_error(6, 104, 151, (int)\"crypto/evp/pmeth_fn.c\", 195);\n      return -1;\n    }\n  }\n  else\n  {\n    ERR_put_error(6, 104, 150, (int)\"crypto/evp/pmeth_fn.c\", 191);\n    return -2;\n  }\n}", "assembly": "; \n; EVP_PKEY_decrypt from 0xa1b080 to 0xa1b1a0 (288 bytes)\n; \n; 6 xrefs:\n; > tls_process_client_key_exchange @ 0x9c0390\n; > sub_A3B4D4 @ 0xa3b54c\n; > sub_A3B4D4 @ 0xa3b594\n; > CMS_RecipientInfo_decrypt @ 0xa883d0\n; > CMS_RecipientInfo_decrypt @ 0xa88414\n; > <???> @ 0x770fc\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-R8,LR}                                             ; +0x0, 0xa1b080\nSUBS            R4, R0, #0                                             ; +0x4, 0xa1b084\nSUB             SP, SP, #8                                             ; +0x8, 0xa1b088\nLDR             R8, [SP,#8+arg_0]                                      ; +0xc, 0xa1b08c\nBEQ             loc_A1B178                                             ; +0x10, 0xa1b090\nLDR             R12, [R4]                                              ; +0x14, 0xa1b094\nCMP             R12, #0                                                ; +0x18, 0xa1b098\nBEQ             loc_A1B178                                             ; +0x1c, 0xa1b09c\nLDR             R0, [R12,#0x58]                                        ; +0x20, 0xa1b0a0\nCMP             R0, #0                                                 ; +0x24, 0xa1b0a4\nBEQ             loc_A1B178                                             ; +0x28, 0xa1b0a8\nMOV             R6, R2                                                 ; +0x2c, 0xa1b0ac\nLDR             R2, [R4,#0x10]                                         ; +0x30, 0xa1b0b0\nCMP             R2, #0x200                                             ; +0x34, 0xa1b0b4\nBNE             loc_A1B124                                             ; +0x38, 0xa1b0b8\nLDR             R2, [R12,#4]                                           ; +0x3c, 0xa1b0bc\nMOV             R5, R1                                                 ; +0x40, 0xa1b0c0\nTST             R2, #2                                                 ; +0x44, 0xa1b0c4\nMOV             R7, R3                                                 ; +0x48, 0xa1b0c8\nBEQ             loc_A1B100                                             ; +0x4c, 0xa1b0cc\nLDR             R0, [R4,#8]                                            ; +0x50, 0xa1b0d0\nBL              EVP_PKEY_size                                          ; +0x54, 0xa1b0d4\nCMP             R5, #0                                                 ; +0x58, 0xa1b0d8\nSTREQ           R0, [R6]                                               ; +0x5c, 0xa1b0dc\nMOVEQ           R0, #1                                                 ; +0x60, 0xa1b0e0\nBEQ             loc_A1B148                                             ; +0x64, 0xa1b0e4\nLDR             R3, [R6]                                               ; +0x68, 0xa1b0e8\nCMP             R0, R3                                                 ; +0x6c, 0xa1b0ec\nBHI             loc_A1B150                                             ; +0x70, 0xa1b0f0\nLDR             R3, [R4]                                               ; +0x74, 0xa1b0f4\nLDR             R12, [R3,#0x58]                                        ; +0x78, 0xa1b0f8\nB               loc_A1B104                                             ; +0x7c, 0xa1b0fc\nMOV             R12, R0                                                ; +0x80, 0xa1b100\nMOV             R0, R4                                                 ; +0x84, 0xa1b104\nMOV             R1, R5                                                 ; +0x88, 0xa1b108\nMOV             R2, R6                                                 ; +0x8c, 0xa1b10c\nMOV             R3, R7                                                 ; +0x90, 0xa1b110\nSTR             R8, [SP,#8+arg_0]                                      ; +0x94, 0xa1b114\nADD             SP, SP, #8                                             ; +0x98, 0xa1b118\nPOP             {R4-R8,LR}                                             ; +0x9c, 0xa1b11c\nBX              R12                                                    ; +0xa0, 0xa1b120\nMOV             R3, #0xC3                                              ; +0xa4, 0xa1b124\nSTR             R3, [SP,#8+var_8]                                      ; +0xa8, 0xa1b128\nLDR             R3, =(aCryptoEvpPmeth - 0xA1B144); \"crypto/evp/pmeth_fn.c\" ; +0xac, 0xa1b12c\nMOV             R0, #6                                                 ; +0xb0, 0xa1b130\nMOV             R1, #0x68 ; 'h'                                        ; +0xb4, 0xa1b134\nMOV             R2, #0x97                                              ; +0xb8, 0xa1b138\nADD             R3, PC, R3; \"crypto/evp/pmeth_fn.c\"                    ; +0xbc, 0xa1b13c\nBL              ERR_put_error                                          ; +0xc0, 0xa1b140\nMOV             R0, #0xFFFFFFFF                                        ; +0xc4, 0xa1b144\nADD             SP, SP, #8                                             ; +0xc8, 0xa1b148\nPOP             {R4-R8,PC}                                             ; +0xcc, 0xa1b14c\nMOV             R3, #0xC6                                              ; +0xd0, 0xa1b150\nSTR             R3, [SP,#8+var_8]                                      ; +0xd4, 0xa1b154\nLDR             R3, =(aCryptoEvpPmeth - 0xA1B170); \"crypto/evp/pmeth_fn.c\" ; +0xd8, 0xa1b158\nMOV             R0, #6                                                 ; +0xdc, 0xa1b15c\nMOV             R1, #0x68 ; 'h'                                        ; +0xe0, 0xa1b160\nMOV             R2, #0x9B                                              ; +0xe4, 0xa1b164\nADD             R3, PC, R3; \"crypto/evp/pmeth_fn.c\"                    ; +0xe8, 0xa1b168\nBL              ERR_put_error                                          ; +0xec, 0xa1b16c\nMOV             R0, #0                                                 ; +0xf0, 0xa1b170\nB               loc_A1B148                                             ; +0xf4, 0xa1b174\nMOV             R3, #0xBF                                              ; +0xf8, 0xa1b178\nSTR             R3, [SP,#8+var_8]                                      ; +0xfc, 0xa1b17c\nLDR             R3, =(aCryptoEvpPmeth - 0xA1B198); \"crypto/evp/pmeth_fn.c\" ; +0x100, 0xa1b180\nMOV             R0, #6                                                 ; +0x104, 0xa1b184\nMOV             R1, #0x68 ; 'h'                                        ; +0x108, 0xa1b188\nMOV             R2, #0x96                                              ; +0x10c, 0xa1b18c\nADD             R3, PC, R3; \"crypto/evp/pmeth_fn.c\"                    ; +0x110, 0xa1b190\nBL              ERR_put_error                                          ; +0x114, 0xa1b194\nMOV             R0, #0xFFFFFFFE                                        ; +0x118, 0xa1b198\nB               loc_A1B148                                             ; +0x11c, 0xa1b19c", "xrefs": ["tls_process_client_key_exchange @ 0x9c0390", "sub_A3B4D4 @ 0xa3b54c", "sub_A3B4D4 @ 0xa3b594", "CMS_RecipientInfo_decrypt @ 0xa883d0", "CMS_RecipientInfo_decrypt @ 0xa88414", "<???> @ 0x770fc"], "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"}