intent
stringlengths
4
313
snippet
stringlengths
2
271
move 5 into ebx
mov ebx, 5
push 0x1 to the stack
push 0x1
perform a logical xor between the cl register and 0xaa and save the result in cl
xor cl, 0xaa
subtract 0x2e2aa163 from ebx and save the result into ebx
sub ebx, 0x2e2aa163
push ecx to the stack
push ecx
install signal handel
mov eax, 48
push the word 1 onto the stack and point eax to the stack register
push word 1 \n mov eax, esp
compare the contents of the eax register with doubleword at edi and set status flags
scasd
if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register then jump to the while label else jump to the eax register
cmp DWORD [eax], edx \n jne search_the_egg \n jmp eax
move 0x222933f0 into esi
mov esi, 0x222933f0
define createfile function
createfile:
jump to the read label
jmp read
add 0x31179798 to the contents in eax and save the result in eax
add eax, 0x31179798
push 0x61702f63 onto the stack
push 0x61702f63
move 0x11 into the byte at address [esp+3]
mov byte [esp+3], 0x11
move the 16-bit integer representation of 2 into the 2 bytes starting at the address in ebx
mov word [ebx], 2
push 0x2f6e6962 to the stack
push 0x2f6e6962
load the effective address of the result of the operation [zero_reg+6] into the eax register
lea eax, [zero_reg+6]
jump short to the .exit label
jmp short .exit
compare the contents stored at ebp+arg_0 with 1
cmp [ebp+arg_0], 1
if the contents of the dx register is equal to the value 0x03e8 then jump to the L1 label
cmp dx, 0x03e8 \n je L1
clear the ebx register
xor ebx, ebx
jump to the shift_decode label if the zero flag is set
jz shift_decode
put the syscall 28 into the eax register
push byte 28 \n pop eax
compare the contents of the ecx register with the contents of the ebp register
cmp ecx, ebp
if the contents of the eax register is zero then jump short to the memory location loc_402C13
test eax, eax \n jz short loc_402C13
push 0x30313a31 onto the stack
push 0x30313a31
move 43 decimal into edx
mov edx, 43
move the value 0x5f657a69 into the double word starting at the address [esp-0x10]
mov dword [esp-0x10], 0x5f657a69
decrement ecx and jumps to the next label if ecx is not zero and the zero flag is equal to zero
loopnz next
compare the byte at the memory location ebp+ecx with 7ah
cmp byte [ebp+ecx], 7ah
push the value 0x64687373 onto the stack and point the ebx register to the stack register
push 0x64687373 \n mov ebx, esp
move 0x68732f2f into the dword at the memory location [esp-8]
mov dword [esp-8], 0x68732f2f
place address of buffer into ebp
mov ebp, buff
move the byte at the address 0x1 into al
mov al, byte 0x1
push the 0x74756f2f onto the stack
push 0x74756f2f
call the function in esi
call esi
get 36 in the ecx
mov ecx, 36
move the contents of the eax register into the long starting at the address [esi+26]
mov long [esi+26], eax
do nothing
nop
push the word 0x776f onto the stack
push word 0x776f
move dl into the byte in esi
mov byte [esi], dl
jump to the numeric label 1 if the zero flag is cleared
jnz 1
define the call_write label
call_write:
perform the xor operation between the eax register and the value 0x6e696230
xor eax, 0x6e696230
define the child function
child:
decrement ecx and jumps to the 3 label unless decrementing ecx caused its value to become zero
loop 3
define the _param label
_param:
push 0x2f656c2d onto the stack
push 0x2f656c2d
push the value 0x2f2f2f2f onto the stack and point edi to the stack register
push 0x2f2f2f2f \n mov edi, esp
put the syscall 8 into the eax register
push byte 8 \n pop eax
if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register then jump to the loop label else jump to the eax register
cmp DWORD [eax], edx \n jne loop \n jmp eax
move 0x2e383631 into eax
mov eax, 0x2e383631
swap the values of ebx and esp registers
xchg ebx, esp
jump to the label close if the contents of the eax register is zero
test eax, eax \n jz close
push 0x6475732f to the stack
push 0x6475732f
push 0x7361702f onto the stack
push 0x7361702f
left rotate the byte at the address esi by 0x2 bits
rol byte [esi], 0x2
mutliply eax by ecx
mul ecx
push the dword 0x0501a8c0 onto the stack
push dword 0x0501a8c0
remove last character from the stack into ecx
pop ecx
put the syscall 0x2f into the eax register
push byte 0x2f \n pop eax
specify file descriptor 1 standard output
mov ebx, 1
push the value of register ecx onto the stack
push ecx
declare the do_dup label
do_dup:
system call lseek
mov eax, 19
move the 4 bytes of data at address esi+4*eax into ecx
mov ecx, [esi+4*eax]
declare the output label
output:
define duploop function
duploop:
if the doubleword starting at the address contained in the eax register is not equal to the doubleword value 0x4f904790 then jump to the jne _start label else jump to the eax register
cmp DWORD [eax], 0x4f904790 \n jne _start \n jmp eax
define dup2 function
dup2:
add ebx to eax
add eax, ebx
move eax into edi
mov edi, eax
jump to the label socket if the contents of the eax register is zero else zero out the contents of the eax register
test eax, eax \n jz socket \n xor eax, eax
if the doubleword starting at the address [eax-4] is equal to the contents stored at the egg2 address then jump to the _next label else jump to the eax register
cmp dword [eax-4], egg2 \n je _next \n jmp eax
define egg1 equal to 'mark'
egg1 equ 'mark'
jump to the _start label
jmp _start
push the doubleword 0x4227a28b onto the stack
push dword 0x4227a28b
call sys_read to fill the buffer
int 80h
push sock_reg onto the stack
push sock_reg
push the word 0x6f64 onto the stack
push word 0x6f64
compare the contents of the ebp register with the value 0
cmp ebp, 0
get 18 in the bx register
mov bx, 18
move 0x5 into al
mov al, 0x5
if the contents of the eax register is zero then jump to the label write else zero out the contents of the eax register
test eax, eax \n jz write \n xor eax, eax
decrement ecx and jumps to the do_dup label unless decrementing ecx caused its value to become zero
loop do_dup
move esi into ex
mov ax, [esi]
if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register then jump to the search_the_egg label else jump to the eax register
cmp DWORD [eax], edx \n jne search_the_egg \n jmp eax
swap the values of esi and ebx
xchg esi, ebx
push 0x70692f6e onto the stack
push 0x70692f6e
move stack pointer to eax
mov eax, esp
make the system call read
mov eax, 3
negate eax
neg eax
if the contents of the al register is equal to the value 0xf2 then jump to the incpage label
cmp al, 0xf2 \n jz incpage
jump short to push_cmd
jmp short push_cmd
push the 0x4f4e2029 onto the stack
push 0x4f4e2029
push the value 0x2f2f2f2f onto the stack and point ebx to the stack register
push 0x2f2f2f2f \n mov ebx, esp
add 0x33333333 value to esi
add esi, 0x33333333
move the contents of the ebx register into the long starting at the address [esi+26]
mov long [esi+26], ebx
move esp into ebp
mov ebp, esp