Function at 0x14003d4b0
Capabilities:
Initialize winhttp library
Prepare http request
Print debug messages
Read http header
Receive http response

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1020]
mov eax, 0x1120
call fcn.1400a6370
sub rsp, rax
mov rax, qword [0x14012a210]
xor rax, rsp
mov qword [rbp + 0x1010], rax
mov r13, r8
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x58], rdx
lea rcx, str._Inside_GetFileNameFromHeader__
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor r15d, r15d
mov dword [rsp + 0x50], r15d
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp + 0x10]
call fcn.1400a83f0
mov dword [rbp - 0x60], 0xa80
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8, qword [rdi + 0x198]
mov edx, dword [rdi + 0x190]
lea rcx, str.WinHTTP
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r14, rax
mov rdx, rbx
lea rcx, [rbp - 0x58]
call fcn.140012240
nop
test r14, r14
jne 0x14003d604
lea rcx, str._GetFileNameFromHeader___WinHttpOpen___failed.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
nop
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x14003d5ab
mov rcx, qword [rbp - 0x58]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003d5a5
mov rcx, qword [rcx - 8]
sub rax, rcx
add rdx, 0x27
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd27
call fcn.1400a59a4
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x14003d5ea
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
mov rcx, qword [rbx]
jb 0x14003d5e5
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14003dd2d
mov rcx, r8
call fcn.1400a59a4
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], 7
mov word [rbx], r15w
mov eax, 1
jmp 0x14003dcfd
mov dword [rsp + 0x20], 0x1d4c0
mov edx, 0x7530
mov r9d, edx
mov r8d, edx
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], r15w
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], r15w
mov word [rsp + 0x44], r15w
mov byte [rsp + 0x40], 0
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x18]
call fcn.140012240
lea rcx, [rsp + 0x44]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x60]
lea r8, [rbp - 0x80]
mov rdx, rax
call fcn.14003d180
mov r9d, 4
lea r8, [rbp - 0x60]
lea edx, [r9 + 0x50]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x14003d764
lea rcx, str._CMTFileDownloader::RequestServer_____WinHttpSetOption_failed.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x14003d6fa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
cmp rdx, 0x1000
mov rax, rcx
jb 0x14003d6f5
mov rcx, qword [rcx - 8]
sub rax, rcx
add rdx, 0x27
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd39
call fcn.1400a59a4
mov word [rsp + 0x60], r15w
mov qword [rsp + 0x78], 7
mov qword [rsp + 0x70], r15
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x14003d74e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
cmp rdx, 0x1000
mov rax, rcx
jb 0x14003d749
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd3f
call fcn.1400a59a4
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], r15w
jmp 0x14003d56a
mov dword [rbp - 0x5c], 2
mov r9d, 4
lea r8, [rbp - 0x5c]
lea edx, [r9 + 0x54]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x14003d7a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.________CMTFileDownloader::GetFileNameFromHeader_____Failed_at_WinHttpSetOption__error:__d
lea rcx, [rbp + 0x10]
call fcn.1400391d0
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
movzx eax, word [rsp + 0x44]
test ax, ax
jne 0x14003d7b6
mov eax, r15d
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rdx, qword [rbp - 0x80]
xor r9d, r9d
movzx r8d, ax
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
test rax, rax
jne 0x14003d7f7
lea rcx, str._GetFileNameFromHeader___WinHttpConnect___failed.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x14003d6b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae r8, qword [rsp + 0x60]
movzx eax, byte [rsp + 0x40]
neg al
sbb ecx, ecx
and ecx, 0x800000
mov dword [rsp + 0x30], ecx
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor edx, edx
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
test rax, rax
jne 0x14003d865
lea rcx, str._GetFileNameFromHeader___WinHttpOpenRequest___failed.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x14003d6b8
mov qword [rbp - 0x18], r15
mov qword [rbp - 8], r15
mov qword [rbp], 7
mov word [rbp - 0x18], r15w
cmp qword [rdi + 0x1b8], 0
je 0x14003d8f7
cmp qword [rdi + 0x1d8], 0
je 0x14003d8f7
lea rax, [rdi + 0x1c8]
cmp qword [rax + 0x18], 8
jb 0x14003d89f
mov rax, qword [rax]
lea r9, [rdi + 0x1a8]
cmp qword [r9 + 0x18], 8
jb 0x14003d8b0
mov r9, qword [r9]
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rax
mov r8d, dword [rdi + 0x1a0]
mov edx, 1
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
cmp eax, 1
je 0x14003d8f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140107dd0]
lea rcx, [rbp + 0x10]
call fcn.140039170
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
je 0x14003d93f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140107dd0]
lea rcx, [rbp + 0x10]
call fcn.140039170
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov r15d, eax
xor edi, edi
test eax, eax
je 0x14003da7c
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rdi + 0x16]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14003d9d9
mov ecx, dword [rsp + 0x50]
shr rcx, 1
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400a5c74
mov rdi, rax
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9, rdi
xor r8d, r8d
lea edx, [r8 + 0x16]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov r15d, eax
test eax, eax
je 0x14003da6a
xor eax, eax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], ax
lea r9, [rbp - 0x38]
lea r8, str.filename
mov rdx, rdi
call fcn.14003d390
test al, al
je 0x14003da2a
lea rax, [rbp - 0x38]
cmp r13, rax
je 0x14003da2a
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdx, qword [rbp - 0x38]
mov r8, qword [rbp - 0x28]
mov rcx, r13
call fcn.140011160
nop
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x14003da6a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003da65
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd33
call fcn.1400a59a4
test rdi, rdi
je 0x14003da7c
mov edx, 2
mov rcx, rdi
call fcn.1400a59a4
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
mov rdx, qword [rsp + 0x78]
test r15d, r15d
jne 0x14003dbd2
cmp rdx, 8
jb 0x14003dae3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003dade
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd39
call fcn.1400a59a4
xor edi, edi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], di
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x14003db38
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003db33
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd3f
call fcn.1400a59a4
mov qword [rbp - 0x70], rdi
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], di
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x14003db89
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003db83
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd27
call fcn.1400a59a4
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x14003dbc8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x14003dbc3
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14003dd2d
mov rcx, r8
call fcn.1400a59a4
mov eax, 2
jmp 0x14003dcee
cmp rdx, 8
jb 0x14003dc0f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003dc0a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd39
call fcn.1400a59a4
xor edi, edi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], di
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x14003dc64
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003dc5f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd3f
call fcn.1400a59a4
mov qword [rbp - 0x70], rdi
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], di
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x14003dcb1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003dcab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003dd27
call fcn.1400a59a4
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x14003dcec
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x14003dce7
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14003dd2d
mov rcx, r8
call fcn.1400a59a4
xor eax, eax
mov qword [rbx + 0x10], rdi
mov qword [rbx + 0x18], 7
mov word [rbx], di
mov rcx, qword [rbp + 0x1010]
xor rcx, rsp
call fcn.1400a5460
mov rbx, qword [rsp + 0x1178]
add rsp, 0x1120
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400b4704
nop
call fcn.1400b4704
nop
call fcn.1400b4704
nop
call fcn.1400b4704
nop
call fcn.1400b4704
int3