//
// bn_mul_low_recursive from 0x7d7258 to 0x7d736c (276 bytes)
//
// 3 xrefs:
// > bn_mul_low_recursive @ 0x7d7320
// > bn_mul_low_recursive @ 0x7d734c
// > ??> @ 0x5febc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall bn_mul_low_recursive(int a1, _DWORD *a2, _DWORD *a3, int a4, int a5)
{
int v5; // r4
int v10; // r0
int v11; // r1
int v12; // r2
int v13; // r5
int v14; // r6
v5 = a4 / 2;
bn_mul_recursive(a1, a2, a3, a4 / 2, 0, 0, a5);
if ( v5 > 31 )
{
v13 = a5 + 4 * a4;
v14 = a1 + 4 * v5;
bn_mul_low_recursive(a5, a2, &a3[v5], v5, v13);
bn_add_words(v14, v14, a5, v5);
bn_mul_low_recursive(a5, &a2[v5], a3, v5, v13);
v10 = v14;
v11 = v14;
v12 = a5;
}
else
{
bn_mul_low_normal(a5, (int)a2, &a3[v5], v5);
bn_mul_low_normal(a5 + 4 * v5, (int)&a2[v5], a3, v5);
bn_add_words(a1 + 4 * v5, a1 + 4 * v5, a5, v5);
v10 = a1 + 4 * v5;
v11 = v10;
v12 = a5 + 4 * v5;
}
return bn_add_words(v10, v11, v12, v5);
}