{"type": "func", "start": 14156908, "end": 14157024, "name": "CMAC_CTX_new", "pseudocode": "// \n// CMAC_CTX_new from 0xd8046c to 0xd804e0 (116 bytes)\n// \n// 4 xrefs:\n// > sub_E1D27C @ 0xe1d28c\n// > sub_E1D2AC @ 0xe1d2c0\n// > sub_E1D304 @ 0xe1d31c\n// > <???> @ 0x8cb08\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\n__int64 CMAC_CTX_new()\n{\n  __int64 result; // x0\n  __int64 v1; // x19\n  __int64 v2; // x20\n\n  result = CRYPTO_malloc(144, \"crypto/cmac/cmac.c\", 49);\n  v1 = result;\n  if ( result )\n  {\n    v2 = EVP_CIPHER_CTX_new();\n    *(_QWORD *)v1 = v2;\n    result = v1;\n    if ( v2 )\n    {\n      *(_DWORD *)(v1 + 136) = -1;\n    }\n    else\n    {\n      CRYPTO_free(v1, \"crypto/cmac/cmac.c\", 54);\n      return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; CMAC_CTX_new from 0xd8046c to 0xd804e0 (116 bytes)\n; \n; 4 xrefs:\n; > sub_E1D27C @ 0xe1d28c\n; > sub_E1D2AC @ 0xe1d2c0\n; > sub_E1D304 @ 0xe1d31c\n; > <???> @ 0x8cb08\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\nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0xd8046c\nMOV             X0, #0x90                                              ; +0x4, 0xd80470\nMOV             W2, #0x31 ; '1'                                        ; +0x8, 0xd80474\nMOV             X29, SP                                                ; +0xc, 0xd80478\nSTR             X21, [SP,#0x30+var_10]                                 ; +0x10, 0xd8047c\nADRL            X21, aCryptoCmacCmac; \"crypto/cmac/cmac.c\"             ; +0x14, 0xd80480\nMOV             X1, X21                                                ; +0x1c, 0xd80488\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x20, 0xd8048c\nBL              CRYPTO_malloc                                          ; +0x24, 0xd80490\nMOV             X19, X0                                                ; +0x28, 0xd80494\nCBZ             X0, loc_D804C8                                         ; +0x2c, 0xd80498\nBL              EVP_CIPHER_CTX_new                                     ; +0x30, 0xd8049c\nMOV             X20, X0                                                ; +0x34, 0xd804a0\nSTR             X0, [X19]                                              ; +0x38, 0xd804a4\nMOV             X0, X19                                                ; +0x3c, 0xd804a8\nCBZ             X20, loc_D804CC                                        ; +0x40, 0xd804ac\nMOV             W1, #0xFFFFFFFF                                        ; +0x44, 0xd804b0\nSTR             W1, [X19,#0x88]                                        ; +0x48, 0xd804b4\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x4c, 0xd804b8\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x50, 0xd804bc\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x54, 0xd804c0\nRET                                                                    ; +0x58, 0xd804c4\nB               loc_D804B8                                             ; +0x5c, 0xd804c8\nMOV             X1, X21                                                ; +0x60, 0xd804cc\nMOV             W2, #0x36 ; '6'                                        ; +0x64, 0xd804d0\nBL              CRYPTO_free                                            ; +0x68, 0xd804d4\nMOV             X0, X20                                                ; +0x6c, 0xd804d8\nB               loc_D804B8                                             ; +0x70, 0xd804dc", "xrefs": ["sub_E1D27C @ 0xe1d28c", "sub_E1D2AC @ 0xe1d2c0", "sub_E1D304 @ 0xe1d31c", "<???> @ 0x8cb08"], "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"}