Function at 0x5053e0
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, 0x318
push 0
push 0
dec ecx
jne 0x5053e9
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040700c
mov eax, dword [ebp - 8]
call fcn.0040700c
mov eax, dword [ebp - 0xc]
call fcn.0040700c
mov eax, dword [ebp + 0x24]
call fcn.0040700c
mov eax, dword [ebp + 0x10]
call fcn.0040700c
xor eax, eax
push ebp
push 0x505d8a
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x19], 0
mov eax, dword [ebp + 0x1c]
call fcn.0040688c
lea eax, [ebp - 0x1860]
mov edx, dword [ebp - 4]
call fcn.00407ab8
mov eax, dword [ebp - 0x1860]
lea edx, [ebp - 0x185c]
call fcn.00413c68
mov edx, dword [ebp - 0x185c]
lea eax, [ebp - 4]
mov ecx, 0
call fcn.00407ae0
lea eax, [ebp - 0x10]
call fcn.0040688c
mov dword [ebp - 0x38], 0x50
xor eax, eax
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x186c]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040709c
mov edx, dword [ebp - 0x186c]
lea eax, [ebp - 0x1868]
call fcn.00407ab8
mov eax, dword [ebp - 0x1868]
lea edx, [ebp - 0x1864]
call fcn.00413540
mov eax, dword [ebp - 0x1864]
mov edx, 0x505dac
call fcn.00407f74
jne 0x505517
mov eax, dword [ebp - 4]
test eax, eax
je 0x5054f4
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x5054f4
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x5054ff
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 0x5055b9
lea eax, [ebp - 0x1878]
push eax
mov ecx, 8
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040709c
mov edx, dword [ebp - 0x1878]
lea eax, [ebp - 0x1874]
call fcn.00407ab8
mov eax, dword [ebp - 0x1874]
lea edx, [ebp - 0x1870]
call fcn.00413540
mov eax, dword [ebp - 0x1870]
mov edx, 0x505dc8
call fcn.00407f74
jne 0x5055b9
mov eax, dword [ebp - 4]
test eax, eax
je 0x505583
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x505583
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x505597
mov eax, dword [ebp - 0x54]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 0x54]
mov edx, 9
mov eax, dword [ebp - 4]
call fcn.0040709c
mov dword [ebp - 0x38], 0x1bb
mov dword [ebp - 0x40], 0x800000
cmp byte [ebp + 0xc], 0
je 0x5055d4
mov eax, dword [ebp - 0x40]
or eax, 0x4000000
or eax, 0x4000000
or eax, 0x80000000
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x187c]
mov edx, dword [ebp - 4]
call fcn.00407ab8
mov edx, dword [ebp - 0x187c]
mov eax, 0x505de8
call fcn.00408344
mov ebx, eax
lea eax, [ebp - 0x1880]
mov edx, dword [ebp - 4]
call fcn.00407ab8
mov edx, dword [ebp - 0x1880]
mov eax, 0x505df8
call fcn.00408344
mov dword [ebp - 0x34], eax
cmp ebx, 1
jge 0x505645
mov eax, dword [ebp - 4]
test eax, eax
je 0x505639
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x505639
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
test eax, eax
je 0x505642
sub eax, 4
mov eax, dword [eax]
lea ebx, [eax + 1]
cmp dword [ebp - 0x34], 1
jge 0x505677
mov eax, dword [ebp - 4]
test eax, eax
je 0x50566a
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x50566a
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
test eax, eax
je 0x505673
sub eax, 4
mov eax, dword [eax]
inc eax
mov dword [ebp - 0x34], eax
cmp ebx, dword [ebp - 0x34]
jge 0x505724
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040709c
lea eax, [ebp - 0x14]
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 0x5056dd
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x1884]
mov edx, dword [ebp - 0x14]
call fcn.00407ab8
mov eax, dword [ebp - 0x1884]
call fcn.00414654
mov dword [ebp - 0x38], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5056e7
mov eax, dword [ebp - 4]
test eax, eax
je 0x505706
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x505706
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x505711
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 0x505774
lea eax, [ebp - 0x10]
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 0x505758
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x505758
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x505763
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 + 0x1c]
call fcn.0040688c
push 0
push 0
push 0
push 0
push 0x505dfc
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x505809
mov eax, dword [ebp + 0x18]
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0xffffffff
push 0x505e3c
call sub.kernel32.dll_GetLastError_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x188c]
call fcn.004145d4
push dword [ebp - 0x188c]
push 0x505e64
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x1890]
call fcn.00419204
push dword [ebp - 0x1890]
lea eax, [ebp - 0x1888]
mov edx, 4
call fcn.00407e54
mov edx, dword [ebp - 0x1888]
mov eax, dword [ebp + 0x1c]
mov ecx, 0
call fcn.00407ae0
jmp 0x505d0e
xor edx, edx
push ebp
push 0x505d07
push dword fs:[edx]
mov dword fs:[edx], esp
push 4
lea eax, [ebp + 8]
push eax
push 6
mov eax, dword [ebp - 0x20]
push eax
call sub.wininet.dll_InternetSetOptionW
push 4
lea eax, [ebp + 8]
push eax
push 5
mov eax, dword [ebp - 0x20]
push eax
call sub.wininet.dll_InternetSetOptionW
cmp byte [ebp + 0x20], 0
je 0x505873
push 1
push 0
push 3
mov eax, dword [ebp + 0x24]
call fcn.0040701c
push eax
mov eax, dword [ebp - 0xc]
call fcn.0040701c
push eax
movzx eax, word [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x10]
call fcn.0040701c
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [ebp - 0x24], eax
jmp 0x50589d
push 1
push 0
push 3
push 0x505e68
push 0x505e68
movzx eax, word [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x10]
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 0x50591a
mov eax, dword [ebp + 0x18]
mov dword [eax], 0xfffffffe
mov dword [eax + 4], 0xffffffff
push 0x505e3c
call sub.kernel32.dll_GetLastError_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1898]
call fcn.004145d4
push dword [ebp - 0x1898]
push 0x505e64
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x189c]
call fcn.00419204
push dword [ebp - 0x189c]
lea eax, [ebp - 0x1894]
mov edx, 4
call fcn.00407e54
mov edx, dword [ebp - 0x1894]
mov eax, dword [ebp + 0x1c]
mov ecx, 0
call fcn.00407ae0
call fcn.00406198
jmp 0x505d0e
xor edx, edx
push ebp
push 0x505ce9
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x18]
mov edx, 0x505e78
call fcn.0040693c
mov eax, dword [ebp - 0x18]
call fcn.0040701c
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
push 0
mov eax, dword [ebp - 0x40]
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 0x505e7c
mov eax, dword [ebp - 0x24]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x5059f4
mov eax, dword [ebp + 0x18]
mov dword [eax], 0xfffffffd
mov dword [eax + 4], 0xffffffff
push 0x505e3c
call sub.kernel32.dll_GetLastError_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x18a4]
call fcn.004145d4
push dword [ebp - 0x18a4]
push 0x505e64
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x18a8]
call fcn.00419204
push dword [ebp - 0x18a8]
lea eax, [ebp - 0x18a0]
mov edx, 4
call fcn.00407e54
mov edx, dword [ebp - 0x18a0]
mov eax, dword [ebp + 0x1c]
mov ecx, 0
call fcn.00407ae0
call fcn.00406198
call fcn.00406198
jmp 0x505d0e
xor edx, edx
push ebp
push 0x505ccb
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x505a21
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x505a21
lea eax, [ebp + 0x10]
xor ecx, ecx
mov edx, dword [ebp + 0x10]
call fcn.00406aa8
mov ebx, eax
test ebx, ebx
je 0x505a2c
sub ebx, 4
mov ebx, dword [ebx]
mov eax, dword [ebp - 8]
test eax, eax
je 0x505a4b
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x505a4b
lea eax, [ebp - 8]
xor ecx, ecx
mov edx, dword [ebp - 8]
call fcn.00406aa8
mov esi, eax
test esi, esi
je 0x505a56
sub esi, 4
mov esi, dword [esi]
push esi
mov eax, dword [ebp - 8]
call fcn.0040701c
push eax
push ebx
mov eax, dword [ebp + 0x10]
call fcn.0040701c
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_HttpSendRequestA
test eax, eax
jne 0x505afc
mov eax, dword [ebp + 0x18]
mov dword [eax], 0xfffffffc
mov dword [eax + 4], 0xffffffff
push 0x505e3c
call sub.kernel32.dll_GetLastError_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x18b0]
call fcn.004145d4
push dword [ebp - 0x18b0]
push 0x505e64
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x18b4]
call fcn.00419204
push dword [ebp - 0x18b4]
lea eax, [ebp - 0x18ac]
mov edx, 4
call fcn.00407e54
mov edx, dword [ebp - 0x18ac]
mov eax, dword [ebp + 0x1c]
mov ecx, 0
call fcn.00407ae0
call fcn.00406198
call fcn.00406198
call fcn.00406198
jmp 0x505d0e
xor eax, eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], 0x401
mov eax, dword [ebp + 0x18]
mov dword [eax], 0xfffffffb
mov dword [eax + 4], 0xffffffff
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x1858]
push eax
push 0x13
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_HttpQueryInfoW
test eax, eax
je 0x505b7a
lea eax, [ebp - 0x18b8]
push eax
lea eax, [ebp - 0x18bc]
lea edx, [ebp - 0x1858]
mov ecx, 0x401
call fcn.00407a9c
mov eax, dword [ebp - 0x18bc]
mov ecx, dword [ebp - 0x4c]
xor edx, edx
call fcn.00407fdc
mov eax, dword [ebp - 0x18b8]
or edx, 0xffffffff
call fcn.00414690
cdq
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov dword [ecx + 4], edx
xor eax, eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], 0x401
mov eax, dword [ebp + 0x14]
call fcn.0040688c
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x1858]
push eax
push 0x16
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_HttpQueryInfoW
test eax, eax
je 0x505bec
lea eax, [ebp - 0x18c0]
push eax
lea eax, [ebp - 0x18c4]
lea edx, [ebp - 0x1858]
mov ecx, 0x401
call fcn.00407a9c
mov eax, dword [ebp - 0x18c4]
mov ecx, dword [ebp - 0x4c]
xor edx, edx
call fcn.00407fdc
mov edx, dword [ebp - 0x18c0]
mov eax, dword [ebp + 0x14]
mov ecx, 0
call fcn.00407ae0
call sub.kernel32.dll_GetTickCount_1
mov esi, eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x1055], 0
lea eax, [ebp - 0x3c]
push eax
push 0x1000
lea eax, [ebp - 0x1055]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.wininet.dll_InternetReadFile
test eax, eax
je 0x505c9b
cmp dword [ebp - 0x3c], 0
jbe 0x505c5c
mov eax, dword [ebp - 0x3c]
mov byte [ebp + eax - 0x1055], 0
lea eax, [ebp - 0x18c8]
lea edx, [ebp - 0x1055]
mov ecx, 0x1001
push 0
call fcn.00406bf4
mov edx, dword [ebp - 0x18c8]
mov eax, dword [ebp + 0x1c]
call fcn.00406ca4
mov eax, dword [ebp + 0x1c]
xor ebx, ebx
jmp 0x505c63
cmp dword [ebp - 0x3c], 0
jne 0x505c63
inc ebx
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
test eax, eax
je 0x505c86
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x505c86
mov edx, dword [ebp + 0x1c]
mov edx, dword [edx]
mov eax, dword [ebp + 0x1c]
xor ecx, ecx
call fcn.00406aa8
test eax, eax
je 0x505c8f
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x200000
jle 0x505c9b
mov ebx, 6
cmp ebx, 5
jg 0x505cb0
call sub.kernel32.dll_GetTickCount_1
sub eax, esi
cmp eax, dword [ebp + 8]
jbe 0x505bf5
mov byte [ebp - 0x19], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x505cd2
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 0x505d91
lea eax, [ebp - 0x18c8]
call fcn.0040688c
lea eax, [ebp - 0x18c4]
mov edx, 0x13
call fcn.00407884
lea eax, [ebp - 0x1878]
call fcn.0040688c
lea eax, [ebp - 0x1874]
mov edx, 2
call fcn.00407884
lea eax, [ebp - 0x186c]
call fcn.0040688c
lea eax, [ebp - 0x1868]
mov edx, 4
call fcn.00407884
lea eax, [ebp - 0x18]
mov edx, 6
call fcn.004068b0
lea eax, [ebp + 0x10]
call fcn.0040688c
lea eax, [ebp + 0x24]
call fcn.0040688c
ret