Function at 0x40156d
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push rbp
push rbx
mov eax, 0x10e8
call fcn.0040ca70
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1080], rcx
mov qword [rbp + 0x1088], rdx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rcx, str.Download
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0x1058], rax
cmp qword [rbp + 0x1058], 0
jne 0x4015f3
lea rdx, str.InternetOpenA_failed.
mov rcx, qword [0x004a7dd0]
call fcn.0049c480
mov rdx, qword [0x004a7e00]
mov rcx, rax
call fcn.00463b60
jmp 0x4018b9
mov rcx, qword [rbp + 0x1080]
call fcn.00426440
mov rdx, rax
mov rax, qword [rbp + 0x1058]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0x1050], rax
cmp qword [rbp + 0x1050], 0
jne 0x40167d
lea rdx, str.InternetOpenUrlA_failed.
mov rcx, qword [0x004a7dd0]
call fcn.0049c480
mov rdx, qword [0x004a7e00]
mov rcx, rax
call fcn.00463b60
mov rax, qword [rbp + 0x1058]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
jmp 0x4018b9
mov r8, 0xffffffffffffffff
mov edx, 0x2f
mov rcx, qword [rbp + 0x1080]
call fcn.00425e90
lea rdx, [rax + 1]
lea rax, [rbp - 0x10]
mov r9, 0xffffffffffffffff
mov r8, rdx
mov rdx, qword [rbp + 0x1080]
mov rcx, rax
call fcn.00426590
lea rax, [rbp + 0x1020]
mov rdx, qword [rbp + 0x1088]
lea r8, [0x004a3039]
mov rcx, rax
call fcn.0049cb30
lea rax, [rbp - 0x30]
lea rcx, [rbp - 0x10]
lea rdx, [rbp + 0x1020]
mov r8, rcx
mov rcx, rax
call fcn.0049ca30
lea rax, [rbp + 0x1020]
mov rcx, rax
call fcn.0048d880
lea rax, [rbp - 0x30]
mov rcx, rax
call fcn.00426440
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
mov r9d, 0
mov r8d, 0
mov edx, 0x40000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0x1048], rax
cmp qword [rbp + 0x1048], 0xffffffffffffffff
jne 0x4017a1
lea rdx, str.CreateFileA_failed.
mov rcx, qword [0x004a7dd0]
call fcn.0049c480
mov rdx, qword [0x004a7e00]
mov rcx, rax
call fcn.00463b60
mov rax, qword [rbp + 0x1050]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x1058]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 0
jmp 0x40184b
lea rdx, [rbp + 0x1c]
lea rax, [rbp + 0x20]
mov rcx, qword [rbp + 0x1050]
mov r9, rdx
mov r8d, 0x1000
mov rdx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
je 0x4017d7
mov eax, dword [rbp + 0x1c]
test eax, eax
je 0x4017d7
mov eax, 1
jmp 0x4017dc
mov eax, 0
test al, al
je 0x40180d
mov r8d, dword [rbp + 0x1c]
lea rdx, [rbp - 0x34]
lea rax, [rbp + 0x20]
mov rcx, qword [rbp + 0x1048]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
jmp 0x4017a1
mov rax, qword [rbp + 0x1048]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1050]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x1058]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 1
lea rax, [rbp - 0x30]
mov rcx, rax
call fcn.0048d880
cmp ebx, 1
jne 0x401863
mov ebx, 1
jmp 0x401868
mov ebx, 0
lea rax, [rbp - 0x10]
mov rcx, rax
call fcn.0048d880
cmp ebx, 1
jmp 0x4018b9
add rsp, 0x10e8
pop rbx
pop rbp
ret