Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Line 126 (code remove):
- char, timeout <- removed 'timeout'
- Line 214 (code edition):
- CDefaultUserAgent db "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/5.0)",0
- Line 220 (code addition):
- db "Accept-Language: en-US",13,10
- line 225 (code edition):
- db "User-Agent: %s",13,10,13,10,0
- Line 267 (code edition):
- invoke MemAlloc, 15000 -> invoke MemAlloc, 32000
- Line 274 (code edition):
- invoke NetRecvUntilChar, s, stream, 64000, 0ah, 30 -> invoke NetRecvUntilChar, s, stream, 64000, 0ah
- Line 390 (code edition/deletion):
- .data -> .code
- Line 392 (comment addition):
- ; do not move this block to .data, - MS FIX
- Line 396 (code addition):
- db "Accept-Language: en-US",13,10
- Line 400 (code edition):
- db "User-Agent: %s",13,10,13,10,0
- Line 409 (Code addition):
- LOCAL pUserAgent: DWORD
- LOCAL cbUserAgent: DWORD
- Line 422 (code addition):
- invoke MemAlloc, 8192
- mov pUserAgent, eax
- mov cbUserAgent, 8192
- Line 458 (instruction added):
- cld
- Line 477 (code edition/addition):
- invoke ObtainUserAgentString, 0, pUserAgent, addr cbUserAgent
- test eax, eax
- .IF SUCCEEDED
- invoke wsprintf, pFmt, offset szHTTPHdrFmt, pURL, pHost, pUserAgent
- .ELSE
- invoke wsprintf, pFmt, offset szHTTPHdrFmt, pURL, pHost, offset CDefaultUserAgent
- .ENDIF
- Line 511 (code addition):
- invoke MemFree, pUserAgent
- Line 541 (code edition):
- mov l.l_linger, 30 -> mov l.l_linger, 45
- Line 546 (procedure modification):
- MyUploadWithRedir proc uses edi ebx szLink, lpData, dwLen, lpOutStream, lpszRedir
- LOCAL uc: URL_COMPONENTS
- LOCAL pHost: DWORD
- LOCAL pFmt: DWORD
- LOCAL pURL: DWORD
- LOCAL s: DWORD
- LOCAL len: DWORD
- LOCAL pUserAgent: DWORD
- LOCAL cbUserAgent: DWORD
- xor ebx, ebx
- invoke MemAlloc, 4096
- mov pHost, eax
- invoke MemAlloc, 4096
- mov pURL, eax
- invoke MemAlloc, 4096
- mov pFmt, eax
- invoke MemAlloc, 4096
- mov pUserAgent, eax
- mov cbUserAgent, 4096
- lea edi, uc
- mov ecx, sizeof URL_COMPONENTS
- xor eax, eax
- rep stosb
- mov uc.dwStructSize, sizeof URL_COMPONENTS
- push pHost
- pop uc.lpszHostName
- push pURL
- pop uc.lpszUrlPath
- mov uc.dwHostNameLength, 4095
- mov uc.dwUrlPathLength, 4095
- invoke InternetCrackUrl, szLink, 0, ICU_ESCAPE, addr uc
- .IF (!eax) || (uc.lpszHostName == NULL)
- jmp @md_ret
- Line 621 (code edition/addition):
- invoke ObtainUserAgentString, 0, pUserAgent, addr cbUserAgent
- test eax, eax
- .IF SUCCEEDED
- invoke wsprintf, pFmt, offset szHTTPSendFmt, pURL, pHost, dwLen, pUserAgent
- .ELSE
- invoke wsprintf, pFmt, offset szHTTPSendFmt, pURL, pHost, dwLen, offset CDefaultUserAgent
- .ENDIF
- Line 658 (code edition):
- invoke NetWorks, s, lpOutStream, addr lpszRedir -> invoke NetWorks, s, lpOutStream, lpszRedir
- Line 669 (code addition):
- invoke MemFree, pUserAgent
- Line 671 (code addition):
- mov eax, ebx
- ret
- MyUploadWithRedir endp
- MyUpload proc szLink, lpData, dwLen, lpOutStream
- LOCAL lpszRedir: DWORD
- mov eax, lpOutStream
- .IF eax
- mov dword ptr[eax], 0
- .ENDIF
- mov lpszRedir, NULL
- invoke MyUploadWithRedir, szLink, lpData, dwLen, lpOutStream, addr lpszRedir
- Line 686 (code addition):
- invoke MyUploadWithRedir, lpszRedir, lpData, dwLen, lpOutStream, NULL
- push eax
- Line 689 (code addition):
- pop eax
- Line 690 (code deletion):
- mov eax, ebx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement