Wird nicht von langem Nutzen sein, da das AhnHSRequest Packet nicht richtig beantwortet wird und man so nach ca. 30min. gekickt wird (mit darauffolgendem temp. IP-Block).
Packet ID: 204
Packet Handler Function Address: 0x41F3B0
Pseudocode aus dem Client:
Code:
char __thiscall CPythonNetworkStream__RecvAhnHSRequestPacket(CPythonNetworkStream *this)
{
CPythonNetworkStream *self; // esi@1
char worked; // al@2
int v3; // eax@3
unsigned __int8 response[403]; // [sp+8h] [bp-330h]@3
unsigned __int8 packet[403]; // [sp+1A0h] [bp-198h]@1
self = this;
if ( CNetworkStream__Recv(&this->baseclass, 403, packet) )
{
memset(response, 0, 400u);
*(_WORD *)&response[400] = 0;
response[402] = 0;
response[0] = 203;
v3 = _AhnHS_MakeResponse(&packet[1], *(unsigned __int16 *)&packet[401], &response[1]);
if ( v3 )
{
TraceError("HShield: _AhnHS_MakeResponse return error(%u)", v3);
worked = 0;
}
else
{
if ( CNetworkStream__Send(&self->baseclass, 403, response) )
{
worked = 1;
}
else
{
TraceError("HShield: Send failed");
worked = 0;
}
}
}
else
{
TraceError("HShield: Recv failed");
worked = 0;
}
return worked;
}
ASM Code (aus dem Client):
Code:
.text:0041F3B0 ; char __thiscall CPythonNetworkStream__RecvAhnHSRequestPacket(CPythonNetworkStream *this)
.text:0041F3B0 ?RecvAhnHSRequestPacket@CPythonNetworkStream@@IAE_NXZ proc near
.text:0041F3B0 ; CODE XREF: CPythonNetworkStream::GamePhase(void)+4DDp
.text:0041F3B0
.text:0041F3B0 response = byte ptr -330h
.text:0041F3B0 packet = byte ptr -198h
.text:0041F3B0
.text:0041F3B0 push ebp
.text:0041F3B1 mov ebp, esp
.text:0041F3B3 and esp, 0FFFFFFF8h
.text:0041F3B6 sub esp, 330h
.text:0041F3BC push esi
.text:0041F3BD push edi
.text:0041F3BE lea eax, [esp+338h+packet]
.text:0041F3C5 push eax ; buf
.text:0041F3C6 push 193h ; size
.text:0041F3CB mov esi, ecx
.text:0041F3CD call ?Recv@CNetworkStream@@QAE_NHPAD@Z ; CNetworkStream::Recv(int,char *)
.text:0041F3D2 test al, al
.text:0041F3D4 jnz short loc_41F3EB
.text:0041F3D6 push offset aHshieldRecvFai ; "HShield: Recv failed"
.text:0041F3DB call ?TraceError@@YAXPBDZZ ; TraceError(char const *,...)
.text:0041F3E0 add esp, 4
.text:0041F3E3 xor al, al
.text:0041F3E5 pop edi
.text:0041F3E6 pop esi
.text:0041F3E7 mov esp, ebp
.text:0041F3E9 pop ebp
.text:0041F3EA retn
.text:0041F3EB ; ---------------------------------------------------------------------------
.text:0041F3EB
.text:0041F3EB loc_41F3EB: ; CODE XREF: CPythonNetworkStream::RecvAhnHSRequestPacket(void)+24j
.text:0041F3EB movzx edx, word ptr [esp+338h+packet+191h]
.text:0041F3F3 xor eax, eax
.text:0041F3F5 mov ecx, 64h
.text:0041F3FA lea edi, [esp+338h+response]
.text:0041F3FE rep stosd
.text:0041F400 stosw
.text:0041F402 lea ecx, [esp+338h+response+1]
.text:0041F406 push ecx
.text:0041F407 stosb
.text:0041F408 push edx
.text:0041F409 lea eax, [esp+340h+packet+1]
.text:0041F410 push eax
.text:0041F411 mov [esp+344h+response], 0CBh
.text:0041F416 call __AhnHS_MakeResponse
.text:0041F41B test eax, eax
.text:0041F41D jz short loc_41F435
.text:0041F41F push eax ; char
.text:0041F420 push offset aHshield_ahnhs_ ; "HShield: _AhnHS_MakeResponse return err"...
.text:0041F425 call ?TraceError@@YAXPBDZZ ; TraceError(char const *,...)
.text:0041F42A add esp, 8
.text:0041F42D xor al, al
.text:0041F42F pop edi
.text:0041F430 pop esi
.text:0041F431 mov esp, ebp
.text:0041F433 pop ebp
.text:0041F434 retn
.text:0041F435 ; ---------------------------------------------------------------------------
.text:0041F435
.text:0041F435 loc_41F435: ; CODE XREF: CPythonNetworkStream::RecvAhnHSRequestPacket(void)+6Dj
.text:0041F435 lea ecx, [esp+338h+response]
.text:0041F439 push ecx ; packet
.text:0041F43A push 193h ; size
.text:0041F43F mov ecx, esi ; this
.text:0041F441 call ?Send@CNetworkStream@@QAE_NHPBX@Z ; CNetworkStream::Send(int,void const *)
.text:0041F446 test al, al
.text:0041F448 jnz short loc_41F45F
.text:0041F44A push offset aHshieldSendFai ; "HShield: Send failed"
.text:0041F44F call ?TraceError@@YAXPBDZZ ; TraceError(char const *,...)
.text:0041F454 add esp, 4
.text:0041F457 xor al, al
.text:0041F459 pop edi
.text:0041F45A pop esi
.text:0041F45B mov esp, ebp
.text:0041F45D pop ebp
.text:0041F45E retn
.text:0041F45F ; ---------------------------------------------------------------------------
.text:0041F45F
.text:0041F45F loc_41F45F: ; CODE XREF: CPythonNetworkStream::RecvAhnHSRequestPacket(void)+98j
.text:0041F45F pop edi
.text:0041F460 mov al, 1
.text:0041F462 pop esi
.text:0041F463 mov esp, ebp
.text:0041F465 pop ebp
.text:0041F466 retn
.text:0041F466 ?RecvAhnHSRequestPacket@CPythonNetworkStream@@IAE_NXZ endp
Kind Regards Tim