Skip to content

Instantly share code, notes, and snippets.

@GrabYourPitchforks
Created January 26, 2018 01:47
Show Gist options
  • Save GrabYourPitchforks/02173333d4e0cef1e8253db44b34c4b7 to your computer and use it in GitHub Desktop.
Save GrabYourPitchforks/02173333d4e0cef1e8253db44b34c4b7 to your computer and use it in GitHub Desktop.
; System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32):
53c15f10 55 push ebp
53c15f11 8bec mov ebp,esp
53c15f13 57 push edi
53c15f14 56 push esi
53c15f15 53 push ebx
53c15f16 83ec08 sub esp,8
53c15f19 8b4508 mov eax,dword ptr [ebp+8]
53c15f1c 8bf1 mov esi,ecx
53c15f1e 2bf2 sub esi,edx
53c15f20 3bf0 cmp esi,eax
53c15f22 0f8218010000 jb System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x130 (53c16040)
53c15f28 8bf2 mov esi,edx
53c15f2a 2bf1 sub esi,ecx
53c15f2c 3bf0 cmp esi,eax
53c15f2e 0f820c010000 jb System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x130 (53c16040)
53c15f34 8d3402 lea esi,[edx+eax]
53c15f37 8d3c01 lea edi,[ecx+eax]
53c15f3a 897df0 mov dword ptr [ebp-10h],edi
53c15f3d 83f810 cmp eax,10h
53c15f40 7653 jbe System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x85 (53c15f95)
53c15f42 83f840 cmp eax,40h
53c15f45 0f8799000000 ja System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0xd4 (53c15fe4)
53c15f4b f30f6f02 movdqu xmm0,xmmword ptr [edx]
53c15f4f f30f7f01 movdqu xmmword ptr [ecx],xmm0
53c15f53 83f820 cmp eax,20h
53c15f56 7627 jbe System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x6f (53c15f7f)
53c15f58 8d5a10 lea ebx,[edx+10h]
53c15f5b 895dec mov dword ptr [ebp-14h],ebx
53c15f5e 8d5910 lea ebx,[ecx+10h]
53c15f61 8b7dec mov edi,dword ptr [ebp-14h]
53c15f64 f30f6f07 movdqu xmm0,xmmword ptr [edi]
53c15f68 f30f7f03 movdqu xmmword ptr [ebx],xmm0
53c15f6c 83f830 cmp eax,30h
53c15f6f 760e jbe System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x6f (53c15f7f)
53c15f71 8d4220 lea eax,[edx+20h]
53c15f74 8d5120 lea edx,[ecx+20h]
53c15f77 f30f6f00 movdqu xmm0,xmmword ptr [eax]
53c15f7b f30f7f02 movdqu xmmword ptr [edx],xmm0
53c15f7f 8d4ef0 lea ecx,[esi-10h]
53c15f82 8b7df0 mov edi,dword ptr [ebp-10h]
53c15f85 8d57f0 lea edx,[edi-10h]
53c15f88 f30f6f01 movdqu xmm0,xmmword ptr [ecx]
53c15f8c f30f7f02 movdqu xmmword ptr [edx],xmm0
53c15f90 e9b1000000 jmp System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x136 (53c16046)
53c15f95 a818 test al,18h
53c15f97 741e je System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0xa7 (53c15fb7)
53c15f99 8b02 mov eax,dword ptr [edx]
53c15f9b 8901 mov dword ptr [ecx],eax
53c15f9d 8b5204 mov edx,dword ptr [edx+4]
53c15fa0 895104 mov dword ptr [ecx+4],edx
53c15fa3 8b4ef8 mov ecx,dword ptr [esi-8]
53c15fa6 8b7df0 mov edi,dword ptr [ebp-10h]
53c15fa9 894ff8 mov dword ptr [edi-8],ecx
53c15fac 8b4efc mov ecx,dword ptr [esi-4]
53c15faf 894ffc mov dword ptr [edi-4],ecx
53c15fb2 e98f000000 jmp System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x136 (53c16046)
53c15fb7 a804 test al,4
53c15fb9 740f je System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0xba (53c15fca)
53c15fbb 8b02 mov eax,dword ptr [edx]
53c15fbd 8901 mov dword ptr [ecx],eax
53c15fbf 8b56fc mov edx,dword ptr [esi-4]
53c15fc2 8b7df0 mov edi,dword ptr [ebp-10h]
53c15fc5 8957fc mov dword ptr [edi-4],edx
53c15fc8 eb7c jmp System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x136 (53c16046)
53c15fca 85c0 test eax,eax
53c15fcc 7478 je System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x136 (53c16046)
53c15fce 0fb612 movzx edx,byte ptr [edx]
53c15fd1 8811 mov byte ptr [ecx],dl
53c15fd3 a802 test al,2
53c15fd5 746f je System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x136 (53c16046)
53c15fd7 0fbf46fe movsx eax,word ptr [esi-2]
53c15fdb 8b7df0 mov edi,dword ptr [ebp-10h]
53c15fde 668947fe mov word ptr [edi-2],ax
53c15fe2 eb62 jmp System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x136 (53c16046)
53c15fe4 3d00080000 cmp eax,800h
53c15fe9 7755 ja System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x130 (53c16040)
53c15feb 8bd8 mov ebx,eax
53c15fed c1eb06 shr ebx,6
53c15ff0 f30f6f02 movdqu xmm0,xmmword ptr [edx]
53c15ff4 f30f7f01 movdqu xmmword ptr [ecx],xmm0
53c15ff8 f30f6f4210 movdqu xmm0,xmmword ptr [edx+10h]
53c15ffd f30f7f4110 movdqu xmmword ptr [ecx+10h],xmm0
53c16002 f30f6f4220 movdqu xmm0,xmmword ptr [edx+20h]
53c16007 f30f7f4120 movdqu xmmword ptr [ecx+20h],xmm0
53c1600c f30f6f4230 movdqu xmm0,xmmword ptr [edx+30h]
53c16011 f30f7f4130 movdqu xmmword ptr [ecx+30h],xmm0
53c16016 83c140 add ecx,40h
53c16019 83c240 add edx,40h
53c1601c 4b dec ebx
53c1601d 85db test ebx,ebx
53c1601f 75cf jne System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0xe0 (53c15ff0)
53c16021 83e03f and eax,3Fh
53c16024 83f810 cmp eax,10h
53c16027 0f871effffff ja System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x3b (53c15f4b)
53c1602d 83c6f0 add esi,0FFFFFFF0h
53c16030 8b7df0 mov edi,dword ptr [ebp-10h]
53c16033 83c7f0 add edi,0FFFFFFF0h
53c16036 f30f6f06 movdqu xmm0,xmmword ptr [esi]
53c1603a f30f7f07 movdqu xmmword ptr [edi],xmm0
53c1603e eb06 jmp System_Private_CoreLib!System.Buffer.Memmove(Byte*, Byte*, UInt32)+0x136 (53c16046)
53c16040 50 push eax
53c16041 e80a000000 call System_Private_CoreLib!System.Buffer._Memmove(Byte*, Byte*, UInt32) (53c16050)
53c16046 8d65f4 lea esp,[ebp-0Ch]
53c16049 5b pop ebx
53c1604a 5e pop esi
53c1604b 5f pop edi
53c1604c 5d pop ebp
53c1604d c20400 ret 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment