Function at 0x415250
Capabilities:
Check http status code
Check internet connectivity via wininet
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4e1fe0
push eax
mov eax, 0x19074
mov dword fs:[0], esp
call fcn.004b0390
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x5188e8
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], ebp
call fcn.004d489b
mov eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x509dd0]
mov edx, dword [0x509dd4]
mov dword [esp + 0x30], eax
mov eax, dword [0x509dd8]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], eax
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x40]
mov ebx, 4
mov dword [esp + 0x1908c], 1
rep stosd dword es:[edi], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea ecx, [esp + 0x44]
push str.Agent_ld
push ecx
call fcn.004aed8c
add esp, 0xc
lea edx, [esp + 0x24]
push ebp
push edx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov al, byte [esp + 0x24]
push ebp
test bl, al
push ebp
push ebp
jne 0x41530f
lea eax, [esp + 0x4c]
push 1
push eax
jmp 0x415315
lea ecx, [esp + 0x4c]
push ebp
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
mov dword [esp + 0x1c], eax
cmp edi, ebp
je 0x415473
push ebp
lea edx, [esp + 0x34]
push 0x84000100
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x190a0]
push eax
lea eax, [esp + 0x3c]
push eax
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
je 0x41545f
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea edx, [esp + 0x14]
push 0
push edx
push 0
push 0x13
push esi
call edi
mov eax, dword [esp + 0x14]
inc eax
push eax
call fcn.004d456e
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x415454
lea ecx, [esp + 0x14]
push 0
push ecx
push ebp
push 0x13
push esi
call edi
test eax, eax
je 0x415454
push ebp
call fcn.004b02ee
add esp, 4
cmp eax, 0xc8
jne 0x415454
lea edx, [esp + 0x28]
push 0
lea eax, [esp + 0x24]
push edx
push eax
push 0x20000005
push esi
call edi
test eax, eax
jne 0x4153ca
mov dword [esp + 0x20], eax
mov ecx, 0x6401
xor eax, eax
lea edi, [esp + 0x80]
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x80]
push ecx
push 0x19000
push edx
push esi
call ebx
test eax, eax
je 0x415454
mov eax, dword [esp + 0x14]
test eax, eax
je 0x415454
lea eax, [esp + 0x80]
lea ecx, [esp + 0x10]
push eax
call fcn.004d4c09
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1909c]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x18], eax
ja 0x415454
mov ecx, 0x6401
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x80]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push 0x19000
push edx
push esi
call ebx
test eax, eax
jne 0x4153f9
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebp, ebp
je 0x415473
push ebp
call fcn.004d4597
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
test ecx, ecx
jle 0x4154bf
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.004d45a2
lea eax, [esp + 0x1c]
push eax
call fcn.00415af0
add esp, 8
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x19090], 2
call fcn.004d4966
lea ecx, [esp + 0x18]
mov byte [esp + 0x1908c], 1
call fcn.004d482d
mov esi, dword [esp + 0x19094]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.004d45a2
mov dword [esp + 0x2c], 1
lea ecx, [esp + 0x10]
mov byte [esp + 0x1908c], 0
call fcn.004d482d
mov ecx, dword [esp + 0x19084]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x19080
ret