I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?
Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))
too much bugs
here is fix for this code:
Let's organize a competition whose version is better :D
And maybe someone knows what structure a3 points to? ItemTooltip?
this is wrong structure
original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)
Why does your function take a different number of parameters? As you show in original = 6 in asm = 7
это указатель, в ассемблере добавляется
do you have the complete ITEM_t s6 struct?
typedef struct
{
short Key;
ITEM Item;
OBJECT Object;
char DropItemName[80];
int ColorType;
int FontType;
} ITEM_t;
Thanks for the structure, I didn't have it complete. Now the code looks like the original.
Something is missing in my Item structure, it has a size of 107 bytes. I have to do BYTE gap[3]. 
void RenderItemName(ITEM_t* Item, int SelectedItem, ObjectModel* o, int ItemLevel, int ItemOption, int ItemExtOption, char Sort)
{
HFONT Font;
if ( Item->FontType == 1 )
Font = pFontBold;
else
Font = pFontNormal;
pSetFont(pTextThis(), Font);
pSetTextColorRGBA(pTextThis(), 255, 255, 255, 255);
pSetBgColorRGBA(pTextThis(), 0, 0, 0, 255);
switch ( Item->ColorType )
{
case 0:
glColor3f(1.0, 1.0, 1.0);
break;
case 1: //Yellow
glColor3f(1.0, 0.8, 0.1);
break;
case 2: //Orange
glColor3f(0.9, 0.53, 0.13);
break;
case 3:
glColor3f(0.7, 0.7, 0.7);
break;
case 4:
glColor3f(1.0, 0.3, 0.3);
break;
case 5:
glColor3f(0.3, 1.0, 0.3);
break;
case 6:
glColor3f(0.3, 0.3, 1.0);
break;
case 7:
glColor3f(1.0, 0.3, 1.0);
break;
case 8: //Violet
glColor3f(0.7, 0.4, 1.0);
break;
case 9:
glColor3f(0.6, 0.4, 1.0);
break;
case 0xA:
glColor3f(1.0, 0.1, 1.0);
break;
case 0xB:
glColor3f(0.1, 1.0, 0.5);
break;
case 0xC: //Level Blue
glColor3f(0.4, 0.7, 1.0);
break;
case 0xD: //Level White
glColor3f(0.9, 0.9, 0.9);
break;
case 0xE: //Level Orange
glColor3f(1.0, 0.5, 0.2);
break;
default:
glColor3f(1.0, 1.0, 1.0);
break;
}
GLfloat fCurColor[4] = { 1.f, 1.f, 1.f, 0.0f };
glGetFloatv(GL_CURRENT_COLOR, fCurColor);
if ( fCurColor[0] < 0.9f || fCurColor[1] < 0.9f || fCurColor[2] < 0.9f )
{
pSetTextColorRGBA(pTextThis(), fCurColor[0] * 255, fCurColor[1] * 255, fCurColor[2] * 255, 255);
}
if ( ItemExtOption % 4 == 1 || ItemExtOption % 4 == 2 )
{
glColor3f(1.0, 1.0, 1.0);
pSetTextColorRGBA(pTextThis(), 0, 255, 0, 255);
pSetBgColorRGBA(pTextThis(), 60, 60, 200, 255);
}
if (Sort)
{
pDrawText(pTextThis(), o->ScreenX, o->ScreenY - 15, Item->DropItemName, 0, 0, 8, 0);
}
else
{
pDrawText(pTextThis(), pCursorX, pCursorY - 15, Item->DropItemName, 0, 0, 8, 0);
}
}
i dont have any idia why u use your code , if we posted normal working code
I just showed how the code should look in a normal readable form. And if after a while I want to change something in it, add it, I won't have to think about what *(WORD *)(a3 + 40) or a1 + 760 is.
*(DWORD*)(a1 + 840) its item->ColorType
a1+760 its item->DropItemName
*(WORD *)(a3 + 40) its MouseX

