// // BN_lshift from 0x9eccdc to 0x9ece0c (304 bytes) // // 14 xrefs: // > BN_MONT_CTX_set @ 0x9ea480 // > BN_div_word @ 0x9ed434 // > ec_GFp_simple_group_check_discriminant @ 0xa07f48 // > OBJ_obj2txt @ 0xa315dc // > BN_div @ 0xa810c0 // > BN_div @ 0xa810e4 // > BN_gcd @ 0xa83cd8 // > int_bn_mod_inverse @ 0xa84388 // > BN_mod_lshift_quick @ 0xa8515c // > dsa_builtin_paramgen @ 0xa94f90 // > dsa_builtin_paramgen @ 0xa953c0 // > dsa_builtin_paramgen2 @ 0xa95c78 // > dsa_builtin_paramgen2 @ 0xa95f04 // > @ 0x7984c // // 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_lshift(_DWORD *a1, int *a2, int a3) { char v3; // r7 int v5; // r5 int v6; // r3 int v7; // r1 int result; // r0 _DWORD *v10; // r0 char v11; // r1 int v12; // r12 int v13; // lr int v14; // r10 size_t v15; // r2 int *v16; // r3 int v17; // r12 unsigned int v18; // t1 int v19; // r7 int v20; // r3 _DWORD *v21; // r2 int v22; // r3 int v23; // t1 v3 = a3; if ( a3 < 0 ) { ERR_put_error(3, 145, 119, "crypto/bn/bn_shift.c", 91); return 0; } v5 = a3 >> 5; v6 = a2[3]; v7 = (a3 >> 5) + a2[1] + 1; a1[3] = v6; result = bn_wexpand((int)a1, v7); if ( result ) { v10 = (_DWORD *)*a1; v11 = v3 & 0x1F; v12 = *a2; *(_DWORD *)(*a1 + 4 * (v5 + a2[1])) = 0; if ( (v3 & 0x1F) != 0 ) { v13 = a2[1]; if ( v13 - 1 >= 0 ) { v14 = v10[v5 + v13]; v15 = 4 * v5; v16 = &v10[v5 + v13]; v17 = v12 + 4 * v13; do { v18 = *(_DWORD *)(v17 - 4); v17 -= 4; v19 = v14 | (v18 >> (32 - v11)); v14 = v18 << v11; *v16 = v19; *--v16 = v18 << v11; } while ( v16 != &v10[v5] ); goto LABEL_7; } } else { v20 = a2[1]; if ( v20 - 1 >= 0 ) { v21 = &v10[v5 - 1 + v20]; v22 = v12 + 4 * v20; do { v23 = *(_DWORD *)(v22 - 4); v22 -= 4; *v21-- = v23; } while ( v22 != v12 ); } } v15 = 4 * v5; LABEL_7: memset(v10, 0, v15); a1[1] = v5 + a2[1] + 1; bn_correct_top(a1); return 1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source