Function at 0x1400010e0
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rsi, r8
mov edi, edx
mov rbx, rcx
xor r15d, r15d
xor r8d, r8d
mov dword [rsp + 0x20], r15d
xor edx, edx
lea rcx, str.WinHTTP_Example_1.0
xor r9d, r9d
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r14, rax
test rax, rax
je 0x140001333
xor r9d, r9d
mov qword [rsp + 0x98], rbp
movzx r8d, di
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rbp, rax
test rax, rax
je 0x140001310
mov dword [rsp + 0x30], r15d
lea rdx, [0x1400034f8]
mov qword [rsp + 0x28], r15
xor r9d, r9d
mov r8, rsi
mov qword [rsp + 0x20], r15
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
test rax, rax
je 0x1400012ed
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], r15d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r15d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x1400012ca
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov ecx, 0x400
call fcn.140001858
mov rdi, rax
mov dword [rsp + 0x40], 0x400
mov dword [rsp + 0x44], r15d
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1400012a2
mov r8d, dword [rsp + 0x40]
cmp r8d, 0x400
jbe 0x140001211
lea ecx, [r8 + 1]
call fcn.140001858
mov rcx, rdi
mov rbx, rax
call fcn.140001850
mov r8d, dword [rsp + 0x40]
mov rdi, rbx
mov edx, dword [rsp + 0x44]
lea r9, [rsp + 0x44]
add rdx, rdi
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140001270
cmp dword [rsp + 0x40], r15d
ja 0x1400011d1
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rax, rdi
mov rbp, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140001830
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003410]
lea rcx, str._s_Error__u_in_WinHttpReadData._n
call fcn.140001060
mov rcx, rdi
call fcn.140001850
test rdi, rdi
mov eax, 0x8123
cmovne rdi, rax
jmp 0x14000124c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003410]
lea rcx, str._s_Error__u_in_WinHttpQueryDataAvailable___u__n
call fcn.140001060
mov rcx, rdi
call fcn.140001850
xor eax, eax
jmp 0x14000124f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003410]
lea rcx, str._s_Failed_in_WinHttpReceiveResponse___u__n
call fcn.140001060
xor eax, eax
jmp 0x14000124f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003410]
lea rcx, str._s_Failed_in_WinHttpSendRequest___u__n
call fcn.140001060
xor eax, eax
jmp 0x14000124f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003410]
lea rcx, str._s_Failed_in_WinHttpOpenRequest___u__n
call fcn.140001060
xor eax, eax
jmp 0x14000124f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003410]
lea rcx, str._s_Failed_in_WinHttpConnect___u__n
call fcn.140001060
xor eax, eax
jmp 0x140001257