-1

I have one question maybe you can help, I always find this functions in IDA:

void __thiscall sub_79340(_BYTE *this, int a2, int a3, int a4)

And I use them like this:

// talkChannel
typedef DWORD(__thiscall* _talkChannel)(DWORD localplayer, uintptr_t mode, uintptr_t channelId, const std::string& message);
_talkChannel talkChannel;
talkChannel = (_talkChannel)(moduleBase + 0x79340);

talkChannel(LocalPlayerPointer, 1, 0, "hello world");

But this time I find this in IDA:

_DWORD *__thiscall sub_142860(_DWORD **this, _DWORD *a2, int a3)

I understand the first definition (return void, calling convention thiscall, address of function X, pointer to this as it's a thiscall, parameters)... but I can't understand the second one :(

I don't know how to call this... Anyone could help me explaining what it means and how to use it? I would like to understand the difference between both

Thanks for your time <3

1 Answer 1

1

Basically I've checked with Ghidra to compare and I've found that the signature is different:

void __thiscall FUN_00142860(int param_1_00,undefined4 *param_1,int param_2)

So, basically I just declared the function this way:

// get tiles
typedef void(__thiscall* _getTiles)(DWORD map, TileList* buffer, uintptr_t floor);
_getTiles getTiles;
getTiles = (_getTiles)(moduleBase + 0x142860);

So, double check with other tools and don't rely only in IDA output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.