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