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

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x188
mov qword [rsp + 0x170], 0xfffffffffffffffe
mov qword [rsp + 0x58], 0
lea rdi, [rsp + 0x60]
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
lea rcx, [rsp + 0x70]
call fcn.140001cd0
nop
mov dword [rsp + 0x50], 0
mov dword [rsp + 0xa0], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.WinHTTP_Example_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x140001505
lea rdi, [rsp + 0xc8]
lea rsi, [rsp + 0x58]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x70]
call fcn.140001d20
lea rsi, [rsp + 0xc8]
mov rdi, qword [rsp + 0x1a0]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x1a0]
jmp 0x1400018fc
xor r9d, r9d
movzx r8d, word [rsp + 0x1b0]
mov rdx, qword [rsp + 0x1a8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
jne 0x140001573
lea rdi, [rsp + 0xd8]
lea rsi, [rsp + 0x58]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x70]
call fcn.140001d20
lea rsi, [rsp + 0xd8]
mov rdi, qword [rsp + 0x1a0]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x1a0]
jmp 0x1400018fc
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0x1b8]
lea rdx, [0x14004b7f0]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x1400015f9
lea rdi, [rsp + 0xe8]
lea rsi, [rsp + 0x58]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x70]
call fcn.140001d20
lea rsi, [rsp + 0xe8]
mov rdi, qword [rsp + 0x1a0]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x1a0]
jmp 0x1400018fc
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [rsp + 0xa0], eax
cmp dword [rsp + 0xa0], 0
jne 0x140001678
lea rdi, [rsp + 0xf8]
lea rsi, [rsp + 0x58]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x70]
call fcn.140001d20
lea rsi, [rsp + 0xf8]
mov rdi, qword [rsp + 0x1a0]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x1a0]
jmp 0x1400018fc
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [rsp + 0xa0], eax
cmp dword [rsp + 0xa0], 0
je 0x1400017d1
mov qword [rsp + 0xa8], 0
mov dword [rsp + 0xa4], 0
lea rdx, [rsp + 0xa4]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
cmp dword [rsp + 0xa4], 0
jne 0x1400016d3
jmp 0x1400017d1
mov ecx, dword [rsp + 0xa4]
call fcn.140004854
mov qword [rsp + 0x108], rax
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0xa8], rax
mov ecx, dword [rsp + 0xa4]
mov rdi, qword [rsp + 0xa8]
xor eax, eax
rep stosb byte [rdi], al
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0xa4]
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1400017a9
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x70]
call fcn.140001d50
lea rdi, [rsp + 0x160]
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x110]
lea rsi, [rsp + 0x160]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x150]
lea rsi, [rsp + 0x110]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0x50]
mov r9, qword [rsp + 0xa8]
add r9, rax
mov r8, qword [rsp + 0xa8]
lea rdx, [rsp + 0x150]
lea rcx, [rsp + 0x70]
call fcn.140002aa0
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x130], rax
mov rcx, qword [rsp + 0x130]
call fcn.14000484c
xor eax, eax
cmp eax, 1
jne 0x14000169a
lea rcx, [rsp + 0x70]
call fcn.140001da0
movzx eax, al
test eax, eax
jne 0x140001886
lea rcx, [rsp + 0x70]
call fcn.140001d80
mov qword [rsp + 0xb0], rax
mov rcx, qword [rsp + 0xb0]
call fcn.14002c5a4
mov qword [rsp + 0xb8], rax
mov dword [rsp + 0xc0], 0
jmp 0x14000182b
mov eax, dword [rsp + 0xc0]
add eax, 1
mov dword [rsp + 0xc0], eax
movsxd rdi, dword [rsp + 0xc0]
lea rcx, [rsp + 0x70]
call fcn.140001d80
cmp rdi, rax
jae 0x14000186c
movsxd rdx, dword [rsp + 0xc0]
lea rcx, [rsp + 0x70]
call fcn.140001de0
movsxd rdx, dword [rsp + 0xc0]
mov rcx, qword [rsp + 0xb8]
movzx eax, byte [rax]
mov byte [rcx + rdx], al
jmp 0x14000181a
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x48], 0
je 0x140001899
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x68], 0
je 0x1400018ac
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x40], 0
je 0x1400018bf
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea rdi, [rsp + 0x138]
lea rsi, [rsp + 0x58]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x70]
call fcn.140001d20
lea rsi, [rsp + 0x138]
mov rdi, qword [rsp + 0x1a0]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x1a0]
add rsp, 0x188
pop rdi
pop rsi
ret