Function at 0x140017020
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
lea rbp, [rsp - 0x698]
sub rsp, 0x798
xor edi, edi
mov r13d, r8d
mov rbx, rcx
lea rcx, [rsp + 0x50]
lea r8d, [rdi + 0x68]
xor edx, edx
mov dword [rbp + 0x6e8], edi
mov r12d, edi
mov dword [rsp + 0x44], edi
mov dword [rsp + 0x40], edi
mov esi, edi
call sub.msvcrt.dll_memset
lea r9, [rsp + 0x50]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov dword [rsp + 0x50], 0x68
mov dword [rsp + 0x60], 0xffffffff
mov dword [rsp + 0x70], 0xffffffff
mov dword [rbp - 0x60], 0xffffffff
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x1400173fc
mov eax, dword [rsp + 0x70]
test eax, eax
jne 0x1400170b2
cmp dword [rbp - 0x60], esi
je 0x1400173fc
lea ecx, [rax + 1]
xor edx, edx
add rcx, rcx
call fcn.14000e210
mov rbx, rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400173fc
mov ecx, dword [rbp - 0x60]
xor edx, edx
mov qword [rsp + 0x7d0], r14
inc ecx
add rcx, rcx
call fcn.14000e210
mov r14, rax
test rax, rax
je 0x1400173ab
mov edx, dword [rsp + 0x70]
mov r8, qword [rsp + 0x68]
mov rcx, rbx
inc edx
mov qword [rsp + 0x790], r15
call fcn.140002800
mov edx, dword [rbp - 0x60]
mov r8, qword [rbp - 0x68]
inc edx
mov rcx, r14
call fcn.140002800
mov rcx, qword [str.GEjD5EtXm7vRuBPfWc9CiJS09YrfGpfrGPHr6XfAnjL8BCZacINTtpAhAz7hpnuMxM8UbM8zPg7nyxGxIXZTtC5hxfShAB5hvCZa8gNJjq_7vR8UbIuBZFV6NHrGrMZc8y_JcU57vRrMNHrMm]
lea rdx, [rbp + 0x290]
call fcn.14000deb0
movzx eax, byte [rbp + 0x290]
lea r11, [rbp + 0x290]
lea rcx, [rbp - 0x40]
test al, al
je 0x140017166
nop dword [rax + rax]
movsx eax, al
inc r11
add rcx, 2
mov word [rcx - 2], ax
movzx eax, byte [r11]
test al, al
jne 0x140017150
mov word [rcx], di
lea rcx, [rbp - 0x40]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r15, rax
test rax, rax
je 0x1400173a3
mov edx, 0x15f90
imul r13d, r13d, 0xea60
mov r9d, 0x2bf20
mov r8d, edx
mov rcx, rax
mov dword [rsp + 0x20], r13d
call qword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
xor r8d, r8d
xor r9d, r9d
mov rdx, rbx
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r13, rax
test rax, rax
je 0x14001739a
mov rcx, qword [str.SnAx]
lea rdx, [rbp + 0x290]
call fcn.14000deb0
movzx edx, byte [rbp + 0x290]
lea r11, [rbp + 0x290]
lea rcx, [rbp - 0x40]
test dl, dl
je 0x140017216
nop word [rax + rax]
inc r11
movsx eax, dl
add rcx, 2
movzx edx, byte [r11]
mov word [rcx - 2], ax
test dl, dl
jne 0x140017200
mov eax, dword [rsp + 0x64]
mov word [rcx], di
cmp eax, 1
jne 0x140017228
mov dword [rsp + 0x30], edi
jmp 0x140017239
cmp eax, 2
jne 0x140017391
mov dword [rsp + 0x30], 0x800000
lea rdx, [rbp - 0x40]
xor r9d, r9d
mov r8, r14
mov rcx, r13
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
je 0x14001738c
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140017383
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140017383
lea rax, [rbp + 0x6e8]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov edx, 0x20000013
mov rcx, rbx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x6e8], 4
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140017383
mov eax, dword [rsp + 0x40]
add eax, 0xffffff38
cmp eax, 0x1a
ja 0x140017383
nop word [rax + rax]
lea rdx, [rbp + 0x6e8]
mov rcx, rbx
mov dword [rbp + 0x6e8], edi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x140017383
mov eax, dword [rbp + 0x6e8]
test eax, eax
je 0x140017367
add r12d, eax
mov ecx, r12d
test rsi, rsi
je 0x140017339
mov rdx, rsi
call fcn.14000e210
mov r8d, dword [rbp + 0x6e8]
mov edx, r12d
sub edx, r8d
add rdx, rax
jmp 0x14001734a
xor edx, edx
call fcn.14000e210
mov r8d, dword [rbp + 0x6e8]
mov rdx, rax
lea r9, [rsp + 0x44]
mov rcx, rbx
mov rsi, rax
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140017383
cmp dword [rbp + 0x6e8], edi
ja 0x1400172f0
mov rcx, qword [rbp + 0x6d8]
mov r8d, r12d
mov rdx, rsi
call fcn.14000cc00
mov ecx, 1
test eax, eax
cmovne edi, ecx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rbx, qword [rsp + 0x48]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r15, qword [rsp + 0x790]
mov rcx, qword [0x14001e780]
mov r8, rbx
mov edx, 8
call qword [0x14001e798]
test r14, r14
je 0x1400173da
mov rcx, qword [0x14001e780]
mov r8, r14
mov edx, 8
call qword [0x14001e798]
mov r14, qword [rsp + 0x7d0]
test rsi, rsi
je 0x1400173fc
mov rcx, qword [0x14001e780]
mov r8, rsi
mov edx, 8
call qword [0x14001e798]
mov eax, edi
add rsp, 0x798
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret