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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x583670
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [eax + 0x10], edi
je 0x509b88
cmp byte [esi], 0
je 0x509b88
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], edi
call fcn.00574f8f
mov eax, dword [0x667090]
mov dword [ebp - 4], edi
mov dword [ebp - 0x20], eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
push esi
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.00574a6b
lea ecx, [ebp - 0x30]
push 0x66059c
push ecx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.005724f1
lea ecx, [ebp - 0x30]
call fcn.005749fd
lea edx, [ebp - 0x18]
push 0x20000000
lea eax, [ebp - 0x1c]
push edx
lea ecx, [ebp - 0x3c]
push eax
lea edx, [ebp + 8]
push ecx
lea eax, [ebp - 0x20]
push edx
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
push eax
push ecx
push edx
call fcn.0057d980
cmp eax, edi
je 0x509855
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], 0x84000000
cmp eax, 0x100b
jne 0x50984a
mov dword [ebp - 0x28], 3
mov dword [ebp - 0x30], 0x84800000
mov ecx, ebx
call fcn.00509650
test eax, eax
jne 0x5098b3
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.005749fd
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.005749fd
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.005749fd
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.005749fd
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005749fd
mov dword [ebp - 4], 0xffffffff
call fcn.00574fcd
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
push edi
push edi
push eax
mov eax, dword [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x20]
push edx
mov edx, dword [ebx]
push eax
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x2c], esi
jne 0x509928
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.005749fd
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.005749fd
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.005749fd
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.005749fd
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005749fd
mov dword [ebp - 4], 0xffffffff
call fcn.00574fcd
jmp 0x509b67
push esi
mov ecx, ebx
call fcn.005096e0
lea eax, [ebp - 0x40]
push 0x66059c
push eax
lea ecx, [ebp + 8]
call fcn.005724f1
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 7
call fcn.00574aea
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 6
call fcn.005749fd
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp + 8]
push edi
lea edx, [ebp - 0x50]
push ecx
push edx
push edi
push str.HTTP_1.0
push eax
push 0x66058c
push esi
mov dword [ebp - 0x50], str.Accept:____r_n
mov dword [ebp - 0x4c], edi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
cmp ebx, edi
mov dword [ebp - 0x34], ebx
jne 0x5099d9
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.005749fd
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.005749fd
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.005749fd
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.005749fd
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005749fd
mov dword [ebp - 4], 0xffffffff
call fcn.00574fcd
jmp 0x509b5c
push edi
push edi
mov edi, str.Accept:___r_n_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Accept:___r_n_r_n
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x509a4a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.005749fd
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.005749fd
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.005749fd
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.005749fd
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005749fd
mov dword [ebp - 4], 0xffffffff
call fcn.00574fcd
xor edi, edi
jmp 0x509b5c
lea ecx, [ebp - 0x24]
push 0
lea edx, [ebp - 0x8c]
push ecx
push edx
push 5
push ebx
mov dword [ebp - 0x24], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x509a94
lea eax, [ebp - 0x8c]
push eax
call fcn.005631c5
add esp, 4
test eax, eax
jle 0x509a94
inc eax
cmp eax, 0x19000
jbe 0x509a8f
mov dword [ebp - 0x24], 0x19000
jmp 0x509a9b
mov dword [ebp - 0x24], eax
jmp 0x509a9b
mov dword [ebp - 0x24], 0x2800
lea ecx, [ebp - 0x6c]
call fcn.00509bb0
mov ecx, dword [ebp - 0x24]
mov byte [ebp - 4], 8
push ecx
lea ecx, [ebp - 0x6c]
call fcn.00509bd0
mov esi, eax
test esi, esi
jne 0x509b0a
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 6
mov dword [ebp - 0x6c], 0x63303c
call fcn.00509db0
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.005749fd
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.005749fd
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.005749fd
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.005749fd
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005749fd
jmp 0x509b4b
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x44]
push edx
push eax
push esi
push ebx
call edi
test eax, eax
je 0x509ab9
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x509b30
mov dword [ebp - 0x38], 1
jmp 0x509ab9
mov ecx, dword [ebp + 0xc]
push eax
push esi
call fcn.00509e40
jmp 0x509b10
mov dword [ebp - 4], 0xffffffff
call fcn.00574fcd
mov esi, dword [ebp - 0x2c]
xor edi, edi
cmp ebx, edi
je 0x509b67
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp esi, edi
je 0x509b72
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8