Create a gist now

Instantly share code, notes, and snippets.

@rmolina /t0k3n_g3n.txt Secret
Created Jul 29, 2016

What would you like to do?
.text:000000000040077C ; =============== S U B R O U T I N E =======================================
.text:000000000040077C
.text:000000000040077C ; Attributes: bp-based frame
.text:000000000040077C
.text:000000000040077C public t0k3n_g3n
.text:000000000040077C t0k3n_g3n proc near ; CODE XREF: main+E4↓p
.text:000000000040077C
.text:000000000040077C var_4 = dword ptr -4
.text:000000000040077C
.text:000000000040077C push rbp
.text:000000000040077D mov rbp, rsp
.text:0000000000400780 sub rsp, 10h
.text:0000000000400784 mov [rbp+var_4], edi
.text:0000000000400787 mov eax, [rbp+var_4]
.text:000000000040078A imul eax, [rbp+var_4]
.text:000000000040078E mov edx, eax
.text:0000000000400790 mov eax, edx
.text:0000000000400792 add eax, eax
.text:0000000000400794 add eax, edx
.text:0000000000400796 shl eax, 2
.text:0000000000400799 lea ecx, [rax+rdx]
.text:000000000040079C mov edx, 60F25DEBh
.text:00000000004007A1 mov eax, ecx
.text:00000000004007A3 imul edx
.text:00000000004007A5 sar edx, 6
.text:00000000004007A8 mov eax, ecx
.text:00000000004007AA sar eax, 1Fh
.text:00000000004007AD sub edx, eax
.text:00000000004007AF mov eax, edx
.text:00000000004007B1 cmp eax, [rbp+var_4]
.text:00000000004007B4 jnz short loc_4007C2
.text:00000000004007B6 mov eax, [rbp+var_4]
.text:00000000004007B9 mov edi, eax
.text:00000000004007BB call tang0
.text:00000000004007C0 jmp short locret_4007CC
.text:00000000004007C2 ; ---------------------------------------------------------------------------
.text:00000000004007C2
.text:00000000004007C2 loc_4007C2: ; CODE XREF: t0k3n_g3n+38↑j
.text:00000000004007C2 mov edi, offset aHowDidYouGetHe ; "How did you get here"
.text:00000000004007C7 call _puts
.text:00000000004007CC
.text:00000000004007CC locret_4007CC: ; CODE XREF: t0k3n_g3n+44↑j
.text:00000000004007CC leave
.text:00000000004007CD retn
.text:00000000004007CD t0k3n_g3n endp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment