64 Framework behaves differently

Hello,

I had to process a .NET PE file recompiling it and I managed to do so, in fact it works just well with the 32bit framework, but a couple of days ago I noticed that a on the 64bit framework it doesn't work with windows applications (with console application it seems working). I seriously have no idea what the problem could be: peverify tells me everything is ok (of course, otherwise it wouldn't work on 32bit). My guess is that it has something to do with the resources, does the 64bit framework check something more than the 32bit one If anyone's interested in seeing a simple original and a processed file: http://pmode.net/problem.zip . I hope I'll get an answer otherwise I have to spend countless (in the worst scenario) hours trying to understand what differs between the two frameworks, and I do not even have got win64 so I would have to try in remote.

Thank you in advance.


Answer this question

64 Framework behaves differently

  • Richard.C.Bower

    Seems the resources are not the problem, I got 2 almost identical exes with only one difference I can possibly see: the disposition of the methods (I uploaded the two exes: same link). But it doesn't make much sense, I cannot imagine why the disposition of the code makes any difference, maybe it's not that but after many file compares I can just notice that compared to the original file the dispotion changes. Why should the code of a .cctor come before the code of a .ctor who is stands before the .cctor in the metadata tables And why on earth does the 64bit framework care and the 32bit one not I have no idea...

  • Gliksman

    Ok, solved the problem. Fat Header methods have to be aligned to 4 bytes boundary. I have no idea why the 64bit framework cares and the 32bit one doesn't.

  • 64 Framework behaves differently