{"type": "func", "start": 9217192, "end": 9217404, "name": "BN_GF2m_mod_exp", "pseudocode": "// \n// BN_GF2m_mod_exp from 0x8ca4a8 to 0x8ca57c (212 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6ba3c\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 BN_GF2m_mod_exp(int **a1, int **a2, _DWORD *a3, int **a4, int ***a5)\n{\n  int v9; // r5\n  int *v10; // r10\n  int v11; // r4\n  int v12; // r0\n  _BOOL4 v13; // r12\n\n  v9 = BN_num_bits(a4) + 1;\n  v10 = (int *)CRYPTO_malloc((void *)(4 * v9), (int)\"crypto/bn/bn_gf2m.c\", 964);\n  if ( v10 )\n  {\n    v12 = BN_GF2m_poly2arr(a4, (int)v10, v9);\n    v13 = v12 == 0;\n    if ( v12 > v9 )\n      v13 = 1;\n    v11 = v12;\n    if ( v13 )\n      ERR_put_error(3, 132, 106, (int)\"crypto/bn/bn_gf2m.c\", 968);\n    else\n      v11 = BN_GF2m_mod_exp_arr(a1, a2, a3, v10, a5);\n  }\n  else\n  {\n    v11 = 0;\n  }\n  CRYPTO_free(v10, (int)\"crypto/bn/bn_gf2m.c\", 974);\n  return v11;\n}", "assembly": "; \n; BN_GF2m_mod_exp from 0x8ca4a8 to 0x8ca57c (212 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6ba3c\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-R10,LR}                                            ; +0x0, 0x8ca4a8\nMOV             R9, R0                                                 ; +0x4, 0x8ca4ac\nSUB             SP, SP, #8                                             ; +0x8, 0x8ca4b0\nMOV             R0, R3                                                 ; +0xc, 0x8ca4b4\nMOV             R4, R3                                                 ; +0x10, 0x8ca4b8\nMOV             R8, R1                                                 ; +0x14, 0x8ca4bc\nMOV             R7, R2                                                 ; +0x18, 0x8ca4c0\nBL              BN_num_bits                                            ; +0x1c, 0x8ca4c4\nLDR             R6, =(aCryptoBnBnGf2m - 0x8CA4D8); \"crypto/bn/bn_gf2m.c\" ; +0x20, 0x8ca4c8\nMOV             R2, #0x3C4                                             ; +0x24, 0x8ca4cc\nADD             R6, PC, R6; \"crypto/bn/bn_gf2m.c\"                      ; +0x28, 0x8ca4d0\nMOV             R1, R6                                                 ; +0x2c, 0x8ca4d4\nADD             R5, R0, #1                                             ; +0x30, 0x8ca4d8\nMOV             R0, R5,LSL#2                                           ; +0x34, 0x8ca4dc\nBL              CRYPTO_malloc                                          ; +0x38, 0x8ca4e0\nSUBS            R10, R0, #0                                            ; +0x3c, 0x8ca4e4\nMOVEQ           R4, R10                                                ; +0x40, 0x8ca4e8\nBEQ             loc_8CA53C                                             ; +0x44, 0x8ca4ec\nMOV             R0, R4                                                 ; +0x48, 0x8ca4f0\nMOV             R1, R10                                                ; +0x4c, 0x8ca4f4\nMOV             R2, R5                                                 ; +0x50, 0x8ca4f8\nBL              BN_GF2m_poly2arr                                       ; +0x54, 0x8ca4fc\nCLZ             R12, R0                                                ; +0x58, 0x8ca500\nMOV             R12, R12,LSR#5                                         ; +0x5c, 0x8ca504\nCMP             R0, R5                                                 ; +0x60, 0x8ca508\nORRGT           R12, R12, #1                                           ; +0x64, 0x8ca50c\nCMP             R12, #0                                                ; +0x68, 0x8ca510\nMOV             R4, R0                                                 ; +0x6c, 0x8ca514\nBNE             loc_8CA55C                                             ; +0x70, 0x8ca518\nLDR             R3, [SP,#8+arg_0]                                      ; +0x74, 0x8ca51c\nSTR             R3, [SP,#8+var_8]                                      ; +0x78, 0x8ca520\nMOV             R0, R9                                                 ; +0x7c, 0x8ca524\nMOV             R1, R8                                                 ; +0x80, 0x8ca528\nMOV             R2, R7                                                 ; +0x84, 0x8ca52c\nMOV             R3, R10                                                ; +0x88, 0x8ca530\nBL              BN_GF2m_mod_exp_arr                                    ; +0x8c, 0x8ca534\nMOV             R4, R0                                                 ; +0x90, 0x8ca538\nLDR             R1, =(aCryptoBnBnGf2m - 0x8CA54C); \"crypto/bn/bn_gf2m.c\" ; +0x94, 0x8ca53c\nMOV             R0, R10                                                ; +0x98, 0x8ca540\nADD             R1, PC, R1; \"crypto/bn/bn_gf2m.c\"                      ; +0x9c, 0x8ca544\nLDR             R2, =0x3CE                                             ; +0xa0, 0x8ca548\nBL              CRYPTO_free                                            ; +0xa4, 0x8ca54c\nMOV             R0, R4                                                 ; +0xa8, 0x8ca550\nADD             SP, SP, #8                                             ; +0xac, 0x8ca554\nPOP             {R4-R10,PC}                                            ; +0xb0, 0x8ca558\nMOV             R2, #0x3C8                                             ; +0xb4, 0x8ca55c\nSTR             R2, [SP,#8+var_8]                                      ; +0xb8, 0x8ca560\nMOV             R3, R6                                                 ; +0xbc, 0x8ca564\nMOV             R0, #3                                                 ; +0xc0, 0x8ca568\nMOV             R1, #0x84                                              ; +0xc4, 0x8ca56c\nMOV             R2, #0x6A ; 'j'                                        ; +0xc8, 0x8ca570\nBL              ERR_put_error                                          ; +0xcc, 0x8ca574\nB               loc_8CA53C                                             ; +0xd0, 0x8ca578", "xrefs": ["<???> @ 0x6ba3c"], "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"}