Function at 0x140024530
Capabilities:
Initialize winhttp library
Prepare http request
Set http header

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0xc0
mov rdi, rdx
mov rbp, rcx
mov edx, 1
mov rsi, r8
lea ecx, [rdx + 0x4f]
call fcn.140174ce4
lea r12, [rsp + 0xe8]
mov rbx, rax
add r12, 0xfffffffffffffff8
lea r8, [fcn.140037ff0]
mov rcx, r12
lea rdx, [rsp + 0x40]
or r15d, 0xffffffff
call fcn.140025270
lea r8, [fcn.140026da0]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x48]
mov rcx, r12
call fcn.140025270
xor edx, edx
mov qword [rsp + 0x48], rax
lea r8d, [r15 + 0x69]
lea rcx, [rsp + 0x50]
call fcn.140173680
cmp dword [0x14026c140], 0
jne 0x1400245cb
xor edx, edx
lea rcx, [0x14026c148]
call sub.KERNEL32.dll_InitializeCriticalSection
lea rcx, [rbx + 0x28]
mov qword [rsp + 0xf0], r14
mov dword [0x14026c140], 1
call fcn.140045970
test eax, eax
jne 0x1400248f2
lea edx, [rax + 1]
lea ecx, [rax + 0x60]
call fcn.140174ce4
mov qword [rbx + 0x38], rax
mov dword [rax + 0x58], r15d
test rsi, rsi
je 0x140024612
mov rcx, rsi
call fcn.140024490
mov qword [rbx + 0x30], rsi
mov rax, qword gs:[0x58]
lea rsi, [rsp + 0x50]
test rdi, rdi
mov rdx, rbp
cmovne rsi, rdi
xor r8d, r8d
mov r14, qword [rax]
mov eax, 0x1ba0
mov qword [rax + r14], rdi
mov rdi, rsi
mov qword [rbx + 0x48], rsi
mov rcx, qword [rsp + 0x40]
call fcn.140050800
test eax, eax
jne 0x1400248f2
mov rbp, qword [rsp + 0x40]
lea rcx, str.wget
xor r9d, r9d
mov dword [rsp + 0x20], 0x10000000
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rbx + 0x20], rax
test rax, rax
je 0x1400248f2
xor r9d, r9d
lea rdx, [0x140024af0]
mov r8d, 0x6f0c00
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
mov rcx, rax
call fcn.140170a90
cmp rax, 0xffffffffffffffff
jne 0x1400246be
lea rdx, str.WinHttpSetStatusCallback_failed__m
mov ecx, 0x20003
call fcn.140028e10
jmp 0x1400248f2
lea rdx, str.PORT
mov rcx, rbp
call fcn.1400380d0
mov edi, eax
mov eax, 0x1b90
mov dword [rax + r14], edi
lea r14, str.https
test edi, edi
jne 0x140024726
lea rdx, str.PROTOCOL
mov rcx, rbp
call fcn.140038070
xor ecx, ecx
nop dword [rax]
nop dword [rax + rax]
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x140024719
cmp rcx, 6
jne 0x140024700
cmp dl, byte [r14 + rcx - 1]
mov edi, 0x50
mov eax, 0x1bb
cmove edi, eax
lea rdx, str.HOSTNAME
mov rcx, rbp
call fcn.140038070
mov rdx, rax
mov rcx, r12
call fcn.140025830
mov rcx, qword [rbx + 0x20]
xor r9d, r9d
movzx r8d, di
mov rdx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rcx, rax
call fcn.140170a90
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x14002477b
lea rdx, str.WinHttpConnect_failed__m
mov ecx, 0x20003
call fcn.140028e10
jmp 0x1400248ef
lea rdx, [0x14019934c]
mov rcx, rbp
call fcn.140038070
mov rdx, rax
mov rcx, r12
call fcn.140025830
lea rdx, str.PROTOCOL
mov rcx, rbp
mov rdi, rax
call fcn.140038070
xor ecx, ecx
nop dword [rax]
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x1400247c9
cmp rcx, 6
jne 0x1400247b0
cmp dl, byte [r14 + rcx - 1]
mov r8, qword [rdi]
lea rdx, [0x1401994e8]
mov eax, 0
mov ecx, 0x800000
cmove eax, ecx
cmp qword [rsi + 8], 0
mov dword [rsp + 0x30], eax
lea rcx, [0x1401994d8]
cmovne rdx, rcx
mov qword [rsp + 0x28], 0
mov rcx, qword [rbx + 0x18]
xor r9d, r9d
mov qword [rsp + 0x20], 0
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rcx, rax
call fcn.140170a90
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x14002483a
lea rdx, str.WinHttpOpenRequest_failed__m
mov ecx, 0x20003
call fcn.140028e10
jmp 0x1400248ef
mov rcx, qword [rsp + 0x48]
lea rdx, str.Connection:_close
call fcn.140026dd0
mov rcx, qword [rbx + 0x10]
mov r9d, 0xa0000000
or r8d, 0xffffffff
mov rdx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov rax, qword [rsi]
test rax, rax
je 0x1400248a6
mov rdi, rsi
mov r9, qword [rax + 0x10]
lea rdx, str._s:__s
mov r8, qword [rax + 8]
mov rcx, r12
call fcn.1400257c0
mov rcx, qword [rbx + 0x10]
mov r9d, 0xa0000000
or r8d, 0xffffffff
mov rdx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov rdi, qword [rdi]
mov rax, qword [rdi]
test rax, rax
jne 0x14002486d
mov eax, dword [rsi + 0x10]
xor r8d, r8d
mov r9, qword [rsi + 8]
xor edx, edx
mov rcx, qword [rbx + 0x10]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x1400248ec
lea rdx, str.WinHttpSendRequest_failed__m
mov ecx, 0x20003
call fcn.140028e10
jmp 0x1400249af
xor r15d, r15d
mov rdi, rsi
lea rcx, [0x14026c148]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14026c138]
test rax, rax
je 0x140024923
mov rax, qword [rax]
mov qword [rbx], rax
mov rax, qword [0x14026c138]
mov qword [rax], rbx
mov rax, qword [rbx]
mov qword [rax + 8], rbx
jmp 0x14002492d
mov qword [rbx], rbx
mov qword [0x14026c138], rbx
lea rcx, [0x14026c148]
mov qword [rbx + 8], 0
call fcn.14002e7d0
test r15d, r15d
je 0x140024959
mov rcx, qword [rbx + 0x10]
test rcx, rcx
jne 0x14002499e
mov rcx, rbx
call fcn.1400249e0
jmp 0x1400249ac
test rdi, rdi
je 0x1400249ac
cmp dword [rdi + 0x30], 0
je 0x1400249ac
mov rax, qword [rbx + 0x48]
mov dword [rsp + 0x108], 5
test rax, rax
je 0x140024995
mov r8d, dword [rax + 0x30]
test r8d, r8d
je 0x140024995
mov ecx, dword [rbx + 0x28]
lea rdx, [rsp + 0x108]
call fcn.140045f90
test eax, eax
jne 0x1400249ac
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1400249ac
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rbx + 0x10], 0
mov eax, r15d
mov r14, qword [rsp + 0xf0]
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret