ldr_pe: clean the code