Function at 0x180012040
Capabilities:
Connect to http server
Create http request
Download and write a file
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 qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xe0
mov qword [rsp + 0xd0], 0xfffffffffffffffe
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x80], 0
lea rcx, [rsp + 0x78]
call qword [sym.imp.mfc90.dll_Ordinal_316]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.mfc90.dll_Ordinal_316]
nop
mov rdx, qword [rsp + 0x108]
lea rcx, [rsp + 0x68]
call qword [sym.imp.mfc90.dll_Ordinal_310]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.mfc90.dll_Ordinal_4179]
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x60], 0xffffffffffffffff
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, str.User_Agent
call qword [sym.imp.WININET.dll_InternetOpenA]
mov qword [rsp + 0x90], rax
cmp qword [rsp + 0x90], 0
jne 0x180012115
jmp 0x1800123f4
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 3
lea rax, [0x18003d890]
mov qword [rsp + 0x20], rax
xor r9d, r9d
movzx r8d, word [rsp + 0xf8]
mov rdx, qword [rsp + 0xf0]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.WININET.dll_InternetConnectA]
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
jne 0x180012174
jmp 0x1800123f4
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0x80000000
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
lea r9, str.HTTP_1.1
mov r8, qword [rsp + 0x100]
mov rdx, qword [rsp + 0x108]
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.WININET.dll_HttpOpenRequestA]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x1800121ce
jmp 0x1800123f4
mov r9d, 0xa0000000
mov r8d, 0x11
lea rdx, str.Connection:_close
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov dword [rsp + 0x84], eax
lea rdx, str.post
lea rcx, [rsp + 0x68]
call fcn.18000ba70
movzx eax, al
test eax, eax
je 0x18001223f
mov r9d, 0xa0000000
mov r8d, 0x2f
lea rdx, str.Content_Type:_application_x_www_form_urlencoded
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
jne 0x18001223f
jmp 0x1800123f4
mov eax, dword [rsp + reloc.mfc90.dll_Ordinal_280]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x110]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WININET.dll_HttpSendRequestA]
mov dword [rsp + 0x84], eax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0xb0], rax
mov rdx, qword [rsp + 0x120]
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.mfc90.dll_Ordinal_300]
mov qword [rsp + 0xd8], rax
mov rcx, qword [rsp + 0xd8]
call fcn.180011050
test eax, eax
jne 0x1800122ad
jmp 0x1800123f4
mov rcx, qword [rsp + 0x120]
call qword [sym.imp.mfc90.dll_Ordinal_888]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000000
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov r8d, 3
mov edx, 0xc0000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0xffffffffffffffff
jne 0x180012308
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800123f4
mov dword [rsp + 0x58], 0x100000
movsxd rcx, dword [rsp + 0x58]
call sub.mfc90.dll_Ordinal_265
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x70], rax
xor eax, eax
cmp eax, 1
je 0x1800123e9
movsxd rcx, dword [rsp + 0x58]
mov rdi, qword [rsp + 0x70]
xor eax, eax
rep stosb byte [rdi], al
mov r8d, dword [rsp + 0x58]
sub r8d, 2
lea r9, [rsp + 0x98]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WININET.dll_InternetReadFile]
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
je 0x180012384
cmp dword [rsp + 0x98], 0
jne 0x180012386
jmp 0x1800123e9
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x9c], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa0]
mov r8d, dword [rsp + 0x98]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800123d2
jmp 0x1800123f4
mov eax, dword [rsp + 0x98]
cmp dword [rsp + 0xa0], eax
je 0x1800123e4
jmp 0x1800123f4
jmp 0x18001232f
mov dword [rsp + 0x80], 1
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0x50], 0
je 0x180012412
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x88], 0
je 0x18001242b
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x90], 0
je 0x180012444
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x70], 0
je 0x180012466
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0xc0], rax
mov rcx, qword [rsp + 0xc0]
call fcn.1800320d2
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0xc8], eax
lea rcx, [rsp + 0x68]
call qword [sym.imp.mfc90.dll_Ordinal_589]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.mfc90.dll_Ordinal_589]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.mfc90.dll_Ordinal_589]
nop
mov rcx, qword [rsp + 0x120]
call qword [sym.imp.mfc90.dll_Ordinal_589]
mov eax, dword [rsp + 0xc8]
add rsp, 0xe0
pop rdi
ret