// // BN_hex2bn from 0x9ec3ac to 0x9ec55c (432 bytes) // // 4 xrefs: // > BN_asc2bn @ 0x9ec784 // > s2i_ASN1_INTEGER @ 0xa71cd0 // > EC_POINT_hex2point @ 0xaa02d0 // > @ 0x7996c // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:07:27 +0000 // int __fastcall BN_hex2bn(int ***a1, _BYTE *a2) { _BYTE *v2; // r6 int v3; // r3 _BYTE *v4; // r2 int v5; // r5 int v6; // t1 int v7; // r1 int **v8; // r9 int v10; // r1 int v11; // r7 int *v12; // r8 int v13; // r3 unsigned __int8 *v14; // r10 int v15; // r11 int v16; // t1 int v17; // r0 int *v18; // r3 _BOOL4 v20; // [sp+8h] [bp-Ch] int v21; // [sp+Ch] [bp-8h] v2 = a2; if ( !a2 ) return 0; v3 = (unsigned __int8)*a2; if ( !*a2 ) return 0; v20 = v3 == 45; if ( v3 == 45 ) v2 = a2 + 1; v4 = v2 - 1; v5 = 0; while ( 1 ) { v6 = (unsigned __int8)*++v4; v7 = *(_BYTE *)(ctype_ + v6 + 1) & 0x44; if ( (*(_BYTE *)(ctype_ + v6 + 1) & 0x44) == 0 ) break; if ( ++v5 == 0x20000000 ) { v8 = nullptr; goto LABEL_11; } } if ( v5 ) { v21 = v20 + v5; if ( !a1 ) return v20 + v5; v8 = *a1; if ( *a1 ) { BN_set_word(*a1, v7); } else { v8 = (int **)BN_new(); if ( !v8 ) return 0; } if ( 4 * v5 <= 2147483616 ) { v10 = (4 * v5 + 31) >> 5; if ( v10 <= (int)v8[2] || bn_expand2((int)v8, v10) ) { v11 = 0; v12 = nullptr; do { if ( v5 > 8 ) v13 = v5 - 8; else v13 = 0; v14 = &v2[v13]; v15 = 0; do { v16 = *v14++; v17 = OPENSSL_hexchar2int(v16); v15 = v17 & ~(v17 >> 31) | (16 * v15); } while ( v14 != &v2[v5] ); v5 -= 8; (*v8)[v11] = v15; v12 = (int *)((char *)v12 + 1); ++v11; } while ( v5 > 0 ); v8[1] = v12; bn_correct_top(v8); v18 = v8[1]; *a1 = v8; if ( v18 ) v8[3] = (int *)v20; return v21; } } } else { v8 = nullptr; } LABEL_11: if ( *a1 ) return 0; BN_free((int)v8); return 0; }