Function at 0x506644
Capabilities:
Check for time delay via gettickcount
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x410
push 0
push 0
dec ecx
jne 0x50664d
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040700c
mov eax, dword [ebp + 0x2c]
call fcn.0040700c
mov eax, dword [ebp + 0x28]
call fcn.0040700c
mov eax, dword [ebp + 0x14]
call fcn.0040700c
xor eax, eax
push ebp
push 0x506de4
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x19], 0
lea eax, [ebp - 0x2050]
mov edx, dword [ebp - 4]
call fcn.00407ab8
mov eax, dword [ebp - 0x2050]
lea edx, [ebp - 0x204c]
call fcn.00413c68
mov edx, dword [ebp - 0x204c]
lea eax, [ebp - 4]
mov ecx, 0
call fcn.00407ae0
lea eax, [ebp - 0xc]
call fcn.0040688c
mov eax, dword [ebp + 0x20]
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [ebp + 0x18]
call fcn.0040688c
mov eax, dword [ebp + 0x1c]
call fcn.0040688c
lea eax, [ebp - 0x205c]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040709c
mov edx, dword [ebp - 0x205c]
lea eax, [ebp - 0x2058]
call fcn.00407ab8
mov eax, dword [ebp - 0x2058]
lea edx, [ebp - 0x2054]
call fcn.00413540
mov eax, dword [ebp - 0x2054]
mov edx, 0x506e04
call fcn.00407f74
jne 0x50677f
mov eax, dword [ebp - 4]
test eax, eax
je 0x50675c
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x50675c
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x506767
sub ebx, 4
mov ebx, dword [ebx]
lea eax, [ebp - 4]
push eax
mov ecx, ebx
mov edx, 8
mov eax, dword [ebp - 4]
call fcn.0040709c
jmp 0x506817
lea eax, [ebp - 0x2068]
push eax
mov ecx, 8
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040709c
mov edx, dword [ebp - 0x2068]
lea eax, [ebp - 0x2064]
call fcn.00407ab8
mov eax, dword [ebp - 0x2064]
lea edx, [ebp - 0x2060]
call fcn.00413540
mov eax, dword [ebp - 0x2060]
mov edx, 0x506e20
call fcn.00407f74
jne 0x506817
mov eax, dword [ebp - 4]
test eax, eax
je 0x5067eb
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x5067eb
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x5067f6
sub ebx, 4
mov ebx, dword [ebx]
lea eax, [ebp - 4]
push eax
mov ecx, ebx
mov edx, 9
mov eax, dword [ebp - 4]
call fcn.0040709c
mov dword [ebp + 0xc], 0x1bb
mov dword [ebp - 0x38], 0x800000
cmp byte [ebp + 0x10], 0
je 0x506832
mov eax, dword [ebp - 0x38]
or eax, 0x4000000
or eax, 0x4000000
or eax, 0x80000000
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x206c]
mov edx, dword [ebp - 4]
call fcn.00407ab8
mov edx, dword [ebp - 0x206c]
mov eax, 0x506e40
call fcn.00408344
mov ebx, eax
lea eax, [ebp - 0x2070]
mov edx, dword [ebp - 4]
call fcn.00407ab8
mov edx, dword [ebp - 0x2070]
mov eax, 0x506e50
call fcn.00408344
mov dword [ebp - 0x34], eax
cmp ebx, 1
jge 0x5068a3
mov eax, dword [ebp - 4]
test eax, eax
je 0x506897
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x506897
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
test eax, eax
je 0x5068a0
sub eax, 4
mov eax, dword [eax]
lea ebx, [eax + 1]
cmp dword [ebp - 0x34], 1
jge 0x5068d5
mov eax, dword [ebp - 4]
test eax, eax
je 0x5068c8
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x5068c8
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
test eax, eax
je 0x5068d1
sub eax, 4
mov eax, dword [eax]
inc eax
mov dword [ebp - 0x34], eax
cmp ebx, dword [ebp - 0x34]
jge 0x506982
lea eax, [ebp - 0xc]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040709c
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 0x34]
sub ecx, ebx
dec ecx
lea edx, [ebx + 1]
mov eax, dword [ebp - 4]
call fcn.0040709c
xor eax, eax
push ebp
push 0x50693b
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x2074]
mov edx, dword [ebp - 8]
call fcn.00407ab8
mov eax, dword [ebp - 0x2074]
call fcn.00414654
mov dword [ebp + 0xc], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x506945
mov eax, dword [ebp - 4]
test eax, eax
je 0x506964
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x506964
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x50696f
sub ebx, 4
mov ebx, dword [ebx]
lea eax, [ebp - 4]
push eax
mov ecx, ebx
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
call fcn.0040709c
jmp 0x5069d2
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x34]
dec ecx
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040709c
mov eax, dword [ebp - 4]
test eax, eax
je 0x5069b6
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x5069b6
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x5069c1
sub ebx, 4
mov ebx, dword [ebx]
lea eax, [ebp - 4]
push eax
mov ecx, ebx
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
call fcn.0040709c
mov eax, dword [ebp - 0x38]
push eax
push 0
push 0
push 0
push 0x506e54
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x506d5e
xor edx, edx
push ebp
push 0x506d57
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp + 0x24], 0
je 0x506a3b
push 1
push 0
push 3
mov eax, dword [ebp + 0x28]
call fcn.0040701c
push eax
mov eax, dword [ebp + 0x2c]
call fcn.0040701c
push eax
movzx eax, word [ebp + 0xc]
push eax
mov eax, dword [ebp - 0xc]
call fcn.0040701c
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [ebp - 0x24], eax
jmp 0x506a65
push 1
push 0
push 3
push 0x506e88
push 0x506e88
movzx eax, word [ebp + 0xc]
push eax
mov eax, dword [ebp - 0xc]
call fcn.0040701c
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x506a75
call fcn.00406198
jmp 0x506d5e
xor edx, edx
push ebp
push 0x506d39
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x10]
mov edx, 0x506e98
call fcn.0040693c
mov eax, dword [ebp - 0x10]
call fcn.0040701c
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
push 0
mov eax, dword [ebp - 0x38]
or eax, 0x3000
push eax
lea eax, [ebp - 0x30]
push eax
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.0040701c
push eax
push 0x506e9c
mov eax, dword [ebp - 0x24]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x506ae2
call fcn.00406198
call fcn.00406198
jmp 0x506d5e
xor edx, edx
push ebp
push 0x506d1b
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x506b0f
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x506b0f
lea eax, [ebp + 0x14]
xor ecx, ecx
mov edx, dword [ebp + 0x14]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x506b1a
sub ebx, 4
mov ebx, dword [ebx]
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
push ebx
mov eax, dword [ebp + 0x14]
call fcn.0040701c
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_HttpSendRequestA
test eax, eax
jne 0x506b4d
call fcn.00406198
call fcn.00406198
call fcn.00406198
jmp 0x506d5e
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], 0x1001
mov eax, dword [ebp + 0x20]
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0xffffffff
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x1045]
push eax
push 0x13
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_HttpQueryInfoA
test eax, eax
je 0x506bde
lea eax, [ebp - 0x207c]
push eax
lea eax, [ebp - 0x2080]
lea edx, [ebp - 0x1045]
mov ecx, 0x1001
push 0
call fcn.00406bf4
mov eax, dword [ebp - 0x2080]
mov ecx, dword [ebp - 0x3c]
xor edx, edx
call fcn.0040709c
mov edx, dword [ebp - 0x207c]
lea eax, [ebp - 0x2078]
call fcn.00407ab8
mov eax, dword [ebp - 0x2078]
or edx, 0xffffffff
call fcn.00414690
cdq
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
mov dword [ecx + 4], edx
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], 0x1001
mov eax, dword [ebp + 0x18]
call fcn.0040688c
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x1045]
push eax
push 0x16
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_HttpQueryInfoA
test eax, eax
je 0x506c3c
mov eax, dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x2084]
lea edx, [ebp - 0x1045]
mov ecx, 0x1001
push 0
call fcn.00406bf4
mov eax, dword [ebp - 0x2084]
mov ecx, dword [ebp - 0x3c]
xor edx, edx
call fcn.0040709c
call sub.kernel32.dll_GetTickCount_1
mov esi, eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x2046], 0
lea eax, [ebp - 0x44]
push eax
push 0x1000
lea eax, [ebp - 0x2046]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_InternetReadFile
test eax, eax
je 0x506ceb
cmp dword [ebp - 0x44], 0
jbe 0x506cac
mov eax, dword [ebp - 0x44]
mov byte [ebp + eax - 0x2046], 0
lea eax, [ebp - 0x2088]
lea edx, [ebp - 0x2046]
mov ecx, 0x1001
push 0
call fcn.00406bf4
mov edx, dword [ebp - 0x2088]
mov eax, dword [ebp + 0x1c]
call fcn.00406ca4
mov eax, dword [ebp + 0x1c]
xor ebx, ebx
jmp 0x506cb3
cmp dword [ebp - 0x44], 0
jne 0x506cb3
inc ebx
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
test eax, eax
je 0x506cd6
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x506cd6
mov edx, dword [ebp + 0x1c]
mov edx, dword [edx]
mov eax, dword [ebp + 0x1c]
xor ecx, ecx
call fcn.00406aa8
test eax, eax
je 0x506cdf
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x200000
jle 0x506ceb
mov ebx, 6
cmp ebx, 5
jg 0x506d00
call sub.kernel32.dll_GetTickCount_1
sub eax, esi
cmp eax, dword [ebp + 8]
jbe 0x506c45
mov byte [ebp - 0x19], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x506d22
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_InternetCloseHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x506deb
lea eax, [ebp - 0x2088]
mov edx, 4
call fcn.004068b0
lea eax, [ebp - 0x2078]
mov edx, 4
call fcn.00407884
lea eax, [ebp - 0x2068]
call fcn.0040688c
lea eax, [ebp - 0x2064]
mov edx, 2
call fcn.00407884
lea eax, [ebp - 0x205c]
call fcn.0040688c
lea eax, [ebp - 0x2058]
mov edx, 4
call fcn.00407884
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.004068b0
lea eax, [ebp + 0x14]
call fcn.0040688c
lea eax, [ebp + 0x28]
mov edx, 2
call fcn.004068b0
ret