Function at 0x4044bd
Capabilities:
Check for time delay via gettickcount
Check http status code
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x488
push ebx
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
push esi
push edi
mov esi, ecx
je 0x404b95
cmp dword [ebp + 0x10], ebx
je 0x404b95
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
lea eax, [ebp + 0x1c]
push 4
push eax
push 2
push ebx
mov dword [esi + 0x14], ebx
call edi
lea eax, [ebp + 0x1c]
push 4
push eax
push 6
push ebx
call edi
lea eax, [ebp + 0x1c]
push 4
push eax
push 5
push ebx
call edi
push dword [ebp + 0x20]
mov ecx, esi
push dword [ebp + 0x14]
call fcn.004043a4
test eax, eax
jge 0x404554
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
call edi
push dword [ebp + 0x20]
mov ecx, esi
push dword [ebp + 0x14]
call fcn.004043a4
test eax, eax
jge 0x404554
push 0x64
call edi
push dword [ebp + 0x20]
mov ecx, esi
push dword [ebp + 0x14]
call fcn.004043a4
test eax, eax
jge 0x404554
mov eax, 0x8000aaa1
jmp 0x404b9a
lea eax, [ebp - 0xc]
push ebx
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
push eax
push 0x20000013
push dword [esi + 4]
mov dword [ebp - 0xc], 4
call edi
test eax, eax
je 0x40459f
cmp dword [ebp - 0xc], 4
jne 0x404b95
cmp dword [ebp - 0x1c], 0xc8
jb 0x404b95
cmp dword [ebp - 0x1c], 0x190
jae 0x404b95
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
push 0x20000005
push dword [esi + 4]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], 4
call edi
test eax, eax
je 0x4045ce
cmp dword [ebp - 0xc], 4
jne 0x4045cb
cmp dword [ebp - 0x10], ebx
jne 0x4045ce
mov dword [ebp - 0x10], ebx
lea eax, [esi + 8]
lea ecx, [ebp - 0x84]
push eax
call fcn.0041e1a0
lea eax, [ebp - 8]
lea ecx, [ebp - 0x84]
push eax
call fcn.0041e1d0
cmp byte [eax + 7], 0xff
jne 0x4045f4
mov eax, dword [eax]
mov edi, dword [ebp + 0x10]
push eax
mov ecx, edi
mov edx, dword [edi]
call dword [edx + 0xc]
lea ecx, [ebp - 8]
mov dword [ebp + 0x14], eax
call fcn.004146c0
cmp dword [ebp + 0x14], ebx
jl 0x404671
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
test eax, eax
je 0x40468d
mov eax, dword [edi]
push ebx
push ebx
push ebx
mov ecx, edi
call dword [eax + 0x14]
push eax
push dword [esi + 4]
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
cmp eax, 0xffffffff
jne 0x404684
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
mov eax, dword [edi]
push ebx
mov ecx, edi
call dword [eax + 8]
lea eax, [ebp - 8]
lea ecx, [ebp - 0x84]
push eax
call fcn.0041e1d0
cmp byte [eax + 7], 0xff
jne 0x404659
mov eax, dword [eax]
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx + 0xc]
lea ecx, [ebp - 8]
mov dword [ebp + 0x14], eax
call fcn.004146c0
cmp dword [ebp + 0x14], ebx
jge 0x40468d
lea ecx, [ebp - 0x84]
call fcn.0041e2d0
mov eax, dword [ebp + 0x14]
jmp 0x404b9a
mov ecx, dword [ebp + 0xc]
push eax
mov edx, dword [ecx]
call dword [edx + 0x10]
cmp dword [ebp + 8], ebx
je 0x4046c7
cmp dword [ebp + 0x18], ebx
je 0x4046c7
push str.downloadStart
lea ecx, [ebp - 0x28]
call fcn.004146d0
mov eax, dword [ebp + 0x18]
add eax, 0x28
cmp byte [eax + 7], 0xff
jne 0x4046b2
mov eax, dword [eax]
lea ecx, [ebp - 0x28]
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.00405399
lea ecx, [ebp - 0x28]
call fcn.004146c0
cmp dword [ebp + 0xc], ebx
je 0x4046e3
cmp byte [esi + 0xf], 0xff
lea eax, [esi + 8]
jne 0x4046d7
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
push dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
call dword [edx + 0xc]
push 0x441880
lea ecx, [ebp - 0x30]
mov dword [ebp + 0x20], ebx
call fcn.004146d0
lea eax, [ebp - 0x30]
push eax
push str.SoftwareRealNetworksConfigSlow
push SysReAllocStringLen
call fcn.0041341c
add esp, 0xc
test eax, eax
je 0x404724
cmp byte [ebp - 0x29], 0xff
lea eax, [ebp - 0x30]
jne 0x404719
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
pop ecx
mov dword [ebp + 0x20], eax
push 1
mov dword [ebp - 0x14], ebx
pop eax
mov dword [ebp - 0x18], ebx
mov dword [esi + 0x10], eax
mov dword [esi + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
or dword [esi + 0x18], 0xffffffff
cmp dword [esi + 0x14], ebx
mov dword [ebp - 0x20], eax
jne 0x404a8f
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x404768
cmp dword [eax + 0x429], ebx
je 0x404768
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x404768
cmp dword [eax + 4], ebx
je 0x404a89
cmp dword [ebp - 0x14], 0x4c4b40
jbe 0x4047b5
push 0x441880
lea ecx, [ebp - 0x28]
call fcn.004146d0
lea eax, [ebp - 0x28]
push eax
push str.SoftwareRealNetworksConfigWait
push SysReAllocStringLen
call fcn.0041341c
add esp, 0xc
test eax, eax
je 0x4047ad
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x28]
call fcn.004146c0
jmp 0x404a7e
lea ecx, [ebp - 0x28]
call fcn.004146c0
cmp dword [ebp + 0x20], ebx
jbe 0x4047c3
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esi + 4]
cmp edx, ebx
je 0x40487e
mov al, byte [0x441880]
mov ecx, 0x100
mov byte [ebp - 0x488], al
xor eax, eax
lea edi, [ebp - 0x487]
mov dword [ebp + 0x14], ebx
rep stosd dword es:[edi], eax
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x488]
push 0x400
push eax
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40480f
mov dword [esi + 0x1c], 3
jmp 0x404818
cmp dword [ebp + 0x14], ebx
je 0x404a8c
cmp dword [ebp + 0x14], ebx
jbe 0x404886
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
je 0x40482c
mov eax, dword [ecx]
push dword [ebp + 0x14]
call dword [eax + 0x10]
mov ecx, dword [ebp + 0x10]
push dword [ebp + 0x14]
lea edx, [ebp - 0x488]
mov eax, dword [ecx]
push edx
call dword [eax + 0x18]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], ebx
add eax, dword [ebp + 0x14]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x14], eax
fild qword [ebp - 0x54]
fmul dword [0x4394c8]
fstp dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], eax
fild qword [ebp - 0x44]
fmul dword [0x4394c4]
fdivr dword [ebp - 0x34]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x18], eax
jmp 0x404886
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp + 0x18]
cmp edi, ebx
jne 0x4048a2
mov eax, dword [esi + 0x1c]
cmp eax, 5
je 0x404a89
cmp eax, 3
je 0x404a89
cmp dword [esi + 4], ebx
je 0x404942
mov eax, dword [esi + 0x1c]
cmp eax, 5
je 0x4048bc
cmp eax, 3
jne 0x404942
cmp dword [ebp + 8], ebx
je 0x4048f7
cmp eax, 5
jne 0x4048f7
cmp edi, ebx
je 0x4048f7
push str.downloadPause
lea ecx, [ebp - 0x4c]
call fcn.004146d0
cmp byte [edi + 0x2f], 0xff
lea eax, [edi + 0x28]
jne 0x4048e2
mov eax, dword [eax]
lea ecx, [ebp - 0x4c]
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.00405399
lea ecx, [ebp - 0x4c]
call fcn.004146c0
push dword [esi + 4]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push dword [esi]
mov dword [esi + 4], ebx
call edi
cmp dword [ebp + 0xc], ebx
mov dword [esi], ebx
je 0x404922
mov ecx, dword [ebp + 0xc]
xor edx, edx
cmp dword [esi + 0x1c], 3
mov eax, dword [ecx]
sete dl
push edx
call dword [eax + 4]
xor eax, eax
cmp dword [esi + 0x1c], 3
setne al
dec eax
and eax, 2
inc eax
inc eax
mov dword [esi + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x18], eax
jmp 0x404a7e
mov eax, dword [esi + 0x1c]
cmp eax, 4
je 0x404953
cmp eax, 6
jne 0x404a7e
push ebx
push ebx
push ebx
push ebx
push str.RNSetup
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esi], eax
je 0x404986
cmp byte [esi + 0xf], 0xff
lea ecx, [esi + 8]
jne 0x404973
mov ecx, dword [ecx]
push ebx
push 0x200000
push ebx
push ebx
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esi + 4], eax
cmp dword [esi], ebx
je 0x404a42
cmp dword [esi + 4], ebx
je 0x404a42
mov ecx, dword [ebp + 0x10]
push ebx
push ebx
push ebx
mov eax, dword [ecx]
call dword [eax + 0x14]
push eax
push dword [esi + 4]
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
cmp dword [ebp + 8], ebx
je 0x404a1d
mov eax, dword [esi + 0x1c]
cmp eax, 4
jne 0x4049e7
cmp edi, ebx
je 0x4049e7
push str.downloadAutoResume
lea ecx, [ebp - 0x3c]
call fcn.004146d0
cmp byte [edi + 0x2f], 0xff
lea eax, [edi + 0x28]
jne 0x4049d5
mov eax, dword [eax]
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.00405399
lea ecx, [ebp - 0x3c]
jmp 0x404a18
cmp eax, 6
jne 0x404a1d
cmp edi, ebx
je 0x404a1d
push str.downloadResume
lea ecx, [ebp - 8]
call fcn.004146d0
cmp byte [edi + 0x2f], 0xff
lea eax, [edi + 0x28]
jne 0x404a08
mov eax, dword [eax]
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.00405399
lea ecx, [ebp - 8]
call fcn.004146c0
cmp dword [ebp + 0xc], ebx
je 0x404a2a
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
call dword [eax + 8]
mov dword [esi + 0x1c], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], ebx
add dword [ebp - 0x20], eax
jmp 0x404a7e
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x404a53
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 4], ebx
mov eax, dword [esi]
cmp eax, ebx
je 0x404a62
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi], ebx
cmp dword [esi + 0x1c], 6
jne 0x404a7e
cmp dword [ebp + 0xc], ebx
je 0x404a77
mov ecx, dword [ebp + 0xc]
push 1
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esi + 0x1c], 4
cmp dword [esi + 0x14], ebx
je 0x404749
jmp 0x404a8c
mov dword [esi + 0x10], ebx
mov edi, dword [ebp + 0x10]
cmp dword [ebp + 8], ebx
je 0x404b00
cmp dword [ebp + 0x18], ebx
je 0x404b00
cmp dword [esi + 0x14], ebx
je 0x404acb
push str.downloadCancel
lea ecx, [ebp - 8]
call fcn.004146d0
mov eax, dword [ebp + 0x18]
add eax, 0x28
cmp byte [eax + 7], 0xff
jne 0x404ab9
mov eax, dword [eax]
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.00405399
lea ecx, [ebp - 8]
jmp 0x404afb
cmp dword [esi + 0x10], ebx
je 0x404b00
push str.downloadSuccessful
lea ecx, [ebp - 8]
call fcn.004146d0
mov eax, dword [ebp + 0x18]
add eax, 0x28
cmp byte [eax + 7], 0xff
jne 0x404aeb
mov eax, dword [eax]
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.00405399
lea ecx, [ebp - 8]
call fcn.004146c0
cmp dword [ebp + 0xc], ebx
je 0x404b18
mov ecx, dword [ebp + 0xc]
cmp dword [esi + 0x14], ebx
mov eax, dword [ecx]
je 0x404b12
push ebx
jmp 0x404b15
push dword [esi + 0x10]
call dword [eax + 0x14]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
mov eax, dword [esi + 4]
xor edi, edi
cmp eax, ebx
je 0x404b3d
cmp dword [esi], ebx
je 0x404b3d
cmp dword [esi + 0x10], ebx
je 0x404b3d
cmp dword [esi + 0x14], ebx
je 0x404b61
mov edi, 0x8000aaa3
jmp 0x404b61
mov ecx, dword [ebp + 8]
cmp ecx, ebx
je 0x404b5c
cmp dword [ecx + 0x429], ebx
je 0x404b5c
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
je 0x404b5c
cmp dword [ecx + 4], ebx
jne 0x404b5c
xor edi, edi
jmp 0x404b61
mov edi, 0x80004005
cmp eax, ebx
je 0x404b6f
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 4], ebx
mov eax, dword [esi]
cmp eax, ebx
je 0x404b7e
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi], ebx
lea ecx, [ebp - 0x30]
call fcn.004146c0
lea ecx, [ebp - 0x84]
call fcn.0041e2d0
mov eax, edi
jmp 0x404b9a
mov eax, 0x80004005
pop edi
pop esi
pop ebx
leave
ret 0x1c