m_genesis.kv 1
m_genesis.kv 2
m_genesis.kv 3
m_genesis.kv 4
m_genesis.kv 5
m_genesis.kv 6
m_genesis.kv 7
m_genesis.kv 8
m_genesis.kv 9
m_genesis.kv 10
m_genesis.kv 11
m_genesis.kv 12
m_genesis.kv 13
m_genesis.kv 14
m_genesis.kv 15
m_genesis.kv 16
m_genesis.kv 17
m_genesis.kv 18
m_genesis.kv 19
m_genesis.kv 20 %macro PUSHA 0
m_genesis.kv 21 push rax
m_genesis.kv 22 push rbx
m_genesis.kv 23 push rcx
m_genesis.kv 24 push rdx
m_genesis.kv 25 push rbp
m_genesis.kv 26 push rdi
m_genesis.kv 27 push rsi
m_genesis.kv 28 push r8
m_genesis.kv 29 push r9
m_genesis.kv 30 push r10
m_genesis.kv 31 push r11
m_genesis.kv 32 push r12
m_genesis.kv 33 push r13
m_genesis.kv 34 push r14
m_genesis.kv 35 push r15
m_genesis.kv 36
m_genesis.kv 37
m_genesis.kv 38
m_genesis.kv 39
m_genesis.kv 40
m_genesis.kv 41
m_genesis.kv 42
m_genesis.kv 43 %endmacro
m_genesis.kv 44
m_genesis.kv 45
m_genesis.kv 46
m_genesis.kv 47 %macro POPA 0
m_genesis.kv 48
m_genesis.kv 49
m_genesis.kv 50
m_genesis.kv 51
m_genesis.kv 52
m_genesis.kv 53
m_genesis.kv 54
m_genesis.kv 55 pop r15
m_genesis.kv 56 pop r14
m_genesis.kv 57 pop r13
m_genesis.kv 58 pop r12
m_genesis.kv 59 pop r11
m_genesis.kv 60 pop r10
m_genesis.kv 61 pop r9
m_genesis.kv 62 pop r8
m_genesis.kv 63 pop rsi
m_genesis.kv 64 pop rdi
m_genesis.kv 65 pop rbp
m_genesis.kv 66 pop rdx
m_genesis.kv 67 pop rcx
m_genesis.kv 68 pop rbx
m_genesis.kv 69 pop rax
m_genesis.kv 70 %endmacro
m_genesis.kv 71
m_genesis.kv 72
m_genesis.kv 73
m_genesis.kv 74
m_genesis.kv 75 %define SYS_BRK 12
m_genesis.kv 76 %define SYS_EXIT 60
m_genesis.kv 77 %define SYS_EXIT_GROUP 231
m_genesis.kv 78 %define SYS_READ 0
m_genesis.kv 79 %define SYS_WRITE 1
m_genesis.kv 80 %define SYS_OPEN 2
m_genesis.kv 81 %define SYS_CLOSE 3
m_genesis.kv 82 %define SYS_FSTAT 5
m_genesis.kv 83 %define SYS_MMAP 9
m_genesis.kv 84 %define SYS_MUNMAP 11
m_genesis.kv 85 %define SYS_NANOSLEEP 35
m_genesis.kv 86 %define SYS_TIME 201
m_genesis.kv 87
m_genesis.kv 88
m_genesis.kv 89 %define SYS_CLONE 56
m_genesis.kv 90
m_genesis.kv 91
m_genesis.kv 92 %define SYS_IOCTL 16
m_genesis.kv 93
m_genesis.kv 94
m_genesis.kv 95 %define PROT_READ 1
m_genesis.kv 96 %define PROT_WRITE 2
m_genesis.kv 97 %define MAP_PRIVATE 2
m_genesis.kv 98
m_genesis.kv 99
m_genesis.kv 100 %define STDOUT 1
m_genesis.kv 101 %define STDERR 2
m_genesis.kv 102
m_genesis.kv 103
m_genesis.kv 104
m_genesis.kv 105 %define CLONE_VM 0x00000100
m_genesis.kv 106 %define CLONE_FS 0x00000200
m_genesis.kv 107 %define CLONE_FILES 0x00000400
m_genesis.kv 108 %define CLONE_SIGHAND 0x00000800
m_genesis.kv 109 %define CLONE_PARENT 0x00008000
m_genesis.kv 110 %define CLONE_THREAD 0x00010000
m_genesis.kv 111 %define CLONE_IO 0x80000000
m_genesis.kv 112
m_genesis.kv 113
m_genesis.kv 114 %define MAP_GROWSDOWN 0x0100
m_genesis.kv 115 %define MAP_ANONYMOUS 0x0020
m_genesis.kv 116 %define MAP_PRIVATE 0x0002
m_genesis.kv 117 %define PROT_READ 0x1
m_genesis.kv 118 %define PROT_WRITE 0x2
m_genesis.kv 119 %define PROT_EXEC 0x4
m_genesis.kv 120
m_genesis.kv 121 %define THREAD_FLAGS \
m_genesis.kv 122 CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_PARENT | \
m_genesis.kv 123 CLONE_THREAD | CLONE_IO
m_genesis.kv 124
m_genesis.kv 125
m_genesis.kv 126
m_genesis.kv 127 %define ICANON 2
m_genesis.kv 128 %define ECHO 8
m_genesis.kv 129 %define TCGETS 21505
m_genesis.kv 130 %define TCPUTS 21508
m_genesis.kv 131
m_genesis.kv 132
m_genesis.kv 133
m_genesis.kv 134
m_genesis.kv 135 struc statbuf
m_genesis.kv 136 .st_dev resq 1
m_genesis.kv 137 .st_ino resq 1
m_genesis.kv 138 .st_nlink resq 1
m_genesis.kv 139 .st_mode resd 1
m_genesis.kv 140 .st_uid resd 1
m_genesis.kv 141 .st_gid resd 1
m_genesis.kv 142 .__pad0 resd 1
m_genesis.kv 143 .st_rdev resq 1
m_genesis.kv 144 .st_size resq 1
m_genesis.kv 145 .st_blksize resq 1
m_genesis.kv 146 .st_blocks resq 1
m_genesis.kv 147 .st_atime resq 1
m_genesis.kv 148 .st_atime_nsec resq 1
m_genesis.kv 149 .st_mtime resq 1
m_genesis.kv 150 .st_mtime_nsec resq 1
m_genesis.kv 151 .st_ctime resq 1
m_genesis.kv 152 .st_ctime_nsec resq 1
m_genesis.kv 153 .__unused resq 3
m_genesis.kv 154 .size
m_genesis.kv 155 endstruc
m_genesis.kv 156
m_genesis.kv 157
m_genesis.kv 158
m_genesis.kv 159
m_genesis.kv 160
m_genesis.kv 161 section .bss
m_genesis.kv 162 linux_epoch resq 1
m_genesis.kv 163
m_genesis.kv 164
m_genesis.kv 165 section .text
m_genesis.kv 166
m_genesis.kv 167
m_genesis.kv 168
m_genesis.kv 169
m_genesis.kv 170 _Create_Thread:
m_genesis.kv 171 push rdi
m_genesis.kv 172
m_genesis.kv 173 mov rdi, 0
m_genesis.kv 174 mov rsi, SLAVE_STACK_SIZE
m_genesis.kv 175 mov rdx, PROT_WRITE | PROT_READ
m_genesis.kv 176 mov r10, MAP_ANONYMOUS | MAP_PRIVATE | MAP_GROWSDOWN
m_genesis.kv 177 mov rax, SYS_MMAP
m_genesis.kv 178 syscall
m_genesis.kv 179
m_genesis.kv 180 cmp rax, 0
m_genesis.kv 181 jg .ok
m_genesis.kv 182
m_genesis.kv 183 EGGOG "Could not allocate memory for slave stack!"
m_genesis.kv 184 .ok:
m_genesis.kv 185
m_genesis.kv 186 lea rsi, [rax + SLAVE_STACK_SIZE - 8]
m_genesis.kv 187 pop qword [rsi]
m_genesis.kv 188 mov rdi, THREAD_FLAGS
m_genesis.kv 189 mov rax, SYS_CLONE
m_genesis.kv 190 syscall
m_genesis.kv 191 ret
m_genesis.kv 192
m_genesis.kv 193
m_genesis.kv 194
m_genesis.kv 195
m_genesis.kv 196
m_genesis.kv 197 _Get_Epoch_Time:
m_genesis.kv 198 PUSHA
m_genesis.kv 199 mov rax, SYS_TIME
m_genesis.kv 200 mov rdi, linux_epoch
m_genesis.kv 201 syscall
m_genesis.kv 202 POPA
m_genesis.kv 203 mov rdx, qword [linux_epoch]
m_genesis.kv 204 ret
m_genesis.kv 205
m_genesis.kv 206
m_genesis.kv 207
m_genesis.kv 208
m_genesis.kv 209
m_genesis.kv 210 _Nano_Sleep:
m_genesis.kv 211 mov rdi, rax
m_genesis.kv 212 mov rax, SYS_NANOSLEEP
m_genesis.kv 213 xor rsi, rsi
m_genesis.kv 214 syscall
m_genesis.kv 215 ret
m_genesis.kv 216
m_genesis.kv 217
m_genesis.kv 218
m_genesis.kv 219
m_genesis.kv 220
m_genesis.kv 221 _Stop:
m_genesis.kv 222 mov rax, SYS_EXIT
m_genesis.kv 223 mov rdi, 0
m_genesis.kv 224 syscall
m_genesis.kv 225
m_genesis.kv 226
m_genesis.kv 227
m_genesis.kv 228
m_genesis.kv 229
m_genesis.kv 230
m_genesis.kv 231 _Hard_Stop:
m_genesis.kv 232 mov rax, SYS_EXIT_GROUP
m_genesis.kv 233 mov rdi, 0
m_genesis.kv 234 syscall
m_genesis.kv 235
m_genesis.kv 236