filename
stringlengths
3
146
content
stringlengths
25
24.6k
from
stringclasses
1 value
EVP_MD_CTX_ctrl_0
_BOOL8 __fastcall EVP_MD_CTX_ctrl_0(__int64 a1) { int (*v1)(void); // r10 return *(_QWORD *)a1 && (v1 = *(int (**)(void))(*(_QWORD *)a1 + 64i64)) != 0i64 && v1() > 0; }
openssl
EVP_MD_CTX_new_0
evp_md_ctx_st *__fastcall EVP_MD_CTX_new_0() { int v0; // eax return (evp_md_ctx_st *)CRYPTO_zalloc((unsigned int)(v0 + 8), "crypto\\evp\\digest.c", (unsigned int)(v0 + 11)); }
openssl
EVP_PBE_cleanup_0_3
void EVP_PBE_cleanup_0_3() { sub_140091A50((void *)qword_140284E70, (void (__fastcall *)(_QWORD))sub_1400EDD90); qword_140284E70 = 0i64; }
openssl
EVP_PKEY_add1_attr_0
_BOOL8 __fastcall EVP_PKEY_add1_attr_0(evp_pkey_st *key, x509_attributes_st *attr, __int64 a3) { return sub_140116A90((char *)key + 56, attr, a3) != 0; }
openssl
EVP_PKEY_add1_attr_by_OBJ_1
_BOOL8 __fastcall EVP_PKEY_add1_attr_by_OBJ_1( evp_pkey_st *key, const asn1_object_st *obj, int type, const char *bytes, int len) { __int64 v5; // rax return X509at_add1_attr_by_NID_0((void ***)((char *)key + v5), (unsigned int)obj, type, bytes, len) != 0i64; }
openssl
EVP_PKEY_asn1_get0_0
__int64 __fastcall EVP_PKEY_asn1_get0_0(int a1) { if ( a1 < 0 ) return 0i64; if ( a1 >= 20 ) return sub_140091690(qword_140284D10, a1 - 20); return off_14027D800[a1]; }
openssl
EVP_PKEY_asn1_get0_info_0
__int64 __fastcall EVP_PKEY_asn1_get0_info_0( int *ppkey_id, int *ppkey_base_id, int *ppkey_flags, const char **pinfo, const char **ppem_str, const evp_pkey_asn1_method_st *ameth) { if ( !ameth ) return 0i64; if ( ppkey_id ) *ppkey_id = *(_DWORD *)ameth; if ( ppkey_base_id ) *ppkey_base_id = *((_DWORD *)ameth + 1); if ( ppkey_flags ) *ppkey_flags = *((_DWORD *)ameth + 2); if ( pinfo ) *pinfo = (const char *)*((_QWORD *)ameth + 3); if ( ppem_str ) *ppem_str = (const char *)*((_QWORD *)ameth + 2); return 1i64; }
openssl
EVP_PKEY_asn1_get_count_0
__int64 EVP_PKEY_asn1_get_count_0() { if ( qword_140284D10 ) return (unsigned int)sub_140091680((unsigned int *)qword_140284D10) + 20; else return 20i64; }
openssl
EVP_PKEY_base_id_0
__int64 __fastcall EVP_PKEY_base_id_0(const evp_pkey_st *pkey) { unsigned int *v1; // rax unsigned int v2; // ebx __int64 v4; // [rsp+30h] [rbp+8h] BYREF v1 = (unsigned int *)sub_1400C7500(&v4, *(unsigned int *)pkey); if ( v1 ) { v2 = *v1; sub_1400DCA90(v4); return v2; } else { sub_1400DCA90(v4); return 0i64; } }
openssl
EVP_PKEY_bits_0
__int64 __fastcall EVP_PKEY_bits_0(const evp_pkey_st *pkey) { __int64 v1; // rax __int64 (*v2)(void); // rdx if ( pkey && (v1 = *((_QWORD *)pkey + 2)) != 0 && (v2 = *(__int64 (**)(void))(v1 + 96)) != 0i64 ) return v2(); else return 0i64; }
openssl
EVP_PKEY_cmp_0
__int64 __fastcall EVP_PKEY_cmp_0(__int64 a1, _DWORD *a2) { __int64 result; // rax __int64 v5; // rax __int64 (*v6)(void); // r8 __int64 (__fastcall *v7)(__int64, _DWORD *); // r8 if ( *(_DWORD *)a1 != *a2 ) return 0xFFFFFFFFi64; v5 = *(_QWORD *)(a1 + 16); if ( !v5 ) return 4294967294i64; v6 = *(__int64 (**)(void))(v5 + 144); if ( !v6 || (result = v6(), (int)result > 0) ) { v7 = *(__int64 (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)(a1 + 16) + 48i64); if ( v7 ) return v7(a1, a2); return 4294967294i64; } return result; }
openssl
EVP_PKEY_cmp_parameters_0
__int64 __fastcall EVP_PKEY_cmp_parameters_0(__int64 a1, _DWORD *a2) { __int64 v3; // rax __int64 (*v4)(void); // r8 if ( *(_DWORD *)a1 != *a2 ) return 0xFFFFFFFFi64; v3 = *(_QWORD *)(a1 + 16); if ( v3 && (v4 = *(__int64 (**)(void))(v3 + 144)) != 0i64 ) return v4(); else return 4294967294i64; }
openssl
EVP_PKEY_copy_parameters_0
__int64 __fastcall EVP_PKEY_copy_parameters_0(__int64 a1, unsigned int *a2) { __int64 v4; // rax unsigned int (__fastcall *v5)(unsigned int *); // rdx int v6; // r8d __int64 v7; // rax unsigned int (__fastcall *v8)(__int64); // rdx __int64 v9; // rax __int64 (__fastcall *v10)(__int64, unsigned int *); // r8 __int64 result; // rax __int64 v12; // rax __int64 (__fastcall *v13)(__int64, unsigned int *); // r8 int v14; // [rsp+20h] [rbp-18h] if ( *(_DWORD *)a1 ) { if ( *(_DWORD *)a1 != *a2 ) { v14 = 81; v6 = 101; LABEL_20: sub_1400B4D50(6, 103, v6, (unsigned int)"crypto\\evp\\p_lib.c", v14); return 0i64; } } else if ( !(unsigned int)sub_1400A8C50(a1, *a2) ) { return 0i64; } v4 = *((_QWORD *)a2 + 2); if ( v4 ) { v5 = *(unsigned int (__fastcall **)(unsigned int *))(v4 + 128); if ( v5 ) { if ( v5(a2) ) { sub_1400B4D50(6, 103, 103, (unsigned int)"crypto\\evp\\p_lib.c", 86); return 0i64; } } } v7 = *(_QWORD *)(a1 + 16); if ( v7 ) { v8 = *(unsigned int (__fastcall **)(__int64))(v7 + 128); if ( v8 ) { if ( v8(a1) ) { v9 = *((_QWORD *)a2 + 2); if ( v9 ) { v10 = *(__int64 (__fastcall **)(__int64, unsigned int *))(v9 + 136); if ( v10 ) return v10(a1, a2); } return 0i64; } } } if ( *(_DWORD *)a1 != *a2 || (v12 = *(_QWORD *)(a1 + 16)) == 0 || (v13 = *(__int64 (__fastcall **)(__int64, unsigned int *))(v12 + 144)) == 0i64 || (result = v13(a1, a2), (_DWORD)result != 1) ) { v14 = 93; v6 = 153; goto LABEL_20; } return result; }
openssl
EVP_PKEY_CTX_get_keygen_info_0
__int64 __fastcall EVP_PKEY_CTX_get_keygen_info_0(evp_pkey_ctx_st *ctx, int idx) { if ( idx == -1 ) return *((unsigned int *)ctx + 18); if ( idx < 0 || idx > *((_DWORD *)ctx + 18) ) return 0i64; return *(unsigned int *)(*((_QWORD *)ctx + 8) + 4i64 * idx); }
openssl
EVP_PKEY_free_it
void __fastcall EVP_PKEY_free_it(evp_pkey_st *x) { __int64 v1; // rax void (*v3)(void); // rdx __int64 v4; // rcx v1 = *((_QWORD *)x + 2); if ( v1 ) { v3 = *(void (**)(void))(v1 + 168); if ( v3 ) { v3(); *((_QWORD *)x + 5) = 0i64; } } sub_1400DCA90(*((_QWORD *)x + 3)); v4 = *((_QWORD *)x + 4); *((_QWORD *)x + 3) = 0i64; sub_1400DCA90(v4); *((_QWORD *)x + 4) = 0i64; }
openssl
EVP_PKEY_get1_tls_encodedpoint_0
unsigned __int64 __fastcall EVP_PKEY_get1_tls_encodedpoint_0(evp_pkey_st *pkey, unsigned __int8 **ppt) { __int64 v2; // rax __int64 (__fastcall *v3)(evp_pkey_st *, __int64, _QWORD, unsigned __int8 **); // r10 unsigned __int64 result; // rax v2 = *((_QWORD *)pkey + 2); if ( v2 && (v3 = *(__int64 (__fastcall **)(evp_pkey_st *, __int64, _QWORD, unsigned __int8 **))(v2 + 176)) != 0i64 && (LODWORD(result) = v3(pkey, 10i64, 0i64, ppt), (int)result > 0) ) { return (int)result; } else { return 0i64; } }
openssl
EVP_PKEY_get_default_digest_nid_0
__int64 __fastcall EVP_PKEY_get_default_digest_nid_0(evp_pkey_st *pkey, int *pnid) { __int64 v2; // rax __int64 (__fastcall *v3)(evp_pkey_st *, __int64, _QWORD, int *); // r10 v2 = *((_QWORD *)pkey + 2); if ( v2 && (v3 = *(__int64 (__fastcall **)(evp_pkey_st *, __int64, _QWORD, int *))(v2 + 176)) != 0i64 ) return v3(pkey, 3i64, 0i64, pnid); else return 4294967294i64; }
openssl
EVP_PKEY_meth_get0_0
__int64 __fastcall EVP_PKEY_meth_get0_0(unsigned __int64 a1) { int v2; // ebx if ( a1 < 0x12 ) return off_14027D8A0[a1]; if ( qword_140284D18 ) { v2 = a1 - 18; if ( a1 - 18 < (int)sub_140091680((unsigned int *)qword_140284D18) ) return sub_140091690(qword_140284D18, v2); } return 0i64; }
openssl
EVP_PKEY_missing_parameters_0
__int64 __fastcall EVP_PKEY_missing_parameters_0(const evp_pkey_st *pkey) { __int64 v1; // rax __int64 (*v2)(void); // rdx v1 = *((_QWORD *)pkey + 2); if ( v1 && (v2 = *(__int64 (**)(void))(v1 + 128)) != 0i64 ) return v2(); else return 0i64; }
openssl
EVP_PKEY_new_mac_key
__int64 *__fastcall EVP_PKEY_new_mac_key(unsigned int a1, __int64 a2, __int64 a3, unsigned int a4) { __int64 v4; // rdi __int64 *result; // rax __int64 *v8; // rbx __int64 v9[3]; // [rsp+30h] [rbp-18h] BYREF v4 = 0i64; v9[0] = 0i64; result = sub_1400C87F0(a1, a2); v8 = result; if ( result ) { if ( (int)sub_1400C8B90(result) > 0 && (int)sub_1400C8360(v8, -1, 4, 6u, a4, a3) > 0 ) { sub_1400C8C10(v8, v9); v4 = v9[0]; } sub_1400C8300(v8); return (__int64 *)v4; } return result; }
openssl
EVP_PKEY_print_private
__int64 __fastcall EVP_PKEY_print_private(bio_st *a1, __int64 a2, int a3) { __int64 v3; // rax __int64 (*v6)(void); // rax const char *v8; // rax v3 = *(_QWORD *)(a2 + 16); if ( v3 ) { v6 = *(__int64 (**)(void))(v3 + 80); if ( v6 ) return v6(); } sub_140099B90((__int64)a1, a3, 128); v8 = (const char *)sub_14009DCE0(*(_DWORD *)a2); BIO_printf(a1, "%s algorithm \"%s\" unsupported\n", "Private Key", v8); return 1i64; }
openssl
EVP_PKEY_print_public
__int64 __fastcall EVP_PKEY_print_public(bio_st *a1, __int64 a2, int a3) { __int64 v3; // rax __int64 (*v6)(void); // rax const char *v8; // rax v3 = *(_QWORD *)(a2 + 16); if ( v3 ) { v6 = *(__int64 (**)(void))(v3 + 56); if ( v6 ) return v6(); } sub_140099B90((__int64)a1, a3, 128); v8 = (const char *)sub_14009DCE0(*(_DWORD *)a2); BIO_printf(a1, "%s algorithm \"%s\" unsupported\n", "Public Key", v8); return 1i64; }
openssl
EVP_PKEY_security_bits_0
__int64 __fastcall EVP_PKEY_security_bits_0(const evp_pkey_st *pkey) { __int64 v2; // rax __int64 (*v3)(void); // rdx if ( !pkey ) return 0i64; v2 = *((_QWORD *)pkey + 2); if ( v2 && (v3 = *(__int64 (**)(void))(v2 + 104)) != 0i64 ) return v3(); else return 4294967294i64; }
openssl
EVP_PKEY_set1_DSA_0
_BOOL8 __fastcall EVP_PKEY_set1_DSA_0(__int64 a1, __int64 a2) { int v2; // eax BOOL v5; // ebx if ( a1 && (unsigned int)sub_1400A8C50(a1, v2 + 84) ) { *(_QWORD *)(a1 + 40) = a2; v5 = a2 != 0; if ( a2 ) { sub_1400CD490(a2); return a2 != 0; } } else { return 0; } return v5; }
openssl
EVP_PKEY_set1_EC_KEY_0
_BOOL8 __fastcall EVP_PKEY_set1_EC_KEY_0(__int64 a1, __int64 a2) { BOOL v4; // ebx if ( a1 && (unsigned int)sub_1400A8C50(a1, 0x198u) ) { *(_QWORD *)(a1 + 40) = a2; v4 = a2 != 0; if ( a2 ) { sub_1400D34E0(a2); return a2 != 0; } } else { return 0; } return v4; }
openssl
EVP_PKEY_set1_RSA_0
_BOOL8 __fastcall EVP_PKEY_set1_RSA_0(__int64 a1, __int64 a2) { int v2; // eax BOOL v5; // ebx if ( a1 && (unsigned int)sub_1400A8C50(a1, v2 - 26) ) { *(_QWORD *)(a1 + 40) = a2; v5 = a2 != 0; if ( a2 ) { sub_1400DE200(a2); return a2 != 0; } } else { return 0; } return v5; }
openssl
EVP_PKEY_set1_tls_encodedpoint_0
_BOOL8 __fastcall EVP_PKEY_set1_tls_encodedpoint_0( evp_pkey_st *pkey, const unsigned __int8 *pt, unsigned __int64 ptlen) { __int64 v3; // rax int (__fastcall *v4)(evp_pkey_st *, __int64, unsigned __int64, const unsigned __int8 *); // r10 _BOOL8 result; // rax result = 0; if ( ptlen <= 0x7FFFFFFF ) { v3 = *((_QWORD *)pkey + 2); if ( v3 ) { v4 = *(int (__fastcall **)(evp_pkey_st *, __int64, unsigned __int64, const unsigned __int8 *))(v3 + 176); if ( v4 ) { if ( v4(pkey, 9i64, ptlen, pt) > 0 ) return 1; } } } return result; }
openssl
evp_pkey_set_cb_translate
void __fastcall evp_pkey_set_cb_translate(bn_gencb_st *cb, evp_pkey_ctx_st *ctx) { sub_14004EB20(cb, sub_140046EA0, ctx); }
openssl
evp_pkey_set_cb_translate_0
void __fastcall evp_pkey_set_cb_translate_0(bn_gencb_st *cb, evp_pkey_ctx_st *ctx) { sub_1400AAF00((__int64)cb, (__int64)sub_1400C8D00, (__int64)ctx); }
openssl
EVP_PKEY_set_type_str
__int64 __fastcall EVP_PKEY_set_type_str(evp_pkey_st *pkey, const char *str, unsigned int len) { return sub_1400A8B50((__int64)pkey, 0i64, 0, (__int64)str, len); }
openssl
EVP_PKEY_size_0
__int64 __fastcall EVP_PKEY_size_0(const evp_pkey_st *pkey) { __int64 v1; // rax __int64 (*v2)(void); // rdx if ( pkey && (v1 = *((_QWORD *)pkey + 2)) != 0 && (v2 = *(__int64 (**)(void))(v1 + 88)) != 0i64 ) return v2(); else return 0i64; }
openssl
EVP_PKEY_type_0
__int64 __fastcall EVP_PKEY_type_0(unsigned int type) { unsigned int *v1; // rax unsigned int v2; // ebx __int64 v4; // [rsp+38h] [rbp+10h] BYREF v1 = (unsigned int *)sub_1400C7500(&v4, type); if ( v1 ) { v2 = *v1; sub_1400DCA90(v4); return v2; } else { sub_1400DCA90(v4); return 0i64; } }
openssl
EVP_read_pw_string
__int64 __fastcall EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) { return sub_1400D95F0((__int64)buf, 0, len, (__int64)prompt, verify); }
openssl
exit
void __cdecl __noreturn exit(int Code) { doexit(Code, 0, 0); }
openssl
fclose
int __cdecl fclose(FILE *Stream) { int v2; // edi v2 = -1; if ( Stream ) { if ( (Stream->_flag & 0x40) != 0 ) { Stream->_flag = 0; } else { lock_file(Stream); v2 = fclose_nolock(Stream); unlock_file(Stream); } return v2; } else { *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return -1; } }
openssl
feof
int __cdecl feof(FILE *Stream) { if ( Stream ) return Stream->_flag & 0x10; *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return 0; }
openssl
ferror
int __cdecl ferror(FILE *Stream) { if ( Stream ) return Stream->_flag & 0x20; *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return 0; }
openssl
fflush
int __cdecl fflush(FILE *Stream) { int v3; // edi if ( !Stream ) return flsall(0); lock_file(Stream); v3 = fflush_nolock(Stream); unlock_file(Stream); return v3; }
openssl
fgets
char *__cdecl fgets(char *Buffer, int MaxCount, FILE *Stream) { int v4; // edi char *v6; // r12 char *v7; // rsi int v9; // eax _BYTE *v10; // rdx char *v11; // rcx int v13; // ecx v4 = MaxCount; v6 = Buffer; v7 = Buffer; if ( (Buffer || !MaxCount) && MaxCount >= 0 && Stream ) { if ( MaxCount ) { lock_file(Stream); if ( (Stream->_flag & 0x40) == 0 ) { v9 = fileno(Stream); if ( v9 == -1 || v9 == -2 ) { v11 = (char *)&unk_14027FAE0; v10 = &unk_14027FAE0; } else { v10 = (_BYTE *)(qword_140286BA0[(__int64)v9 >> 5] + 88i64 * (v9 & 0x1F)); v11 = (char *)&unk_14027FAE0; } if ( (v10[56] & 0x7F) != 0 ) goto LABEL_19; if ( v9 != -1 && v9 != -2 ) v11 = (char *)(qword_140286BA0[(__int64)v9 >> 5] + 88i64 * (v9 & 0x1F)); if ( v11[56] < 0 ) { LABEL_19: *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); v7 = 0i64; } } if ( v7 ) { do { if ( !--v4 ) break; if ( --Stream->_cnt < 0 ) v13 = filbuf(Stream); else v13 = *(unsigned __int8 *)Stream->_ptr++; if ( v13 == -1 ) { if ( v6 == Buffer ) { v7 = 0i64; goto $done$30479; } break; } *v6++ = v13; } while ( (_BYTE)v13 != 10 ); *v6 = 0; } $done$30479: unlock_file(Stream); return v7; } else { return 0i64; } } else { *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return 0i64; } }
openssl
file_eof
__int64 __fastcall file_eof(ossl_store_loader_ctx_st *ctx) { __int64 result; // rax __int64 v3; // rax if ( *(_DWORD *)ctx == 2 ) return *((unsigned int *)ctx + 6); v3 = *((_QWORD *)ctx + 3); if ( !v3 ) return sub_140099C00(*((_QWORD **)ctx + 2), 2u, 0, 0i64); result = (*(__int64 (__fastcall **)(_QWORD))(v3 + 16))(*((_QWORD *)ctx + 4)); if ( (_DWORD)result ) return sub_140099C00(*((_QWORD **)ctx + 2), 2u, 0, 0i64); return result; }
openssl
file_free
__int64 __fastcall file_free(bio_st *a) { FILE *v3; // rcx if ( !a ) return 0i64; if ( *((_DWORD *)a + 9) ) { if ( *((_DWORD *)a + 8) ) { v3 = (FILE *)*((_QWORD *)a + 7); if ( v3 ) { fclose(v3); *((_QWORD *)a + 7) = 0i64; *((_DWORD *)a + 10) = 0; } } *((_DWORD *)a + 8) = 0; } return 1i64; }
openssl
find
CHAR *__fastcall find(LPCSTR lpFileName) { struct _WIN32_FIND_DATAA *v2; // rax if ( lpFileName ) { v2 = lpFindFileData; if ( lpFindFileData || (v2 = (struct _WIN32_FIND_DATAA *)malloc_crt(0x244ui64), (lpFindFileData = v2) != 0i64) ) { if ( hFindFile ) { FindClose(hFindFile); hFindFile = 0i64; v2 = lpFindFileData; } hFindFile = FindFirstFileA(lpFileName, v2); if ( hFindFile != (HANDLE)-1i64 ) return lpFindFileData->cFileName; } return 0i64; } if ( !FindNextFileA(hFindFile, lpFindFileData) ) { FindClose(hFindFile); hFindFile = 0i64; return 0i64; } return lpFindFileData->cFileName; }
openssl
flsall
__int64 __fastcall flsall(int a1) { unsigned int v2; // r12d unsigned int v3; // esi int i; // edi __int64 v5; // rdx __int64 v6; // rcx v2 = 0; v3 = 0; lock(1i64); for ( i = 0; i < dword_140287DE0; ++i ) { if ( *((_QWORD *)qword_140286DD8 + i) ) { v5 = *((_QWORD *)qword_140286DD8 + i); if ( (*(_BYTE *)(v5 + 24) & 0x83) != 0 ) { lock_file2(i, v5); v6 = *((_QWORD *)qword_140286DD8 + i); if ( (*(_BYTE *)(v6 + 24) & 0x83) != 0 ) { if ( a1 == 1 ) { if ( fflush_nolock((FILE *)v6) != -1 ) ++v2; } else if ( !a1 && (*(_BYTE *)(v6 + 24) & 2) != 0 && fflush_nolock((FILE *)v6) == -1 ) { v3 = -1; } } unlock_file2(i, *((_QWORD *)qword_140286DD8 + i)); } } } unlock(1i64); if ( a1 == 1 ) return v2; return v3; }
openssl
fopen
FILE *__cdecl fopen(const char *FileName, const char *Mode) { return fsopen(FileName, Mode, 64); }
openssl
fprintf
int fprintf(FILE *const Stream, const char *const Format, ...) { int v3; // esi int v5; // eax _BYTE *v6; // rdx char *v7; // rcx unsigned int v8; // ebx v3 = 0; if ( Stream && Format ) { lock_file(Stream); if ( (Stream->_flag & 0x40) == 0 ) { v5 = fileno(Stream); if ( v5 == -1 || v5 == -2 ) { v7 = (char *)&unk_14027FAE0; v6 = &unk_14027FAE0; } else { v6 = (_BYTE *)(qword_140286BA0[(__int64)v5 >> 5] + 88i64 * (v5 & 0x1F)); v7 = (char *)&unk_14027FAE0; } if ( (v6[56] & 0x7F) != 0 ) goto LABEL_14; if ( v5 != -1 && v5 != -2 ) v7 = (char *)(qword_140286BA0[(__int64)v5 >> 5] + 88i64 * (v5 & 0x1F)); if ( v7[56] < 0 ) { LABEL_14: *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); v3 = -1; } } if ( !v3 ) { v8 = stbuf(Stream); v3 = output_l(Stream); ftbuf(v8, Stream); } unlock_file(Stream); return v3; } else { *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return -1; } }
openssl
fputs
int __cdecl fputs(const char *Buffer, FILE *Stream) { int v5; // eax _BYTE *v6; // rdx char *v7; // rcx size_t v8; // r12 unsigned int v9; // ebx size_t v10; // rsi if ( !Buffer || !Stream ) goto LABEL_2; if ( (Stream->_flag & 0x40) != 0 ) goto LABEL_15; v5 = fileno(Stream); if ( v5 == -1 || v5 == -2 ) { v7 = (char *)&unk_14027FAE0; v6 = &unk_14027FAE0; } else { v6 = (_BYTE *)(qword_140286BA0[(__int64)v5 >> 5] + 88i64 * (v5 & 0x1F)); v7 = (char *)&unk_14027FAE0; } if ( (v6[56] & 0x7F) != 0 ) goto LABEL_2; if ( v5 != -1 && v5 != -2 ) v7 = (char *)(qword_140286BA0[(__int64)v5 >> 5] + 88i64 * (v5 & 0x1F)); if ( v7[56] >= 0 ) { LABEL_15: v8 = strlen(Buffer); lock_file(Stream); v9 = stbuf(Stream); v10 = fwrite_nolock(Buffer, 1ui64, v8, Stream); ftbuf(v9, Stream); unlock_file(Stream); return -(v8 != v10); } else { LABEL_2: *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return -1; } }
openssl
fread
size_t __cdecl fread(void *Buffer, size_t ElementSize, size_t ElementCount, FILE *Stream) { return fread_s(Buffer, 0xFFFFFFFFFFFFFFFFui64, ElementSize, ElementCount, Stream); }
openssl
fread_s
size_t __cdecl fread_s(void *Buffer, size_t BufferSize, size_t ElementSize, size_t ElementCount, FILE *Stream) { size_t v10; // rdi if ( !ElementSize || !ElementCount ) return 0i64; if ( Stream ) { lock_file(Stream); v10 = fread_nolock_s(Buffer, BufferSize, ElementSize, ElementCount, Stream); unlock_file(Stream); return v10; } else { if ( BufferSize != -1i64 ) memset(Buffer, 0, BufferSize); *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return 0i64; } }
openssl
free
void __cdecl free(void *Block) { int *v1; // rbx int LastError; // eax if ( Block ) { if ( !HeapFree(hHeap, 0, Block) ) { v1 = errno(); LastError = GetLastError(); *v1 = get_errno_from_oserr(LastError); } } }
openssl
fseek
int __cdecl fseek(FILE *Stream, int Offset, int Origin) { int v7; // ebx if ( Stream && (unsigned int)Origin < 3 ) { lock_file(Stream); v7 = fseek_nolock(Stream, Offset, Origin); unlock_file(Stream); return v7; } else { *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return -1; } }
openssl
ftell
int __cdecl ftell(FILE *Stream) { int v3; // edi if ( Stream ) { lock_file(Stream); v3 = ftell_nolock(Stream); unlock_file(Stream); return v3; } else { *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return -1; } }
openssl
Func
__int64 __fastcall Func() { sub_14011F350(); return 0i64; }
openssl
fwrite
size_t __cdecl fwrite(const void *Buffer, size_t ElementSize, size_t ElementCount, FILE *Stream) { size_t v9; // rdi if ( !ElementSize || !ElementCount ) return 0i64; if ( Stream ) { lock_file(Stream); v9 = fwrite_nolock(Buffer, ElementSize, ElementCount, Stream); unlock_file(Stream); return v9; } else { *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return 0i64; } }
openssl
GENERAL_NAME_cmp
int __fastcall GENERAL_NAME_cmp(__int64 a1, __int64 a2) { int v2; // r8d int result; // eax v2 = -1; if ( !a1 || !a2 || *(_DWORD *)a1 != *(_DWORD *)a2 ) return v2; switch ( *(_DWORD *)a1 ) { case 0: result = OTHERNAME_cmp_0(*(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8)); break; case 1: case 2: case 6: result = ASN1_STRING_cmp(*(const void ***)(a1 + 8), *(_QWORD *)(a2 + 8)); break; case 3: case 5: result = ASN1_TYPE_cmp_0(*(_DWORD **)(a1 + 8), *(_DWORD **)(a2 + 8)); break; case 4: result = X509_NAME_cmp_0(*(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8)); break; case 7: result = sub_1401352F0(*(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8)); break; case 8: return sub_14012C910(*(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8)); default: return v2; } return result; }
openssl
GENERAL_NAME_dup_0
__int64 __fastcall GENERAL_NAME_dup_0(__int64 a1) { return sub_140136710(sub_1400B9490, sub_1400B9470, a1); }
openssl
GENERAL_NAME_get0_value_0
void *__fastcall GENERAL_NAME_get0_value_0(const GENERAL_NAME_st *a, int *ptype) { void *result; // rax if ( ptype ) *ptype = *(_DWORD *)a; switch ( *(_DWORD *)a ) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: result = (void *)*((_QWORD *)a + 1); break; default: result = 0i64; break; } return result; }
openssl
generate_stateless_cookie_callback
__int64 __fastcall generate_stateless_cookie_callback( ssl_st *ssl, unsigned __int8 *cookie, unsigned __int64 *cookie_len) { __int64 result; // rax unsigned int v5; // [rsp+40h] [rbp+18h] BYREF result = sub_140046B00((__int64)ssl, (__int64)cookie, (__int64)&v5); *cookie_len = v5; return result; }
openssl
getenv
char *__cdecl getenv(const char *VarName) { char *v3; // rbx if ( VarName && strnlen(VarName, 0x7FFFui64) < 0x7FFF ) { lock(7i64); v3 = (char *)getenv_helper_nolock(VarName); unlock(7i64); return v3; } else { *errno() = 22; invalid_parameter(0i64, 0i64, 0i64, 0, 0i64); return 0i64; } }
openssl
get_ca_names
const stack_st_X509_NAME *__fastcall get_ca_names(ssl_st *s) { __int64 v2; // rax __int64 v3; // rdi if ( *((_DWORD *)s + 14) && (v2 = sub_140058FC0((__int64)s), (v3 = v2) != 0) && (unsigned int)sub_140091680(v2) ) return (const stack_st_X509_NAME *)v3; else return (const stack_st_X509_NAME *)sub_140058F40((__int64)s); }
openssl
get_rfc3526_prime_3072
__int64 __fastcall get_rfc3526_prime_3072(__int64 a1) { return sub_1400AB7F0(byte_140224B80, 384, a1); }
openssl
get_rfc3526_prime_8192
__int64 __fastcall get_rfc3526_prime_8192(__int64 a1) { return sub_1400AB7F0(byte_140225200, 1024, a1); }
openssl
get_sigtype
const char *__fastcall get_sigtype(int nid) { int v2; // ecx int v3; // ecx int v4; // ecx if ( nid <= 912 ) { switch ( nid ) { case 912: return "RSA-PSS"; case 6: return "RSA"; case 116: return "DSA"; case 408: return "ECDSA"; case 811: return "gost2001"; } return 0i64; } v2 = nid - 979; if ( !v2 ) return "gost2012_256"; v3 = v2 - 1; if ( !v3 ) return "gost2012_512"; v4 = v3 - 107; if ( !v4 ) return "Ed25519"; if ( v4 != 1 ) return 0i64; return "Ed448"; }
openssl
HMAC_size_0
__int64 __fastcall HMAC_size_0(__int64 *a1) { __int64 result; // rax LODWORD(result) = sub_1400B3210(*a1); if ( (int)result < 0 ) LODWORD(result) = 0; return (int)result; }
openssl
HMAC_Update_0
__int64 __fastcall HMAC_Update_0(_QWORD *a1, __int64 a2, __int64 a3) { if ( *a1 ) return sub_1400C7BD0(a1[1], a2, a3); else return 0i64; }
openssl
i2d_CMS_bio_stream
__int64 __fastcall i2d_CMS_bio_stream(int a1, int a2, int a3, int a4) { __int64 v8; // rax v8 = sub_140132050(); return sub_14013D4F0(a1, a2, a3, a4, v8); }
openssl
i2d_CMS_bio_stream_0
__int64 __fastcall i2d_CMS_bio_stream_0(int a1, int a2, int a3, int a4) { void *v8; // rax v8 = sub_1400C6A40(); return sub_14013D4F0(a1, a2, a3, a4, (__int64)v8); }
openssl
i2d_CMS_ContentInfo
__int64 __fastcall i2d_CMS_ContentInfo(__int64 a1, __int64 a2) { __int64 v4; // rax v4 = sub_1400A7EB0(); return sub_1400E63D0(a1, a2, v4); }
openssl
i2d_CMS_ContentInfo_0
__int64 __fastcall i2d_CMS_ContentInfo_0(__int64 a1, __int64 a2) { __int64 v4; // rax v4 = sub_1400B2450(); return sub_1400E63D0(a1, a2, v4); }
openssl
i2d_CMS_ContentInfo_1
__int64 __fastcall i2d_CMS_ContentInfo_1(__int64 a1, __int64 a2) { __int64 v4; // rax v4 = sub_140132050(); return sub_14013E050(a1, a2, v4); }
openssl
i2d_CMS_ContentInfo_2
__int64 __fastcall i2d_CMS_ContentInfo_2(__int64 a1, __int64 a2) { void *v4; // rax v4 = sub_1400C6A40(); return sub_14013E050(a1, a2, v4); }
openssl
i2d_re_X509_tbs_0
__int64 __fastcall i2d_re_X509_tbs_0(__int64 a1, __int64 a2) { *(_DWORD *)(a1 + 124) = 1; return sub_140126D00(a1, a2, &unk_140208A70); }
openssl
i2d_x509_aux_internal
__int64 __fastcall i2d_x509_aux_internal(x509_st *a, unsigned __int8 **pp) { unsigned __int8 *v4; // rdi __int64 result; // rax int v6; // esi if ( pp ) v4 = *pp; else v4 = 0i64; result = sub_140126D00(a, pp, &unk_140208B00); v6 = result; if ( (int)result > 0 && a ) { result = sub_1400ECB30(*((_QWORD *)a + 39), pp); if ( (int)result >= 0 ) { return (unsigned int)(v6 + result); } else if ( v4 ) { *pp = v4; } } return result; }
openssl
i2s_poison
char *__fastcall i2s_poison(const v3_ext_method *method, void *val) { int v2; // eax return sub_1400A7380("NULL", "crypto\\ct\\ct_x509v3.c", (unsigned int)(v2 - 22)); }
openssl
i2v_ASN1_BIT_STRING_0
unsigned int *__fastcall i2v_ASN1_BIT_STRING_0(__int64 a1, __int64 a2, unsigned int *a3) { __int64 v3; // rbx unsigned int *v6; // [rsp+40h] [rbp+18h] BYREF v6 = a3; v3 = *(_QWORD *)(a1 + 96); if ( !*(_QWORD *)(v3 + 8) ) return a3; do { if ( ASN1_BIT_STRING_get_bit(a2, *(_DWORD *)v3) ) sub_1400E0140(*(char **)(v3 + 8), 0i64, &v6); v3 += 24i64; } while ( *(_QWORD *)(v3 + 8) ); return v6; }
openssl
init_3_0
__int64 __fastcall init_3_0(evp_md_ctx_st *ctx) { __int64 v1; // rbx __int64 result; // rax v1 = sub_1400D3A10((__int64)ctx); result = MD4_Init(v1); if ( (_DWORD)result ) return sha1_ctx_init((_DWORD *)(v1 + 92)); return result; }
openssl
int_engine_init
__int64 __fastcall int_engine_init(engine_st *e) { unsigned int *v2; // rax if ( (unsigned int)sub_1400DC9B0((__int64)e) ) { v2 = (unsigned int *)qword_140285508; if ( qword_140285508 || (v2 = (unsigned int *)sub_140091AF0(), (qword_140285508 = (__int64)v2) != 0) ) { if ( (unsigned int)OPENSSL_sk_push_0(v2, (__int64)e) ) return 1i64; } sub_1400DCA90((__int64)e); } return 0i64; }
openssl
int_engine_module_finish
void __fastcall int_engine_module_finish(conf_imodule_st *md) { __int64 i; // rax for ( i = OPENSSL_sk_pop_0((_DWORD *)qword_140285508); i; i = OPENSSL_sk_pop_0((_DWORD *)qword_140285508) ) sub_1400DCA90(i); sub_140091630((void **)qword_140285508); qword_140285508 = 0i64; }
openssl
int_free_str
void __fastcall int_free_str(char *s) { int v1; // eax CRYPTO_free(s, "crypto\\engine\\eng_dyn.c", (unsigned int)(v1 + 82)); }
openssl
int_update_1
__int64 __fastcall int_update_1(evp_md_ctx_st *ctx, const void *data, unsigned __int64 count) { __int64 v5; // rax __int64 v6; // rax v5 = sub_1400D3A90((__int64)ctx); v6 = sub_14011D270(v5); sub_140181E30(v6 + 24, data, count); return 1i64; }
openssl
int_update_1_0
__int64 __fastcall int_update_1_0(evp_md_ctx_st *ctx, const void *data, unsigned __int64 count) { __int64 v5; // rax __int64 v6; // rax v5 = sub_1400D3A90((__int64)ctx); v6 = sub_14011D270(v5); sub_14016DF10(v6 + 24, data, count); return 1i64; }
openssl
isdigit
int __cdecl isdigit(int C) { __int64 v1; // rbx int v3; // r11d __crt_locale_pointers Locale; // [rsp+20h] [rbp-28h] BYREF __int64 v5; // [rsp+30h] [rbp-18h] char v6; // [rsp+38h] [rbp-10h] v1 = C; if ( !dword_1402856E8 ) return off_14027FA90[C] & 4; _LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&Locale, 0i64); if ( *((int *)Locale.locinfo + 67) <= 1 ) v3 = *(_WORD *)(*((_QWORD *)Locale.locinfo + 40) + 2 * v1) & 4; else v3 = isctype_l(v1, 4, &Locale); if ( v6 ) *(_DWORD *)(v5 + 200) &= ~2u; return v3; }
openssl
isleadbyte
int __cdecl isleadbyte(int C) { unsigned __int8 v1; // bl int result; // eax __int64 v3; // [rsp+20h] [rbp-28h] BYREF __int64 v4; // [rsp+30h] [rbp-18h] char v5; // [rsp+38h] [rbp-10h] v1 = C; _LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&v3, 0i64); result = *(_WORD *)(*(_QWORD *)(v3 + 320) + 2i64 * v1) & 0x8000; if ( v5 ) *(_DWORD *)(v4 + 200) &= ~2u; return result; }
openssl
islower
int __cdecl islower(int C) { __int64 v1; // rbx int v3; // r11d __crt_locale_pointers Locale; // [rsp+20h] [rbp-28h] BYREF __int64 v5; // [rsp+30h] [rbp-18h] char v6; // [rsp+38h] [rbp-10h] v1 = C; if ( !dword_1402856E8 ) return off_14027FA90[C] & 2; _LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&Locale, 0i64); if ( *((int *)Locale.locinfo + 67) <= 1 ) v3 = *(_WORD *)(*((_QWORD *)Locale.locinfo + 40) + 2 * v1) & 2; else v3 = isctype_l(v1, 2, &Locale); if ( v6 ) *(_DWORD *)(v5 + 200) &= ~2u; return v3; }
openssl
isprint
int __cdecl isprint(int C) { __int64 v1; // rbx int v3; // r11d __crt_locale_pointers Locale; // [rsp+20h] [rbp-28h] BYREF __int64 v5; // [rsp+30h] [rbp-18h] char v6; // [rsp+38h] [rbp-10h] v1 = C; if ( !dword_1402856E8 ) return off_14027FA90[C] & 0x157; _LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&Locale, 0i64); if ( *((int *)Locale.locinfo + 67) <= 1 ) v3 = *(_WORD *)(*((_QWORD *)Locale.locinfo + 40) + 2 * v1) & 0x157; else v3 = isctype_l(v1, 343, &Locale); if ( v6 ) *(_DWORD *)(v5 + 200) &= ~2u; return v3; }
openssl
isspace
int __cdecl isspace(int C) { __int64 v1; // rbx int v3; // r11d __crt_locale_pointers Locale; // [rsp+20h] [rbp-28h] BYREF __int64 v5; // [rsp+30h] [rbp-18h] char v6; // [rsp+38h] [rbp-10h] v1 = C; if ( !dword_1402856E8 ) return off_14027FA90[C] & 8; _LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&Locale, 0i64); if ( *((int *)Locale.locinfo + 67) <= 1 ) v3 = *(_WORD *)(*((_QWORD *)Locale.locinfo + 40) + 2 * v1) & 8; else v3 = isctype_l(v1, 8, &Locale); if ( v6 ) *(_DWORD *)(v5 + 200) &= ~2u; return v3; }
openssl
isxdigit
int __cdecl isxdigit(int C) { __int64 v1; // rbx int v3; // r11d __crt_locale_pointers Locale; // [rsp+20h] [rbp-28h] BYREF __int64 v5; // [rsp+30h] [rbp-18h] char v6; // [rsp+38h] [rbp-10h] v1 = C; if ( !dword_1402856E8 ) return off_14027FA90[C] & 0x80; _LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&Locale, 0i64); if ( *((int *)Locale.locinfo + 67) <= 1 ) v3 = *(_WORD *)(*((_QWORD *)Locale.locinfo + 40) + 2 * v1) & 0x80; else v3 = isctype_l(v1, 128, &Locale); if ( v6 ) *(_DWORD *)(v5 + 200) &= ~2u; return v3; }
openssl
j_clearerr_s
// attributes: thunk errno_t __cdecl j_clearerr_s(FILE *Stream) { return clearerr_s(Stream); }
openssl
j_rename_0
// attributes: thunk int __cdecl j_rename_0(const char *OldFilename, const char *NewFilename) { return rename_0(OldFilename, NewFilename); }
openssl
j_unknown_libname_4
// attributes: thunk __int64 (__fastcall *__fastcall j_unknown_libname_4())() { return unknown_libname_4(); }
openssl
j___setargv
// attributes: thunk __int64 j___setargv() { return _setargv(); }
openssl
long_print
__int64 __fastcall long_print(bio_st *out, struct ASN1_VALUE_st **pval, const ASN1_ITEM_st *it, int indent) { return BIO_printf(out, "%ld\n", *(unsigned int *)pval); }
openssl
main
int __cdecl main(int argc, const char **argv, const char **envp) { __int64 v3; // rbp __int64 v4; // r14 __int64 v5; // r12 char *v6; // rax const char *v8; // rdi __int64 v9; // rax int v10; // ebp unsigned int v11; // edx char *v12; // rdi int v13; // esi int v14; // ebx FILE *v15; // rax const char *v16; // rcx FILE *v17; // rax FILE *v18; // rax unsigned int v19; // ecx char *i; // rax int v21; // ecx int v22; // ecx int v23; // eax unsigned int v24; // [rsp+20h] [rbp-478h] BYREF const char **v25; // [rsp+28h] [rbp-470h] BYREF int v26[2]; // [rsp+30h] [rbp-468h] BYREF const char **v27; // [rsp+38h] [rbp-460h] char v28[8]; // [rsp+40h] [rbp-458h] BYREF const char *v29; // [rsp+48h] [rbp-450h] char Buffer[1024]; // [rsp+60h] [rbp-438h] BYREF __int64 v31; // [rsp+470h] [rbp-28h] __int64 v32; // [rsp+478h] [rbp-20h] v5 = 0i64; v24 = argc; v25 = argv; v27 = 0i64; v26[0] = 0; qword_1402808D0 = (__int64)sub_140014670(); qword_1402808D8 = sub_140042350(32769i64); qword_1402808E0 = sub_140042390(32769i64); qword_1402808E8 = (struct Concurrency::details::VirtualProcessorRoot *)sub_140042440(32769i64); sub_140045530(&v24, &v25); v6 = getenv("OPENSSL_DEBUG_MEMORY"); if ( v6 && !strcmp(v6, "on") ) sub_14009B260(1i64); sub_14011D030(1i64); if ( !getenv("OPENSSL_FIPS") ) { v32 = v3; v31 = v4; if ( (unsigned int)sub_1400540B0(30272i64, 0i64) ) { sub_140040120(); v5 = sub_140014FF0(); v8 = (const char *)sub_14003E7F0(*v25); v29 = v8; v9 = sub_1400E8A00(v5, v28); if ( v9 ) { *v25 = v8; v10 = (*(__int64 (__fastcall **)(_QWORD, const char **))(v9 + 16))(v24, v25); } else { v11 = v24; if ( v24 == 1 ) { while ( 1 ) { v10 = 0; v12 = Buffer; v13 = 1024; v14 = 1; do { *v12 = 0; v15 = (FILE *)sub_1401A2D78(); v16 = "> "; if ( v14 ) v16 = "OpenSSL> "; fputs(v16, v15 + 1); v17 = (FILE *)sub_1401A2D78(); fflush(v17 + 1); v18 = (FILE *)sub_1401A2D78(); if ( !fgets(v12, v13, v18) || !*v12 ) goto LABEL_30; v19 = 0; for ( i = v12; *i; ++v19 ) { if ( v19 >= 0x80000000 ) break; ++i; } v21 = v19 & 0x7FFFFFFF; if ( v21 <= 1 ) break; if ( v12[v21 - 2] != 92 ) break; v22 = v21 - 2; v14 = 0; v13 -= v22; v12 += v22; } while ( v13 > 0 ); if ( !(unsigned int)sub_1400428B0(v26, Buffer) ) break; v23 = sub_140014AF0(v5, v26[1], v27); if ( v23 == -1 ) goto LABEL_30; if ( v23 ) BIO_printf(qword_1402808E8, "error in %s\n", *v27); sub_140099C00(qword_1402808E0, 11i64, 0i64); sub_140099C00(qword_1402808E8, 11i64, 0i64); } BIO_printf(qword_1402808E8, "Can't parse (no memory?)\n"); v10 = 1; } else { --v24; v10 = sub_140014AF0(v5, v11 - 1, ++v25); if ( v10 < 0 ) v10 = 0; } } } else { BIO_printf(qword_1402808E8, "FATAL: Startup failure (dev note: apps_startup() failed)\n"); X509_ALGOR_dup_0(qword_1402808E8); v10 = 1; } LABEL_30: CRYPTO_free(0i64, "apps\\openssl.c", 254); CRYPTO_free((void *)qword_1402808D0, "apps\\openssl.c", 255); sub_1400E8230(v5); CRYPTO_free(v27, "apps\\openssl.c", 257); sub_1400450B0(); sub_140099190(qword_1402808D8); sub_140099FF0(qword_1402808E0); sub_1400401B0(); test_r4_40_cipher_destroy(); sub_140099190(qword_1402808E8); exit(v10); } BIO_printf(qword_1402808E8, "FIPS mode not supported.\n"); return 1; }
openssl
malloc
void *__cdecl malloc(size_t Size) { size_t v2; // rdi void *v3; // rsi if ( Size > 0xFFFFFFFFFFFFFFE0ui64 ) { callnewh(Size); *errno() = 12; return 0i64; } else { v2 = 1i64; if ( Size ) v2 = Size; while ( 1 ) { if ( !hHeap ) { FF_MSGBANNER(); NMSG_WRITE(30i64); _crtExitProcess(0xFFu); } v3 = HeapAlloc(hHeap, 0, v2); if ( v3 ) return v3; if ( !dword_14028625C ) { *errno() = 12; LABEL_11: *errno() = 12; return v3; } if ( !callnewh(Size) ) goto LABEL_11; } } }
openssl
match
__int64 __fastcall match(const unsigned __int8 *lpFileName, const CHAR *a2) { int v2; // ebp int v3; // r12d unsigned __int8 *v4; // rbx const unsigned __int8 *v5; // rdi unsigned __int8 v7; // al bool v8; // zf unsigned __int8 v9; // al CHAR *cFileName; // rsi __int64 v11; // r15 unsigned __int8 v12; // al char *v13; // rax size_t v14; // rax size_t v15; // rbp unsigned __int8 *v16; // rax __int64 v17; // r14 const unsigned __int8 **v18; // rdi const unsigned __int8 *v19; // rcx unsigned __int8 *v20; // rbx int v21; // [rsp+68h] [rbp+10h] v2 = 0; v3 = 0; v4 = (unsigned __int8 *)a2; v5 = lpFileName; v21 = 0; if ( !a2 ) return 0xFFFFFFFFi64; if ( a2 != (const CHAR *)lpFileName ) { do { v7 = *v4; if ( *v4 == 92 || v7 == 47 ) break; if ( v7 == 58 ) goto LABEL_11; v8 = --v4 == v5; if ( v4 > v5 ) { v4 = mbsdec(v5, v4 + 1); v8 = v4 == v5; } } while ( !v8 ); } if ( *v4 == 58 ) { LABEL_11: if ( v4 != v5 + 1 ) return add((__int64)v5); } v9 = *v4; if ( *v4 == 92 || v9 == 47 || v9 == 58 ) v3 = (_DWORD)v4 - (_DWORD)v5 + 1; cFileName = find((LPCSTR)v5); if ( !cFileName ) return add((__int64)v5); v11 = qword_140286240; while ( 1 ) { if ( mbscmp((const unsigned __int8 *)cFileName, &byte_1402595E0) && mbscmp((const unsigned __int8 *)cFileName, "..") ) { v12 = *v4; if ( *v4 == 92 || v12 == 58 || v12 == 47 ) { v14 = strlen(cFileName); v15 = v14 + v3 + 1; if ( v3 < 0 ) return 0xFFFFFFFFi64; if ( v14 + v3 == -2i64 ) return 0xFFFFFFFFi64; if ( v15 < v3 ) return 0xFFFFFFFFi64; v16 = (unsigned __int8 *)calloc_crt(v14 + v3 + 1, 1i64); v17 = (__int64)v16; if ( !v16 ) return 0xFFFFFFFFi64; if ( mbsnbcpy_s(v16, v15, v5, v3) ) invoke_watson(0i64, 0i64, 0i64, 0, 0i64); if ( strcpy_s((char *)(v3 + v17), v15 - v3, cFileName) ) invoke_watson(0i64, 0i64, 0i64, 0, 0i64); if ( (unsigned int)add(v17) ) return 0xFFFFFFFFi64; v2 = v21; } else { v13 = strdup(cFileName); v5 = (const unsigned __int8 *)v13; if ( !v13 || (unsigned int)add((__int64)v13) ) return 0xFFFFFFFFi64; } v21 = ++v2; } if ( !FindNextFileA(hFindFile, lpFindFileData) ) break; cFileName = lpFindFileData->cFileName; if ( lpFindFileData == (LPWIN32_FIND_DATAA)-44i64 ) goto LABEL_41; } FindClose(hFindFile); hFindFile = 0i64; LABEL_41: if ( !v2 ) return add((__int64)v5); if ( v11 ) v18 = *(const unsigned __int8 ***)(v11 + 8); else v18 = (const unsigned __int8 **)qword_140286228; if ( v18 ) { while ( 1 ) { v20 = (unsigned __int8 *)v18[1]; if ( !v20 ) break; do { if ( mbsicmp(*(const unsigned __int8 **)v20, *v18) < 0 ) { v19 = *v18; *v18 = *(const unsigned __int8 **)v20; *(_QWORD *)v20 = v19; } v20 = (unsigned __int8 *)*((_QWORD *)v20 + 1); } while ( v20 ); v18 = (const unsigned __int8 **)v18[1]; } } return 0i64; }
openssl
mbtowc
int __cdecl mbtowc(wchar_t *DstCh, const char *SrcCh, size_t SrcSizeInBytes) { return mbtowc_l(DstCh, SrcCh, SrcSizeInBytes, 0i64); }
openssl
MD4_Init
__int64 __fastcall MD4_Init(_DWORD *a1) { int v1; // eax memset(a1, 0, (unsigned int)(v1 + 60)); *a1 = 1732584193; a1[1] = -271733879; a1[2] = -1732584194; a1[3] = 271733878; return 1i64; }
openssl
md_free
__int64 __fastcall md_free(bio_st *a) { void *ThrowImageBase; // rax if ( !a ) return 0i64; ThrowImageBase = (void *)__ExceptionPtr::_GetThrowImageBase(a); sub_1400C7920(ThrowImageBase); sub_140099270((__int64)a, 0i64); sub_1400BAD40((__int64)a, 0); return 1i64; }
openssl
md_new
__int64 __fastcall md_new(bio_st *bi) { __int64 result; // rax __int64 v3; // rbx result = (__int64)EVP_MD_CTX_new_0(); v3 = result; if ( result ) { sub_1400BAD40((__int64)bi, 1); sub_140099270((__int64)bi, v3); return 1i64; } return result; }
openssl
memchr
void *__cdecl memchr(const void *Buf, int Val, size_t MaxCount) { for ( ; MaxCount; --MaxCount ) { if ( *(_BYTE *)Buf == (_BYTE)Val ) break; Buf = (char *)Buf + 1; } return (void *)((unsigned __int64)Buf & -(__int64)(MaxCount != 0)); }
openssl
memcmp
int __cdecl memcmp(const void *Buf1, const void *Buf2, size_t Size) { signed __int64 v3; // rdx bool v4; // cf size_t v6; // r9 unsigned __int64 v7; // rax size_t v8; // r9 v3 = (_BYTE *)Buf2 - (_BYTE *)Buf1; if ( Size < 8 ) goto mcmp30; for ( ; ((unsigned __int8)Buf1 & 7) != 0; --Size ) { v4 = *(_BYTE *)Buf1 < *((_BYTE *)Buf1 + v3); if ( *(_BYTE *)Buf1 != *((_BYTE *)Buf1 + v3) ) return -v4 - (v4 - 1); Buf1 = (char *)Buf1 + 1; } if ( !(Size >> 3) ) { mcmp30: if ( !Size ) return 0; while ( 1 ) { v4 = *(_BYTE *)Buf1 < *((_BYTE *)Buf1 + v3); if ( *(_BYTE *)Buf1 != *((_BYTE *)Buf1 + v3) ) break; Buf1 = (char *)Buf1 + 1; if ( !--Size ) return 0; } return -v4 - (v4 - 1); } v6 = Size >> 5; if ( Size >> 5 ) { while ( 1 ) { v7 = *(_QWORD *)Buf1; if ( *(_QWORD *)Buf1 != *(_QWORD *)((char *)Buf1 + v3) ) break; v7 = *((_QWORD *)Buf1 + 1); if ( v7 != *(_QWORD *)((char *)Buf1 + v3 + 8) ) goto mcmp_adjust8; v7 = *((_QWORD *)Buf1 + 2); if ( v7 != *(_QWORD *)((char *)Buf1 + v3 + 16) ) goto mcmp_adjust16; v7 = *((_QWORD *)Buf1 + 3); if ( v7 != *(_QWORD *)((char *)Buf1 + v3 + 24) ) { Buf1 = (char *)Buf1 + 8; mcmp_adjust16: Buf1 = (char *)Buf1 + 8; mcmp_adjust8: Buf1 = (char *)Buf1 + 8; break; } Buf1 = (char *)Buf1 + 32; if ( !--v6 ) { Size &= 0x1Fu; goto mcmp70; } } } else { mcmp70: v8 = Size >> 3; if ( !(Size >> 3) ) goto mcmp30; while ( 1 ) { v7 = *(_QWORD *)Buf1; if ( *(_QWORD *)Buf1 != *(_QWORD *)((char *)Buf1 + v3) ) break; Buf1 = (char *)Buf1 + 8; if ( !--v8 ) { Size &= 7u; goto mcmp30; } } } v4 = _byteswap_uint64(v7) < _byteswap_uint64(*(_QWORD *)((char *)Buf1 + v3)); return -v4 - (v4 - 1); }
openssl