Function at 0x419250
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 0x43cc99
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 0x41928c
xor al, al
jmp 0x419cb5
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.00422293
push 0x800
push 0
push eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa8], 0x800
call fcn.004240d0
mov ecx, dword [edi + 0x10]
lea esi, [edi + 0x18]
add esp, 0x10
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0x80], esi
call fcn.004106e0
test al, al
jne 0x419329
mov esi, 1
jmp 0x419be0
cmp dword [esi], 0
mov dword [ebp - 0x90], esi
je 0x41934c
push dword [edi + 4]
mov ecx, edi
call fcn.0041a5b0
test eax, eax
je 0x41934c
mov esi, 0xe
jmp 0x419bd7
mov ecx, dword [edi + 0x10]
call fcn.00410c60
mov dword [ebp - 0xa0], eax
cmp dword [eax + 0x14], 8
jb 0x419368
mov eax, dword [eax]
mov dword [ebp - 0xa0], eax
mov ecx, dword [edi + 0x10]
call fcn.00410c70
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x41937e
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
mov ecx, dword [edi + 0x10]
call fcn.0040e820
test al, 8
je 0x4193a0
mov ecx, dword [edi + 0x10]
call fcn.0040e760
mov ecx, dword [edi + 0x10]
or eax, 0x200000
push eax
call fcn.00410c80
cmp dword [esi], 0
je 0x4193bd
push dword [edi + 4]
mov ecx, edi
call fcn.0041a5b0
test eax, eax
je 0x4193bd
mov esi, 0xe
jmp 0x419bd7
mov ecx, dword [edi + 0x10]
call fcn.00410c50
cmp dword [eax + 0x14], 8
jb 0x4193cd
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 0x4193ee
lea esi, [eax + 4]
jmp 0x419bd7
mov ecx, dword [edi + 0x10]
call fcn.0040e820
test al, 0x10
je 0x419489
mov ecx, dword [edi + 0x10]
call fcn.0040e770
test eax, eax
jle 0x419489
mov ecx, dword [edi + 0x10]
call fcn.0040e770
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.0040e820
test al, 2
je 0x419522
push dword [ebp - 0x80]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x419522
mov ecx, dword [edi + 0x10]
call fcn.0040e820
test al, 4
je 0x4194e0
mov ecx, dword [edi + 0x10]
call fcn.00410c40
push eax
push dword [ebp - 0x80]
call fcn.00411dd0
add esp, 8
test al, al
je 0x4194e0
push dword [ebp - 0x8c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x80], esi
xor esi, esi
jmp 0x419be0
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 0x419522
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
cmove esi, eax
jmp 0x419524
xor esi, esi
mov eax, dword [ebp - 0x90]
cmp dword [eax], 0
je 0x419547
push dword [edi + 4]
mov ecx, edi
call fcn.0041a5b0
test eax, eax
je 0x419547
mov esi, 0xe
jmp 0x419bb0
test esi, esi
je 0x419598
push 0x40
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.004240d0
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 0x4195bd
push dword [edi + 4]
mov ecx, edi
call fcn.0041a5b0
test eax, eax
jne 0x4196fd
xor al, al
mov dword [ebp - 0xbc], 4
mov byte [ebp - 0x79], al
test esi, esi
jne 0x41967b
mov ecx, dword [edi + 0x10]
push esi
call fcn.0040e760
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.0040e760
test eax, 0x200000
je 0x419678
mov ecx, dword [edi + 0x10]
call fcn.00410c60
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.0040e760
push eax
lea eax, [ebp - 0x98]
push eax
push dword [ebp - 0x8c]
lea eax, [ebp - 0x78]
push eax
call fcn.0041aa30
add esp, 0x18
test al, al
je 0x419707
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.00410c90
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 0x419bab
test al, al
jne 0x41973c
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 0x4196c9
test esi, esi
jne 0x4196c2
cmp eax, 0xc8
jmp 0x4196c7
cmp eax, 0xce
je 0x419736
cmp eax, 0x1a0
jne 0x419721
cmp byte [ebp - 0x85], 0
jne 0x419721
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 0x4195a0
mov esi, 0xe
jmp 0x419b91
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call fcn.00405540
mov esi, dword [ebp - 0xc4]
jmp 0x419b91
test esi, esi
je 0x419858
cmp eax, 0xc8
jne 0x419858
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.0040e820
test al, 0x20
je 0x419842
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 0x419842
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x419842
cmp dword [ebp - 0xa8], 0
jbe 0x419842
push dword [ebp - 0xa4]
call fcn.0042229c
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.00422293
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.004240d0
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 0x419842
mov eax, dword [ebp - 0xa4]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0xac]
test ecx, ecx
jne 0x419862
mov dword [ebp - 0x94], 0x20000
jmp 0x419891
mov esi, 6
jmp 0x419b91
mov eax, 0x51eb851f
mul ecx
mov eax, edx
shr eax, 4
cmp eax, 0x400
jae 0x419881
mov dword [ebp - 0x94], 0x400
jmp 0x419891
mov ecx, 0x20000
cmp eax, ecx
cmova eax, ecx
mov dword [ebp - 0x94], eax
mov ecx, dword [edi + 0x10]
call fcn.0040e820
test al, 8
je 0x419915
mov ecx, dword [edi + 0x10]
call fcn.00410c70
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.0041a280
add esp, 8
test al, al
jne 0x4198e4
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
mov esi, 2
call fcn.00405540
jmp 0x419b91
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.00410cc0
mov ecx, dword [edi + 0x10]
call fcn.00410c70
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x419906
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 0x41994d
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 0x41994b
mov esi, 3
jmp 0x419b91
xor esi, esi
push esi
push dword [ebp - 0xac]
mov ecx, edi
call fcn.0041ad30
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 0x4199e0
push dword [edi + 4]
mov ecx, edi
call fcn.0041a5b0
test eax, eax
jne 0x419af3
mov al, byte [ebp - 0x79]
test al, al
je 0x4199f4
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 0x419b09
mov ecx, dword [ebp - 0xb0]
test ecx, ecx
je 0x419b01
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 0x419afa
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 0x419ad3
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.0041aac0
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xcc], 0
jmp 0x419ae7
mov eax, dword [ebp - 0xa0]
add eax, esi
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xcc], eax
test ecx, ecx
je 0x419b01
mov al, byte [ebp - 0x79]
jmp 0x4199c0
mov esi, 0xe
jmp 0x419b77
mov esi, 8
jmp 0x419b77
mov esi, dword [ebp - 0xc4]
jmp 0x419b0e
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.0040e820
test al, 4
je 0x419b6d
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x80]
call fcn.00411f00
add esp, 8
test al, al
je 0x419ba4
mov ecx, dword [edi + 0x10]
call fcn.00410c40
lea edx, [ebp - 0x20]
mov dword [ebp - 0x98], 0xc
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x419ba4
add eax, 4
add edx, 4
sub dword [ebp - 0x98], 4
jae 0x419b58
mov dword [ebp - 0xd4], 1
mov eax, dword [ebp - 0xc8]
test eax, eax
je 0x419b91
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 0x419bb0
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x419bb0
mov esi, 0xb
jmp 0x419b77
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 0x419be0
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.0041ab90
mov eax, dword [ebp - 0xa4]
test eax, eax
je 0x419c13
push eax
call fcn.0042229c
add esp, 4
cmp dword [edi + 0x14], 0
je 0x419c96
push 0x14
call fcn.00421ff6
add esp, 4
mov dword [ebp - 0x98], eax
mov esi, dword [ebp - 0x80]
mov dword [ebp - 4], 2
test eax, eax
je 0x419c44
push dword [esi]
mov ecx, eax
call fcn.0041b7a0
mov edx, eax
jmp 0x419c46
xor edx, edx
mov dword [ebp - 4], 0xffffffff
test edx, edx
je 0x419c59
mov ecx, dword [esi]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
push 0x14
call fcn.00421ff6
add esp, 4
mov dword [ebp - 0x98], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x419c80
push dword [edi + 0x14]
mov ecx, eax
call fcn.0041b770
jmp 0x419c82
xor eax, eax
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x419c96
mov ecx, dword [edi + 0x14]
push eax
call fcn.00417a30
cmp dword [ebp - 0xd4], 0
je 0x419cb3
mov ecx, dword [edi + 0x10]
call fcn.00410cf0
test al, al
je 0x419cb3
mov ecx, dword [edi + 0x10]
call fcn.00410d00
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.00422285
mov esp, ebp
pop ebp
ret