The image loader or also known internally as Ldr, is responsible for most of the initialization work of a user-mode process and resides in the user-mode system DLL (Ntdll.dll) and not in the kernel library.
Image loader
![](https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=1084,h=256,fit=crop/A1aBoqg8XrTLxEyM/image_loader-A1aBo44EMnUMqxwV.png)
![](https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=328,h=76,fit=crop/A1aBoqg8XrTLxEyM/image_loader-A1aBo44EMnUMqxwV.png)
Note: This is the first piece of code that runs in user mode as part of a new process.
Main task
Initializing the user-mode state for the application.
Parsing the import table (IAT) of the application to find all the DLL files that the program requires.
Loading and unloading DLLs at runtime/memory.
Handling manifest files, needed for SxS support.
Enabling support for API Sets and API redirection
![](https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=1920,fit=crop/A1aBoqg8XrTLxEyM/wallhaven-yjqyyx-mnlqZM4Dbws43kb7.jpg)