Function at 0x1400010c0
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 0x140001313
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 0x1400012f0
mov dword [rsp + 0x30], r15d
lea rdx, [0x1400034c8]
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 0x1400012cd
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 0x1400012aa
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov ecx, 0x400
call fcn.1400018b8
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 0x140001282
mov r8d, dword [rsp + 0x40]
cmp r8d, 0x400
jbe 0x1400011f1
lea ecx, [r8 + 1]
call fcn.1400018b8
mov rcx, rdi
mov rbx, rax
call fcn.1400018b0
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 0x140001250
cmp dword [rsp + 0x40], r15d
ja 0x1400011b1
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.140001890
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.1400018b0
test rdi, rdi
mov eax, 0x8123
cmovne rdi, rax
jmp 0x14000122c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003410]
lea rcx, str._s_Error__u_in_WinHttpQueryDataAvailable_n
call fcn.140001060
mov rcx, rdi
call fcn.1400018b0
xor eax, eax
jmp 0x14000122f
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 0x14000122f
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 0x14000122f
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 0x14000122f
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 0x140001237