{"type": "func", "start": 16781832, "end": 16782124, "name": "CTLOG_new", "pseudocode": "// \n// CTLOG_new from 0x1001208 to 0x100132c (292 bytes)\n// \n// 2 xrefs:\n// > CTLOG_new_from_base64 @ 0x10a2cf4\n// > <???> @ 0xb2870\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:54 +0000\n// \n\n__int64 *__fastcall CTLOG_new(__int64 a1, __int64 a2)\n{\n  __int64 *v4; // x19\n  __int64 v5; // x0\n  __int64 v7; // [xsp+38h] [xbp+38h] BYREF\n\n  v4 = (__int64 *)CRYPTO_zalloc(48, \"crypto/ct/ct_log.c\", 237);\n  if ( !v4 )\n  {\n    ERR_put_error(50, 117, 65, \"crypto/ct/ct_log.c\", 240);\n    return nullptr;\n  }\n  v5 = CRYPTO_strdup(a2, \"crypto/ct/ct_log.c\", 244);\n  *v4 = v5;\n  if ( !v5 )\n  {\n    ERR_put_error(50, 117, 65, \"crypto/ct/ct_log.c\", 246);\n    goto LABEL_7;\n  }\n  v7 = 0;\n  if ( (int)i2d_PUBKEY(a1, &v7) <= 0 )\n  {\n    ERR_put_error(50, 125, 113, \"crypto/ct/ct_log.c\", 81);\n    CRYPTO_free(v7, \"crypto/ct/ct_log.c\", 88);\nLABEL_7:\n    CTLOG_free(v4);\n    return nullptr;\n  }\n  SHA256(v7);\n  CRYPTO_free(v7, \"crypto/ct/ct_log.c\", 88);\n  v4[5] = a1;\n  return v4;\n}", "assembly": "; \n; CTLOG_new from 0x1001208 to 0x100132c (292 bytes)\n; \n; 2 xrefs:\n; > CTLOG_new_from_base64 @ 0x10a2cf4\n; > <???> @ 0xb2870\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:54 +0000\n; \nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x1001208\nMOV             W2, #0xED                                              ; +0x4, 0x100120c\nMOV             X29, SP                                                ; +0x8, 0x1001210\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0xc, 0x1001214\nADRL            X20, aCryptoCtCtLogC; \"crypto/ct/ct_log.c\"             ; +0x10, 0x1001218\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0x18, 0x1001220\nMOV             X21, X0                                                ; +0x1c, 0x1001224\nMOV             X22, X1                                                ; +0x20, 0x1001228\nMOV             X0, #0x30 ; '0'                                        ; +0x24, 0x100122c\nMOV             X1, X20                                                ; +0x28, 0x1001230\nBL              CRYPTO_zalloc                                          ; +0x2c, 0x1001234\nMOV             X19, X0                                                ; +0x30, 0x1001238\nCBZ             X0, loc_10012F0                                        ; +0x34, 0x100123c\nMOV             X0, X22                                                ; +0x38, 0x1001240\nMOV             X1, X20                                                ; +0x3c, 0x1001244\nMOV             W2, #0xF4                                              ; +0x40, 0x1001248\nBL              CRYPTO_strdup                                          ; +0x44, 0x100124c\nSTR             X0, [X19]                                              ; +0x48, 0x1001250\nCBZ             X0, loc_1001310                                        ; +0x4c, 0x1001254\nADD             X1, X29, #0x40+arg_0                                   ; +0x50, 0x1001258\nMOV             X0, X21                                                ; +0x54, 0x100125c\nADD             X22, X19, #8                                           ; +0x58, 0x1001260\nSTR             XZR, [X1,#-8]!                                         ; +0x5c, 0x1001264\nBL              i2d_PUBKEY                                             ; +0x60, 0x1001268\nSXTW            X1, W0                                                 ; +0x64, 0x100126c\nCMP             W1, WZR                                                ; +0x68, 0x1001270\nB.LE            loc_10012AC                                            ; +0x6c, 0x1001274\nLDR             X0, [X29,#0x40+var_8]                                  ; +0x70, 0x1001278\nMOV             X2, X22                                                ; +0x74, 0x100127c\nBL              SHA256                                                 ; +0x78, 0x1001280\nLDR             X0, [X29,#0x40+var_8]                                  ; +0x7c, 0x1001284\nMOV             X1, X20                                                ; +0x80, 0x1001288\nMOV             W2, #0x58 ; 'X'                                        ; +0x84, 0x100128c\nBL              CRYPTO_free                                            ; +0x88, 0x1001290\nSTR             X21, [X19,#0x28]                                       ; +0x8c, 0x1001294\nMOV             X0, X19                                                ; +0x90, 0x1001298\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x94, 0x100129c\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x98, 0x10012a0\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x9c, 0x10012a4\nRET                                                                    ; +0xa0, 0x10012a8\nMOV             W0, #0x32 ; '2'                                        ; +0xa4, 0x10012ac\nMOV             W1, #0x7D ; '}'                                        ; +0xa8, 0x10012b0\nMOV             W2, #0x71 ; 'q'                                        ; +0xac, 0x10012b4\nMOV             X3, X20                                                ; +0xb0, 0x10012b8\nMOV             W4, #0x51 ; 'Q'                                        ; +0xb4, 0x10012bc\nBL              ERR_put_error                                          ; +0xb8, 0x10012c0\nLDR             X0, [X29,#0x40+var_8]                                  ; +0xbc, 0x10012c4\nMOV             X1, X20                                                ; +0xc0, 0x10012c8\nMOV             W2, #0x58 ; 'X'                                        ; +0xc4, 0x10012cc\nBL              CRYPTO_free                                            ; +0xc8, 0x10012d0\nMOV             X0, X19                                                ; +0xcc, 0x10012d4\nBL              CTLOG_free                                             ; +0xd0, 0x10012d8\nMOV             X0, #0                                                 ; +0xd4, 0x10012dc\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xd8, 0x10012e0\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0xdc, 0x10012e4\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xe0, 0x10012e8\nRET                                                                    ; +0xe4, 0x10012ec\nMOV             W0, #0x32 ; '2'                                        ; +0xe8, 0x10012f0\nMOV             W1, #0x75 ; 'u'                                        ; +0xec, 0x10012f4\nMOV             W2, #0x41 ; 'A'                                        ; +0xf0, 0x10012f8\nMOV             X3, X20                                                ; +0xf4, 0x10012fc\nMOV             W4, #0xF0                                              ; +0xf8, 0x1001300\nBL              ERR_put_error                                          ; +0xfc, 0x1001304\nMOV             X0, X19                                                ; +0x100, 0x1001308\nB               loc_100129C                                            ; +0x104, 0x100130c\nMOV             W0, #0x32 ; '2'                                        ; +0x108, 0x1001310\nMOV             W1, #0x75 ; 'u'                                        ; +0x10c, 0x1001314\nMOV             W2, #0x41 ; 'A'                                        ; +0x110, 0x1001318\nMOV             X3, X20                                                ; +0x114, 0x100131c\nMOV             W4, #0xF6                                              ; +0x118, 0x1001320\nBL              ERR_put_error                                          ; +0x11c, 0x1001324\nB               loc_10012D4                                            ; +0x120, 0x1001328", "xrefs": ["CTLOG_new_from_base64 @ 0x10a2cf4", "<???> @ 0xb2870"], "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"}