Function at 0x4cac40
Capabilities:
Check http status code
Create http request
Get http content length
Get http response content encoding

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1068
call fcn.0042bac0
mov eax, dword [0x506380]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x824], 0
mov dword [ebp - 0x814], 0
mov byte [ebp - 9], 0
mov dword [ebp - 0x820], 0
mov dword [ebp - 0x81c], 4
mov byte [ebp - 1], 0
mov byte [ebp - 0x815], 0
mov eax, dword [ebp + 8]
push eax
call fcn.004c9a50
add esp, 4
movzx ecx, al
test ecx, ecx
jne 0x4caca8
xor al, al
jmp 0x4cb345
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x5c4]
and eax, 2
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 1], al
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x5c8]
push edx
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x824], eax
cmp dword [ebp - 0x824], 0
jne 0x4cad23
mov eax, dword [ebp + 8]
mov dword [eax + 0x5b4], 4
push 0x4f4d00
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
jmp 0x4cb2c5
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x5b8], 0
jle 0x4cadc0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x5b8]
imul eax, eax, 0x3e8
mov dword [ebp - 0x1054], eax
push 4
lea ecx, [ebp - 0x1054]
push ecx
push 2
mov edx, dword [ebp - 0x824]
push edx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [ebp - 0x1054]
push eax
push 5
mov ecx, dword [ebp - 0x824]
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea edx, [ebp - 0x1054]
push edx
push 6
mov eax, dword [ebp - 0x824]
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [ebp - 0x1054]
push ecx
push 7
mov edx, dword [ebp - 0x824]
push edx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [ebp - 0x1054]
push eax
push 8
mov ecx, dword [ebp - 0x824]
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
movzx edx, byte [ebp - 1]
test edx, edx
je 0x4cadf6
push 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x5c0]
push ecx
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.004d2d70
push eax
mov edx, dword [ebp - 0x824]
push edx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x814], eax
jmp 0x4cae25
push 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x5c0]
push ecx
push 0
push str.Accept_Encoding:_gzip_deflate_r_n
mov ecx, dword [ebp + 8]
call fcn.004d2d70
push eax
mov edx, dword [ebp - 0x824]
push edx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x814], eax
cmp dword [ebp - 0x814], 0
jne 0x4cae6d
mov eax, dword [ebp + 8]
mov dword [eax + 0x5b4], 5
push 0x4f4d58
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
jmp 0x4cb2c5
mov dword [ebp - 0x838], 0
mov dword [ebp - 0x1050], 4
mov dword [ebp - 0x844], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x5c0]
and edx, 0x200000
je 0x4caf76
mov dword [ebp - 0x1058], 0
lea eax, [ebp - 0x1058]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x5d8
push ecx
lea edx, [ebp - 0x838]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x5c0]
push ecx
mov edx, dword [ebp - 0x814]
push edx
mov eax, dword [ebp - 0x824]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004c9970
add esp, 0x1c
movzx edx, al
test edx, edx
jne 0x4caf74
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp dword [eax + 0x5d8], 0
setne cl
add ecx, 6
mov edx, dword [ebp + 8]
mov dword [edx + 0x5b4], ecx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5b4], 6
jne 0x4caf42
push 0x4f4d6c
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
jmp 0x4caf6a
push str.subfail
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
mov ecx, dword [ebp - 0x1058]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
jmp 0x4cb2c5
jmp 0x4cafdb
push 0
lea edx, [ebp - 0x1050]
push edx
lea eax, [ebp - 0x838]
push eax
push 0x20000013
mov ecx, dword [ebp - 0x814]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4cafdb
mov edx, dword [ebp + 8]
mov dword [edx + 0x5b4], 8
push 0x4f4d94
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
jmp 0x4cb2c5
mov dword [ebp - 0x82c], 0x800
push 0x400
push 0
lea eax, [ebp - 0x810]
push eax
call fcn.0041de10
add esp, 0xc
push 0
lea ecx, [ebp - 0x82c]
push ecx
lea edx, [ebp - 0x810]
push edx
push 0x15
mov eax, dword [ebp - 0x814]
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4cb0d6
mov dword [ebp - 0x105c], str.sogouhostaddr:
lea ecx, [ebp - 0x810]
mov dword [ebp - 0x1060], ecx
mov dword [ebp - 0x1064], 0
jmp 0x4cb062
mov edx, dword [ebp - 0x1064]
add edx, 1
mov dword [ebp - 0x1064], edx
mov eax, dword [ebp - 0x1060]
add eax, 2
mov dword [ebp - 0x1060], eax
cmp dword [ebp - 0x1064], 0x400
jge 0x4cb0d6
mov ecx, dword [ebp - 0x1060]
movzx edx, word [ecx]
test edx, edx
je 0x4cb0d1
mov eax, dword [ebp - 0x105c]
push eax
mov ecx, dword [ebp - 0x1060]
push ecx
call fcn.0041b12e
add esp, 8
test eax, eax
je 0x4cb0d1
mov byte [ebp - 0x815], 1
mov edx, dword [ebp - 0x105c]
push edx
call fcn.0041a890
add esp, 4
mov ecx, dword [ebp - 0x1060]
lea edx, [ecx + eax*2]
mov dword [ebp - 0x1068], edx
mov eax, dword [ebp - 0x1068]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x36c
call fcn.004d3670
jmp 0x4cb0d6
jmp 0x4cb044
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x838]
mov dword [ecx + 0x5d4], edx
mov eax, dword [ebp - 0x838]
push eax
call fcn.004c9a30
add esp, 4
movzx ecx, al
test ecx, ecx
jne 0x4cb155
cmp dword [ebp - 0x838], 0x194
jne 0x4cb114
mov edx, dword [ebp + 8]
mov dword [edx + 0x5d8], 4
mov eax, dword [ebp + 8]
mov dword [eax + 0x5b4], 9
push 0x4f4dc8
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3670
mov ecx, dword [ebp - 0x838]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3360
jmp 0x4cb2c5
cmp dword [ebp - 0x838], 0x130
jne 0x4cb175
mov edx, dword [ebp + 8]
mov dword [edx + 0x5d8], 1
mov al, 1
jmp 0x4cb345
push 0
lea eax, [ebp - 0x81c]
push eax
lea ecx, [ebp - 0x820]
push ecx
push 0x20000005
mov edx, dword [ebp - 0x814]
push edx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4cb1a5
mov dword [ebp - 0x820], 0
mov byte [ebp - 0x831], 0
xor eax, eax
mov word [ebp - 0x1048], ax
push 0x7fe
push 0
lea ecx, [ebp - 0x1046]
push ecx
call fcn.0041de10
add esp, 0xc
mov dword [ebp - 0x840], 0x800
push 0
lea edx, [ebp - 0x840]
push edx
lea eax, [ebp - 0x1048]
push eax
push 0x1d
mov ecx, dword [ebp - 0x814]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4cb217
push str.gzip
lea edx, [ebp - 0x1048]
push edx
call fcn.0041a656
add esp, 8
test eax, eax
jne 0x4cb217
mov byte [ebp - 0x831], 1
mov dword [ebp - 0x104c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x830], 1
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x828], 0
mov byte [ebp - 2], 0
cmp dword [ebp - 0x820], 0
jle 0x4cb265
mov byte [ebp - 2], 1
mov eax, dword [ebp - 0x820]
mov dword [ebp - 0x828], eax
jmp 0x4cb26f
mov dword [ebp - 0x828], 0x4000
movzx ecx, byte [ebp - 1]
test ecx, ecx
jne 0x4cb2a3
movzx edx, byte [ebp - 0x831]
push edx
movzx eax, byte [ebp - 2]
push eax
mov ecx, dword [ebp - 0x828]
push ecx
mov edx, dword [ebp - 0x814]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004c9e40
add esp, 0x14
mov byte [ebp - 9], al
jmp 0x4cb2c5
movzx ecx, byte [ebp - 2]
push ecx
mov edx, dword [ebp - 0x828]
push edx
mov eax, dword [ebp - 0x814]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004ca880
add esp, 0x10
mov byte [ebp - 9], al
cmp dword [ebp - 0x814], 0
je 0x4cb2db
mov edx, dword [ebp - 0x814]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x824], 0
je 0x4cb2f1
mov eax, dword [ebp - 0x824]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
movzx ecx, byte [ebp - 9]
test ecx, ecx
jne 0x4cb306
mov edx, dword [ebp + 8]
mov dword [edx + 0x5d0], 0
movzx eax, byte [ebp - 9]
test eax, eax
jne 0x4cb342
movzx ecx, byte [ebp - 0x815]
test ecx, ecx
je 0x4cb342
mov ecx, dword [ebp + 8]
add ecx, 0x36c
call fcn.004d2d70
push eax
push 0x4f4de8
mov ecx, dword [ebp + 8]
add ecx, 0x490
call fcn.004d3330
mov ecx, eax
call fcn.004d3330
mov al, byte [ebp - 9]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a0cf
mov esp, ebp
pop ebp
ret