Function at 0x4a6ea0
Capabilities:
Check for time delay via gettickcount
Check if file exists
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5646b0
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x5a6124]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x30], ecx
test ecx, ecx
je 0x4a70d4
test eax, eax
je 0x4a70d4
mov edi, dword [ebp + 8]
test edi, edi
je 0x4a70d4
push 0x5a97e8
push 0x100
call fcn.00502cee
xor esi, esi
mov dword [ebp - 0x4c], vtable.CxAutoArray_unsigned_char_.0
add esp, 8
mov dword [ebp - 0x48], esi
test eax, eax
je 0x4a6f19
mov esi, eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], esi
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.004a57e0
push edi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x24], edx
mov ebx, eax
call fcn.00407b50
lea edx, [ebp - 0x1c]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.004c9330
lea ecx, [ebp - 0x1c]
call fcn.00407c20
push dword [ebp - 0x20]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4a6f61
lea ecx, [ebp - 0x20]
call fcn.004c8d30
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
sub esp, 0x18
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
push edi
call fcn.004a4fd0
mov edi, dword [ebp - 0x40]
test eax, eax
js 0x4a709c
cmp edi, 0xffffffff
je 0x4a709c
sub esp, 0xc
lea ecx, [ebp - 0x40]
call fcn.004a5060
mov ecx, dword [ebp - 0x18]
call fcn.004cead0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x38], 0
mov ecx, dword [eax + 0x10]
lea eax, [ebp - 0x14]
push eax
push 0x100
push esi
push dword [ecx]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4a709c
nop word [eax + eax]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4a70cd
push 0
lea ecx, [ebp - 0x1c]
push ecx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4a701b
call fcn.004a9570
test eax, eax
js 0x4a709c
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x1c], eax
jne 0x4a709c
mov ecx, dword [ebp - 0x24]
add ebx, eax
mov edx, dword [ebp + 0xc]
adc ecx, 0
mov dword [ebp - 0x24], ecx
test edx, edx
je 0x4a7053
push eax
push ecx
push ebx
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp - 0x18]
push dword [ebp - 0x30]
call edx
add esp, 0x24
test eax, eax
je 0x4a709c
cmp dword [ebp + 0x18], 0xffffffff
je 0x4a7067
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp + 0x18]
jae 0x4a709c
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
push ecx
push 0x100
push esi
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x38], 0
push dword [eax]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4a6ff0
xor esi, esi
test edi, edi
je 0x4a70a9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x20]
call fcn.00407c20
lea ecx, [ebp - 0x4c]
call fcn.00445ac0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 1
jmp 0x4a709e
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret