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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x158
mov r14, r9
mov r13, r8
mov r15, rdx
mov rdi, rcx
mov rax, qword [rsp + 0x1c0]
mov qword [rsp + 0x50], rax
movzx eax, byte [0x140090df8]
mov ebp, 6
mov edx, 6
xor ecx, ecx
call fcn.14004a280
test rax, rax
je 0x1400169c0
mov rsi, rax
mov word [rax + 4], 0x6465
mov dword [rax], 0x6c696166
mov r12, qword [0x1400900c0]
mov rcx, qword [0x140090060]
mov dword [rsp + 0x20], 0
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call sub.winhttp.dll_WinHttpOpen
mov rbx, rax
mov eax, 1
test rbx, rbx
je 0x1400160ed
lea rax, [r15 + r13]
cmp r13, 5
jae 0x140016116
xor ebp, ebp
jmp 0x14001612c
mov r14d, 6
mov qword [rdi], rax
mov qword [rdi + 8], r14
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], rbp
add rsp, 0x158
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x70747468
xor ecx, dword [r15]
movzx edx, byte [r15 + 4]
xor edx, 0x73
or edx, ecx
sete bpl
mov qword [rsp + 0x118], r15
mov qword [rsp + 0x120], rax
mov word [rsp + 0x128], 0
mov dword [rsp + 0x130], 1
lea rcx, [rsp + 0xc8]
lea rdx, [rsp + 0x118]
call fcn.14001fc20
mov edx, 0x68
mov ecx, 8
call fcn.14004a280
mov r15, rax
mov dword [rax], 0x68
mov dword [rax + 0x20], 0xffffffff
mov dword [rax + 0x50], 0xffffffff
mov r13, qword [rsp + 0xd0]
mov edx, dword [rsp + 0xd8]
dec edx
mov rcx, r13
xor r8d, r8d
mov r9, rax
call sub.winhttp.dll_WinHttpCrackUrl
test eax, eax
jne 0x140016241
mov rcx, rbx
call sub.winhttp.dll_WinHttpCloseHandle
movzx eax, byte [0x140090df8]
mov edx, 6
xor ecx, ecx
call fcn.14004a280
test rax, rax
je 0x1400169c0
mov word [rax + 4], 0x6465
mov dword [rax], 0x6c696146
mov qword [rdi + 8], 6
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], 6
mov qword [rdi], 1
cmp qword [rsp + 0xc8], 0
je 0x14001621b
mov rcx, qword [0x140090d88]
xor edx, edx
mov r8, r13
call qword [sym.imp.kernel32.dll_HeapFree]
mov rcx, qword [0x140090d88]
xor edx, edx
mov r8, rsi
add rsp, 0x158
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.kernel32.dll_HeapFree]
mov dword [rsp + 0x40], ebp
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 2
mov qword [rsp + 0x68], 0
mov ebp, dword [r15 + 0x20]
lea r8, [rbp + 1]
mov qword [rsp + 0x20], 2
lea rcx, [rsp + 0x58]
mov r9d, 2
xor edx, edx
call fcn.14006ab80
mov r13, qword [rsp + 0x68]
lea rcx, [r13*2]
add rcx, qword [rsp + 0x60]
test rbp, rbp
je 0x140016304
mov edx, 1
cmp ebp, 0xf
ja 0x1400162a9
mov rax, rcx
jmp 0x1400162dd
mov edx, ebp
and edx, 0xfffffff0
lea r8, [rdx + rdx]
lea rax, [rcx + rdx*2]
xor r9d, r9d
xorps xmm0, xmm0
nop dword [rax]
movups xmmword [rcx + r9 + 0x10], xmm0
movups xmmword [rcx + r9], xmm0
add r9, 0x20
cmp r8, r9
jne 0x1400162c0
cmp rdx, rbp
je 0x1400162fe
or rdx, 1
mov rcx, rbp
sub rcx, rdx
inc rcx
nop word cs:[rax + rax]
mov word [rax], 0
add rax, 2
dec rcx
jne 0x1400162f0
add r13, rbp
mov rcx, rax
mov word [rcx], 0
inc r13
mov qword [rsp + 0x68], r13
mov rdx, qword [r15 + 0x18]
mov rbp, qword [rsp + 0x60]
mov r8d, dword [r15 + 0x20]
add r8, r8
mov rcx, rbp
call fcn.1400684b0
mov ecx, dword [r15 + 0x20]
cmp r13, rcx
jbe 0x1400169cf
mov word [rbp + rcx*2], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 2
mov qword [rsp + 0x80], 0
mov ebp, dword [r15 + 0x50]
lea r8, [rbp + 1]
mov qword [rsp + 0x20], 2
lea rcx, [rsp + 0x70]
mov r9d, 2
xor edx, edx
call fcn.14006ab80
mov r13, qword [rsp + 0x80]
lea rcx, [r13*2]
add rcx, qword [rsp + 0x78]
test rbp, rbp
je 0x140016404
mov edx, 1
cmp ebp, 0xf
ja 0x1400163a7
mov rax, rcx
jmp 0x1400163dd
mov edx, ebp
and edx, 0xfffffff0
lea r8, [rdx + rdx]
lea rax, [rcx + rdx*2]
xor r9d, r9d
xorps xmm0, xmm0
nop word [rax + rax]
movups xmmword [rcx + r9 + 0x10], xmm0
movups xmmword [rcx + r9], xmm0
add r9, 0x20
cmp r8, r9
jne 0x1400163c0
cmp rdx, rbp
je 0x1400163fe
or rdx, 1
mov rcx, rbp
sub rcx, rdx
inc rcx
nop word cs:[rax + rax]
mov word [rax], 0
add rax, 2
dec rcx
jne 0x1400163f0
add r13, rbp
mov rcx, rax
mov word [rcx], 0
inc r13
mov qword [rsp + 0x80], r13
mov rdx, qword [r15 + 0x48]
mov rbp, qword [rsp + 0x78]
mov r8d, dword [r15 + 0x50]
add r8, r8
mov rcx, rbp
call fcn.1400684b0
mov ecx, dword [r15 + 0x50]
cmp r13, rcx
jbe 0x1400169de
mov word [rbp + rcx*2], 0
movzx ebp, word [r15 + 0x24]
mov rcx, qword [0x140090d88]
xor edx, edx
mov r8, r15
call qword [sym.imp.kernel32.dll_HeapFree]
mov rdx, qword [rsp + 0x60]
mov rcx, rbx
mov r8d, ebp
xor r9d, r9d
call sub.winhttp.dll_WinHttpConnect
test rax, rax
je 0x140016604
mov r15, rax
movzx eax, byte [rsp + 0x40]
shl eax, 0x17
or eax, 0x100
mov rbp, qword [rsp + 0x78]
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x30], eax
xor r13d, r13d
mov rcx, r15
mov rdx, r12
mov r8, rbp
xor r9d, r9d
call sub.winhttp.dll_WinHttpOpenRequest
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14001667b
movabs rax, 0x8000000000000000
mov qword [rsp + 0xe0], rax
test r14, r14
je 0x1400166d3
mov rbp, r15
mov qword [rsp + 0xe8], r14
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0xf0], rax
lea rax, [rsp + 0xe8]
mov qword [rsp + 0x88], rax
lea rax, [0x14003f560]
mov qword [rsp + 0x90], rax
lea rax, str.Authorization:
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], 1
mov qword [rsp + 0xb8], 0
lea rax, [rsp + 0x88]
mov qword [rsp + 0xa8], rax
mov qword [rsp + 0xb0], 1
lea rcx, [rsp + 0x100]
lea rdx, [rsp + 0x98]
call fcn.1400065a0
mov r14, qword [rsp + 0x108]
mov rax, qword [rsp + 0x110]
add rax, r14
mov qword [rsp + 0x138], r14
mov qword [rsp + 0x140], rax
mov word [rsp + 0x148], 0
mov dword [rsp + 0x150], 1
mov r12, qword [rsp + 0x100]
lea rcx, [rsp + 0x98]
lea rdx, [rsp + 0x138]
call fcn.14001fc20
mov r15, qword [rsp + 0x98]
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x50], rax
mov r13, qword [rsp + 0xa8]
test r12, r12
je 0x1400165e9
mov rcx, qword [0x140090d88]
xor edx, edx
mov r8, r14
call qword [sym.imp.kernel32.dll_HeapFree]
mov rax, r15
neg rax
mov r14, qword [rsp + 0x40]
jno 0x1400166dc
xor edx, edx
xor r13d, r13d
jmp 0x1400166e9
mov rcx, rbx
call sub.winhttp.dll_WinHttpCloseHandle
cmp qword [rsp + 0x70], 0
je 0x140016628
mov r8, qword [rsp + 0x78]
mov rcx, qword [0x140090d88]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
cmp qword [rsp + 0x58], 0
mov ebp, 6
je 0x140016649
mov r8, qword [rsp + 0x60]
mov rcx, qword [0x140090d88]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
cmp qword [rsp + 0xc8], 0
je 0x14001666b
mov r8, qword [rsp + 0xd0]
mov rcx, qword [0x140090d88]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
mov r14d, 6
mov eax, 1
jmp 0x1400160f3
mov rcx, r15
call sub.winhttp.dll_WinHttpCloseHandle
mov rcx, rbx
call sub.winhttp.dll_WinHttpCloseHandle
cmp qword [rsp + 0x70], 0
je 0x1400166a5
mov rcx, qword [0x140090d88]
xor edx, edx
mov r8, rbp
call qword [sym.imp.kernel32.dll_HeapFree]
cmp qword [rsp + 0x58], 0
je 0x1400166c1
mov r8, qword [rsp + 0x60]
mov rcx, qword [0x140090d88]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
cmp qword [rsp + 0xc8], 0
mov ebp, 6
jne 0x140016654
jmp 0x14001666b
xor edx, edx
mov r14, qword [rsp + 0x40]
jmp 0x1400166ec
mov qword [rsp + 0xe0], r15
mov rdx, qword [rsp + 0x50]
mov r15, rbp
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, r14
mov r8d, r13d
xor r9d, r9d
call sub.winhttp.dll_WinHttpSendRequest
mov r12d, 1
mov ebp, 6
test eax, eax
je 0x1400168dd
mov rcx, r14
xor edx, edx
call sub.winhttp.dll_WinHttpReceiveResponse
test eax, eax
je 0x1400168dd
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0xe8], 4
lea rax, [rsp + 0xe8]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], 0
lea r9, [rsp + 0x4c]
mov rcx, r14
mov edx, 0x20000013
xor r8d, r8d
call sub.winhttp.dll_WinHttpQueryHeaders
mov ebp, 6
test eax, eax
je case.0x140006ac0.234
mov eax, 0xffffff38
add eax, dword [rsp + 0x4c]
cmp eax, 0x64
jae case.0x140006ac0.234
mov qword [rsp + 0xf8], r15
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa0], 1
mov qword [rsp + 0xa8], 0
mov r15d, 1
xor r12d, r12d
xor r13d, r13d
jmp 0x140016828
mov byte [rcx], 0
inc r12
mov r15, qword [rsp + 0xa0]
mov r8d, dword [rsp + 0x88]
mov rbp, r12
mov qword [rsp + 0xa8], rbp
lea rdx, [r15 + r13]
mov r14, qword [rsp + 0x40]
mov rcx, r14
lea r9, [rsp + 0x88]
call sub.winhttp.dll_WinHttpReadData
test eax, eax
je 0x140016983
mov r8d, dword [rsp + 0x88]
add r13, r8
mov r12, rbp
test r8d, r8d
je 0x140016983
mov dword [rsp + 0x88], 0
mov rcx, r14
lea rdx, [rsp + 0x88]
call sub.winhttp.dll_WinHttpQueryDataAvailable
mov bh, byte [rdi]
add al, 0
mov r8d, dword [rsp + 0x88]
test eax, eax
je 0x14001681f
lea rbp, [r8 + r13]
mov r14, rbp
sub r14, r12
jbe 0x1400167e8
mov rax, qword [rsp + 0x98]
sub rax, r12
cmp rax, r14
cmp eax, esi
jb 0x140016895
lea rcx, [r15 + r12]
cmp r14, 2
jb 0x1400167cf
lea r8, [r14 - 1]
xor edx, edx
call fcn.140068b50
add r12, r14
dec r12
add r15, r12
mov rcx, r15
stc
jmp 0x1400167cf
mov qword [rsp + 0x20], 1
mov r9d, 1
lea rcx, [rsp + 0x98]
mov rdx, r12
loop 0x1400168fd
mov eax, esi
call fcn.14006ab80
mov r15, qword [rsp + 0xa0]
mov r12, qword [rsp + 0xa8]
and al, 0xa8
add byte [rax], al
add byte [rbx - 0x73], cl
or al, 0x27
cmp r14, 2
jb 0x1400167cf
jmp 0x140016879
mov r12d, 1
mov r14d, 6
mov rcx, qword [rsp + 0x40]
call sub.winhttp.dll_WinHttpCloseHandle
add al, 0
mov rax, qword [rsp + 0xe0]
shl rax, 1
test rax, rax
je 0x140016911
mov rcx, qword [0x140090d88]
xor edx, edx
mov r8, qword [rsp + 0x50]
call qword [sym.imp.kernel32.dll_HeapFree]
mov rcx, r15
call sub.winhttp.dll_WinHttpCloseHandle
mov rcx, rbx
call sub.winhttp.dll_WinHttpCloseHandle
cmp qword [rsp + 0x70], 0
je 0x14001693d
mov r8, qword [rsp + 0x78]
mov rcx, qword [0x140090d88]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
invalid
invalid
cmp qword [rsp + 0x58], 0
je 0x140016959
mov r8, qword [rsp + 0x60]
mov rcx, qword [0x140090d88]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
cmp qword [rsp + 0xc8], 0
je 0x14001697b
mov r8, qword [rsp + 0xd0]
mov rcx, qword [0x140090d88]
or eax, 0x7a415
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
mov rax, r12
jmp 0x1400160f3
invalid
mov r14, qword [rsp + 0x98]
mov r15, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0xa8]
and al, 0xa8
add byte [rax], al
add byte [rax - 0x75], cl
or eax, 0x7a3e6
xor r12d, r12d
xor edx, edx
mov r8, rsi
call qword [sym.imp.kernel32.dll_HeapFree]
mov rsi, r15
mov r15, qword [rsp + 0xf8]
jmp 0x1400168e3
mov ecx, 1
mov edx, 6
call fcn.140069052
lea r8, [0x140070258]
mov rdx, r13
call fcn.14006accf
lea r8, [0x140070270]
mov rdx, r13
call fcn.14006accf
int3