// // sub_830708 from 0x830708 to 0x8308d8 (464 bytes) // // 2 xrefs: // > sub_8308E4 @ 0x8309a0 // > @ 0xa38eac // // 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 sub_830708(int a1, void *a2, signed int *a3, int a4, int a5) { _DWORD *v5; // r4 int v7; // r0 int v11; // r12 int v12; // r0 signed int v13; // r5 int result; // r0 int v15; // r2 int v16; // r0 int v17; // r8 int v18; // r5 int v19; // r0 void *v20; // r0 void *v21; // r0 signed int v22; // [sp+14h] [bp-4h] BYREF v5 = *(_DWORD **)(a1 + 20); v7 = v5[5]; if ( !v7 ) { v13 = RSA_public_decrypt(a5, a4, (int)a2, *(_DWORD *)(*(_DWORD *)(a1 + 8) + 20)); LABEL_7: if ( v13 < 0 ) return v13; goto LABEL_9; } v11 = v5[4]; if ( v11 != 5 ) { if ( v11 == 1 ) { v12 = EVP_MD_type(v7); if ( int_rsa_verify(v12, 0, 0, a2, &v22, a4, a5, *(_DWORD *)(*(_DWORD *)(a1 + 8) + 20)) > 0 ) { v13 = v22; goto LABEL_7; } return 0; } return -1; } v15 = v5[8]; if ( !v15 ) { v20 = (void *)EVP_PKEY_size(*(_DWORD *)(a1 + 8)); v21 = CRYPTO_malloc(v20, (int)"crypto/rsa/rsa_pmeth.c", 91); v5[8] = v21; if ( !v21 ) return -1; v15 = (int)v21; } v16 = RSA_public_decrypt(a5, a4, v15, *(_DWORD *)(*(_DWORD *)(a1 + 8) + 20)); if ( v16 <= 0 ) return 0; v17 = v16 - 1; v18 = *(unsigned __int8 *)(v5[8] + v16 - 1); v19 = EVP_MD_type(v5[5]); if ( v18 != RSA_X931_hash_id(v19) ) { ERR_put_error(4, 141, 100, (int)"crypto/rsa/rsa_pmeth.c", 192); return 0; } v13 = EVP_MD_size(v5[5]); if ( v13 != v17 ) { ERR_put_error(4, 141, 143, (int)"crypto/rsa/rsa_pmeth.c", 197); return 0; } if ( a2 ) memcpy(a2, (const void *)v5[8], v13); LABEL_9: result = 1; *a3 = v13; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source