Tags: sha2017ctf 

Rating:

```
# objdump -b pei-i386 -D flipacoin.exe > flipacoin.exe.txt
```
```
open flipacoin.exe.txt in Notepad++
in _WinMain@16 @401652: 75 4e jne 4016a2 <_WinMain@16+0x1a2> first jne found
and @4016a6: 75 27 jne 4016cf <_WinMain@16+0x1cf> second jne found
and @4016dd: 0f 85 1a 01 00 00 jne 4017fd <_WinMain@16+0x2fd> third jne found
open flipacoin.exe in Frhed then edit data
@401652 from 754e (jne) to eb52 (jmp) and @4016a6 from 7527 (jne) to eb3b (jmp)
< 0000a50: dc00 754e c744 2404 d590 4800 c704 2440
> 0000a50: dc00 eb52 c744 2404 d590 4800 c704 2440
< 0000aa0: 0700 837d dc01 7527 c744 2404 0491 4800
> 0000aa0: 0700 837d dc01 eb3b c744 2404 0491 4800
```
run flipacoin-bypass.exe and press only one enter key
flag found
```
Z:\>flipacoin-bypass.exe

[*] SHA2017 Junior CTF - Flip a Coin
Flip a coin, if it is heads you win, tails you lose!
Win 100 times to get the flag

[*] Press enter to flip a coin

[*] You won! Nice job! \o/
Here is your flag:

flag{d754c599d47d9b3e4a376e1d770ca8c1}
```

Original writeup (http://imgur.com/a/J7A5h).