PEid plug-in-Principle Analysis of Generic OEP Finder

Source: Internet
Author: User

This small plug-in of PEid has been used for a long time, and has always felt that the function is good and the accuracy is quite high. I tried to avoid it during shell writing, but it has never been successful, so after taking some time to look at its implementation principles, I suddenly realized it.
Below are the first-level output functions of this plug-in:

10001870; Exported entry 1. DoMyJob
10001870
10001870; * ************ s u B r o u t I N E **************** *************************
10001870
10001870
10001870 public DoMyJob
10001870 DoMyJob proc near
10001870
10001870 hWnd = dword ptr 4
10001870 arg_4 = dword ptr 8
10001870 arg_8 = dword ptr 0Ch
10001870
10001870 mov eax, [esp + arg_8]
10001874 push ebx
10001875 push esi
10001876 cmp eax, 50456944 h
1000187B push edi
1000187C jz short loc_10001889
1000187E cmp eax, 5852445Ah
10001883 jnz loc_10001A81
10001889
10001889 loc_10001889 :;...
10001889 mov ebx, [esp + 0Ch + arg_4]
1000188D or ecx, 0 FFFFFFFFh
10001890 mov edi, ebx
10001892 xor eax, eax
10001894 repne scasb
10001896 not ecx
10001898 dec ecx
10001899 cmp ecx, 1
1000189C jnb short loc_100018BE
1000189E mov eax, [esp + 0Ch + hWnd]
100018A2 push 40000 h; uType
100018A7 push offset szError; lpCaption
100018AC push offset szNoFileSpecifie; lpText
100018B1 push eax; hWnd
100018B2 call ds: MessageBoxA
100018B8 pop edi
100018B9 pop esi
100018BA xor eax, eax
100018BC pop ebx
100018BD retn
100018BE ;----------------------------------------------------------------------------
100018BE
100018BE loc_100018BE :;...
100018BE push 0; hTemplateFile
100018C0 push 80 h; dwFlagsAndAttributes
100018C5 push 3

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.