´ÓÄæÏòµÄ½Ç¶È¿´.NETµÄ¼¸¸ö»ù±¾¸ÅÄÐø£©¡ª¡ª.NETÖеÄMethod
ÉÏƪ½²Á˺ܶà¸ÅÄµ«Ã»ÓÐÕë¶ÔÈκÎÒ»¸ö½øÐÐÉîÈë¡£Õâ´ÎÎÒÃÇÀ´½²½²×îÓÐȤµÄMethod£¬ËüÔÚ.NETÖеÄ×÷ÓÃÏ൱ÓÚwin32ϵÄfunction¡£MethodÖ®ËùÒÔÓÐȤÕýÊÇÒòΪËüºÍJITÒýÇæ¼°ÆäËü.NETÄں˵ĹØϵ×îΪÃÜÇУºJITµÃµ½MethodµÄIL´úÂë²¢°ÑËü±àÒë³É±¾»ú´úÂ룬Èç¹ûÔÚ±àÒë¹ý³ÌÖÐÓöµ½µ÷ÓÃеÄÀ࣬JIT¿ÉÄÜתµ½ÐÂÀàµÄ±àÒëÖУ¬ÄÚºËÒª¸ù¾ÝMethod¶¨ÒåµÄÊôÐÔ¾ö¶¨´úÂëÊÇ·ñÄܹ»µ÷ÓÃÒ»¸öMethod£¨µ±È»£¬Õâ¸ö¹¤×÷´ó¶àÊýÔÚ¾²Ì¬±àÒë½×¶ÎÍê³É£©£¬.NETÖеÄinlineÊÇÔõÑùʵÏֵġ£×î¹Ø¼üµÄÊÇ£¬ÎÒÃÇҪѰÕÒµÄÃô¸Ð´úÂ룬¿Ï¶¨Òþ²ØÔÚij¸ö£¨»òÊý¸ö£©MethodÖС£
ÎÒÃÇ»á´ÓÒ»¸ö¼òµ¥Àý×Ó×ÅÊÖ£¬Í¨¹ý¶¯Ì¬µ÷ÊԵķ½·¨×ß½ø.NETµÄÄںˡ£
¸½¼þÏÂÔØ
Àý×Ó´úÂëÈçÏ£º
using System;
namespace tankaiha.dotnetsample.sample1
{
public sealed class calcclass
{
public void calcCode(string strCode)
{
if(strCode=="tankaiha")
{
Console.WriteLine("You got it");
}
else
{
Console.WriteLine("You are wrong!");
}
return;
}
}
class mainclass
{
static void Main()
{
Console.WriteLine("Please enter you code:");
calcclass cs=new calcclass();
cs.calcCode(Console.ReadLine());
return;
}
}
}
´úÂëÓÐÁ½¸öÀ࣬mainclassÀàÖÐÖ»°üº¬ÁËMain()Õâ¸öÈë¿Ú·½·¨£¬²¢´ÓÃüÁîÐжÁÈëÓû§µÄÊäÈë¡£ÁíÒ»¸öÀàcalcclassÖÐÖ»ÓÐÒ»¸ö·½·¨calcCode()£¬ÓÃÀ´¼ÆËãÓû§µÄÊäÈëÊÇ·ñµÈÓÚtankaiha£¬È»ºó·Ö±ðÊä³öÐÅÏ¢¡£
ÏÈÀ´¿´¿´PEÎļþµÄMetadata£¬ÌرðÊÇcalcCode·½·¨¡£.NET PEÍ·ÖУ¬½ô½Ó×ÅIMAGE_COR20_HEADERµÄ¾ÍÊÇMethod Stream£¬³ÌÐòÖеķ½·¨¼°ÆäIL´úÂëÈ«²¿ÔÚÕâÀï¡£¹²ÓÐËĸö·½·¨£¬³ýÁËÎÒÃÇдµÄmainºÍcalcCodeÍ⣬»¹ÓÐϵͳ×ÔÒѼÓÉϵÄĬÈÏ.ctor³õʼ»¯·½·¨¡£
ÕâÀﲢûÓж¨ÒåMethodµÄÊôÐÔ£¬Ö»ÊÇMethod BodyºÍMethod Head¡£»¹¼ÇµÃ¹ýÈ¥½²¹ýµÄMethod Head·ÖTinyºÍFat£¬ÕâÀïÏÔʾcalcCode()·½·¨ÎªIMAGE_COR_ILMETHOD_FAT£¬ËµÃ÷ËüÊǸöFat·½·¨¡£
¶ÔÓÚMethodµÄ¶¨Ò壬ÔòÊÇ´æ´¢ÔÚMetadataµÄMethodDef±íÖС£ÈçÏ£º
ÕâÀïÓÐÁ½ÏîºÜÓÐÒâ˼£¬Ò»ÊÇImplFlags£¬ÁíÒ»¸öÊÇFlags¡£
Flags·ÖΪÈý´óÀ࣬һÀàÊÇ¿ØÖÆ·ÅÎʵÄAccess£¬±ÈÈçÄãÔÚ³ÌÐòÖж¨ÒåµÄpublic¡¢privateµÈ¡£Í¼ÖеÄReuseSlotÊÇÇ£Éæµ½ÀàÔڼ̳Ðʱ·½·¨µÄµ÷ÓÃÊôÐÔ¡£µÚ¶þÀàÊÇ¿ØÖÆInterOpµÄ£¬µÚÈýÀàÊǶîÍâÊôÐÔ¡£
ImplFlagsÔò·ÖΪÁ½´óÀ࣬һÀàÊÇInterOpÏà¹ØµÄ£¬ÔÚÎÒÃǵÄÀý×ÓÖв»´æÔÚ¡£ÁíÒ»ÀàÃèÊö´úÂëÊôÐԵģ¬±ÈÈ磺
IL 0x0000 Method impl is CIL.
Native 0x0001 Method impl is native.
Managed 0x0000 Method impl is managed.
NoInlining 0x0008 Method may not be inlined.
NoInlining 0x0008 Method may not be inlined.
´ÓͼÖп´³öÎÒÃÇ´úÂëÊôÐԺܼòµ¥£¬¾ÍÊÇILÍйܴúÂë¡£¸Õ²Å±íÖÐ×îºóÒ»ÏîNoInling˵Ã÷¸Ã·½·¨²»¿ÉÒÔ±»ÄÚÁª£¬±¾ÀýÖв¢Ã»ÓÐÕâ¸öÊôÐÔ¡£ºóÃæ»á¿´µ½ËüµÄ×÷Óá£
¿´Ò»ÏÂMain·½·¨µÄIL´úÂ룬¿´Ò»ÏÂC#±àÒëµ½ILµÄ´óÌåÇé¿ö¡£Main·½·¨µÄ´úÂëÈçÏ£º
.method private hidebysig static void Main() cil managed
{
.entrypoint
// Code size 33 (0x21)
.maxstack 2
.locals init (class tankaiha.dotnetsample.sample1.calcclass V_0)
IL_0000: nop
IL_0001: ldstr "Please enter you code:"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: newobj instance void tankaiha.dotnetsample.sample1.calcclass::.ctor()
IL_0011: stloc.0
IL_0012: ldloc.0
IL_0013: call string [mscorlib]System.Console::ReadLine()
IL_0018: callvirt instance void tankaiha.dotnetsample.sample1.calcclass::calcCode(string)
IL_001d: nop
IL_001e: br.s IL_0020
IL_0020: ret
} // end of method mainclass::Main
´úÂëÁ÷³Ì·Ç³£Çå³þ£¬ÆäÖбàÒëÆ÷ΪÎÒÃǼÓÉÏÁËÒ»¸ö¾Ö²¿±äÁ¿ÓÃÀ´±£´æ¶ÔcalcclassʵÀý»¯µÄÖµ£¬Í¨¹ýstloc.0ºÍldloc.0¡£
.locals init (class tankaiha.dotnetsample.sample1.calcclass V_0)
¶øÇÒ´úÂëÖдæÔÚÁ½ÖÖµ÷Ó÷½Ê½callºÍcallvirt¡£ÔÚ±¾µØ´úÂëÖÐÎÒÃǻῴµ½ËüʵÏÖ·½·¨µÄ²»Í¬¡£
ÏÂÃ濪ʼ¶¯Ì¬µ÷ÊÔ£¬ÕâÀïÎÒÃÇÓÃOllyDbg£¬ÕâÑù¿ÉÒÔÖ±½Ó¸ú×ÙJITÉú³ÉµÄ±¾»ú´úÂë¡£ÓÉÓÚOD²»ÄÜÖ±½ÓÖжÏÔÚ.NET³ÌÐòµÄÈë¿Ú´¦£¬ËùÒÔÔÚÎÒÃǵÚÒ»´ÎÔËÐÐʱÊÇÎÞ·¨Öжϵġ£ÕâûÊ£¬ÎÒÃÇ¿ÉÒÔÔÚIL´úÂë±»µÚÒ»´Î¶ÁȡʱÖжϡ£Òò´Ë£¬ÏÈÉèÖóÌÐòÔÚÔØÈëеÄÄ£¿éʱÖжϣ¬µ±mscorwks±»ÔØÈëºó£¬ÎÒÃÇÖжÏÔÚËüµÄ79E9776D´¦¡£
´Ë´¦µÄ´úÂëÈçÏÂ
.text:79E9776D call dword ptr [ecx] ; call mscorjit.dll compMethods
ÕâÊǵ÷ÓÃmscorjit.dll²¢¶ÔMethod½øÐбàÒ롣Ϊʲô£¿ÕâÊÇÎÒ¸ú³öÀ´µÄ¡£µ±È»£¬Õâ¸öµØÖ·ÔÚ¸÷¸ö»úÆ÷ÉÏ¿ÉÄܲ»Í¬£¬ÕâûÊ£¬ÄãÖ»ÒªÔÚmscorwksµÄ·´»ã±àÖÐÕÒµ½Õâ¸öº¯Êý¾Í¿ÉÒÔÁË
enum CorJitResult __stdcall invokeCompileMethodHelper(¡¡)
ÕâʱÔÙ¿´Ä£¿é£¬mscorjit.dllÒѾÔØÈëÁË¡££¨²»ÖªÎªÊ²Ã´£¬ODû·¨ÔÚËü¼ÓÔØʱÖжϣ¬Ö»ºÃÓÃÕâ¸öÂé·³Ò»µãµÄ·½·¨ÁË£©
mscorjit.dllÔØÈëºó£¬±ã¿ÉÒÔÖжÏÔÚËüµÄprivate: virtual enum CorJitResult __stdcall CILJit::compileMethod´¦£¬ÔÚÎÒ»úÆ÷ÉϵĵØÖ·ÊÇ£ºbp 7906e7f4¡£
F9ÔËÐк󣬳ÌÐòÖжϡ£ÔÚxenocodeµÄÎÄÕÂÖÐÎÒ½²¹ýÁËÕâʱ׵ջÀïµÄ²ÎÊý£¬ÎÒÃÇÒª¸ù¾ÝÕâ¸ö²ÎÊýÀ´¿´¿´ÊÇÄĸö·½·¨±»JITÁË¡£
µÚÒ»´ÎµÄ×µÕ»ÈçÏÂ:
ÆäÖб»±àÒëµÄIL´úÂëµÄÆ«ÒÆÔÚ00402094´¦£¬ÕâÊÇmainclass::main·½·¨¡££¨ÎªÊ²Ã´£¿×ÔÒÑÏëÏ룩ÎÒÃǾÍÊÇÒª¿´ËüµÄ±¾µØ´úÂë¡£F8²½½ø£¬Ö±µ½³ÌÐòÖ´ÐÐÍêÒ»¸öcall¡£
7906E82C |. E8 10000000 call mscorjit.7906E841
7906E831 |. 85C0 test eax,eax
7906E833 |. 75 08 jnz short mscorjit.7906E83D
7906E835 |. 8B4D 18 mov ecx,dword ptr ss:[ebp+18]
7906E838 |. 8B55 FC mov edx,dword ptr ss:[ebp-4]
7906E83B |. 8911 mov dword ptr ds:[ecx],edx
7906E83D |> C9 leave
7906E83E \. C2 1800 retn 18
´Ëʱ£¬edxÖд洢µÄ¾ÍÊDZ¾µØ´úÂ룬ÔÚ00DA0070´¦¡£ÎÒÃÇÖжϣºbp edx£¬ÔÙ´ÎF9ÔËÐС£Õâʱ³ÌÐò¹ûÈ»ÖжÏÔÚ00DA0070´¦ÁË¡£ÍêÕû´úÂëÈçÏ£º
00DA0070 56 push esi
00DA0071 833D 84103B02 00 cmp dword ptr ds:[23B1084],0
00DA0078 75 0A jnz short 00DA0084
00DA007A B9 01000000 mov ecx,1
00DA007F E8 88D75A78 call mscorlib.7934D80C
00DA0084 8B0D 84103B02 mov ecx,dword ptr ds:[23B1084]
00DA008A 8B15 3C303B02 mov edx,dword ptr ds:[23B303C]
00DA0090 8B01 mov eax,dword ptr ds:[ecx]
00DA0092 FF90 D8000000 call dword ptr ds:[eax+D8]
00DA0098 B9 8030A700 mov ecx,0A73080
00DA009D E8 7A1FCCFF call 00A6201C
00DA00A2 8BF0 mov esi,eax
00DA00A4 E8 0F6B6178 call mscorlib.793B6BB8
00DA00A9 8BC8 mov ecx,eax
00DA00AB 8B01 mov eax,dword ptr ds:[ecx]
00DA00AD FF50 64 call dword ptr ds:[eax+64]
00DA00B0 8B15 40303B02 mov edx,dword ptr ds:[23B3040]
00DA00B6 8BC8 mov ecx,eax
00DA00B8 E8 33B85A78 call mscorlib.7934B8F0
00DA00BD 25 FF000000 and eax,0FF
00DA00C2 0F94C0 sete al
00DA00C5 0FB6C0 movzx eax,al
00DA00C8 85C0 test eax,eax
00DA00CA 75 27 jnz short 00DA00F3
00DA00CC 833D 84103B02 00 cmp dword ptr ds:[23B1084],0
00DA00D3 75 0A jnz short 00DA00DF
00DA00D5 B9 01000000 mov ecx,1
00DA00DA E8 2DD75A78 call mscorlib.7934D80C
00DA00DF 8B0D 84103B02 mov ecx,dword ptr ds:[23B1084]
00DA00E5 8B15 44303B02 mov edx,dword ptr ds:[23B3044]
00DA00EB 8B01 mov eax,dword ptr ds:[ecx]
00DA00ED FF90 D8000000 call dword ptr ds:[eax+D8]
00DA00F3 5E pop esi
00DA00F4 C3 retn
µ±³ÌÐòÖ´Ðе½00DA0092ʱ£¬ÎÒÃÇ¿´edxÖ¸Ïòʲô£¿
013B1A04 E0 A3 0F 79 17 00 00 00 16 00 00 00 50 00 6C 00 ࣠y ... ...P.l.
013B1A14 65 00 61 00 73 00 65 00 20 00 65 00 6E 00 74 00 e.a.s.e. .e.n.t.
013B1A24 65 00 72 00 20 00 79 00 6F 00 75 00 20 00 63 00 e.r. .y.o.u. .c.
013B1A34 6F 00 64 00 65 00 3A 00 00 00 00 00 o.d.e.:.....
ÕâÕýÊÇÎÒÃÇÔÚMain·½·¨ÖÐÊäÈëµÄ¡±Please enter your code¡±µÄUnicodeÐÎʽ¡£¿´À´Õâ¸öcall¾ÍÊǵ÷ÓÃmscorlib.WriteLine·½·¨¡£ÔÙÍùÏÂ×ߣ¬¹ÖÁË£¬ÔÚ00DA00AD´¦µ÷ÓÃReadLineºó£¬³ÌÐòûÓÐÏñÎÒÃÇÉè¼ÆµÄÄÇÑù£¬Ìøתµ½calcclassµÄcalcCode·½·¨ÖУ¬¶øÊÇÖ±½ÓÔÚ00DA00B8´¦½øÐбȽÏÁË¡£ÎªÊ²Ã´ÄØ£¿»¹¼ÇµÃÇ°ÃæÌáµ½µÄinlineµÄÎÊÌâÂð£¿calcCodeº¯Êý±»×Ô¶¯ÄÚÁªÁË¡£
À´¿´Ò»ÏÂC££Àï¶ÔinlineµÄÃèÊö£¨Õª×ÔProfessional C#£©£ºA method or property whose implementation simply calls another method or returns a field will almost certainly be inlined. Ò²¾ÍÊÇ˵CLRÔÚ¶¯Ì¬±àÒëʱ×Ô¼º¾ö¶¨ÄÄЩº¯ÊýÓ¦¸Ã±»ÄÚÁª£¬¶øûÓÐinlineÀàËƵĹؼü´ÊÀ´¶¨Òå¡£
ÏÂÃæÔÙ×ö¸öÊÔÑ飬ÊÖ¶¯½«calcCodeµÄImpleFlag¼ÓÉÏNoInline¡£½«0x3C2´¦µÄ0¸ÄΪ8£¬
Ôٴδò¿ªsample.exe£¬·¢ÏÖÍ·ÎļþÒѾ¸Ä±äÁË£¬calcCodeÒÑÓÐÁËNoInlineµÄÊôÐÔ¡£
ÏÂÃæͬÑùÓÃOD½øÐе÷ÊÔ£¬¿´JITºóµÄ´úÂë·¢ÉúÁËÄÄЩ¸Ä±ä¡£°´Ç°ÎÄËù˵µÄ·½·¨ÖжÏÏÂÀ´ÒÔºó£¬Õâ´Î±¾µØ´úÂëµÄµØÖ·ÈÔÈ»ÊÇ00DA0070¡£ÖжϺó£¬ÎÒÃÇÀ´µ½Main·½·¨µÄ±¾µØ´úÂë´¦£º
00DA0070 56 push esi
00DA0071 833D 84103B02 00 cmp dword ptr ds:[23B1084],0
00DA0078 75 0A jnz short 00DA0084
00DA007A B9 01000000 mov ecx,1
00DA007F E8 88D75A78 call mscorlib.7934D80C
00DA0084 8B0D 84103B02 mov ecx,dword ptr ds:[23B1084]
00DA008A 8B15 3C303B02 mov edx,dword ptr ds:[23B303C]
00DA0090 8B01 mov eax,dword ptr ds:[ecx]
00DA0092 FF90 D8000000 call dword ptr ds:[eax+D8]
00DA0098 B9 8030A700 mov ecx,0A73080
00DA009D E8 7A1FCCFF call 00A6201C
00DA00A2 8BF0 mov esi,eax
00DA00A4 E8 0F6B6178 call mscorlib.793B6BB8
00DA00A9 8BC8 mov ecx,eax
00DA00AB 8B01 mov eax,dword ptr ds:[ecx]
00DA00AD FF50 64 call dword ptr ds:[eax+64]
00DA00B0 8BD0 mov edx,eax
00DA00B2 8BCE mov ecx,esi
00DA00B4 3909 cmp dword ptr ds:[ecx],ecx
00DA00B6 FF15 B830A700 call dword ptr ds:[A730B8]
00DA00BC 5E pop esi
00DA00BD C3 retn
¹â´ÓÊýÁ¿ÉÏ¿´£¬Õâ´ÎµÄ´úÂëÖ»ÓÐ21ÐУ¬±ÈÉÏ´ÎÉÙÁËÊ®À´ÐС£ÎÒÃǵÄÖصã·ÅÔÚ´ÖÌåµÄ×îºóËÄÐÐÉÏÃæ¡£
mov edx,eax£º°ÑÊäÈëµÄ×Ö·û´®µØÖ·´«¸øedx
mov ecx,esi£º»¹¼ÇµÃÎÒÃǵÄMSIL´úÂëÖе÷ÓÃcalcCode()·½·¨ÊÇcallvirtÂ𣿶ÔÓÚvirt·½·¨µÄµ÷Óã¬CLRÒªÇ󽫵÷ÓöÔÏóµÄRefrence´«¸øecx¡£ÕâÀïÒ²¿´³ö£¬JIT²úÉúµÄ´úÂëÊÇ__fastcallÐÎʽ£¬Èç¹û²ÎÊý½Ï¶à£¬¿ÉÄÜedx,ecx,ÉõÖÁeax¶¼»á±»ÓÃÀ´´«µÝ²ÎÊý¡£
call dword ptr ds:[A730B8]£ºµ÷ÓÃcalcCode()·½·¨¡£
¿´Ò»Ïµڶþ¾ä£¬mov ecx,esi£¬Ò²¾ÍÊÇ˵ÉÏÃæÓÐÒ»¾äÊǽ«calcClass³õʼ»¯ºó£¬½«ËüµÄrefrenceÒ»Ö±±£´æÔÚesiÖС£¾ÍÊÇÕâÈý¾ä£º
00DA0098 B9 8030A700 mov ecx,0A73080
00DA009D E8 7A1FCCFF call 00A6201C
00DA00A2 8BF0 mov esi,eax
ºÜÃ÷ÏÔ£¬calcClassµÄrefrence±£´æÔÚ00A73080´¦£¬¶øÏà¶ÔÕâ¸öµØÖ·µÄ0x38´¦¾ÍÊÇcalcCode()·½·¨µÄµØÖ·£¨00A730B8-00A73080=0x38£©¡£ÄÇôÏÂÃæÊÇ×îÓÐȤµÄ²¿·Ö£¬ÎÒÃÇ¿´Ò»ÏÂÔÚϵͳ¶ÔcalcClass½øÐгõʼ»¯Ç°ºÍ³õʼ»¯ºó£¬refrenceÖеÄÄÚÈݶ¼ÓÐÄÄЩ¸Ä±ä¡£Êµ¼ÊÉÏ£¬00A73080´¦ÎªÒ»¸öCORINFO_CLASS_STRUCT½á¹¹£¬Ö»ÊÇÕâ¸ö½á¹¹µÄ¾ßÌå²ÎÊý΢Èíδ¹«¿ª¡£ÔÚIA£32µÄ»úÆ÷ÉÏ£¬Õâ¸ö½á¹¹Óиö40×Ö½Ú³¤µÄÍ·²¿£¬½ô¸ú×ÅÊǸ÷¸ö·½·¨µÄµØÖ·¡££¨ÀàµÄ¼Ì³ÐÖУ¬·½·¨µÄ¸÷ÖÖÊôÐÔ¾ÍÌåÏÖÔÚÕâ¸öµØÖ·±íVTableÖУ¬ÕâÀï²»¶à˵£¬ÓÐÐËȤµÄ×ÔÒѲ鿴Ïà¹ØÎÄÏס££©
³õʼ»¯Ç°£¬ÄÚÈÝΪ£º
00A73080 00 00 04 00 0C 00 00 00 02 04 06 00 04 00 00 00 .. ..... . ...
00A73090 18 9C 0F 79 14 2C A7 00 C0 30 A7 00 58 13 A7 00 ?y ,???X ?
00A730A0 00 00 00 00 00 00 00 00 EC 4B 35 79 C0 39 35 79 ........ìK5y?5y
00A730B0 B0 39 35 79 C0 A4 34 79 C8 30 A7 00 D4 30 A7 00 ?5yÀ¤4y????
00A730C0 80 00 00 00 00 00 00 00 B8 70 30 A7 00 89 ED E9 €.......¸p0?‰í
00A730D0 38 EE 91 FF B8 78 30 A7 00 89 ED E9 2C EE 91 FF 8î‘ÿ¸x0?‰í?î‘ÿ
00A730E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
ºìÌåµÄ²¿·Ö¾ÍÊÇ[00A730B8]£¬Ò²¾ÍÊÇÏÂÃ潫µ÷ÓõÄcalcCodeµÄµØÖ·£¬ÕâʱµÄÖµÊÇ00A730C8£¬ÓÐÒâ˼£¬Õâ¸öµØÖ·¾ÍÖ¸Ïò±¾½á¹¹ÄÚ¡£
00A730C8 B8 70 30 A7 00 89 ED E9
ÕâÆäʵÊÇÒ»¶Î·´»ã±à´úÂ룬ÎÒÃÇ¿´Ò»ÏÂËüµÄasmÖ¸Áî¡£
00A730C8 B8 7030A700 mov eax,0A73070
00A730CD 89ED mov ebp,ebp
00A730CF - E9 38EE91FF jmp 00391F0C
00A730D4 B8 7830A700 mov eax,0A73078
00A730D9 89ED mov ebp,ebp
00A730DB - E9 2CEE91FF jmp 00391F0C
¾ÍÊÇÒ»¸öÌøת¡£Ìøתµ½00391F0C´¦µÄÄÚÈÝÊÇ£º
00391F0C 50 push eax
00391F0D 52 push edx
00391F0E 68 A01BE779 push 79E71BA0
00391F13 55 push ebp
00391F14 53 push ebx
00391F15 56 push esi
00391F16 57 push edi
00391F17 8D7424 10 lea esi,dword ptr ss:[esp+10]
00391F1B FF76 0C push dword ptr ds:[esi+C]
00391F1E 55 push ebp
00391F1F 89E5 mov ebp,esp
00391F21 51 push ecx
00391F22 52 push edx
00391F23 64:8B1D 380E000>mov ebx,dword ptr fs:[E38]
00391F2A 8B7B 0C mov edi,dword ptr ds:[ebx+C]
00391F2D 897E 04 mov dword ptr ds:[esi+4],edi
00391F30 8973 0C mov dword ptr ds:[ebx+C],esi
00391F33 68 7CC52A05 push 52AC57C
00391F38 56 push esi
00391F39 E8 8C9BAE79 call mscorwks.79E7BACA
00391F3E 897B 0C mov dword ptr ds:[ebx+C],edi
00391F41 8B4E 08 mov ecx,dword ptr ds:[esi+8]
00391F44 8946 08 mov dword ptr ds:[esi+8],eax
00391F47 8BC1 mov eax,ecx
00391F49 83C4 04 add esp,4
00391F4C 5A pop edx
00391F4D 59 pop ecx
00391F4E 89EC mov esp,ebp
00391F50 5D pop ebp
00391F51 83C4 04 add esp,4
00391F54 5F pop edi
00391F55 5E pop esi
00391F56 5B pop ebx
00391F57 5D pop ebp
00391F58 83C4 08 add esp,8
00391F5B C3 retn
ºÃ£¬ÏÂÃæÎÒÃÇÈôúÂë¶ÔcalcClass½øÐгõʼ»¯£¬ÔÙ¿´refrence´¦µÄÄÚÈÝ£¨Ö´Ðе½×îºóµÄretn´¦Í£×¡£©£º
00A73080 00 00 04 00 0C 00 00 00 02 04 06 00 04 00 00 00 .. ..... . ...
00A73090 18 9C 0F 79 14 2C A7 00 C0 30 A7 00 58 13 A7 00 ?y ,???X ?
00A730A0 00 00 00 00 00 00 00 00 EC 4B 35 79 C0 39 35 79 ........ìK5y?5y
00A730B0 B0 39 35 79 C0 A4 34 79 D0 00 DA 00 D4 30 A7 00 ?5yÀ¤4y????
00A730C0 80 00 00 00 00 00 00 00 B8 70 30 A7 00 89 ED E9 €.......¸p0?‰í
00A730D0 38 EE 91 FF B8 78 30 A7 00 89 ED E9 2C EE 91 FF 8î‘ÿ¸x0?‰í?î‘ÿ
00A730E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
×¢Ò⣬00A730B8´¦µÄÄÚÈÝÒѾ¸Ä±ä£¬ÕâÕýÊÇcalcCodeµÄ±¾µØ´úÂëµØÖ·¡£
°ÑÕû¸ö¹ý³ÌС½áһϡ£ÔÚµÚÒ»´Îµ÷Óû¹Ã»ÓнøÐÐJITµÄ·½·¨Ê±£¬VTableµÄµØÖ·×ÜÊÇÖ¸ÏòÒ»¸öprework£¬Ëü»áµ÷ÓÃmscorwks£¬¼Ì¶øÊÇJITÒýÇ棬¶Ô¸Ã·½·¨½øÐбàÒë¡£±àÒëÍêºóµÄµØÖ·´úÂëµØÖ·±»Ö±½ÓдÈë·½·¨±íÖУ¬ÕâÑùÏ´ÎÔÙµ÷Óø÷½·¨¾ÍÊÇÖ±½ÓÌøתµ½¸ÃµØÖ·£¬¶ø²»ÓÃÔٴνøÐбàÒë¡£CLRÖеķ½·¨µ÷Óôó¶àÊýÊÇ__fastcallÐÎʽ£¬ÀûÓüĴæÆ÷À´´«µÝ²ÎÊý¡£¶øÄÚÁª£¬ÔÚ.NETÖÐÓÉJITÒýÇæÔÚ¶¯Ì¬±àÒëʱ×ÔÐоö¶¨µÄ¡£
±¾ÎÄÀûÓÃOllyDbg¶Ô.NETÏ·½·¨µÄµ÷ÓúÍJIT½øÐÐһЩ¸ú×Ù£¬ÆäÖÐÌáµ½µÄһЩÖжϵÄλÖúͼ¼ÇɶÔCrack FansÃÇÊǺÜÓÐÓõģ¬¶øÁ˽â.NETÄÚ²¿µÄһЩÔËÐлúÖÆ£¬Ò²»á¶ÔÎÒÃǵÄÄæÏò¹ý³ÌÓÐËù°ïÖú¡£