Legendary Battlemage
- Joined
- Mar 7, 2013
- Messages
- 686
- Reaction score
- 43
result = [COLOR=#ff0000]sub_13BC2F0[/COLOR](a2, (int)lpMultiByteStr);
public static byte[] giveBuff(int buffid, int bufflength, Map<MapleBuffStat, Integer> statups, MapleStatEffect effect) {
v8 = sub_436FE0(&v135, a2, &v141);//SecondaryStat::DecodeForLocal
CInPacket::DecodeBuffer(a3, &v3101, 52u);
v4 = sub_409B40(&v2761, dword_19AFA88);
if ( sub_409BA0(v4) )
{
___:01609E80 sub esp, 34h
___:01609E83 push 1A0h
___:01609E88 push 84h //0x84=132
___:01609E8D push 1
___:01609E8F lea ecx, [esp+40h+var_34]
___:01609E93 call sub_4095A0
___:01609E98 mov ecx, eax
___:01609E9A call sub_4095D0
___:01609E9F push eax
___:01609EA0 mov ecx, offset dword_19AFA88
___:01609EA5 call sub_409510
___:01609EAA add esp, 34h
___:01609EAD retn
v0 = sub_4095A0(1);
v1 = sub_4095D0(v0, 132);//shiftLeft
return sub_409510(dword_19AFA88, v1, 416u);
if ( v4 / 32 <= 3 )
{
v9 = bits & 0x1F;//0x1F == 31. values are from 0~31 for each position divided by 32.
if ( (unsigned int)v4 > 0x7F )
{
UINT128::setValue(v3, 0);
return v3;
}
in SecondaryStat:Code:v8 = sub_436FE0(&v135, a2, &v141);//SecondaryStat::DecodeForLocal
ecodeForLocal, you'll see
This part is the buffmask, and next if-statement probably you'll assume it is for WATK(0x1, 1), but it isn't.Code:CInPacket::DecodeBuffer(a3, &v3101, 52u);
You need to know what dword_19AFA88 is.Code:v4 = sub_409B40(&v2761, dword_19AFA88); if ( sub_409BA0(v4) ) {
1. Press X key (Jump to xref).
2. Go to the address at the bottom of showed list. (in this case, Address:sub_1609E80/Text:'mov ecx, offset dword_19AFA88')
You don't have to create a function but if you did it you'll get a 'dynamic_initializer_for__CTS_???__' function.Code:___:01609E80 sub esp, 34h ___:01609E83 push 1A0h ___:01609E88 push 84h //0x84=132 ___:01609E8D push 1 ___:01609E8F lea ecx, [esp+40h+var_34] ___:01609E93 call sub_4095A0 ___:01609E98 mov ecx, eax ___:01609E9A call sub_4095D0 ___:01609E9F push eax ___:01609EA0 mov ecx, offset dword_19AFA88 ___:01609EA5 call sub_409510 ___:01609EAA add esp, 34h ___:01609EAD retn
Now you can see that this is buffmask '1 << 132' (in odin style, probably, STR(0x10, 5))Code:v0 = sub_4095A0(1); v1 = sub_4095D0(v0, 132);//shiftLeft return sub_409510(dword_19AFA88, v1, 416u);
Can someone of you guys explain me how to get the buffmast and the position ?@Yuuroido
geebus, 52byte masks now? glad i'm still only v83~v90 area lol
also, idk if nexon has changed the count in v148 or not, but in v95 and below, the order is every 32flags a position changes. That would mean that in our uFlagTemp[] array, the correct mask is 1 << 4 & 0x7F, and is in position 4 (3 cuz arrays start at 0, 32*4 = 128 but 4-1 = 3).
however, since v95 and v148 is so big, nexon highly likely changed it completely. but if you look into shiftLeft it will show you how they "shiftLeft" their masks. In my version, highest position available is 3.
Code:if ( v4 / 32 <= 3 ) { v9 = bits & 0x1F;
Can someone of you guys explain me how to get the buffmast and the position ?
I didn't understand how he got from 132 the mask and the position :/
okay let me see if I understood for exmple I am using this one:You must be registered to see links
and the buffstat length is 64 so 174 / 64 = 2 + 1 = 3 so the position is 3 and the value is 1 << 3 ?
Okay thanks you very much I finally understood itYour sub is wrong, setBitNumber is for shiftLeft, and setBitNumber is inside of your shiftLeft's function.
As for your result, you're getting the hang of it, but just a little off. Yes, the position is 3 if your buffstat length is 64. However the value is 174 - (64 * 2), so 174 - 128 = 46, so value is 1 << 46. That would mean w/e that buffstat is (if your 64 length is correct), its BUFFSTAT(0x4000, 3)
Okay thanks you very much I finally understood it
Btw if I am doing 1 << 174 its giving to me the same result for 1 << 46
Yea I got it thank to uYes, it will. I guess you can just do 1 << 174 to get the value, and then get the position next. Either way, yeah, you got it.
Ericgeebus, 52byte masks now? glad i'm still only v83~v90 area lol
value = 1 << (0x1F - (i & 0x1F));
position = 13 - (i >> 5);//52bytes->13ints, 64bytes->16ints
value = 1 << i;
position = i >> 5;
Oh.. my mistake (he was not talking about the flags), I meant the flags too. (v148:52bytes, v166:64bytes)Yuuroido I meant the flags haha, instead of DecoderBuffer(x, 16) its DecodeBuffer(x, 52). But yeah, it's now 64bytes instead of 32.. geez, so many changes.