Function at 0x14003e610
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, 0xf0
mov rdi, rdx
mov rbp, rcx
mov edx, 1
mov ecx, 0x98
mov rsi, r8
call fcn.1401760a4
lea r12, [rsp + 0x118]
or r14d, 0xffffffff
add r12, 0xfffffffffffffff8
mov dword [rsp + 0x138], r14d
xor r15d, r15d
lea r8, [fcn.14003dda0]
mov rcx, r12
mov dword [rsp + 0x40], r15d
lea rdx, [rsp + 0x58]
mov rbx, rax
call fcn.140028eb0
lea r8, [fcn.14002abb0]
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.140028eb0
lea r8, [fcn.14002abb0]
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x48]
mov rcx, r12
call fcn.140028eb0
xor edx, edx
mov qword [rsp + 0x48], rax
lea r8d, [r14 + 0x79]
lea rcx, [rsp + 0x70]
call fcn.140174ac0
cmp dword [0x140279468], r15d
jne 0x14003e6dc
xor edx, edx
lea rcx, [0x140279470]
call sub.KERNEL32.dll_InitializeCriticalSection
lea rcx, [rbx + 0x70]
mov dword [0x140279468], 1
xor edx, edx
call sub.KERNEL32.dll_InitializeCriticalSection
lea r8, [0x14003ebd0]
mov rdx, rbx
lea rcx, [rbx + 0x58]
call fcn.14003a810
lea rcx, [rbx + 0x28]
call fcn.140044240
test eax, eax
jne 0x14003eae4
lea edx, [rax + 1]
lea ecx, [rax + 0x60]
call fcn.1401760a4
mov qword [rbx + 0x38], rax
mov dword [rax + 0x58], r14d
test rsi, rsi
je 0x14003e739
mov rcx, rsi
call fcn.14003e570
mov qword [rbx + 0x30], rsi
mov rax, qword gs:[0x58]
lea rsi, [rsp + 0x70]
test rdi, rdi
mov rdx, rbp
cmovne rsi, rdi
xor r8d, r8d
mov r14, qword [rax]
mov eax, pe_nt_image_headers64
mov qword [rax + r14], rdi
mov rdi, rsi
mov qword [rbx + 0x48], rsi
mov rcx, qword [rsp + 0x58]
call fcn.140059200
test eax, eax
jne 0x14003e839
mov rax, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x58]
mov qword [rax], r15
mov rdi, qword [rsi + 0x70]
test rdi, rdi
je 0x14003e7bc
mov rcx, r12
mov r15d, 3
call fcn.1400292d0
mov rcx, rax
lea rdx, str.http:___s
mov r8, rdi
call fcn.14002a0d0
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rax]
call fcn.14002abe0
mov rdx, qword [rsi + 0x68]
test rdx, rdx
je 0x14003e7d2
mov rcx, r12
call fcn.140029470
mov rcx, qword [rax]
jmp 0x14003e7d9
lea rcx, str.wget
mov r8, qword [rsp + 0x48]
xor r9d, r9d
mov edx, r15d
mov dword [rsp + 0x20], 0x10000000
mov r8, qword [r8]
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rbx + 0x20], rax
mov rdi, rsi
test rax, rax
je 0x14003e839
xor r9d, r9d
lea rdx, [0x14003ecd0]
mov r8d, 0x6f0c00
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
mov rcx, rax
call fcn.140171060
cmp rax, 0xffffffffffffffff
jne 0x14003e849
lea rdx, str.WinHttpSetStatusCallback_failed__m
mov ecx, 0x5d0003
call fcn.14002d1f0
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
jmp 0x14003eae7
mov r9d, 4
mov dword [rsp + 0x40], 0x800
mov rcx, qword [rbx + 0x20]
lea r8, [rsp + 0x40]
lea edx, [r9 + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
movsxd rcx, eax
call fcn.140171010
test rax, rax
jne 0x14003e888
lea rdx, str.WinHttpSetOption_tls_failed__m
mov ecx, 0x5d0003
call fcn.14002d1f0
lea rdx, str.PORT
mov rcx, rbp
call fcn.14003de80
mov edi, eax
mov eax, 0x110
mov dword [rax + r14], edi
lea r14, [0x1401aaec0]
test edi, edi
jne 0x14003e8e6
lea rdx, str.PROTOCOL
mov rcx, rbp
call fcn.14003de20
xor ecx, ecx
nop
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x14003e8d9
cmp rcx, 6
jne 0x14003e8c0
cmp dl, byte [r14 + rcx - 1]
mov edi, 0x50
mov eax, 0x1bb
cmove edi, eax
lea rdx, str.HOSTNAME
mov rcx, rbp
call fcn.14003de20
mov rdx, rax
mov rcx, r12
call fcn.140029470
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.140171060
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x14003e949
lea rdx, str.WinHttpConnect_failed__m
mov ecx, 0x5d0003
call fcn.14002d1f0
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
mov rdi, rsi
jmp 0x14003eae7
lea rdx, [0x1401aaf04]
mov rcx, rbp
call fcn.14003de20
mov rdx, rax
mov rcx, r12
call fcn.140029470
lea rdx, str.PROTOCOL
mov rcx, rbp
mov rdi, rax
call fcn.14003de20
xor ecx, ecx
nop word [rax + rax]
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x14003e999
cmp rcx, 6
jne 0x14003e980
cmp dl, byte [r14 + rcx - 1]
mov r8, qword [rdi]
lea rdx, [0x1401aaf18]
mov eax, 0
mov ecx, 0x800000
cmove eax, ecx
cmp qword [rsi + 8], 0
mov dword [rsp + 0x30], eax
lea rcx, [0x1401aaf08]
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.140171060
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x14003ea18
lea rdx, str.WinHttpOpenRequest_failed__m
mov ecx, 0x5d0003
call fcn.14002d1f0
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
mov rdi, rsi
jmp 0x14003eae7
lock inc dword [rbx + 0x58]
mov rcx, qword [rsp + 0x60]
lea rdx, str.Connection:_close
call fcn.14002abe0
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 0x14003ea88
mov rdi, rsi
mov r9, qword [rax + 0x10]
lea rdx, str._s:__s
mov r8, qword [rax + 8]
mov rcx, r12
call fcn.140029400
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 0x14003ea4f
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.140171010
test rax, rax
jne 0x14003ead9
lea rdx, str.WinHttpSendRequest_failed__m
mov ecx, 0x5d0003
call fcn.14002d1f0
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
mov rdi, rsi
jmp 0x14003eae7
xor ebp, ebp
mov rdi, rsi
or r14d, 0xffffffff
jmp 0x14003eae7
mov ebp, r14d
lea rcx, [0x140279470]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140279460]
test rax, rax
je 0x14003eb18
mov rax, qword [rax]
mov qword [rbx], rax
mov rax, qword [0x140279460]
mov qword [rax], rbx
mov rax, qword [rbx]
mov qword [rax + 8], rbx
jmp 0x14003eb22
mov qword [rbx], rbx
mov qword [0x140279460], rbx
xor esi, esi
lea rcx, [0x140279470]
mov qword [rbx + 8], rsi
call sub.KERNEL32.dll_LeaveCriticalSection
test ebp, ebp
jne 0x14003eb6d
test rdi, rdi
je 0x14003eb80
cmp dword [rdi + 0x30], esi
je 0x14003eb80
mov rax, qword [rbx + 0x48]
mov dword [rsp + 0x50], 5
test rax, rax
je 0x14003eb6d
mov r8d, dword [rax + 0x30]
test r8d, r8d
je 0x14003eb6d
mov ecx, dword [rbx + 0x28]
lea rdx, [rsp + 0x50]
call fcn.1400449b0
test eax, eax
jne 0x14003eb80
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x14003eb80
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rbx + 0x10], rsi
lea rcx, [rbx + 0x70]
call sub.KERNEL32.dll_EnterCriticalSection
lea rcx, [rbx + 0x70]
mov dword [rbx + 0x50], 1
call sub.KERNEL32.dll_LeaveCriticalSection
lock xadd dword [rbx + 0x58], r14d
cmp r14d, 1
jne 0x14003ebac
mov rcx, qword [rbx + 0x60]
call qword [rbx + 0x68]
lea r11, [rsp + 0xf0]
mov eax, ebp
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