KsepGetModuleInfoByName

INT64 __fastcall KsepGetModuleInfoByName(const WCHAR *SourceString, _DWORD *a2, _QWORD *a3){
  NTSTATUS v5; 
  INT8 v6; 
  int v7; 
  _DWORD *v8; 
  struct _STRING DestinationString; 
  UNICODE_STRING SourceStringa; 
  STRING String1; 
  DestinationString = 0i64;
  String1 = 0i64;
  SourceStringa = 0i64;
  if( !SourceString || !a3 || !a2 )
    return 3221225485i64;
  RtlInitUnicodeString(&SourceStringa, SourceString, (WCHAR)a3);
  v5 = RtlUnicodeStringToAnsiString(&DestinationString, &SourceStringa, 1u);
  if( v5 >= 0 )
  {
    v7 = 0;
    if( *a2 )
    {
      while( 1 )
      {
        v8 = &a2[74 * v7 + 2];
        RtlInitAnsiString(&String1, (PCSZ)v8 + *((unsigned __int16 *)v8 + 19) + 40, v6);
        if( !(unsigned int)RtlCompareString(&String1, &DestinationString, 1u) )
          break;
        if( (unsigned int)++v7 >= *a2 )
          goto LABEL_8;
      }
      v5 = 0;
      *a3 = *((_QWORD *)v8 + 2);
    }
    else
    {
LABEL_8:
      v5 = -1073741275;
    }
  }
  if( DestinationString.Buffer )
    RtlFreeAnsiString((_UNICODE_STRING *)&DestinationString);
  return(unsigned int)v5;
}

Referenced by:

KsepResolveShimHooks