Function at 0x4195c0
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 0x43cf09
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 0x4195fc
xor al, al
jmp 0x41a025
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.00422504
push 0x800
push 0
push eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa8], 0x800
call fcn.00424340
mov ecx, dword [edi + 0x10]
lea esi, [edi + 0x18]
add esp, 0x10
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0x80], esi
call fcn.00410ab0
test al, al
jne 0x419699
mov esi, 1
jmp 0x419f50
cmp dword [esi], 0
mov dword [ebp - 0x90], esi
je 0x4196bc
push dword [edi + 4]
mov ecx, edi
call fcn.0041a920
test eax, eax
je 0x4196bc
mov esi, 0xe
jmp 0x419f47
mov ecx, dword [edi + 0x10]
call fcn.00411030
mov dword [ebp - 0xa0], eax
cmp dword [eax + 0x14], 8
jb 0x4196d8
mov eax, dword [eax]
mov dword [ebp - 0xa0], eax
mov ecx, dword [edi + 0x10]
call fcn.00411040
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x4196ee
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
mov ecx, dword [edi + 0x10]
call fcn.0040ebf0
test al, 8
je 0x419710
mov ecx, dword [edi + 0x10]
call fcn.0040eb30
mov ecx, dword [edi + 0x10]
or eax, 0x200000
push eax
call fcn.00411050
cmp dword [esi], 0
je 0x41972d
push dword [edi + 4]
mov ecx, edi
call fcn.0041a920
test eax, eax
je 0x41972d
mov esi, 0xe
jmp 0x419f47
mov ecx, dword [edi + 0x10]
call fcn.00411020
cmp dword [eax + 0x14], 8
jb 0x41973d
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 0x41975e
lea esi, [eax + 4]
jmp 0x419f47
mov ecx, dword [edi + 0x10]
call fcn.0040ebf0
test al, 0x10
je 0x4197f9
mov ecx, dword [edi + 0x10]
call fcn.0040eb40
test eax, eax
jle 0x4197f9
mov ecx, dword [edi + 0x10]
call fcn.0040eb40
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.0040ebf0
test al, 2
je 0x419892
push dword [ebp - 0x80]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x419892
mov ecx, dword [edi + 0x10]
call fcn.0040ebf0
test al, 4
je 0x419850
mov ecx, dword [edi + 0x10]
call fcn.00411010
push eax
push dword [ebp - 0x80]
call fcn.004121a0
add esp, 8
test al, al
je 0x419850
push dword [ebp - 0x8c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x80], esi
xor esi, esi
jmp 0x419f50
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 0x419892
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
cmove esi, eax
jmp 0x419894
xor esi, esi
mov eax, dword [ebp - 0x90]
cmp dword [eax], 0
je 0x4198b7
push dword [edi + 4]
mov ecx, edi
call fcn.0041a920
test eax, eax
je 0x4198b7
mov esi, 0xe
jmp 0x419f20
test esi, esi
je 0x419908
push 0x40
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.00424340
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 0x41992d
push dword [edi + 4]
mov ecx, edi
call fcn.0041a920
test eax, eax
jne 0x419a6d
xor al, al
mov dword [ebp - 0xbc], 4
mov byte [ebp - 0x79], al
test esi, esi
jne 0x4199eb
mov ecx, dword [edi + 0x10]
push esi
call fcn.0040eb30
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.0040eb30
test eax, 0x200000
je 0x4199e8
mov ecx, dword [edi + 0x10]
call fcn.00411030
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.0040eb30
push eax
lea eax, [ebp - 0x98]
push eax
push dword [ebp - 0x8c]
lea eax, [ebp - 0x78]
push eax
call fcn.0041ada0
add esp, 0x18
test al, al
je 0x419a77
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.00411060
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 0x419f1b
test al, al
jne 0x419aac
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 0x419a39
test esi, esi
jne 0x419a32
cmp eax, 0xc8
jmp 0x419a37
cmp eax, 0xce
je 0x419aa6
cmp eax, 0x1a0
jne 0x419a91
cmp byte [ebp - 0x85], 0
jne 0x419a91
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 0x419910
mov esi, 0xe
jmp 0x419f01
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call fcn.00405540
mov esi, dword [ebp - 0xc4]
jmp 0x419f01
test esi, esi
je 0x419bc8
cmp eax, 0xc8
jne 0x419bc8
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.0040ebf0
test al, 0x20
je 0x419bb2
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 0x419bb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x419bb2
cmp dword [ebp - 0xa8], 0
jbe 0x419bb2
push dword [ebp - 0xa4]
call fcn.0042250d
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.00422504
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.00424340
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 0x419bb2
mov eax, dword [ebp - 0xa4]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0xac]
test ecx, ecx
jne 0x419bd2
mov dword [ebp - 0x94], 0x20000
jmp 0x419c01
mov esi, 6
jmp 0x419f01
mov eax, 0x51eb851f
mul ecx
mov eax, edx
shr eax, 4
cmp eax, 0x400
jae 0x419bf1
mov dword [ebp - 0x94], 0x400
jmp 0x419c01
mov ecx, 0x20000
cmp eax, ecx
cmova eax, ecx
mov dword [ebp - 0x94], eax
mov ecx, dword [edi + 0x10]
call fcn.0040ebf0
test al, 8
je 0x419c85
mov ecx, dword [edi + 0x10]
call fcn.00411040
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.0041a5f0
add esp, 8
test al, al
jne 0x419c54
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
mov esi, 2
call fcn.00405540
jmp 0x419f01
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.00411090
mov ecx, dword [edi + 0x10]
call fcn.00411040
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x419c76
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 0x419cbd
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 0x419cbb
mov esi, 3
jmp 0x419f01
xor esi, esi
push esi
push dword [ebp - 0xac]
mov ecx, edi
call fcn.0041b0a0
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 0x419d50
push dword [edi + 4]
mov ecx, edi
call fcn.0041a920
test eax, eax
jne 0x419e63
mov al, byte [ebp - 0x79]
test al, al
je 0x419d64
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 0x419e79
mov ecx, dword [ebp - 0xb0]
test ecx, ecx
je 0x419e71
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 0x419e6a
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 0x419e43
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.0041ae30
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xcc], 0
jmp 0x419e57
mov eax, dword [ebp - 0xa0]
add eax, esi
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xcc], eax
test ecx, ecx
je 0x419e71
mov al, byte [ebp - 0x79]
jmp 0x419d30
mov esi, 0xe
jmp 0x419ee7
mov esi, 8
jmp 0x419ee7
mov esi, dword [ebp - 0xc4]
jmp 0x419e7e
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.0040ebf0
test al, 4
je 0x419edd
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x80]
call fcn.004122d0
add esp, 8
test al, al
je 0x419f14
mov ecx, dword [edi + 0x10]
call fcn.00411010
lea edx, [ebp - 0x20]
mov dword [ebp - 0x98], 0xc
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x419f14
add eax, 4
add edx, 4
sub dword [ebp - 0x98], 4
jae 0x419ec8
mov dword [ebp - 0xd4], 1
mov eax, dword [ebp - 0xc8]
test eax, eax
je 0x419f01
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 0x419f20
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x419f20
mov esi, 0xb
jmp 0x419ee7
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 0x419f50
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.0041af00
mov eax, dword [ebp - 0xa4]
test eax, eax
je 0x419f83
push eax
call fcn.0042250d
add esp, 4
cmp dword [edi + 0x14], 0
je 0x41a006
push 0x14
call fcn.00422267
add esp, 4
mov dword [ebp - 0x98], eax
mov esi, dword [ebp - 0x80]
mov dword [ebp - 4], 2
test eax, eax
je 0x419fb4
push dword [esi]
mov ecx, eax
call fcn.0041bb10
mov edx, eax
jmp 0x419fb6
xor edx, edx
mov dword [ebp - 4], 0xffffffff
test edx, edx
je 0x419fc9
mov ecx, dword [esi]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
push 0x14
call fcn.00422267
add esp, 4
mov dword [ebp - 0x98], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x419ff0
push dword [edi + 0x14]
mov ecx, eax
call fcn.0041bae0
jmp 0x419ff2
xor eax, eax
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x41a006
mov ecx, dword [edi + 0x14]
push eax
call fcn.00417e00
cmp dword [ebp - 0xd4], 0
je 0x41a023
mov ecx, dword [edi + 0x10]
call fcn.004110c0
test al, al
je 0x41a023
mov ecx, dword [edi + 0x10]
call fcn.004110d0
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.004224f6
mov esp, ebp
pop ebp
ret