Function at 0x406702
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 0x41e013
mov eax, dword fs:[0]
push eax
mov eax, 0x30b8
call fcn.0041da10
mov eax, dword [0x42a008]
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.0040c010
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.0040c010
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.00410e9c
mov esi, eax
add esp, 0x1c
or edi, 0xffffffff
test esi, esi
je 0x4068e9
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x4068e9
test al, 0x10
je 0x4068e9
lea eax, [ebp - 0x420]
push eax
push ebx
push str.Squirrel
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4068e9
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 0x4068e9
push esi
push 0x426c38
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00407147
add esp, 0x10
xor esi, esi
push str.SquirrelTemp
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0040e1d3
add esp, 0xc
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4069d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4069d8
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.00407147
add esp, 0x10
cmp byte [ebp - 0x30b1], 0
je 0x4068d5
lea eax, [ebp - 0x2c40]
push eax
lea ecx, [ebp - 0x30bc]
call fcn.004022a6
xor edx, edx
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.00406221
lea ecx, [ebp - 0x30bc]
mov byte [ebp - 4], 1
call fcn.00401ecc
cmp byte [ebp - 0x30b1], 0
jne 0x406d69
mov ecx, dword [ebp - 0x30c0]
mov dl, 1
call fcn.00406702
mov edi, eax
jmp 0x406d97
xor esi, esi
cmp byte [ebp - 0x30b1], 0
jne 0x40690b
lea eax, [ebp - 0x218]
push eax
push esi
push esi
push 0x1c
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x406831
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.00407147
add esp, 0x14
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x406831
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406831
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.00407147
add esp, 0x10
lea eax, [ebp - 0x2c40]
lea ecx, [ebp - 0x30c0]
push eax
call fcn.004022a6
xor edx, edx
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.00406221
lea ecx, [ebp - 0x30c0]
call fcn.00401ecc
jmp 0x406d97
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xc40]
push str._sSquirrelSetup.log
push eax
call fcn.00406e85
add esp, 0xc
push 0x426d34
push 0x83
push dword [0x42acdc]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x3054], esi
test esi, esi
je 0x4068c8
push esi
push dword [0x42acdc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x3058], ebx
test ebx, ebx
jne 0x406a3d
and dword [ebp - 0x3054], eax
jmp 0x4068c8
push esi
push dword [0x42acdc]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, 0x100
jb 0x4068c8
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.004060da
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x406a7e
mov dword [0x42b840], 0x10000
jmp 0x406aa3
cmp dword [esi], 1
je 0x406a8f
mov dword [0x42b840], 0x80000
jmp 0x406aa3
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x218]
push eax
call fcn.004056fa
mov dword [0x42b840], 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 0x406bce
cmp dword [esi], 1
jne 0x406bc2
lea eax, [ebp - 0xe70]
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.00405758
mov dword [ebp - 0x30b8], eax
mov dword [0x42b840], eax
test eax, eax
je 0x406afc
cmp eax, 0x600
jne 0x406bd8
lea eax, [ebp - 0xe6c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push str._s_s
push eax
call fcn.00406e85
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.004061a5
add esp, 0xc
test eax, eax
jne 0x406bd8
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x30c4]
call fcn.004022a6
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x3048]
push eax
cmp dword [ebp - 0x3044], ecx
je 0x406b7f
call fcn.00407116
add dword [ebp - 0x3048], 4
jmp 0x406b8b
push ecx
lea ecx, [ebp - 0x304c]
call fcn.00406eb6
lea ecx, [ebp - 0x30c4]
mov byte [ebp - 4], 1
call fcn.00401ecc
mov ecx, dword [ebp - 0x30bc]
mov eax, dword [ebp - 0x30b8]
inc ecx
mov dword [ebp - 0x30bc], ecx
cmp eax, 0x600
je 0x406aab
test eax, eax
je 0x406aab
jmp 0x406bd8
mov dword [0x42b840], 0x80000
jmp 0x406bd8
mov dword [0x42b840], 0x10000
mov ecx, esi
call fcn.004061d4
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.00406e85
add esp, 0x10
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
je 0x4068c8
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 0x406c63
push 0x104
push esi
call fcn.00410fc9
pop ecx
pop ecx
cmp eax, 1
jae 0x406c6e
mov esi, 0x425110
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.00406e85
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 0x4068c8
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 0x406d1d
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.004022a6
lea edx, [ebp - 0xc40]
mov byte [ebp - 4], 5
mov ecx, eax
call fcn.00406221
lea ecx, [ebp - 0x30b8]
call fcn.00401ecc
mov eax, dword [ebp - 0x3048]
mov ecx, dword [ebp - 0x304c]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x406d51
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 0x406d32
push dword [ebp - 0x30b0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x30ac]
call esi
jmp 0x406d91
push str.Failed_to_extract_installer
lea ecx, [ebp - 0x30b8]
call fcn.004022a6
xor edx, edx
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.00406221
lea ecx, [ebp - 0x30b8]
call fcn.00401ecc
mov edi, dword [ebp - 0x3050]
mov esi, dword [ebp - 0x304c]
test esi, esi
je 0x406ded
mov eax, dword [ebp - 0x3048]
cmp esi, eax
je 0x406dc7
mov ebx, eax
mov ecx, esi
call fcn.00401ecc
add esi, 4
cmp esi, ebx
jne 0x406dad
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.0040703e
xor eax, eax
mov dword [ebp - 0x304c], eax
mov dword [ebp - 0x3048], eax
mov dword [ebp - 0x3044], eax
test ebx, ebx
je 0x406df8
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.0040a3ad
leave
ret