Function at 0x507140
Capabilities:
Read data from internet
Receive data

Disassembly:
mov eax, 0x818
call fcn.00609610
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov esi, ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], 4
mov dword [esp + 0x18], 1
mov eax, dword [esi + 4]
mov dword [eax + 4], ebp
mov edx, dword [esi + 0x2c]
cmp edx, ebp
je 0x507183
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x507178
sub eax, edi
jmp 0x507185
xor eax, eax
mov ecx, dword [esi + 0x10]
push ebp
push ebp
push eax
push edx
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x507209
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esi + 4]
mov dword [edx + 4], eax
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0x2f0d
je 0x5071c6
mov ecx, eax
mov eax, dword [ecx + 4]
cmp eax, 0x2f06
je 0x5071c6
cmp eax, 0x2f05
jne 0x507300
mov ecx, dword [esi + 0x10]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x14]
push eax
push 0x1f
push ecx
mov dword [esp + 0x2c], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
mov eax, dword [esp + 0x10]
push 4
or eax, 0x3100
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x10]
push 0x1f
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionA]
jmp 0x507166
mov eax, dword [esi + 0x10]
push ebp
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x28]
push edx
push 0x20000013
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x50734c
jmp 0x507230
mov eax, dword [esi + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0x800
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [esp + 0x14], ebp
jne 0x507230
mov ecx, 0x18
call fcn.004dc5a0
cmp eax, ebp
je 0x507268
mov ecx, eax
call fcn.00532a70
mov ebx, eax
jmp 0x50726a
xor ebx, ebx
mov ecx, ebx
call fcn.00532b80
test eax, eax
je 0x5072d9
mov ecx, ebx
call fcn.00532d40
test eax, eax
je 0x5072d9
mov ecx, ebx
call fcn.00532db0
mov ecx, ebx
mov edi, eax
call fcn.00532e60
mov ebp, eax
cmp byte [edi], 0
je 0x5072b7
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5072a0
mov ecx, dword [esi + 0x10]
sub eax, edx
push eax
push edi
push 0x2b
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionA]
cmp byte [ebp], 0
je 0x5072d9
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5072c2
sub eax, edx
mov edx, dword [esi + 0x10]
push eax
push ebp
push 0x2c
push edx
call dword [sym.imp.WININET.dll_InternetSetOptionA]
xor ebp, ebp
cmp ebx, ebp
je 0x5072e7
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax]
cmp dword [esp + 0x18], ebp
je 0x50735c
cmp dword [esp + 0x20], 0x197
jne 0x50735c
mov dword [esp + 0x18], ebp
jmp 0x507166
mov edx, dword [0x663a50]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor ecx, ecx
cmp edx, 2
sete cl
dec ecx
and ecx, 2
mov dword [0x663a50], ecx
mov edx, dword [esi + 0x10]
push edx
call edi
mov eax, dword [esi + 0xc]
push eax
call edi
mov eax, dword [esi + 0x4c]
cmp eax, ebp
je 0x50734c
mov esi, eax
mov ecx, dword [esi]
push str.HTTP_Handshake_nfailed_
push esi
call dword [ecx + 0x48]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x818
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x818
ret
mov edx, dword [esi + 0x10]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x818
ret