{"type": "func", "start": 8238072, "end": 8238352, "name": "CTLOG_new", "pseudocode": "// \n// CTLOG_new from 0x7db3f8 to 0x7db510 (280 bytes)\n// \n// 2 xrefs:\n// > CTLOG_new_from_base64 @ 0x87a274\n// > <???> @ 0x6044c\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 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 0x7db3f8 to 0x7db510 (280 bytes)\n; \n; 2 xrefs:\n; > CTLOG_new_from_base64 @ 0x87a274\n; > <???> @ 0x6044c\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            {R4-R7,LR}                                             ; +0x0, 0x7db3f8\nLDR             R5, =(aCryptoCtCtLogC - 0x7DB40C); \"crypto/ct/ct_log.c\" ; +0x4, 0x7db3fc\nSUB             SP, SP, #0x14                                          ; +0x8, 0x7db400\nADD             R5, PC, R5; \"crypto/ct/ct_log.c\"                       ; +0xc, 0x7db404\nMOV             R6, R0                                                 ; +0x10, 0x7db408\nMOV             R7, R1                                                 ; +0x14, 0x7db40c\nMOV             R0, #0x28 ; '('                                        ; +0x18, 0x7db410\nMOV             R1, R5                                                 ; +0x1c, 0x7db414\nMOV             R2, #0xED                                              ; +0x20, 0x7db418\nBL              CRYPTO_zalloc                                          ; +0x24, 0x7db41c\nSUBS            R4, R0, #0                                             ; +0x28, 0x7db420\nBEQ             loc_7DB4CC                                             ; +0x2c, 0x7db424\nMOV             R0, R7                                                 ; +0x30, 0x7db428\nMOV             R1, R5                                                 ; +0x34, 0x7db42c\nMOV             R2, #0xF4                                              ; +0x38, 0x7db430\nBL              CRYPTO_strdup                                          ; +0x3c, 0x7db434\nCMP             R0, #0                                                 ; +0x40, 0x7db438\nSTR             R0, [R4]                                               ; +0x44, 0x7db43c\nBEQ             loc_7DB4F0                                             ; +0x48, 0x7db440\nADD             R1, SP, #0x14+var_4                                    ; +0x4c, 0x7db444\nMOV             R3, #0                                                 ; +0x50, 0x7db448\nSTR             R3, [R1,#-4]!                                          ; +0x54, 0x7db44c\nMOV             R0, R6                                                 ; +0x58, 0x7db450\nBL              i2d_PUBKEY                                             ; +0x5c, 0x7db454\nADD             R2, R4, #4                                             ; +0x60, 0x7db458\nSUBS            R1, R0, #0                                             ; +0x64, 0x7db45c\nBLE             loc_7DB48C                                             ; +0x68, 0x7db460\nLDR             R0, [SP,#0x14+var_8]                                   ; +0x6c, 0x7db464\nBL              SHA256                                                 ; +0x70, 0x7db468\nLDR             R0, [SP,#0x14+var_8]                                   ; +0x74, 0x7db46c\nMOV             R1, R5                                                 ; +0x78, 0x7db470\nMOV             R2, #0x58 ; 'X'                                        ; +0x7c, 0x7db474\nBL              CRYPTO_free                                            ; +0x80, 0x7db478\nMOV             R0, R4                                                 ; +0x84, 0x7db47c\nSTR             R6, [R4,#0x24]                                         ; +0x88, 0x7db480\nADD             SP, SP, #0x14                                          ; +0x8c, 0x7db484\nPOP             {R4-R7,PC}                                             ; +0x90, 0x7db488\nMOV             R3, #0x51 ; 'Q'                                        ; +0x94, 0x7db48c\nSTR             R3, [SP,#0x14+var_14]                                  ; +0x98, 0x7db490\nMOV             R0, #0x32 ; '2'                                        ; +0x9c, 0x7db494\nMOV             R1, #0x7D ; '}'                                        ; +0xa0, 0x7db498\nMOV             R2, #0x71 ; 'q'                                        ; +0xa4, 0x7db49c\nMOV             R3, R5                                                 ; +0xa8, 0x7db4a0\nBL              ERR_put_error                                          ; +0xac, 0x7db4a4\nMOV             R1, R5                                                 ; +0xb0, 0x7db4a8\nLDR             R0, [SP,#0x14+var_8]                                   ; +0xb4, 0x7db4ac\nMOV             R2, #0x58 ; 'X'                                        ; +0xb8, 0x7db4b0\nBL              CRYPTO_free                                            ; +0xbc, 0x7db4b4\nMOV             R0, R4                                                 ; +0xc0, 0x7db4b8\nBL              CTLOG_free                                             ; +0xc4, 0x7db4bc\nMOV             R0, #0                                                 ; +0xc8, 0x7db4c0\nADD             SP, SP, #0x14                                          ; +0xcc, 0x7db4c4\nPOP             {R4-R7,PC}                                             ; +0xd0, 0x7db4c8\nMOV             R2, #0xF0                                              ; +0xd4, 0x7db4cc\nSTR             R2, [SP,#0x14+var_14]                                  ; +0xd8, 0x7db4d0\nMOV             R0, #0x32 ; '2'                                        ; +0xdc, 0x7db4d4\nMOV             R3, R5                                                 ; +0xe0, 0x7db4d8\nMOV             R1, #0x75 ; 'u'                                        ; +0xe4, 0x7db4dc\nMOV             R2, #0x41 ; 'A'                                        ; +0xe8, 0x7db4e0\nBL              ERR_put_error                                          ; +0xec, 0x7db4e4\nMOV             R0, R4                                                 ; +0xf0, 0x7db4e8\nB               loc_7DB484                                             ; +0xf4, 0x7db4ec\nMOV             R2, #0xF6                                              ; +0xf8, 0x7db4f0\nSTR             R2, [SP,#0x14+var_14]                                  ; +0xfc, 0x7db4f4\nMOV             R3, R5                                                 ; +0x100, 0x7db4f8\nMOV             R0, #0x32 ; '2'                                        ; +0x104, 0x7db4fc\nMOV             R1, #0x75 ; 'u'                                        ; +0x108, 0x7db500\nMOV             R2, #0x41 ; 'A'                                        ; +0x10c, 0x7db504\nBL              ERR_put_error                                          ; +0x110, 0x7db508\nB               loc_7DB4B8                                             ; +0x114, 0x7db50c", "xrefs": ["CTLOG_new_from_base64 @ 0x87a274", "<???> @ 0x6044c"], "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"}