[CLASSIC] Reversing castSpellBySlot for fishing bot menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Sellingmydruidlol's Avatar Member
    Reputation
    1
    Join Date
    Sep 2020
    Posts
    10
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [CLASSIC] Reversing castSpellBySlot for fishing bot

    Hello, I'm currently trying to reverse castSpellBySlot for a fishing bot.
    The function I'm referring can be found at base + 0x1567D00 as of the latest build (38921). I'm unsure if they made any changes going into TBC, but my initial assumption was yes after comparing it to an older client.
    Afaik the params it took before 2.5.1 were:
    Code:
    typedef int64_t(__fastcall* __castSpellBySlot)(int32_t, int32_t, WowGuid*, int8_t, int8_t);
    When calling it like:
    Code:
    _castSpellBySlot(fishSpellSlot, 0, &player->guid, 0, 0);
    I get occasional crashes, even though I am in the main thread.

    After looking at the decompiler for a bit I figured that maybe the second argument was a 1byte, but that doesn't seem to have much of an effect, still having occasional crashes. Also tried passing a null guid, also did not seem to make much of a difference. Maybe someone else has it figured out already.

    My discord is siggestardust#8016 if someone wants to discuss it over DMs.
    Last edited by Sellingmydruidlol; 06-10-2021 at 05:47 AM.

    [CLASSIC] Reversing castSpellBySlot for fishing bot
  2. #2
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    auto v8 = (char *)lua_tostring(a1, 1LL, 0LL);
    auto v10 = CGSpellBook::FindSpellByName(v8, (const char *)&v64);
    auto v15 = CGSpellBook::GetOverridenSpell(v10, 0LL);
    Spell_C_ClickSpell(v15, (CGItem)&v55, 0LL, (GUID)&v60);

    // Script_CastSpellByName (TBC)
    Last edited by ChrisIsMe; 06-10-2021 at 08:42 AM.

  3. Thanks Sellingmydruidlol (1 members gave Thanks to ChrisIsMe for this useful post)
  4. #3
    Sellingmydruidlol's Avatar Member
    Reputation
    1
    Join Date
    Sep 2020
    Posts
    10
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you give some context to what you've sent here, I'm unable to decompile the function which references the CastSpellByName string in IDA. I'm assuming this is where it's from?

  5. #4
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sellingmydruidlol View Post
    Could you give some context to what you've sent here, I'm unable to decompile the function which references the CastSpellByName string in IDA. I'm assuming this is where it's from?
    Need to decompile `Usage: CastSpellByName`... function.

    I do not have a binary for you version to test, I cannot help more.

  6. #5
    scimmy's Avatar Active Member
    Reputation
    52
    Join Date
    Jul 2020
    Posts
    54
    Thanks G/R
    1/33
    Trade Feedback
    0 (0%)
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Very likely that this script function is obfuscated already, like many of the others, which is why your decompilation isn't working.

    Lucky for you, I've documented and uploaded old classic dumps in case this kind of bullshit continues to happen for analysis purposes: GitHub - notscimmy/wow_classic_dumps: Binary dumps of World of Warcraft Classic...for educational purposes of course

  7. #6
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by scimmy View Post
    Very likely that this script function is obfuscated already, like many of the others, which is why your decompilation isn't working.

    Lucky for you, I've documented and uploaded old classic dumps in case this kind of bullshit continues to happen for analysis purposes: GitHub - notscimmy/wow_classic_dumps: Binary dumps of World of Warcraft Classic...for educational purposes of course
    Biggest problem is just patching the opaque predicates then decompilation should work okay.

    Manually fixing opaque predicates and using X-Rays for decryption [Malware Reverse Engineering video] : ReverseEngineering

Similar Threads

  1. [Classic] 1.12 Glider/Fishing Bot
    By bone91 in forum WoW Bots Questions & Requests
    Replies: 5
    Last Post: 12-02-2012, 11:58 PM
  2. [Bot] Looking for Fishing bot.
    By kabman in forum World of Warcraft Bots and Programs
    Replies: 2
    Last Post: 03-05-2012, 03:52 PM
  3. 3 great spots for Fish Botting In WG
    By KingAtRock in forum World of Warcraft Guides
    Replies: 6
    Last Post: 03-05-2010, 01:03 PM
  4. Best place for fish botting?
    By Timple in forum World of Warcraft General
    Replies: 2
    Last Post: 03-18-2008, 05:39 AM
  5. More reliable(?) way of detecting bite (for fishing bots)
    By Miguel9614 in forum World of Warcraft Bots and Programs
    Replies: 7
    Last Post: 01-21-2008, 08:14 PM
All times are GMT -5. The time now is 03:42 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search