Function at 0x4065eb
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 0x41c9ea
mov eax, dword fs:[0]
push eax
mov eax, 0x32e8
call fcn.0041be80
mov eax, dword [0x42800c]
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 - 0x32e1], dl
mov dword [ebp - 0x32f0], ecx
xor eax, eax
lea edi, [ebp - 0x32e0]
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.0040c260
mov ebx, esi
mov dword [ebp - 0x3054], esi
mov dword [ebp - 0x3058], ebx
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], esi
push esi
push eax
call fcn.0040c260
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.0040fb08
mov esi, eax
add esp, 0x1c
or edi, 0xffffffff
test esi, esi
je 0x4067c7
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x4067c7
test al, 0x10
je 0x4067c7
lea eax, [ebp - 0x420]
push eax
push ebx
push str.Squirrel
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4067c7
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 0x4067c7
push esi
push 0x424ad8
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00406fb2
add esp, 0x10
xor esi, esi
push str.SquirrelTemp
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0040d1d1
add esp, 0xc
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4068b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4068b6
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 - 0x3040]
push 0x1000
push eax
call fcn.00406fb2
add esp, 0x10
cmp byte [ebp - 0x32e1], 0
je 0x4067b3
lea eax, [ebp - 0x3040]
push eax
lea ecx, [ebp - 0x32ec]
call fcn.004021ed
xor edx, edx
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.00406104
lea ecx, [ebp - 0x32ec]
mov byte [ebp - 4], 1
call fcn.00401e11
cmp byte [ebp - 0x32e1], 0
jne 0x406c26
mov ecx, dword [ebp - 0x32f0]
mov dl, 1
call fcn.004065eb
mov edi, eax
jmp 0x406c54
xor esi, esi
cmp byte [ebp - 0x32e1], 0
jne 0x4067e9
lea eax, [ebp - 0x218]
push eax
push esi
push esi
push 0x1c
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x40670f
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 - 0x1040]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea eax, [ebp - 0x1040]
push eax
lea eax, [ebp - 0x830]
push eax
push str._s_s
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00406fb2
add esp, 0x14
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40670f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40670f
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 - 0x3040]
push 0x1000
push eax
call fcn.00406fb2
add esp, 0x10
lea eax, [ebp - 0x3040]
lea ecx, [ebp - 0x32f0]
push eax
call fcn.004021ed
xor edx, edx
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.00406104
lea ecx, [ebp - 0x32f0]
call fcn.00401e11
jmp 0x406c54
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xc40]
push str._sSquirrelSetup.log
push eax
call fcn.00406d54
add esp, 0xc
push 0x424bd4
push 0x83
push dword [0x428b00]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x3054], esi
test esi, esi
je 0x4067a6
push esi
push dword [0x428b00]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x3058], ebx
test ebx, ebx
jne 0x40691b
and dword [ebp - 0x3054], eax
jmp 0x4067a6
push esi
push dword [0x428b00]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, 0x100
jb 0x4067a6
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00405fbd
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40695c
mov dword [0x429670], 0x10000
jmp 0x406981
cmp dword [esi], 1
je 0x40696d
mov dword [0x429670], 0x80000
jmp 0x406981
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x218]
push eax
call fcn.004055f1
mov dword [0x429670], eax
xor ecx, ecx
mov dword [ebp - 0x32ec], ecx
and dword [ebp - 0x32d0], 0
xor eax, eax
and dword [ebp - 0x30a4], eax
mov word [ebp - 0x32cc], ax
test esi, esi
je 0x406a8b
cmp dword [esi], 1
jne 0x406a7f
lea eax, [ebp - 0x32d0]
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.0040564f
mov dword [ebp - 0x32e8], eax
mov dword [0x429670], eax
test eax, eax
je 0x4069da
cmp eax, 0x600
jne 0x406a95
lea eax, [ebp - 0x32cc]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push str._s_s
push eax
call fcn.00406d54
add esp, 0x10
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x32ec]
lea eax, [ebp - 0x32cc]
push ecx
push ecx
push eax
mov ecx, esi
call fcn.00406088
add esp, 0xc
test eax, eax
jne 0x406a95
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x32f4]
call fcn.004021ed
push eax
lea ecx, [ebp - 0x304c]
mov byte [ebp - 4], 4
call fcn.00406d85
lea ecx, [ebp - 0x32f4]
mov byte [ebp - 4], 1
call fcn.00401e11
mov ecx, dword [ebp - 0x32ec]
mov eax, dword [ebp - 0x32e8]
inc ecx
mov dword [ebp - 0x32ec], ecx
cmp eax, 0x600
je 0x406989
test eax, eax
je 0x406989
jmp 0x406a95
mov dword [0x429670], 0x80000
jmp 0x406a95
mov dword [0x429670], 0x10000
mov ecx, esi
call fcn.004060b7
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
push 0x424be0
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.00406d54
add esp, 0x10
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x4067a6
mov esi, dword [ebp - 0x32f0]
mov dword [ebp - 0x30a0], 0x44
mov dword [ebp - 0x3074], 1
push 5
pop eax
mov word [ebp - 0x3070], ax
test esi, esi
je 0x406b20
push 0x104
push esi
call fcn.0040fc3a
pop ecx
pop ecx
cmp eax, 1
jae 0x406b2b
mov esi, 0x422fd8
mov dword [ebp - 0x32f0], esi
push esi
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0xa38]
push str.__s____install_.__s
push eax
call fcn.00406d54
add esp, 0x10
lea eax, [ebp - 0x32e0]
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 0x4067a6
push edi
push dword [ebp - 0x32e0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x3050]
push eax
push dword [ebp - 0x32e0]
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 0x406bda
push str.There_was_an_error_while_installing_the_application._Check_the_setup_log_for_more_information_and_contact_the_author.
lea ecx, [ebp - 0x32e8]
call fcn.004021ed
lea edx, [ebp - 0xc40]
mov byte [ebp - 4], 5
mov ecx, eax
call fcn.00406104
lea ecx, [ebp - 0x32e8]
call fcn.00401e11
mov eax, dword [ebp - 0x3048]
mov ecx, dword [ebp - 0x304c]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x406c0e
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 0x406bef
push dword [ebp - 0x32e0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x32dc]
call esi
jmp 0x406c4e
push str.Failed_to_extract_installer
lea ecx, [ebp - 0x32e8]
call fcn.004021ed
xor edx, edx
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.00406104
lea ecx, [ebp - 0x32e8]
call fcn.00401e11
mov edi, dword [ebp - 0x3050]
mov esi, dword [ebp - 0x304c]
test esi, esi
je 0x406caa
mov eax, dword [ebp - 0x3048]
cmp esi, eax
je 0x406c84
mov ebx, eax
mov ecx, esi
call fcn.00401e11
add esi, 4
cmp esi, ebx
jne 0x406c6a
mov esi, dword [ebp - 0x304c]
mov ebx, dword [ebp - 0x3058]
mov eax, dword [ebp - 0x3044]
sub eax, esi
sar eax, 2
push eax
push esi
call fcn.00406d0f
xor eax, eax
mov dword [ebp - 0x304c], eax
mov dword [ebp - 0x3048], eax
mov dword [ebp - 0x3044], eax
test ebx, ebx
je 0x406cb5
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.00409765
mov esp, ebp
pop ebp
ret