ReadInt 함수 분석 1 <test.first>
사용한 툴: x64/x32dbg , Visual Studio 2017
1. call <test.ReadInt> 들어가기
2. call <test.first> 들어가기
3. cmp byte ptr ds:[<cmpZero>],0
=> 0과 비교
-> jne 후 ZE=1 / 들어온 값이 0임을 알 수 있음.
(jne : 0이 아니거나 같지 않을때 점프)
** 그래프로 보기 **
4. jne후
-> 점프하지 않고call <test.getHandle> 로 넘어감
5. call <test.ReadConsoleA> -> readconsole() 검색
-> 스택은 역순이므로, 거꾸로 한줄씩 대응
여기에서,
inputhandle 이 hConsoleInput
push edx 가 lpbuffer
push ecx 가 nNumberofchastoread
이므로 레이블로 알아보기 쉽게 lpNumberof CharsRead 지정
~ 값 입력은 함수 분석 2에서 ~
'System & Reversing > 실습' 카테고리의 다른 글
ReadInt 함수 분석 3 <test.second> (0) | 2019.02.15 |
---|---|
ReadInt 함수 분석 2 <test.first> (0) | 2019.02.15 |