Function at 0x40c460
Capabilities:
Create http request
Get http content length
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push 0
push 0
push 0
push 1
mov esi, ecx
push 0
mov dword [esi + 0xc], 0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 0x10], eax
test eax, eax
jne 0x40c4b2
push str.Internet_open_failed_
push 0x46d7d0
call fcn.0040b020
push eax
call fcn.0040bc60
mov eax, dword [esi + 0x10]
add esp, 0xc
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [0x469cb4]
mov eax, dword [edx + 0xc]
push edi
mov ecx, 0x469cb4
call eax
add eax, 0x10
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40c4f5
test eax, 0xffff0000
jne 0x40c4f5
movzx edi, ax
push 0
push edi
call fcn.00401340
add esp, 8
test eax, eax
je 0x40c4fe
push edi
push eax
lea ecx, [ebp - 4]
call fcn.00402a60
jmp 0x40c4fe
push eax
lea ecx, [ebp - 4]
call fcn.00402b80
push str.User_Agent:_Mozilla_5.0__Windows_NT_5.1__AppleWebKit_535.19__KHTML__like_Gecko__Chrome_18.0.1025.162_Safari_535.19__r_n
lea ecx, [ebp + 0xc]
call fcn.00408300
push 0x459268
push str.http:__xiazai.zol.com.cn_installer_
push str.referer:
lea ecx, [ebp + 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
call fcn.0040a640
add esp, 0xc
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0040a640
add esp, 0xc
push eax
lea ecx, [ebp - 0xc]
push ecx
call fcn.0040a640
add esp, 0xc
push eax
lea ecx, [ebp + 0xc]
call fcn.00402e10
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c56c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c58b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c5aa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.Accept_Language:zh_cn_r_n
lea ecx, [ebp + 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
call fcn.0040a640
add esp, 0xc
push eax
lea ecx, [ebp + 0xc]
call fcn.00402e10
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c5e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.ContentLength:0_r_n
lea ecx, [ebp + 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
call fcn.0040a640
add esp, 0xc
push eax
lea ecx, [ebp + 0xc]
call fcn.00402e10
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c624
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.Cache_Control:no_cache_r_n
lea ecx, [ebp + 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
call fcn.0040a640
add esp, 0xc
push eax
lea ecx, [ebp + 0xc]
call fcn.00402e10
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c661
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp + 0xc]
cmp dword [edi - 4], 1
push ebx
mov ebx, dword [edi - 0xc]
jle 0x40c67a
push ebx
lea ecx, [ebp + 0xc]
call fcn.00401520
mov edi, dword [ebp + 0xc]
mov edx, dword [esi + 0x10]
push 0
push 0x84000001
push ebx
mov ebx, dword [ebp - 4]
push edi
push ebx
push edx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [esi + 0x14], eax
test eax, eax
jne 0x40c6ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Internet_open_url_failed__Error_code_
push 0x46d7d0
call fcn.0040b020
add esp, 8
mov ecx, eax
call fcn.0040a8b0
push eax
call fcn.0040bc60
mov eax, dword [esi + 0x10]
add esp, 4
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
add edi, 0xfffffff0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c6e7
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
lea eax, [ebx - 0x10]
jmp 0x40c853
mov eax, dword [edi - 8]
push eax
push edi
call fcn.0043f454
xor ebx, ebx
add esp, 8
cmp eax, ebx
jl 0x40c8dc
cmp eax, dword [edi - 8]
jg 0x40c8dc
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov edx, dword [0x469cb4]
mov eax, dword [edx + 0xc]
mov ecx, 0x469cb4
call eax
mov edx, dword [esi + 0x14]
push ebx
lea ecx, [ebp - 8]
push ecx
push ebx
push 0x16
add eax, 0x10
push edx
mov dword [ebp + 0xc], eax
mov dword [ebp - 8], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x40c798
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
je 0x40c77e
cmp eax, 0x7a
jne 0x40c77e
mov eax, dword [ebp - 8]
push eax
call fcn.0043d95e
mov edx, dword [esi + 0x14]
add esp, 4
push 0
lea ecx, [ebp - 8]
push ecx
mov ebx, eax
push ebx
push 0x16
push edx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x40c747
test ebx, ebx
je 0x40c798
mov eax, dword [ebp - 8]
push eax
push ebx
lea ecx, [ebp + 0xc]
call fcn.00409f70
push ebx
call fcn.0043ed6a
add esp, 4
mov edx, dword [esi + 0x14]
push 0
lea ecx, [ebp - 0x18]
push ecx
lea ebx, [esi + 0x1c]
push ebx
push 0x20000005
push edx
mov dword [ebp - 0x18], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
fild dword [ebx]
fld qword [0x4590d8]
mov eax, dword [ebp + 0x10]
push 0
fdiv st(1), st(0)
push 0x80
push 2
push 0
push 3
push 0xc0000000
push eax
fdivp st(1)
fstp dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [esi + 0x20], ebx
cmp ebx, 0xffffffff
jne 0x40c877
push 0x459148
push 0x46d7d0
call fcn.0040b020
push eax
call fcn.0040bc60
mov ecx, dword [esi + 0x14]
add esp, 0xc
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c831
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0xfffffff0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c84d
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c86c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop ebx
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c896
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0xfffffff0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c8b2
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c8d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
push 0x80070057
call fcn.004011e0
int3