Function at 0x412e90
Capabilities:
Check if file exists
Check mutex on windows
Copy file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x588211
mov eax, dword fs:[0]
push eax
sub esp, 0x87c
mov eax, dword [0x5f50fc]
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 ebx, ecx
mov dword [ebp - 0x864], ebx
mov eax, dword [ebp + 0x10]
lea esi, [ebx + 0x1c]
mov dword [ebp - 0x85c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x84c], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x86c], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x858], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0x844], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x20]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 0x24]
push 0x110
mov dword [ebx + 0x14], eax
lea eax, [ebx + 0x20]
push 0
push eax
call fcn.00568420
add esp, 0xc
mov dword [esi], 0x114
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
sub esp, 0x114
mov ecx, 0x45
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
call fcn.00414900
push 0x208
test eax, eax
lea eax, [ebp - 0x218]
push 0
push eax
jne 0x412ff4
call fcn.00568420
add esp, 0xc
call fcn.00432aa4
push 0x104
lea ecx, [ebp - 0x218]
push ecx
mov eax, dword [eax + 4]
push 0x7d0
push dword [eax + 0x44]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x218]
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x84c], eax
lea eax, [ebp - 0x84c]
push eax
push 0
lea eax, [ebp - 0x83c]
push eax
push 0x400
push 0xbe
push 0
push 0x3100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test byte [ebx + 0x18], 2
je 0x412fde
push 0
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x83c]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x83c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 0x661
jmp 0x413a81
call fcn.00568420
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x413a9f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x834], eax
push str.SetupApi.DLL
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x834]
push str._s_s
push eax
call fcn.00406e60
add esp, 0x10
lea ecx, [ebp - 0x888]
call fcn.0043183e
mov esi, dword [ebp - 0x834]
lea ecx, [ebp - 0x888]
push 0
push esi
mov byte [ebp - 4], 1
call fcn.00431abd
lea ecx, [ebp - 0x888]
mov edi, eax
call fcn.00431a63
test edi, edi
jne 0x413186
push 0x208
lea eax, [ebp - 0x628]
push edi
push eax
call fcn.00568420
add esp, 0xc
call fcn.00432aa4
push 0x104
lea ecx, [ebp - 0x628]
push ecx
mov eax, dword [eax + 4]
push 0x7d0
push dword [eax + 0x44]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x628]
mov dword [ebp - 0x83c], edi
mov dword [ebp - 0x84c], eax
lea eax, [ebp - 0x84c]
push eax
push edi
lea eax, [ebp - 0x83c]
push eax
push 0x400
push 0xbe
push edi
push 0x3100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
or edi, 0xffffffff
test byte [ebx + 0x18], 2
je 0x413142
lea eax, [ebp - 0x838]
push eax
lea ecx, [ebx + 0x998]
call fcn.0040b9b0
push 0
push dword [eax]
push dword [ebp - 0x83c]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [ebp - 0x838]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x413142
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x83c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, ebx
call fcn.00418eb0
lea ecx, [ebp - 0x888]
call fcn.004319ea
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x41317c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 0x661
jmp 0x413a81
lea ecx, [ebp - 0x888]
call fcn.004319ea
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4131b0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00568420
add esp, 0xc
lea eax, [ebp - 0x420]
push 1
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x413aa9
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x834], eax
lea eax, [ebp - 0x420]
mov dword [ebp - 4], 2
test eax, 0xffff0000
jne 0x41321b
movzx eax, ax
lea ecx, [ebp - 0x834]
push eax
call fcn.0040e020
jmp 0x413246
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413224
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x834]
call fcn.00407520
mov dword [ebp - 4], 3
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x413ab3
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x838], eax
mov edi, str.SetupTemp
mov byte [ebp - 4], 4
shr edi, 0x10
lea ecx, [ebp - 0x838]
test edi, edi
jne 0x413290
mov eax, str.SetupTemp
movzx esi, ax
push esi
call fcn.0040e020
jmp 0x4132a4
push 9
push str.SetupTemp
call fcn.00407520
mov eax, str.SetupTemp
movzx esi, ax
mov byte [ebp - 4], 5
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x413abd
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x83c], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x83c]
test edi, edi
jne 0x4132db
push esi
call fcn.0040e020
jmp 0x4132e7
push 9
push str.SetupTemp
call fcn.00407520
lea ecx, [ebp - 0x888]
mov byte [ebp - 4], 7
call fcn.0043183e
mov edi, dword [ebp - 0x838]
lea eax, [ebp - 0x420]
push edi
push eax
lea eax, [ebp - 0x834]
mov byte [ebp - 4], 8
push str._s_s
push eax
call fcn.00406e60
mov esi, dword [ebp - 0x834]
lea ecx, [ebp - 0x888]
add esp, 0x10
push 0
push esi
call fcn.00431abd
test eax, eax
je 0x413399
mov ebx, 1
nop dword [eax]
push ebx
push dword [ebp - 0x83c]
lea eax, [ebp - 0x838]
push 0x599190
push eax
call fcn.00406e60
mov edi, dword [ebp - 0x838]
lea eax, [ebp - 0x420]
push edi
push eax
lea eax, [ebp - 0x834]
inc ebx
push str._s_s
push eax
call fcn.00406e60
mov esi, dword [ebp - 0x834]
lea ecx, [ebp - 0x888]
add esp, 0x20
push 0
push esi
call fcn.00431abd
test eax, eax
jne 0x413340
mov ebx, dword [ebp - 0x864]
lea ecx, [ebp - 0x888]
call fcn.00431a63
lea ecx, [ebx + 0x998]
push esi
call fcn.0040e460
lea ecx, [ebp - 0x888]
call fcn.004319ea
mov edx, dword [ebp - 0x83c]
or eax, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4133dd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [edi - 0x10]
mov byte [ebp - 4], 3
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4133fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x413419
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebx + 0x998]
call fcn.0040c970
push 0
push dword [ebp - 0x840]
mov ecx, ebx
mov dword [ebp - 4], 9
call fcn.00410260
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x413ac7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x834], eax
push str.Data1.cab
push dword [ebp - 0x84c]
lea eax, [ebp - 0x834]
mov byte [ebp - 4], 0xa
push str._s_s
push eax
call fcn.00406e60
add esp, 0x10
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x413ad1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x838], eax
push str.Data1.cab
push dword [ebp - 0x840]
lea eax, [ebp - 0x838]
mov byte [ebp - 4], 0xb
push str._s_s
push eax
call fcn.00406e60
mov esi, dword [ebp - 0x838]
add esp, 0x10
mov edi, dword [ebp - 0x834]
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4134ea
push ebx
push 0x418110
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x413505
test al, 1
je 0x413505
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push str.INST_RES.dll
push dword [ebp - 0x840]
call fcn.00401bc0
lea eax, [ebp - 0x854]
mov dword [ebp - 0x860], 0
push eax
lea eax, [ebp - 0x868]
mov dword [ebp - 0x854], 0
push eax
lea eax, [ebp - 0x860]
mov dword [ebp - 0x868], 0
push eax
push dword [ebp - 0x858]
call fcn.00401fd0
test eax, eax
je 0x413a1a
push dword [ebp - 0x854]
call fcn.004023d0
lea eax, [ebp - 0x860]
push eax
call fcn.00402200
mov dword [ebp - 0x854], 0
call fcn.004025b0
mov dword [ebp - 0x858], eax
test eax, eax
je 0x413a1a
call fcn.00432aa4
mov ecx, dword [eax + 0xc]
mov dword [ebx + 0xe4f4], ecx
call fcn.00432aa4
mov ecx, dword [ebp - 0x858]
push 0x208
push 0
mov dword [eax + 0xc], ecx
lea eax, [ebp - 0x830]
push eax
call fcn.00568420
push dword [ebp - 0x86c]
mov edi, dword [ebp - 0x84c]
lea eax, [ebp - 0x830]
push edi
push str._s_s
push 0x104
push eax
call fcn.00402f80
add esp, 0x20
lea eax, [ebx + 0x1c]
lea esi, [ebx + 0x998]
mov ecx, esi
push dword [ebp + 0x28]
push dword [ebp - 0x85c]
push eax
push edi
lea eax, [ebp - 0x830]
push eax
call fcn.0040dad0
test eax, eax
jne 0x4136d7
lea eax, [ebp - 0x848]
mov ecx, esi
push eax
call fcn.0040b9b0
mov ecx, esi
mov byte [ebp - 4], 0xc
call fcn.0040cec0
mov dword [ebp - 0x84c], eax
mov ecx, ebx
lea eax, [ebp - 0x84c]
push eax
push dword [ebp + 0x18]
push edi
call 0x40fe70
test eax, eax
jne 0x4136fd
test byte [ebx + 0x18], 2
je 0x4136c5
push 0xf
push dword [ebp - 0x84c]
push ecx
mov esi, esp
mov dword [ebp - 0x844], esp
mov dword [ebp - 0x85c], esi
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x413adb
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
mov eax, 0x599142
mov byte [ebp - 4], 0xd
mov ecx, esi
test eax, 0xffff0000
jne 0x41369a
movzx eax, ax
push eax
call fcn.0040e020
jmp 0x4136a4
push 0x599142
call fcn.0040eb40
push ecx
lea eax, [ebp - 0x848]
mov byte [ebp - 4], 0xe
mov ecx, esp
push eax
call fcn.0040e4d0
push 0
mov byte [ebp - 4], 0xc
call fcn.00418290
add esp, 0x14
mov ecx, ebx
call fcn.00418eb0
lea ecx, [ebp - 0x848]
call fcn.00406710
lea ecx, [ebp - 0x838]
call fcn.00406710
lea ecx, [ebp - 0x834]
call fcn.00406710
lea ecx, [ebp - 0x840]
call fcn.00406710
jmp 0x413a7c
mov edi, dword [ebp - 0x844]
test edi, edi
je 0x4137e7
cmp word [edi], 0
je 0x4137e7
lea ecx, [ebp - 0x83c]
call fcn.00406590
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 0xf
push 0
push eax
call fcn.00568420
push edi
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0056b3b9
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0056d04f
add esp, 0x20
cmp word [ebp + eax*2 - 0x21a], 0x5c
jne 0x413784
lea eax, [eax*2 - 2]
cmp eax, 0x208
jae 0x413ae5
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
lea eax, [ebp - 0x844]
mov ecx, esi
push eax
call fcn.0040bbb0
push dword [eax]
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 0x10
push eax
lea eax, [ebp - 0x83c]
push str._s_s
push eax
call fcn.00406e60
add esp, 0x10
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x844]
call fcn.00406710
push ecx
lea eax, [ebp - 0x83c]
mov ecx, esp
push eax
call fcn.0040e4d0
mov ecx, esi
call fcn.0040e3f0
lea ecx, [ebp - 0x83c]
mov byte [ebp - 4], 0xc
call fcn.00406710
mov ecx, esi
call fcn.0040dfa0
test eax, eax
jne 0x413850
test byte [ebx + 0x18], 2
je 0x413813
push 1
push ecx
lea eax, [ebp - 0x848]
mov ecx, esp
push eax
call fcn.0040e4d0
push 0
call fcn.004185d0
add esp, 0xc
mov ecx, ebx
call fcn.00418eb0
lea ecx, [ebp - 0x848]
call fcn.00406710
lea ecx, [ebp - 0x838]
call fcn.00406710
lea ecx, [ebp - 0x834]
call fcn.00406710
lea ecx, [ebp - 0x840]
call fcn.00406710
mov eax, 0x661
jmp 0x413a81
cmp dword [ebx + 0x2c], 2
jne 0x4138bf
mov ecx, ebx
call fcn.00414920
test eax, eax
jne 0x4138bf
test byte [ebx + 0x18], 2
je 0x413882
push 3
push ecx
lea eax, [ebp - 0x848]
mov ecx, esp
push eax
call fcn.0040e4d0
push 0
call fcn.004185d0
add esp, 0xc
mov ecx, ebx
call fcn.00418eb0
lea ecx, [ebp - 0x848]
call fcn.00406710
lea ecx, [ebp - 0x838]
call fcn.00406710
lea ecx, [ebp - 0x834]
call fcn.00406710
lea ecx, [ebp - 0x840]
call fcn.00406710
mov eax, 5
jmp 0x413a81
lea eax, [ebp - 0x850]
mov ecx, esi
push eax
call fcn.0040c9a0
push dword [ebp - 0x850]
mov byte [ebp - 4], 0x11
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebx + 0xe4f8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4139b4
cmp dword [ebx + 0xe4f8], 0
je 0x4139b4
lea eax, [ebp - 0x844]
mov ecx, esi
push eax
call fcn.0040d490
push eax
lea ecx, [ebp - 0x850]
mov byte [ebp - 4], 0x12
call fcn.00406840
lea ecx, [ebp - 0x844]
mov byte [ebp - 4], 0x11
call fcn.00406710
push dword [ebp - 0x850]
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov edi, eax
test edi, edi
je 0x413976
test byte [ebx + 0x18], 2
je 0x413966
push 2
push ecx
push esp
mov ecx, esi
call fcn.0040b9b0
push 0
call fcn.004185d0
add esp, 0xc
mov ecx, ebx
call fcn.00418eb0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4139dc
lea ecx, [ebp - 0x850]
call fcn.00406710
lea ecx, [ebp - 0x848]
call fcn.00406710
lea ecx, [ebp - 0x838]
call fcn.00406710
lea ecx, [ebp - 0x834]
call fcn.00406710
lea ecx, [ebp - 0x840]
call fcn.00406710
xor eax, eax
jmp 0x413a81
test byte [ebx + 0x18], 2
je 0x4139d5
push 2
push ecx
lea eax, [ebp - 0x848]
mov ecx, esp
push eax
call fcn.0040e4d0
push 0
call fcn.004185d0
add esp, 0xc
mov ecx, ebx
call fcn.00418eb0
lea ecx, [ebp - 0x850]
call fcn.00406710
lea ecx, [ebp - 0x848]
call fcn.00406710
lea ecx, [ebp - 0x838]
call fcn.00406710
lea ecx, [ebp - 0x834]
call fcn.00406710
lea ecx, [ebp - 0x840]
call fcn.00406710
mov eax, 0x652
jmp 0x413a81
mov ecx, ebx
call fcn.00418eb0
or ebx, 0xffffffff
mov byte [ebp - 4], 0xa
mov eax, ebx
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x413a3f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov byte [ebp - 4], 9
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x413a5a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x840]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x413a7c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 0x643
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.005663a7
mov esp, ebp
pop ebp
ret 0x2c
push 0x80004005
call fcn.00406af0
push 0x80004005
call fcn.00406af0
push 0x80004005
call fcn.00406af0
push 0x80004005
call fcn.00406af0
push 0x80004005
call fcn.00406af0
push 0x80004005
call fcn.00406af0
push 0x80004005
call fcn.00406af0
call fcn.0056650e
int3