Function at 0x4194d0
Capabilities:
Check for time delay via gettickcount
Check http status code
Check if file exists
Create http request
Download and write a file
Get file size
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43cf19
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x45604c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 0x10], 0
jne 0x41950c
xor al, al
jmp 0x419f35
xorps xmm0, xmm0
mov dword [ebp - 0x84], 0
push 0x800
mov dword [ebp - 0x9c], 0xffffffff
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xb4], 0
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xd4], 0
call fcn.00422513
push 0x800
push 0
push eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa8], 0x800
call fcn.00424350
mov ecx, dword [edi + 0x10]
lea esi, [edi + 0x18]
add esp, 0x10
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0x80], esi
call fcn.00410960
test al, al
jne 0x4195a9
mov esi, 1
jmp 0x419e60
cmp dword [esi], 0
mov dword [ebp - 0x90], esi
je 0x4195cc
push dword [edi + 4]
mov ecx, edi
call fcn.0041a830
test eax, eax
je 0x4195cc
mov esi, 0xe
jmp 0x419e57
mov ecx, dword [edi + 0x10]
call fcn.00410ee0
mov dword [ebp - 0xa0], eax
cmp dword [eax + 0x14], 8
jb 0x4195e8
mov eax, dword [eax]
mov dword [ebp - 0xa0], eax
mov ecx, dword [edi + 0x10]
call fcn.00410ef0
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x4195fe
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
mov ecx, dword [edi + 0x10]
call fcn.0040eaa0
test al, 8
je 0x419620
mov ecx, dword [edi + 0x10]
call fcn.0040e9e0
mov ecx, dword [edi + 0x10]
or eax, 0x200000
push eax
call fcn.00410f00
cmp dword [esi], 0
je 0x41963d
push dword [edi + 4]
mov ecx, edi
call fcn.0041a830
test eax, eax
je 0x41963d
mov esi, 0xe
jmp 0x419e57
mov ecx, dword [edi + 0x10]
call fcn.00410ed0
cmp dword [eax + 0x14], 8
jb 0x41964d
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x8c], eax
test eax, eax
jne 0x41966e
lea esi, [eax + 4]
jmp 0x419e57
mov ecx, dword [edi + 0x10]
call fcn.0040eaa0
test al, 0x10
je 0x419709
mov ecx, dword [edi + 0x10]
call fcn.0040e9f0
test eax, eax
jle 0x419709
mov ecx, dword [edi + 0x10]
call fcn.0040e9f0
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
imul eax, eax, 0x3e8
push 4
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x94]
push eax
push 2
push dword [ebp - 0x8c]
call esi
push 4
lea eax, [ebp - 0x94]
push eax
push 5
push dword [ebp - 0x8c]
call esi
push 4
lea eax, [ebp - 0x94]
push eax
push 6
push dword [ebp - 0x8c]
call esi
push 4
lea eax, [ebp - 0x94]
push eax
push 7
push dword [ebp - 0x8c]
call esi
push 4
lea eax, [ebp - 0x94]
push eax
push 8
push dword [ebp - 0x8c]
call esi
mov esi, dword [ebp - 0x90]
mov ecx, dword [edi + 0x10]
call fcn.0040eaa0
test al, 2
je 0x4197a2
push dword [ebp - 0x80]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4197a2
mov ecx, dword [edi + 0x10]
call fcn.0040eaa0
test al, 4
je 0x419760
mov ecx, dword [edi + 0x10]
call fcn.00410ec0
push eax
push dword [ebp - 0x80]
call fcn.00412050
add esp, 8
test al, al
je 0x419760
push dword [ebp - 0x8c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x80], esi
xor esi, esi
jmp 0x419e60
mov esi, dword [ebp - 0x80]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0
push 3
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x9c], eax
cmp eax, 0xffffffff
je 0x4197a2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
cmove esi, eax
jmp 0x4197a4
xor esi, esi
mov eax, dword [ebp - 0x90]
cmp dword [eax], 0
je 0x4197c7
push dword [edi + 4]
mov ecx, edi
call fcn.0041a830
test eax, eax
je 0x4197c7
mov esi, 0xe
jmp 0x419e30
test esi, esi
je 0x419818
push 0x40
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.00424350
push esi
push str.Range:bytes_d_
lea eax, [ebp - 0x60]
push 0x20
push eax
call fcn.00407650
add esp, 0x1c
lea eax, [ebp - 0x60]
push 0
push 0x80000000
push 0xffffffffffffffff
push eax
push dword [ebp - 0xa0]
push dword [ebp - 0x8c]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
xor ecx, ecx
mov dword [ebp - 0x84], eax
test eax, eax
cmove esi, ecx
mov byte [ebp - 0x85], 0
nop
mov eax, dword [ebp - 0x90]
cmp dword [eax], 0
je 0x41983d
push dword [edi + 4]
mov ecx, edi
call fcn.0041a830
test eax, eax
jne 0x41997d
xor al, al
mov dword [ebp - 0xbc], 4
mov byte [ebp - 0x79], al
test esi, esi
jne 0x4198fb
mov ecx, dword [edi + 0x10]
push esi
call fcn.0040e9e0
push eax
push esi
push esi
push dword [ebp - 0xa0]
push dword [ebp - 0x8c]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x98], eax
call fcn.0040e9e0
test eax, 0x200000
je 0x4198f8
mov ecx, dword [edi + 0x10]
call fcn.00410ee0
push eax
lea ecx, [ebp - 0x78]
call fcn.004055f0
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0xb8]
mov dword [ebp - 4], esi
push eax
call fcn.0040e9e0
push eax
lea eax, [ebp - 0x98]
push eax
push dword [ebp - 0x8c]
lea eax, [ebp - 0x78]
push eax
call fcn.0041acb0
add esp, 0x18
test al, al
je 0x419987
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.00410f10
lea ecx, [ebp - 0x78]
mov byte [ebp - 0x79], 1
mov dword [ebp - 4], 0xffffffff
call fcn.00405540
mov al, byte [ebp - 0x79]
mov ecx, dword [ebp - 0x84]
test ecx, ecx
je 0x419e2b
test al, al
jne 0x4199bc
push 0
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0xb8]
push eax
push 0x20000013
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
mov eax, dword [ebp - 0xb8]
je 0x419949
test esi, esi
jne 0x419942
cmp eax, 0xc8
jmp 0x419947
cmp eax, 0xce
je 0x4199b6
cmp eax, 0x1a0
jne 0x4199a1
cmp byte [ebp - 0x85], 0
jne 0x4199a1
push dword [ebp - 0x84]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x84], 0
xor esi, esi
mov byte [ebp - 0x85], 1
jmp 0x419820
mov esi, 0xe
jmp 0x419e11
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call fcn.00405540
mov esi, dword [ebp - 0xc4]
jmp 0x419e11
test esi, esi
je 0x419ad8
cmp eax, 0xc8
jne 0x419ad8
xor esi, esi
mov ecx, dword [ebp - 0x84]
push 0
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xac], 0
push eax
lea eax, [ebp - 0xac]
mov dword [ebp - 0xd8], 4
push eax
push 0x20000005
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov ecx, dword [edi + 0x10]
neg eax
sbb eax, eax
and dword [ebp - 0xac], eax
call fcn.0040eaa0
test al, 0x20
je 0x419ac2
push 0
lea eax, [ebp - 0xa8]
push eax
push dword [ebp - 0xa4]
push 0x16
push dword [ebp - 0x84]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x419ac2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x419ac2
cmp dword [ebp - 0xa8], 0
jbe 0x419ac2
push dword [ebp - 0xa4]
call fcn.0042251c
mov eax, dword [ebp - 0xa8]
xor ecx, ecx
shr eax, 1
mov edx, 2
inc eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00422513
mov ecx, eax
mov eax, dword [ebp - 0xa8]
shr eax, 1
mov dword [ebp - 0xa4], ecx
lea eax, [eax*2 + 2]
push eax
push 0
push ecx
mov dword [ebp - 0xa8], eax
call fcn.00424350
add esp, 0x14
lea eax, [ebp - 0xa8]
push 0
push eax
push dword [ebp - 0xa4]
push 0x16
push dword [ebp - 0x84]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x419ac2
mov eax, dword [ebp - 0xa4]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0xac]
test ecx, ecx
jne 0x419ae2
mov dword [ebp - 0x94], 0x20000
jmp 0x419b11
mov esi, 6
jmp 0x419e11
mov eax, 0x51eb851f
mul ecx
mov eax, edx
shr eax, 4
cmp eax, 0x400
jae 0x419b01
mov dword [ebp - 0x94], 0x400
jmp 0x419b11
mov ecx, 0x20000
cmp eax, ecx
cmova eax, ecx
mov dword [ebp - 0x94], eax
mov ecx, dword [edi + 0x10]
call fcn.0040eaa0
test al, 8
je 0x419b95
mov ecx, dword [edi + 0x10]
call fcn.00410ef0
push eax
lea ecx, [ebp - 0x78]
call fcn.004055f0
push dword [ebp - 0x84]
lea eax, [ebp - 0x78]
mov dword [ebp - 4], 1
push eax
call fcn.0041a500
add esp, 8
test al, al
jne 0x419b64
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
mov esi, 2
call fcn.00405540
jmp 0x419e11
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.00410f40
mov ecx, dword [edi + 0x10]
call fcn.00410ef0
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x419b86
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call fcn.00405540
cmp dword [ebp - 0x9c], 0xffffffff
jne 0x419bcd
push 0
push 0
push 2
push 0
push 1
push 0xc0000000
push dword [ebp - 0x80]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x9c], eax
cmp eax, 0xffffffff
jne 0x419bcb
mov esi, 3
jmp 0x419e11
xor esi, esi
push esi
push dword [ebp - 0xac]
mov ecx, edi
call fcn.0041afb0
push dword [ebp - 0x94]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
push 0
push esi
mov dword [ebp - 0xb4], esi
mov esi, dword [ebp - 0x9c]
push esi
mov dword [ebp - 0xc8], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov al, 1
mov dword [ebp - 0x98], 0
mov byte [ebp - 0x79], al
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xbc], 0
nop dword [eax + eax]
mov ecx, dword [ebp - 0x90]
cmp dword [ecx], 0
je 0x419c60
push dword [edi + 4]
mov ecx, edi
call fcn.0041a830
test eax, eax
jne 0x419d73
mov al, byte [ebp - 0x79]
test al, al
je 0x419c74
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x98], eax
mov byte [ebp - 0x79], 0
lea eax, [ebp - 0xb0]
push eax
push dword [ebp - 0x94]
push dword [ebp - 0xc8]
push dword [ebp - 0x84]
call dword [sym.imp.WININET.dll_InternetReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xc0], eax
test esi, esi
je 0x419d89
mov ecx, dword [ebp - 0xb0]
test ecx, ecx
je 0x419d81
add dword [ebp - 0xb4], ecx
lea eax, [ebp - 0xd0]
push 0
push eax
push ecx
push dword [ebp - 0xc8]
mov dword [ebp - 0xd0], 0
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0xb0]
cmp esi, ecx
jne 0x419d7a
mov eax, dword [ebp - 0xc0]
mov edx, dword [ebp - 0xbc]
sub eax, dword [ebp - 0x98]
add edx, esi
mov dword [ebp - 0xbc], edx
mov dword [ebp - 0xc0], eax
cmp eax, 0x64
jb 0x419d53
mov eax, edx
mov ecx, edi
xor edx, edx
div dword [ebp - 0xc0]
push eax
mov eax, dword [ebp - 0xa0]
add eax, esi
push eax
call fcn.0041ad40
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xcc], 0
jmp 0x419d67
mov eax, dword [ebp - 0xa0]
add eax, esi
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xcc], eax
test ecx, ecx
je 0x419d81
mov al, byte [ebp - 0x79]
jmp 0x419c40
mov esi, 0xe
jmp 0x419df7
mov esi, 8
jmp 0x419df7
mov esi, dword [ebp - 0xc4]
jmp 0x419d8e
mov esi, 7
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x9c], 0xffffffff
call fcn.0040eaa0
test al, 4
je 0x419ded
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x80]
call fcn.00412180
add esp, 8
test al, al
je 0x419e24
mov ecx, dword [edi + 0x10]
call fcn.00410ec0
lea edx, [ebp - 0x20]
mov dword [ebp - 0x98], 0xc
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x419e24
add eax, 4
add edx, 4
sub dword [ebp - 0x98], 4
jae 0x419dd8
mov dword [ebp - 0xd4], 1
mov eax, dword [ebp - 0xc8]
test eax, eax
je 0x419e11
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x84]
test eax, eax
je 0x419e30
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x419e30
mov esi, 0xb
jmp 0x419df7
mov esi, 5
push dword [ebp - 0x8c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x9c]
cmp eax, 0xffffffff
je 0x419e60
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x80], eax
push dword [ebp - 0xa4]
mov ecx, edi
push dword [ebp - 0xcc]
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push esi
call fcn.0041ae10
mov eax, dword [ebp - 0xa4]
test eax, eax
je 0x419e93
push eax
call fcn.0042251c
add esp, 4
cmp dword [edi + 0x14], 0
je 0x419f16
push 0x14
call fcn.00422276
add esp, 4
mov dword [ebp - 0x98], eax
mov esi, dword [ebp - 0x80]
mov dword [ebp - 4], 2
test eax, eax
je 0x419ec4
push dword [esi]
mov ecx, eax
call fcn.0041ba20
mov edx, eax
jmp 0x419ec6
xor edx, edx
mov dword [ebp - 4], 0xffffffff
test edx, edx
je 0x419ed9
mov ecx, dword [esi]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
push 0x14
call fcn.00422276
add esp, 4
mov dword [ebp - 0x98], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x419f00
push dword [edi + 0x14]
mov ecx, eax
call fcn.0041b9f0
jmp 0x419f02
xor eax, eax
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x419f16
mov ecx, dword [edi + 0x14]
push eax
call fcn.00417cb0
cmp dword [ebp - 0xd4], 0
je 0x419f33
mov ecx, dword [edi + 0x10]
call fcn.00410f70
test al, al
je 0x419f33
mov ecx, dword [edi + 0x10]
call fcn.00410f80
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00422505
mov esp, ebp
pop ebp
ret