#pragma pack(push, 1)
typedef struct tagITEM //-> Complete (size: 107)
{
/*+0*/ short ItemID;
/*+2*/ int Level;
/*+6*/ BYTE Part;
/*+7*/ BYTE Class;
/*+8*/ bool TwoHand;
/*+9*/ WORD DamageMin;
/*+11*/ WORD DamageMax;
/*+13*/ BYTE SuccessfulBlocking;
/*+14*/ WORD Defense;
/*+16*/ WORD MagicDefense;
/*+18*/ BYTE MagicPower;
/*+19*/ BYTE WeaponSpeed;
/*+20*/ WORD WalkSpeed;
/*+22*/ BYTE Durability;
/*+23*/ BYTE Option1;
/*+24*/ BYTE ExtOption;
/*+25*/ WORD RequireStrength;
/*+27*/ WORD RequireDexterity;
/*+29*/ WORD RequireEnergy;
/*+31*/ WORD RequireVitality;
/*+33*/ WORD RequireCharisma;
/*+35*/ WORD RequireLevel;
/*+37*/ BYTE SpecialNum;
/*+38*/ WORD Special[MAX_ITEM_SPECIAL];
/*+54*/ BYTE SpecialValue[MAX_ITEM_SPECIAL];
/*+62*/ DWORD UniqueID;
/*+66*/ BYTE bySelectedSlotIndex;
/*+67*/ BYTE PosX;
/*+68*/ BYTE PosY;
/*+69*/ WORD Jewel_Of_Harmony_Option;
/*+71*/ WORD Jewel_Of_Harmony_OptionLevel;
/*+73*/ bool option_380;
/*+74*/ BYTE bySocketOption[MAX_SOCKETS];
/*+79*/ BYTE SocketCount;
/*+80*/ BYTE SocketSeedID[MAX_SOCKETS];
/*+85*/ BYTE SocketSphereLv[MAX_SOCKETS];
/*+90*/ BYTE SocketSeedSetOption;
int Number;
BYTE Color;
/*+96*/ BYTE byColorState;
/*+97*/ bool PeriodItem;
/*+98*/ bool ExpiredItem;
/*+99*/ int lExpireTime;
/*+103*/ int RefCount;
} ITEM;
SERIALIZED_OBJECT_ON
struct MuObjectItemData
{
public:
unsigned char level() {
return ( Level >> 3 ) & 0x0F;
}
unsigned char addopt() {
return ( Unknown6 >> 4 ) & 0x0F;
}
public:
/*+00*/ short ItemID;
/*+02*/ int Level;
/*+06*/ char Unknown6;
/*+07*/ char Unknown7;
/*+08*/ char Unknown8;
/*+09*/ short DamageMin;
/*+11*/ short DamageMax;
/*+13*/ char Unknown13;
/*+14*/ short Unknown14;
/*+16*/ short Unknown16;
/*+18*/ char Unknown18;
/*+19*/ char Unknown19;
/*+20*/ short Unknown20;
/*+22*/ char Durability;
/*+23*/ char ExcellentOption;
/*+24*/ char AncientOption;
/*+25*/ short ReqStrenght;
/*+27*/ short ReqDextirity;
/*+29*/ short ReqEnergy;
/*+31*/ short ReqVitality;
/*+33*/ short ReqCommand;
/*+35*/ short ReqLevel;
/*+37*/ char SpecialCount;
/*+38*/ unsigned short SpecialType[8];
/*+54*/ unsigned char SpecialValue[8];
/*+62*/ int UniqueID;
/*+66*/ char CurrentActiveSlotIndex;
/*+67*/ char PosX;
/*+68*/ char PosY;
/*+69*/ unsigned short HarmonyType;
/*+71*/ short HarmonyValue;
/*+73*/ char Is380Item;
/*+74*/ char SocketOption[5];
/*+79*/ char Unknown79;
/*+80*/ char SocketSeedIndex[5];
/*+85*/ char SocketSphereLevel[5];
/*+90*/ char SocketSet;
/*+91*/ unsigned char gap01[5];
/*+96*/ char DurabilityState;
/*+97*/ char PeriodItem;
/*+98*/ char ExpiredItem;
/*+99*/ int ExpireDateConvert;
/*+103*/ int MaybeRefCount;
};
SERIALIZED_OBJECT_OFF
its maximum fully structures of items that you can find for s6