Function at 0x4066b1
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
push 0xffffffffffffffff
push 0x41d513
mov eax, dword fs:[0]
push eax
mov eax, 0x30b8
call fcn.0041cf10
mov eax, dword [0x429008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x30b1], dl
mov dword [ebp - 0x30c0], ecx
xor eax, eax
lea edi, [ebp - 0x30b0]
stosd dword es:[edi], eax
xor esi, esi
push 0x44
push esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x30a0]
push eax
call fcn.0040bfc0
xorps xmm0, xmm0
mov ebx, esi
movlpd qword [ebp - 0x3058], xmm0
mov dword [ebp - 0x3058], ebx
mov dword [ebp - 0x3054], esi
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], esi
push esi
push eax
call fcn.0040bfc0
xor eax, eax
lea edi, [ebp - 0x304c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x304c], esi
mov dword [ebp - 0x3048], esi
mov dword [ebp - 0x3044], esi
push str.SQUIRREL_TEMP
mov byte [ebp - 4], 1
call fcn.00410b21
mov esi, eax
add esp, 0x1c
or edi, 0xffffffff
test esi, esi
je 0x406898
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x406898
test al, 0x10
je 0x406898
lea eax, [ebp - 0x420]
push eax
push ebx
push str.Squirrel
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x406898
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsUNCW]
test eax, eax
jne 0x406898
push esi
push 0x425c00
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004070f6
add esp, 0x10
xor esi, esi
push str.SquirrelTemp
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0040e1cf
add esp, 0xc
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x406987
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406987
lea eax, [ebp - 0x218]
push eax
push str.Unable_to_write_to__s___IT_policies_may_be_restricting_access_to_this_folder
lea eax, [ebp - 0x2c40]
push 0x1000
push eax
call fcn.004070f6
add esp, 0x10
cmp byte [ebp - 0x30b1], 0
je 0x406884
lea eax, [ebp - 0x2c40]
push eax
lea ecx, [ebp - 0x30bc]
call fcn.00402255
xor edx, edx
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.004061d0
lea ecx, [ebp - 0x30bc]
mov byte [ebp - 4], 1
call fcn.00401e7b
cmp byte [ebp - 0x30b1], 0
jne 0x406d18
mov ecx, dword [ebp - 0x30c0]
mov dl, 1
call fcn.004066b1
mov edi, eax
jmp 0x406d46
xor esi, esi
cmp byte [ebp - 0x30b1], 0
jne 0x4068ba
lea eax, [ebp - 0x218]
push eax
push esi
push esi
push 0x1c
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x4067e0
lea eax, [ebp - 0x830]
mov dword [ebp - 0x305c], 0x200
push eax
push esi
push esi
push 0x23
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x305c]
push eax
lea eax, [ebp - 0x3040]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea eax, [ebp - 0x3040]
push eax
lea eax, [ebp - 0x830]
push eax
push str._s_s
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004070f6
add esp, 0x14
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4067e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4067e0
lea eax, [ebp - 0x218]
push eax
push str.Unable_to_write_to__s___IT_policies_may_be_restricting_access_to_this_folder
lea eax, [ebp - 0x2c40]
push 0x1000
push eax
call fcn.004070f6
add esp, 0x10
lea eax, [ebp - 0x2c40]
lea ecx, [ebp - 0x30c0]
push eax
call fcn.00402255
xor edx, edx
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.004061d0
lea ecx, [ebp - 0x30c0]
call fcn.00401e7b
jmp 0x406d46
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xc40]
push str._sSquirrelSetup.log
push eax
call fcn.00406e34
add esp, 0xc
push str.DATA
push 0x83
push dword [0x429bdc]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x3054], esi
test esi, esi
je 0x406877
push esi
push dword [0x429bdc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x3058], ebx
test ebx, ebx
jne 0x4069ec
and dword [ebp - 0x3054], eax
jmp 0x406877
push esi
push dword [0x429bdc]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, 0x100
jb 0x406877
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00406089
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x406a2d
mov dword [0x42a720], 0x10000
jmp 0x406a52
cmp dword [esi], 1
je 0x406a3e
mov dword [0x42a720], 0x80000
jmp 0x406a52
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x218]
push eax
call fcn.004056a9
mov dword [0x42a720], eax
xor ecx, ecx
mov dword [ebp - 0x30bc], ecx
and dword [ebp - 0xe70], 0
xor eax, eax
and dword [ebp - 0xc44], eax
mov word [ebp - 0xe6c], ax
test esi, esi
je 0x406b7d
cmp dword [esi], 1
jne 0x406b71
lea eax, [ebp - 0xe70]
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.00405707
mov dword [ebp - 0x30b8], eax
mov dword [0x42a720], eax
test eax, eax
je 0x406aab
cmp eax, 0x600
jne 0x406b87
lea eax, [ebp - 0xe6c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push str._s_s
push eax
call fcn.00406e34
add esp, 0x10
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x30bc]
lea eax, [ebp - 0xe6c]
push ecx
push ecx
push eax
mov ecx, esi
call fcn.00406154
add esp, 0xc
test eax, eax
jne 0x406b87
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x30c4]
call fcn.00402255
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x3048]
push eax
cmp dword [ebp - 0x3044], ecx
je 0x406b2e
call fcn.004070c5
add dword [ebp - 0x3048], 4
jmp 0x406b3a
push ecx
lea ecx, [ebp - 0x304c]
call fcn.00406e65
lea ecx, [ebp - 0x30c4]
mov byte [ebp - 4], 1
call fcn.00401e7b
mov ecx, dword [ebp - 0x30bc]
mov eax, dword [ebp - 0x30b8]
inc ecx
mov dword [ebp - 0x30bc], ecx
cmp eax, 0x600
je 0x406a5a
test eax, eax
je 0x406a5a
jmp 0x406b87
mov dword [0x42a720], 0x80000
jmp 0x406b87
mov dword [0x42a720], 0x10000
mov ecx, esi
call fcn.00406183
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
push str.Update.exe
lea eax, [ebp - 0x218]
xor ebx, ebx
and dword [ebp - 0x3054], ebx
push eax
lea eax, [ebp - 0x628]
mov dword [ebp - 0x3058], ebx
push str._s_s
push eax
call fcn.00406e34
add esp, 0x10
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x406877
mov esi, dword [ebp - 0x30c0]
mov dword [ebp - 0x30a0], 0x44
mov dword [ebp - 0x3074], 1
push 5
pop eax
mov word [ebp - 0x3070], ax
test esi, esi
je 0x406c12
push 0x104
push esi
call fcn.00410c53
pop ecx
pop ecx
cmp eax, 1
jae 0x406c1d
mov esi, 0x424100
mov dword [ebp - 0x30c0], esi
push esi
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0xa38]
push str.__s____install_.__s
push eax
call fcn.00406e34
add esp, 0x10
lea eax, [ebp - 0x30b0]
xor esi, esi
push eax
lea eax, [ebp - 0x30a0]
push eax
lea eax, [ebp - 0x218]
push eax
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0xa38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x406877
push edi
push dword [ebp - 0x30b0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x3050]
push eax
push dword [ebp - 0x30b0]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [ebp - 0x3050]
test eax, eax
cmove ecx, edi
mov dword [ebp - 0x3050], ecx
test ecx, ecx
je 0x406ccc
push str.There_was_an_error_while_installing_the_application._Check_the_setup_log_for_more_information_and_contact_the_author.
lea ecx, [ebp - 0x30b8]
call fcn.00402255
lea edx, [ebp - 0xc40]
mov byte [ebp - 4], 5
mov ecx, eax
call fcn.004061d0
lea ecx, [ebp - 0x30b8]
call fcn.00401e7b
mov eax, dword [ebp - 0x3048]
mov ecx, dword [ebp - 0x304c]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x406d00
push dword [ecx + esi*4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x3048]
inc esi
mov ecx, dword [ebp - 0x304c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x406ce1
push dword [ebp - 0x30b0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x30ac]
call esi
jmp 0x406d40
push str.Failed_to_extract_installer
lea ecx, [ebp - 0x30b8]
call fcn.00402255
xor edx, edx
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.004061d0
lea ecx, [ebp - 0x30b8]
call fcn.00401e7b
mov edi, dword [ebp - 0x3050]
mov esi, dword [ebp - 0x304c]
test esi, esi
je 0x406d9c
mov eax, dword [ebp - 0x3048]
cmp esi, eax
je 0x406d76
mov ebx, eax
mov ecx, esi
call fcn.00401e7b
add esi, 4
cmp esi, ebx
jne 0x406d5c
mov esi, dword [ebp - 0x304c]
mov ebx, dword [ebp - 0x3058]
mov edx, dword [ebp - 0x3044]
mov ecx, esi
sub edx, esi
and edx, 0xfffffffc
call fcn.00406fed
xor eax, eax
mov dword [ebp - 0x304c], eax
mov dword [ebp - 0x3048], eax
mov dword [ebp - 0x3044], eax
test ebx, ebx
je 0x406da7
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040a35c
leave
ret