{"type": "func", "start": 10420216, "end": 10420496, "name": "CTLOG_new", "pseudocode": "// \n// CTLOG_new from 0x9efff8 to 0x9f0110 (280 bytes)\n// \n// 2 xrefs:\n// > CTLOG_new_from_base64 @ 0xa8ee74\n// > <???> @ 0x79ecc\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:29 +0000\n// \n\nint *__fastcall CTLOG_new(int a1, int a2)\n{\n  int *v4; // r4\n  int v5; // r0\n  int v6; // r0\n  int *result; // r0\n  int v8; // [sp+Ch] [bp-8h] BYREF\n\n  v4 = (int *)CRYPTO_zalloc(40, \"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  v8 = 0;\n  v6 = i2d_PUBKEY(a1, &v8);\n  if ( v6 <= 0 )\n  {\n    ERR_put_error(50, 125, 113, \"crypto/ct/ct_log.c\", 81);\n    CRYPTO_free(v8, \"crypto/ct/ct_log.c\", 88);\nLABEL_7:\n    CTLOG_free(v4);\n    return nullptr;\n  }\n  SHA256(v8, v6, v4 + 1);\n  CRYPTO_free(v8, \"crypto/ct/ct_log.c\", 88);\n  result = v4;\n  v4[9] = a1;\n  return result;\n}", "assembly": "; \n; CTLOG_new from 0x9efff8 to 0x9f0110 (280 bytes)\n; \n; 2 xrefs:\n; > CTLOG_new_from_base64 @ 0xa8ee74\n; > <???> @ 0x79ecc\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:29 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x9efff8\nLDR             R5, =(aCryptoCtCtLogC - 0x9F000C); \"crypto/ct/ct_log.c\" ; +0x4, 0x9efffc\nSUB             SP, SP, #0x14                                          ; +0x8, 0x9f0000\nADD             R5, PC, R5; \"crypto/ct/ct_log.c\"                       ; +0xc, 0x9f0004\nMOV             R6, R0                                                 ; +0x10, 0x9f0008\nMOV             R7, R1                                                 ; +0x14, 0x9f000c\nMOV             R0, #0x28 ; '('                                        ; +0x18, 0x9f0010\nMOV             R1, R5                                                 ; +0x1c, 0x9f0014\nMOV             R2, #0xED                                              ; +0x20, 0x9f0018\nBL              CRYPTO_zalloc                                          ; +0x24, 0x9f001c\nSUBS            R4, R0, #0                                             ; +0x28, 0x9f0020\nBEQ             loc_9F00CC                                             ; +0x2c, 0x9f0024\nMOV             R0, R7                                                 ; +0x30, 0x9f0028\nMOV             R1, R5                                                 ; +0x34, 0x9f002c\nMOV             R2, #0xF4                                              ; +0x38, 0x9f0030\nBL              CRYPTO_strdup                                          ; +0x3c, 0x9f0034\nCMP             R0, #0                                                 ; +0x40, 0x9f0038\nSTR             R0, [R4]                                               ; +0x44, 0x9f003c\nBEQ             loc_9F00F0                                             ; +0x48, 0x9f0040\nADD             R1, SP, #0x14+var_4                                    ; +0x4c, 0x9f0044\nMOV             R3, #0                                                 ; +0x50, 0x9f0048\nSTR             R3, [R1,#-4]!                                          ; +0x54, 0x9f004c\nMOV             R0, R6                                                 ; +0x58, 0x9f0050\nBL              i2d_PUBKEY                                             ; +0x5c, 0x9f0054\nADD             R2, R4, #4                                             ; +0x60, 0x9f0058\nSUBS            R1, R0, #0                                             ; +0x64, 0x9f005c\nBLE             loc_9F008C                                             ; +0x68, 0x9f0060\nLDR             R0, [SP,#0x14+var_8]                                   ; +0x6c, 0x9f0064\nBL              SHA256                                                 ; +0x70, 0x9f0068\nLDR             R0, [SP,#0x14+var_8]                                   ; +0x74, 0x9f006c\nMOV             R1, R5                                                 ; +0x78, 0x9f0070\nMOV             R2, #0x58 ; 'X'                                        ; +0x7c, 0x9f0074\nBL              CRYPTO_free                                            ; +0x80, 0x9f0078\nMOV             R0, R4                                                 ; +0x84, 0x9f007c\nSTR             R6, [R4,#0x24]                                         ; +0x88, 0x9f0080\nADD             SP, SP, #0x14                                          ; +0x8c, 0x9f0084\nPOP             {R4-R7,PC}                                             ; +0x90, 0x9f0088\nMOV             R3, #0x51 ; 'Q'                                        ; +0x94, 0x9f008c\nSTR             R3, [SP,#0x14+var_14]                                  ; +0x98, 0x9f0090\nMOV             R0, #0x32 ; '2'                                        ; +0x9c, 0x9f0094\nMOV             R1, #0x7D ; '}'                                        ; +0xa0, 0x9f0098\nMOV             R2, #0x71 ; 'q'                                        ; +0xa4, 0x9f009c\nMOV             R3, R5                                                 ; +0xa8, 0x9f00a0\nBL              ERR_put_error                                          ; +0xac, 0x9f00a4\nMOV             R1, R5                                                 ; +0xb0, 0x9f00a8\nLDR             R0, [SP,#0x14+var_8]                                   ; +0xb4, 0x9f00ac\nMOV             R2, #0x58 ; 'X'                                        ; +0xb8, 0x9f00b0\nBL              CRYPTO_free                                            ; +0xbc, 0x9f00b4\nMOV             R0, R4                                                 ; +0xc0, 0x9f00b8\nBL              CTLOG_free                                             ; +0xc4, 0x9f00bc\nMOV             R0, #0                                                 ; +0xc8, 0x9f00c0\nADD             SP, SP, #0x14                                          ; +0xcc, 0x9f00c4\nPOP             {R4-R7,PC}                                             ; +0xd0, 0x9f00c8\nMOV             R2, #0xF0                                              ; +0xd4, 0x9f00cc\nSTR             R2, [SP,#0x14+var_14]                                  ; +0xd8, 0x9f00d0\nMOV             R0, #0x32 ; '2'                                        ; +0xdc, 0x9f00d4\nMOV             R3, R5                                                 ; +0xe0, 0x9f00d8\nMOV             R1, #0x75 ; 'u'                                        ; +0xe4, 0x9f00dc\nMOV             R2, #0x41 ; 'A'                                        ; +0xe8, 0x9f00e0\nBL              ERR_put_error                                          ; +0xec, 0x9f00e4\nMOV             R0, R4                                                 ; +0xf0, 0x9f00e8\nB               loc_9F0084                                             ; +0xf4, 0x9f00ec\nMOV             R2, #0xF6                                              ; +0xf8, 0x9f00f0\nSTR             R2, [SP,#0x14+var_14]                                  ; +0xfc, 0x9f00f4\nMOV             R3, R5                                                 ; +0x100, 0x9f00f8\nMOV             R0, #0x32 ; '2'                                        ; +0x104, 0x9f00fc\nMOV             R1, #0x75 ; 'u'                                        ; +0x108, 0x9f0100\nMOV             R2, #0x41 ; 'A'                                        ; +0x10c, 0x9f0104\nBL              ERR_put_error                                          ; +0x110, 0x9f0108\nB               loc_9F00B8                                             ; +0x114, 0x9f010c", "xrefs": ["CTLOG_new_from_base64 @ 0xa8ee74", "<???> @ 0x79ecc"], "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"}