diff --git a/subjects/PE/x86/SmallBinaries/strcpyEcxChain.bin b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.bin new file mode 100644 index 0000000000..c8367e198c Binary files /dev/null and b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.bin differ diff --git a/subjects/PE/x86/SmallBinaries/strcpyEcxChain.dcproject b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.dcproject new file mode 100644 index 0000000000..c8e97439c8 --- /dev/null +++ b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.dcproject @@ -0,0 +1,23 @@ + + + x86-protected-32 + + strcpyEcxChain.bin + strcpyEcxChain.reko + strcpyEcxChain.reko + strcpyEcxChain.reko + strcpyEcxChain.reko\resources + +
12340000
+ raw + + + +
12340000
+
+ + false + Segment +
+ +
\ No newline at end of file diff --git a/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.asm b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.asm new file mode 100644 index 0000000000..372aea2f07 --- /dev/null +++ b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.asm @@ -0,0 +1,22 @@ +;;; Segment code (12340000) + +;; fn12340000: 12340000 +fn12340000 proc + mov edi,ecx + mov edx,12340034h + or ecx,0FFh + xor eax,eax + repne scasb + not ecx + sub edi,ecx + mov esi,edi + mov eax,ecx + mov edi,edx + shr ecx,2h + rep movsd + mov ecx,eax + and ecx,3h + rep movsb + ret +12340025 CC CC CC CC CC CC CC CC CC CC CC ........... +12340030 73 31 00 00 73 32 s1..s2 diff --git a/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.c b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.c new file mode 100644 index 0000000000..80db80d475 --- /dev/null +++ b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.c @@ -0,0 +1,17 @@ +// strcpyEcxChain_code.c +// Generated by decompiling strcpyEcxChain.bin +// using Reko decompiler version 0.11.4.0. + +#include "strcpyEcxChain.h" + +// 12340000: void fn12340000(Register (ptr32 char) ecx) +void fn12340000(char * ecx) +{ + Eq_n size_n = strlen(ecx) + 1; + word32 edi_n = ecx + size_n - size_n; + Eq_n size_n = (size_n >> 0x02) * 0x04; + memcpy(&g_t12340034, edi_n, size_n); + memcpy((word32) size_n + 0x12340034, edi_n + size_n, size_n & 0x03); +} + +Eq_n g_t12340034 = // 12340034; diff --git a/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.dis b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.dis new file mode 100644 index 0000000000..8dcab208e3 --- /dev/null +++ b/subjects/PE/x86/SmallBinaries/strcpyEcxChain.reko/strcpyEcxChain_code.dis @@ -0,0 +1,18 @@ +void fn12340000(word32 ecx) +// stackDelta: 0; fpuStackDelta: 0; fpuMaxParam: -1 + +// MayUse: ecx:[0..31] +// LiveOut: +// Trashed: SCZO eax ecx edi edx esi +// Preserved: esp +fn12340000_entry: +l12340000: + word32 size_8 = strlen(ecx) + 1 + word32 edi_12 = ecx + size_8 - size_8 + word32 size_17 = (size_8 >>u 2<32>) *u 4<32> + memcpy(0x12340034<32>, edi_12, size_17) + memcpy(size_17 + 0x12340034<32>, edi_12 + size_17, size_8 & 3<32>) + return +fn12340000_exit: + +