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

Disassembly:
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x40
mov rsi, r8
xor r12d, r12d
mov r8, rcx
mov dword [rsp + 0x28], r12d
mov rdi, rcx
mov qword [rsp + 0x20], r12
mov r13, 0xffffffffffffffff
xor ecx, ecx
mov r9d, r13d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rbx, eax
mov rcx, rbx
add rcx, rcx
call fcn.140013528
mov r9d, r13d
mov dword [rsp + 0x28], ebx
mov r8, rdi
mov qword [rsp + 0x20], rax
xor edx, edx
xor ecx, ecx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r9d, r13d
mov dword [rsp + 0x28], r12d
mov r8, rsi
mov qword [rsp + 0x20], r12
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rbx, eax
mov rcx, rbx
add rcx, rcx
call fcn.140013528
mov r9d, r13d
mov dword [rsp + 0x28], ebx
mov r8, rsi
mov qword [rsp + 0x20], rax
xor edx, edx
xor ecx, ecx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor r9d, r9d
mov dword [rsp + 0x20], r12d
xor r8d, r8d
lea rcx, str.WinHTTP_Example_1.0
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r15, rax
test rax, rax
je 0x14000228b
mov r8d, 0x1f40
mov qword [rsp + 0x80], r14
xor r9d, r9d
mov rdx, rbp
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
je 0x1400022c0
mov dword [rsp + 0x30], r12d
lea rdx, [0x14003ab38]
mov qword [rsp + 0x28], r12
xor r9d, r9d
mov r8, rdi
mov qword [rsp + 0x20], r12
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
test rax, rax
je 0x1400022f5
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], r12d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r12d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x14000232a
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [rsp + 0x88], r12d
mov esi, r12d
mov dword [rsp + 0x98], r12d
mov ebp, r12d
test eax, eax
je 0x140002201
nop dword [rax + rax]
lea rdx, [rsp + 0x88]
mov dword [rsp + 0x88], r12d
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x140002185
mov eax, dword [rsp + 0x88]
test eax, eax
je 0x1400021b2
lea ecx, [rax + 1]
call fcn.140008780
mov r8d, dword [rsp + 0x88]
xor edx, edx
inc r8d
mov rcx, rax
mov rsi, rax
call fcn.14000abe0
mov r8d, dword [rsp + 0x88]
lea r9, [rsp + 0x98]
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x14000216d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error
mov ebx, eax
lea rcx, [0x1400413d0]
call fcn.140006170
mov rcx, rax
mov edx, ebx
call fcn.1400026f0
mov rcx, rax
call fcn.1400063e0
cmp dword [rsp + 0x98], ebp
je 0x1400021b2
cmp dword [rsp + 0x88], ebp
ja 0x1400020d0
jmp 0x1400021b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error
mov ebx, eax
lea rcx, [0x1400413d0]
call fcn.140006170
mov rcx, rax
mov edx, ebx
call fcn.1400026f0
mov rcx, rax
call fcn.1400063e0
mov dword [rsp + 0x28], r12d
mov r9d, r13d
mov r8, rsi
mov qword [rsp + 0x20], r12
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
mov eax, 2
mul rbx
cmovo rax, r13
mov rcx, rax
call fcn.140008780
mov r9d, r13d
mov dword [rsp + 0x28], ebx
mov r8, rsi
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rsp + 0x38], r12
mov r9d, r13d
mov qword [rsp + 0x30], r12
mov r8, rbp
mov dword [rsp + 0x28], r12d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbx, eax
mov rcx, rbx
call fcn.140013528
mov qword [rsp + 0x38], r12
mov r9d, r13d
mov qword [rsp + 0x30], r12
mov r8, rbp
mov dword [rsp + 0x28], ebx
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r14, qword [rsp + 0x80]
mov rax, rdi
add rsp, 0x40
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error:Open_session_failed:
mov ebx, eax
lea rcx, [0x1400413d0]
call fcn.140006170
mov rcx, rax
mov edx, ebx
call fcn.1400026f0
mov rcx, rax
call fcn.140002a80
xor ecx, ecx
call fcn.14000eb24
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error:Connect_failed:
mov ebx, eax
lea rcx, [0x1400413d0]
call fcn.140006170
mov rcx, rax
mov edx, ebx
call fcn.1400026f0
mov rcx, rax
call fcn.140002a80
xor ecx, ecx
call fcn.14000eb24
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error:OpenRequest_failed:
mov ebx, eax
lea rcx, [0x1400413d0]
call fcn.140006170
mov rcx, rax
mov edx, ebx
call fcn.1400026f0
mov rcx, rax
call fcn.140002a80
xor ecx, ecx
call fcn.14000eb24
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error:SendRequest_failed:
mov ebx, eax
lea rcx, [0x1400413d0]
call fcn.140006170
mov rcx, rax
mov edx, ebx
call fcn.1400026f0
mov rcx, rax
call fcn.140002a80
xor ecx, ecx
call fcn.14000eb24
int3