Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8548155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:25:45+00:00 2026-06-11T13:25:45+00:00

This was disassembled from a x86 exe that was (probably) created with MSVC. Any

  • 0

This was disassembled from a x86 exe that was (probably) created with MSVC.
Any reason for these loops or are they just bloat?

00428D08   |> B9 02000000    MOV ECX,2
00428D0D   |> 33C0           /XOR EAX,EAX
00428D0F   |> 8BF0           |/MOV ESI,EAX
00428D11   |. 48             ||DEC EAX
00428D12   |. 83F8 E9        ||CMP EAX,-17
00428D15   |.^7F F8          |\JG SHORT File.00428D0F
00428D17   |. 49             |DEC ECX
00428D18   |.^75 F3          \JNZ SHORT File.00428D0D

ESI is later on used in a sort of jump table, but this seems to me like an overly complicated way to set ESI twice

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:25:46+00:00Added an answer on June 11, 2026 at 1:25 pm

    If there are no additional entry points and no self-modifying code, there is one unique way how the code can be walked through:

    mov ecx,2              ; ecx = 2
    xor eax,eax            ; eax = 0, ecx = 2, SF = 0, ZF = 0
    mov esi,eax            ; eax = 0, ecx = 2, esi = 0, no changes to flags
    dec eax                ; eax = 0xFFFFFFFF, ecx = 2, esi = 0, SF = 1, ZF = 0
    cmp eax,-17            ; OF = 0, SF = 1, ZF = 0
    jg SHORT File.00428D0F ; jump if (SF==OF and ZF==0) -> jump.
    

    mov esi, eax ; eax = 0xFFFFFFFF, ecx = 2, esi = 0xFFFFFFFF
    …
    After 16 inner loops the situation is the following:

    mov esi,eax            ; eax = -16, ecx = 2, esi = -16
    dec eax                ; eax = -17, ecx = 2, esi = -16, SF = 1, ZF = 0
    cmp eax,-17            ; OF = 0, SF = 0, ZF = 1
    jg SHORT File.00428D0F ; jump if (SF==OF and ZF==0) -> no jump.
    dec ecx                ; eax = -17, esi = -16, ecx = 1, SF = 0, ZF = 0
    

    The outer loop is trivial. If it is certain that there are no other entry points except 00428D08 (the start of this code, mov ecx,2), that is code is not modified from somewhere else and that this code is not used as data, the code can be replaced with:

    If flags’ values are used after the end of this code:

    mov eax,-17
    cmp eax,-17
    mov ecx,1
    dec ecx
    mov esi,-16
    

    If flags’ values are not important:

    mov eax,-17
    mov ecx,0
    mov esi,-16
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I disassembled certain binary file(Linux elf). And I found this code : movsl %ds:(%esi),%es:(%edi)
I noticed this interesting use of the this keyword while viewing the disassembled code
I am looking at some disassembled code obtained from Java bytecode. I see some
I am reading from a thread local variable in my code like this, //
In this example of x86_64 hex/disassembled code I see: 48B80000000000000000 mov rax, 0x0 Signed
I disassembled the code resulting from compiling the very simple source file test.c, which
I disassembled a DLL and see there some functions. I found the function that
I got a couple of licence keys from third-party vendor, these keys are authorized
this is my first question in here, and I would like to ask if
This question is directly related to this SO question I posed about 15 minutes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.