Function at 0x140046610
Capabilities:
Delete file

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x88], rbx
mov r13, rcx
mov rax, qword [rcx + 0x48]
test rax, rax
je 0x14004664b
lea rdx, str.1:2_2:0
mov ecx, 0xb000000
call rax
call fcn.1400694ec
mov rdx, rax
xor r12d, r12d
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x14004666e
mov ecx, 0x80004005
call fcn.140011b60
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x70], rbx
lea rdx, [0x140296e0c]
test rdx, 0xffffffffffff0000
jne 0x1400466b1
movzx edi, dx
mov ecx, edi
call fcn.140068f14
test rax, rax
je 0x1400466c3
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140011830
jmp 0x1400466be
xor r8d, r8d
lea rcx, [rsp + 0x70]
call fcn.140011b80
mov rbx, qword [rsp + 0x70]
call fcn.1400694ec
mov rdx, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x1400466e3
mov ecx, 0x80004005
call fcn.140011b60
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x78], rdi
lea rbp, [r13 + 0x58]
lea rdx, str.__AdminImage_InstallFile
mov rcx, rbp
call qword [sym.imp.SetupXML.dll_public:_long_int___cdecl_CXMLFileManagerInterface::Select_wchar_t_const____ptr64____ptr64]
mov esi, eax
test eax, eax
jle 0x140046962
mov r8, qword [r13 + 0x48]
test r8, r8
je 0x1400467a4
lea rdx, str.ICARollbackAdmin1
mov ecx, 0x93000000
call r8
lea rdx, str.1:_0_2:_0_3:_0_4:_1
lea rcx, [rsp + 0x78]
call fcn.140011640
mov r8, qword [rsp + 0x78]
lea rdx, [0x1402962b4]
mov ecx, 0xa000000
call qword [r13 + MsiGetSummaryInformationW]
mov r8d, esi
lea rdx, str.1:_0_2:__d_3:_0_4:_0
lea rcx, [rsp + 0x78]
call fcn.140011640
mov r8, qword [rsp + 0x78]
lea rdx, [0x1402962b4]
mov ecx, 0xa000000
call qword [r13 + MsiGetSummaryInformationW]
lea rdx, str.1:_2_2:_1_3:_0_4:_0
lea rcx, [rsp + 0x78]
call fcn.140011640
mov r8, qword [rsp + 0x78]
lea rdx, [0x1402962b4]
mov ecx, 0xa000000
call qword [r13 + MsiGetSummaryInformationW]
lea rax, [r13 + 0x50]
lea rdx, [rsp + 0x80]
mov rcx, rax
call fcn.140051790
nop
mov r14, qword [rax]
lea rcx, [r14 - 0x18]
lea rdi, [rbx - 0x18]
cmp rcx, rdi
je 0x1400468db
cmp dword [rdi + 0x10], 0
jl 0x140046805
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140046805
call fcn.1400116e0
mov rbx, rax
lock add dword [rdi + 0x10], 0xffffffff
jg 0x1400467f7
mov rcx, qword [rdi]
mov r8, qword [rcx]
mov rdx, rdi
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x70], rax
jmp 0x1400468db
movsxd rsi, dword [r14 - 0x10]
test esi, esi
jne 0x14004685e
mov rsi, qword [rdi]
cmp dword [rdi + 8], 0
je 0x1400468db
cmp dword [rdi + 0x10], 0
jge 0x140046837
cmp dword [rbx - 0xc], 0
jl 0x140046931
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
jmp 0x1400468db
lock add dword [rdi + 0x10], 0xffffffff
jg 0x14004684a
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x70], rax
jmp 0x1400468db
test r14, r14
je 0x140046952
mov r12d, dword [rbx - 0x10]
mov rbp, r14
sub rbp, rbx
sar rbp, 1
test esi, esi
js 0x140046947
mov ecx, 1
sub ecx, dword [rdi + 0x10]
mov eax, dword [rdi + 0xc]
sub eax, esi
or eax, ecx
jge 0x14004689e
mov edx, esi
lea rcx, [rsp + 0x70]
call fcn.140011b00
mov rbx, qword [rsp + 0x70]
lea rdi, [rsi + rsi]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
mov r9, rdi
add rdx, rdx
cmp rbp, r12
ja 0x1400468bf
lea r8, [rbx + rbp*2]
call fcn.1401f366c
jmp 0x1400468c7
mov r8, r14
call fcn.1401f3588
cmp esi, dword [rbx - 0xc]
jg 0x14004693c
mov dword [rbx - 0x10], esi
xor r12d, r12d
mov word [rdi + rbx], r12w
lea rbp, [r13 + 0x58]
mov rdx, qword [rsp + 0x80]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400468f7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [r13 + 0x48]
mov rbx, qword [rsp + 0x70]
test rax, rax
je 0x140046916
mov r8, rbx
lea rdx, [0x1402962b4]
mov ecx, 0x9000000
call rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rbp
call qword [sym.imp.SetupXML.dll_public:_long_int___cdecl_CXMLFileManagerInterface::CounterNext_void____ptr64]
test eax, eax
je 0x14004695d
jmp 0x1400467a4
mov ecx, 0x80070057
call fcn.140011b60
int3
mov ecx, 0x80070057
call fcn.140011b60
int3
mov ecx, 0x80070057
call fcn.140011b60
int3
mov ecx, 0x80070057
call fcn.140011b60
nop
mov rdi, qword [rsp + 0x78]
lea rdx, [rdi - 0x18]
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140046977
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140046990
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret