C300_018
C300_소스코드
1 2 3 4 5 6 7 8 9 10 | #include <stdio.h> main() { int x = +4; int y = -2; printf( " x + (-y) = %d \n", x + (-y) ); printf( "-x + (+y) = %d \n", -x + (+y) ); } | cs |
IDA - Layout Graph
IDA - Text View
neg 명령어는 부호를 바꾸는 명령어이다.
pseudo code - 의사 코드
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include <stdio.h> main() { int x; int y; x = 4; y = -2; eax = y eax = -eax; eax = eax + x printf(_Format, eax); ecx = x; ecx = -ecx; ecx = ecx + y; printf(aXYD_0, ecx); eax = 0; } | cs |
pseudo code - 의사코드
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <stdio.h> main() { int x; int y; x = 4; y = -2; printf(_Format, x - y); printf(aXYD_0, -x + y); } | cs |
'Reversing > ASM to C' 카테고리의 다른 글
ASM to C with IDA - 020 (0) | 2018.05.30 |
---|---|
ASM to C with IDA - 019 (0) | 2018.05.29 |
ASM to C with IDA - 017 (0) | 2018.05.29 |
ASM to C with IDA - 016 (0) | 2018.05.28 |
ASM to C with IDA - 015 (0) | 2018.05.28 |