All functions use stdcall calling convention.
All functions will preserve ebx, esi, edi, ebp, esp registers
Direction flag must be 0 when calling functions, functions won't change it
Return value is in eax except if function returns 64-bit numbers then the 
return value is in register pair edx:eax or if function returns floating
point values then it's returned in st0
If function returns 0 it means error has occured if not stated otherwise
here

MemLib:
-----------------------------------------------------------------
MemInit
	Must be called before using memory allocation/freeing functions

MumUninit
	Must be called before program exits

MemAlloc Bytes
	Allocates memory and returns pointer to that

MemFree pMem
	Frees memory allocated by MemAlloc

MemResize pMem, Bytes
	Resizes memory block allocated by MemAlloc

MemCopy pDest, pSource, Bytes
	Moves Bytes bytes from pSource to pDest. Returns pDest+Bytes

MemFill pDest, Bytes, Value
	Fills Bytes bytes at pDest with Value. Returns pDest+Bytes


StrLib:
-----------------------------------------------------------------
None of the functions will affect the strings you pass to it, but
return pointer to new one.

StrAlloc pStr, Bytes
	Allocates new string and returns pointer to it.
	If pStr <> NULL data from pStr will be copied to the new string

StrFree pStr
	Frees string allocated by StrAlloc

StrLen pStr
	Returns length of the string. !!! 0 doesn't mean error !!!

StrDuplicate pStr
	Duplicates string and returns pointer to it

StrCopy pDest, pStr
	Copies pStr to pDest. Returns pDest+string length 

StrLower pStr
	Converts string to lower case and returns pointer to it

StrUpper pStr
	Converts string to upper case and returns pointer to it

StrIsLower pStr
	Returns true if string is lower case, false otherwise
	!!! 0 doesn't mean error !!!

StrIsUpper pStr
	Returns true if string is upper case, false otherwise
	!!! 0 doesn't mean error !!!

StrLeft pStr, Bytes
	Returns pointer to string that contains bytes from start of pStr

StrRight pStr, Bytes
	Returns pointer to string that contains bytes from end of pStr

StrMid pStr, Pos, Bytes
	Returns pointer to string that contains bytes from middle of pStr

StrReplaceAt pStr, psWhat, psWith
	Returns pointer to string that has all psWhat strings replaced with psWith

StrRepeat pStr, Count
	Returns pointer to string that has pStr repeated Count times

StrCat pStr1, pStr2
	Returns pointer to string that contains both of the strings

StrInsert pStr1, pStr2, Pos
	Returns pointer to string that has pStr2 inserted in pStr1+Pos

StrDelLeft pStr, Bytes
	Returns pointer to string that contains end of pStr starting at pStr+Bytes

StrDelRight pStr, Bytes
	Returns pointer to string that contains start of pStr stopping at pStr+Bytes

StrRemoveAt/
StrDelMid pStr, Pos, Bytes
	Returns pointer to string that has Bytes removed starting at Pos

StrComp pStr1, pStr2
	Compares strings. Returns true if strings are same, false otherwise
	!!! 0 doesn't mean error !!!

StrCompCS pStr1, pStr2
	Compares strings, case sensitive. Returns true if strings are same, false otherwise
	!!! 0 doesn't mean error !!!

StrToNum pStr, Base
	Returns number converted from pStr using Base
	!!! 0 doesn't mean error !!!

StrFromNum Num, Base, Flags
	Returns pointer to string converted from Num using Base.
	If Base > 10, STR_UPPER or STR_LOWER must be one of the Flags

StrToFloat pStr, Base
	Returns floating point number converted from pStr using base
	!!! Return value in st0, 0 doesn't mean error !!!

StrReverse pStr
	Returns pointer to reversed string


FileLib:
-----------------------------------------------------------------
FileOpen psName, Flags
	Opens/creates file and returns handle to it

FileClose Handle
	Closes file handle

FileDelete psName
	Deletes file

FileRead Handle, pMem, Size
	Reads from file and returns number of bytes really readed

FileWrite Handle, pMem, Size
	Writes to file

FileSetPos Handle, StartPos, PosLow, PosHigh
	Sets file pointer

FileGetPos Handle
	Returns file pointer in edx:eax

FileGetSize Handle
	Returns file size in edx:eax

FileGetTime Handle, Flag
	Returns file time specified in Flag

FileSetAttribs psName, Attribs
	Sets file attributes

FileGetAttribs psName
	Returns file attributes

FileMove psDest, psSource
	Moves file from psSource to psDest


ConLib:
-----------------------------------------------------------------
ConInit
	Must be called before using any other console function

ConUninit
	Must be called before program exits

ConRead pBuffer, Size
	Reads from console, strips CRLF and returns length of null
	terminated string

ConWrite pBuffer, Size
	Writes to console, if Size=0 it will calculate length of the
	buffer

ConFlush
	Flushes console input buffer

ConSetPos PosX, PosY
	Set cursor position. Upper left corner is at (0,0)

ConGetPos
	Returns cursor position at x-axis in eax and at y-axis in edx

ConSetColor Color
	Sets console text and background color

ConGetColor
	Returns console text and background color