Function at 0x401220
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4038c1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c8
push ebx
push esi
push edi
push 0
push 0
push 0
push 1
push str.UserAgent
mov esi, ecx
mov dword [ebp - 0x14], 0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
mov dword [ebp - 0x18], edi
test edi, edi
je 0x401286
push 0
push 0x80000000
push 0
push 0
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, eax
test ebx, ebx
jne 0x401299
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x60]
mov dword [ebp - 0xc8], 0x404310
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xc4]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0x14], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0xc8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc8], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xcc], eax
lea ecx, [ebp - 0xc4]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0xc4], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x7c], 0
mov byte [ebp - 0x87], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x406670]
mov ecx, dword [0x406674]
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x8c], 0
push ecx
push 0x22
push ecx
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 2
call fcn.004026e0
test eax, eax
jne 0x401381
mov eax, dword [ebp - 0xc8]
lea ecx, [ebp - 0xc8]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov dword [ebp - 4], 3
cmp dword [ebp - 0x78], 0
jne 0x4013a1
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push edi
call esi
xor bl, bl
jmp 0x4014fa
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [ebp - 0x10]
push eax
push 0x400
lea eax, [ebp - 0x4d0]
push eax
push ebx
call esi
test eax, eax
je 0x4013f4
nop
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4013f4
push 0
push eax
lea eax, [ebp - 0x4d0]
push eax
lea ecx, [ebp - 0xc8]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
lea eax, [ebp - 0x10]
push eax
push 0x400
lea eax, [ebp - 0x4d0]
push eax
push ebx
call esi
test eax, eax
jne 0x4013c0
cmp dword [ebp - 0x78], 0
je 0x401495
mov eax, dword [ebp - 0xb8]
lea ecx, [ebp - 0x88]
cmp dword [eax], ecx
jne 0x401428
mov edx, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x74]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebp - 0xa8]
mov dword [eax], ecx
mov eax, dword [ebp - 0x98]
mov dword [eax], edx
lea ecx, [ebp - 0xc4]
call fcn.004025b0
push dword [ebp - 0x78]
xor ecx, ecx
lea esi, [ebp - 0xc4]
test al, al
cmove esi, ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov byte [ebp - 0x7c], 0
xor edi, edi
mov byte [ebp - 0x87], 0
test eax, eax
lea ecx, [ebp - 0xc4]
cmove edi, esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x406670]
mov ecx, dword [0x406674]
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x8c], 0
test edi, edi
jne 0x4014ea
jmp 0x4014d1
lea ecx, [ebp - 0xc4]
mov byte [ebp - 0x7c], 0
mov byte [ebp - 0x87], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x406670]
mov ecx, dword [0x406674]
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x8c], 0
mov eax, dword [ebp - 0xc8]
lea ecx, [ebp - 0xc8]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [ebp - 0x18]
call esi
mov bl, 1
lea ecx, [ebp - 0xc8]
call fcn.00401520
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret