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

Disassembly:
mov eax, 0x10074
call fcn.00409de0
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 + 0x24]
push 0
push ecx
call eax
test eax, eax
jne 0x4060dc
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 [0x414ad0]
mov dword [esp + 0x2c], edx
mov word [esp + 0x30], ax
call dword [sym.imp.WINMM.dll_timeGetTime]
lea ecx, [esp + 0x2c]
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 + 0x24]
push 0
test cl, 4
push 0
push 0
jne 0x406141
lea ecx, [esp + 0x50]
push 4
push ecx
call eax
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x406150
lea edx, [esp + 0x50]
push 0
push edx
call eax
mov dword [esp + 0x10], eax
mov esi, eax
test esi, esi
jne 0x406168
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 eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x414aa8]
mov edx, dword [0x414aac]
mov dword [esp + 0x34], eax
mov eax, dword [0x414ab0]
push str.WININET.dll
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
call ebx
push str.InternetOpenUrlA
push eax
mov dword [esp + 0x1c], eax
call ebp
mov edx, eax
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10088]
push 0
not ecx
dec ecx
push 0x84000100
push ecx
lea ecx, [esp + 0x40]
push ecx
push eax
push esi
call edx
mov esi, eax
test esi, esi
jne 0x4061e7
mov ecx, dword [esp + 0x14]
push ecx
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 [esp + 0x1008c]
push 0x414910
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x406210
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10074
ret
push str.WININET.dll
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 4
call ebx
mov edi, eax
push str.HttpQueryInfoA
push edi
call ebp
lea ecx, [esp + 0x28]
push 0
lea edx, [esp + 0x20]
push ecx
push edx
push 0x20000005
push esi
call eax
test eax, eax
jne 0x406258
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esp + 0x1c], 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 + 0x20]
push eax
lea ecx, [esp + 0x88]
push 0x4000
push ecx
push esi
call ebx
test eax, eax
je 0x4062cc
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
test eax, eax
push edx
je 0x4062f0
push 1
push eax
lea eax, [esp + 0x90]
push eax
call ebp
add esp, 0x10
lea ecx, [esp + 0x20]
lea edx, [esp + 0x84]
push ecx
push 0x4000
push edx
push esi
call ebx
test eax, eax
jne 0x406296
mov eax, dword [esp + 0x10]
push eax
call dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
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