
If you recompile your fx_rva will likely change, in which
case you will have to reexamine the dll_exe for its offset.

this first sample has relocation info left intact. to see the 
rebasing error, mark the charateristic relocations striopped and
then try it. on my system it tries to load at 410000 by default 
because of ctype.nls. you can overcome this by using UnMapViewOfFile
to bring it back into its preferred load address. 

functionality to do this is already programmed into the loader app

		main:
.text:004010B2                 mov     [ebp+var_4], eax
.text:004010B5                 push    offset aRnguv@sdLhbsnr ; char *
.text:004010BA                 mov     eax, [ebp+var_4]
.text:004010BD                 push    eax             ; char *
.text:004010BE                 call    _strcpy
.text:004010C3                 add     esp, 8
.text:004010C6                 mov     ecx, [ebp+var_4]
.text:004010C9                 push    ecx
.text:004010CA                 call    sub_401005


.text:00401005 sub_401005      proc near               ; CODE XREF: _main+C0p
.text:00401005                 jmp     loc_401020
.text:00401005 sub_401005      endp


		decoder:
.text:00401020                 push    ebp
.text:00401021                 mov     ebp, esp
.text:00401023                 sub     esp, 48h
.text:00401026                 push    ebx
.text:00401027                 push    esi
.text:00401028                 push    edi
		...
.text:00401038                 mov     eax, [ebp+arg_4]
.text:0040103B                 push    eax             ; char *
.text:0040103C                 call    _strlen
.text:00401041                 add     esp, 4
.text:00401044                 mov     [ebp+var_8], eax
.text:00401047                 mov     [ebp+var_4], 0
.text:0040104E                 jmp     short loc_401059
.text:00401050 ; ---------------------------------------------------------------------------
.text:00401050
.text:00401050 loc_401050:                             ; CODE XREF: _main+6Bj
.text:00401050                 mov     ecx, [ebp+var_4]
.text:00401053                 add     ecx, 1
.text:00401056                 mov     [ebp+var_4], ecx
.text:00401059
.text:00401059 loc_401059:                             ; CODE XREF: _main+44j
.text:00401059                 mov     edx, [ebp+var_4]
.text:0040105C                 cmp     edx, [ebp+var_8]
.text:0040105F                 jge     short loc_401077
.text:00401061                 mov     eax, [ebp+arg_4]
.text:00401064                 add     eax, [ebp+var_4]
.text:00401067                 movsx   ecx, byte ptr [eax]
.text:0040106A                 xor     ecx, 21h
.text:0040106D                 mov     edx, [ebp+arg_4]
.text:00401070                 add     edx, [ebp+var_4]
.text:00401073                 mov     [edx], cl
.text:00401075                 jmp     short loc_401050
.text:00401077 ; ---------------------------------------------------------------------------
.text:00401077
.text:00401077 loc_401077:                             ; CODE XREF: _main+55j
.text:00401077                 pop     edi
.text:00401078                 pop     esi
.text:00401079                 pop     ebx
		...	
.text:00401084                 mov     esp, ebp
.text:00401086                 pop     ebp
.text:00401087                 retn


