{"type": "func", "start": 8258524, "end": 8258632, "name": "DH_compute_key_padded", "pseudocode": "// \n// DH_compute_key_padded from 0x7e03dc to 0x7e0448 (108 bytes)\n// \n// 2 xrefs:\n// > sub_87FAD8 @ 0x87fb94\n// > <???> @ 0x60abc\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 DH_compute_key_padded(char *a1, int a2, int a3)\n{\n  int v5; // r0\n  size_t v6; // r5\n  int v7; // r4\n  int v8; // r0\n  int v9; // r4\n\n  v5 = (*(int (**)(void))(*(_DWORD *)(a3 + 64) + 8))();\n  v6 = v5;\n  if ( v5 <= 0 )\n    return v5;\n  v8 = BN_num_bits(*(_DWORD **)(a3 + 8));\n  v9 = v8 + 7;\n  if ( v8 + 7 < 0 )\n    v9 = v8 + 14;\n  v7 = v9 >> 3;\n  if ( (int)(v7 - v6) > 0 )\n  {\n    memmove(&a1[v7 - v6], a1, v6);\n    memset(a1, 0, v7 - v6);\n  }\n  return v7;\n}", "assembly": "; \n; DH_compute_key_padded from 0x7e03dc to 0x7e0448 (108 bytes)\n; \n; 2 xrefs:\n; > sub_87FAD8 @ 0x87fb94\n; > <???> @ 0x60abc\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-R7,LR}                                             ; +0x0, 0x7e03dc\nLDR             R3, [R2,#0x40]                                         ; +0x4, 0x7e03e0\nMOV             R4, R2                                                 ; +0x8, 0x7e03e4\nLDR             R3, [R3,#8]                                            ; +0xc, 0x7e03e8\nMOV             R6, R0                                                 ; +0x10, 0x7e03ec\nBLX             R3                                                     ; +0x14, 0x7e03f0\nSUBS            R5, R0, #0                                             ; +0x18, 0x7e03f4\nMOVLE           R4, R5                                                 ; +0x1c, 0x7e03f8\nBLE             loc_7E0440                                             ; +0x20, 0x7e03fc\nLDR             R0, [R4,#8]                                            ; +0x24, 0x7e0400\nBL              BN_num_bits                                            ; +0x28, 0x7e0404\nADDS            R4, R0, #7                                             ; +0x2c, 0x7e0408\nADDMI           R4, R0, #0xE                                           ; +0x30, 0x7e040c\nMOV             R4, R4,ASR#3                                           ; +0x34, 0x7e0410\nRSB             R7, R5, R4                                             ; +0x38, 0x7e0414\nCMP             R7, #0                                                 ; +0x3c, 0x7e0418\nBLE             loc_7E0440                                             ; +0x40, 0x7e041c\nMOV             R2, R5; size_t                                         ; +0x44, 0x7e0420\nMOV             R1, R6; void *                                         ; +0x48, 0x7e0424\nADD             R0, R6, R7; void *                                     ; +0x4c, 0x7e0428\nBL              memmove                                                ; +0x50, 0x7e042c\nMOV             R0, R6; void *                                         ; +0x54, 0x7e0430\nMOV             R2, R7; size_t                                         ; +0x58, 0x7e0434\nMOV             R1, #0; int                                            ; +0x5c, 0x7e0438\nBL              memset                                                 ; +0x60, 0x7e043c\nMOV             R0, R4                                                 ; +0x64, 0x7e0440\nPOP             {R3-R7,PC}                                             ; +0x68, 0x7e0444", "xrefs": ["sub_87FAD8 @ 0x87fb94", "<???> @ 0x60abc"], "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"}