티스토리 뷰
조건문
int Temp(int a) {
int b = 1;
if (a == 1) {
a++;
}
else {
b++;
}
return b;
}
int main(int argc, char* argv[]) {
Temp(1);
}
VS_disassemble
Olly
반복문
int loop(int c) {
int d = 0;
for (int i = 0; i <= 0x100; i++) {
if (i == c)
break;
printf("loop : %d\n", d);
d++;
}
return c + d;
}
int main(int argc, char* argv[]) {
loop(5);
}
int loop(int c) {
00413E10 push ebp
00413E11 mov ebp,esp
00413E13 sub esp,0D8h
00413E19 push ebx
00413E1A push esi
00413E1B push edi
00413E1C lea edi,[ebp-0D8h]
00413E22 mov ecx,36h
00413E27 mov eax,0CCCCCCCCh
00413E2C rep stos dword ptr es:[edi]
00413E2E mov ecx,offset _73F1974C_testconsole@cpp (041C003h)
00413E33 call @__CheckForDebuggerJustMyCode@4 (0411212h)
int d = 0;
00413E38 mov dword ptr [d],0
for (int i = 0; i <= 0x100; i++) {
00413E3F mov dword ptr [ebp-14h],0
00413E46 jmp loop+41h (0413E51h)
00413E48 mov eax,dword ptr [ebp-14h]
00413E4B add eax,1
00413E4E mov dword ptr [ebp-14h],eax
00413E51 cmp dword ptr [ebp-14h],100h
00413E58 jg loop+70h (0413E80h)
if (i == c)
00413E5A mov eax,dword ptr [ebp-14h]
00413E5D cmp eax,dword ptr [c]
00413E60 jne loop+54h (0413E64h)
break;
00413E62 jmp loop+70h (0413E80h)
printf("loop : %d\n", d);
00413E64 mov eax,dword ptr [d]
00413E67 push eax
00413E68 push offset string "loop : %d\n" (0417B30h)
00413E6D call _printf (041104Bh)
00413E72 add esp,8
d++;
00413E75 mov eax,dword ptr [d]
00413E78 add eax,1
00413E7B mov dword ptr [d],eax
}
00413E7E jmp loop+38h (0413E48h)
return c + d;
00413E80 mov eax,dword ptr [c]
00413E83 add eax,dword ptr [d]
}
00413E86 pop edi
00413E87 pop esi
00413E88 pop ebx
00413E89 add esp,0D8h
00413E8F cmp ebp,esp
00413E91 call __RTC_CheckEsp (041121Ch)
00413E96 mov esp,ebp
00413E98 pop ebp
00413E99 ret
'Security&Hacking > Reversing' 카테고리의 다른 글
Reversing) abex crackme #3 (0) | 2019.09.11 |
---|---|
Reversing) abex crackme #2 (0) | 2019.09.11 |
Reversing) CrackMe.exe v1.0 (Cruehead/MiB) (0) | 2019.09.11 |
Reversing) FSC_Level 1 (0) | 2019.09.11 |
Reversing) abex crackme #1 (0) | 2019.09.11 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 우아한 테크코스
- dfs
- Algorithm
- Java
- sort
- git
- JPA
- javascript
- Stack
- Data Structure
- brute-force
- webhacking.kr
- reversing
- 리버싱
- mysql
- 프로그래머스
- Android
- graph
- Vo
- 해외여행
- Android Studio
- C
- 회고
- 웹해킹
- socket
- FRAGMENT
- queue
- 개발자
- OneToMany
- bfs
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
글 보관함