Skip to content

Instantly share code, notes, and snippets.

@GrabYourPitchforks
Created January 26, 2018 01:47
Show Gist options
  • Save GrabYourPitchforks/be6c706eb64b6c2cbe940f5063b04af2 to your computer and use it in GitHub Desktop.
Save GrabYourPitchforks/be6c706eb64b6c2cbe940f5063b04af2 to your computer and use it in GitHub Desktop.
; System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32):
53b9caec 55 push ebp
53b9caed 8bec mov ebp,esp
53b9caef 57 push edi
53b9caf0 56 push esi
53b9caf1 53 push ebx
53b9caf2 8b550c mov edx,dword ptr [ebp+0Ch]
53b9caf5 2b5508 sub edx,dword ptr [ebp+8]
53b9caf8 8b4508 mov eax,dword ptr [ebp+8]
53b9cafb 2b450c sub eax,dword ptr [ebp+0Ch]
53b9cafe 3bd1 cmp edx,ecx
53b9cb00 0f8253010000 jb System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x16d (53b9cc59)
53b9cb06 3bc1 cmp eax,ecx
53b9cb08 0f824b010000 jb System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x16d (53b9cc59)
53b9cb0e 8bd1 mov edx,ecx
53b9cb10 035508 add edx,dword ptr [ebp+8]
53b9cb13 8bc1 mov eax,ecx
53b9cb15 03450c add eax,dword ptr [ebp+0Ch]
53b9cb18 83f910 cmp ecx,10h
53b9cb1b 765c jbe System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x8d (53b9cb79)
53b9cb1d 83f940 cmp ecx,40h
53b9cb20 0f87c7000000 ja System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x101 (53b9cbed)
53b9cb26 8b7508 mov esi,dword ptr [ebp+8]
53b9cb29 8b7d0c mov edi,dword ptr [ebp+0Ch]
53b9cb2c f30f6f06 movdqu xmm0,xmmword ptr [esi]
53b9cb30 f30f7f07 movdqu xmmword ptr [edi],xmm0
53b9cb34 83f920 cmp ecx,20h
53b9cb37 762d jbe System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x7a (53b9cb66)
53b9cb39 8b750c mov esi,dword ptr [ebp+0Ch]
53b9cb3c 83c610 add esi,10h
53b9cb3f 8b7d08 mov edi,dword ptr [ebp+8]
53b9cb42 83c710 add edi,10h
53b9cb45 f30f6f07 movdqu xmm0,xmmword ptr [edi]
53b9cb49 f30f7f06 movdqu xmmword ptr [esi],xmm0
53b9cb4d 83f930 cmp ecx,30h
53b9cb50 7614 jbe System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x7a (53b9cb66)
53b9cb52 8b4d0c mov ecx,dword ptr [ebp+0Ch]
53b9cb55 83c120 add ecx,20h
53b9cb58 8b7508 mov esi,dword ptr [ebp+8]
53b9cb5b 83c620 add esi,20h
53b9cb5e f30f6f06 movdqu xmm0,xmmword ptr [esi]
53b9cb62 f30f7f01 movdqu xmmword ptr [ecx],xmm0
53b9cb66 83c0f0 add eax,0FFFFFFF0h
53b9cb69 83c2f0 add edx,0FFFFFFF0h
53b9cb6c f30f6f02 movdqu xmm0,xmmword ptr [edx]
53b9cb70 f30f7f00 movdqu xmmword ptr [eax],xmm0
53b9cb74 e9f4000000 jmp System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cb79 f6c118 test cl,18h
53b9cb7c 742d je System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0xbf (53b9cbab)
53b9cb7e 8b4d08 mov ecx,dword ptr [ebp+8]
53b9cb81 8b09 mov ecx,dword ptr [ecx]
53b9cb83 8b750c mov esi,dword ptr [ebp+0Ch]
53b9cb86 890e mov dword ptr [esi],ecx
53b9cb88 8b4d0c mov ecx,dword ptr [ebp+0Ch]
53b9cb8b 83c104 add ecx,4
53b9cb8e 8b7508 mov esi,dword ptr [ebp+8]
53b9cb91 8b7604 mov esi,dword ptr [esi+4]
53b9cb94 8931 mov dword ptr [ecx],esi
53b9cb96 8d48f8 lea ecx,[eax-8]
53b9cb99 8b72f8 mov esi,dword ptr [edx-8]
53b9cb9c 8931 mov dword ptr [ecx],esi
53b9cb9e 83c0fc add eax,0FFFFFFFCh
53b9cba1 8b52fc mov edx,dword ptr [edx-4]
53b9cba4 8910 mov dword ptr [eax],edx
53b9cba6 e9c2000000 jmp System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cbab f6c104 test cl,4
53b9cbae 7417 je System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0xdb (53b9cbc7)
53b9cbb0 8b4d08 mov ecx,dword ptr [ebp+8]
53b9cbb3 8b09 mov ecx,dword ptr [ecx]
53b9cbb5 8b750c mov esi,dword ptr [ebp+0Ch]
53b9cbb8 890e mov dword ptr [esi],ecx
53b9cbba 83c0fc add eax,0FFFFFFFCh
53b9cbbd 8b52fc mov edx,dword ptr [edx-4]
53b9cbc0 8910 mov dword ptr [eax],edx
53b9cbc2 e9a6000000 jmp System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cbc7 85c9 test ecx,ecx
53b9cbc9 0f849e000000 je System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cbcf 8b7508 mov esi,dword ptr [ebp+8]
53b9cbd2 89750c mov dword ptr [ebp+0Ch],esi
53b9cbd5 f6c102 test cl,2
53b9cbd8 0f848f000000 je System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cbde 8d48fe lea ecx,[eax-2]
53b9cbe1 0fbf42fe movsx eax,word ptr [edx-2]
53b9cbe5 668901 mov word ptr [ecx],ax
53b9cbe8 e980000000 jmp System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cbed 81f900080000 cmp ecx,800h
53b9cbf3 776c ja System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x175 (53b9cc61)
53b9cbf5 8bf1 mov esi,ecx
53b9cbf7 c1ee06 shr esi,6
53b9cbfa 8b7d08 mov edi,dword ptr [ebp+8]
53b9cbfd 8b5d0c mov ebx,dword ptr [ebp+0Ch]
53b9cc00 f30f6f07 movdqu xmm0,xmmword ptr [edi]
53b9cc04 f30f7f03 movdqu xmmword ptr [ebx],xmm0
53b9cc08 f30f6f4710 movdqu xmm0,xmmword ptr [edi+10h]
53b9cc0d f30f7f4310 movdqu xmmword ptr [ebx+10h],xmm0
53b9cc12 f30f6f4720 movdqu xmm0,xmmword ptr [edi+20h]
53b9cc17 f30f7f4320 movdqu xmmword ptr [ebx+20h],xmm0
53b9cc1c f30f6f4730 movdqu xmm0,xmmword ptr [edi+30h]
53b9cc21 f30f7f4330 movdqu xmmword ptr [ebx+30h],xmm0
53b9cc26 8b7d0c mov edi,dword ptr [ebp+0Ch]
53b9cc29 83c740 add edi,40h
53b9cc2c 897d0c mov dword ptr [ebp+0Ch],edi
53b9cc2f 8b7d08 mov edi,dword ptr [ebp+8]
53b9cc32 83c740 add edi,40h
53b9cc35 897d08 mov dword ptr [ebp+8],edi
53b9cc38 4e dec esi
53b9cc39 85f6 test esi,esi
53b9cc3b 75bd jne System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x10e (53b9cbfa)
53b9cc3d 83e13f and ecx,3Fh
53b9cc40 83f910 cmp ecx,10h
53b9cc43 0f87ddfeffff ja System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x3a (53b9cb26)
53b9cc49 8d48f0 lea ecx,[eax-10h]
53b9cc4c 83c2f0 add edx,0FFFFFFF0h
53b9cc4f f30f6f02 movdqu xmm0,xmmword ptr [edx]
53b9cc53 f30f7f01 movdqu xmmword ptr [ecx],xmm0
53b9cc57 eb14 jmp System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cc59 8b550c mov edx,dword ptr [ebp+0Ch]
53b9cc5c 3b5508 cmp edx,dword ptr [ebp+8]
53b9cc5f 740c je System_Private_CoreLib!System.Buffer.Memmove(System.ByReference`1<Byte>, System.ByReference`1<Byte>, UInt32)+0x181 (53b9cc6d)
53b9cc61 51 push ecx
53b9cc62 8b4d0c mov ecx,dword ptr [ebp+0Ch]
53b9cc65 8b5508 mov edx,dword ptr [ebp+8]
53b9cc68 e873000000 call System_Private_CoreLib!System.Buffer._Memmove(Byte ByRef, Byte ByRef, UInt32) (53b9cce0)
53b9cc6d 5b pop ebx
53b9cc6e 5e pop esi
53b9cc6f 5f pop edi
53b9cc70 5d pop ebp
53b9cc71 c20800 ret 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment