instruction
stringlengths 25
119k
| response
stringclasses 1
value |
---|---|
__int64 __fastcall FUNC(
__int64 a1,
char *a2,
__int64 a3,
unsigned __int64 a4,
void (__fastcall *a5)(char *, __int64, __int64, __int64, __int64))
{
unsigned __int64 v6; // rsi
unsigned __int64 v8; // rcx
int v10; // r12d
__int64 v12; // rax
__int64 v13; // rax
int v14; // r15d
__int64 v15; // r13
__int64 v16; // r8
char v17; // dl
unsigned __int64 v18; // rbx
unsigned __int64 v19; // rbx
int v20; // r15d
char *v21; // rbp
_BYTE *v22; // r9
__int64 v23; // rdx
char *v24; // r8
char v25; // cl
char v26; // al
int v27; // [rsp+30h] [rbp-48h]
__int64 v28; // [rsp+38h] [rbp-40h]
int v29; // [rsp+80h] [rbp+8h]
unsigned __int64 v30; // [rsp+98h] [rbp+20h]
v6 = a4;
v28 = *(_QWORD *)(a1 + 384);
v8 = a4 + *(_QWORD *)(a1 + 56);
if ( v8 > 0xFFFFFFFE0i64 || v8 < a4 )
return 0xFFFFFFFFi64;
v10 = *(_DWORD *)(a1 + 368);
*(_QWORD *)(a1 + 56) = v8;
v29 = v10;
if ( *(_DWORD *)(a1 + 372) )
{
if ( !a4 )
{
FUNC((_BYTE *)(a1 + 64), a1 + 96);
*(_DWORD *)(a1 + 372) = 0;
return 0i64;
}
v12 = *(_QWORD *)(a1 + 64);
v10 = 16;
*(_DWORD *)(a1 + 372) = 0;
*(_QWORD *)(a1 + 392) = v12;
v13 = *(_QWORD *)(a1 + 72);
*(_QWORD *)(a1 + 64) = 0i64;
*(_QWORD *)(a1 + 72) = 0i64;
v29 = 16;
*(_QWORD *)(a1 + 400) = v13;
}
v14 = *(unsigned __int8 *)(a1 + 15) | ((*(unsigned __int8 *)(a1 + 14) | ((*(unsigned __int8 *)(a1 + 13) | (*(unsigned __int8 *)(a1 + 12) << 8)) << 8)) << 8);
v15 = v10 & 0xF;
v27 = v10 & 0xF;
if ( (v10 & 0xF) != 0 )
{
v16 = v10;
while ( v6 )
{
v17 = *a2;
++a3;
++v10;
*(_BYTE *)(v16 + a1 + 392) = *a2;
++v16;
++a2;
--v6;
*(_BYTE *)(a3 - 1) = v17 ^ *(_BYTE *)(v15 + a1 + 16);
v15 = ((_BYTE)v15 + 1) & 0xF;
v27 = v15;
if ( !(_DWORD)v15 )
goto LABEL_13;
}
if ( (_DWORD)v15 )
goto LABEL_26;
LABEL_13:
FUNC((_BYTE *)(a1 + 64), a1 + 96, a1 + 392, (unsigned int)v10);
v10 = 0;
v29 = 0;
}
if ( v6 >= 0x10 && v10 )
{
FUNC((_BYTE *)(a1 + 64), a1 + 96, a1 + 392, (unsigned int)v10);
v10 = 0;
v29 = 0;
}
if ( v6 >= 0xC00 )
{
v18 = v6 / 0xC00;
do
{
FUNC((_BYTE *)(a1 + 64), a1 + 96, (__int64)a2, 3072i64);
a5(a2, a3, 192i64, v28, a1);
v14 += 192;
a3 += 3072i64;
a2 += 3072;
*(_BYTE *)(a1 + 15) = v14;
*(_BYTE *)(a1 + 12) = HIBYTE(v14);
*(_BYTE *)(a1 + 13) = BYTE2(v14);
--v18;
*(_BYTE *)(a1 + 14) = BYTE1(v14);
}
while ( v18 );
v6 %= 0xC00ui64;
v10 = v29;
LODWORD(v15) = v27;
}
v30 = v6 & 0xFFFFFFFFFFFFFFF0ui64;
if ( (v6 & 0xFFFFFFFFFFFFFFF0ui64) != 0 )
{
v19 = (v6 & 0xFFFFFFFFFFFFFFF0ui64) >> 4;
FUNC((_BYTE *)(a1 + 64), a1 + 96, (__int64)a2, v6 & 0xFFFFFFFFFFFFFFF0ui64);
a5(a2, a3, v19, v28, a1);
v14 += v19;
*(_BYTE *)(a1 + 15) = v14;
*(_BYTE *)(a1 + 12) = HIBYTE(v14);
*(_BYTE *)(a1 + 13) = BYTE2(v14);
*(_BYTE *)(a1 + 14) = BYTE1(v14);
a3 += v30;
a2 += v30;
v6 -= v30;
}
if ( v6 )
{
(*(void (__fastcall **)(__int64, __int64, __int64))(a1 + 376))(a1, a1 + 16, v28);
v20 = v14 + 1;
v21 = &a2[-a3];
*(_BYTE *)(a1 + 15) = v20;
v22 = (_BYTE *)(v10 + a1 + 392);
*(_BYTE *)(a1 + 12) = HIBYTE(v20);
*(_BYTE *)(a1 + 13) = BYTE2(v20);
v10 += v6;
*(_BYTE *)(a1 + 14) = BYTE1(v20);
v23 = (int)v15 + a3;
v24 = (char *)((int)v15 + a1 + 16);
do
{
v25 = v21[v23++];
*v22++ = v25;
v26 = *v24++;
--v6;
*(_BYTE *)(v23 - 1) = v25 ^ v26;
}
while ( v6 );
}
LABEL_26:
*(_DWORD *)(a1 + 368) = v10;
return 0i64;
}
| openssl |
__int64 (__fastcall *__fastcall FUNC(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
_QWORD *a5))(__int64, __int64, __int64, _QWORD)
{
__int64 (__fastcall *result)(__int64, __int64, __int64, _QWORD); // rax
result = (__int64 (__fastcall *)(__int64, __int64, __int64, _QWORD))a5[2];
if ( result )
return (__int64 (__fastcall *)(__int64, __int64, __int64, _QWORD))result(a1, a2, a4, *a5);
return result;
}
| openssl |
void *__fastcall FUNC(int *a1, char *a2)
{
int v5; // ebx
__int64 v6; // rax
unsigned __int8 *v7; // rcx
int v8; // edx
int v9; // r8d
void **v10; // rax
void **v11; // rbx
if ( !a1 )
return 0i64;
v5 = 0;
if ( (int)FUNC((unsigned int *)a1) <= 0 )
{
LABEL_9:
v10 = FUNC(a2);
v11 = v10;
if ( v10 )
{
if ( (int)FUNC(a1, (__int64)v10, 0) > 0 )
return v11[1];
CRYPTO_free(*v11, "crypto\\srp\\srp_vfy.c", 333i64);
FUNC((__int64)v11[1]);
CRYPTO_free(v11, "crypto\\srp\\srp_vfy.c", 335i64);
}
return 0i64;
}
else
{
while ( 1 )
{
v6 = FUNC((__int64)a1, v5);
v7 = *(unsigned __int8 **)v6;
do
{
v8 = (unsigned __int8)a2[(_QWORD)v7 - *(_QWORD *)v6];
v9 = *v7 - v8;
if ( v9 )
break;
++v7;
}
while ( v8 );
if ( !v9 )
return *(void **)(v6 + 8);
if ( ++v5 >= (int)FUNC((unsigned int *)a1) )
goto LABEL_9;
}
}
}
| openssl |
char *__cdecl strerror(int ErrorMessage)
{
__int64 v2; // rax
__int64 v3; // rbx
__int64 v5; // rax
char *v6; // rbx
__int64 v7; // rax
v2 = getptd_noexit();
v3 = v2;
if ( !v2 )
return "Visual C++ CRT: Not enough memory to complete call to strerror.";
if ( !*(_QWORD *)(v2 + 56) )
{
v5 = calloc_crt(134i64, 1i64);
*(_QWORD *)(v3 + 56) = v5;
if ( !v5 )
return "Visual C++ CRT: Not enough memory to complete call to strerror.";
}
v6 = *(char **)(v3 + 56);
if ( ErrorMessage < 0 || ErrorMessage >= *(_DWORD *)FUNC() )
ErrorMessage = *(_DWORD *)FUNC();
v7 = FUNC();
if ( strcpy_s(v6, 0x86ui64, *(const char **)(v7 + 8i64 * ErrorMessage)) )
invoke_watson(0i64, 0i64, 0i64, 0, 0i64);
return v6;
}
| openssl |
__int64 __fastcall X509_CRL_verify_0(X509_crl_st *crl, evp_pkey_st *r)
{
__int64 (__fastcall *v2)(X509_crl_st *, evp_pkey_st *); // r8
v2 = *(__int64 (__fastcall **)(X509_crl_st *, evp_pkey_st *))(*((_QWORD *)crl + 25) + 32i64);
if ( v2 )
return v2(crl, r);
else
return 0i64;
}
| openssl |
void __fastcall dtls1_clear_received_buffer(ssl_st *s)
{
__int64 i; // rbx
for ( i = FUNC(*(_QWORD *)(*((_QWORD *)s + 22) + 280i64));
i;
i = FUNC(*(_QWORD *)(*((_QWORD *)s + 22) + 280i64)) )
{
FUNC(*(_QWORD *)(i + 8));
pitem_free((pitem_st *)i);
}
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, struct std::ios_base *a2)
{
__int64 v4; // rsi
__int64 v5; // rax
__int64 v6; // rbx
__int64 v8; // [rsp+40h] [rbp+18h] BYREF
v4 = FUNC(a1);
v5 = FUNC(a1);
v6 = FUNC(v5, &v8);
if ( !v6 || v8 != 16 )
return 0i64;
FUNC((__int64)a2, 256);
std::swfun(a2, (__int64)int_update_1);
return FUNC(v4 + 24, v6, 0i64, 0i64);
}
| openssl |
__int64 __fastcall FUNC(_DWORD *a1)
{
__int64 result; // rax
result = 0i64;
a1[25] = 1;
a1[18] = 0;
a1[23] = 0;
a1[29] = 0;
return result;
}
| openssl |
size_t __fastcall FUNC(__int64 a1, _QWORD *a2, const void *a3, size_t a4)
{
_QWORD *v8; // rax
_QWORD *v9; // rdi
_QWORD *v11; // rcx
_QWORD *v12; // rdx
v8 = CRYPTO_malloc(a4 + 64, "ssl\\statem\\statem_lib.c", 2345);
v9 = v8;
if ( v8 )
{
v11 = *(_QWORD **)(a1 + 168);
*v8 = v11[23];
v8[1] = v11[24];
v8[2] = v11[25];
v8[3] = v11[26];
v12 = *(_QWORD **)(a1 + 168);
v8[4] = v12[19];
v8[5] = v12[20];
v8[6] = v12[21];
v8[7] = v12[22];
memmove(v8 + 8, a3, a4);
*a2 = v9;
return a4 + 64;
}
else
{
FUNC((_DWORD *)a1, 0x50u, 553, 65, (__int64)"ssl\\statem\\statem_lib.c", 2349);
return 0i64;
}
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, int a2, unsigned int a3)
{
int v6; // eax
int v7; // esi
__int64 v8; // rax
int v10; // [rsp+20h] [rbp-18h]
v6 = FUNC(*(_QWORD *)(a1 + 24));
v7 = a2 - 1;
if ( v7 )
{
if ( v7 != 1 )
{
FUNC(33, 104, 110, (__int64)"crypto\\pkcs7\\pk7_lib.c", 57);
return 0i64;
}
if ( v6 == 22 )
{
v8 = *(_QWORD *)(a1 + 32);
if ( v8 && *(_QWORD *)(*(_QWORD *)(v8 + 40) + 32i64) )
{
*(_DWORD *)(a1 + 16) = 0;
return 0i64;
}
else
{
*(_DWORD *)(a1 + 16) = 1;
return 1i64;
}
}
v10 = 51;
LABEL_16:
FUNC(33, 104, 104, (__int64)"crypto\\pkcs7\\pk7_lib.c", v10);
return 0i64;
}
if ( v6 != 22 )
{
v10 = 37;
goto LABEL_16;
}
*(_DWORD *)(a1 + 16) = a3;
if ( a3 && (unsigned int)FUNC(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40i64) + 24i64)) == 21 )
{
FUNC();
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40i64) + 32i64) = 0i64;
}
return a3;
}
| openssl |
__int64 __fastcall FUNC(void *a1, __int64 a2, int a3)
{
_QWORD *v6; // rsi
__int64 *v7; // rdi
__int64 v8; // rbx
__int64 *v9; // rax
__int64 v10; // rax
_DWORD *v11; // rax
X509_algor_st *v12; // rax
X509_algor_st *v13; // rax
__int64 v14; // rax
unsigned int v16[4]; // [rsp+30h] [rbp-88h] BYREF
__int64 v17[8]; // [rsp+40h] [rbp-78h] BYREF
v6 = 0i64;
v16[0] = 64;
memset(v17, 0, sizeof(v17));
v7 = 0i64;
v8 = FUNC();
if ( !v8 )
goto LABEL_16;
if ( a1 == FUNC() )
{
*(_QWORD *)v8 = 0i64;
}
else
{
v9 = (__int64 *)FUNC();
v7 = v9;
if ( !v9 )
goto LABEL_16;
X509_ALGOR_set_md(v9, (__int64)a1);
if ( !*v7 )
goto LABEL_16;
*(_QWORD *)v8 = v7;
v7 = 0i64;
}
if ( (unsigned int)FUNC(a2, (__int64)a1, (__int64)v17, v16) )
{
if ( (unsigned int)FUNC(*(_QWORD *)(v8 + 8), v17, v16[0]) )
{
if ( !a3 )
return v8;
v10 = FUNC();
*(_QWORD *)(v8 + 16) = v10;
if ( v10 )
{
v11 = (_DWORD *)FUNC();
v6 = v11;
if ( v11 )
{
*v11 = 4;
v12 = (X509_algor_st *)FUNC(a2);
v13 = X509_ALGOR_dup_0_2(v12);
v6[1] = v13;
if ( v13 )
{
if ( (unsigned int)OPENSSL_sk_push_0(**(unsigned int ***)(v8 + 16), (__int64)v6) )
{
v6 = 0i64;
FUNC();
v14 = FUNC(a2);
*(_QWORD *)(*(_QWORD *)(v8 + 16) + 8i64) = FUNC(v14);
if ( *(_QWORD *)(*(_QWORD *)(v8 + 16) + 8i64) )
return v8;
}
}
}
}
}
}
LABEL_16:
FUNC(v7);
FUNC(v6);
FUNC((void *)v8);
FUNC(47, 156, 65, (__int64)"crypto\\ts\\ts_rsp_sign.c", 951);
return 0i64;
}
| openssl |
void __fastcall FUNC(__int64 a1)
{
__int64 v2; // rcx
if ( a1 )
{
FUNC(*(void ***)(a1 + 8));
v2 = *(_QWORD *)(a1 + 16);
if ( v2 )
FUNC(v2, 0);
CRYPTO_free((void *)a1, "crypto\\engine\\eng_table.c", 177i64);
}
}
| openssl |
void *FUNC()
{
return &unk_1402245C0;
}
| openssl |
bignum_st *__fastcall FUNC(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // rsi
__int64 v5; // rbx
bignum_st *result; // rax
int v7; // r8d
__int64 v8; // r9
__int64 v9; // rdx
__int64 v10; // rdx
__int64 v11; // rax
v3 = a2;
if ( *(_DWORD *)(a2 + 8) >= *(_DWORD *)(a3 + 8) )
{
v5 = a2;
v3 = a3;
}
else
{
v5 = a3;
}
result = bn_wexpand(a1, *(_DWORD *)(v5 + 8));
if ( result )
{
v7 = 0;
if ( *(int *)(v3 + 8) > 0 )
{
v8 = 0i64;
do
{
++v7;
v9 = *(_QWORD *)(*(_QWORD *)v5 + v8);
v8 += 8i64;
*(_QWORD *)(v8 + *(_QWORD *)a1 - 8) = *(_QWORD *)(*(_QWORD *)v3 + v8 - 8) ^ v9;
}
while ( v7 < *(_DWORD *)(v3 + 8) );
}
if ( v7 < *(_DWORD *)(v5 + 8) )
{
v10 = 8i64 * v7;
do
{
++v7;
v11 = *(_QWORD *)(v10 + *(_QWORD *)v5);
v10 += 8i64;
*(_QWORD *)(v10 + *(_QWORD *)a1 - 8) = v11;
}
while ( v7 < *(_DWORD *)(v5 + 8) );
}
*(_DWORD *)(a1 + 8) = *(_DWORD *)(v5 + 8);
FUNC((__int64 *)a1);
return (bignum_st *)1;
}
return result;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
return (*(__int64 (**)(void))(*(_QWORD *)(a4 + 80) + 24i64))();
}
| openssl |
__int64 __fastcall FUNC(__int64 *a1, unsigned int *a2, __int64 *a3, __int64 *a4, __int64 a5)
{
unsigned int v5; // r13d
const char *v8; // rbp
const char *v9; // rsi
unsigned int v10; // ebx
__int64 v11; // r12
const char *v12; // rax
char *v13; // r15
char *v14; // rax
char *v15; // rax
__int64 v16; // rax
const char **v17; // rdi
__int64 v18; // rax
__int64 v19; // rax
v5 = 0;
v8 = 0i64;
v9 = 0i64;
v10 = -1;
v11 = 0i64;
v12 = (const char *)FUNC(a5, "apps\\ca.c", 2508i64);
v13 = (char *)v12;
if ( !v12 )
goto LABEL_2;
v14 = strchr(v12, 44);
if ( v14 )
{
*v14 = 0;
v8 = v14 + 1;
v15 = strchr(v14 + 1, 44);
if ( v15 )
{
*v15 = 0;
v9 = v15 + 1;
}
}
if ( a1 )
{
v16 = FUNC();
*a1 = v16;
if ( !v16 )
{
LABEL_2:
BIO_printf(qword_1402808E8, "memory allocation failure\n");
goto LABEL_38;
}
if ( !(unsigned int)FUNC(v16, v13) )
{
BIO_printf(qword_1402808E8, "invalid revocation date %s\n", v13);
goto LABEL_38;
}
}
if ( v8 )
{
v10 = 0;
v17 = (const char **)off_140272000;
while ( stricmp(v8, *v17) )
{
++v10;
++v17;
if ( v10 >= 0xB )
{
BIO_printf(qword_1402808E8, "invalid reason code %s\n", v8);
goto LABEL_38;
}
}
switch ( v10 )
{
case 7u:
v10 = 8;
break;
case 8u:
if ( !v9 )
{
BIO_printf(qword_1402808E8, "missing hold instruction\n");
goto LABEL_38;
}
v10 = 6;
v18 = FUNC(v9, 0i64);
if ( !v18 )
{
BIO_printf(qword_1402808E8, "invalid object identifier %s\n", v9);
goto LABEL_38;
}
if ( a3 )
*a3 = v18;
else
FUNC(v18);
break;
case 9u:
case 0xAu:
if ( !v9 )
{
BIO_printf(qword_1402808E8, "missing compromised time\n");
goto LABEL_38;
}
v19 = FUNC();
v11 = v19;
if ( !v19 )
goto LABEL_2;
if ( !(unsigned int)FUNC(v19) )
{
BIO_printf(qword_1402808E8, "invalid compromised time %s\n", v9);
goto LABEL_38;
}
v10 = (v10 != 9) + 1;
break;
}
}
if ( a2 )
*a2 = v10;
if ( a4 )
{
*a4 = v11;
v11 = 0i64;
}
v5 = 1;
LABEL_38:
CRYPTO_free(v13, "apps\\ca.c", 2602);
FUNC(v11);
return v5;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, unsigned int *a2, size_t a3)
{
size_t v3; // rdi
unsigned int *v4; // rbp
unsigned int v6; // eax
unsigned int v7; // ecx
__int64 v8; // rcx
_QWORD *v9; // r12
__int64 v10; // rbx
size_t v11; // rbx
v3 = a3;
v4 = a2;
if ( a3 )
{
v6 = *(_DWORD *)(a1 + 32);
v7 = v6 + 8 * a3;
if ( v7 < v6 )
++*(_DWORD *)(a1 + 36);
*(_DWORD *)(a1 + 32) = v7;
v8 = *(unsigned int *)(a1 + 104);
*(_DWORD *)(a1 + 36) += a3 >> 29;
if ( v8 )
{
v9 = (_QWORD *)(a1 + 40);
if ( a3 < 0x40 && v8 + a3 < 0x40 )
{
memmove((char *)v9 + v8, a2, a3);
*(_DWORD *)(a1 + 104) += v3;
return 1i64;
}
v10 = 64 - v8;
memmove((char *)v9 + v8, a2, 64 - v8);
FUNC((_DWORD *)a1, (unsigned int *)(a1 + 40), 1i64);
*(_DWORD *)(a1 + 104) = 0;
v4 = (unsigned int *)((char *)v4 + v10);
v3 -= v10;
*v9 = 0i64;
*(_QWORD *)(a1 + 48) = 0i64;
*(_QWORD *)(a1 + 56) = 0i64;
*(_QWORD *)(a1 + 64) = 0i64;
*(_QWORD *)(a1 + 72) = 0i64;
*(_QWORD *)(a1 + 80) = 0i64;
*(_QWORD *)(a1 + 88) = 0i64;
*(_QWORD *)(a1 + 96) = 0i64;
}
if ( v3 >> 6 )
{
FUNC((_DWORD *)a1, v4, v3 >> 6);
v11 = v3 >> 6 << 6;
v4 = (unsigned int *)((char *)v4 + v11);
v3 -= v11;
}
if ( v3 )
{
*(_DWORD *)(a1 + 104) = v3;
memmove((void *)(a1 + 40), v4, v3);
}
}
return 1i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2)
{
__int64 v4; // rcx
int v5; // eax
if ( !*(_DWORD *)(a1 + 1804) )
return 2i64;
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 168) + 568i64);
if ( *(_DWORD *)(v4 + 40) == 64 || (v5 = *(_DWORD *)(v4 + 36), v5 == 4) || v5 == 1024 || v5 == 0x40000 )
{
*(_DWORD *)(a1 + 1804) = 0;
return 2i64;
}
if ( FUNC(a2, 0x16u, 2ui64) && FUNC(a2, 0, 2ui64) )
return 1i64;
FUNC((_DWORD *)a1, 0x50u, 455, 68, (__int64)"ssl\\statem\\extensions_srvr.c", 1623);
return 0i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1)
{
unsigned int v1; // r15d
__int64 v3; // rdi
int v4; // ebx
int v5; // edi
__int64 v6; // rbx
__int64 v7; // rdi
__int64 *v8; // rax
__int64 v9; // r12
__int64 v10; // rbp
__int64 *v11; // rax
__int64 v12; // rsi
__int64 v13; // r13
_DWORD *v14; // rax
__int64 v15; // rax
_QWORD *v16; // rax
int v17; // ebx
int v18; // edi
int v19; // eax
__int64 v20; // rax
int v22; // [rsp+80h] [rbp+8h]
int v23; // [rsp+88h] [rbp+10h]
__int64 v24; // [rsp+90h] [rbp+18h]
__int64 v25; // [rsp+98h] [rbp+20h]
v1 = 0;
v25 = 0i64;
v3 = 0i64;
v24 = 0i64;
if ( !a1 || !*(_DWORD *)a1 )
return 1i64;
if ( *(_DWORD *)a1 == 1 && (unsigned int)FUNC(*(unsigned int **)(a1 + 8)) )
{
FUNC(*(int **)(a1 + 8));
v4 = 0;
v22 = 0;
if ( (int)(FUNC(*(unsigned int **)(a1 + 8)) - 1) <= 0 )
{
LABEL_40:
v19 = FUNC(*(unsigned int **)(a1 + 8));
v20 = FUNC(*(_QWORD *)(a1 + 8), v19 - 1);
if ( !v20
|| *(_DWORD *)v20 != 1
|| (int)ASN1_INTEGER_cmp_0(**(_QWORD **)(v20 + 8), *(_QWORD *)(*(_QWORD *)(v20 + 8) + 8i64)) <= 0 )
{
if ( (unsigned int)FUNC(a1) )
v1 = 1;
}
}
else
{
v5 = 1;
v23 = 1;
while ( 1 )
{
v6 = FUNC(*(_QWORD *)(a1 + 8), v4);
v7 = FUNC(*(_QWORD *)(a1 + 8), v5);
if ( !v6 )
{
v3 = v24;
goto LABEL_56;
}
if ( *(_DWORD *)v6 )
{
if ( *(_DWORD *)v6 != 1 )
{
v3 = v24;
goto LABEL_56;
}
v8 = *(__int64 **)(v6 + 8);
v9 = *v8;
v10 = v8[1];
}
else
{
v9 = *(_QWORD *)(v6 + 8);
v10 = v9;
}
if ( !v7 )
{
v3 = v24;
goto LABEL_56;
}
if ( *(_DWORD *)v7 )
{
if ( *(_DWORD *)v7 != 1 )
{
v3 = v24;
goto LABEL_56;
}
v11 = *(__int64 **)(v7 + 8);
v12 = *v11;
v13 = v11[1];
}
else
{
v12 = *(_QWORD *)(v7 + 8);
v13 = v12;
}
if ( (int)ASN1_INTEGER_cmp_0(v9, v12) > 0 )
break;
if ( (int)ASN1_INTEGER_cmp_0(v9, v10) > 0 )
{
v3 = v24;
goto LABEL_56;
}
if ( (int)ASN1_INTEGER_cmp_0(v12, v13) > 0 )
{
v3 = v24;
goto LABEL_56;
}
if ( (int)ASN1_INTEGER_cmp_0(v10, v12) >= 0 )
{
FUNC(34, 161, 116, (__int64)"crypto\\x509v3\\v3_asid.c", 410);
v3 = v24;
goto LABEL_56;
}
v14 = (_DWORD *)v24;
if ( !v24 && (v14 = FUNC(), (v24 = (__int64)v14) == 0)
|| !FUNC(v10, (__int64)v14)
|| !(unsigned int)FUNC(v24, 1ui64)
|| (v15 = FUNC(v24, v25), (v25 = v15) == 0) )
{
FUNC(34, 161, 65, (__int64)"crypto\\x509v3\\v3_asid.c", 423);
v3 = v24;
goto LABEL_56;
}
if ( (unsigned int)ASN1_INTEGER_cmp_0(v15, v12) )
{
v17 = v22;
v18 = v23;
}
else
{
if ( *(_DWORD *)v6 )
{
if ( *(_DWORD *)v6 == 1 )
{
FUNC();
*(_QWORD *)(*(_QWORD *)(v6 + 8) + 8i64) = v13;
}
}
else
{
v16 = CRYPTO_malloc(0x10ui64, "crypto\\x509v3\\v3_asid.c", 434i64);
if ( !v16 )
{
FUNC(34, 161, 65, (__int64)"crypto\\x509v3\\v3_asid.c", 436);
v3 = v24;
goto LABEL_56;
}
*v16 = v9;
v16[1] = v13;
*(_DWORD *)v6 = 1;
*(_QWORD *)(v6 + 8) = v16;
}
if ( *(_DWORD *)v7 )
{
if ( *(_DWORD *)v7 == 1 )
*(_QWORD *)(*(_QWORD *)(v7 + 8) + 8i64) = 0i64;
}
else
{
*(_QWORD *)(v7 + 8) = 0i64;
}
ASN1_item_free((void *)v7, (__int64)&unk_140229550);
OPENSSL_sk_delete_0(*(_QWORD *)(a1 + 8), v23);
v17 = v22 - 1;
v18 = v23 - 1;
}
v4 = v17 + 1;
v5 = v18 + 1;
v22 = v4;
v23 = v5;
if ( v4 >= (int)(FUNC(*(unsigned int **)(a1 + 8)) - 1) )
{
v3 = v24;
goto LABEL_40;
}
}
v3 = v24;
}
LABEL_56:
FUNC();
FUNC(v3);
return v1;
}
else
{
FUNC(34, 161, 116, (__int64)"crypto\\x509v3\\v3_asid.c", 369);
return 0i64;
}
}
| openssl |
void __fastcall ossl_init_async_ossl_()
{
if ( (unsigned int)FUNC() )
{
dword_1402853F4 = 1;
dword_1402853F8 = 1;
}
else
{
dword_1402853F8 = 0;
}
}
| openssl |
void __fastcall FUNC(__int64 a1)
{
if ( a1 )
{
if ( (*(_BYTE *)(a1 + 32) & 4) != 0 )
{
CRYPTO_free(*(void **)a1, "crypto\\asn1\\a_object.c", 356i64);
CRYPTO_free(*(void **)(a1 + 8), "crypto\\asn1\\a_object.c", 357i64);
*(_QWORD *)(a1 + 8) = 0i64;
*(_QWORD *)a1 = 0i64;
}
if ( (*(_BYTE *)(a1 + 32) & 8) != 0 )
{
CRYPTO_free(*(void **)(a1 + 24), "crypto\\asn1\\a_object.c", 362i64);
*(_QWORD *)(a1 + 24) = 0i64;
*(_DWORD *)(a1 + 20) = 0;
}
if ( (*(_BYTE *)(a1 + 32) & 1) != 0 )
CRYPTO_free((void *)a1, "crypto\\asn1\\a_object.c", 367i64);
}
}
| openssl |
__int64 __fastcall FUNC(int a1, __int64 a2)
{
__int64 v2; // rdi
int *v5; // rax
int *v6; // rbx
__int64 v8; // rdx
int v9; // eax
__int64 v10; // rax
int v11; // ebp
unsigned int v12; // eax
void *v13; // [rsp+58h] [rbp+10h] BYREF
v2 = *(_QWORD *)(a2 + 40);
v13 = 0i64;
v5 = FUNC();
v6 = v5;
if ( !v5 )
{
FUNC(5, 109, 65, (__int64)"crypto\\dh\\dh_ameth.c", 110);
LABEL_3:
CRYPTO_free(v13, "crypto\\dh\\dh_ameth.c", 138i64);
FUNC((__int64)v6);
return 0i64;
}
v8 = (__int64)(v5 + 2);
if ( *(_UNKNOWN **)(a2 + 16) == &unk_14020D730 )
v9 = FUNC(v2, v8);
else
v9 = FUNC(v2, v8);
*v6 = v9;
if ( v9 <= 0 )
{
FUNC(5, 109, 65, (__int64)"crypto\\dh\\dh_ameth.c", 115);
goto LABEL_3;
}
v10 = FUNC(*(_QWORD *)(v2 + 32), 0i64);
if ( !v10 )
goto LABEL_3;
v11 = FUNC(v10, (__int64)&v13);
FUNC();
if ( v11 <= 0 )
{
FUNC(5, 109, 65, (__int64)"crypto\\dh\\dh_ameth.c", 129);
goto LABEL_3;
}
v12 = (unsigned int)FUNC(**(_DWORD **)(a2 + 16));
if ( !(unsigned int)FUNC(a1, v12, 16, (_DWORD)v6, (__int64)v13, v11) )
goto LABEL_3;
return 1i64;
}
| openssl |
unsigned __int8 *__cdecl mbschr(const unsigned __int8 *Str, unsigned int C)
{
return mbschr_l(Str, C, 0i64);
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, wpacket_st *a2)
{
if ( !*(_DWORD *)(a1 + 1920) )
return 2i64;
if ( FUNC((__int64)a2, 0xFF01u, 2ui64)
&& (unsigned int)FUNC((__int64)a2, 2ui64)
&& FUNC(
a2,
(const void *)(*(_QWORD *)(a1 + 168) + 840i64),
*(_QWORD *)(*(_QWORD *)(a1 + 168) + 904i64),
1ui64)
&& (unsigned int)WPACKET_close(a2) )
{
return 1i64;
}
FUNC((_DWORD *)a1, 0x50u, 473, 68, (__int64)"ssl\\statem\\extensions_clnt.c", 29);
return 0i64;
}
| openssl |
__int64 __fastcall FUNC(unsigned int **a1, unsigned int a2, int a3)
{
__int64 v6; // rax
v6 = FUNC(a2);
if ( FUNC(v6) )
return FUNC(a1, a2, a3);
else
return 1i64;
}
| openssl |
__int64 __fastcall FUNC(_QWORD *a1)
{
int v1; // eax
void *v3; // rax
v3 = CRYPTO_zalloc((unsigned int)(v1 - 44), "crypto\\asn1\\x_int64.c", (unsigned int)(v1 + 78));
*a1 = v3;
if ( v3 )
return 1i64;
FUNC(13, 139, 65, (__int64)"crypto\\asn1\\x_int64.c", 127);
return 0i64;
}
| openssl |
void *FUNC()
{
return &unk_140224620;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, unsigned int a2, unsigned int a3)
{
__int64 v6; // rax
v6 = FUNC(a2);
if ( FUNC(v6) )
return FUNC(a1, a2, a3);
else
return 1i64;
}
| openssl |
__int64 __fastcall FUNC(const evp_pkey_st *a1, unsigned int *a2)
{
int v5; // ebx
x509_st *v6; // rax
const evp_pkey_st *pubkey_1; // rax
unsigned int *v8; // rdi
int i; // ebx
x509_st *v10; // rax
evp_pkey_st *v11; // rax
if ( a1 && !EVP_PKEY_missing_parameters_0(a1) )
return 1i64;
v5 = 0;
if ( (int)FUNC(a2) <= 0 )
{
FUNC(11, 110, 107, (unsigned int)"crypto\\x509\\x509_vfy.c", 1903);
return 0i64;
}
else
{
do
{
v6 = (x509_st *)FUNC((__int64)a2, v5);
pubkey_1 = X509_get_pubkey_1(v6);
v8 = (unsigned int *)pubkey_1;
if ( !pubkey_1 )
{
FUNC(11, 110, 108, (unsigned int)"crypto\\x509\\x509_vfy.c", 1895);
return 0i64;
}
if ( !EVP_PKEY_missing_parameters_0(pubkey_1) )
break;
++v5;
}
while ( v5 < (int)FUNC(a2) );
for ( i = v5 - 1; i >= 0; --i )
{
v10 = (x509_st *)FUNC((__int64)a2, i);
v11 = X509_get_pubkey_1(v10);
EVP_PKEY_copy_parameters_0((__int64)v11, v8);
}
if ( a1 )
EVP_PKEY_copy_parameters_0((__int64)a1, v8);
return 1i64;
}
}
| openssl |
__int64 __fastcall FUNC(bio_st *a1, __int64 a2, int a3)
{
int v3; // eax
return FUNC(a1, *(__int64 **)(a2 + 40), a3, v3 - 38);
}
| openssl |
_BOOL8 __fastcall BIO_read_ex_0_0(bio_st *b, __int64 data, unsigned __int64 dlen, unsigned __int64 *readbytes)
{
return (int)FUNC((__int64)b, data, dlen, readbytes) > 0;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1)
{
int v1; // eax
__int64 result; // rax
result = (__int64)CRYPTO_zalloc((unsigned int)(v1 - 16), "apps\\bf_prefix.c", v1 + 23);
if ( result )
{
*(_QWORD *)result = 0i64;
*(_DWORD *)(result + 8) = 1;
FUNC(a1, result);
FUNC(a1, 1i64);
return 1i64;
}
return result;
}
| openssl |
__int64 __fastcall X509_ALGOR_set_md(__int64 *a1, __int64 a2)
{
int v3; // ebx
unsigned int v4; // eax
char *v5; // rax
v3 = 5;
if ( (*(_BYTE *)(a2 + 12) & 8) != 0 )
v3 = -1;
v4 = FUNC((unsigned int *)a2);
v5 = FUNC(v4);
return FUNC(a1, (__int64)v5, v3, 0i64);
}
| openssl |
void nullsub_1()
{
;
}
| openssl |
BOOL _termcon()
{
BOOL result; // eax
if ( hConsoleOutput != (HANDLE)-1i64 && hConsoleOutput != (HANDLE)-2i64 )
result = CloseHandle(hConsoleOutput);
if ( hConsoleInput != (HANDLE)-1i64 && hConsoleInput != (HANDLE)-2i64 )
return CloseHandle(hConsoleInput);
return result;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2, __int64 a3, int *a4)
{
int v4; // ebp
_QWORD *v5; // rsi
int v9; // eax
__int64 result; // rax
__int64 v11; // r12
int v12; // edi
__int64 v13; // rbp
__int64 v14; // r9
__int64 v15; // r8
__int64 v16; // rbx
__int64 v17; // rdi
__int64 v18; // r11
__int64 v19; // r10
__int64 v20; // rsi
__int64 v21; // rax
__int64 v22; // rdx
signed __int64 v23; // rcx
__int64 v24; // rcx
__int64 v25; // rax
__int64 v26; // rcx
__int64 v27; // rcx
__int64 v28; // rdx
__int64 v29; // rcx
__int64 v30; // rdx
__int64 v31; // rdx
__int64 v32; // rax
__int64 v33; // rcx
__int64 v34; // rcx
int v35; // esi
__int64 v36; // rax
unsigned int v37; // [rsp+20h] [rbp-58h] BYREF
unsigned int v38; // [rsp+24h] [rbp-54h]
unsigned int v39; // [rsp+28h] [rbp-50h]
unsigned int v40; // [rsp+2Ch] [rbp-4Ch]
unsigned int v41; // [rsp+30h] [rbp-48h]
unsigned int v42; // [rsp+34h] [rbp-44h]
unsigned int v43; // [rsp+38h] [rbp-40h]
unsigned int v44; // [rsp+3Ch] [rbp-3Ch]
_QWORD v45[4]; // [rsp+40h] [rbp-38h] BYREF
v4 = *(_DWORD *)(a2 + 8);
v5 = *(_QWORD **)a2;
if ( FUNC(a2) || (int)FUNC((__int64 *)a2, qword_14023D938) >= 0 )
return BN_nnmod(a1, a2, (__int64)qword_14023D8C0, a4);
v9 = FUNC(qword_14023D8C0, (__int64 *)a2);
if ( !v9 )
{
FUNC(a1, 0i64);
return 1i64;
}
if ( v9 <= 0 )
{
if ( a1 == a2 )
{
v11 = (__int64)v5;
}
else
{
result = (__int64)bn_wexpand(a1, 4);
if ( !result )
return result;
v11 = *(_QWORD *)a1;
*(_QWORD *)v11 = *v5;
*(_QWORD *)(v11 + 8) = v5[1];
*(_QWORD *)(v11 + 16) = v5[2];
*(_QWORD *)(v11 + 24) = v5[3];
}
v12 = 0;
if ( v4 - 4 > 0 )
{
v12 = v4 - 4;
memmove(&v37, v5 + 4, 8i64 * (unsigned int)(v4 - 4));
}
if ( v12 < 4i64 )
memset(&v37 + 2 * v12, 0, 8 * (4i64 - v12));
v13 = v42;
v14 = v43;
v15 = v44;
v16 = v40;
v17 = v41;
v18 = v38;
v19 = v39;
v20 = v37;
v21 = *(unsigned int *)(v11 + 4);
v22 = *(unsigned int *)(v11 + 12);
v23 = v38 + v37 + *(unsigned int *)v11 - (unsigned __int64)v40 - v41 - v42 - v43;
*(_DWORD *)v11 = v23;
v24 = v21 + (v23 >> 32) - v15;
v25 = *(unsigned int *)(v11 + 8);
v26 = v18 + v19 + v24 - v17 - v13 - v14;
*(_DWORD *)(v11 + 4) = v26;
v27 = v16 + v19 + v25 + (v26 >> 32) - v15 - v13 - v14;
*(_DWORD *)(v11 + 8) = v27;
v28 = v13 + (v27 >> 32) + 2 * (v16 + v17) - v15 - v20 - v18 + v22;
*(_DWORD *)(v11 + 12) = v28;
v29 = v14 + *(unsigned int *)(v11 + 16) + (v28 >> 32) + 2 * (v17 + v13) - v19 - v18;
*(_DWORD *)(v11 + 16) = v29;
v30 = v15 + *(unsigned int *)(v11 + 20) + (v29 >> 32) + 2 * (v14 + v13) - v19 - v16;
*(_DWORD *)(v11 + 20) = v30;
v31 = v13 + (v30 >> 32) + 3 * v14 + 2 * v15 - v20 - v18 + *(unsigned int *)(v11 + 24);
v32 = *(unsigned int *)(v11 + 28);
*(_DWORD *)(v11 + 24) = v31;
v33 = v20 + v32 + (v31 >> 32) + 3 * v15 - v19 - v16 - v17 - v13;
*(_DWORD *)(v11 + 28) = v33;
v34 = v33 >> 32;
if ( (int)v34 <= 0 )
{
if ( (int)v34 < 0 )
{
v35 = FUNC((unsigned __int64 *)v11, (_QWORD *)v11, &qword_14023D590[4 * (-1 - (int)v34)], 4);
v36 = ((_BOOL8 (__fastcall *)(_QWORD *, unsigned __int64 *, unsigned __int64 *, int))((unsigned __int64)FUNC & -(__int64)v35 | (unsigned __int64)FUNC & (v35 - 1i64)))(
v45,
(unsigned __int64 *)v11,
qword_14023D590,
4);
LABEL_23:
*(_QWORD *)v11 = *(_QWORD *)(v11 & -(__int64)v35 & -v36 | (unsigned __int64)v45 & ~(-(__int64)v35 & -v36));
*(_QWORD *)(v11 + 8) = *(_QWORD *)((v11 & -(__int64)v35 & -v36 | (unsigned __int64)v45 & ~(-(__int64)v35 & -v36))
+ 8);
*(_QWORD *)(v11 + 16) = *(_QWORD *)((v11 & -(__int64)v35 & -v36 | (unsigned __int64)v45 & ~(-(__int64)v35 & -v36))
+ 0x10);
*(_QWORD *)(v11 + 24) = *(_QWORD *)((v11 & -(__int64)v35 & -v36 | (unsigned __int64)v45 & ~(-(__int64)v35 & -v36))
+ 0x18);
*(_DWORD *)(a1 + 8) = 4;
FUNC((__int64 *)a1);
return 1i64;
}
v35 = 1;
}
else
{
v35 = FUNC((_QWORD *)v11, (unsigned __int64 *)v11, &qword_14023D590[4 * (int)v34 - 4], 4);
}
v36 = FUNC(v45, (unsigned __int64 *)v11, qword_14023D590, 4);
goto LABEL_23;
}
return a1 == a2 || FUNC(a1, a2) != 0i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1)
{
return *(unsigned int *)(a1 + 40);
}
| openssl |
__int64 __fastcall FUNC(unsigned int *a1, _QWORD *a2)
{
int v4; // edi
_QWORD *v6; // rsi
int v7; // ebx
_QWORD *v8; // r12
v4 = FUNC(a1);
if ( v4 > 0 )
{
v6 = *(_QWORD **)FUNC((__int64)a1, 0);
v7 = 1;
*a2 = 0i64;
if ( v4 <= 1 )
{
LABEL_6:
*a2 = v6;
return 1i64;
}
else
{
while ( 1 )
{
v8 = *(_QWORD **)FUNC((__int64)a1, v7);
if ( (unsigned int)FUNC(v6, v8) )
return (unsigned int)FUNC(*v8, *v6) != 0 ? 2 : 0;
if ( ++v7 >= v4 )
goto LABEL_6;
}
}
}
else
{
FUNC(39, 107, 111, (__int64)"crypto\\ocsp\\ocsp_vfy.c", 250);
return 0xFFFFFFFFi64;
}
}
| openssl |
int __fastcall ASN1_STRING_cmp(const void **a1, __int64 a2)
{
size_t v3; // rcx
int result; // eax
v3 = *(int *)a1;
result = v3 - *(_DWORD *)a2;
if ( (_DWORD)v3 == *(_DWORD *)a2 )
{
result = memcmp(a1[1], *(const void **)(a2 + 8), v3);
if ( !result )
return *((_DWORD *)a1 + 1) - *(_DWORD *)(a2 + 4);
}
return result;
}
| openssl |
_BOOL8 __fastcall ED448_public_from_private(__int64 a1, __int64 a2)
{
return (unsigned int)FUNC(a1, a2) == -1;
}
| openssl |
__int64 __fastcall FUNC(char *a1, unsigned __int64 a2, _BYTE *a3, _BYTE *a4, const char *a5)
{
unsigned int v5; // r11d
unsigned int v8; // eax
_BYTE *i; // r10
unsigned int v10; // edi
_BYTE *v11; // rax
size_t j; // rdi
__int64 v13; // rbx
v5 = 0;
v8 = 0;
for ( i = a3; *i; ++v8 )
{
if ( v8 >= 0x80000000 )
break;
++i;
}
v10 = v8;
v11 = a4;
for ( j = v10 & 0x7FFFFFFF; *v11; ++v5 )
{
if ( v5 >= 0x80000000 )
break;
++v11;
}
v13 = v5 & 0x7FFFFFFF;
if ( v13 + j + 1 <= a2 )
{
memmove(a1, a3, j);
memmove(&a1[j], a4, v13 + 1);
return 1i64;
}
else
{
BIO_printf(qword_1402808E8, "%s '%s' too long\n", a5, a3);
return 0i64;
}
}
| openssl |
__int64 __fastcall __crtGetStringTypeA_stat(
struct localeinfo_struct *a1,
DWORD a2,
CHAR *a3,
int a4,
unsigned __int16 *lpCharType,
UINT CodePage,
LCID Locale,
int a8)
{
int v8; // r9d
unsigned int StringTypeW; // ebx
DWORD LastError; // eax
UINT v14; // esi
int v15; // eax
__int64 cchWideChar; // r12
size_t v17; // rcx
__int64 v18; // rax
void *v19; // rsp
int *lpWideCharStr; // rdi
int *v21; // rax
int v22; // eax
LCID v24; // r12d
char *v25; // rdi
UINT v26; // esi
UINT v27; // eax
const char *v28; // rax
unsigned int StringTypeA; // esi
int CharType; // [rsp+30h] [rbp+0h] BYREF
v8 = dword_140286268;
StringTypeW = 0;
if ( !dword_140286268 )
{
if ( GetStringTypeW(1u, &String1, 1, (LPWORD)&CharType) )
{
dword_140286268 = 1;
goto LABEL_10;
}
LastError = GetLastError();
v8 = dword_140286268;
if ( LastError == 120 )
v8 = 2;
dword_140286268 = v8;
}
if ( v8 != 2 && v8 )
{
if ( v8 != 1 )
return 0i64;
LABEL_10:
v14 = CodePage;
if ( !CodePage )
v14 = *(_DWORD *)(*(_QWORD *)a1 + 4i64);
v15 = MultiByteToWideChar(v14, a8 != 0 ? 9 : 1, a3, a4, 0i64, 0);
cchWideChar = v15;
if ( !v15 )
return 0i64;
if ( v15 <= 0 || (unsigned __int64)v15 > 0x7FFFFFFFFFFFFFF0i64 )
{
lpWideCharStr = 0i64;
}
else
{
v17 = 2i64 * v15 + 16;
if ( v17 > 0x400 )
{
v21 = (int *)malloc(v17);
lpWideCharStr = v21;
if ( !v21 )
goto LABEL_24;
*v21 = 56797;
}
else
{
v18 = 2i64 * v15 + 31;
if ( 2 * cchWideChar + 31 <= (unsigned __int64)(2 * cchWideChar + 16) )
v18 = 0xFFFFFFFFFFFFFF0i64;
v19 = alloca(v18 & 0xFFFFFFFFFFFFFFF0ui64);
lpWideCharStr = &CharType;
if ( !&CharType )
return 0i64;
CharType = 52428;
}
lpWideCharStr += 4;
}
LABEL_24:
if ( lpWideCharStr )
{
memset(lpWideCharStr, 0, 2 * cchWideChar);
v22 = MultiByteToWideChar(v14, 1u, a3, a4, (LPWSTR)lpWideCharStr, cchWideChar);
if ( v22 )
StringTypeW = GetStringTypeW(a2, (LPCWCH)lpWideCharStr, v22, lpCharType);
if ( *(lpWideCharStr - 4) == 56797 )
free(lpWideCharStr - 4);
return StringTypeW;
}
return 0i64;
}
v24 = Locale;
v25 = 0i64;
if ( !Locale )
v24 = *(_DWORD *)(*(_QWORD *)a1 + 20i64);
v26 = CodePage;
if ( !CodePage )
v26 = *(_DWORD *)(*(_QWORD *)a1 + 4i64);
v27 = _ansicp(v24);
if ( v27 == -1 )
return 0i64;
if ( v27 != v26 )
{
v28 = (const char *)_convertcp(v26, v27, a3, 0i64, 0);
v25 = (char *)v28;
if ( !v28 )
return 0i64;
a3 = (CHAR *)v28;
}
StringTypeA = GetStringTypeA(v24, a2, a3, a4, lpCharType);
if ( v25 )
free(v25);
return StringTypeA;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1)
{
__int64 result; // rax
result = *(_QWORD *)(a1 + 2008);
if ( !result )
return *(_QWORD *)(*(_QWORD *)(a1 + 1432) + 776i64);
return result;
}
| openssl |
int __fastcall FUNC(__int64 a1, __int64 a2)
{
__int64 v4; // rax
__int64 v5; // rdi
LODWORD(v4) = islower(**(unsigned __int8 **)(a1 + 8));
if ( (_DWORD)v4 )
{
v4 = FUNC(*(_QWORD *)(a1 + 8));
v5 = v4;
if ( v4 )
{
LODWORD(v4) = FUNC(v4);
if ( (v4 & 0x200000) == 0 )
{
v4 = FUNC(v5) & 0xF0007;
if ( (_DWORD)v4 != 65537 )
{
BIO_printf(*(bio_st **)a2, "-%-25s", *(const char **)(a1 + 8));
if ( ++*(_DWORD *)(a2 + 8) == 3 )
{
LODWORD(v4) = BIO_printf(*(bio_st **)a2, "\n");
*(_DWORD *)(a2 + 8) = 0;
}
else
{
LODWORD(v4) = BIO_printf(*(bio_st **)a2, " ");
}
}
}
}
}
return v4;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2)
{
return FUNC(a1, a2, &unk_1402210B0);
}
| openssl |
__int64 __fastcall FUNC(_QWORD *a1, unsigned int *a2)
{
__int64 v5; // rdx
x509_st *v6; // rcx
evp_pkey_st *pubkey_1; // rax
__int64 v8; // rdx
__int64 v9; // rcx
__int64 v10; // rax
__int64 v11; // [rsp+50h] [rbp+18h] BYREF
if ( !FUNC((__int64)a2, &v11) )
{
FUNC(20, 193, 247, (unsigned int)"ssl\\ssl_rsa.c", 133);
return 0i64;
}
v5 = v11;
v6 = (x509_st *)a1[5 * v11 + 4];
if ( v6 )
{
pubkey_1 = X509_get_pubkey_1(v6);
if ( !pubkey_1 )
{
FUNC(20, 193, 65, (unsigned int)"ssl\\ssl_rsa.c", 141);
return 0i64;
}
EVP_PKEY_copy_parameters_0((__int64)pubkey_1, a2);
FUNC(v9, v8);
if ( (unsigned int)FUNC(a2) != 6 || (v10 = FUNC(a2), (FUNC(v10) & 1) == 0) )
{
if ( !X509_check_private_key((const x509_st *)a1[5 * v11 + 4], (const evp_pkey_st *)a2) )
{
FUNC(a1[5 * v11 + 4]);
a1[5 * v11 + 4] = 0i64;
return 0i64;
}
}
v5 = v11;
}
FUNC(a1[5 * v5 + 5]);
FUNC(a2);
a1[5 * v11 + 5] = a2;
*a1 = &a1[5 * v11 + 4];
return 1i64;
}
| openssl |
__int64 __fastcall bread_conv(__int64 a1, __int64 a2, unsigned __int64 a3, _QWORD *a4)
{
__int64 result; // rax
if ( a3 > 0x7FFFFFFF )
a3 = 0x7FFFFFFFi64;
result = (*(__int64 (__fastcall **)(__int64, __int64, unsigned __int64))(*(_QWORD *)a1 + 40i64))(a1, a2, a3);
if ( (int)result > 0 )
{
*a4 = (int)result;
return 1i64;
}
else
{
*a4 = 0i64;
}
return result;
}
| openssl |
__int64 ERR_load_CONF_strings_0()
{
if ( !ERR_func_error_string_0(0xE068000u) )
{
ERR_load_strings_const_0((const ERR_string_data_st *)&unk_14024A610);
ERR_load_strings_const_0((const ERR_string_data_st *)&unk_14024A790);
}
return 1i64;
}
| openssl |
TS_msg_imprint_st *__fastcall d2i_TS_MSG_IMPRINT_fp_1_9_4(_iobuf *fp, TS_msg_imprint_st **a)
{
return (TS_msg_imprint_st *)FUNC(FUNC, FUNC, fp, a);
}
| openssl |
__int64 __fastcall FUNC(__int64 *a1, __int64 a2, int a3)
{
int v3; // ebx
__int64 v6; // r12
unsigned int *v7; // rcx
int v8; // ebx
int v9; // esi
_QWORD *v10; // rax
v3 = a3;
if ( !a1 )
return 0xFFFFFFFFi64;
v6 = *a1;
v7 = (unsigned int *)*a1;
if ( a3 < 0 )
v3 = -1;
v8 = v3 + 1;
v9 = FUNC(v7);
if ( v8 >= v9 )
return 0xFFFFFFFFi64;
while ( 1 )
{
v10 = (_QWORD *)FUNC(v6, v8);
if ( !(unsigned int)FUNC(*v10, a2) )
break;
if ( ++v8 >= v9 )
return 0xFFFFFFFFi64;
}
return (unsigned int)v8;
}
| openssl |
__int64 __fastcall FUNC(_DWORD *a1, _QWORD *a2)
{
int v4; // eax
__int64 v5; // rdx
int v6; // ecx
unsigned int v7; // ebx
unsigned int v8; // edx
int v10; // [rsp+28h] [rbp-10h]
LOBYTE(v4) = FUNC((__int64)(a1 + 524));
if ( !v4 )
{
v5 = a2[1];
if ( v5 )
{
v6 = *(unsigned __int8 *)(*a2)++;
a2[1] = v5 - 1;
if ( v5 == 1 )
{
v7 = 0;
if ( v6 )
{
if ( v6 != 1 )
{
v10 = 651;
v8 = v5 - 1 + 47;
LABEL_11:
FUNC(a1, v8, 518, 122, (__int64)"ssl\\statem\\statem_lib.c", v10);
return 0i64;
}
a1[481] = 0;
}
LOBYTE(v7) = (unsigned int)FUNC(a1, 0i64) != 0;
return v7;
}
}
v10 = 640;
v8 = 50;
goto LABEL_11;
}
FUNC(a1, 0xAu, 518, 182, (__int64)"ssl\\statem\\statem_lib.c", 633);
return 0i64;
}
| openssl |
_DWORD *__fastcall FUNC(int a1, int a2)
{
int v2; // eax
_DWORD *result; // rax
result = CRYPTO_zalloc((unsigned int)(v2 + 40), "crypto\\evp\\evp_lib.c", 336i64);
if ( result )
{
*result = a1;
result[1] = a2;
}
return result;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1)
{
__int64 (__fastcall *v1)(__int64, _QWORD, __int64 *, _QWORD); // rax
int v2; // ebx
int v3; // eax
__int64 v5; // [rsp+40h] [rbp+8h] BYREF
v1 = *(__int64 (__fastcall **)(__int64, _QWORD, __int64 *, _QWORD))(a1 + 64);
v2 = a1;
if ( v1 && (v3 = v1(a1, 0i64, &v5, 0i64), v3 > 0) )
return FUNC((unsigned int)&qword_140284E10, (unsigned int)FUNC, v2, v5, v3, 1);
else
return 1i64;
}
| openssl |
void *FUNC()
{
return &unk_140226920;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, int a2)
{
int v3; // ecx
__int64 v5; // rdx
unsigned int v6; // edi
_WORD *v7; // rax
unsigned __int64 v8; // rcx
unsigned int v9; // ebx
__int64 v10; // rdx
unsigned __int64 v11; // rcx
__int64 v12; // rax
__int64 v13; // rdx
int v14; // eax
unsigned int v15; // edi
_WORD *v16; // rax
unsigned __int64 v17; // rcx
unsigned int v18; // ebx
__int64 v19; // rdx
unsigned __int64 v20; // rcx
__int64 v21; // rax
char v22; // [rsp+40h] [rbp+8h] BYREF
char v23; // [rsp+41h] [rbp+9h]
v3 = *(_DWORD *)(*(_QWORD *)(a1 + 1160) + 28i64) & 0x30000;
if ( !v3 )
return FUNC(a1, 0) != 0;
if ( a2 == 50380843 )
{
v5 = *(_QWORD *)(*(_QWORD *)(a1 + 168) + 568i64);
if ( v5 && *(_DWORD *)(v5 + 24) != 50380843 )
return 0i64;
v6 = 1;
switch ( v3 )
{
case 65536:
v7 = &unk_1401E0FFC;
v8 = 1i64;
break;
case 131072:
v7 = &unk_1401E0FFE;
v8 = 1i64;
break;
case 196608:
v7 = &unk_1401E0FFC;
v8 = 2i64;
break;
default:
v7 = *(_WORD **)(a1 + 1704);
if ( v7 )
{
v8 = *(_QWORD *)(a1 + 1696);
}
else
{
v7 = &unk_1401E0FF0;
v8 = 5i64;
}
break;
}
v9 = 0;
v10 = 0i64;
if ( v8 )
{
while ( v7[v10] != 23 )
{
if ( ++v10 >= v8 )
return 0i64;
}
v22 = 0;
v23 = 23;
if ( (unsigned int)ssl_security((const ssl_st *)a1, 0x20006u, 0x80u, 415, &v22) )
{
if ( !*(_DWORD *)(a1 + 56) )
return 1i64;
v11 = *(_QWORD *)(a1 + 1712);
if ( !v11 )
return 1i64;
v12 = 0i64;
while ( *(_WORD *)(*(_QWORD *)(a1 + 1720) + 2 * v12) != 23 )
{
if ( ++v12 >= v11 )
return 0;
}
return v6;
}
}
return v9;
}
else if ( a2 == 50380844 )
{
v13 = *(_QWORD *)(*(_QWORD *)(a1 + 168) + 568i64);
if ( v13 )
{
v14 = *(_DWORD *)(v13 + 24);
if ( v14 == 50380843 )
return 0i64;
if ( v14 != 50380844 )
return 0i64;
}
v15 = 1;
switch ( v3 )
{
case 65536:
v16 = &unk_1401E0FFC;
v17 = 1i64;
break;
case 131072:
v16 = &unk_1401E0FFE;
v17 = 1i64;
break;
case 196608:
v16 = &unk_1401E0FFC;
v17 = 2i64;
break;
default:
v16 = *(_WORD **)(a1 + 1704);
if ( v16 )
{
v17 = *(_QWORD *)(a1 + 1696);
}
else
{
v16 = &unk_1401E0FF0;
v17 = 5i64;
}
break;
}
v18 = 0;
v19 = 0i64;
if ( v17 )
{
while ( v16[v19] != 24 )
{
if ( ++v19 >= v17 )
return 0i64;
}
v22 = 0;
v23 = 24;
if ( (unsigned int)ssl_security((const ssl_st *)a1, 0x20006u, 0xC0u, 715, &v22) )
{
if ( !*(_DWORD *)(a1 + 56) )
return 1i64;
v20 = *(_QWORD *)(a1 + 1712);
if ( !v20 )
return 1i64;
v21 = 0i64;
while ( *(_WORD *)(*(_QWORD *)(a1 + 1720) + 2 * v21) != 24 )
{
if ( ++v21 >= v20 )
return 0;
}
return v15;
}
}
return v18;
}
else
{
return 0i64;
}
}
| openssl |
void *FUNC()
{
return &unk_140215110;
}
| openssl |
__int64 __fastcall FUNC(__int64 *a1, unsigned int a2, int *a3, int *a4, _DWORD *a5, _DWORD *a6)
{
__int64 v6; // rax
_DWORD *v9; // r8
__int64 v11; // r9
int v12; // eax
v6 = *a1;
if ( a2 < 0x10 )
return 0i64;
if ( *(_BYTE *)v6 == 6 )
{
v9 = a6;
if ( !*a6 )
{
FUNC(9, 134, 119, (__int64)"crypto\\pem\\pvkfmt.c", 96);
return 0i64;
}
*a6 = 1;
}
else
{
if ( *(_BYTE *)v6 != 7 )
return 0i64;
v9 = a6;
if ( *a6 == 1 )
{
FUNC(9, 134, 120, (__int64)"crypto\\pem\\pvkfmt.c", 102);
return 0i64;
}
*a6 = 0;
}
if ( *(_BYTE *)(v6 + 1) != 2 )
{
FUNC(9, 134, 117, (__int64)"crypto\\pem\\pvkfmt.c", 111);
return 0i64;
}
*a3 = (*(unsigned __int8 *)(v6 + 10) << 16) | *(unsigned __int16 *)(v6 + 8) | (*(unsigned __int8 *)(v6 + 11) << 24);
v11 = v6 + 16;
*a4 = (*(unsigned __int8 *)(v6 + 14) << 16) | *(unsigned __int16 *)(v6 + 12) | (*(unsigned __int8 *)(v6 + 15) << 24);
*a5 = 0;
v12 = *a3;
if ( *a3 == 826364754 )
goto LABEL_23;
if ( v12 == 827544388 )
{
*a5 = 1;
LABEL_23:
if ( !*v9 )
{
FUNC(9, 134, 119, (__int64)"crypto\\pem\\pvkfmt.c", 126);
return 0i64;
}
goto LABEL_25;
}
if ( v12 != 843141970 )
{
if ( v12 != 844321604 )
{
FUNC(9, 134, 116, (__int64)"crypto\\pem\\pvkfmt.c", 142);
return 0xFFFFFFFFi64;
}
*a5 = 1;
}
if ( *v9 == 1 )
{
FUNC(9, 134, 120, (__int64)"crypto\\pem\\pvkfmt.c", 136);
return 0i64;
}
LABEL_25:
*a1 = v11;
return 1i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // r9
__int64 (__fastcall *v4)(__int64, __int64, __int64, _QWORD); // rax
__int64 (__fastcall *v6)(__int64, __int64, __int64, _QWORD); // r10
v3 = 0i64;
if ( a1 && a2 )
{
if ( (*(_BYTE *)(a1 + 20) & 1) == 0 )
{
v4 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(a1 + 40);
if ( v4 )
return v4(a1, a2, a3, 0i64);
v6 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(*(_QWORD *)a1 + 48i64);
if ( v6 )
return v6(a1, a2, a3, 0i64);
}
return v3;
}
else
{
FUNC(37, 132, 67, (__int64)"crypto\\dso\\dso_lib.c", 268);
return 0i64;
}
}
| openssl |
__int64 __fastcall FUNC(__m128i *a1, __m128i *a2, __int64 *a3)
{
return FUNC(a1, a2, a3);
}
| openssl |
__int64 __fastcall FUNC(bio_st *a1, int *a2)
{
unsigned __int8 *v2; // rsi
int v3; // ebx
int v5; // ebx
const char *v6; // rdx
v2 = (unsigned __int8 *)*((_QWORD *)a2 + 1);
v3 = *a2;
FUNC((__int64)a1, (__int64)"IP:");
if ( v3 != 8 )
{
if ( v3 != 32 )
{
BIO_printf(a1, "IP Address:<invalid>");
return 1i64;
}
v5 = 0;
while ( 1 )
{
BIO_printf(a1, "%X", v2[1] | (*v2 << 8));
v2 += 2;
if ( v5 == 7 )
break;
if ( v5 != 15 )
{
v6 = ":";
goto LABEL_9;
}
LABEL_10:
if ( ++v5 >= 16 )
return 1i64;
}
v6 = "/";
LABEL_9:
FUNC((__int64)a1, (__int64)v6);
goto LABEL_10;
}
BIO_printf(a1, "%d.%d.%d.%d/%d.%d.%d.%d", *v2, v2[1], v2[2], v2[3], v2[4], v2[5], v2[6], v2[7]);
return 1i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2, bio_st *a3, int a4)
{
__int64 v5; // rdx
__int64 v8; // r8
v5 = *(_QWORD *)a2;
if ( v5 )
FUNC(a3, v5, a4);
if ( *(int *)(a2 + 8) > 0 )
BIO_printf(a3, "%*sOnly User Certificates\n", a4, &byte_1401BE510);
if ( *(int *)(a2 + 12) > 0 )
BIO_printf(a3, "%*sOnly CA Certificates\n", a4, &byte_1401BE510);
if ( *(int *)(a2 + 24) > 0 )
BIO_printf(a3, "%*sIndirect CRL\n", a4, &byte_1401BE510);
v8 = *(_QWORD *)(a2 + 16);
if ( v8 )
FUNC(a3, "Only Some Reasons", v8, a4);
if ( *(int *)(a2 + 28) > 0 )
BIO_printf(a3, "%*sOnly Attribute Certificates\n", a4, &byte_1401BE510);
if ( !*(_QWORD *)a2
&& *(int *)(a2 + 8) <= 0
&& *(int *)(a2 + 12) <= 0
&& *(int *)(a2 + 24) <= 0
&& !*(_QWORD *)(a2 + 16)
&& *(int *)(a2 + 28) <= 0 )
{
BIO_printf(a3, "%*s<EMPTY>\n", a4, &byte_1401BE510);
}
return 1i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v5; // rax
v5 = FUNC(a1);
return FUNC(v5, a2, a3);
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2)
{
int v2; // eax
return FUNC(a1, (unsigned int)(v2 + 35), a2);
}
| openssl |
void __fastcall FUNC(void *a1)
{
ASN1_item_free(a1, (__int64)&unk_140220D30);
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 *a2, __int64 *a3, __int64 a4)
{
__int64 v7; // rax
__int64 v8; // rdi
unsigned int *v9; // rax
unsigned int *v10; // rdi
__int64 v11; // rcx
__int64 v12; // rax
unsigned int *v14; // [rsp+30h] [rbp-38h]
int v15; // [rsp+40h] [rbp-28h] BYREF
__int64 v16; // [rsp+48h] [rbp-20h] BYREF
__int64 v17; // [rsp+50h] [rbp-18h] BYREF
__int64 v18; // [rsp+58h] [rbp-10h] BYREF
int v19; // [rsp+70h] [rbp+8h] BYREF
v17 = 0i64;
v19 = 0;
v16 = 0i64;
v18 = 0i64;
v7 = FUNC(a4);
v14 = *(unsigned int **)(a1 + 24);
v8 = v7;
v15 = *(_DWORD *)(a1 + 212);
if ( !(unsigned int)FUNC(a1, &v16, &v18, &v17, &v19, &v15, v14) )
{
v9 = (unsigned int *)(*(__int64 (__fastcall **)(__int64, __int64))(a1 + 128))(a1, v8);
v10 = v9;
if ( !v9 )
{
v11 = v16;
if ( v16 )
goto LABEL_6;
}
FUNC(a1, &v16, &v18, &v17, &v19, &v15, v9);
FUNC(v10, (void (__fastcall *)(_QWORD))FUNC);
}
v11 = v16;
if ( v16 )
{
LABEL_6:
*(_QWORD *)(a1 + 192) = v17;
*(_DWORD *)(a1 + 208) = v19;
*(_DWORD *)(a1 + 212) = v15;
v12 = v18;
*a2 = v11;
*a3 = v12;
return 1i64;
}
return 0i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, char *a2, size_t a3, int a4, _QWORD *a5)
{
unsigned __int64 v6; // rbx
unsigned int v10; // eax
_BYTE *i; // rcx
v6 = a3;
if ( !a2 )
return 4294967294i64;
if ( a3 )
{
if ( a3 > 1 )
--a3;
if ( memchr(a2, 0, a3) )
return 4294967294i64;
}
else
{
v10 = 0;
for ( i = a2; *i; ++v10 )
{
if ( v10 >= 0x80000000 )
break;
++i;
}
v6 = v10 & 0x7FFFFFFF;
}
if ( v6 > 1 && !a2[v6 - 1] )
--v6;
return FUNC(a1, a2, v6, a4, 2, a5);
}
| openssl |
__int64 __fastcall _dtold(__int64 a1, int *a2)
{
unsigned __int16 v2; // r8
__int16 v3; // r10
int v4; // r11d
unsigned int v6; // ecx
unsigned __int16 v7; // r8
unsigned int v8; // ebx
__int64 result; // rax
__int16 v10; // r8
int v11; // edx
v2 = *((_WORD *)a2 + 3);
v3 = v2 & 0x8000;
v4 = a2[1] & 0xFFFFF;
v6 = *a2;
v7 = (v2 >> 4) & 0x7FF;
v8 = 0x80000000;
result = v7;
if ( v7 )
{
if ( v7 == 2047 )
v10 = 0x7FFF;
else
v10 = v7 + 15360;
}
else
{
if ( !v4 && !v6 )
{
*(_DWORD *)(a1 + 4) = 0;
*(_DWORD *)a1 = 0;
goto LABEL_12;
}
v10 = 15361;
v8 = 0;
}
*(_DWORD *)a1 = v6 << 11;
result = v8 | (v4 << 11) | (v6 >> 21);
*(_DWORD *)(a1 + 4) = result;
if ( (int)result >= 0 )
{
do
{
v11 = *(__int64 *)a1 >> 31;
*(_DWORD *)a1 *= 2;
result = 0xFFFFi64;
*(_DWORD *)(a1 + 4) = v11;
--v10;
}
while ( v11 >= 0 );
}
v3 |= v10;
LABEL_12:
*(_WORD *)(a1 + 8) = v3;
return result;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, char *a2, char *a3, char a4)
{
__int64 v8; // rax
int v10; // esi
char v11[16]; // [rsp+40h] [rbp-38h] BYREF
v8 = FUNC(a2);
if ( v8 || (a4 & 8) == 0 && (v8 = (__int64)FUNC(a1, a2, (__int64)a3)) != 0 )
{
v10 = FUNC(v8, a2, a3, a1);
if ( v10 <= 0 && (a4 & 4) == 0 )
{
FUNC(14, 118, 109, (__int64)"crypto\\conf\\conf_mod.c", 177);
FUNC(v11, 0xDui64, "%-8d", (unsigned int)v10);
ERR_add_error_data(6, "module=", a2, ", value=", a3, ", retcode=", v11);
}
return (unsigned int)v10;
}
else
{
if ( (a4 & 4) == 0 )
{
FUNC(14, 118, 113, (__int64)"crypto\\conf\\conf_mod.c", 165);
ERR_add_error_data(2, "module=", a2);
}
return 0xFFFFFFFFi64;
}
}
| openssl |
__int64 __fastcall FUNC(__int64 *a1, int a2)
{
__int64 v2; // rax
int v4[14]; // [rsp+20h] [rbp-38h] BYREF
v2 = *a1;
if ( !*(_QWORD *)(*a1 + 40) )
return 0i64;
v4[0] = a2;
return (*(__int64 (__fastcall **)(_QWORD, int *))(v2 + 40))(0i64, v4);
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, _QWORD *a2)
{
int v2; // r8d
if ( a2[1] == 1i64 )
{
v2 = *(unsigned __int8 *)(*a2)++;
a2[1] = 0i64;
if ( (unsigned int)(v2 - 1) > 3 )
{
FUNC((_DWORD *)a1, 0x2Fu, 571, 232, (__int64)"ssl\\statem\\extensions_srvr.c", 190);
}
else
{
if ( !*(_DWORD *)(a1 + 200) || *(unsigned __int8 *)(*(_QWORD *)(a1 + 1288) + 584i64) == v2 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 1288) + 584i64) = v2;
return 1i64;
}
FUNC((_DWORD *)a1, 0x2Fu, 571, 232, (__int64)"ssl\\statem\\extensions_srvr.c", 202);
}
}
else
{
FUNC((_DWORD *)a1, 0x32u, 571, 110, (__int64)"ssl\\statem\\extensions_srvr.c", 182);
}
return 0i64;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, __int64 a2)
{
int v2; // eax
__int64 v5; // rcx
__int64 v6; // r8
int v7; // ecx
__int64 result; // rax
__int64 v9; // rcx
__int64 v10; // rdx
__int64 v11; // r8
size_t v12; // rdi
__int64 v13; // rcx
v2 = *(_DWORD *)(a1 + 56);
if ( !v2 && *(_DWORD *)(a1 + 1928) != 4 )
*(_DWORD *)(a1 + 112) = 1;
v5 = *(_QWORD *)(a1 + 8);
v6 = *(_QWORD *)(v5 + 192);
if ( (*(_BYTE *)(v6 + 96) & 8) != 0
|| (v7 = *(_DWORD *)v5, v7 < 772)
|| v7 == 0x10000
|| v2
|| *(_DWORD *)(*(_QWORD *)(a1 + 168) + 584i64)
|| (result = (*(__int64 (__fastcall **)(__int64, __int64))(v6 + 32))(a1, 146i64), (_DWORD)result) )
{
v9 = *(_QWORD *)(a1 + 8) + 192i64;
if ( *(_DWORD *)(a1 + 56) )
{
v10 = *(_QWORD *)(*(_QWORD *)v9 + 64i64);
v11 = *(_QWORD *)(*(_QWORD *)v9 + 72i64);
}
else
{
v10 = *(_QWORD *)(*(_QWORD *)v9 + 48i64);
v11 = *(_QWORD *)(*(_QWORD *)v9 + 56i64);
}
v12 = (*(__int64 (__fastcall **)(__int64, __int64, __int64, __int64))(*(_QWORD *)v9 + 40i64))(
a1,
v10,
v11,
*(_QWORD *)(a1 + 168) + 280i64);
if ( !v12 )
return 0i64;
*(_QWORD *)(*(_QWORD *)(a1 + 168) + 408i64) = v12;
if ( !(unsigned int)FUNC(a2, *(_QWORD *)(a1 + 168) + 280i64) )
{
FUNC((_DWORD *)a1, 0x50u, 359, 68, (__int64)"ssl\\statem\\statem_lib.c", 575);
return 0i64;
}
v13 = *(_QWORD *)(a1 + 8);
if ( ((*(_BYTE *)(*(_QWORD *)(v13 + 192) + 96i64) & 8) != 0 || *(int *)v13 < 772 || *(_DWORD *)v13 == 0x10000)
&& !(unsigned int)FUNC(
a1,
"CLIENT_RANDOM",
*(_QWORD *)(a1 + 1288) + 80i64,
*(_QWORD *)(*(_QWORD *)(a1 + 1288) + 8i64)) )
{
return 0i64;
}
if ( v12 > 0x40 )
{
FUNC((_DWORD *)a1, 0x50u, 359, 68, (__int64)"ssl\\statem\\statem_lib.c", 595);
return 0i64;
}
if ( *(_DWORD *)(a1 + 56) )
{
memmove((void *)(*(_QWORD *)(a1 + 168) + 912i64), (const void *)(*(_QWORD *)(a1 + 168) + 280i64), v12);
*(_QWORD *)(*(_QWORD *)(a1 + 168) + 976i64) = v12;
}
else
{
memmove((void *)(*(_QWORD *)(a1 + 168) + 840i64), (const void *)(*(_QWORD *)(a1 + 168) + 280i64), v12);
*(_QWORD *)(*(_QWORD *)(a1 + 168) + 904i64) = v12;
}
return 1i64;
}
return result;
}
| openssl |
void __fastcall FUNC(unsigned int a1, __int64 a2, __int64 *a3)
{
char *v5; // rbp
char *v6; // rax
__int64 *v7; // r14
int v8; // eax
__int64 v9; // r12
int v10; // edi
__int64 i; // rbx
__int64 v12; // rax
int v13; // esi
__int64 j; // rbx
__int64 v15; // rdi
__int64 v16; // rdx
char v17[80]; // [rsp+30h] [rbp-78h] BYREF
v5 = 0i64;
v6 = FUNC(a1);
v7 = (__int64 *)v6;
if ( !v6 )
goto LABEL_22;
v8 = FUNC(*(unsigned int **)v6);
v9 = v8;
if ( v8 > 0 )
{
if ( v8 < 10 )
{
v5 = v17;
goto LABEL_6;
}
v5 = (char *)CRYPTO_malloc(8i64 * v8, "crypto\\ex_data.c", 337i64);
if ( v5 )
{
LABEL_6:
v10 = 0;
for ( i = 0i64; i < v9; *(_QWORD *)&v5[8 * i - 8] = v12 )
{
v12 = FUNC(*v7, v10);
++i;
++v10;
}
}
}
FUNC((struct _RTL_CRITICAL_SECTION *)qword_140285380);
v13 = 0;
for ( j = 0i64; j < v9; ++v13 )
{
if ( v5 )
{
v15 = *(_QWORD *)&v5[8 * j];
}
else
{
FUNC((struct _RTL_CRITICAL_SECTION *)qword_140285380);
v15 = FUNC(*v7, v13);
FUNC((struct _RTL_CRITICAL_SECTION *)qword_140285380);
}
if ( v15 && *(_QWORD *)(v15 + 24) )
{
if ( *a3 && v13 < (int)FUNC((unsigned int *)*a3) )
v16 = FUNC(*a3, v13);
else
v16 = 0i64;
(*(void (__fastcall **)(__int64, __int64, __int64 *, _QWORD, _DWORD, _QWORD))(v15 + 24))(
a2,
v16,
a3,
(unsigned int)v13,
*(_DWORD *)v15,
*(_QWORD *)(v15 + 8));
}
++j;
}
if ( v5 != v17 )
CRYPTO_free(v5, "crypto\\ex_data.c", 359i64);
LABEL_22:
FUNC((void **)*a3);
*a3 = 0i64;
}
| openssl |
__int64 __fastcall FUNC(_QWORD *a1)
{
__int64 v3; // rdi
__int64 v4; // rdx
__int64 v5; // rdx
if ( !a1 )
return 0i64;
v3 = a1[8];
FUNC(a1, 7u, 0, (__int64)a1);
v4 = a1[9];
if ( v4 )
*(_QWORD *)(v4 + 64) = a1[8];
v5 = a1[8];
if ( v5 )
*(_QWORD *)(v5 + 72) = a1[9];
a1[8] = 0i64;
a1[9] = 0i64;
return v3;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, wpacket_st *a2)
{
int v4; // eax
int v5; // eax
__int64 v6; // rsi
_WORD *v8; // [rsp+40h] [rbp+8h] BYREF
v4 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 192i64) + 96i64) & 8;
if ( v4 || *(int *)(a1 + 1516) < 771 )
{
if ( !v4 )
return 2i64;
v5 = *(_DWORD *)(a1 + 1516);
if ( v5 == 256 || v5 > 65277 )
return 2i64;
}
v6 = FUNC(a1, 1, &v8);
if ( FUNC((__int64)a2, 0xDu, 2ui64)
&& (unsigned int)FUNC((__int64)a2, 2ui64)
&& (unsigned int)FUNC((__int64)a2, 2ui64)
&& (unsigned int)FUNC(a1, (__int64)a2, v8, v6)
&& (unsigned int)WPACKET_close(a2)
&& (unsigned int)WPACKET_close(a2) )
{
return 1i64;
}
FUNC((_DWORD *)a1, 0x50u, 477, 68, (__int64)"ssl\\statem\\extensions_clnt.c", 284);
return 0i64;
}
| openssl |
__int64 __fastcall FUNC(_DWORD *a1, __int64 a2, __int64 a3, int *a4)
{
unsigned int v4; // edi
unsigned int v9; // ebx
int *v10; // r13
__int64 v12; // r15
__int64 v13; // [rsp+30h] [rbp-48h]
__int64 v14; // [rsp+38h] [rbp-40h]
__int64 v15; // [rsp+40h] [rbp-38h]
v4 = 0;
v9 = -1;
v10 = 0i64;
if ( (unsigned int)FUNC(a1, a2) )
{
LOBYTE(v4) = (unsigned int)FUNC(a1, a3) == 0;
return v4;
}
else if ( (unsigned int)FUNC(a1, a3) )
{
return 1i64;
}
else if ( *(_DWORD *)(a2 + 40) && *(_DWORD *)(a3 + 40) )
{
if ( (unsigned int)FUNC(*(_QWORD *)(a2 + 16), *(_QWORD *)(a3 + 16))
|| (unsigned int)FUNC(*(_QWORD *)(a2 + 24), *(_QWORD *)(a3 + 24)) )
{
return 1;
}
return v4;
}
else
{
if ( a4 || (v10 = (int *)FUNC(), (a4 = v10) != 0i64) )
{
FUNC(a4);
v13 = FUNC(a4);
v14 = FUNC(a4);
v15 = FUNC(a4);
v12 = FUNC(a4);
if ( v12
&& (unsigned int)FUNC(a1, a2, v13, v14, (__int64)a4)
&& (unsigned int)FUNC(a1, a3, v15, v12, (__int64)a4) )
{
v9 = (unsigned int)FUNC(v13, v15) || (unsigned int)FUNC(v14, v12);
}
FUNC((__int64)a4);
FUNC((__int64)v10);
}
return v9;
}
}
| openssl |
__int64 __fastcall FUNC(__ExceptionPtr *a1, char *a2)
{
return FUNC(a1, a2, strlen(a2));
}
| openssl |
int __cdecl wcsnicmp_l(const wchar_t *String1, const wchar_t *String2, size_t MaxCount, _locale_t Locale)
{
size_t v4; // rbp
wint_t *v5; // rsi
wint_t *v6; // rdi
int result; // eax
wint_t v8; // bx
wint_t v9; // ax
__crt_locale_pointers Localea; // [rsp+30h] [rbp-28h] BYREF
__int64 v11; // [rsp+40h] [rbp-18h]
char v12; // [rsp+48h] [rbp-10h]
v4 = MaxCount;
v5 = (wint_t *)String2;
v6 = (wint_t *)String1;
result = 0;
if ( MaxCount )
{
if ( String1 && String2 )
{
_LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&Localea, (const __m128i *)Locale);
if ( *((_DWORD *)Localea.locinfo + 5) )
{
do
{
v8 = towlower_l(*v6, &Localea);
v9 = towlower_l(*v5, &Localea);
++v6;
++v5;
--v4;
}
while ( v4 && v8 && v8 == v9 );
}
else
{
do
{
v8 = *v6;
if ( *v6 >= 0x41u && v8 <= 0x5Au )
v8 += 32;
v9 = *v5;
if ( *v5 >= 0x41u && v9 <= 0x5Au )
v9 += 32;
++v6;
++v5;
--v4;
}
while ( v4 && v8 && v8 == v9 );
}
result = v8 - v9;
if ( v12 )
*(_DWORD *)(v11 + 200) &= ~2u;
}
else
{
*errno() = 22;
invalid_parameter(0i64, 0i64, 0i64, 0, 0i64);
return 0x7FFFFFFF;
}
}
return result;
}
| openssl |
_BOOL8 __fastcall FUNC(_DWORD *a1, char *a2, int *a3, char *a4, int a5)
{
int v5; // edi
int v10; // r15d
__int64 v11; // r10
__int64 v12; // r12
int v14; // eax
int v15; // r9d
int v16; // r15d
int v17; // ebx
int v18; // edi
v5 = a5;
v10 = a5;
if ( (unsigned int)FUNC((__int64)a1, 0x2000u) )
v10 = (a5 + 7) / 8;
v11 = *(_QWORD *)a1;
v12 = *(int *)(*(_QWORD *)a1 + 4i64);
if ( _bittest((const signed __int32 *)(*(_QWORD *)a1 + 16i64), 0x14u) )
{
if ( (_DWORD)v12 == 1
&& a2 != a4
&& (a2 - a4 < (unsigned __int64)v10 || a2 - a4 > (unsigned __int64)-(__int64)v10)
&& v10 > 0 )
{
FUNC(6, 219, 162, (__int64)"crypto\\evp\\evp_enc.c", 311);
return 0i64;
}
v14 = (*(__int64 (__fastcall **)(_DWORD *, char *, char *, _QWORD))(v11 + 32))(a1, a2, a4, a5);
if ( v14 < 0 )
return 0i64;
*a3 = v14;
return 1i64;
}
if ( a5 <= 0 )
{
*a3 = 0;
return a5 == 0;
}
v15 = a1[5];
if ( &a2[v15 - (_QWORD)a4] != 0i64
&& ((unsigned __int64)&a2[v15 - (_QWORD)a4] < v10 || (unsigned __int64)&a2[v15 - (_QWORD)a4] > -(__int64)v10)
&& v10 > 0 )
{
FUNC(6, 219, 162, (__int64)"crypto\\evp\\evp_enc.c", 328);
return 0i64;
}
if ( v15 || (a5 & a1[31]) != 0 )
{
if ( (int)v12 > 32 )
OPENSSL_die("assertion failed: bl <= (int)sizeof(ctx->buf)", "crypto\\evp\\evp_enc.c", 342);
if ( v15 )
{
v16 = v12 - v15;
if ( (int)v12 - v15 > a5 )
{
memmove((char *)a1 + v15 + 56, a4, a5);
a1[5] += a5;
*a3 = 0;
return 1i64;
}
memmove((char *)a1 + v15 + 56, a4, v16);
v5 = a5 - v16;
a4 += v16;
if ( !(*(unsigned int (__fastcall **)(_DWORD *, char *, _DWORD *, __int64))(*(_QWORD *)a1 + 32i64))(
a1,
a2,
a1 + 14,
v12) )
return 0i64;
a2 += v12;
*a3 = v12;
}
else
{
*a3 = 0;
}
v17 = v5 & (v12 - 1);
v18 = v5 - v17;
if ( v18 > 0 )
{
if ( !(*(unsigned int (__fastcall **)(_DWORD *, char *, char *, _QWORD))(*(_QWORD *)a1 + 32i64))(a1, a2, a4, v18) )
return 0i64;
*a3 += v18;
}
if ( v17 )
memmove(a1 + 14, &a4[v18], v17);
a1[5] = v17;
return 1i64;
}
if ( !(*(unsigned int (__fastcall **)(_DWORD *, char *, char *, _QWORD))(v11 + 32))(a1, a2, a4, a5) )
{
*a3 = 0;
return 0i64;
}
*a3 = a5;
return 1i64;
}
| openssl |
// attributes: thunk
PVOID __stdcall EncodePointer(PVOID Ptr)
{
return __imp_EncodePointer(Ptr);
}
| openssl |
int __fastcall FUNC(int a1)
{
int v1; // eax
__int64 v2; // rax
char v4[24]; // [rsp+20h] [rbp-58h] BYREF
int v5; // [rsp+38h] [rbp-40h]
v5 = a1;
LODWORD(v2) = OBJ_bsearch_ssl_cipher_id(
(ssl_cipher_st *)v4,
(const ssl_cipher_st *)&unk_140279670,
(engine_st *)(unsigned int)(v1 - 115));
if ( !v2 )
{
LODWORD(v2) = OBJ_bsearch_ssl_cipher_id(
(ssl_cipher_st *)v4,
(const ssl_cipher_st *)&unk_140279800,
(engine_st *)0xA3);
if ( !v2 )
LODWORD(v2) = OBJ_bsearch_ssl_cipher_id(
(ssl_cipher_st *)v4,
(const ssl_cipher_st *)&unk_14027CAF0,
(engine_st *)2);
}
return v2;
}
| openssl |
__int64 __fastcall FUNC(_DWORD *a1, wpacket_st *a2)
{
int v4; // eax
unsigned int v6; // ebx
int v7; // [rsp+30h] [rbp-18h] BYREF
int v8[5]; // [rsp+34h] [rbp-14h] BYREF
v4 = FUNC((__int64)a1, v8, &v7, 0i64);
if ( v4 )
{
FUNC(a1, 0x50u, 481, v4, (__int64)"ssl\\statem\\extensions_clnt.c", 516);
return 0i64;
}
if ( v7 < 772 )
return 2i64;
if ( !FUNC((__int64)a2, 0x2Bu, 2ui64)
|| !(unsigned int)FUNC((__int64)a2, 2ui64)
|| !(unsigned int)FUNC((__int64)a2, 1ui64) )
{
FUNC(a1, 0x50u, 481, 68, (__int64)"ssl\\statem\\extensions_clnt.c", 532);
return 0i64;
}
v6 = v7;
if ( v7 < v8[0] )
{
LABEL_12:
if ( (unsigned int)WPACKET_close(a2) && (unsigned int)WPACKET_close(a2) )
return 1i64;
FUNC(a1, 0x50u, 481, 68, (__int64)"ssl\\statem\\extensions_clnt.c", 547);
}
else
{
while ( FUNC((__int64)a2, v6, 2ui64) )
{
if ( (int)--v6 < v8[0] )
goto LABEL_12;
}
FUNC(a1, 0x50u, 481, 68, (__int64)"ssl\\statem\\extensions_clnt.c", 540);
}
return 0i64;
}
| openssl |
__int64 mtterm()
{
if ( dwFlsIndex != -1 )
{
FlsFree(dwFlsIndex);
dwFlsIndex = -1;
}
return mtdeletelocks();
}
| openssl |
__int64 __fastcall FUNC(_BYTE *a1, int a2, const void *a3, int a4)
{
int v4; // eax
__int64 v5; // rsi
int v7; // edx
void *v9; // rdi
_BYTE *v10; // rdi
size_t v11; // rbx
v5 = a4;
v7 = a2 - a4 - 2;
if ( v7 >= 0 )
{
if ( v7 )
{
*a1 = 107;
v10 = a1 + 1;
if ( v7 > 1 )
{
v11 = v7 - 1;
memset(a1 + 1, 187, v11);
v10 += v11;
}
*v10 = -70;
v9 = v10 + 1;
}
else
{
*a1 = 106;
v9 = a1 + 1;
}
memmove(v9, a3, (unsigned int)v5);
*((_BYTE *)v9 + v5) = -52;
return 1i64;
}
else
{
FUNC(v4 - 44, v4 + 79, v4 + 62, (__int64)"crypto\\rsa\\rsa_x931.c", 30);
return 0xFFFFFFFFi64;
}
}
| openssl |
__int64 __fastcall FUNC(unsigned int a1, __int64 a2, _BYTE *a3, __int64 a4, int a5)
{
size_t v5; // rbp
bn_blinding_st *v9; // r15
int *v10; // rax
int *v11; // r12
__int64 *v12; // r13
__m128i *v13; // rdi
_BYTE *v14; // rax
_BYTE *v15; // r14
int v16; // eax
bignum_st *v17; // rax
bignum_st *v18; // rax
__int64 v19; // rsi
const bignum_st *v20; // rdx
__int64 v21; // rcx
int v22; // eax
int v24; // [rsp+30h] [rbp-48h] BYREF
unsigned int v25; // [rsp+34h] [rbp-44h]
_BYTE *v26; // [rsp+38h] [rbp-40h]
bignum_st *v27; // [rsp+40h] [rbp-38h]
LODWORD(v5) = 0;
v25 = -1;
v24 = 0;
v27 = 0i64;
v9 = 0i64;
v10 = (int *)FUNC();
v11 = v10;
if ( !v10 )
{
v15 = 0i64;
goto LABEL_50;
}
FUNC(v10);
v12 = (__int64 *)FUNC(v11);
v13 = (__m128i *)FUNC(v11);
v5 = (int)(FUNC(*(_QWORD *)(a4 + 24)) + 7) / 8;
v14 = CRYPTO_malloc(v5, "crypto\\rsa\\rsa_ossl.c", 255i64);
v26 = v14;
if ( !v13 || !v14 )
{
FUNC(4, 102, 65, (__int64)"crypto\\rsa\\rsa_ossl.c", 257);
v15 = v26;
goto LABEL_50;
}
switch ( a5 )
{
case 1:
v16 = FUNC(v14, (unsigned int)v5, a2, a1);
break;
case 3:
v16 = FUNC(v14, (unsigned int)v5, a2, a1);
break;
case 5:
v16 = FUNC(v14, (unsigned int)v5, a2, a1);
break;
default:
FUNC(4, 102, 118, (__int64)"crypto\\rsa\\rsa_ossl.c", 273);
v15 = v26;
goto LABEL_50;
}
v15 = v26;
if ( v16 > 0 && FUNC(v26, v5, (__int64)v12) )
{
if ( (int)FUNC(v12, *(__int64 **)(a4 + 24)) >= 0 )
{
FUNC(4, 102, 132, (__int64)"crypto\\rsa\\rsa_ossl.c", 285);
goto LABEL_50;
}
if ( (*(_BYTE *)(a4 + 116) & 2) == 0
|| FUNC((_BYTE **)(a4 + 120), *(struct _RTL_CRITICAL_SECTION **)(a4 + 168), *(__int64 ***)(a4 + 24), v11) )
{
if ( *(char *)(a4 + 116) < 0 )
goto LABEL_53;
v9 = (bn_blinding_st *)FUNC(a4, &v24, (__int64)v11);
if ( !v9 )
{
FUNC(4, 102, 68, (__int64)"crypto\\rsa\\rsa_ossl.c", 297);
goto LABEL_50;
}
if ( v24 )
{
v17 = v27;
}
else
{
v17 = (bignum_st *)FUNC(v11);
v27 = v17;
if ( !v17 )
{
FUNC(4, 102, 65, (__int64)"crypto\\rsa\\rsa_ossl.c", 304);
goto LABEL_50;
}
}
if ( (unsigned int)rsa_blinding_convert(v9, (bignum_st *)v12, v17, (bignum_ctx *)v11) )
{
LABEL_53:
if ( (*(_BYTE *)(a4 + 116) & 0x20) != 0
|| *(_DWORD *)(a4 + 4) == 1
|| *(_QWORD *)(a4 + 48)
&& *(_QWORD *)(a4 + 56)
&& *(_QWORD *)(a4 + 64)
&& *(_QWORD *)(a4 + 72)
&& *(_QWORD *)(a4 + 80) )
{
if ( !(*(unsigned int (__fastcall **)(__m128i *, __int64 *, __int64, int *))(*(_QWORD *)(a4 + 8) + 40i64))(
v13,
v12,
a4,
v11) )
goto LABEL_50;
}
else
{
v18 = (bignum_st *)FUNC();
v19 = (__int64)v18;
if ( !v18 )
{
FUNC(4, 102, 65, (__int64)"crypto\\rsa\\rsa_ossl.c", 321);
goto LABEL_50;
}
v20 = *(const bignum_st **)(a4 + 40);
if ( !v20 )
{
FUNC(4, 102, 179, (__int64)"crypto\\rsa\\rsa_ossl.c", 325);
v21 = v19;
LABEL_37:
FUNC(v21);
goto LABEL_50;
}
BN_with_flags_0(v18, v20, 4);
v22 = (*(__int64 (__fastcall **)(__m128i *, __int64 *, __int64, _QWORD, int *, _QWORD))(*(_QWORD *)(a4 + 8)
+ 48i64))(
v13,
v12,
v19,
*(_QWORD *)(a4 + 24),
v11,
*(_QWORD *)(a4 + 120));
v21 = v19;
if ( !v22 )
goto LABEL_37;
FUNC(v19);
}
if ( !v9 || (unsigned int)FUNC((__int64)v13, (__int64)v27, (__int64)v9, (bignum_ctx *)v11) )
{
if ( a5 == 5 )
{
if ( !(unsigned int)FUNC((__int64)v12, *(_QWORD *)(a4 + 24), (__int64)v13) )
goto LABEL_50;
if ( (int)FUNC((__int64)v13, (__int64)v12) > 0 )
v13 = (__m128i *)v12;
}
v25 = BN_bn2binpad_0(v13, a3, v5);
}
}
}
}
LABEL_50:
FUNC((__int64)v11);
FUNC((__int64)v11);
FUNC(v15, (int)v5, (__int64)"crypto\\rsa\\rsa_ossl.c", 0x16Bu);
return v25;
}
| openssl |
void *FUNC()
{
return &unk_1402240F0;
}
| openssl |
__int64 __fastcall FUNC(bio_st *a1, __int64 *a2, int *a3)
{
unsigned int v7; // eax
__int64 v8; // rax
__int64 (__fastcall *v9)(bio_st *, __int64 *, int *, __int64, _QWORD); // r10
char v10[24]; // [rsp+30h] [rbp-18h] BYREF
unsigned int v11; // [rsp+68h] [rbp+20h] BYREF
if ( (int)FUNC((__int64)a1, (__int64)" Signature Algorithm: ") <= 0 || (int)FUNC(a1, *a2) <= 0 )
return 0i64;
v7 = FUNC(*a2);
if ( v7 )
{
if ( (unsigned int)FUNC(v7, v10, &v11) )
{
v8 = FUNC(0i64, v11);
if ( v8 )
{
v9 = *(__int64 (__fastcall **)(bio_st *, __int64 *, int *, __int64, _QWORD))(v8 + 160);
if ( v9 )
return v9(a1, a2, a3, 9i64, 0i64);
}
}
}
if ( a3 )
return FUNC(a1, a3, 9);
return (int)FUNC((__int64)a1, (__int64)"\n") > 0;
}
| openssl |
__int64 __fastcall FUNC(_DWORD *a1, __int64 a2, __int64 *a3, int *a4, _DWORD *a5)
{
int v5; // eax
__int64 v10; // r12
__int64 v11; // rbp
__int64 *v12; // rdi
__int64 v13; // r13
__int64 *v14; // r14
__int64 v15; // rsi
_DWORD *v16; // rax
__int64 v17; // rbx
int v18; // ebx
__int64 v19; // r13
int v20; // ebx
int v21; // ebx
int v22; // ebx
__int64 *v23; // rbx
int v24; // ebx
int v26; // [rsp+30h] [rbp-58h]
__int64 v27; // [rsp+38h] [rbp-50h]
__int64 *v28; // [rsp+40h] [rbp-48h]
if ( BN_abs_is_word_0((const bignum_st *)a3, (unsigned int)(v5 - 87)) || FUNC((__int64)a3) )
{
if ( a5 )
*a5 = 1;
return 0i64;
}
else
{
if ( a5 )
*a5 = 0;
if ( !(unsigned int)FUNC(a2, 4u) && !(unsigned int)FUNC((__int64)a3, 4u) )
{
FUNC(a4);
v10 = FUNC(a4);
v11 = FUNC(a4);
v12 = (__int64 *)FUNC(a4);
v13 = FUNC(a4);
v14 = (__int64 *)FUNC(a4);
v15 = FUNC(a4);
v28 = (__int64 *)FUNC(a4);
if ( !v28 )
{
v17 = (__int64)a4;
v19 = 0i64;
v16 = 0i64;
goto LABEL_122;
}
v16 = a1;
if ( a1 )
{
v27 = (__int64)a1;
}
else
{
v16 = FUNC();
v27 = (__int64)v16;
}
if ( !v16 )
{
v17 = (__int64)a4;
v19 = 0i64;
goto LABEL_122;
}
FUNC((__int64)v12, 1i64);
FUNC(v15, 0i64);
if ( !FUNC(v11, a2) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !FUNC(v10, (__int64)a3) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
*(_DWORD *)(v10 + 16) = 0;
if ( *(_DWORD *)(v11 + 16) || (int)FUNC((__int64 *)v11, (__int64 *)v10) >= 0 )
{
v17 = (__int64)a4;
if ( !(unsigned int)BN_nnmod(v11, v11, v10, a4) )
{
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
v26 = -1;
if ( FUNC((__int64)a3) && (int)FUNC((__int64)a3) <= 2048 )
{
if ( !FUNC(v11) )
{
while ( 1 )
{
v18 = 0;
if ( !(unsigned int)FUNC(v11, 0) )
{
do
{
++v18;
if ( FUNC((__int64)v12)
&& !(unsigned int)FUNC((__int64)v12, (__int64)v12, (__int64)a3) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !(unsigned int)FUNC((__int64)v12, (__int64)v12) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
while ( !(unsigned int)FUNC(v11, v18) );
if ( v18 > 0 && !(unsigned int)FUNC(v11, v11, v18) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
v19 = 0i64;
v20 = 0;
if ( !(unsigned int)FUNC(v10, 0) )
{
do
{
++v20;
if ( FUNC(v15) && !(unsigned int)FUNC(v15, v15, (__int64)a3) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
if ( !(unsigned int)FUNC(v15, v15) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
}
while ( !(unsigned int)FUNC(v10, v20) );
if ( v20 > 0 && !(unsigned int)FUNC(v10, v10, v20) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
}
if ( (int)FUNC((__int64 *)v11, (__int64 *)v10) < 0 )
{
if ( !(unsigned int)FUNC(v15, v15, (__int64)v12) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
if ( !(unsigned int)FUNC(v10, v10, v11) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
}
else
{
if ( !(unsigned int)FUNC((__int64)v12, (__int64)v12, v15) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
if ( !(unsigned int)FUNC(v11, v11, v10) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
}
if ( FUNC(v11) )
goto LABEL_82;
}
}
v19 = 0i64;
}
else
{
if ( !FUNC(v11) )
{
do
{
v21 = FUNC(v11);
if ( (unsigned int)FUNC(v10) == v21 )
{
if ( !(unsigned int)FUNC(v13, 1i64) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !(unsigned int)FUNC((__int64)v14, v10, v11) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
else
{
v22 = FUNC(v11) + 1;
if ( (unsigned int)FUNC(v10) == v22 )
{
if ( !(unsigned int)FUNC((__int64)v28, v11) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( (int)FUNC((__int64 *)v10, v28) >= 0 )
{
if ( !(unsigned int)FUNC((__int64)v14, v10, (__int64)v28) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !(unsigned int)FUNC(v13, (__int64)v28, v11) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( (int)FUNC((__int64 *)v10, (__int64 *)v13) >= 0 )
{
if ( !(unsigned int)FUNC(v13, 3i64) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !(unsigned int)FUNC((__int64)v14, (__int64)v14, v11) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
else if ( !(unsigned int)FUNC(v13, 2i64) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
else
{
if ( !(unsigned int)FUNC(v13, 1i64) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !(unsigned int)FUNC((__int64)v14, v10, v11) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
}
else
{
v17 = (__int64)a4;
if ( !(unsigned int)FUNC((__int64 *)v13, v14, v10, v11, a4) )
{
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
}
v23 = (__int64 *)v10;
v10 = v11;
v11 = (__int64)v14;
if ( FUNC(v13) )
{
if ( !(unsigned int)FUNC((__int64)v23, (__int64)v12, v15) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
else
{
if ( (unsigned int)FUNC(v13, 2i64) )
{
if ( !(unsigned int)FUNC((__int64)v23, (__int64)v12) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
else if ( (unsigned int)FUNC(v13, 4i64) )
{
if ( !(unsigned int)FUNC(v23, v12, 2) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
else if ( *(_DWORD *)(v13 + 8) == 1 )
{
if ( !FUNC((__int64)v23, (__int64)v12) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !(unsigned int)BN_mul_word_0(v23, **(_QWORD **)v13) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
else if ( !(unsigned int)EVP_DigestFinal_1_1(
(evp_md_ctx_st *)v23,
(unsigned __int64 **)v13,
(unsigned __int64 **)v12,
a4) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
if ( !(unsigned int)FUNC((__int64)v23, (__int64)v23, v15) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
v19 = 0i64;
goto LABEL_122;
}
}
v14 = (__int64 *)v15;
v15 = (__int64)v12;
v12 = v23;
v24 = -v26;
v26 = -v26;
}
while ( !FUNC(v11) );
if ( v24 < 0 )
{
v19 = 0i64;
goto LABEL_82;
}
v19 = 0i64;
LABEL_85:
if ( FUNC(v10) )
{
if ( *(_DWORD *)(v15 + 16) || (int)FUNC((__int64 *)v15, a3) >= 0 )
{
v17 = (__int64)a4;
if ( !(unsigned int)BN_nnmod(v27, v15, a3, a4) )
{
v16 = (_DWORD *)v27;
goto LABEL_122;
}
v19 = v27;
goto LABEL_124;
}
if ( FUNC(v27, v15) )
{
v17 = (__int64)a4;
v19 = v27;
LABEL_124:
FUNC(v17);
return v19;
}
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
}
else
{
v17 = (__int64)a4;
if ( a5 )
*a5 = 1;
v16 = (_DWORD *)v27;
}
LABEL_122:
if ( !a1 )
FUNC((__int64)v16);
goto LABEL_124;
}
v19 = 0i64;
}
LABEL_82:
if ( !(unsigned int)FUNC(v15, (__int64)a3, v15) )
{
v17 = (__int64)a4;
v16 = (_DWORD *)v27;
goto LABEL_122;
}
goto LABEL_85;
}
return FUNC(a1, a2, (__int64)a3, a4);
}
}
| openssl |
__int16 __fastcall FUNC(__int64 a1, int a2)
{
int v2; // r8d
int v5; // eax
int v6; // ecx
void *v7; // rdx
_WORD *v8; // rdi
unsigned __int64 v9; // rbx
unsigned __int64 v10; // r15
int v11; // ecx
int v12; // ecx
int v13; // r14d
unsigned __int64 i; // r12
unsigned __int16 v15; // si
__int64 v16; // rax
int *v17; // rdx
int v18; // r9d
unsigned int v19; // r8d
char v20; // [rsp+70h] [rbp+8h] BYREF
char v21; // [rsp+71h] [rbp+9h]
int v22; // [rsp+78h] [rbp+10h]
void *v23; // [rsp+80h] [rbp+18h]
v22 = a2;
v2 = a2;
if ( !*(_DWORD *)(a1 + 56) )
return 0;
if ( a2 == -2 )
{
if ( (*(_DWORD *)(*(_QWORD *)(a1 + 1160) + 28i64) & 0x30000) != 0 )
{
v5 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 168) + 568i64) + 24i64);
if ( v5 == 50380843 )
return 23;
if ( v5 == 50380844 )
return 24;
return 0;
}
v2 = 0;
v22 = 0;
}
if ( _bittest((const signed __int32 *)(a1 + 1484), 0x16u) )
{
v6 = *(_DWORD *)(*(_QWORD *)(a1 + 1160) + 28i64) & 0x30000;
switch ( v6 )
{
case 65536:
v8 = *(_WORD **)(a1 + 1720);
v9 = *(_QWORD *)(a1 + 1712);
v7 = &unk_1401E0FFC;
v23 = &unk_1401E0FFC;
v10 = 1i64;
break;
case 131072:
v8 = *(_WORD **)(a1 + 1720);
v9 = *(_QWORD *)(a1 + 1712);
v7 = &unk_1401E0FFE;
v23 = &unk_1401E0FFE;
v10 = 1i64;
break;
case 196608:
v8 = *(_WORD **)(a1 + 1720);
v9 = *(_QWORD *)(a1 + 1712);
v7 = &unk_1401E0FFC;
v23 = &unk_1401E0FFC;
v10 = 2i64;
break;
default:
v7 = *(void **)(a1 + 1704);
v23 = v7;
if ( v7 )
{
v10 = *(_QWORD *)(a1 + 1696);
v8 = *(_WORD **)(a1 + 1720);
v9 = *(_QWORD *)(a1 + 1712);
}
else
{
v8 = *(_WORD **)(a1 + 1720);
v9 = *(_QWORD *)(a1 + 1712);
v7 = &unk_1401E0FF0;
v23 = &unk_1401E0FF0;
v10 = 5i64;
}
break;
}
}
else
{
v7 = *(void **)(a1 + 1720);
v10 = *(_QWORD *)(a1 + 1712);
v11 = *(_DWORD *)(*(_QWORD *)(a1 + 1160) + 28i64);
v23 = v7;
v12 = v11 & 0x30000;
switch ( v12 )
{
case 65536:
v8 = &unk_1401E0FFC;
v9 = 1i64;
break;
case 131072:
v8 = &unk_1401E0FFE;
v9 = 1i64;
break;
case 196608:
v8 = &unk_1401E0FFC;
v9 = 2i64;
break;
default:
v8 = *(_WORD **)(a1 + 1704);
if ( v8 )
{
v9 = *(_QWORD *)(a1 + 1696);
}
else
{
v8 = &unk_1401E0FF0;
v9 = 5i64;
}
break;
}
}
v13 = 0;
for ( i = 0i64; i < v10; ++i )
{
v15 = *((_WORD *)v7 + i);
v16 = 0i64;
if ( v9 )
{
while ( v8[v16] != v15 )
{
if ( ++v16 >= v9 )
goto LABEL_41;
}
if ( (unsigned __int16)(v15 - 1) <= 0x1Du )
{
v17 = (int *)((char *)&unk_1401E0E80 + 12 * v15 - 12);
if ( v17 )
{
v18 = *v17;
v19 = v17[1];
v20 = HIBYTE(v15);
v21 = v15;
if ( (unsigned int)ssl_security((const ssl_st *)a1, 0x20005u, v19, v18, &v20) )
{
v2 = v22;
if ( v22 == v13 )
return v15;
v7 = v23;
++v13;
}
else
{
v7 = v23;
v2 = v22;
}
}
else
{
v7 = v23;
}
}
}
LABEL_41:
;
}
if ( v2 == -1 )
return v13;
else
return 0;
}
| openssl |
void *__fastcall FUNC(unsigned int *a1, const void *a2, int a3, __int64 a4, __int64 a5, void *a6, _QWORD *a7)
{
void *result; // rax
unsigned int v8[6]; // [rsp+40h] [rbp-18h] BYREF
result = FUNC(a1, a2, a3, a4, a5, a6, v8);
if ( result )
{
result = a6;
*a7 = v8[0];
}
return result;
}
| openssl |
__int64 __fastcall FUNC(unsigned int *a1, _DWORD *a2)
{
unsigned int v3; // r9d
unsigned int v4; // r8d
unsigned int v5; // r9d
unsigned int v6; // r8d
unsigned int v7; // r9d
unsigned int v8; // r8d
unsigned int v9; // r9d
unsigned int v10; // r8d
unsigned int v11; // r9d
unsigned int v12; // r8d
unsigned int v13; // r9d
unsigned int v14; // r8d
unsigned int v15; // r9d
unsigned int v16; // r8d
unsigned int v17; // r9d
unsigned int v18; // r8d
__int64 result; // rax
int v20; // edx
v3 = *a1 ^ a2[17];
v4 = a1[1] ^ a2[16] ^ (a2[(unsigned __int8)v3 + 786]
+ (a2[BYTE1(v3) + 530] ^ (a2[((unsigned __int64)v3 >> 24) + 18] + a2[BYTE2(v3) + 274])));
v5 = a2[15] ^ (a2[(unsigned __int8)v4 + 786]
+ (a2[BYTE1(v4) + 530] ^ (a2[((unsigned __int64)v4 >> 24) + 18] + a2[BYTE2(v4) + 274]))) ^ v3;
v6 = a2[14] ^ (a2[(unsigned __int8)v5 + 786]
+ (a2[BYTE1(v5) + 530] ^ (a2[((unsigned __int64)v5 >> 24) + 18] + a2[BYTE2(v5) + 274]))) ^ v4;
v7 = a2[13] ^ (a2[(unsigned __int8)v6 + 786]
+ (a2[BYTE1(v6) + 530] ^ (a2[((unsigned __int64)v6 >> 24) + 18] + a2[BYTE2(v6) + 274]))) ^ v5;
v8 = a2[12] ^ (a2[(unsigned __int8)v7 + 786]
+ (a2[BYTE1(v7) + 530] ^ (a2[((unsigned __int64)v7 >> 24) + 18] + a2[BYTE2(v7) + 274]))) ^ v6;
v9 = a2[11] ^ (a2[(unsigned __int8)v8 + 786]
+ (a2[BYTE1(v8) + 530] ^ (a2[((unsigned __int64)v8 >> 24) + 18] + a2[BYTE2(v8) + 274]))) ^ v7;
v10 = a2[10] ^ (a2[(unsigned __int8)v9 + 786]
+ (a2[BYTE1(v9) + 530] ^ (a2[((unsigned __int64)v9 >> 24) + 18] + a2[BYTE2(v9) + 274]))) ^ v8;
v11 = a2[9] ^ (a2[(unsigned __int8)v10 + 786]
+ (a2[BYTE1(v10) + 530] ^ (a2[((unsigned __int64)v10 >> 24) + 18] + a2[BYTE2(v10) + 274]))) ^ v9;
v12 = a2[8] ^ (a2[(unsigned __int8)v11 + 786]
+ (a2[BYTE1(v11) + 530] ^ (a2[((unsigned __int64)v11 >> 24) + 18] + a2[BYTE2(v11) + 274]))) ^ v10;
v13 = a2[7] ^ (a2[(unsigned __int8)v12 + 786]
+ (a2[BYTE1(v12) + 530] ^ (a2[((unsigned __int64)v12 >> 24) + 18] + a2[BYTE2(v12) + 274]))) ^ v11;
v14 = a2[6] ^ (a2[(unsigned __int8)v13 + 786]
+ (a2[BYTE1(v13) + 530] ^ (a2[((unsigned __int64)v13 >> 24) + 18] + a2[BYTE2(v13) + 274]))) ^ v12;
v15 = a2[5] ^ (a2[(unsigned __int8)v14 + 786]
+ (a2[BYTE1(v14) + 530] ^ (a2[((unsigned __int64)v14 >> 24) + 18] + a2[BYTE2(v14) + 274]))) ^ v13;
v16 = a2[4] ^ (a2[(unsigned __int8)v15 + 786]
+ (a2[BYTE1(v15) + 530] ^ (a2[((unsigned __int64)v15 >> 24) + 18] + a2[BYTE2(v15) + 274]))) ^ v14;
v17 = a2[3] ^ (a2[(unsigned __int8)v16 + 786]
+ (a2[BYTE1(v16) + 530] ^ (a2[((unsigned __int64)v16 >> 24) + 18] + a2[BYTE2(v16) + 274]))) ^ v15;
v18 = a2[2] ^ (a2[(unsigned __int8)v17 + 786]
+ (a2[BYTE1(v17) + 530] ^ (a2[((unsigned __int64)v17 >> 24) + 18] + a2[BYTE2(v17) + 274]))) ^ v16;
result = (unsigned int)(unsigned __int8)v18 + 768;
v20 = a2[1] ^ (a2[result + 18]
+ (a2[BYTE1(v18) + 530] ^ (a2[((unsigned __int64)v18 >> 24) + 18] + a2[BYTE2(v18) + 274])));
*a1 = *a2 ^ v18;
a1[1] = v20 ^ v17;
return result;
}
| openssl |
_QWORD *__fastcall FUNC(__int64 a1, __int64 a2)
{
_QWORD *result; // rax
unsigned int v4; // [rsp+30h] [rbp+8h] BYREF
*(_DWORD *)(a1 + 104) = 0;
result = *(_QWORD **)FUNC(a1, a2, &v4);
if ( result )
{
result = (_QWORD *)*result;
_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 92), 1u);
}
else
{
_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 96), 1u);
}
return result;
}
| openssl |
void *FUNC()
{
return &unk_1402222C0;
}
| openssl |
void *FUNC()
{
return &unk_140213920;
}
| openssl |
__int64 FUNC()
{
__int64 result; // rax
dword_1402823E0 = 1;
result = FUNC(&dword_1402823E4, 0i64);
dword_140284D04 = result;
return result;
}
| openssl |
void __fastcall FUNC(__int64 a1)
{
int v1; // eax
if ( a1 )
{
v1 = *(_DWORD *)(a1 + 20);
if ( (v1 & 2) == 0 )
{
if ( (v1 & 8) != 0 )
FUNC(*(_QWORD *)a1, 8i64 * *(int *)(a1 + 12), "crypto\\bn\\bn_lib.c", 192i64);
else
CRYPTO_free(*(void **)a1, "crypto\\bn\\bn_lib.c", 196i64);
}
if ( (*(_BYTE *)(a1 + 20) & 1) != 0 )
CRYPTO_free((void *)a1, "crypto\\bn\\bn_lib.c", 219i64);
}
}
| openssl |
__int64 __fastcall FUNC(
__int64 *a1,
unsigned __int64 a2,
unsigned __int64 a3,
__int64 a4,
void *Src,
unsigned __int64 a6,
void *a7,
unsigned int *a8,
int *a9,
__int64 a10)
{
__int64 v10; // rsi
unsigned __int64 v11; // r14
__int64 result; // rax
unsigned int *v13; // rdi
size_t v15; // r8
__int64 v16; // rax
__int64 v17; // rbp
__int64 v18; // r13
__int64 *v19; // r15
__int64 v20; // rbx
void *v21; // rax
BOOL v22; // ebx
__int64 i; // r11
bool v25; // zf
__int64 j; // rcx
char v27; // al
int v28; // eax
unsigned int v29; // esi
unsigned __int64 v30; // rdi
int v31; // ebx
__int64 k; // rax
void *v33; // rax
int v34; // eax
void *v35; // rax
void *v36; // rax
_DWORD *v37; // rax
__int64 v38; // [rsp+30h] [rbp-168h]
unsigned int v39; // [rsp+38h] [rbp-160h]
unsigned int v40; // [rsp+3Ch] [rbp-15Ch]
unsigned int *v41; // [rsp+40h] [rbp-158h]
__int64 v42; // [rsp+50h] [rbp-148h]
__int64 v43; // [rsp+58h] [rbp-140h]
__int64 v44; // [rsp+60h] [rbp-138h]
__int64 v45; // [rsp+68h] [rbp-130h]
__int64 v46; // [rsp+70h] [rbp-128h]
int v47; // [rsp+78h] [rbp-120h]
__int64 v48; // [rsp+80h] [rbp-118h]
unsigned __int64 v49; // [rsp+88h] [rbp-110h]
void *v50; // [rsp+90h] [rbp-108h]
__int64 v51; // [rsp+98h] [rbp-100h]
void *v53; // [rsp+B8h] [rbp-E0h]
char v54[32]; // [rsp+C0h] [rbp-D8h] BYREF
char v55[32]; // [rsp+E0h] [rbp-B8h] BYREF
char v56[32]; // [rsp+100h] [rbp-98h] BYREF
char v57[32]; // [rsp+120h] [rbp-78h] BYREF
v10 = a10;
v53 = a7;
v11 = a3 >> 3;
result = 0i64;
v13 = (unsigned int *)a4;
v41 = (unsigned int *)a4;
v50 = Src;
v39 = 0;
v40 = 0;
v38 = 0i64;
v47 = 2;
if ( (unsigned int)(a3 >> 3) == 20 || (_DWORD)v11 == 28 || (_DWORD)v11 == 32 )
{
if ( a4 )
{
LODWORD(v11) = FUNC(a4);
}
else if ( (_DWORD)v11 == 20 )
{
v13 = (unsigned int *)FUNC();
v41 = v13;
}
else
{
if ( (_DWORD)v11 == 28 )
v13 = (unsigned int *)FUNC();
else
v13 = (unsigned int *)FUNC();
v41 = v13;
}
if ( a2 < 0x200 )
a2 = 512i64;
v49 = (a2 + 63) & 0xFFFFFFFFFFFFFFC0ui64;
if ( Src )
{
v15 = a6;
if ( a6 < (int)v11 )
{
FUNC(10, 125, 110, (__int64)"crypto\\dsa\\dsa_gen.c", 85);
return 0i64;
}
if ( a6 > (int)v11 )
v15 = (int)v11;
memmove(v56, Src, v15);
}
v45 = FUNC();
if ( v45 )
{
v16 = FUNC();
v17 = v16;
v38 = v16;
if ( v16 )
{
FUNC(v16);
v18 = FUNC(v17);
v43 = FUNC(v17);
v19 = (__int64 *)FUNC(v17);
v42 = FUNC(v17);
v48 = FUNC(v17);
v51 = FUNC(v17);
v44 = FUNC(v17);
v20 = FUNC(v17);
v46 = v20;
if ( v20 )
{
v21 = FUNC();
if ( (unsigned int)FUNC(v20, v21, (unsigned int)(v49 - 1)) )
{
LABEL_24:
do
{
v22 = v50 == 0i64;
if ( !(unsigned int)FUNC(v10, 0i64, v40++) )
break;
if ( v50 )
{
v50 = 0i64;
}
else if ( (int)FUNC(v56, (unsigned int)v11) <= 0 )
{
break;
}
memmove(v55, v56, (int)v11);
memmove(v57, v56, (int)v11);
for ( i = (int)v11 - 1i64; i >= 0; --i )
{
v25 = v55[i]++ == -1;
if ( !v25 )
break;
}
if ( !(unsigned int)FUNC((__int64)v56, (int)v11, (__int64)v54, 0i64, v13, 0i64)
|| !(unsigned int)FUNC((__int64)v55, (int)v11, (__int64)v57, 0i64, v13, 0i64) )
{
break;
}
for ( j = 0i64; j < (int)v11; v54[j - 1] ^= v27 )
v27 = v57[j++];
v54[0] |= 0x80u;
v54[(int)v11 - 1] |= 1u;
if ( !FUNC(v54, v11, v42) )
break;
v28 = FUNC(v42, 64, v17, v22, v10);
if ( v28 > 0 )
{
if ( !(unsigned int)FUNC(v10, 2i64, 0i64) || !(unsigned int)FUNC(v10, 3i64, 0i64) )
break;
v29 = 0;
v30 = (v49 - 1) / 0xA0;
while ( !v29 || (unsigned int)FUNC(a10, 0i64, v29) )
{
FUNC((__int64)v19, 0i64);
v31 = 0;
if ( (v30 & 0x80000000) == 0i64 )
{
do
{
for ( k = (int)v11 - 1i64; k >= 0; --k )
{
v25 = v55[k]++ == -1;
if ( !v25 )
break;
}
if ( !(unsigned int)FUNC((__int64)v55, (int)v11, (__int64)v54, 0i64, v41, 0i64)
|| !FUNC(v54, v11, v18)
|| !(unsigned int)FUNC(v18, v18, (unsigned int)(v31 * 8 * v11))
|| !(unsigned int)FUNC(v19, v19, v18) )
{
goto LABEL_88;
}
}
while ( ++v31 <= (int)v30 );
}
if ( !(unsigned int)FUNC(v19, (int)v49 - 1)
|| !FUNC(v48, (__int64)v19)
|| !(unsigned int)FUNC(v48, v48, v46)
|| !(unsigned int)FUNC(v18, v42) )
{
goto LABEL_88;
}
if ( !(unsigned int)FUNC(0, v51, v48, v18, v38)
|| (v33 = FUNC(), !(unsigned int)FUNC(v18, v51, v33))
|| !(unsigned int)FUNC(v44, v48, v18) )
{
LABEL_87:
v17 = v38;
goto LABEL_89;
}
if ( (int)FUNC(v44, v46) >= 0 )
{
v34 = FUNC(v44, 64, v38, 1, a10);
if ( v34 > 0 )
{
if ( !(unsigned int)FUNC(a10, 2i64, 1i64) )
goto LABEL_88;
v35 = FUNC();
if ( !(unsigned int)FUNC(v46, v44, v35) )
goto LABEL_88;
v17 = v38;
if ( (unsigned int)FUNC(v18, 0, v46, v42, v38)
&& (unsigned int)FUNC(v46, 2i64)
&& (unsigned int)FUNC(v45, v44, v38)
&& (unsigned int)FUNC(v43, v46, v18, v44, v38, v45) )
{
while ( FUNC(v43) )
{
v36 = FUNC();
if ( (unsigned int)FUNC(v46, v46, v36) )
{
++v47;
if ( (unsigned int)FUNC(v43, v46, v18, v44, v38, v45) )
continue;
}
goto LABEL_89;
}
if ( (unsigned int)FUNC(a10, 3i64, 1i64) )
{
v39 = 1;
FUNC(a1[1]);
FUNC(a1[2]);
FUNC(a1[3]);
a1[1] = (__int64)FUNC(v44);
a1[2] = (__int64)FUNC(v42);
v37 = FUNC(v43);
v25 = a1[1] == 0;
a1[3] = (__int64)v37;
if ( !v25 && a1[2] && v37 )
{
if ( a8 )
*a8 = v29;
if ( a9 )
*a9 = v47;
if ( v53 )
memmove(v53, v56, (int)v11);
}
else
{
v39 = 0;
}
}
}
goto LABEL_89;
}
if ( v34 )
goto LABEL_87;
}
if ( (int)++v29 >= 4096 )
{
v13 = v41;
v10 = a10;
v17 = v38;
goto LABEL_24;
}
}
goto LABEL_88;
}
}
while ( !v28 );
}
}
}
}
else
{
LABEL_88:
v17 = v38;
}
LABEL_89:
FUNC(v17);
FUNC(v17);
FUNC(v45);
return v39;
}
return result;
}
| openssl |
__int64 __fastcall FUNC(__int64 a1)
{
unsigned int v1; // ebx
__int64 v2; // rdi
v1 = 0;
v2 = *(_QWORD *)(*(_QWORD *)a1 + 16i64);
if ( !dword_140282098 )
return 0i64;
do
{
if ( v1 == 0x7FFFFFFF )
break;
DES_ede3_cbc_encrypt(
v2,
v2,
*((_DWORD *)off_1402786C0 + (unsigned int)dword_140281214),
(unsigned int)&unk_140281310,
(__int64)&unk_140281290,
(__int64)&unk_1402818D0,
(__int64)&unk_140281A68,
1);
++v1;
}
while ( dword_140282098 );
return v1;
}
| openssl |
unsigned int *__fastcall FUNC(__int64 a1, __int64 a2, unsigned int *a3)
{
int v4; // ebp
unsigned int *v5; // rsi
int v7; // ebx
__int64 v8; // rax
_QWORD *v9; // rdi
__int64 v10; // rcx
char *v11; // rax
v4 = FUNC(a3);
v5 = (unsigned int *)FUNC(0i64, v4);
if ( v5 )
{
v7 = 0;
if ( v4 <= 0 )
{
return v5;
}
else
{
while ( 1 )
{
v8 = FUNC((__int64)a3, v7);
v9 = (_QWORD *)v8;
v10 = *(_QWORD *)(v8 + 16);
if ( !v10 )
v10 = *(_QWORD *)(v8 + 8);
v11 = FUNC(v10, 0);
if ( !v11 )
break;
OPENSSL_sk_push_0(v5, (__int64)v11);
if ( ++v7 >= v4 )
return v5;
}
FUNC(v5, FUNC);
FUNC(34, 103, 110, (__int64)"crypto\\x509v3\\v3_extku.c", 96);
ERR_add_error_data(6, "section:", *v9, ",name:", v9[1], ",value:", v9[2]);
return 0i64;
}
}
else
{
FUNC(34, 103, 65, (__int64)"crypto\\x509v3\\v3_extku.c", 82);
FUNC(0i64);
return 0i64;
}
}
| openssl |
unsigned __int8 *__cdecl mbspbrk(const unsigned __int8 *String, const unsigned __int8 *Control)
{
return mbspbrk_l(String, Control, 0i64);
}
| openssl |
__int64 __fastcall FUNC(__int64 a1, wpacket_st *a2)
{
if ( !*(_QWORD *)(*(_QWORD *)(a1 + 168) + 992i64) )
return 2i64;
if ( FUNC((__int64)a2, 0x10u, 2ui64)
&& (unsigned int)FUNC((__int64)a2, 2ui64)
&& (unsigned int)FUNC((__int64)a2, 2ui64)
&& FUNC(
a2,
*(const void **)(*(_QWORD *)(a1 + 168) + 992i64),
*(_QWORD *)(*(_QWORD *)(a1 + 168) + 1000i64),
1ui64)
&& (unsigned int)WPACKET_close(a2)
&& (unsigned int)WPACKET_close(a2) )
{
return 1i64;
}
FUNC((_DWORD *)a1, 0x50u, 451, 68, (__int64)"ssl\\statem\\extensions_srvr.c", 1572);
return 0i64;
}
| openssl |