// // SRP_Calc_x from 0x836ba0 to 0x836d70 (464 bytes) // // 3 xrefs: // > srp_generate_client_master_secret @ 0x7b5c10 // > SRP_create_verifier_BN @ 0x838240 // > @ 0x5db8c // // 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 SRP_Calc_x(_DWORD *a1, const char *a2, const char *a3) { bool v3; // zf int v4; // r4 int *v8; // r7 int v9; // r0 int v10; // r0 _BYTE *v11; // r9 void *v12; // r0 int *v13; // r4 void *v15; // r0 _BYTE v16[24]; // [sp+4h] [bp-18h] BYREF v3 = a3 == nullptr; if ( a3 ) v3 = a2 == nullptr; v4 = v3; if ( !a1 ) v4 |= 1u; if ( v4 ) return nullptr; v8 = (int *)EVP_MD_CTX_new(); if ( !v8 ) return nullptr; v9 = BN_num_bits(a1); if ( v9 + 7 >= 0 ) v10 = v9 + 7; else v10 = v9 + 14; v11 = CRYPTO_malloc((void *)(v10 >> 3), (int)"crypto/srp/srp_lib.c", 128); if ( v11 && (v12 = EVP_sha1(), EVP_DigestInit_ex(v8, (int)v12, nullptr)) && (strlen(a2), EVP_DigestUpdate((int)v8)) && EVP_DigestUpdate((int)v8) && (strlen(a3), EVP_DigestUpdate((int)v8)) && EVP_DigestFinal_ex((int **)v8, (int)v16, nullptr) && (v15 = EVP_sha1(), EVP_DigestInit_ex(v8, (int)v15, nullptr)) && (BN_bn2bin(a1, v11), BN_num_bits(a1), EVP_DigestUpdate((int)v8)) && EVP_DigestUpdate((int)v8) && EVP_DigestFinal_ex((int **)v8, (int)v16, nullptr) ) { v13 = BN_bin2bn(v16, 20, nullptr); } else { v13 = nullptr; } CRYPTO_free(v11, (int)"crypto/srp/srp_lib.c", 149); EVP_MD_CTX_free(v8); return v13; }
GD Web Decomp Icon

GD Web Decomp

Raw Source