Function at 0x14003e670
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.140176104
lea r12, [rsp + 0x118]
or r14d, 0xffffffff
add r12, 0xfffffffffffffff8
mov dword [rsp + 0x138], r14d
xor r15d, r15d
lea r8, [fcn.14003de00]
mov rcx, r12
mov dword [rsp + 0x40], r15d
lea rdx, [rsp + 0x58]
mov rbx, rax
call fcn.140028f10
lea r8, [fcn.14002ac10]
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.140028f10
lea r8, [fcn.14002ac10]
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x48]
mov rcx, r12
call fcn.140028f10
xor edx, edx
mov qword [rsp + 0x48], rax
lea r8d, [r14 + 0x79]
lea rcx, [rsp + 0x70]
call fcn.140174b20
cmp dword [0x140279468], r15d
jne 0x14003e73c
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, [0x14003ec30]
mov rdx, rbx
lea rcx, [rbx + 0x58]
call fcn.14003a870
lea rcx, [rbx + 0x28]
call fcn.1400442a0
test eax, eax
jne 0x14003eb44
lea edx, [rax + 1]
lea ecx, [rax + 0x60]
call fcn.140176104
mov qword [rbx + 0x38], rax
mov dword [rax + 0x58], r14d
test rsi, rsi
je 0x14003e799
mov rcx, rsi
call fcn.14003e5d0
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, 0x120
mov qword [rax + r14], rdi
mov rdi, rsi
mov qword [rbx + 0x48], rsi
mov rcx, qword [rsp + 0x58]
call fcn.140059260
test eax, eax
jne 0x14003e899
mov rax, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x58]
mov qword [rax], r15
mov rdi, qword [rsi + 0x70]
test rdi, rdi
je 0x14003e81c
mov rcx, r12
mov r15d, 3
call fcn.140029330
mov rcx, rax
lea rdx, str.http:___s
mov r8, rdi
call fcn.14002a130
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rax]
call fcn.14002ac40
mov rdx, qword [rsi + 0x68]
test rdx, rdx
je 0x14003e832
mov rcx, r12
call fcn.1400294d0
mov rcx, qword [rax]
jmp 0x14003e839
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 0x14003e899
xor r9d, r9d
lea rdx, [0x14003ed30]
mov r8d, 0x6f0c00
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
mov rcx, rax
call fcn.1401710c0
cmp rax, 0xffffffffffffffff
jne 0x14003e8a9
lea rdx, str.WinHttpSetStatusCallback_failed__m
mov ecx, 0x5d0003
call fcn.14002d250
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
jmp 0x14003eb47
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.140171070
test rax, rax
jne 0x14003e8e8
lea rdx, str.WinHttpSetOption_tls_failed__m
mov ecx, 0x5d0003
call fcn.14002d250
lea rdx, str.PORT
mov rcx, rbp
call fcn.14003dee0
mov edi, eax
mov eax, pe_nt_image_headers64
mov dword [rax + r14], edi
lea r14, str.https
test edi, edi
jne 0x14003e946
lea rdx, str.PROTOCOL
mov rcx, rbp
call fcn.14003de80
xor ecx, ecx
nop
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x14003e939
cmp rcx, 6
jne 0x14003e920
cmp dl, byte [r14 + rcx - 1]
mov edi, 0x50
mov eax, 0x1bb
cmove edi, eax
lea rdx, str.HOSTNAME
mov rcx, rbp
call fcn.14003de80
mov rdx, rax
mov rcx, r12
call fcn.1400294d0
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.1401710c0
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x14003e9a9
lea rdx, str.WinHttpConnect_failed__m
mov ecx, 0x5d0003
call fcn.14002d250
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
mov rdi, rsi
jmp 0x14003eb47
lea rdx, [0x1401aafd4]
mov rcx, rbp
call fcn.14003de80
mov rdx, rax
mov rcx, r12
call fcn.1400294d0
lea rdx, str.PROTOCOL
mov rcx, rbp
mov rdi, rax
call fcn.14003de80
xor ecx, ecx
nop word [rax + rax]
movzx edx, byte [rax + rcx]
inc rcx
cmp dl, byte [r14 + rcx - 1]
jne 0x14003e9f9
cmp rcx, 6
jne 0x14003e9e0
cmp dl, byte [r14 + rcx - 1]
mov r8, qword [rdi]
lea rdx, [0x1401aafe8]
mov eax, 0
mov ecx, 0x800000
cmove eax, ecx
cmp qword [rsi + 8], 0
mov dword [rsp + 0x30], eax
lea rcx, [0x1401aafd8]
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.1401710c0
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x14003ea78
lea rdx, str.WinHttpOpenRequest_failed__m
mov ecx, 0x5d0003
call fcn.14002d250
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
mov rdi, rsi
jmp 0x14003eb47
lock inc dword [rbx + 0x58]
mov rcx, qword [rsp + 0x60]
lea rdx, str.Connection:_close
call fcn.14002ac40
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 0x14003eae8
mov rdi, rsi
mov r9, qword [rax + 0x10]
lea rdx, str._s:__s
mov r8, qword [rax + 8]
mov rcx, r12
call fcn.140029460
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 0x14003eaaf
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.140171070
test rax, rax
jne 0x14003eb39
lea rdx, str.WinHttpSendRequest_failed__m
mov ecx, 0x5d0003
call fcn.14002d250
mov ebp, dword [rsp + 0x138]
or r14d, 0xffffffff
mov rdi, rsi
jmp 0x14003eb47
xor ebp, ebp
mov rdi, rsi
or r14d, 0xffffffff
jmp 0x14003eb47
mov ebp, r14d
lea rcx, [0x140279470]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140279460]
test rax, rax
je 0x14003eb78
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 0x14003eb82
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 0x14003ebcd
test rdi, rdi
je 0x14003ebe0
cmp dword [rdi + 0x30], esi
je 0x14003ebe0
mov rax, qword [rbx + 0x48]
mov dword [rsp + 0x50], 5
test rax, rax
je 0x14003ebcd
mov r8d, dword [rax + 0x30]
test r8d, r8d
je 0x14003ebcd
mov ecx, dword [rbx + 0x28]
lea rdx, [rsp + 0x50]
call fcn.140044a10
test eax, eax
jne 0x14003ebe0
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x14003ebe0
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 0x14003ec0c
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