Function at 0x422770
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Reference http user-agent string
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47edf0
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x49b024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x35], 0
cmp dword [ebp - 0x30], 0
je 0x42299b
push 0
push 0x50
push str.map.baidu.com
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x3c], eax
push 0
push 0
push 0
push 0
push 0x48b064
push 0x48b068
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x42299b
push 0x20000000
push 0xffffffffffffffff
push 0x48b070
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
push 0x20000000
push 0xffffffffffffffff
push 0x48b0a4
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
push 0x20000000
push 0xffffffffffffffff
push 0x48b0e0
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
push 0x20000000
push 0xffffffffffffffff
push 0x48b1e0
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
push 0x20000000
push 0xffffffffffffffff
push 0x48b2e0
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x42299b
push 0
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x42299b
mov dword [ebp - 0x44], 0
push 0
lea eax, [ebp - 0x44]
push eax
push 0
push 0
push 0x16
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov eax, dword [ebp - 0x44]
shr eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042f601
add esp, 4
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x40], eax
push 0
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x40]
push edx
push 0
push 0x16
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ecx, dword [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x60]
call fcn.0040ce20
mov dword [ebp - 4], 0
push 0
push str.Set_Cookie:
lea ecx, [ebp - 0x60]
call fcn.0040cef0
mov dword [ebp - 0x64], eax
mov edx, dword [ebp - 0x64]
cmp edx, dword [0x490c18]
je 0x42298c
mov eax, dword [ebp - 0x64]
push eax
push 0x48b338
lea ecx, [ebp - 0x60]
call fcn.0040cef0
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
sub ecx, dword [ebp - 0x64]
sub ecx, 4
push ecx
mov edx, dword [ebp - 0x64]
add edx, 4
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x60]
call fcn.0040cf40
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x74], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x74]
push edx
mov ecx, dword [ebp + 8]
call fcn.0040cea0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00409b30
mov byte [ebp - 0x35], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00409b30
cmp dword [ebp - 0x34], 0
je 0x4229ab
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x3c], 0
je 0x4229bb
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x30], 0
je 0x4229cb
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, byte [ebp - 0x35]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ec7a
mov esp, ebp
pop ebp
ret