Reko.Scanning.Scanner.GetImportedProcedure C# (CSharp) Method

GetImportedProcedure() public method

If addrImportThunk is the known address of an import thunk / trampoline, return the imported function as an ExternaProcedure. Otherwise, check to see if the call is an intercepted call.
public GetImportedProcedure ( Address addrImportThunk, Address addrInstruction ) : Reko.Core.ExternalProcedure
addrImportThunk Address
addrInstruction Address Used to display diagnostics.
return Reko.Core.ExternalProcedure
        public ExternalProcedure GetImportedProcedure(Address addrImportThunk, Address addrInstruction)
        {
            ImportReference impref;
            if (importReferences.TryGetValue(addrImportThunk, out impref))
            {
                var extProc = impref.ResolveImportedProcedure(
                    importResolver,
                    program.Platform,
                    new AddressContext(program, addrInstruction, this.eventListener));
                return extProc;
            }

            ExternalProcedure ep;
            if (program.InterceptedCalls.TryGetValue(addrImportThunk, out ep))
                return ep;
            return GetInterceptedCall(addrImportThunk);
        }