Function at 0x524fb4
Capabilities:
Connect to http server
Create http request
Get http content length
Read data from internet
Receive data
Reference http user-agent string
Send data
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff8c
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5253e4
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x24], eax
push 0x5253f4
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x5ab4e4], eax
push 0x525404
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x5ab4ec], eax
push 0x52541c
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x5ab4e8], eax
push 0x10000000
push 0
push 0
push 0
push 0x525428
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x52539c
mov ecx, 0x524d78
push ecx
mov eax, dword [ebp - 0x10]
push eax
call sub.wininet.dll_InternetSetStatusCallback
mov ecx, eax
mov eax, ecx
xor edx, edx
cmp edx, 0xffffffff
jne 0x525082
cmp eax, 0xffffffff
jne 0x525082
mov ecx, 0x525440
mov dl, 1
mov eax, dword [0x407ec0]
call fcn.0040d954
call fcn.00403e44
add dword [ebp - 0x24], 1
jno 0x52508d
call fcn.004034f4
push 1
push 0
push 3
push 0
push 0
push 0x50
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 4]
call fcn.00524df8
mov eax, dword [ebp - 0x5c]
call fcn.00404988
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [0x5ab4e0], eax
cmp dword [0x5ab4e0], 0
jne 0x5250e1
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e5
jne 0x52539c
push 0xffffffffffffffff
mov eax, dword [0x5ab4e4]
push eax
call sub.kernel32.dll_WaitForSingleObject
push 2
push 0x84000000
push 0
push 0
push 0
push ebp
lea eax, [ebp - 0x60]
call fcn.00524f30
pop ecx
mov eax, dword [ebp - 0x60]
call fcn.00404988
push eax
push 0x525460
mov eax, dword [0x5ab4e0]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [0x5ab4dc], eax
cmp dword [0x5ab4dc], 0
jne 0x52513c
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e5
jne 0x52539c
push 0xffffffffffffffff
mov eax, dword [0x5ab4e8]
push eax
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 0x64]
push eax
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 4]
call fcn.00524df8
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x6c], eax
mov byte [ebp - 0x68], 0xb
lea edx, [ebp - 0x6c]
xor ecx, ecx
mov eax, dword [0x5a7fa8]
call fcn.0040a6f8
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x14]
call fcn.00404560
push 0
push 0
mov eax, dword [ebp - 0x14]
call fcn.00404788
imul eax, eax, 1
jno 0x525185
call fcn.004034f4
test eax, eax
jns 0x52518e
call fcn.004034ec
push eax
mov eax, dword [ebp - 0x14]
call fcn.00404988
push eax
mov eax, dword [0x5ab4dc]
push eax
call sub.wininet.dll_HttpSendRequestA
test eax, eax
jne 0x5251b7
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e5
jne 0x52539c
push 0xffffffffffffffff
mov eax, dword [0x5ab4ec]
push eax
call sub.kernel32.dll_WaitForSingleObject
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 4
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x20000005
mov eax, dword [0x5ab4dc]
push eax
call sub.wininet.dll_HttpQueryInfoA
mov eax, 0x1000
call fcn.00402780
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x58]
mov edx, 0x28
call fcn.0040786c
lea edx, [ebp - 0x74]
mov eax, dword [ebp - 8]
call fcn.00409ae0
mov eax, dword [ebp - 0x74]
call fcn.0040985c
push 0xffff
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4197c0]
call fcn.0041e7cc
mov dword [ebp - 0x20], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [0x5ab4f4], eax
mov byte [0x5ab4f0], 0
xor edx, edx
push ebp
push 0x52535d
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x58]
mov edx, 0x28
call fcn.0040786c
mov dword [ebp - 0x58], 0x28
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], 0x1000
mov eax, dword [0x5ab4ec]
push eax
call sub.kernel32.dll_ResetEvent
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
push eax
push 8
lea eax, [ebp - 0x58]
push eax
mov eax, dword [0x5ab4dc]
push eax
call sub.wininet.dll_InternetReadFileExA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
je 0x5252fd
add dword [ebp - 0x30], 1
jae 0x5252b5
call fcn.004034f4
mov ecx, dword [ebp - 0x40]
test ecx, ecx
jns 0x5252c1
call fcn.004034ec
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov esi, dword [eax]
call dword [esi + 0x10]
mov edx, 0x1000
mov eax, dword [ebp - 0x1c]
call fcn.0040786c
add ebx, dword [ebp - 0x40]
jae 0x5252e3
call fcn.004034f4
mov eax, dword [ebp - 0x30]
mov ecx, 3
xor edx, edx
div ecx
test edx, edx
jne 0x525316
mov edx, dword [ebp - 0x28]
mov eax, ebx
call dword [ebp + 0x10]
jmp 0x525316
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e5
jne 0x525316
push 0xffffffffffffffff
mov eax, dword [0x5ab4ec]
push eax
call sub.kernel32.dll_WaitForSingleObject
cmp dword [ebp - 0x40], 0
jne 0x525321
cmp ebx, dword [ebp - 0x28]
je 0x52533f
cmp byte [0x5ab4f0], 0
jne 0x52533f
call dword [ebp + 8]
test al, al
je 0x525258
mov dword [0x5ab4f4], 0x666666
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x525364
mov eax, dword [ebp - 0x1c]
call fcn.004027a0
mov eax, dword [ebp - 0x20]
call fcn.004035b4
ret
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0xc]
jle 0x525082
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
call dword [ebp + 0xc]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5253eb
lea eax, [ebp - 0x74]
mov edx, 2
call fcn.004044ec
lea eax, [ebp - 0x64]
mov edx, 3
call fcn.004044ec
lea eax, [ebp - 0x14]
call fcn.004044c8
ret