Raised This Month: $32 Target: $400
 8% 

L4D2 windows signature help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fdxx
Member
Join Date: Oct 2020
Location: 0xdeadbeef
Old 01-10-2022 , 04:09   L4D2 windows signature help
Reply With Quote #1

I am trying to make IsVisibleToPlayer Windows signature.
PHP Code:
IsVisibleToPlayer(Vector const&, CBasePlayer *, intintfloatCBaseEntity const*, TerrorNavArea **, bool *) 
The call sequence is probably like this:
PHP Code:
CanZombieSpawnHere -> IsVisibleToTeam -> IsVisibleToPlayer 
Fortunately, "CanZombieSpawnHere" function has unique text: "Witch converted to a normal Infected!".

By searching for this unique text, we can find the "CanZombieSpawnHere" function in the server.dll binary.

By comparison, "sub_1028C920" should be "IsVisibleToTeam" function.
PHP Code:
-------- server_srv.so ---------
v24 = *((_DWORD *)TheDirector 346);
v32[0] = *(_DWORD *)a2;
v32[1] = *(_DWORD *)(a2 4);
*(
float *)&v32[2] = *(float *)(a2 8) + 56.799999;
if ( (
unsigned __int8)CDirectorTacticalServices::IsVisibleToTeam(v24v32230a30)
|| (
v33[0] = *(_DWORD *)a2,
    
v33[1] = *(_DWORD *)(a2 4),
    *(
float *)&v33[2] = *(float *)(a2 8) + 35.5,
    (
unsigned __int8)CDirectorTacticalServices::IsVisibleToTeam(v24v33230a30))
|| (
v34 = *(float *)a2,
    
v35 = *(float *)(a2 4),
    
v36 = *(float *)(a2 8) + 1.0,
    (
unsigned __int8)CDirectorTacticalServices::IsVisibleToTeam(v24, &v34230a30)) )
{
v6 CDirector::IsLocationFoggedToSurvivors(TheDirectora2);


-------- 
server.dll ---------
v17 = *(_DWORD *)a1;
v18 = *((_DWORD *)a1 1);
v19 a1[2] + 56.799999;
if ( (
unsigned __int8)sub_1028C920(&v17230.0v50)
    || (
v17 = *(_DWORD *)a1,
        
v18 = *((_DWORD *)a1 1),
        
v19 a1[2] + 35.5,
        (
unsigned __int8)sub_1028C920(&v17230.0v50))
    || (
v17 = *(_DWORD *)a1,
        
v18 = *((_DWORD *)a1 1),
        
v19 a1[2] + 1.0,
        (
unsigned __int8)sub_1028C920(&v17230.0v50)) )
{
    if ( !(
unsigned __int8)sub_10262D00(a1) ) 

But, here's the problem, the contents of the "sub_1028C920" and "IsVisibleToTeam" functions look completely different. The windows version seems to have merged "IsVisibleToTeam" and "IsVisibleToPlayer" together, not separated.

So, how to make the signature of the windwos version of "IsVisibleToPlayer".
fdxx is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 01-10-2022 , 04:33   Re: L4D2 windows signature help
Reply With Quote #2

Untested:
PHP Code:
/**
 * IsVisibleToPlayer(Vector const&, CBasePlayer *, int, int, float, CBaseEntity const*, TerrorNavArea **, bool *)
 *
 * How to find on Windows:
 * 1. Search for the "Tank/Witch threat spawn: No non-visible valid areas between threat area and goal area! Choosing random area.\n" string.
 * 2. The string can only be found in "CDirector::OnThreatEncountered".
 * 3. The function "CDirector::OnThreatEncountered" calls "CDirectorTacticalServices::IsSpawnLocationVisibleToTeam" with the values "2" and "3" passed to it.
 * 4. The last function call in "CDirectorTacticalServices::IsSpawnLocationVisibleToTeam" should be this function.
 **/
"IsVisibleToPlayer"
{
    
"library"    "server"
    "linux"        "@_Z17IsVisibleToPlayerRK6VectorP11CBasePlayeriifPK11CBaseEntityPP13TerrorNavAreaPb"
    "windows"    "\x55\x8B\x2A\x81\xEC\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x33\x2A\x89\x2A\x2A\x8B\x2A\x2A\x8B\x2A\x2A\x53\x8B\x2A\x2A\x56\x8B\x2A\x2A\xC6"
            
/* 55 8B ? 81 EC ? ? ? ? A1 ? ? ? ? 33 ? 89 ? ? 8B ? ? 8B ? ? 53 8B ? ? 56 8B ? ? C6 */

__________________
Psyk0tik is offline
fdxx
Member
Join Date: Oct 2020
Location: 0xdeadbeef
Old 01-10-2022 , 04:58   Re: L4D2 windows signature help
Reply With Quote #3

@Psyk0tik Thank you very much
fdxx is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode