Function at 0x406633
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 0x41ca2a
mov eax, dword fs:[0]
push eax
mov eax, 0x32e8
call fcn.0041bec0
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.0040c2a0
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.0040c2a0
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.0040fb79
mov esi, eax
add esp, 0x1c
or edi, 0xffffffff
test esi, esi
je 0x40680f
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x40680f
test al, 0x10
je 0x40680f
lea eax, [ebp - 0x420]
push eax
push ebx
push str.Squirrel
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x40680f
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 0x40680f
push esi
push 0x424ae0
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00406ffa
add esp, 0x10
xor esi, esi
push str.SquirrelTemp
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0040d242
add esp, 0xc
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4068fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4068fe
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.00406ffa
add esp, 0x10
cmp byte [ebp - 0x32e1], 0
je 0x4067fb
lea eax, [ebp - 0x3040]
push eax
lea ecx, [ebp - 0x32ec]
call fcn.00402235
xor edx, edx
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.0040614c
lea ecx, [ebp - 0x32ec]
mov byte [ebp - 4], 1
call fcn.00401e59
cmp byte [ebp - 0x32e1], 0
jne 0x406c6e
mov ecx, dword [ebp - 0x32f0]
mov dl, 1
call fcn.00406633
mov edi, eax
jmp 0x406c9c
xor esi, esi
cmp byte [ebp - 0x32e1], 0
jne 0x406831
lea eax, [ebp - 0x218]
push eax
push esi
push esi
push 0x1c
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x406757
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.00406ffa
add esp, 0x14
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x406757
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406757
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.00406ffa
add esp, 0x10
lea eax, [ebp - 0x3040]
lea ecx, [ebp - 0x32f0]
push eax
call fcn.00402235
xor edx, edx
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.0040614c
lea ecx, [ebp - 0x32f0]
call fcn.00401e59
jmp 0x406c9c
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xc40]
push str._sSquirrelSetup.log
push eax
call fcn.00406d9c
add esp, 0xc
push 0x424bdc
push 0x83
push dword [0x428b00]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x3054], esi
test esi, esi
je 0x4067ee
push esi
push dword [0x428b00]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x3058], ebx
test ebx, ebx
jne 0x406963
and dword [ebp - 0x3054], eax
jmp 0x4067ee
push esi
push dword [0x428b00]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, 0x100
jb 0x4067ee
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00406005
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4069a4
mov dword [0x429670], 0x10000
jmp 0x4069c9
cmp dword [esi], 1
je 0x4069b5
mov dword [0x429670], 0x80000
jmp 0x4069c9
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x218]
push eax
call fcn.00405639
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 0x406ad3
cmp dword [esi], 1
jne 0x406ac7
lea eax, [ebp - 0x32d0]
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.00405697
mov dword [ebp - 0x32e8], eax
mov dword [0x429670], eax
test eax, eax
je 0x406a22
cmp eax, 0x600
jne 0x406add
lea eax, [ebp - 0x32cc]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push str._s_s
push eax
call fcn.00406d9c
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.004060d0
add esp, 0xc
test eax, eax
jne 0x406add
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x32f4]
call fcn.00402235
push eax
lea ecx, [ebp - 0x304c]
mov byte [ebp - 4], 4
call fcn.00406dcd
lea ecx, [ebp - 0x32f4]
mov byte [ebp - 4], 1
call fcn.00401e59
mov ecx, dword [ebp - 0x32ec]
mov eax, dword [ebp - 0x32e8]
inc ecx
mov dword [ebp - 0x32ec], ecx
cmp eax, 0x600
je 0x4069d1
test eax, eax
je 0x4069d1
jmp 0x406add
mov dword [0x429670], 0x80000
jmp 0x406add
mov dword [0x429670], 0x10000
mov ecx, esi
call fcn.004060ff
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.00406d9c
add esp, 0x10
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x4067ee
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 0x406b68
push 0x104
push esi
call fcn.0040fcab
pop ecx
pop ecx
cmp eax, 1
jae 0x406b73
mov esi, 0x422fe0
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.00406d9c
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 0x4067ee
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 0x406c22
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.00402235
lea edx, [ebp - 0xc40]
mov byte [ebp - 4], 5
mov ecx, eax
call fcn.0040614c
lea ecx, [ebp - 0x32e8]
call fcn.00401e59
mov eax, dword [ebp - 0x3048]
mov ecx, dword [ebp - 0x304c]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x406c56
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 0x406c37
push dword [ebp - 0x32e0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x32dc]
call esi
jmp 0x406c96
push str.Failed_to_extract_installer
lea ecx, [ebp - 0x32e8]
call fcn.00402235
xor edx, edx
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.0040614c
lea ecx, [ebp - 0x32e8]
call fcn.00401e59
mov edi, dword [ebp - 0x3050]
mov esi, dword [ebp - 0x304c]
test esi, esi
je 0x406cf2
mov eax, dword [ebp - 0x3048]
cmp esi, eax
je 0x406ccc
mov ebx, eax
mov ecx, esi
call fcn.00401e59
add esi, 4
cmp esi, ebx
jne 0x406cb2
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.00406d57
xor eax, eax
mov dword [ebp - 0x304c], eax
mov dword [ebp - 0x3048], eax
mov dword [ebp - 0x3044], eax
test ebx, ebx
je 0x406cfd
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.004097ab
mov esp, ebp
pop ebp
ret