{"type": "func", "start": 16803120, "end": 16803228, "name": "DH_set0_key", "pseudocode": "// \n// DH_set0_key from 0x1006530 to 0x100659c (108 bytes)\n// \n// 4 xrefs:\n// > tls_process_key_exchange @ 0xfca344\n// > tls_process_client_key_exchange @ 0xfd1650\n// > DSA_dup_DH @ 0x1007eac\n// > <???> @ 0xc5410\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:15:56 +0000\n// \n\n__int64 __fastcall DH_set0_key(__int64 a1, __int64 a2, __int64 a3)\n{\n  __int64 v4; // x0\n\n  v4 = *(_QWORD *)(a1 + 32);\n  if ( v4 )\n  {\n    if ( !a2 )\n      goto LABEL_4;\n  }\n  else if ( !a2 )\n  {\n    return 0;\n  }\n  BN_free(v4);\n  *(_QWORD *)(a1 + 32) = a2;\nLABEL_4:\n  if ( !a3 )\n    return 1;\n  BN_free(*(_QWORD *)(a1 + 40));\n  *(_QWORD *)(a1 + 40) = a3;\n  return 1;\n}", "assembly": "; \n; DH_set0_key from 0x1006530 to 0x100659c (108 bytes)\n; \n; 4 xrefs:\n; > tls_process_key_exchange @ 0xfca344\n; > tls_process_client_key_exchange @ 0xfd1650\n; > DSA_dup_DH @ 0x1007eac\n; > <???> @ 0xc5410\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:15:56 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x1006530\nMOV             X29, SP                                                ; +0x4, 0x1006534\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x1006538\nMOV             X19, X0                                                ; +0xc, 0x100653c\nLDR             X0, [X0,#0x20]                                         ; +0x10, 0x1006540\nMOV             X20, X2                                                ; +0x14, 0x1006544\nCBZ             X0, loc_1006590                                        ; +0x18, 0x1006548\nCBZ             X1, loc_1006560                                        ; +0x1c, 0x100654c\nSTR             X1, [X29,#0x30+var_8]                                  ; +0x20, 0x1006550\nBL              BN_free                                                ; +0x24, 0x1006554\nLDR             X1, [X29,#0x30+var_8]                                  ; +0x28, 0x1006558\nSTR             X1, [X19,#0x20]                                        ; +0x2c, 0x100655c\nCBZ             X20, loc_1006580                                       ; +0x30, 0x1006560\nLDR             X0, [X19,#0x28]                                        ; +0x34, 0x1006564\nBL              BN_free                                                ; +0x38, 0x1006568\nSTR             X20, [X19,#0x28]                                       ; +0x3c, 0x100656c\nMOV             W0, #1                                                 ; +0x40, 0x1006570\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x44, 0x1006574\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x48, 0x1006578\nRET                                                                    ; +0x4c, 0x100657c\nMOV             W0, #1                                                 ; +0x50, 0x1006580\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x54, 0x1006584\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x58, 0x1006588\nRET                                                                    ; +0x5c, 0x100658c\nCBNZ            X1, loc_1006550                                        ; +0x60, 0x1006590\nMOV             W0, W1                                                 ; +0x64, 0x1006594\nB               loc_1006574                                            ; +0x68, 0x1006598", "xrefs": ["tls_process_key_exchange @ 0xfca344", "tls_process_client_key_exchange @ 0xfd1650", "DSA_dup_DH @ 0x1007eac", "<???> @ 0xc5410"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}