No, this is not possible. The reason why is quite broad, maybe even too broad for SuperUser, given that you would need to explain the fundamentals on how x86 and x64 were created, and how this influences programming in general.
But to explain briefly, it comes down to this:
In the past, we had 16-bit processors. Then intel made the first 32 bit processor, also known as x86. This is the 8086, 80286 (286 for short) etc... This was basically a modifcation to the 16 bit processors, with extra instruction sets added. With every new release of their processor series, Intel added more instruction sets to the processor family, which in the end caused the instructionset to contain many many instructions. Intel could not just remove old instruction sets because that would mean there was no backwards compatibility, and Intel wanted to keep supporting older processors.
As the processor is 32 bits, there is an upper limit, namely the highest 32-bit number. This means, that memory assignment only goes up to about 3,5GB.
Back in the days, computers were not so powerful, so if intel would aim for 64 bits from the start, it would mean that much more time was spent calculating the same numbers so performance would degrade simply because the numbers to calculate with are bigger.
Besides 32 bit processors worked quite well for a long time.
At some point, AMD entered the market and introduced the 64bit processor. AMD created their own instruction sets to allow working with 64 bits while keeping the intel instruction sets for 32 bits in tact to allow for backwards compatibility with 32 bits.
Given that they are in fact different instruction sets, a programmer who creates 32 bit programs will call different routines than when they create 64 bit programs.
Now that I explain why this is hard to do, lets continue to explain the problem from a programming perspective.
When you code a program, you write your code first. If your code is backwards compatible for 32 bits programs, you simply cannot use 64-bits numbers nor can you address more than 3,5gigs of memory at the same time. Basically, you cannot cross any limits that 32 bit programs face or your program will crash when done so.
As you now have code, only you can actually run your program. In order to make it so that other people can run your program, you have to compile the code into an executable. This means that the easy to read code is converted into instructions that the processor understands. During compile, you specify if your program is meant to run on x86 or x64, and the compiler will generate code using the instruction sets based on that processor architecture.
As you can see, you can't just modify an executable and make it work on a different executable. You first need to decompile the program to code, then recompile it using different instructions.
That said, given that a program that is compiled for x86 will natively work on x64, it is safe to assume that a programmer creates an x64 program because he is going to break limits of the x86 architecture. So even if you were to turn the x64 version into an x86 version, it is likely that the program will be unstable as you will cross the limitations of what a 32-bit program can do.
3If you could do it easily, so could software vendors and they would do it for you. – gronostaj – 2018-09-11T11:35:46.803
2It's also worth noting that if you're talking about an x86 system, it really is worth upgrading even aside from the security implications. An otherwise identical x86 system running 32-bit versus 64-bit will (almost) always perform better running 64-bit. – Austin Hemmelgarn – 2018-09-11T19:19:13.237
@AustinHemmelgarn I've thought that x86 is another way to say 32-bit? – Ooker – 2018-09-12T04:31:49.527
The correct names are x86 and x86-64. x86-64 is a superset of x86, so one could say that x86-64 processors are also x86. x86-64 CPU can be used like a x86 one, but it won't benefit from other x86-64 enhancements. – gronostaj – 2018-09-12T07:18:57.400
@gronostaj did you mean that x86-64 is a subset of x86? – Ooker – 2018-09-12T10:26:46.917
1No, x86-64 is a superset of x86. It contains all the features of x86 + more. x86 is a subset of x86-64. – gronostaj – 2018-09-12T11:03:23.750
1@Ooker It depends on the context. Realistically speaking though, when someone just says 'x86' without any specific qualifiers, they mean the architecture as a whole, not just the 32-bit version. – Austin Hemmelgarn – 2018-09-12T15:01:14.287
@gronostaj It's probably worth noting that your statement is only true of the hardware, and is not true of a direct comparison between long mode and legacy mode on 64-bit x86 CPU's (at minimum, some of the segment registers are unusable in long mode). – Austin Hemmelgarn – 2018-09-12T15:09:02.490
@gronostaj I understand what you mean. I was thinking about the definition of superset. A ⊂ B ⇔ all elements of A belong to B. So when you say that "x86-64 processors are also x86", it can only be understood that the former is a subset of the latter. – Ooker – 2018-09-12T15:15:05.760
Ooh, I get it now. You're thinking about processor sets defined by feature sets and I'm thinking about feature sets. – gronostaj – 2018-09-13T07:25:41.037
64-bit didn’t actually make systems faster. It made more real memory addressable. Having done performance work when 32 > 64 was happening it actually slowed things down. That said, I agree with the others...upgrade. So many benefits – Hogstrom – 2018-09-24T23:11:00.097