Function at 0x1800051c0
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x180149040]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rbp, r9
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov qword [rsp + 0x48], rcx
xor r14d, r14d
mov dword [rsp + 0x40], r14d
mov dword [rsp + 0x50], r14d
mov dword [rsp + 0x54], r14d
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], r14
mov qword [rcx + 0x18], 0xf
mov byte [rcx], r14b
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.Carbon_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r12, rax
test rax, rax
je 0x1800053f9
mov r8d, 0x1bb
xor r9d, r9d
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r15, rax
test rax, rax
je 0x1800053f0
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov r8, rdi
mov rdx, rbp
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbp, rax
test rax, rax
je 0x1800053e7
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x1800053de
xor edx, edx
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x1800053de
mov qword [rsp + 0x28], r14
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r14 + 5]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1800053de
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x1800053de
mov qword [rsp + 0x28], r14
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9, rbx
xor r8d, r8d
lea edx, [r14 + 5]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov rcx, rbx
test eax, eax
je 0x1800053d8
mov r14d, dword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, r14d
add ecx, 1
mov rbx, 0xffffffffffffffff
cmovb rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x1800053de
lea r9, [rsp + 0x54]
mov r8d, r14d
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1800053d5
mov eax, dword [rsp + 0x54]
mov byte [rax + rdi], 0
nop dword [rax]
inc rbx
cmp byte [rdi + rbx], 0
jne 0x180005390
mov rax, qword [rsi + 0x18]
cmp rbx, rax
ja 0x1800053c7
mov r14, rsi
cmp rax, 0xf
jbe 0x1800053ae
mov r14, qword [rsi]
mov qword [rsi + 0x10], rbx
mov r8, rbx
mov rdx, rdi
mov rcx, r14
call sub.VCRUNTIME140.dll_memmove
mov byte [r14 + rbx], 0
jmp 0x1800053d5
mov r9, rdi
mov rdx, rbx
mov rcx, rsi
call fcn.180013610
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rax, rsi
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1800ed380
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret