Function at 0x18008f190
Capabilities:
Delete file
Initialize winhttp library
Read http header
Receive http response
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xb8
mov rax, qword [0x18014a010]
xor rax, rsp
mov qword [rbp + 7], rax
mov rsi, r9
mov qword [rbp - 0x59], r8
mov rbx, rdx
mov rdi, rcx
mov rcx, qword [rcx + 0x20]
xor r15d, r15d
test rcx, rcx
je 0x18008f1da
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rdi + 0x20], r15
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x18008f1ed
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rdi + 0x18], r15
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x18008f200
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rdi + 0x10], r15
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
lea rcx, str.Microsoft_Internet_Explorer
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rcx, rax
mov qword [rdi + 0x10], rax
test rax, rax
jne 0x18008f237
mov dword [rdi + 0xc8], 1
jmp 0x18008f5ce
mov eax, dword [rdi + 0x30]
mov dword [rsp + 0x20], eax
mov r9d, dword [rdi + 0x2c]
mov r8d, dword [rdi + 0x28]
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
xor r12b, r12b
mov dword [rbp - 0x51], r15d
mov dword [rbp - 0x3d], r15d
mov r14d, r15d
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
mov r9, rsi
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call fcn.1800903b0
test al, al
je 0x18008f5ce
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x39], xmm0
movups xmmword [rbp - 0x29], xmm0
movups xmmword [rbp - 0x19], xmm0
mov qword [rbp - 9], rax
mov dword [rbp - 1], eax
mov dword [rbp - 0x41], 0x3c
mov qword [rsp + 0x28], r15
lea rax, [rbp - 0x41]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x39]
xor r8d, r8d
mov ebx, 5
mov edx, ebx
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x18008f5c4
mov qword [rbp - 0x49], r15
lea r8d, [rbx + 5]
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 0x39]
call fcn.1800d48c0
mov dword [rbp - 0x41], eax
mov qword [rbp - 0x29], r15
mov qword [rbp - 0x21], 7
mov word [rbp - 0x39], r15w
lea rdx, [rbp - 0x39]
mov rcx, rdi
call fcn.1800902b0
mov r13, qword [rbp - 0x21]
mov r15, qword [rbp - 0x39]
test al, al
je 0x18008f3e1
lea r11, [rbp - 0x39]
cmp r13, 8
cmovae r11, r15
mov rax, qword [rbp - 0x29]
cmp rax, 3
jb 0x18008f3e1
add rax, 0xfffffffffffffffe
lea rsi, [r11 + rax*2]
mov rax, r11
lea r8, [0x180126ce0]
mov qword [rbp - 0x49], r8
nop word [rax + rax]
mov rcx, rsi
sub rcx, rax
sar rcx, 1
mov edx, 0
je 0x18008f37c
cmp word [rax], 0x34
je 0x18008f379
cmp rcx, 1
je 0x18008f37c
dec rcx
add rax, 2
cmp word [rax], 0x34
jne 0x18008f366
mov rdx, rax
mov rax, rdx
test rdx, rdx
je 0x18008f3e1
mov r9d, 3
mov rdx, r8
movzx ecx, word [rax]
mov r8d, 0x34
cmp cx, r8w
jb 0x18008f3c5
mov r10, rax
sub r10, qword [rbp - 0x49]
cmp cx, r8w
ja 0x18008f3c5
cmp r9, 1
je 0x18008f3d5
dec r9
add rdx, 2
movzx ecx, word [rdx + r10]
movzx r8d, word [rdx]
cmp cx, r8w
jae 0x18008f3a7
add rax, 2
lea r8, [0x180126ce0]
jmp 0x18008f350
sub rax, r11
sar rax, 1
cmp rax, 0xffffffffffffffff
jne 0x18008f421
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
mov rbx, qword [rbp - 0x59]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x18008f42f
mov ebx, 7
mov dword [rdi + 0xc8], ebx
xor r12b, r12b
jmp 0x18008f587
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbp - 0x41]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rdx, [rbp - 0x51]
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x18008f487
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
xor r12b, r12b
jmp 0x18008f587
mov ecx, 0x1000
call fcn.1800caa98
mov rbx, rax
mov ecx, dword [rbp - 0x51]
cmp ecx, 0x1000
jbe 0x18008f4ba
test rbx, rbx
je 0x18008f4af
mov rcx, rbx
call fcn.1800ca7c8
mov ecx, dword [rbp - 0x51]
call fcn.1800caa98
mov rbx, rax
mov ecx, dword [rbp - 0x51]
test rbx, rbx
je 0x18008f56e
lea r9, [rbp - 0x3d]
mov r8d, ecx
mov rdx, rbx
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x18008f566
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0x49]
mov r8d, dword [rbp - 0x3d]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18008f566
mov eax, dword [rbp - 0x3d]
cmp eax, dword [rbp - 0x49]
jne 0x18008f566
add r14d, eax
mov rcx, qword [rdi + 0xc0]
test rcx, rcx
je 0x18008f546
mov rax, qword [rcx]
mov r9, qword [rax]
mov eax, r14d
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
mov eax, dword [rbp - 0x41]
xorps xmm3, xmm3
cvtsi2sd xmm3, rax
movsd qword [rsp + 0x20], xmm0
xor r8d, r8d
mov rdx, qword [rdi + 0xb8]
call r9
lea rdx, [rbp - 0x51]
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x18008f566
mov ecx, dword [rbp - 0x51]
test ecx, ecx
jne 0x18008f497
mov r12b, 1
mov rcx, rbx
call fcn.1800ca7c8
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12b, r12b
jne 0x18008f587
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
cmp r13, 8
jb 0x18008f5be
lea rdx, [r13*2 + 2]
mov rax, r15
cmp rdx, 0x1000
jb 0x18008f5b6
add rdx, 0x27
mov r15, qword [r15 - 8]
sub rax, r15
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18008f5f0
mov rcx, r15
call fcn.180096034
movzx eax, r12b
jmp 0x18008f5d0
mov dword [rdi + 0xc8], 4
xor al, al
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.180096010
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.1800d0cf4
int3