Skip to content

Instantly share code, notes, and snippets.

@mikecat
Created May 9, 2014 12:24
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 mikecat/0034965a11d44bcfb6dc to your computer and use it in GitHub Desktop.
Save mikecat/0034965a11d44bcfb6dc to your computer and use it in GitHub Desktop.
CodeIQ 第二回デスマコロシアム 解答コード
dq 10E890E189h,'`@ぁァァぁ@`',7F0FF3076F0FF35Fh,1ABED23101h,4B89010B2h,1010181DB31h,104418101B3h,0xC41810A41FE01,0xDB754E80CD010101
dq 82E3686141828168h,68A282E38268E3A2h,0xC931E58981E34161,10B2E987D2311AB1h,0xCD43DB3104B0C031,124048166E98780h,10424448101h,4481010A24448001h,0xD4E2010101000C24,80CDDB3140C031h
>++++++[>-----<-]>+<<++++++++[>++++[>>++++>++++>++++>++>++<<<<<<-]<-]>>>+>++>++>+>+>++++++++[<++++<<++++>>>-]>+++++[<+++++>-]<+[<.<.<<<<.>.>.<<.>+.>>.<<<.>.->>.+<<<.>.>.+>>.+>.+>-]
.global main
.text
// 61 41 e3 81 82 e3 82 a2 e3 82 a2 e3 81 82 41 61
// -- -- -- -- -- -- -- --
main:
mov %esp,%ecx
nop
call pgstart
.ascii "`@ぁァァぁ@`"
pgstart:
pop %edi
movdqu (%edi),%xmm0
movdqu %xmm0,(%ecx)
xor %edx,%edx
mov $26,%esi
mov $16,%dl
nop
loopstart:
mov $4,%eax
xor %ebx,%ebx
addl $0x0101,(%ecx)
mov $1,%bl
addl $0x01000001,4(%ecx)
incb 10(%ecx)
addl $0x01010100,12(%ecx)
int $0x80
dec %esi
jnz loopstart
.global main
.text
// 61 41 e3 81 82 e3 82 a2 e3 82 a2 e3 81 82 41 61
// -- -- -- -- -- -- -- --
main:
pushl $0x61418281
pushl $0xe3a282e3
pushl $0xa282e382
pushl $0x81e34161
mov %esp,%ebp
xor %ecx,%ecx
mov $26,%cl
xor %edx,%edx
loopstart:
xchg %ebp,%ecx
mov $16,%dl
xor %eax,%eax
mov $4,%al
xor %ebx, %ebx
inc %ebx
int $0x80
xchg %ebp,%ecx
addw $0x0101,(%esp)
addl $0x01000001,4(%esp)
addb $0x01,10(%esp)
addl $0x01010100,12(%esp)
loop loopstart
xor %eax,%eax
inc %eax
xor %ebx,%ebx
int $0x80
(): const
{}: valuable
{buf}{buf}(e3)(81){82}{a2}{41}{61}{buf}{buf}
// e3を作る
>++++++[>-----<-]>+<<
// 81~61を作る(81 82 82 41 41にする)
++++++++[>++++[>>++++>++++>++++>++>++<<<<<<-]<-]>>>+>++>++>+>+>
// a2と61の位置に0x20を足す
++++++++[<++++<<++++>>>-]
// 出力のループ回数を設定する
>+++++[<+++++>-]<+
// 出力する
[<.<.<<<<.>.>.<<.>+.>>.<<<.>.->>.+<<<.>.>.+>>.+>.+>-]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment