当前位置: 首页 > news >正文

NdrpPointerUnmarshallInternal函数分析之pStubMsg--pAllocAllNodesContext的由来

第一部分:


       //
        // Check if this is an allocate all nodes pointer AND that we're
        // not already in an allocate all nodes context.
        //
        if ( ALLOCATE_ALL_NODES(pFormat[1]) && ! pStubMsg->pAllocAllNodesContext )
            {
            fNewAllocAllNodes = TRUE;

            pStubMsg->pAllocAllNodesContext =
                NdrpGetAllocateAllNodesContext(
                    pStubMsg,
                    pFormatPointee );

            *ppMemory = 0;

            fPointeeAlloc = TRUE;


第二部分:
0: kd> r
eax=000964fc
0: kd> p
RPCRT4!NdrpGetAllocateAllNodesContext+0x79:
001b:77c44694 c20800          ret     8
0: kd> p
RPCRT4!NdrpPointerUnmarshall+0x199:
001b:77c46538 894628          mov     dword ptr [esi+28h],eax


0: kd> dx -id 0,0,8951a020 -r1 ((RPCRT4!_MIDL_STUB_MESSAGE *)0x6fae0)
((RPCRT4!_MIDL_STUB_MESSAGE *)0x6fae0)                 : 0x6fae0 [Type: _MIDL_STUB_MESSAGE *]
    [+0x000] RpcMsg           : 0x6fab4 [Type: _RPC_MESSAGE *]
    [+0x004] Buffer           : 0x7b0a54 : 0x5 [Type: unsigned char *]
    [+0x008] BufferStart      : 0x7b0a50 : 0x0 [Type: unsigned char *]
    [+0x00c] BufferEnd        : 0x7b0ab0 : 0xd [Type: unsigned char *]
    [+0x010] BufferMark       : 0x7b0a58 : 0x1e [Type: unsigned char *]
    [+0x014] BufferLength     : 0x2a [Type: unsigned long]
    [+0x018] MemorySize       : 0x0 [Type: unsigned long]
    [+0x01c] Memory           : 0x77d766e8 : 0xa8 [Type: unsigned char *]
    [+0x020] IsClient         : 1 [Type: int]
    [+0x024] ReuseBuffer      : 0 [Type: int]
    [+0x028] pAllocAllNodesContext : 0x0 [Type: NDR_ALLOC_ALL_NODES_CONTEXT *]


0: kd> r
eax=000964fc ebx=77d75382 ecx=77c44694 edx=0006fb90 esi=0006fae0 edi=0006fea8
eip=77c46538 esp=0006f9e4 ebp=0006f9f8 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
RPCRT4!NdrpPointerUnmarshall+0x199:
001b:77c46538 894628          mov     dword ptr [esi+28h],eax ds:0023:0006fb08=00000000

第三部分:

0: kd> p
RPCRT4!NdrpPointerUnmarshall+0x19c:
001b:77c4653b 832700          and     dword ptr [edi],0
0: kd> dx -id 0,0,8951a020 -r1 ((RPCRT4!_MIDL_STUB_MESSAGE *)0x6fae0)
((RPCRT4!_MIDL_STUB_MESSAGE *)0x6fae0)                 : 0x6fae0 [Type: _MIDL_STUB_MESSAGE *]
    [+0x000] RpcMsg           : 0x6fab4 [Type: _RPC_MESSAGE *]
    [+0x004] Buffer           : 0x7b0a54 : 0x5 [Type: unsigned char *]
    [+0x008] BufferStart      : 0x7b0a50 : 0x0 [Type: unsigned char *]
    [+0x00c] BufferEnd        : 0x7b0ab0 : 0xd [Type: unsigned char *]
    [+0x010] BufferMark       : 0x7b0a58 : 0x1e [Type: unsigned char *]
    [+0x014] BufferLength     : 0x2a [Type: unsigned long]
    [+0x018] MemorySize       : 0x0 [Type: unsigned long]
    [+0x01c] Memory           : 0x77d766e8 : 0xa8 [Type: unsigned char *]
    [+0x020] IsClient         : 1 [Type: int]
    [+0x024] ReuseBuffer      : 0 [Type: int]
    [+0x028] pAllocAllNodesContext : 0x964fc [Type: NDR_ALLOC_ALL_NODES_CONTEXT *]


0: kd> dx -id 0,0,8951a020 -r1 ((RPCRT4!NDR_ALLOC_ALL_NODES_CONTEXT *)0x964fc)
((RPCRT4!NDR_ALLOC_ALL_NODES_CONTEXT *)0x964fc)                 : 0x964fc [Type: NDR_ALLOC_ALL_NODES_CONTEXT *]
    [+0x000] AllocAllNodesMemory : 0x96488 : 0x0 [Type: unsigned char *]
    [+0x004] AllocAllNodesMemoryBegin : 0x96488 : 0x0 [Type: unsigned char *]
    [+0x008] AllocAllNodesMemoryEnd : 0x964fc : 0x88 [Type: unsigned char *]

相关文章:

  • vmare pro安装报错用户在命令行上发出了EULAS_AGREED=1,表示不接受许可协议的错误解决方法
  • MCP:如何通过模型控制推理助力AI模型实现“深度思考”?
  • timerfd定时器时间轮定时器
  • 机器学习:【抛掷硬币的贝叶斯后验概率】
  • 使用OpenAMP多核框架RPMsg实现高效控制和通信设计
  • 二极管钳位电路——Multisim电路仿真
  • 《Windows系统Java环境安装指南:从JDK17下载到环境变量配置》
  • leetcode 143. 重排链表
  • 解答UnityShader学习过程中的一些疑惑(持续更新中)
  • 在 Spring Boot 中实现异常处理的全面指南
  • Callable Future 实现多线程按照顺序上传文件
  • 知识付费平台推荐及对比介绍
  • 更新日期自动填充
  • ESG跨境电商怎么样?esg跨境电商有哪些功用?
  • 【动手学大模型开发】使用 LLM API:ChatGPT
  • 使用Curl进行本地MinIO的操作
  • 30天通过软考高项-第六天
  • MTKAndroid12-13-开机应用自启功能实现
  • Vue 对话框出现时,为什么滚动鼠标还是能滚动底层元素
  • Spring系列四:AOP切面编程第三部分
  • A股三大股指小幅低收:电力股大幅调整,两市成交10221亿元
  • 外交部官方公众号发布视频:不跪!
  • 王星昊再胜连笑,夺得中国围棋天元赛冠军
  • 新经济与法|如何治理网购刷单与控评?数据合规管理是关键
  • 最近这75年,谁建造了上海?
  • 经济日报:多平台告别“仅退款”,规则调整有何影响