Function at 0x408ae0
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
mov eax, 0x20ac
call fcn.00412160
mov eax, dword [0x59a024]
xor eax, esp
mov dword [esp + 0x20a8], eax
mov eax, dword [esp + 0x20b0]
push ebp
push esi
xor ebp, ebp
push 0x3c
mov esi, ecx
lea ecx, [esp + 0x28]
push ebp
push ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], 0x84f000
call fcn.00412eb0
add esp, 0xc
lea ecx, [esp + 0x24]
push ecx
mov eax, 0x824
push SysReAllocString
mov dword [esp + 0x40], eax
mov dword [esp + 0x5c], eax
push ebp
lea edx, [esp + 0x1894]
lea eax, [esp + 0x106c]
push esi
mov dword [esp + 0x34], 0x3c
mov dword [esp + 0x44], edx
mov dword [esp + 0x60], eax
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x408b80
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x20a8]
xor ecx, esp
call fcn.00409b58
add esp, 0x20ac
ret
mov eax, dword [esp + 0x30]
movzx esi, word [esp + 0x3c]
push ebx
mov ebx, 4
cmp eax, 3
jne 0x408b9e
mov dword [esp + 0x10], 0x20000000
jmp 0x408baa
cmp eax, ebx
jne 0x408baa
mov dword [esp + 0x10], 0x840002
push edi
push ebp
push ebp
push ebp
push ebp
push str.SvpnAgent
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
mov dword [esp + 0x28], edi
cmp edi, ebp
jne 0x408bce
mov eax, 0xfffffffe
jmp 0x408dc3
mov edx, dword [esp + 0x14]
push ebp
push edx
push 3
push ebp
push ebp
push esi
lea eax, [esp + 0x18a8]
push eax
push edi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
mov dword [esp + 0x20], esi
cmp esi, ebp
jne 0x408bff
mov dword [esp + 0x18], 0xfffffffd
jmp 0x408db8
mov ecx, dword [esp + 0x14]
push ebp
push ecx
push ebp
push ebp
push str.HTTP_1.0
lea edx, [esp + 0x107c]
push edx
push 0x595d70
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
mov dword [esp + 0x1c], edi
cmp edi, ebp
jne 0x408c37
mov dword [esp + 0x18], 0xfffffffc
jmp 0x408dad
cmp dword [esp + 0x38], ebx
jne 0x408c77
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0x1f
push edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebx
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
or dword [esp + 0x14], 0x3380
mov dword [esp + 0x10], ebx
cmp eax, ebp
je 0x408c77
push ebx
lea edx, [esp + 0x18]
push edx
push 0x1f
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionA]
push ebp
push ebp
push ebp
push ebp
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x408c93
mov dword [esp + 0x18], 0xfffffffb
jmp 0x408da6
push ebp
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x70]
push ecx
push 0x13
push edi
mov dword [esp + 0x24], 0x1000
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x408d9e
lea edx, [esp + 0x68]
push edx
call fcn.0040a8c8
add esp, 4
cmp eax, 0xc8
jne 0x408d9e
mov eax, dword [esp + 0x24]
push ebp
push 0x80
push 2
push ebp
push ebp
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x408cfd
mov dword [esp + 0x18], 0xfffffff9
jmp 0x408da6
lea ecx, [esp + 0x10]
push ecx
push 0x1000
lea edx, [esp + 0x70]
push edx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x408d70
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ecx]
mov esi, dword [esp + 0x10]
test esi, esi
je 0x408d91
lea edi, [esp + 0x68]
lea esp, [esp]
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
push ebx
call ebp
test eax, eax
je 0x408d85
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x408d4e
add edi, eax
sub esi, eax
jmp 0x408d30
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push ecx
push 0x1000
lea edx, [esp + 0x70]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, dword [esp + 0x1c]
test eax, eax
jne 0x408d20
push ebx
mov dword [esp + 0x1c], 0xfffffff8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x20]
jmp 0x408da6
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xfffffff7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x20]
jmp 0x408da6
mov dword [esp + 0x18], 0xfffffffa
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [esp + 0x28]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20b8]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.00409b58
add esp, 0x20ac
ret