精易论坛

标题: C++转换易语言 [打印本页]

作者: By小城    时间: 2016-8-2 23:32
标题: C++转换易语言
typedef DWORD (__cdecl *TEncryptProc)(DWORD dwBuff,DWORD dwLen,DWORD dwOut,DWORD dwParamB,DWORD dwParamA);
插件中HOOK处理函数如下:
DWORD __cdecl NewEncrypt(DWORD dwBuff,DWORD dwLen,DWORD dwOut,DWORD dwParamB,DWORD dwParamA)
{
TFilterRet FltRet;
g_b_SendFill = true;
//调用滤镜接口,解析序号对应CheckBox创建序号
g_InitIO.Api.FilterOper((char*)(dwBuff),dwLen,2,&FltRet);
if (FltRet.bVis){
if (strlen(FltRet.cName) != 0){
g_InitIO.Api.WriteLog("Send明文",FltRet.cName,(char*)(dwBuff),dwLen,0);
}
else{
g_InitIO.Api.WriteLog("Send明文",CN_PUB_DEFHINT,(char*)(dwBuff),dwLen,0);
}
}
//屏蔽发送则直接返回
if (!FltRet.bCom){
return 1;
}
//调用原发包函数
return OldEncrypt(dwBuff, dwLen, dwOut, dwParamB, dwParamA);
}

这转换易语言求大神帮忙转一下

作者: By小城    时间: 2016-8-2 23:33
void __stdcall DoAttack(DWORD dwParam,DWORD dwEcx)
作者: By小城    时间: 2016-8-2 23:33
void __stdcall DoAttack(DWORD dwParam,DWORD dwEcx)
{
    int i,iMax;
    //攻J轮数
    if (g_b_Seckill){
        iMax = g_i_BulletCountAll;
    }
    else{
        iMax = 1;
    }
    while (iMax > 0){
        if (g_b_Slow){
            //执行一轮攻J,节省子弹模式
            for (i = 0;i4;i++){
                _asm{
                    mov ecx,dwEcx
                }
                OldAttack(dwParam);
            }
        }
        else{
            //执行一轮攻J,打光弹匣
            for (i = 0;iasm{
                    mov ecx,dwEcx
                }
                OldAttack(dwParam);
            }
        }
        //秒换子弹
        _asm{
            pushad
            call DoReloadBullet
            popad
        }
        iMax--;
    }
}
作者: By小城    时间: 2016-8-2 23:34
HRESULT __stdcall NewDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice,D3DPRIMITIVETYPE type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
    HRESULT hRet = S_OK;
    IDirect3DVertexBuffer9* pStreamData = NULL;
    UINT iOffsetInBytes,iStride;
    if(D3D_OK == pDevice->GetStreamSource(0,&pStreamData,&iOffsetInBytes,&iStride)){
        pStreamData->Release();
    }
    if(iStride == g_Stride){                         //g_Stride为调试获得的过滤角色的Stride值
        pDevice->SetRenderState(D3DRS_ZENABLE,FALSE);//禁用Z轴缓冲
        hRet = OldDrawIndexedPrimitive(pDevice,type,BaseVertexIndex,MinVertexIndex,NumVertices,startIndex,primCount);
        pDevice->SetRenderState(D3DRS_ZENABLE,TRUE );//恢复Z轴缓冲
    }
    else{
        hRet = OldDrawIndexedPrimitive(pDevice,type,BaseVertexIndex,MinVertexIndex,NumVertices,startIndex,primCount);
    }
    return hRet;
}
作者: By小城    时间: 2016-8-2 23:34
三段 分开  求大神

作者: 亚凌轩    时间: 2016-8-3 00:05
你这个变量 都没有写全怎么翻译?
作者: 亚凌轩    时间: 2016-8-3 00:07
g_b_Seckill 这个是什么参数?
g_i_BulletCountAll 这个是什么参数?
g_b_Slow 这个是什么参数?

作者: By小城    时间: 2016-8-3 11:02
872158941 发表于 2016-8-3 00:07
g_b_Seckill 这个是什么参数?
g_i_BulletCountAll 这个是什么参数?
g_b_Slow 这个是什么参数?

typedef DWORD (__cdecl *TEncryptProc)(DWORD dwBuff,DWORD dwLen,DWORD dwOut,DWORD dwParamB,DWORD dwParamA);
插件中HOOK处理函数如下:
DWORD __cdecl NewEncrypt(DWORD dwBuff,DWORD dwLen,DWORD dwOut,DWORD dwParamB,DWORD dwParamA)
{
TFilterRet FltRet;
g_b_SendFill = true;
//调用滤镜接口,解析序号对应CheckBox创建序号
g_InitIO.Api.FilterOper((char*)(dwBuff),dwLen,2,&FltRet);
if (FltRet.bVis){
if (strlen(FltRet.cName) != 0){
g_InitIO.Api.WriteLog("Send明文",FltRet.cName,(char*)(dwBuff),dwLen,0);
}
else{
g_InitIO.Api.WriteLog("Send明文",CN_PUB_DEFHINT,(char*)(dwBuff),dwLen,0);
}
}
//屏蔽发送则直接返回
if (!FltRet.bCom){
return 1;
}
//调用原发包函数
return OldEncrypt(dwBuff, dwLen, dwOut, dwParamB, dwParamA);
}

那就这个
作者: By小城    时间: 2016-8-3 11:02
D3D游戏通病,透视用第83个函数IDirect3DDevice9::DrawIndexedPrimitive实现透视
关键点:渲染前后对Z轴缓冲的过滤处理,核心代码:
HRESULT __stdcall NewDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice,D3DPRIMITIVETYPE type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
    HRESULT hRet = S_OK;
    IDirect3DVertexBuffer9* pStreamData = NULL;
    UINT iOffsetInBytes,iStride;
    if(D3D_OK == pDevice->GetStreamSource(0,&pStreamData,&iOffsetInBytes,&iStride)){
        pStreamData->Release();
    }
    if(iStride == g_Stride){                         //g_Stride为调试获得的过滤角色的Stride值
        pDevice->SetRenderState(D3DRS_ZENABLE,FALSE);//禁用Z轴缓冲
        hRet = OldDrawIndexedPrimitive(pDevice,type,BaseVertexIndex,MinVertexIndex,NumVertices,startIndex,primCount);
        pDevice->SetRenderState(D3DRS_ZENABLE,TRUE );//恢复Z轴缓冲
    }
    else{
        hRet = OldDrawIndexedPrimitive(pDevice,type,BaseVertexIndex,MinVertexIndex,NumVertices,startIndex,primCount);
    }
    return hRet;
}


还有这个


麻烦大神




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4