我把整个问题放在 2 张图片中。从研究来看,我似乎需要使用Ctrl+ R,但我认为这不是我需要的,因为我无法进一步降低数字以达到 0。
我认为问题在于我没有structs正确创建。
我想补充一些猜测,因为 PlayerPointers 数组是每个元素 4 个字节,所以数字下降到 16072。所以它下降了64288 / 4 = 16072。
我仍然不知道那是什么意思。

ASM 代码:
.text:0040E040 ; =============== S U B R O U T I N E =======================================
.text:0040E040
.text:0040E040
.text:0040E040 ; struct_ARENA *__thiscall code(struct_PLAYER *player, const void *buf, unsigned int len, int a4)
.text:0040E040 sub_40E040 proc near
.text:0040E040
.text:0040E040
.text:0040E040 buf = dword ptr 4
.text:0040E040 len = dword ptr 8
.text:0040E040 a4 = dword ptr 0Ch
.text:0040E040
.text:0040E040 push ebx
.text:0040E041 push esi
.text:0040E042 mov esi, ecx
.text:0040E044 mov eax, [esi+1Ch]
.text:0040E047 test eax, eax
.text:0040E049 jz short loc_40E093
.text:0040E04B mov ecx, [eax+0FF0Ch]
.text:0040E051 xor ebx, ebx
.text:0040E053 test ecx, ecx
.text:0040E055 jle short loc_40E093
.text:0040E057 push edi
.text:0040E058 push ebp
.text:0040E059 mov ebp, [esp+10h+a4]
.text:0040E05D mov edi, 0FB20h
.text:0040E062
.text:0040E062 loc_40E062:
.text:0040E062 mov eax, [edi+eax]
.text:0040E065 cmp eax, esi
.text:0040E067 jz short loc_40E082
.text:0040E069 mov ecx, [eax+38h]
.text:0040E06C test ecx, ecx
.text:0040E06E jnz short loc_40E082
.text:0040E070 mov ecx, [esp+10h+len]
.text:0040E074 mov edx, [esp+10h+buf]
.text:0040E078 push ebp ; a4
.text:0040E079 push ecx ; len
.text:0040E07A push edx ; buf
.text:0040E07B mov ecx, eax ; this
.text:0040E07D call SendPlayerReliablePacket
.text:0040E082
.text:0040E082 loc_40E082:
.text:0040E082
.text:0040E082 mov eax, [esi+1Ch]
.text:0040E085 inc ebx
.text:0040E086 add edi, 4
.text:0040E089 cmp ebx, [eax+0FF0Ch]
.text:0040E08F jl short loc_40E062
.text:0040E091 pop ebp
.text:0040E092 pop edi
.text:0040E093
.text:0040E093 loc_40E093:
.text:0040E093
.text:0040E093 pop esi
.text:0040E094 pop ebx
.text:0040E095 retn 0Ch
.text:0040E095 sub_40E040 endp
.text:0040E095 ; ---------------------------------------------------------------------------
.text:0040E098 align 10h
这是一个看起来更好的结构,只有 1 个结构而不是 2 个,但仍然存在同样的问题

这是不看比赛但在玩游戏的玩家数量。
int __thiscall TotalPlayingPlayers(struct_ARENA *arena)
{
int ArenaPlayerCount; // edx@1
int result; // eax@1
struct_PLAYER **eachPlayer; // ecx@2
ArenaPlayerCount = arena->ArenaPlayerCount;
result = 0;
if ( ArenaPlayerCount > 0 )
{
eachPlayer = arena->playerPointersForSomething;// How could this be like this? this would only hold 251 4 bytes not enough for all players.
do
{
if ( (*eachPlayer)->Ship != 8 )
++result;
++eachPlayer; // This means it really has to go up by 4 bytes the small 251 array.
--ArenaPlayerCount;
}
while ( ArenaPlayerCount );
}
return result;
}
