Function at 0x406720
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438bfb
mov eax, dword fs:[0]
push eax
mov eax, 0x1034
call fcn.0041b360
mov eax, dword [0x44c074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1018], eax
cmp dword [ebx + 0x14], 0x10
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1038], eax
mov dword [ebx + 0x10], 0
jb 0x40677b
mov eax, dword [ebx]
jmp 0x40677d
mov eax, ebx
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__compatible__MSIE_9.0__Windows_NT_
mov byte [eax], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
mov dword [ebp - 0x103c], esi
test esi, esi
je 0x4069d3
push 0x2710
push 0x2710
push 0x2710
push 0x2710
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
push 0
push dword [ebp + 0x18]
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x1040], eax
test eax, eax
je 0x4069cc
mov ecx, dword [ebp + 0x1c]
neg ecx
sbb ecx, ecx
and ecx, 0x800000
push ecx
push 0
push 0
push 0
push dword [ebp - 0x1018]
push str.POST
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
test edi, edi
je 0x4069be
push 0x32
xor eax, eax
mov dword [ebp - 0x101c], 7
push str.Content_Type:application_x_www_form_urlencoded_r_n_r_n
lea ecx, [ebp - 0x1030]
mov dword [ebp - 0x1020], 0
mov word [ebp - 0x1030], ax
call fcn.004024b1
mov ecx, dword [ebp - 0x1038]
lea esi, [ebp - 0x1030]
cmp dword [ebp - 0x101c], 8
push 0
cmovae esi, dword [ebp - 0x1030]
mov eax, dword [ecx + 0x10]
push eax
push eax
mov dword [ebp - 4], 0
call fcn.00402300
push eax
push dword [ebp - 0x1020]
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40689f
mov eax, dword [ebp - 0x101c]
cmp eax, 8
jb 0x406994
inc eax
lea ecx, [ebp - 0x1030]
push eax
push dword [ebp - 0x1030]
call fcn.004028eb
jmp 0x406994
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x406878
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov dword [ebp - 0x1034], 0
nop dword [eax]
push 0x1001
lea eax, [ebp - 0x1014]
push 0
push eax
call fcn.0041e010
add esp, 0xc
lea eax, [ebp - 0x1034]
push eax
push edi
call esi
test eax, eax
je 0x406932
cmp dword [ebp - 0x1034], 0
je 0x406932
lea eax, [ebp - 0x1018]
mov dword [ebp - 0x1018], 0
push eax
push 0x1000
lea eax, [ebp - 0x1014]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x406932
push dword [ebp - 0x1018]
lea eax, [ebp - 0x1014]
mov ecx, ebx
push eax
call fcn.00402732
cmp dword [ebp - 0x1034], 0
ja 0x4068c0
mov eax, dword [ebp - 0x101c]
cmp eax, 8
jb 0x406994
mov ecx, dword [ebp - 0x1030]
inc eax
cmp eax, 0x7fffffff
jbe 0x406950
call fcn.004229ce
add eax, eax
cmp eax, 0x1000
jb 0x40698b
test byte [ebp - 0x1030], 0x1f
je 0x406967
call fcn.004229ce
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x406973
call fcn.004229ce
sub ecx, eax
cmp ecx, 4
jae 0x40697f
call fcn.004229ce
cmp ecx, 0x23
jbe 0x406989
call fcn.004229ce
mov ecx, eax
push ecx
call fcn.0041ac8f
add esp, 4
xor eax, eax
mov dword [ebp - 0x101c], 7
push edi
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x1020], eax
mov word [ebp - 0x1030], ax
call edi
mov esi, dword [ebp - 0x103c]
jmp 0x4069c4
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x1040]
call edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041ac4b
mov esp, ebp
pop ebp
ret