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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xe0
mov rsi, rdx
mov rbp, rcx
mov edx, 1
mov rdi, r8
lea ecx, [rdx + 0x4f]
call fcn.140176684
lea r15, [rsp + 0x108]
mov rbx, rax
add r15, 0xfffffffffffffff8
lea r8, [fcn.140038630]
mov rcx, r15
lea rdx, [rsp + 0x48]
or r12d, 0xffffffff
xor r13d, r13d
call fcn.140025060
lea r8, [fcn.140026b90]
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x50]
mov rcx, r15
call fcn.140025060
lea r8, [fcn.140026b90]
mov qword [rsp + 0x50], rax
lea rdx, [rsp + 0x40]
mov rcx, r15
call fcn.140025060
xor edx, edx
mov qword [rsp + 0x40], rax
lea r8d, [r12 + 0x79]
lea rcx, [rsp + 0x60]
call fcn.140175020
cmp dword [0x14026e160], r13d
jne 0x14002436e
xor edx, edx
lea rcx, [0x14026e168]
call sub.KERNEL32.dll_InitializeCriticalSection
lea r14, [rbx + 0x28]
mov dword [0x14026e160], 1
mov rcx, r14
call fcn.140046010
test eax, eax
jne 0x1400246e6
lea edx, [rax + 1]
lea ecx, [rax + 0x60]
call fcn.140176684
mov qword [rbx + 0x38], rax
mov dword [rax + 0x58], r12d
test rdi, rdi
je 0x1400243b0
mov rcx, rdi
call fcn.140024210
mov qword [rbx + 0x30], rdi
mov rax, qword gs:[0x58]
lea rdi, [rsp + 0x60]
test rsi, rsi
mov rdx, rbp
cmovne rdi, rsi
xor r8d, r8d
mov r14, qword [rax]
mov eax, 0x1ba0
mov qword [rax + r14], rsi
mov rsi, rdi
mov qword [rbx + 0x48], rdi
mov rcx, qword [rsp + 0x48]
call fcn.140050ff0
test eax, eax
jne 0x1400246e2
mov rax, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov qword [rax], r13
mov rsi, qword [rdi + 0x70]
test rsi, rsi
je 0x140024433
mov rcx, r15
mov r13d, 3
call fcn.140025480
mov rcx, rax
lea rdx, str.http:___s
mov r8, rsi
call fcn.1400260b0
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rax]
call fcn.140026bc0
mov rdx, qword [rdi + 0x68]
test rdx, rdx
je 0x140024449
mov rcx, r15
call fcn.140025620
mov rcx, qword [rax]
jmp 0x140024450
lea rcx, str.wget
mov r8, qword [rsp + 0x40]
xor r9d, r9d
mov edx, r13d
mov dword [rsp + 0x20], 0x10000000
mov r8, qword [r8]
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rbx + 0x20], rax
mov rsi, rdi
test rax, rax
je 0x1400246e2
xor r9d, r9d
lea rdx, [0x1400248e0]
mov r8d, 0x6f0c00
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
mov rcx, rax
call fcn.140172370
cmp rax, 0xffffffffffffffff
jne 0x1400244b9
lea rdx, str.WinHttpSetStatusCallback_failed__m
mov ecx, 0x20003
call fcn.140028ca0
jmp 0x1400246e2
lea rdx, str.PORT
mov rcx, rbp
call fcn.140038710
mov esi, eax
mov eax, 0x1b90
mov dword [rax + r14], esi
lea r14, str.https
test esi, esi
jne 0x140024516
lea rdx, str.PROTOCOL
mov rcx, rbp
call fcn.1400386b0
xor ecx, ecx
nop
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x140024509
cmp rcx, 6
jne 0x1400244f0
cmp dl, byte [r14 + rcx - 1]
mov esi, 0x50
mov eax, 0x1bb
cmove esi, eax
lea rdx, str.HOSTNAME
mov rcx, rbp
call fcn.1400386b0
mov rdx, rax
mov rcx, r15
call fcn.140025620
mov rcx, qword [rbx + 0x20]
xor r9d, r9d
movzx r8d, si
mov rdx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rcx, rax
call fcn.140172370
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x14002456b
lea rdx, str.WinHttpConnect_failed__m
mov ecx, 0x20003
call fcn.140028ca0
jmp 0x1400246df
lea rdx, [0x14019b58c]
mov rcx, rbp
call fcn.1400386b0
mov rdx, rax
mov rcx, r15
call fcn.140025620
lea rdx, str.PROTOCOL
mov rcx, rbp
mov rsi, rax
call fcn.1400386b0
xor ecx, ecx
nop dword [rax]
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x1400245b9
cmp rcx, 6
jne 0x1400245a0
cmp dl, byte [r14 + rcx - 1]
mov r8, qword [rsi]
lea rdx, [0x14019b738]
mov eax, 0
mov ecx, 0x800000
cmove eax, ecx
cmp qword [rdi + 8], 0
mov dword [rsp + 0x30], eax
lea rcx, [0x14019b728]
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.140172370
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x14002462a
lea rdx, str.WinHttpOpenRequest_failed__m
mov ecx, 0x20003
call fcn.140028ca0
jmp 0x1400246df
mov rcx, qword [rsp + 0x50]
lea rdx, str.Connection:_close
call fcn.140026bc0
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 [rdi]
test rax, rax
je 0x140024696
mov rsi, rdi
mov r9, qword [rax + 0x10]
lea rdx, str._s:__s
mov r8, qword [rax + 8]
mov rcx, r15
call fcn.1400255b0
mov rcx, qword [rbx + 0x10]
mov r9d, 0xa0000000
or r8d, 0xffffffff
mov rdx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov rsi, qword [rsi]
mov rax, qword [rsi]
test rax, rax
jne 0x14002465d
mov eax, dword [rdi + 0x10]
xor r8d, r8d
mov r9, qword [rdi + 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.140172320
test rax, rax
jne 0x1400246dc
lea rdx, str.WinHttpSendRequest_failed__m
mov ecx, 0x20003
call fcn.140028ca0
jmp 0x1400247a3
xor r12d, r12d
mov rsi, rdi
lea r14, [rbx + 0x28]
lea rcx, [0x14026e168]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14026e158]
test rax, rax
je 0x140024717
mov rax, qword [rax]
mov qword [rbx], rax
mov rax, qword [0x14026e158]
mov qword [rax], rbx
mov rax, qword [rbx]
mov qword [rax + 8], rbx
jmp 0x140024721
mov qword [rbx], rbx
mov qword [0x14026e158], rbx
lea rcx, [0x14026e168]
mov qword [rbx + 8], 0
call fcn.14002ec90
test r12d, r12d
je 0x14002474d
mov rcx, qword [rbx + 0x10]
test rcx, rcx
jne 0x140024792
mov rcx, rbx
call fcn.1400247d0
jmp 0x1400247a0
test rsi, rsi
je 0x1400247a0
cmp dword [rsi + 0x30], 0
je 0x1400247a0
mov rax, qword [rbx + 0x48]
mov dword [rsp + 0x128], 5
test rax, rax
je 0x140024789
mov r8d, dword [rax + 0x30]
test r8d, r8d
je 0x140024789
mov ecx, dword [r14]
lea rdx, [rsp + 0x128]
call fcn.140046770
test eax, eax
jne 0x1400247a0
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1400247a0
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rbx + 0x10], 0
mov eax, r12d
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret