Function at 0x4064ce
Capabilities:
Create directory
Create process on windows
Delete file
Extract resource via kernel32 functions
Get common file path
Get file attributes
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41ae23
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2ebc
call fcn.00415d80
mov eax, dword [0x427280]
xor eax, esp
mov dword [esp + 0x2eb8], eax
push ebx
push esi
push edi
mov eax, dword [0x427280]
xor eax, esp
push eax
lea eax, [esp + 0x2ed0]
mov dword fs:[0], eax
mov byte [esp + 0x17], dl
mov dword [esp + 0x20], ecx
and dword [esp + 0x54], 0
lea eax, [esp + 0x58]
push 0x40
xorps xmm0, xmm0
push 0
push eax
movdqu xmmword [esp + 0x34], xmm0
call fcn.0040a610
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x2ed8], ecx
lea edi, [esp + 0x44]
xor eax, eax
mov ebx, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], ecx
mov byte [esp + 0x2ed8], 1
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esp + 0x17], cl
jne 0x40664f
lea eax, [esp + 0x9c]
push eax
push ecx
push ecx
push 0x1c
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.SquirrelTemp
lea eax, [esp + 0xa0]
push 0x104
push eax
call fcn.00409869
add esp, 0xc
lea eax, [esp + 0x9c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40672d
call esi
cmp eax, 0xb7
je 0x40672d
lea eax, [esp + 0x9c]
push eax
push str.Unable_to_write_to__s___IT_policies_may_be_restricting_access_to_this_folder
lea eax, [esp + 0xecc]
push 0x1000
push eax
call fcn.0040a038
add esp, 0x10
cmp byte [esp + 0x17], 0
je 0x40663d
lea eax, [esp + 0xec4]
push eax
lea ecx, [esp + 0x3c]
call fcn.0040250c
xor edx, edx
mov byte [esp + 0x2ed8], 3
mov ecx, eax
call fcn.00405f35
lea ecx, [esp + 0x38]
mov byte [esp + 0x2ed8], 1
call fcn.00401dc4
cmp byte [esp + 0x17], 0
jne 0x406aec
mov ecx, dword [esp + 0x20]
mov dl, 1
call fcn.004064ce
mov esi, eax
jmp 0x406b20
lea eax, [esp + 0x2a4]
mov dword [esp + 0x38], 0x200
push eax
push ecx
push ecx
push 0x23
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x4b0]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
call esi
lea eax, [esp + 0x4ac]
push eax
lea eax, [esp + 0x2a8]
push eax
push str._s_s
lea eax, [esp + 0xa8]
push 0x104
push eax
call fcn.0040a038
add esp, 0x14
lea eax, [esp + 0x9c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x406597
call esi
cmp eax, 0xb7
je 0x406597
lea eax, [esp + 0x9c]
push eax
push str.Unable_to_write_to__s___IT_policies_may_be_restricting_access_to_this_folder
lea eax, [esp + 0xecc]
push 0x1000
push eax
call fcn.0040a038
add esp, 0x10
lea eax, [esp + 0xec4]
lea ecx, [esp + 0x20]
push eax
call fcn.0040250c
xor edx, edx
mov byte [esp + 0x2ed8], 2
mov ecx, eax
call fcn.00405f35
lea ecx, [esp + 0x20]
mov byte [esp + 0x2ed8], 1
call fcn.00401dc4
or dword [esp + 0x18], 0xffffffff
jmp 0x406ae6
lea eax, [esp + 0x9c]
push eax
lea eax, [esp + 0xcc0]
push str._sSquirrelSetup.log
push eax
call fcn.00406cc7
add esp, 0xc
push 0x423a54
push 0x83
push dword [0x4285c8]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [esp + 0x40], esi
test esi, esi
je 0x406632
push esi
push dword [0x4285c8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [esp + 0x3c], eax
test eax, eax
jne 0x40678c
and dword [esp + 0x40], eax
jmp 0x406632
push esi
push dword [0x4285c8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, 0x100
jb 0x406632
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00405dec
mov esi, eax
mov dword [esp + 0x40], esi
pop ecx
pop ecx
test esi, esi
jne 0x4067d4
mov dword [0x4294f0], 0x10000
jmp 0x4067fa
cmp dword [esi], 1
je 0x4067e5
mov dword [0x4294f0], 0x80000
jmp 0x4067fa
mov ecx, dword [esi + 4]
lea eax, [esp + 0x9c]
push eax
call fcn.00405409
mov dword [0x4294f0], eax
xor ecx, ecx
mov dword [esp + 0x18], ecx
and dword [esp + 0x4ac], 0
xor eax, eax
and dword [esp + 0x6d8], eax
mov word [esp + 0x4b0], ax
test esi, esi
je 0x406954
cmp dword [esi], 1
jne 0x406948
lea eax, [esp + 0x4ac]
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.00405467
mov dword [esp + 0x1c], eax
mov dword [0x4294f0], eax
test eax, eax
je 0x406853
cmp eax, 0x600
jne 0x40695e
lea eax, [esp + 0x4b0]
push eax
lea eax, [esp + 0xa0]
push eax
lea eax, [esp + 0x2ac]
push str._s_s
push eax
call fcn.00406cc7
add esp, 0x10
lea eax, [esp + 0x2a4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x4b0]
push ecx
push ecx
push eax
mov ecx, esi
call fcn.00405eba
add esp, 0xc
test eax, eax
jne 0x40695e
lea eax, [esp + 0x2a4]
push eax
lea ecx, [esp + 0x28]
call fcn.0040250c
mov esi, eax
mov byte [esp + 0x2ed8], 4
cmp esi, edi
jae 0x4068ec
cmp ebx, esi
ja 0x4068ec
sub esi, ebx
sar esi, 2
cmp edi, dword [esp + 0x4c]
jne 0x4068e6
push ecx
lea ecx, [esp + 0x48]
call fcn.00406bb8
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
lea eax, [ebx + esi*4]
push eax
jmp 0x406905
cmp edi, dword [esp + 0x4c]
jne 0x406904
push ecx
lea ecx, [esp + 0x48]
call fcn.00406bb8
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
push esi
push edi
call fcn.00406ce4
add edi, 4
mov byte [esp + 0x2ed8], 1
lea ecx, [esp + 0x24]
mov dword [esp + 0x48], edi
call fcn.00401dc4
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
inc ecx
mov esi, dword [esp + 0x38]
mov dword [esp + 0x18], ecx
cmp eax, 0x600
je 0x406800
test eax, eax
jne 0x40695e
jmp 0x406800
mov dword [0x4294f0], 0x80000
jmp 0x40695e
mov dword [0x4294f0], 0x10000
mov ecx, esi
call fcn.00405eeb
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
and dword [esp + 0x3c], 0
lea eax, [esp + 0x9c]
and dword [esp + 0x40], 0
push str.Update.exe
push eax
lea eax, [esp + 0x8b4]
push str._s_s
push eax
call fcn.00406cc7
add esp, 0x10
lea eax, [esp + 0x8ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ecx, 0xffffffff
cmp eax, ecx
je 0x406632
mov esi, dword [esp + 0x20]
mov dword [esp + 0x54], 0x44
mov dword [esp + 0x80], 1
push 5
pop eax
mov word [esp + 0x84], ax
test esi, esi
je 0x4069ec
push 0x104
push esi
call fcn.0040a124
pop ecx
pop ecx
cmp eax, 1
jae 0x4069f5
mov esi, 0x421e80
mov dword [esp + 0x20], esi
push esi
lea eax, [esp + 0x8b0]
push eax
lea eax, [esp + 0xabc]
push str.__s____install_.__s
push eax
call fcn.00406cc7
add esp, 0x10
lea eax, [esp + 0x28]
xor ecx, ecx
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0xa4]
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
lea eax, [esp + 0xad4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x406632
or esi, 0xffffffff
push esi
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x50]
test eax, eax
cmove ecx, esi
mov dword [esp + 0x50], ecx
test ecx, ecx
je 0x406aa6
push str.There_was_an_error_while_installing_the_application._Check_the_setup_log_for_more_information_and_contact_the_author.
lea ecx, [esp + 0x20]
call fcn.0040250c
lea edx, [esp + 0xcbc]
mov byte [esp + 0x2ed8], 5
mov ecx, eax
call fcn.00405f35
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2ed8], 1
call fcn.00401dc4
and dword [esp + 0x1c], 0
mov esi, edi
sub esi, ebx
sar esi, 2
test esi, esi
je 0x406acc
mov edi, dword [esp + 0x1c]
push dword [ebx + edi*4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
inc edi
cmp edi, esi
jb 0x406aba
mov edi, dword [esp + 0x48]
push dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x2c]
call esi
mov eax, dword [esp + 0x50]
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x18]
jmp 0x406b24
push str.Failed_to_extract_installer
lea ecx, [esp + 0x20]
call fcn.0040250c
xor edx, edx
mov byte [esp + 0x2ed8], 6
mov ecx, eax
call fcn.00405f35
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2ed8], 1
call fcn.00401dc4
mov esi, dword [esp + 0x50]
mov dword [esp + 0x18], esi
mov byte [esp + 0x2ed8], 0
test ebx, ebx
je 0x406b4f
mov esi, ebx
cmp ebx, edi
je 0x406b44
mov ecx, esi
call fcn.00401dc4
add esi, 4
cmp esi, edi
jne 0x406b36
push ebx
call fcn.00409467
mov esi, dword [esp + 0x1c]
pop ecx
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x406b5e
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
mov ecx, dword [esp + 0x2ed0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2eb8]
xor ecx, esp
call fcn.0040946c
mov esp, ebp
pop ebp
ret