Assembly program which detects all numbers with two integral divisors
mov ecx, 0    ; Counts how many division have 



This begs for an optimization in the form xor ecx, ecx. This will clear ECX just the same, is shorter and faster.




cmp edx, 0
jne prepareInnerIteration
inc ecx



Another optimization this time on compairing. To compare with zero, you can equally test the value with itself. So writing test edx, edx. This shortens the program.




goToNextIteration:
  cmp  esi, edi
  jl   outerLoop



Your code performs 1 iteration too many! Consider EDI=30 then this code will jump back to outerLoop when ESI=29, but there it will instantely be incremented to ESI=30 and so the code will superfluously process the case where the control variable = upper limit.




cmp  esi, 6            ; In case no number was given. Just a blank.
je   goToNextIteration



I don't see how this comment relates to the control variable being 6.
It just by-passes the output, which is wrong because the number 6 fulfills the conditions.



What I miss is a test for any user input smaller than 6

  call read_hex ; Reads in a hexadecimal number from stdin.
  cmp  eax, 6
  jl   ExitProg
  ...
ExitProg:
  push 0
  call [ExitProcess]





; ------ Usage example ----------------------
; The first "f" is the number n which was entered by the user.

; C:\Users\michael\Desktop\fasmProgs&gt;divisors
; f
; 6
; 8
; a
; e
; f 
; ------------------------------------------



This is a misleading comment! Since the premise states that the results are to be below the inputted number, the line ; f conflicts in the usage example given.