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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10006410
mov eax, dword fs:[0]
push eax
mov eax, 0x10bc
call fcn.100061d0
mov eax, dword [section..data]
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 edi, edx
mov esi, ecx
push 0
push 0
push 0
push 1
push str.Download
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x10c8], eax
test eax, eax
je 0x100024cf
cmp dword [esi + 0x14], 0x10
mov ecx, esi
jb 0x10002321
mov ecx, dword [esi]
push 0
push 0x400100
push 0
push 0
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, eax
test ebx, ebx
je 0x1000248a
push 0xb0
lea eax, [ebp - 0x10c4]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, edi
cmp dword [edi + 0x14], 0x10
jb 0x1000235e
mov eax, dword [edi]
sub esp, 8
lea ecx, [ebp - 0x10c4]
push 0x20
push eax
call fcn.10003d90
mov eax, dword [ebp - 0x10c4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x10c4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x10c8], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x10c4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x10b8], 6
jne 0x10002437
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push ebx
call esi
test eax, eax
je 0x1000240e
mov eax, dword [ebp - 0x1014]
test eax, eax
je 0x1000240e
push 0
push eax
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x10c4]
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 - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push ebx
call esi
test eax, eax
jne 0x100023d4
lea ecx, [ebp - 0x10c0]
call fcn.10003d10
test eax, eax
jne 0x1000246c
push eax
mov eax, dword [ebp - 0x10c4]
lea ecx, [ebp - 0x10c4]
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_]
jmp 0x1000246c
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_create_file:
call fcn.100042b0
cmp dword [edi + 0x14], 0x10
mov ecx, dword [edi + 0x10]
jb 0x10002452
mov edi, dword [edi]
push ecx
mov edx, edi
mov ecx, eax
call fcn.10004ee0
add esp, 4
mov ecx, eax
push 0x100044d0
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___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
lea ecx, [ebp - 0x10c4]
call fcn.10002510
push dword [ebp - 0x10c8]
call esi
jmp 0x100024ec
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_open_URL:
call fcn.100042b0
cmp dword [esi + 0x14], 0x10
mov ecx, dword [esi + 0x10]
jb 0x100024a5
mov esi, dword [esi]
push ecx
mov edx, esi
mov ecx, eax
call fcn.10004ee0
add esp, 4
mov ecx, eax
push 0x100044d0
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___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push dword [ebp - 0x10c8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x100024ec
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_initialize_WinINet
call fcn.100042b0
push 0x100044d0
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___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
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.100050bf
mov esp, ebp
pop ebp
ret