Function at 0x401570
Capabilities:
Link many functions at runtime
Write file on windows

Disassembly:
mov eax, 0x10074
call fcn.00402460
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push ebp
push esi
push edi
push str.WININET.dll
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.InternetGetConnectedState
push esi
call ebp
lea ecx, [esp + 0x34]
push 0
push ecx
call eax
test eax, eax
jne 0x4015bc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10074
ret
mov edx, dword [str.Agent]
mov ax, word [0x40450c]
mov dword [esp + 0x3c], edx
mov word [esp + 0x40], ax
call dword [sym.imp.WINMM.dll_timeGetTime]
lea ecx, [esp + 0x3c]
push eax
push ecx
lea edx, [esp + 0x4c]
push str._s_ld
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
push str.WININET.dll
call ebx
mov edi, eax
push str.InternetOpenA
push edi
call ebp
mov cl, byte [esp + 0x34]
push 0
test cl, 4
push 0
push 0
jne 0x401621
lea ecx, [esp + 0x50]
push 4
push ecx
call eax
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x401630
lea edx, [esp + 0x50]
push 0
push edx
call eax
mov dword [esp + 0x10], eax
mov esi, eax
test esi, esi
jne 0x401648
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10074
ret
mov al, 0x63
mov cl, 0xd
mov byte [esp + 0x19], al
mov byte [esp + 0x1a], al
mov al, 0x2a
push str.WININET.dll
mov byte [esp + 0x24], al
mov byte [esp + 0x26], al
mov al, 0xa
mov byte [esp + 0x1c], 0x41
mov byte [esp + 0x1f], 0x65
mov byte [esp + 0x20], 0x70
mov byte [esp + 0x21], 0x74
mov byte [esp + 0x22], 0x3a
mov byte [esp + 0x23], 0x20
mov byte [esp + 0x25], 0x2f
mov byte [esp + 0x27], cl
mov byte [esp + 0x28], al
mov byte [esp + 0x29], cl
mov byte [esp + 0x2a], al
mov byte [esp + 0x2b], 0
call ebx
push str.InternetOpenUrlA
push eax
mov dword [esp + 0x1c], eax
call ebp
mov edx, eax
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push 0x84000100
push ecx
mov ecx, dword [esp + 0x10094]
lea eax, [esp + 0x24]
push eax
push ecx
push esi
call edx
mov esi, eax
test esi, esi
jne 0x4016f1
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10074
ret
mov eax, dword [esp + 0x1008c]
push 0x4044d8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
jne 0x40171a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10074
ret
push str.WININET.dll
mov dword [esp + 0x30], 0
mov dword [esp + 0x3c], 4
call ebx
mov edi, eax
push str.HttpQueryInfoA
push edi
call ebp
lea ecx, [esp + 0x38]
push 0
lea edx, [esp + 0x30]
push ecx
push edx
push 0x20000005
push esi
call eax
test eax, eax
jne 0x401762
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esp + 0x2c], 0
push str.WININET.dll
call ebx
mov edi, eax
push str.InternetReadFile
push edi
call ebp
push str.InternetCloseHandle
push edi
mov ebx, eax
call ebp
mov dword [esp + 0x14], eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x88]
push 0x4000
push ecx
push esi
call ebx
test eax, eax
je 0x4017d6
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
test eax, eax
push edx
je 0x4017fa
push 1
push eax
lea eax, [esp + 0x90]
push eax
call ebp
add esp, 0x10
lea ecx, [esp + 0x30]
lea edx, [esp + 0x84]
push ecx
push 0x4000
push edx
push esi
call ebx
test eax, eax
jne 0x4017a0
mov eax, dword [esp + 0x10]
push eax
call dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10074
ret
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10074
ret