Skip to content

Instantly share code, notes, and snippets.

@task4233
Last active January 26, 2021 04:25
Show Gist options
  • Save task4233/83275adda24dc444b2f9c6949f32a056 to your computer and use it in GitHub Desktop.
Save task4233/83275adda24dc444b2f9c6949f32a056 to your computer and use it in GitHub Desktop.
実行結果まとめ
0x0000051d <+0>: lea ecx,[esp+0x4]
0x00000521 <+4>: and esp,0xfffffff0
0x00000524 <+7>: push DWORD PTR [ecx-0x4]
0x00000527 <+10>: push ebp
0x00000528 <+11>: mov ebp,esp
0x0000052a <+13>: push ebx
0x0000052b <+14>: push ecx
0x0000052c <+15>: sub esp,0x10
0x0000052f <+18>: call 0x420 <__x86.get_pc_thunk.bx>
0x00000534 <+23>: add ebx,0x1aa4
0x0000053a <+29>: mov DWORD PTR [ebp-0x10],0x0
0x00000541 <+36>: mov DWORD PTR [ebp-0xc],0x1
0x00000548 <+43>: cmp DWORD PTR [ebp-0x10],0x0
0x0000054c <+47>: je 0x58e <main+113>
0x0000054e <+49>: sub esp,0xc
0x00000551 <+52>: lea eax,[ebx-0x18f8]
0x00000557 <+58>: push eax
0x00000558 <+59>: call 0x3b0 <puts@plt>
0x0000055d <+64>: add esp,0x10
0x00000560 <+67>: cmp DWORD PTR [ebp-0xc],0x0
0x00000564 <+71>: je 0x57a <main+93>
0x00000566 <+73>: sub esp,0xc
0x00000569 <+76>: lea eax,[ebx-0x18f3]
0x0000056f <+82>: push eax
0x00000570 <+83>: call 0x3b0 <puts@plt>
0x00000575 <+88>: add esp,0x10
0x00000578 <+91>: jmp 0x5cc <main+175>
0x0000057a <+93>: sub esp,0xc
0x0000057d <+96>: lea eax,[ebx-0x18f0]
0x00000583 <+102>: push eax
0x00000584 <+103>: call 0x3b0 <puts@plt>
0x00000589 <+108>: add esp,0x10
0x0000058c <+111>: jmp 0x5cc <main+175>
0x0000058e <+113>: sub esp,0xc
0x00000591 <+116>: lea eax,[ebx-0x18ed]
0x00000597 <+122>: push eax
0x00000598 <+123>: call 0x3b0 <puts@plt>
0x0000059d <+128>: add esp,0x10
0x000005a0 <+131>: cmp DWORD PTR [ebp-0xc],0x0
0x000005a4 <+135>: je 0x5ba <main+157>
0x000005a6 <+137>: sub esp,0xc
0x000005a9 <+140>: lea eax,[ebx-0x18e7]
0x000005af <+146>: push eax
0x000005b0 <+147>: call 0x3b0 <puts@plt>
0x000005b5 <+152>: add esp,0x10
0x000005b8 <+155>: jmp 0x5cc <main+175>
0x000005ba <+157>: sub esp,0xc
0x000005bd <+160>: lea eax,[ebx-0x18e4]
0x000005c3 <+166>: push eax
0x000005c4 <+167>: call 0x3b0 <puts@plt>
0x000005c9 <+172>: add esp,0x10
0x000005cc <+175>: cmp DWORD PTR [ebp-0x10],0x0
0x000005d0 <+179>: je 0x612 <main+245>
0x000005d2 <+181>: sub esp,0xc
0x000005d5 <+184>: lea eax,[ebx-0x18f8]
0x000005db <+190>: push eax
0x000005dc <+191>: call 0x3b0 <puts@plt>
0x000005e1 <+196>: add esp,0x10
0x000005e4 <+199>: cmp DWORD PTR [ebp-0xc],0x0
0x000005e8 <+203>: je 0x5fe <main+225>
0x000005ea <+205>: sub esp,0xc
0x000005ed <+208>: lea eax,[ebx-0x18f3]
0x000005f3 <+214>: push eax
0x000005f4 <+215>: call 0x3b0 <puts@plt>
0x000005f9 <+220>: add esp,0x10
0x000005fc <+223>: jmp 0x650 <main+307>
0x000005fe <+225>: sub esp,0xc
0x00000601 <+228>: lea eax,[ebx-0x18f0]
0x00000607 <+234>: push eax
0x00000608 <+235>: call 0x3b0 <puts@plt>
0x0000060d <+240>: add esp,0x10
0x00000610 <+243>: jmp 0x650 <main+307>
0x00000612 <+245>: sub esp,0xc
0x00000615 <+248>: lea eax,[ebx-0x18ed]
0x0000061b <+254>: push eax
0x0000061c <+255>: call 0x3b0 <puts@plt>
0x00000621 <+260>: add esp,0x10
0x00000624 <+263>: cmp DWORD PTR [ebp-0xc],0x0
0x00000628 <+267>: je 0x63e <main+289>
0x0000062a <+269>: sub esp,0xc
0x0000062d <+272>: lea eax,[ebx-0x18e7]
0x00000633 <+278>: push eax
0x00000634 <+279>: call 0x3b0 <puts@plt>
0x00000639 <+284>: add esp,0x10
0x0000063c <+287>: jmp 0x650 <main+307>
0x0000063e <+289>: sub esp,0xc
0x00000641 <+292>: lea eax,[ebx-0x18e4]
0x00000647 <+298>: push eax
0x00000648 <+299>: call 0x3b0 <puts@plt>
0x0000064d <+304>: add esp,0x10
0x00000650 <+307>: mov eax,0x0
0x00000655 <+312>: lea esp,[ebp-0x8]
0x00000658 <+315>: pop ecx
0x00000659 <+316>: pop ebx
0x0000065a <+317>: pop ebp
0x0000065b <+318>: lea esp,[ecx-0x4]
0x0000065e <+321>: ret
int main() {
int flg=0, flg2=1;
if (flg) {
puts("TRUE");
if (flg2) {
puts("TT");
} else {
puts("TF");
}
} else {
puts("fALSE");
if (flg2) {
puts("FT");
} else {
puts("FF");
}
}
if (flg) {
puts("TRUE");
if (flg2) {
puts("TT");
} else {
puts("TF");
}
} else {
puts("fALSE");
if (flg2) {
puts("FT");
} else {
puts("FF");
}
}
return 0;
}
node[0] => : [0x565ab52f, 0x565ab54c]: dst: [1, 2]
node[1] => : [0x565ab58e, 0x565ab5a4]: dst: [13, 14]
node[2] => : [0x565ab54e, 0x565ab564]: dst: [3, 12]
node[3] => : [0x565ab57a, 0x565ab58c]: dst: [4]
node[4] => : [0x565ab5cc, 0x565ab5d0]: dst: [5, 6]
node[5] => : [0x565ab612, 0x565ab628]: dst: [10, 11]
node[6] => : [0x565ab5d2, 0x565ab5e8]: dst: [7, 9]
node[7] => : [0x565ab5fe, 0x565ab610]: dst: [8]
node[8] => : [0x565ab650, 0x565ab65e]: dst: []
node[9] => : [0x565ab5ea, 0x565ab5fc]: dst: [8]
node[10] => : [0x565ab63e, 0x565ab64d]: dst: [8]
node[11] => : [0x565ab62a, 0x565ab65e]: dst: [8]
node[12] => : [0x565ab566, 0x565ab578]: dst: [4]
node[13] => : [0x565ab5ba, 0x565ab5d0]: dst: []
node[14] => : [0x565ab5a6, 0x565ab5b8]: dst: [4]
0x0000051d <+0>: lea ecx,[esp+0x4]
0x00000521 <+4>: and esp,0xfffffff0
0x00000524 <+7>: push DWORD PTR [ecx-0x4]
0x00000527 <+10>: push ebp
0x00000528 <+11>: mov ebp,esp
0x0000052a <+13>: push ebx
0x0000052b <+14>: push ecx
0x0000052c <+15>: sub esp,0x10
0x0000052f <+18>: call 0x420 <__x86.get_pc_thunk.bx>
0x00000534 <+23>: add ebx,0x1aa4
0x0000053a <+29>: mov DWORD PTR [ebp-0x10],0x0
0x00000541 <+36>: mov DWORD PTR [ebp-0xc],0x1
0x00000548 <+43>: cmp DWORD PTR [ebp-0x10],0x0
0x0000054c <+47>: je 0x58e <main+113>
0x0000054e <+49>: sub esp,0xc
0x00000551 <+52>: lea eax,[ebx-0x1978]
0x00000557 <+58>: push eax
0x00000558 <+59>: call 0x3b0 <puts@plt>
0x0000055d <+64>: add esp,0x10
0x00000560 <+67>: cmp DWORD PTR [ebp-0xc],0x0
0x00000564 <+71>: je 0x57a <main+93>
0x00000566 <+73>: sub esp,0xc
0x00000569 <+76>: lea eax,[ebx-0x1973]
0x0000056f <+82>: push eax
0x00000570 <+83>: call 0x3b0 <puts@plt>
0x00000575 <+88>: add esp,0x10
0x00000578 <+91>: jmp 0x5cc <main+175>
0x0000057a <+93>: sub esp,0xc
0x0000057d <+96>: lea eax,[ebx-0x1970]
0x00000583 <+102>: push eax
0x00000584 <+103>: call 0x3b0 <puts@plt>
0x00000589 <+108>: add esp,0x10
0x0000058c <+111>: jmp 0x5cc <main+175>
0x0000058e <+113>: sub esp,0xc
0x00000591 <+116>: lea eax,[ebx-0x196d]
0x00000597 <+122>: push eax
0x00000598 <+123>: call 0x3b0 <puts@plt>
0x0000059d <+128>: add esp,0x10
0x000005a0 <+131>: cmp DWORD PTR [ebp-0xc],0x0
0x000005a4 <+135>: je 0x5ba <main+157>
0x000005a6 <+137>: sub esp,0xc
0x000005a9 <+140>: lea eax,[ebx-0x1967]
0x000005af <+146>: push eax
0x000005b0 <+147>: call 0x3b0 <puts@plt>
0x000005b5 <+152>: add esp,0x10
0x000005b8 <+155>: jmp 0x5cc <main+175>
0x000005ba <+157>: sub esp,0xc
0x000005bd <+160>: lea eax,[ebx-0x1964]
0x000005c3 <+166>: push eax
0x000005c4 <+167>: call 0x3b0 <puts@plt>
0x000005c9 <+172>: add esp,0x10
0x000005cc <+175>: mov eax,0x0
0x000005d1 <+180>: lea esp,[ebp-0x8]
0x000005d4 <+183>: pop ecx
0x000005d5 <+184>: pop ebx
0x000005d6 <+185>: pop ebp
0x000005d7 <+186>: lea esp,[ecx-0x4]
0x000005da <+189>: ret
int main() {
int flg=0, flg2=1;
if (flg) {
puts("TRUE");
if (flg2) {
puts("TT");
} else {
puts("TF");
}
} else {
puts("fALSE");
if (flg2) {
puts("FT");
} else {
puts("FF");
}
}
return 0;
}
node[0] => : [0x5655852f, 0x5655854c]: dst: [1, 2]
node[1] => : [0x5655858e, 0x565585a4]: dst: [6, 7]
node[2] => : [0x5655854e, 0x56558564]: dst: [3, 5]
node[3] => : [0x5655857a, 0x5655858c]: dst: [4]
node[4] => : [0x565585cc, 0x565585da]: dst: []
node[5] => : [0x56558566, 0x56558578]: dst: [4]
node[6] => : [0x565585ba, 0x565585c9]: dst: [4]
node[7] => : [0x565585a6, 0x565585b8]: dst: [4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment