Washi1337/AsmResolver

Nested types metadata/references lost using DynamicMethodDefinition.

NullOnSec opened this issue · 1 comments

AsmResolver Version

4.11.2

.NET Version

.net 4.7.2

Operating System

Windows

Describe the Bug

Problems with nested types references when patching a new net assembly from DynamicMethodDefinitions.

How To Reproduce

DISCLAIMER: I will not be posting screenshots because the way of reproducing it is patching the FlareOn nº8 challenge, since FlareOn9 is not finished yet I will not be making any spoilers, anyways, I believe @Washi1337 knows what I'm talking about.

To reproduce this error all I did was patch the flared_48 method and I lost nested types references, the code I used for this is the following:
SS1
SS2

Expected Behavior

As I said I won't post screenshots of this because I'd leak flareOn stuff.

Essentially the problem is that nested types metadata/references should be preserved but actually it gets lost.

Actual Behavior

Nested types metadata/references are lost.

Additional Context

No response

Thanks for reporting. It seems like this is a repetition of #273 but specifically for importing via System.Reflection. A fix for this will be present in 5.0.