2007-10-15 09:42:17 +00:00
|
|
|
format ELF
|
|
|
|
|
2020-05-03 08:09:36 +00:00
|
|
|
;include "../proc32.inc"
|
2007-10-15 09:42:17 +00:00
|
|
|
section '.text' executable
|
2018-11-01 17:24:22 +00:00
|
|
|
public sysmalloc
|
|
|
|
public sysfree
|
|
|
|
public sysrealloc
|
2007-10-15 09:42:17 +00:00
|
|
|
|
|
|
|
align 4
|
2018-11-01 17:24:22 +00:00
|
|
|
sysmalloc:
|
2016-05-19 12:15:22 +00:00
|
|
|
push ebx
|
2020-04-30 08:47:52 +00:00
|
|
|
push ecx
|
|
|
|
mov eax,68
|
|
|
|
mov ebx,12
|
|
|
|
mov ecx,[esp+12] ;size
|
|
|
|
int 0x40
|
|
|
|
pop ecx
|
2016-05-19 12:15:22 +00:00
|
|
|
pop ebx
|
2020-04-30 08:47:52 +00:00
|
|
|
ret 4
|
2007-10-15 09:42:17 +00:00
|
|
|
|
|
|
|
align 4
|
2018-11-01 17:24:22 +00:00
|
|
|
sysfree:
|
2016-05-19 12:15:22 +00:00
|
|
|
push ebx
|
2020-04-30 08:47:52 +00:00
|
|
|
push ecx
|
|
|
|
mov eax,68
|
|
|
|
mov ebx,13
|
|
|
|
mov ecx,[esp+12]
|
|
|
|
int 0x40
|
|
|
|
pop ecx
|
2016-05-19 12:15:22 +00:00
|
|
|
pop ebx
|
2020-04-30 08:47:52 +00:00
|
|
|
ret 4
|
2007-10-15 09:42:17 +00:00
|
|
|
|
|
|
|
align 4
|
2018-11-01 17:24:22 +00:00
|
|
|
sysrealloc:
|
2016-05-19 12:15:22 +00:00
|
|
|
push ebx
|
2020-04-30 08:47:52 +00:00
|
|
|
push ecx
|
|
|
|
push edx
|
|
|
|
mov eax,68
|
|
|
|
mov ebx,20
|
|
|
|
mov ecx,[esp+20] ; size
|
|
|
|
mov edx,[esp+16] ; pointer
|
|
|
|
int 0x40
|
|
|
|
pop edx
|
|
|
|
pop ecx
|
2016-05-19 12:15:22 +00:00
|
|
|
pop ebx
|
2020-04-30 08:47:52 +00:00
|
|
|
ret 8
|