Skip to content

Instantly share code, notes, and snippets.

@HoLyVieR
Created February 19, 2016 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoLyVieR/753e4ebebc9c43a86ac9 to your computer and use it in GitHub Desktop.
Save HoLyVieR/753e4ebebc9c43a86ac9 to your computer and use it in GitHub Desktop.
.text:0000000000401380 push rbp
.text:0000000000401381 xor eax, eax
.text:0000000000401383 mov rbp, rsp
.text:0000000000401386 push rbx
.text:0000000000401387 mov rbx, rdx
.text:000000000040138A nop word ptr [rax+rax+00h]
.text:0000000000401390
.text:0000000000401390 loc_401390: ; CODE XREF: Crypt+20j
.text:0000000000401390 mov ds:byte_6020C0[rax], al
.text:0000000000401396 add rax, 1
.text:000000000040139A cmp rax, 100h
.text:00000000004013A0 jnz short loc_401390
.text:00000000004013A2 mov cs:byte_6021C0, 0
.text:00000000004013A9 mov cs:byte_6021C1, 0
.text:00000000004013B0 xor r9d, r9d
.text:00000000004013B3 xor r10d, r10d
.text:00000000004013B6 nop
.text:00000000004013B7 nop
.text:00000000004013B8 nop
.text:00000000004013B9 nop
.text:00000000004013BA nop
.text:00000000004013BB nop
.text:00000000004013BC nop
.text:00000000004013BD nop
.text:00000000004013BE nop
.text:00000000004013BF nop
.text:00000000004013C0
.text:00000000004013C0 loc_4013C0: ; CODE XREF: Crypt+8Cj
.text:00000000004013C0 mov eax, r9d
.text:00000000004013C3 xor edx, edx
.text:00000000004013C5 movzx r11d, ds:byte_6020C0[r9]
.text:00000000004013CD div esi
.text:00000000004013CF mov eax, r11d
.text:00000000004013D2 mov edx, edx
.text:00000000004013D4 add al, [rdi+rdx]
.text:00000000004013D7 add r10d, eax
.text:00000000004013DA movzx eax, r10b
.text:00000000004013DE xor r11b, ds:byte_6020C0[rax]
.text:00000000004013E5 mov ds:byte_6020C0[r9], r11b
.text:00000000004013EC xor r11b, ds:byte_6020C0[rax]
.text:00000000004013F3 mov ds:byte_6020C0[rax], r11b
.text:00000000004013FA xor ds:byte_6020C0[r9], r11b
.text:0000000000401401 add r9, 1
.text:0000000000401405 cmp r9, 100h
.text:000000000040140C jnz short loc_4013C0
.text:000000000040140E xor eax, eax
.text:0000000000401410 xor edx, edx
.text:0000000000401412 xor esi, esi
.text:0000000000401414 test r8d, r8d
.text:0000000000401417 jnz short loc_40142E
.text:0000000000401419 jmp short loc_401499
.text:0000000000401419 ; ---------------------------------------------------------------------------
.text:000000000040141B align 20h
.text:0000000000401420
.text:0000000000401420 loc_401420: ; CODE XREF: Crypt+117j
.text:0000000000401420 movzx esi, cs:byte_6021C0
.text:0000000000401427 movzx edx, cs:byte_6021C1
.text:000000000040142E
.text:000000000040142E loc_40142E: ; CODE XREF: Crypt+97j
.text:000000000040142E add esi, 1
.text:0000000000401431 mov cs:byte_6021C0, sil
.text:0000000000401438 movzx esi, sil
.text:000000000040143C movzx edi, ds:byte_6020C0[rsi]
.text:0000000000401443 add edx, edi
.text:0000000000401445 mov cs:byte_6021C1, dl
.text:000000000040144B movzx edx, dl
.text:000000000040144E xor dil, ds:byte_6020C0[rdx]
.text:0000000000401455 mov ds:byte_6020C0[rsi], dil
.text:000000000040145C xor dil, ds:byte_6020C0[rdx]
.text:0000000000401463 mov ds:byte_6020C0[rdx], dil
.text:000000000040146A xor dil, ds:byte_6020C0[rsi]
.text:0000000000401471 mov ds:byte_6020C0[rsi], dil
.text:0000000000401478 add dil, ds:byte_6020C0[rdx]
.text:000000000040147F movzx edx, byte ptr [rbx+rax]
.text:0000000000401483 movzx edi, dil
.text:0000000000401487 xor dl, ds:byte_6020C0[rdi]
.text:000000000040148D mov [rcx+rax], dl
.text:0000000000401490 add rax, 1
.text:0000000000401494 cmp r8d, eax
.text:0000000000401497 ja short loc_401420
.text:0000000000401499
.text:0000000000401499 loc_401499: ; CODE XREF: Crypt+99j
.text:0000000000401499 mov edx, offset byte_6020C0
.text:000000000040149E xor eax, eax
.text:00000000004014A0 mov ecx, 20h
.text:00000000004014A5 mov rdi, rdx
.text:00000000004014A8 rep stosq
.text:00000000004014AB xor eax, eax
.text:00000000004014AD mov [rdi], ax
.text:00000000004014B0 pop rbx
.text:00000000004014B1 pop rbp
.text:00000000004014B2 retn
.text:00000000004014B2 Crypt endp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment