Function at 0x418d50
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 0x43c7f9
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 0x418d8c
xor al, al
jmp 0x4197c1
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.00421de3
push 0x800
push 0
push eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa8], 0x800
call fcn.00423c20
mov ecx, dword [edi + 0x10]
lea esi, [edi + 0x18]
add esp, 0x10
mov dword [ebp - 0x80], esi
call fcn.00410310
test al, al
jne 0x418e1f
mov esi, 1
jmp 0x4196e8
cmp dword [esi], 0
mov dword [ebp - 0x90], esi
je 0x418e42
push dword [edi + 4]
mov ecx, edi
call fcn.0041a140
test eax, eax
je 0x418e42
mov esi, 0xe
jmp 0x4196df
mov ecx, dword [edi + 0x10]
call fcn.00410890
mov dword [ebp - 0xa0], eax
cmp dword [eax + 0x14], 8
jb 0x418e5e
mov eax, dword [eax]
mov dword [ebp - 0xa0], eax
mov ecx, dword [edi + 0x10]
call fcn.004108a0
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x418e74
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
mov ecx, dword [edi + 0x10]
call fcn.0040e440
test al, 8
je 0x418e96
mov ecx, dword [edi + 0x10]
call fcn.0040e380
mov ecx, dword [edi + 0x10]
or eax, 0x200000
push eax
call fcn.004108b0
cmp dword [esi], 0
je 0x418eb3
push dword [edi + 4]
mov ecx, edi
call fcn.0041a140
test eax, eax
je 0x418eb3
mov esi, 0xe
jmp 0x4196df
mov ecx, dword [edi + 0x10]
call fcn.00410880
cmp dword [eax + 0x14], 8
jb 0x418ec3
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 0x418ee4
lea esi, [eax + 4]
jmp 0x4196df
mov ecx, dword [edi + 0x10]
call fcn.0040e440
test al, 0x10
je 0x418f7f
mov ecx, dword [edi + 0x10]
call fcn.0040e390
test eax, eax
jle 0x418f7f
mov ecx, dword [edi + 0x10]
call fcn.0040e390
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.0040e440
test al, 2
je 0x419018
push dword [ebp - 0x80]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x419018
mov ecx, dword [edi + 0x10]
call fcn.0040e440
test al, 4
je 0x418fd6
mov ecx, dword [edi + 0x10]
call fcn.00410870
push eax
push dword [ebp - 0x80]
call fcn.00411a00
add esp, 8
test al, al
je 0x418fd6
push dword [ebp - 0x8c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x80], esi
xor esi, esi
jmp 0x4196e8
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 0x419018
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
cmove esi, eax
jmp 0x41901a
xor esi, esi
mov eax, dword [ebp - 0x90]
cmp dword [eax], 0
je 0x41903d
push dword [edi + 4]
mov ecx, edi
call fcn.0041a140
test eax, eax
je 0x41903d
mov esi, 0xe
jmp 0x4196b8
test esi, esi
je 0x41908e
push 0x40
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.00423c20
push esi
push str.Range:bytes_d_
lea eax, [ebp - 0x60]
push 0x20
push eax
call fcn.004073f0
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
mov eax, dword [ebp - 0x90]
cmp dword [eax], 0
je 0x4190b2
push dword [edi + 4]
mov ecx, edi
call fcn.0041a140
test eax, eax
jne 0x4191f2
xor al, al
mov dword [ebp - 0xbc], 4
mov byte [ebp - 0x79], al
test esi, esi
jne 0x419170
mov ecx, dword [edi + 0x10]
push esi
call fcn.0040e380
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.0040e380
test eax, 0x200000
je 0x41916d
mov ecx, dword [edi + 0x10]
call fcn.00410890
push eax
lea ecx, [ebp - 0x78]
call fcn.004055a0
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0xb8]
mov dword [ebp - 4], esi
push eax
call fcn.0040e380
push eax
lea eax, [ebp - 0x98]
push eax
push dword [ebp - 0x8c]
lea eax, [ebp - 0x78]
push eax
call fcn.0041a5f0
add esp, 0x18
test al, al
je 0x4191fc
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.004108c0
lea ecx, [ebp - 0x78]
mov byte [ebp - 0x79], 1
mov dword [ebp - 4], 0xffffffff
call fcn.004054f0
mov al, byte [ebp - 0x79]
mov ecx, dword [ebp - 0x84]
test ecx, ecx
je 0x4196b3
test al, al
jne 0x419231
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 0x4191be
test esi, esi
jne 0x4191b7
cmp eax, 0xc8
jmp 0x4191bc
cmp eax, 0xce
je 0x41922b
cmp eax, 0x1a0
jne 0x419216
cmp byte [ebp - 0x85], 0
jne 0x419216
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 0x419095
mov esi, 0xe
jmp 0x419699
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call fcn.004054f0
mov esi, dword [ebp - 0xc4]
jmp 0x419699
test esi, esi
je 0x419351
cmp eax, 0xc8
jne 0x419351
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.0040e440
test al, 0x20
je 0x41933b
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 0x41933b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x41933b
cmp dword [ebp - 0xa8], 0
jbe 0x41933b
push dword [ebp - 0xa4]
call fcn.00421dec
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.00421de3
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.00423c20
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 0x41933b
mov eax, dword [ebp - 0xa4]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0xac]
test ecx, ecx
jne 0x41935b
mov dword [ebp - 0x94], 0x20000
jmp 0x41938a
mov esi, 6
jmp 0x419699
mov eax, 0x51eb851f
mul ecx
mov eax, edx
shr eax, 4
cmp eax, 0x400
jae 0x41937a
mov dword [ebp - 0x94], 0x400
jmp 0x41938a
mov ecx, 0x20000
cmp eax, ecx
cmova eax, ecx
mov dword [ebp - 0x94], eax
mov ecx, dword [edi + 0x10]
call fcn.0040e440
test al, 8
je 0x41940e
mov ecx, dword [edi + 0x10]
call fcn.004108a0
push eax
lea ecx, [ebp - 0x78]
call fcn.004055a0
push dword [ebp - 0x84]
lea eax, [ebp - 0x78]
mov dword [ebp - 4], 1
push eax
call fcn.00419d90
add esp, 8
test al, al
jne 0x4193dd
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
mov esi, 2
call fcn.004054f0
jmp 0x419699
mov ecx, dword [edi + 0x10]
lea eax, [ebp - 0x78]
push eax
call fcn.004108f0
mov ecx, dword [edi + 0x10]
call fcn.004108a0
mov dword [ebp - 0x80], eax
cmp dword [eax + 0x14], 8
jb 0x4193ff
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call fcn.004054f0
cmp dword [ebp - 0x9c], 0xffffffff
jne 0x419446
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 0x419444
mov esi, 3
jmp 0x419699
xor esi, esi
push esi
push dword [ebp - 0xac]
mov ecx, edi
call fcn.0041a8f0
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 - 0xcc], 0
mov dword [ebp - 0xbc], 0
nop dword [eax + eax]
mov ecx, dword [ebp - 0x90]
cmp dword [ecx], 0
je 0x4194e0
push dword [edi + 4]
mov ecx, edi
call fcn.0041a140
test eax, eax
jne 0x4195f3
mov al, byte [ebp - 0x79]
test al, al
je 0x4194f4
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 0x41960f
mov ecx, dword [ebp - 0xb0]
test ecx, ecx
je 0x419607
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 0x4195fd
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 0x4195d3
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.0041a680
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xcc], 0
jmp 0x4195e7
mov eax, dword [ebp - 0xa0]
add eax, esi
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xcc], eax
test ecx, ecx
je 0x419607
mov al, byte [ebp - 0x79]
jmp 0x4194c0
mov esi, 0xe
jmp 0x41967f
mov esi, 8
jmp 0x41967f
mov esi, dword [ebp - 0xc4]
jmp 0x419614
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.0040e440
test al, 4
je 0x419675
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x80]
call fcn.00411b30
add esp, 8
test al, al
je 0x4196ac
mov ecx, dword [edi + 0x10]
call fcn.00410870
lea edx, [ebp - 0x20]
mov dword [ebp - 0x98], 0xc
nop
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x4196ac
add eax, 4
add edx, 4
sub dword [ebp - 0x98], 4
jae 0x419660
mov dword [ebp - 0xd4], 1
mov eax, dword [ebp - 0xc8]
test eax, eax
je 0x419699
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 0x4196b8
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x4196b8
mov esi, 0xb
jmp 0x41967f
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 0x4196e8
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.0041a750
mov eax, dword [ebp - 0xa4]
test eax, eax
je 0x41971b
push eax
call fcn.00421dec
add esp, 4
cmp dword [edi + 0x14], 0
je 0x4197a2
push 0x14
call fcn.00421b46
add esp, 4
mov dword [ebp - 0x98], eax
mov esi, dword [ebp - 0x80]
mov dword [ebp - 4], 2
test eax, eax
je 0x419750
push dword [esi]
mov ecx, eax
call fcn.0041b360
mov edx, eax
jmp 0x419752
xor edx, edx
mov dword [ebp - 4], 0xffffffff
test edx, edx
je 0x419765
mov ecx, dword [esi]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
push 0x14
call fcn.00421b46
add esp, 4
mov dword [ebp - 0x98], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x41978c
push dword [edi + 0x14]
mov ecx, eax
call fcn.0041b330
jmp 0x41978e
xor eax, eax
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x4197a2
mov ecx, dword [edi + 0x14]
push eax
call fcn.00417640
cmp dword [ebp - 0xd4], 0
je 0x4197bf
mov ecx, dword [edi + 0x10]
call fcn.00410920
test al, al
je 0x4197bf
mov ecx, dword [edi + 0x10]
call fcn.00410930
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.00421dd5
mov esp, ebp
pop ebp
ret