Function at 0x510beb20
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.51004a94
xor eax, eax
push ebp
push 0x510bee92
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x2d], 0
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x510bee67
lea eax, [ebp - 0x18]
mov edx, 0x510beea8
call fcn.5100467c
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.510be9e0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x18]
call fcn.51004aa4
push eax
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x34], 0x64
push 4
lea eax, [ebp - 0x34]
push eax
push 0x49
push 0
call sub.wininet.dll_InternetSetOptionA
cmp dword [ebp - 0xc], 0
je 0x510bebe8
push 0
push 0
push 3
push 0
push 0
push 0x50
mov eax, dword [ebp - 0x1c]
call fcn.51004aa4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x510bec15
push 0
push 0xa4000100
push 0
push 0
push 0
mov eax, dword [ebp - 0x20]
call fcn.51004aa4
push eax
push 0x510beef4
mov eax, dword [ebp - 0x10]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x3c], 0x1388
push 4
lea eax, [ebp - 0x3c]
push eax
push 2
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
push 4
lea eax, [ebp - 0x3c]
push eax
push 5
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
push 4
lea eax, [ebp - 0x3c]
push eax
push 6
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x510bee67
cmp dword [ebp - 0x14], 0
je 0x510bed01
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add eax, dword [edx + 4]
test eax, eax
jle 0x510becc6
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add eax, dword [edx + 4]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0
lea edx, [ebp - 0x44]
xor ecx, ecx
mov eax, 0x510bef00
call fcn.51009ec0
push 0x10000000
mov eax, dword [ebp - 0x2c]
call fcn.510048a4
push eax
mov eax, dword [ebp - 0x2c]
call fcn.51004aa4
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_HttpAddRequestHeadersA
push 0x20000000
push 0xf
push 0x510bef14
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_HttpAddRequestHeadersA
push 0x20000000
push 0x16
push 0x510bef24
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_HttpAddRequestHeadersA
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_HttpSendRequestA
xor eax, eax
push ebp
push 0x510bee4b
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x14], 0
je 0x510bee10
jmp 0x510bed22
push 1
call sub.kernel32.dll_Sleep_1
push 0
push 0
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetQueryDataAvailable
test eax, eax
jne 0x510bed43
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e5
je 0x510bed1b
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x510bee10
mov eax, dword [ebp - 0x38]
call fcn.5100898c
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x2e], 0
xor eax, eax
push ebp
push 0x510bed9a
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetReadFile
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x2e], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x510beda4
cmp byte [ebp - 0x2e], 0
je 0x510bedf5
cmp dword [ebp - 0x28], 0
jbe 0x510bedf5
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 4]
mov eax, dword [ebx]
add eax, dword [ebx + 4]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
call fcn.510bef48
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 4]
call fcn.510bef3c
mov byte [ebp - 0x2d], 0
mov eax, dword [ebp - 4]
mov esi, dword [eax + 4]
mov edi, dword [esi + 8]
cmp edi, dword [esi + 4]
jg 0x510bee03
test edi, edi
je 0x510bee03
mov eax, dword [ebp - 0x24]
call fcn.51002abc
jmp 0x510bee10
mov byte [ebp - 0x2d], 1
mov eax, dword [ebp - 0x24]
call fcn.51002abc
jmp 0x510bee10
mov eax, dword [ebp - 0x24]
call fcn.51002abc
jmp 0x510bed22
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x510bee52
cmp dword [ebp - 0x14], 0
je 0x510bee2c
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetCloseHandle
cmp dword [ebp - 0x10], 0
je 0x510bee3b
mov eax, dword [ebp - 0x10]
push eax
call sub.wininet.dll_InternetCloseHandle
cmp dword [ebp - 0xc], 0
je 0x510bee4a
mov eax, dword [ebp - 0xc]
push eax
call sub.wininet.dll_InternetCloseHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x510bee99
lea eax, [ebp - 0x2c]
call fcn.510045e4
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.51004608
lea eax, [ebp - 8]
call fcn.510045e4
ret