[原]ComFriendlyWaitMtaThreadProc

c++代码(大体逻辑没问题,细节需要确认)
  1. DWORD __stdcall *ComFriendlyWaitMtaThreadProc(LPVOID lpThreadParameter)
  2. {
  3. CoInitializeEx(0,0);
  4. ThreadParam* pParam =(ThreadParam*)lpThreadParameter;
  5. ComFriendlyWaiter* pData =newComFriendlyWaiter(pParam->p2, pParam->p1);
  6. hr =CoMarshalInterThreadInterfaceInStream(GUID_6d5140c1_7436_11ce_8034_00aa006009fa, pData,&pStream);
  7. pData->Release();
  8. SetEvent(pParam->hEvent);
  9. WaitForSingleObject(pParam->hXXX);
  10. CoUninitialize();
  11. }
 
 
 
汇编码
  1. uiautomationcore!ComFriendlyWaitMtaThreadProc:
  2. 7303f5f18bff mov edi,edi
  3. 7303f5f355 push ebp
  4. 7303f5f48bec mov ebp,esp
  5. 7303f5f656 push esi
  6. 7303f5f757 push edi
  7. 7303f5f86a00 push 0
  8. 7303f5fa6a00 push 0
  9. 7303f5fc ff1504130373 call dword ptr [uiautomationcore!_imp__CoInitializeEx (73031304)]
  10. 7303f6026a18 push 18h
  11. 7303f604 e80c34ffff call uiautomationcore!operatornew(73032a15)
  12. 7303f6098b7d08 mov edi,dword ptr [ebp+8]
  13. 7303f60c59 pop ecx
  14. 7303f60d85c0 test eax,eax
  15. 7303f60f7452 je uiautomationcore!ComFriendlyWaitMtaThreadProc+0x2e(7303f663)Branch
  16. uiautomationcore!ComFriendlyWaitMtaThreadProc+0x20:
  17. 7303f611 ff7704 push dword ptr [edi+4]
  18. 7303f6148bc8 mov ecx,eax
  19. 7303f616 ff37 push dword ptr [edi]
  20. 7303f618 e84f000000 call uiautomationcore!ComFriendlyWaiter::ComFriendlyWaiter(7303f66c)
  21. uiautomationcore!ComFriendlyWaitMtaThreadProc+0x30:
  22. 7303f61d8bf0 mov esi,eax
  23. 7303f61f83c008 add eax,8
  24. 7303f622 f7de neg esi
  25. 7303f6241bf6 sbb esi,esi
  26. 7303f62623f0 and esi,eax
  27. 7303f6288d470c lea eax,[edi+0Ch]
  28. 7303f62b50 push eax
  29. 7303f62c56 push esi
  30. 7303f62d68e4230373 push offset uiautomationcore!_GUID_6d5140c1_7436_11ce_8034_00aa006009fa (730323e4)
  31. 7303f632 ff150c130373 call dword ptr [uiautomationcore!_imp__CoMarshalInterThreadInterfaceInStream (7303130c)]
  32. 7303f638894708 mov dword ptr [edi+8],eax
  33. 7303f63b8b06 mov eax,dword ptr [esi]
  34. 7303f63d56 push esi
  35. 7303f63e ff5008 call dword ptr [eax+8]
  36. 7303f641 ff7710 push dword ptr [edi+10h]
  37. 7303f644 ff152c120373 call dword ptr [uiautomationcore!_imp__SetEvent (7303122c)]
  38. 7303f64a6aff push 0FFFFFFFFh
  39. 7303f64c ff7714 push dword ptr [edi+14h]
  40. 7303f64f ff1528120373 call dword ptr [uiautomationcore!_imp__WaitForSingleObject (73031228)]
  41. 7303f655 ff1508130373 call dword ptr [uiautomationcore!_imp__CoUninitialize (73031308)]
  42. 7303f65b5f pop edi
  43. 7303f65c33c0 xor eax,eax
  44. 7303f65e5e pop esi
  45. 7303f65f5d pop ebp
  46. 7303f660 c20400 ret 4
  47. uiautomationcore!ComFriendlyWaitMtaThreadProc+0x2e:
  48. 7303f66333c0 xor eax,eax
  49. 7303f665 ebb6 jmp uiautomationcore!ComFriendlyWaitMtaThreadProc+0x30(7303f61d)Branch
 
 





posted @ 2016-12-27 14:57  BCN  阅读(272)  评论(0编辑  收藏  举报