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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406c20
mov eax, dword fs:[0]
push eax
mov eax, 0x20c4
call fcn.00406bd0
mov eax, dword [0x40c040]
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 1
push str.MyApp
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x20cc], eax
cmp dword [ebp - 0x20cc], 0
jne 0x4016e5
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InternetOpen___failed:
mov eax, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push eax
call fcn.00404d50
add esp, 8
mov ecx, eax
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__::operator___unsigned_long_int_]
push eax
call fcn.00405040
add esp, 8
xor al, al
jmp 0x401882
push 0
push 0x80000000
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.004037d0
push eax
mov ecx, dword [ebp - 0x20cc]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 0x20d0], eax
cmp dword [ebp - 0x20d0], 0
jne 0x401757
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InternetOpenUrl___failed:
mov edx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push edx
call fcn.00404d50
add esp, 8
mov ecx, eax
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__::operator___unsigned_long_int_]
push eax
call fcn.00405040
add esp, 8
mov eax, dword [ebp - 0x20cc]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x401882
push 0xb0
lea ecx, [ebp - 0x20c4]
call fcn.004018d0
push 1
push 0x40
push 0x20
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x20c4]
call fcn.00403770
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x20c4]
mov eax, dword [edx + 4]
lea ecx, [ebp + eax - 0x20c4]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
movzx ecx, al
test ecx, ecx
je 0x4017f2
push str.Failed_to_open_file_for_writing_n
mov edx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push edx
call fcn.00404d50
add esp, 8
mov eax, dword [ebp - 0x20d0]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x20cc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 0x20c5], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20c4]
call fcn.004018a0
mov al, byte [ebp - 0x20c5]
jmp 0x401882
lea edx, [ebp - 0x2014]
push edx
push 0x2000
lea eax, [ebp - 0x2010]
push eax
mov ecx, dword [ebp - 0x20d0]
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40183e
cmp dword [ebp - 0x2014], 0
je 0x40183e
mov edx, dword [ebp - 0x2014]
xor eax, eax
push eax
push edx
lea ecx, [ebp - 0x2010]
push ecx
lea ecx, [ebp - 0x20c4]
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__]
jmp 0x4017f2
lea ecx, [ebp - 0x20c4]
call fcn.004036d0
mov edx, dword [ebp - 0x20d0]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x20cc]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 0x20c6], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20c4]
call fcn.004018a0
mov al, byte [ebp - 0x20c6]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405e67
mov esp, ebp
pop ebp
ret