Function at 0x140046050
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x220]
sub rsp, 0x320
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rsp + 0x360], rbx
mov rax, qword [0x14011d8d0]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov qword [rsp + 0x70], r9
mov qword [rbp - 0x18], r8
mov r14d, edx
mov rax, qword [rbp + 0x280]
mov qword [rsp + 0x58], rax
xor r12d, r12d
mov word [rbp], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 2]
call sub.MSVCR100.dll_memset
xor r9d, r9d
lea r8d, [r12 + 0x23]
lea rdx, [rbp]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp eax, 1
sete dil
mov byte [rsp + 0x20], dil
test dil, dil
je 0x1400468d0
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
lea rax, [rbp]
lea r13, [rbp]
shr r13, 0x10
mov qword [rsp + 0x38], r13
lea r15d, [r12 + 1]
or rsi, 0xffffffffffffffff
test r13, r13
jne 0x14004614e
movzx edi, ax
xor edx, edx
mov ecx, edi
call fcn.1400017e0
test rax, rax
je 0x14004624c
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140001f70
mov rbx, qword [rsp + 0x30]
jmp 0x14004624c
xor eax, eax
mov rcx, rsi
lea rdi, [rbp]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x1400461c6
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x14004624c
cmp dword [rdx + 0x10], eax
jge 0x140046199
cmp dword [rbx - 0xc], eax
jge 0x14004618c
mov ecx, 0x80070057
call fcn.140001000
int3
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
jmp 0x14004624c
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400461af
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
jmp 0x14004624c
mov r13d, dword [rbx - 0x10]
lea r12, [rbp]
sub r12, rbx
sar r12, 1
test ecx, ecx
jns 0x1400461e3
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, r15d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140046203
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140001c20
mov rbx, qword [rsp + 0x30]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r12, r13
lea r13, [rax + rax]
mov r9, r13
ja 0x140046228
lea r8, [rbx + r12*2]
call qword [sym.imp.MSVCR100.dll_memmove_s]
jmp 0x140046232
lea r8, [rbp]
call qword [sym.imp.MSVCR100.dll_memcpy_s]
cmp edi, dword [rbx - 0xc]
jg 0x1400468c5
mov dword [rbx - 0x10], edi
xor r12d, r12d
mov word [r13 + rbx], r12w
mov r13, qword [rsp + 0x38]
lea r8, str.Sony_CorporationVAIO_Update
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.140002ce0
nop
lea r8, str.LocalUpdateInfo
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.140002ce0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x1400462d0
cmp dword [rbx + 0x10], 0
jl 0x1400462c1
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x1400462c1
call fcn.140001b90
mov rdi, rax
mov ecx, esi
lock xadd dword [rbx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400462b6
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + 8]
lea rax, [rdi + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x1400462d0
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140001e80
nop
mov rdx, qword [rbp - 0x60]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400462ef
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004630e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1400463cc
mov r12d, dword [rdi - 0x10]
lea ebx, [r12 + 1]
test ebx, ebx
jns 0x14004633c
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, r15d
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, ebx
or eax, ecx
jge 0x14004635c
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.140001c20
mov rdi, qword [rsp + 0x30]
mov rax, r12
xor r12d, r12d
mov word [rdi + rax*2], r12w
cmp ebx, dword [rdi - 0xc]
jg 0x1400463c1
mov dword [rdi - 0x10], ebx
movsxd rax, ebx
mov word [rdi + rax*2], r12w
xor eax, eax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rax
mov eax, 0x614
mov word [rbp - 0x30], ax
mov qword [rbp - 0x28], r12
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x20], r12
mov qword [rbp - 0x40], rdi
mov qword [rbp - 0x38], r12
mov dword [rbp - 0x48], 3
lea rcx, [rbp - 0x50]
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
jmp 0x1400463cc
mov ecx, 0x80070057
call fcn.140001000
int3
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
lea rax, [rbp]
test r13, r13
jne 0x14004641e
movzx edi, ax
xor edx, edx
mov ecx, edi
call fcn.1400017e0
test rax, rax
je 0x140046512
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140001f70
mov rbx, qword [rsp + 0x28]
jmp 0x140046512
xor eax, eax
mov rcx, rsi
lea rdi, [rbp]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140046493
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140046512
cmp dword [rdx + 0x10], eax
jge 0x140046469
cmp dword [rbx - 0xc], eax
jge 0x14004645c
mov ecx, 0x80070057
call fcn.140001000
int3
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
jmp 0x140046512
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004647f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
jmp 0x140046512
mov r13d, dword [rbx - 0x10]
lea r12, [rbp]
sub r12, rbx
sar r12, 1
test ecx, ecx
jns 0x1400464b0
mov ecx, 0x80070057
call fcn.140001000
int3
sub r15d, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, ecx
or eax, r15d
jge 0x1400464cf
mov edx, ecx
lea rcx, [rsp + 0x28]
call fcn.140001c20
mov rbx, qword [rsp + 0x28]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r12, r13
lea r13, [rax + rax]
mov r9, r13
ja 0x1400464f4
lea r8, [rbx + r12*2]
call qword [sym.imp.MSVCR100.dll_memmove_s]
jmp 0x1400464fe
lea r8, [rbp]
call qword [sym.imp.MSVCR100.dll_memcpy_s]
cmp edi, dword [rbx - 0xc]
jg 0x1400468ba
mov dword [rbx - 0x10], edi
xor eax, eax
mov word [r13 + rbx], ax
lea r8, str.Sony_CorporationVAIO_Update
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x60]
call fcn.140002ce0
nop
lea r8, str.LocalUpdateInfo_V2.0
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.140002ce0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x140046596
cmp dword [rbx + 0x10], 0
jl 0x140046587
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140046587
call fcn.140001b90
mov rdi, rax
mov ecx, esi
lock xadd dword [rbx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x14004657c
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + 8]
lea rax, [rdi + 0x18]
mov qword [rsp + 0x28], rax
jmp 0x140046596
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x28]
call fcn.140001e80
nop
mov rdx, qword [rbp - 0x70]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400465b5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400465d4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [rsp + 0x28]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1400465f1
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
dec r14d
je 0x140046685
dec r14d
je 0x140046676
dec r14d
je 0x140046622
xor dil, dil
jmp 0x140046860
mov rdx, qword [rbp - 0x18]
mov rdx, qword [rdx]
lea rcx, [rdx - 0x18]
lea rdi, [rax - 0x18]
cmp rcx, rdi
je 0x14004669c
cmp dword [rdi + 0x10], 0
jl 0x140046670
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140046670
call fcn.140001b90
mov rbx, rax
mov ecx, esi
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140046665
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x38], rax
jmp 0x14004669c
mov r8d, dword [rdx - 0x10]
jmp 0x140046692
mov r8d, 0xa
lea rdx, str.VAIOUpdate
jmp 0x140046692
mov r8d, 7
lea rdx, str.Machine
lea rcx, [rsp + 0x38]
call fcn.140001e80
lea r8, str.UpdateInfo
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x48]
call fcn.140002ce0
nop
lea r8, [0x1400e0818]
mov rdx, rax
lea rcx, [rbp - 0x58]
call fcn.140002ce0
nop
lea r8, [rsp + 0x38]
mov rdx, rax
lea rcx, [rbp - 0x80]
call fcn.140008ad0
nop
lea r8, str..dat
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140002ce0
nop
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call fcn.140002250
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004671c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rbp - 0x80]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004673b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004675a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140046779
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea r8, str.UpdateInfoIndex
lea rdx, [rsp + 0x28]
lea rcx, [rbp - 0x68]
call fcn.140002ce0
nop
lea r8, [0x1400e0818]
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.140002ce0
nop
lea r8, [rsp + 0x38]
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140008ad0
nop
lea r8, str..dat
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140002ce0
nop
mov rdx, rax
mov rcx, qword [rsp + 0x58]
call fcn.140002250
nop
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400467f9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140046819
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140046838
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rbp - 0x68]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140046856
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
movzx edi, byte [rsp + 0x20]
mov rax, qword [rsp + 0x38]
lea rdx, [rax - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004687b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x28]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004689b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x1400468d0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x1400468d0
mov ecx, 0x80070057
call fcn.140001000
nop
mov ecx, 0x80070057
call fcn.140001000
nop
movzx eax, dil
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.1400cafa0
mov rbx, qword [rsp + 0x360]
add rsp, 0x320
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret