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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x510]
sub rsp, 0x610
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x658], rbx
mov rax, qword [0x14000f010]
xor rax, rsp
mov qword [rbp + 0x500], rax
mov rbx, r8
mov r14, rdx
mov rsi, rcx
xor r15d, r15d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r15 + 1]
lea rcx, str.ClientApp
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rdi, rax
test rax, rax
jne 0x1400043a2
lea rdx, str.InternetOpen_failed._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400070e0
xor al, al
jmp 0x14000486d
lea rcx, str.50050
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov r8d, eax
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetConnectA]
mov rsi, rax
test rax, rax
jne 0x140004403
lea rdx, str.InternetConnect_failed._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400070e0
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x14000486d
movdqa xmm0, xmmword [0x14000aed0]
movdqu xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x40], r15b
mov r8d, 0xf
lea rdx, str._download_file
lea rcx, [rsp + 0x40]
call fcn.140006a20
nop
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rbx + r8], 0
jne 0x140004435
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140006b80
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xd8], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xc8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xd8], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], 0xf
mov byte [rax], 0
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x1400044bb
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400044b6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400044b6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008880
movdqa xmm0, xmmword [0x14000aed0]
movdqu xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x40], 0
lea rax, [0x14000aa90]
mov qword [rbp + 0xe8], rax
mov qword [rbp + 0xf0], r15
lea r8, [rbp + 0xc8]
cmp qword [rbp + 0xe0], 0x10
cmovae r8, qword [rbp + 0xc8]
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], r15d
lea rax, [rbp + 0xe8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea rdx, [0x14000aa94]
mov rcx, rsi
call qword [sym.imp.WININET.dll_HttpOpenRequestA]
mov rbx, rax
test rax, rax
jne 0x14000455a
lea rdx, str.HttpOpenRequest_failed._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400070e0
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140004826
movdqa xmm0, xmmword [0x14000aed0]
movdqu xmmword [rsp + 0x70], xmm0
mov byte [rsp + 0x60], 0
mov r8d, 0xc
lea rdx, str.VALID_CLIENT
lea rcx, [rsp + 0x60]
call fcn.140006a20
nop
mov r9d, 0xc
lea r8, str.Validation:
lea rcx, [rsp + 0x60]
call fcn.140007f40
mov qword [rbp + 0xb8], r15
mov qword [rbp + 0xc0], r15
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xa8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xb8], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], 0xf
mov byte [rax], 0
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x14000460e
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004609
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004609
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008880
movdqa xmm0, xmmword [0x14000aed0]
movdqu xmmword [rsp + 0x70], xmm0
mov byte [rsp + 0x60], 0
lea rdx, [rbp + 0xa8]
cmp qword [rbp + 0xc0], 0x10
cmovae rdx, qword [rbp + 0xa8]
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8d, dword [rbp + 0xb8]
mov rcx, rbx
call qword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x140004689
lea rdx, str.HttpSendRequest_failed._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400070e0
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor bl, bl
jmp 0x1400047c9
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memset
mov rdx, r14
lea rcx, [rbp - 0x70]
call fcn.140005b80
nop
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
test byte [rbp + rcx - 0x60], 6
je 0x1400046eb
lea rdx, str.Failed_to_open_local_file_for_writing._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400070e0
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor bl, bl
jmp 0x140004782
mov dword [rbp + 0xa0], r15d
lea r9, [rbp + 0xa0]
mov r8d, 0x400
lea rdx, [rbp + 0x100]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x140004752
mov eax, dword [rbp + 0xa0]
test eax, eax
je 0x140004752
mov r8d, eax
lea rdx, [rbp + 0x100]
lea rcx, [rbp - 0x70]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea r9, [rbp + 0xa0]
mov r8d, 0x400
lea rdx, [rbp + 0x100]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140004713
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea rdx, str.File_downloaded_successfully._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400070e0
mov bl, 1
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x70], rax
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov rax, rcx
mov dword [rbp + rcx - 0x74], edx
lea rcx, [rbp - 0x68]
call fcn.1400067e0
lea rcx, [rbp - 0x60]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x38]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rdx, qword [rbp + 0xc0]
cmp rdx, 0x10
jb 0x14000480d
inc rdx
mov rcx, qword [rbp + 0xa8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004808
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004808
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008880
mov qword [rbp + 0xb8], r15
mov qword [rbp + 0xc0], 0xf
mov byte [rbp + 0xa8], 0
mov rdx, qword [rbp + 0xe0]
cmp rdx, 0x10
jb 0x14000486a
inc rdx
mov rcx, qword [rbp + 0xc8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004865
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004865
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140008880
movzx eax, bl
mov rcx, qword [rbp + 0x500]
xor rcx, rsp
call fcn.140008820
mov rbx, qword [rsp + 0x658]
add rsp, 0x610
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret