Function at 0x412120
Capabilities:
Check if file exists
Check mutex on windows
Copy file
Create process on windows
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x581925
mov eax, dword fs:[0]
push eax
sub esp, 0x1a8
mov eax, dword [0x5e4a44]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov edi, ecx
mov esi, edx
xor ebx, ebx
mov dword [ebp - 0x140], edi
mov dword [ebp - 0x154], esi
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x130], ebx
call fcn.00412cb0
push esi
lea ecx, [ebp - 0x12c]
call fcn.004024e0
mov dword [ebp - 4], ebx
mov ecx, dword [ebp - 0x12c]
push 0x5c
push ecx
call fcn.00551488
add esp, 8
cmp eax, ebx
jne 0x4121a0
or esi, 0xffffffff
jmp 0x4121a8
sub eax, dword [ebp - 0x12c]
mov esi, eax
lea edx, [esi + 1]
push edx
lea eax, [ebp - 0x150]
push eax
lea ecx, [ebp - 0x12c]
call fcn.004027c0
push esi
lea ecx, [ebp - 0x144]
push ecx
lea ecx, [ebp - 0x12c]
mov byte [ebp - 4], 1
call fcn.004027f0
push eax
lea ecx, [ebp - 0x12c]
mov byte [ebp - 4], 2
call fcn.00402bc0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x144]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41220b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
lea ecx, [edi + 0x14]
push 0x5af62d
mov byte [ebp - 0x131], 0
call fcn.00402ef0
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea esp, [esp]
push str.6635AA25_712D_4ED3_8F30_C6E6F3018099
push 0
push 0
call esi
mov edi, eax
mov dword [ebp - 0x144], edi
test edi, edi
jne 0x41224d
push 0x64
call ebx
jmp 0x412230
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x412267
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
call ebx
jmp 0x412230
lea ecx, [ebp - 0x15c]
call fcn.0045561c
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x12c]
push 0x5c
push ecx
call fcn.00551488
add esp, 8
test eax, eax
je 0x412338
sub eax, dword [ebp - 0x12c]
mov edi, eax
cmp edi, 0xffffffff
je 0x412338
push 0x5af76c
lea ecx, [ebp - 0x128]
call fcn.004024e0
lea edx, [ebp - 0x128]
push edx
lea eax, [ebp - 0x138]
mov byte [ebp - 4], 5
push eax
mov dword [ebp - 0x130], 1
call fcn.00419f40
add esp, 8
mov esi, eax
inc edi
push edi
lea ecx, [ebp - 0x14c]
push ecx
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x12c]
mov dword [ebp - 0x130], 3
call fcn.004027c0
mov ebx, 7
mov dword [ebp - 4], ebx
mov ecx, dword [esi]
xor edx, edx
test ecx, ecx
setne dl
mov dword [ebp - 0x130], ebx
test edx, edx
jne 0x412320
push 0x80004005
call fcn.004010d0
mov eax, dword [eax]
push ecx
push eax
call fcn.00551707
add esp, 8
test eax, eax
jne 0x41233e
mov byte [ebp - 0x139], al
jmp 0x412345
mov ebx, dword [ebp - 0x130]
mov byte [ebp - 0x139], 1
mov dword [ebp - 4], 6
test bl, 4
je 0x41237c
mov eax, dword [ebp - 0x14c]
and ebx, 0xfffffffb
add eax, 0xfffffff0
mov dword [ebp - 0x130], ebx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41237c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 5
test bl, 2
je 0x4123b3
mov eax, dword [ebp - 0x138]
and ebx, 0xfffffffd
add eax, 0xfffffff0
mov dword [ebp - 0x130], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4123b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 4
test bl, 1
je 0x4123e1
mov eax, dword [ebp - 0x128]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4123e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0x139], 0
je 0x41242f
mov ecx, dword [ebp - 0x148]
push ecx
lea edx, [ebp - 0x138]
push edx
call fcn.00411aa0
mov ecx, dword [ebp - 0x140]
push eax
add ecx, 0x14
mov byte [ebp - 4], 8
call fcn.00402bc0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x138]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x41261f
push 1
push 0x1c
lea ecx, [ebp - 0x124]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
call fcn.00454925
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41245c
push 0x80004005
call fcn.004010d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x130], eax
lea ecx, [ebp - 0x124]
push ecx
lea edx, [ebp - 0x130]
push str._sTemp_
push edx
mov byte [ebp - 4], 9
call fcn.00403110
mov eax, dword [ebp - 0x130]
mov edi, dword [eax - 0xc]
mov ecx, dword [ebp - 0x12c]
add esp, 0xc
cmp dword [ecx - 0xc], edi
jle 0x4125e9
lea ecx, [ebp - 0x130]
call fcn.00402760
mov eax, dword [ebp - 0x12c]
add eax, 0xfffffff0
push eax
call fcn.00403050
add eax, 0x10
add esp, 4
mov dword [ebp - 0x128], eax
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 0xa
call fcn.00402760
mov ebx, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x130]
mov eax, edi
mov esi, ebx
lea ebx, [ebx]
cmp eax, 4
jb 0x41250a
mov edx, dword [esi]
cmp edx, dword [ecx]
jne 0x4125ab
sub eax, 4
add ecx, 4
add esi, 4
jmp 0x4124f0
test eax, eax
je 0x412536
mov dl, byte [ecx]
cmp dl, byte [esi]
jne 0x4125ab
cmp eax, 1
jbe 0x412536
mov dl, byte [ecx + 1]
cmp dl, byte [esi + 1]
jne 0x4125ab
cmp eax, 2
jbe 0x412536
mov al, byte [ecx + 2]
cmp al, byte [esi + 2]
jne 0x4125ab
mov eax, dword [ebx - 0xc]
test edi, edi
jl 0x4125ab
cmp edi, eax
jg 0x4125ab
lea ecx, [ebx + edi]
push 0x5af7e8
push ecx
call fcn.00550eef
add esp, 8
test eax, eax
je 0x4125ab
sub eax, ebx
cmp eax, 0xffffffff
je 0x4125ab
mov edx, dword [ebp - 0x148]
push edx
lea eax, [ebp - 0x138]
push eax
call fcn.00411aa0
mov ecx, dword [ebp - 0x140]
add ecx, 0x14
push eax
mov byte [ebp - 4], 0xb
call fcn.00402bc0
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x138]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4125c7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4125c7
mov ecx, dword [ebp - 0x140]
lea edx, [ebp - 0x12c]
add ecx, 0x14
push edx
mov byte [ebp - 0x131], 1
call fcn.00402bc0
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 9
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412605
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x412605
lea ecx, [ebp - 0x12c]
push ecx
mov ecx, dword [ebp - 0x140]
add ecx, 0x14
mov byte [ebp - 0x131], 1
call fcn.00402bc0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x130]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41262b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 1
call fcn.00455634
mov esi, dword [ebp - 0x140]
mov eax, dword [esi + 0x14]
add esi, 0x14
cmp dword [eax - 0xc], 0
jle 0x412a0f
mov ecx, dword [ebp - 0x12c]
xor edx, edx
test ecx, ecx
setne dl
test edx, edx
jne 0x412675
push 0x80004005
call fcn.004010d0
push ecx
push eax
call fcn.00551c23
add esp, 8
test eax, eax
je 0x412a0f
push 0x5af6f0
lea edx, [ebp - 0x138]
push esi
push edx
call fcn.00413530
add esp, 0xc
lea ecx, [ebp - 0x150]
push ecx
push eax
lea edx, [ebp - 0x128]
push edx
mov byte [ebp - 4], 0xd
call fcn.00413470
add esp, 0xc
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x138]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4126dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x128]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ecx
mov esi, 0x1e
call edi
test eax, eax
je 0x4127ca
lea esp, [esp]
mov edx, esi
dec esi
test edx, edx
jle 0x41272d
mov eax, dword [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x412720
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x128]
push ecx
call edi
test eax, eax
jne 0x412700
test esi, esi
jge 0x4127ca
mov edx, dword [ebp - 0x140]
mov esi, dword [ebp - 0x128]
mov edi, dword [edx + 0x14]
mov ebx, dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x148]
push esi
push edi
push ebx
push 0x5af804
push eax
call fcn.00403110
add esp, 0x18
push 0x5af82c
lea ecx, [ebp - 0x130]
call fcn.004024e0
lea ecx, [ebp - 0x130]
push ecx
lea edx, [ebp - 0x14c]
push edx
mov byte [ebp - 4], 0x10
call fcn.00419f40
mov eax, dword [eax]
add esp, 8
push 0x10
push 0x5af62d
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x14c]
call fcn.00402ba0
lea ecx, [ebp - 0x130]
call fcn.00402ba0
lea ecx, [ebp - 0x128]
call fcn.00402ba0
jmp 0x412ad4
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp - 0x154]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x128]
push eax
call edi
test eax, eax
je 0x412980
push 0x5c
lea ecx, [ebp - 0x128]
call fcn.00402730
mov esi, eax
push esi
lea ecx, [ebp - 0x130]
push ecx
lea ecx, [ebp - 0x128]
call fcn.004027f0
inc esi
push esi
lea edx, [ebp - 0x144]
mov bl, 0x11
push edx
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], bl
call fcn.004027c0
push str._DEL_t
push eax
lea eax, [ebp - 0x14c]
push eax
mov byte [ebp - 4], 0x12
call fcn.00413530
add esp, 0xc
mov ecx, dword [ebp - 0x154]
push ecx
push eax
lea edx, [ebp - 0x138]
push edx
mov byte [ebp - 4], 0x13
call fcn.00413530
mov eax, dword [eax]
add esp, 0xc
push eax
call fcn.005521bf
add esp, 4
lea ecx, [ebp - 0x138]
mov esi, eax
call fcn.00402ba0
lea ecx, [ebp - 0x14c]
call fcn.00402ba0
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], bl
call fcn.00402ba0
push 0x44
lea eax, [ebp - 0x1b4]
push 0
push eax
call fcn.00557650
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x164]
push ecx
mov ecx, dword [ebp - 0x128]
lea edx, [ebp - 0x1b4]
push edx
mov dword [ebp - 0x164], eax
mov dword [ebp - 0x160], eax
mov dword [ebp - 0x15c], eax
mov dword [ebp - 0x158], eax
mov eax, dword [ebp - 0x130]
push eax
push 0
push 0
push 0
push 0
push 0
push esi
push ecx
mov dword [ebp - 0x1b4], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x41294f
mov edx, dword [ebp - 0x140]
mov esi, dword [ebp - 0x128]
mov edi, dword [edx + 0x14]
mov ebx, dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x148]
push esi
push edi
push ebx
push 0x5af858
push eax
call fcn.00403110
mov ecx, dword [0x5f5808]
add esp, 0x18
push 0x10
push ecx
push str.Update_Failed__3
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4127af
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp - 0x140]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0x148]
push edx
mov edx, dword [ebp - 0x12c]
push ecx
push edx
push 0x5af894
push eax
call fcn.00403110
add esp, 0x14
jmp 0x4127af
mov ecx, dword [ebp - 0x140]
mov eax, dword [ecx + 0x14]
mov edx, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x148]
push esi
push edx
push eax
mov eax, dword [ebp - 0x12c]
push eax
push 0x5af8b4
push ecx
call fcn.00403110
add esp, 0x18
push 0x5af8dc
lea ecx, [ebp - 0x144]
call fcn.004024e0
lea edx, [ebp - 0x144]
push edx
lea eax, [ebp - 0x14c]
push eax
mov byte [ebp - 4], 0x14
call fcn.00419f40
mov ecx, dword [eax]
add esp, 8
push 0x10
push 0x5af62d
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x14c]
call fcn.00402ba0
lea ecx, [ebp - 0x144]
call fcn.00402ba0
lea ecx, [ebp - 0x128]
call fcn.00402ba0
jmp 0x412ad4
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x150]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412a35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x12c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412a5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp - 0x131]
jmp 0x412aec
lea ecx, [ebp - 0x150]
call fcn.00402ba0
lea ecx, [ebp - 0x12c]
call fcn.00402ba0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.005509f8
mov esp, ebp
pop ebp
ret 4