as Boozy says. the argc are getting dividing by 2 in _start lable exactly at "10e1: d0 e8 shr al, 1" which means shift al by 1 or in another word dividing by 2. so to solve the issue you need to pass the five or six parameters which will be later dividing by two to be 3 before pass to main function. or you just simply change "d0 e8" from the argc binary in line "10e1" or "10e0" to "04 00" which mean add al, 0 this just overrid the shifting logic and do logic that do nothing. so by that we can now run ./argc 1 1 and it will work just fine. i hope you find my explaining usefull. |
==> |