.text:59F0D3BA
.text:59F0D3BA ; *************** S U B R O U T I N E ***************************************
.text:59F0D3BA
.text:59F0D3BA
.text:59F0D3BA long __stdcall ATL::AtlIPersistStreamInit_Load(struct IStream *, struct ATL::ATL_PROPMAP_ENTRY *, void *, struct IUnknown *, bool) proc near
.text:59F0D3BA mov eax, offset loc_59FC730E
.text:59F0D3BF call __EH_prolog
.text:59F0D3BF
.text:59F0D3C4 sub esp, 18h ; (5)第三次到达这里,插入SEH后,这个SEH最后被溢出覆盖了
.text:59F0D3C7 mov eax, [ebp+8]
.text:59F0D3CA push ebx
.text:59F0D3CB push esi
.text:59F0D3CC xor esi, esi
.text:59F0D3CE
cmp
eax, esi
.text:59F0D3D0 push edi
.text:59F0D3D1 jz loc_59F0D603
.text:59F0D3D1
.text:59F0D3D7 mov ebx, [ebp+0Ch] ; ATL::ATL_PROPMAP_ENTRY * `public: static struct ATL::ATL_PROPMAP_ENTRY * __stdcall CMPEG2TuneRequest::GetPropertyMap(void)
'::`2'
::pPropMap
.text:59F0D3DA
cmp
ebx, esi
.text:59F0D3DC jz loc_59F0D603
.text:59F0D3DC
.text:59F0D3E2
cmp
[ebp+10h], esi
.text:59F0D3E5 jz loc_59F0D603
.text:59F0D3E5
.text:59F0D3EB
cmp
[ebp+14h], esi
.text:59F0D3EE jz loc_59F0D603
.text:59F0D3EE
.text:59F0D3F4
cmp
byte ptr [ebp+18h], 0
.text:59F0D3F8 mov [ebp+0Ch], esi
.text:59F0D3FB jz short loc_59F0D422 ; (3)第二次进入的时候这里跳走了
.text:59F0D3FB ; (6)第三次进入的时候也跳走了
.text:59F0D3FB
.text:59F0D3FD mov ecx, [eax]
.text:59F0D3FF push esi
.text:59F0D400 push 4
.text:59F0D402 lea edx, [ebp-14h] ; Buffer
.text:59F0D405 push edx
.text:59F0D406 push eax
.text:59F0D407 call dword ptr [ecx+0Ch] ; (1)mshtml!FatStream::Read,第一次读取最前面4个字节
.text:59F0D40A
cmp
eax, esi
.text:59F0D40C mov [ebp+0Ch], eax
.text:59F0D40F jl loc_59F0D608
.text:59F0D40F
.text:59F0D415
cmp
dword ptr [ebp-14h], 300h ; [ebp-14]==0x300
.text:59F0D41C ja loc_59F0D5C7
.text:59F0D41C
.text:59F0D422
.text:59F0D422 loc_59F0D422: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+41j
.text:59F0D422 mov [ebp+18h], esi
.text:59F0D425
cmp
[ebx+8], esi
.text:59F0D428 mov [ebp-4], esi
.text:59F0D42B mov [ebp-10h], esi
.text:59F0D42E jz loc_59F0D5ED
.text:59F0D42E
.text:59F0D434 mov [ebp-14h], ebx
.text:59F0D434
.text:59F0D437
.text:59F0D437 loc_59F0D437: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+1F4j
.text:59F0D437 mov eax, [ebx+0Ch]
.text:59F0D43A
cmp
eax, esi
.text:59F0D43C jz short loc_59F0D489 ; (7)第三次进入的时候这里跳走了
.text:59F0D43C
.text:59F0D43E push 4
.text:59F0D440 mov esi, eax
.text:59F0D442 pop ecx
.text:59F0D443 mov edi, offset __GUID_2a6e293d_2595_11d3_b64c_00c04f79498e
.text:59F0D448 xor eax, eax
.text:59F0D44A repe cmpsd
.text:59F0D44C jnz short loc_59F0D487
.text:59F0D44C
.text:59F0D44E call dword ptr [ebx+8]
.text:59F0D451
test
eax, eax
.text:59F0D453 jz loc_59F0D5B6
.text:59F0D453
.text:59F0D459 mov ecx, [ebx+10h]
.text:59F0D45C add ecx, [ebp+10h]
.text:59F0D45F push 0
.text:59F0D461 push dword ptr [ebp+14h]
.text:59F0D464 push ecx
.text:59F0D465 push eax
.text:59F0D466 push dword ptr [ebp+8]
.text:59F0D469 call ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool) ; (2)重入
.text:59F0D469 ; (4)又一次重入
.text:59F0D469
.text:59F0D46E
test
eax, eax
.text:59F0D470 mov [ebp+0Ch], eax
.text:59F0D473 jge loc_59F0D513
.text:59F0D473
.text:59F0D479 mov eax, [ebp+18h]
.text:59F0D47C or dword ptr [ebp-4], 0FFFFFFFFh
.text:59F0D480
test
eax, eax
.text:59F0D482 jmp loc_59F0D5F6
.text:59F0D482
.text:59F0D487 ; ---------------------------------------------------------------------------
.text:59F0D487
.text:59F0D487 loc_59F0D487: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+92j
.text:59F0D487 xor esi, esi
.text:59F0D487
.text:59F0D489
.text:59F0D489 loc_59F0D489: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+82j
.text:59F0D489
cmp
[ebx], esi
.text:59F0D48B jz loc_59F0D5A2
.text:59F0D48B
.text:59F0D491 xor eax, eax
.text:59F0D493 lea edi, [ebp-24h] ; (8)
.text:59F0D496 stosd
.text:59F0D497 stosd
.text:59F0D498 stosd
.text:59F0D499 stosd
.text:59F0D49A mov [ebp-24h], si ; si=0
.text:59F0D49E mov edi, [ebx+10h]
.text:59F0D4A1 mov ecx, [ebx+14h]
.text:59F0D4A4 add edi, [ebp+10h]
.text:59F0D4A7
cmp
ecx, esi
.text:59F0D4A9 mov byte ptr [ebp-4], 1
.text:59F0D4AD jz short loc_59F0D4CE
.text:59F0D4AD
.text:59F0D4AF movzx eax, word ptr [ebx+18h]
.text:59F0D4B3
cmp
eax, 0Bh ; eax==0dh
.text:59F0D4B6 jg short loc_59F0D51A ; (9)跳走了
.text:59F0D4B6
.text:59F0D4B8 jz short loc_59F0D529
.text:59F0D4B8
.text:59F0D4BA
cmp
eax, 2
.text:59F0D4BD jl short loc_59F0D4CE
.text:59F0D4BD
.text:59F0D4BF
cmp
eax, 3
.text:59F0D4C2 jle short loc_59F0D529
.text:59F0D4C2
.text:59F0D4C4
cmp
eax, 4
.text:59F0D4C7 jle short loc_59F0D4CE
.text:59F0D4C7
.text:59F0D4C9
cmp
eax, 7
.text:59F0D4CC jle short loc_59F0D529
.text:59F0D4CC
.text:59F0D4CE
.text:59F0D4CE loc_59F0D4CE: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+F3j
.text:59F0D4CE ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+103j
.text:59F0D4CE ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+10Dj
.text:59F0D4CE ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+163j
.text:59F0D4CE ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+16Dj
.text:59F0D4CE push dword ptr [ebp+8] ;
.text:59F0D4D1 lea ecx, [ebp-24h]
.text:59F0D4D4 call ATL::CComVariant::ReadFromStream(IStream *); (11)这里溢出了!
.text:59F0D4D4
.text:59F0D4D9
cmp
eax, esi
.text:59F0D4DB mov [ebp+0Ch], eax
.text:59F0D4DE jl loc_59F0D5D5
.text:59F0D4DE
.text:59F0D4E4 mov ecx, [ebx+14h]
.text:59F0D4E7
cmp
ecx, esi
.text:59F0D4E9 jz short loc_59F0D542
.text:59F0D4E9
.text:59F0D4EB mov eax, ecx
.text:59F0D4ED shr ecx, 2
.text:59F0D4F0 lea esi, [ebp-1Ch]
.text:59F0D4F3 rep movsd
.text:59F0D4F5 mov ecx, eax
.text:59F0D4F7 and ecx, 3
.text:59F0D4FA lea eax, [ebp-24h]
.text:59F0D4FD rep movsb
.text:59F0D4FF and word ptr [ebp-24h], 0
.text:59F0D504 push eax ; pvarg
.text:59F0D505 mov byte ptr [ebp-1Ch], 0
.text:59F0D509 mov byte ptr [ebp-4], 0
.text:59F0D50D call ds:VariantClear(x)
.text:59F0D50D
.text:59F0D513
.text:59F0D513 loc_59F0D513: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+B9j
.text:59F0D513 xor esi, esi
.text:59F0D515 jmp loc_59F0D5A2
.text:59F0D515
.text:59F0D51A ; ---------------------------------------------------------------------------
.text:59F0D51A
.text:59F0D51A loc_59F0D51A: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+FCj
.text:59F0D51A
cmp
eax, 10h
.text:59F0D51D jl short loc_59F0D4CE ; (10)跳走了
.text:59F0D51D
.text:59F0D51F
cmp
eax, 17h
.text:59F0D522 jle short loc_59F0D529
.text:59F0D522
.text:59F0D524
cmp
eax, 48h
.text:59F0D527 jnz short loc_59F0D4CE
.text:59F0D527
.text:59F0D529
.text:59F0D529 loc_59F0D529: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+FEj
.text:59F0D529 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+108j
.text:59F0D529 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+112j
.text:59F0D529 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+168j
.text:59F0D529 mov eax, [ebp+8]
.text:59F0D52C mov edx, [eax]
.text:59F0D52E push esi
.text:59F0D52F push ecx
.text:59F0D530 push edi
.text:59F0D531 push eax
.text:59F0D532 call dword ptr [edx+0Ch]
.text:59F0D535
cmp
eax, esi
.text:59F0D537 mov [ebp+0Ch], eax
.text:59F0D53A jl loc_59F0D5D5
.text:59F0D53A
.text:59F0D540 jmp short loc_59F0D586
.text:59F0D540
.text:59F0D542 ; ---------------------------------------------------------------------------
.text:59F0D542
.text:59F0D542 loc_59F0D542: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+12Fj
.text:59F0D542 mov eax, [ebp-10h]
.text:59F0D545
cmp
[ebx+0Ch], eax
.text:59F0D548 jz short loc_59F0D573
.text:59F0D548
.text:59F0D54A mov eax, [ebp+18h]
.text:59F0D54D
cmp
eax, esi
.text:59F0D54F jz short loc_59F0D55A
.text:59F0D54F
.text:59F0D551 mov [ebp+18h], esi
.text:59F0D554 mov ecx, [eax]
.text:59F0D556 push eax
.text:59F0D557 call dword ptr [ecx+8]
.text:59F0D557
.text:59F0D55A
.text:59F0D55A loc_59F0D55A: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+195j
.text:59F0D55A mov eax, [ebp+14h]
.text:59F0D55D mov ecx, [eax]
.text:59F0D55F lea edx, [ebp+18h]
.text:59F0D562 push edx
.text:59F0D563 push dword ptr [ebx+0Ch]
.text:59F0D566 push eax
.text:59F0D567 call dword ptr [ecx]
.text:59F0D569
test
eax, eax
.text:59F0D56B jl short loc_59F0D5CE
.text:59F0D56B
.text:59F0D56D mov eax, [ebx+0Ch]
.text:59F0D570 mov [ebp-10h], eax
.text:59F0D570
.text:59F0D573
.text:59F0D573 loc_59F0D573: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+18Ej
.text:59F0D573 lea eax, [ebp-24h]
.text:59F0D576 push eax
.text:59F0D577 push dword ptr [ebx+4]
.text:59F0D57A push dword ptr [ebp+18h]
.text:59F0D57D call ATL::CComDispatchDriver::PutProperty(IDispatch *,long,tagVARIANT *)
.text:59F0D57D
.text:59F0D582
test
eax, eax
.text:59F0D584 jl short loc_59F0D5CE
.text:59F0D584
.text:59F0D586
.text:59F0D586 loc_59F0D586: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+186j
.text:59F0D586
cmp
word ptr [ebp-24h], 0FFFh
.text:59F0D58C mov byte ptr [ebp-4], 0
.text:59F0D590 jnz short loc_59F0D598
.text:59F0D590
.text:59F0D592 mov word ptr [ebp-24h], 8
.text:59F0D592
.text:59F0D598
.text:59F0D598 loc_59F0D598: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+1D6j
.text:59F0D598 lea eax, [ebp-24h]
.text:59F0D59B push eax ; pvarg
.text:59F0D59C call ds:VariantClear(x)
.text:59F0D59C
.text:59F0D5A2
.text:59F0D5A2 loc_59F0D5A2: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+D1j
.text:59F0D5A2 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+15Bj
.text:59F0D5A2 mov ebx, [ebp-14h] ; (18)这里由于前面的溢出,[ebp-14]被覆盖,为0
.text:59F0D5A5 add ebx, 20h
.text:59F0D5A8
cmp
[ebx+8], esi ; (19)这里访问0x00000028处内存,触发了Access Violation
.text:59F0D5AB mov [ebp-14h], ebx
.text:59F0D5AE jnz loc_59F0D437
.text:59F0D5AE
.text:59F0D5B4 jmp short loc_59F0D5ED
.text:59F0D5B4
.text:59F0D5B6 ; ---------------------------------------------------------------------------
.text:59F0D5B6
.text:59F0D5B6 loc_59F0D5B6: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+99j
.text:59F0D5B6 mov eax, [ebp+18h]
.text:59F0D5B9 or dword ptr [ebp-4], 0FFFFFFFFh
.text:59F0D5BD
test
eax, eax
.text:59F0D5BF jz short loc_59F0D5C7
.text:59F0D5BF
.text:59F0D5C1 mov ecx, [eax]
.text:59F0D5C3 push eax
.text:59F0D5C4 call dword ptr [ecx+8]
.text:59F0D5C4
.text:59F0D5C7
.text:59F0D5C7 loc_59F0D5C7: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+62j
.text:59F0D5C7 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+205j
.text:59F0D5C7 mov eax, 80004005h
.text:59F0D5CC jmp short loc_59F0D608
.text:59F0D5CC
.text:59F0D5CE ; ---------------------------------------------------------------------------
.text:59F0D5CE
.text:59F0D5CE loc_59F0D5CE: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+1B1j
.text:59F0D5CE ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+1CAj
.text:59F0D5CE mov dword ptr [ebp+0Ch], 80004005h
.text:59F0D5CE
.text:59F0D5D5
.text:59F0D5D5 loc_59F0D5D5: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+124j
.text:59F0D5D5 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+180j
.text:59F0D5D5
cmp
word ptr [ebp-24h], 0FFFh
.text:59F0D5DB jnz short loc_59F0D5E3
.text:59F0D5DB
.text:59F0D5DD mov word ptr [ebp-24h], 8
.text:59F0D5DD
.text:59F0D5E3
.text:59F0D5E3 loc_59F0D5E3: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+221j
.text:59F0D5E3 lea eax, [ebp-24h]
.text:59F0D5E6 push eax ; pvarg
.text:59F0D5E7 call ds:VariantClear(x)
.text:59F0D5E7
.text:59F0D5ED
.text:59F0D5ED loc_59F0D5ED: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+74j
.text:59F0D5ED ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+1FAj
.text:59F0D5ED mov eax, [ebp+18h]
.text:59F0D5F0 or dword ptr [ebp-4], 0FFFFFFFFh
.text:59F0D5F4
cmp
eax, esi
.text:59F0D5F4
.text:59F0D5F6
.text:59F0D5F6 loc_59F0D5F6: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+C8j
.text:59F0D5F6 jz short loc_59F0D5FE
.text:59F0D5F6
.text:59F0D5F8 mov ecx, [eax]
.text:59F0D5FA push eax
.text:59F0D5FB call dword ptr [ecx+8]
.text:59F0D5FB
.text:59F0D5FE
.text:59F0D5FE loc_59F0D5FE: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool):loc_59F0D5F6j
.text:59F0D5FE mov eax, [ebp+0Ch]
.text:59F0D601 jmp short loc_59F0D608
.text:59F0D601
.text:59F0D603 ; ---------------------------------------------------------------------------
.text:59F0D603
.text:59F0D603 loc_59F0D603: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+17j
.text:59F0D603 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+22j
.text:59F0D603 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+2Bj
.text:59F0D603 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+34j
.text:59F0D603 mov eax, 80004003h
.text:59F0D603
.text:59F0D608
.text:59F0D608 loc_59F0D608: ; CODE XREF: ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+55j
.text:59F0D608 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+212j
.text:59F0D608 ; ATL::AtlIPersistStreamInit_Load(IStream *,ATL::ATL_PROPMAP_ENTRY *,void *,IUnknown *,bool)+247j
.text:59F0D608 mov ecx, [ebp-0Ch]
.text:59F0D60B pop edi
.text:59F0D60C pop esi
.text:59F0D60D pop ebx
.text:59F0D60E mov large fs:0, ecx
.text:59F0D615 leave
.text:59F0D616 retn 14h
.text:59F0D616
.text:59F0D616 long __stdcall ATL::AtlIPersistStreamInit_Load(struct IStream *, struct ATL::ATL_PROPMAP_ENTRY *, void *, struct IUnknown *, bool) endp ; sp = 4
.text:59F0D616
.text:59F0D616 ; ---------------------------------------------------------------------------