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

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
xor esi, esi
push str.rl_client
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x28], ebp
je 0x40d31f
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push ebx
push ebx
push 3
push ebx
push ebx
push eax
push ecx
push ebp
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edi, eax
test edi, edi
mov dword [esp + 0x24], edi
je 0x40d318
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
xor edx, edx
cmp eax, 0x1bb
mov eax, dword [esp + 0x40]
setne dl
push ebx
dec edx
and edx, 0x800000
or edx, 0x4080000
push edx
push ebx
push ebx
push ebx
push eax
push ecx
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebp, eax
test ebp, ebp
je 0x40d30d
mov esi, dword [esp + 0x50]
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
push 4
lea edx, [esp + 0x1c]
push edx
push 2
push ebp
mov dword [esp + 0x28], esi
call edi
push 4
lea eax, [esp + 0x1c]
push eax
push 6
push ebp
mov dword [esp + 0x28], esi
call edi
mov edx, dword [esp + 0x44]
test edx, edx
je 0x40d202
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d1f7
sub eax, esi
jmp 0x40d204
xor eax, eax
mov ecx, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x4c]
push ecx
push eax
push edx
push ebp
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40d2fe
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push 0
lea edx, [esp + 0x18]
push edx
push 0
push 0x16
push ebp
mov dword [esp + 0x28], 0
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d280
inc eax
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], eax
call fcn.0040d0e0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40d25f
mov eax, dword [eax + 0x10]
jmp 0x40d261
xor eax, eax
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
push 0x16
push ebp
call esi
mov ebx, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], ebx
call fcn.0040d0e0
lea esi, [ebx + 0x4000]
push esi
lea ecx, [esp + 0x14]
call fcn.00401e90
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x10]
mov edi, dword [edx + 8]
add edi, eax
lea ecx, [eax + esi]
cmp edi, ecx
jae 0x40d2b9
sub ecx, edi
mov ebx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, ebx
mov ebx, dword [esp + 0x1c]
and ecx, 3
rep stosb byte es:[edi], al
mov dword [edx + 8], esi
mov eax, dword [edx + 0x10]
mov byte [esi + eax], 0
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], 0
mov edx, dword [edx + 0x10]
push 0x4000
add edx, ebx
push edx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40d355
mov eax, dword [esp + 0x20]
add ebx, eax
test eax, eax
mov dword [esp + 0x1c], ebx
jne 0x40d280
push ebx
lea ecx, [esp + 0x14]
call fcn.0040d0e0
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebp, dword [esp + 0x28]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test esi, esi
mov edi, dword [esp + 0x30]
mov dword [edi], esi
je 0x40d34b
mov eax, dword [esi + 4]
test eax, eax
js 0x40d334
inc eax
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
test eax, eax
js 0x40d34b
dec eax
test eax, eax
mov dword [esi + 4], eax
jne 0x40d34b
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x14]
call fcn.0040ccb0
jmp 0x40d2fe