Function at 0x4012d9
Capabilities:
Check if file exists
Check mutex on windows
Create process on windows
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x12e0
call fcn.004147f0
mov eax, dword [0x41f024]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x12dc]
push str.sf_dyupdatepatcher
xor ebx, ebx
push eax
mov dword [ebp - 0x10dc], ebx
call fcn.00409662
pop ecx
pop ecx
lea eax, [ebp - 0x12dc]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x10dc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40135a
push dword [ebp - 0x10dc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409256
leave
ret 0x10
sub esp, 0x1c
mov eax, esp
mov dword [ebp - 0x12e0], esp
push str.DuoyiExternal.exe
call fcn.00401821
call fcn.004062b2
add esp, 0x1c
lea eax, [ebp - 0x10a0]
push eax
call fcn.0040863d
push 0x6d
lea ecx, [ebp - 0x10a0]
call fcn.0040899d
test eax, eax
setne byte [ebp - 0x12e0]
cmp dword [ebp - 0x1080], ebx
je 0x4013af
lea eax, [ebp - 0x10a0]
push eax
call fcn.004086aa
jmp 0x40133b
push 7
xor eax, eax
pop edi
mov word [ebp - 0x1058], ax
lea eax, [ebp - 0x1058]
push eax
push 0x70
lea ecx, [ebp - 0x10a0]
mov dword [ebp - 0x1044], edi
mov dword [ebp - 0x1048], ebx
call fcn.004089f2
test al, al
jne 0x40140d
push 1
xor edi, edi
lea esi, [ebp - 0x1058]
call fcn.00401a97
lea eax, [ebp - 0x10a0]
push eax
call fcn.004086aa
push dword [ebp - 0x10dc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x401349
cmp dword [ebp - 0x1044], 8
mov eax, dword [ebp - 0x1058]
jae 0x401422
lea eax, [ebp - 0x1058]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40147c
cmp dword [ebp - 0x1044], 8
mov eax, dword [ebp - 0x1058]
jae 0x401442
lea eax, [ebp - 0x1058]
push eax
lea eax, [ebp - 0x804]
push 0x41a320
push eax
call fcn.00409d08
add esp, 0xc
cmp byte [ebp - 0x12e0], bl
jne 0x4017d2
push ebx
push 0x41befc
lea eax, [ebp - 0x804]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4017d2
xor eax, eax
push 0x7fe
mov word [ebp - 0x1074], ax
mov word [ebp - 0x1004], ax
lea eax, [ebp - 0x1002]
push ebx
push eax
mov dword [ebp - 0x1060], edi
mov dword [ebp - 0x1064], ebx
call fcn.00409e10
lea esi, [ebp - 0x1004]
call fcn.00405f16
mov eax, esi
push str.sf_dyupdatepatcher.zip
push eax
call fcn.00409631
mov eax, esi
push eax
call fcn.00402197
add esp, 0x18
cmp eax, ebx
je 0x40150b
push eax
push 0x41a378
lea eax, [ebp - 0x804]
push eax
call fcn.00409d08
add esp, 0xc
cmp byte [ebp - 0x12e0], bl
jne 0x4017c3
push ebx
push 0x41befc
lea eax, [ebp - 0x804]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4017c3
cmp dword [ebp - 0x1044], 8
mov ecx, dword [ebp - 0x1058]
jae 0x401520
lea ecx, [ebp - 0x1058]
push dword [ebp - 0x12e0]
lea eax, [ebp - 0x1004]
push eax
call fcn.00405f91
pop ecx
pop ecx
cmp eax, ebx
jge 0x401540
push eax
push 0x41a3a4
jmp 0x4014d7
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x1074]
push eax
push 0x75
lea ecx, [ebp - 0x10a0]
call fcn.004089f2
test al, al
jne 0x4016b0
xor eax, eax
mov word [ebp - 0x103c], ax
mov word [ebp - 0x1020], ax
lea eax, [ebp - 0x103c]
push eax
push 0x73
lea ecx, [ebp - 0x10a0]
mov dword [ebp - 0x1028], edi
mov dword [ebp - 0x102c], ebx
mov dword [ebp - 0x100c], edi
mov dword [ebp - 0x1010], ebx
call fcn.004089f2
test al, al
je 0x40169c
lea eax, [ebp - 0x1020]
push eax
push 0x63
lea ecx, [ebp - 0x10a0]
call fcn.004089f2
cmp dword [ebp - 0x1010], ebx
je 0x401661
cmp dword [ebp - 0x100c], 8
mov eax, dword [ebp - 0x1020]
jae 0x4015e2
lea eax, [ebp - 0x1020]
cmp word [eax], 0x23
jne 0x401616
cmp dword [ebp - 0x100c], 8
mov eax, dword [ebp - 0x1020]
jae 0x4015fd
lea eax, [ebp - 0x1020]
lea esi, [eax + 2]
push esi
call fcn.00409df3
pop ecx
mov ecx, esi
lea esi, [ebp - 0x1020]
call fcn.00401a1c
jmp 0x401661
lea ecx, [ebp - 0x1020]
lea ebx, [ebp - 0x10d8]
call fcn.004011b5
lea ecx, [ebp - 0x10bc]
push ecx
mov ecx, eax
call fcn.004010b2
mov ebx, eax
pop ecx
lea eax, [ebp - 0x1020]
call fcn.0040193a
push 1
xor edi, edi
lea esi, [ebp - 0x10bc]
call fcn.00401a97
push 1
lea esi, [ebp - 0x10d8]
call fcn.004018ff
xor ebx, ebx
cmp dword [ebp - 0x100c], 8
mov ecx, dword [ebp - 0x1020]
jae 0x401676
lea ecx, [ebp - 0x1020]
cmp dword [ebp - 0x1028], 8
mov eax, dword [ebp - 0x103c]
jae 0x40168b
lea eax, [ebp - 0x103c]
push 5
push ebx
push ecx
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 1
xor edi, edi
lea esi, [ebp - 0x1020]
call fcn.00401a97
jmp 0x4017b4
cmp dword [ebp - 0x1064], ebx
je 0x4017c3
push 0x75
lea ecx, [ebp - 0x10a0]
call fcn.004089c3
mov ecx, eax
cmp ecx, ebx
je 0x4017c3
mov esi, dword [ecx]
mov eax, dword [ecx + 4]
sub eax, esi
push 0x1c
cdq
pop ebx
idiv ebx
test eax, eax
je 0x4017c3
push esi
lea eax, [ebp - 0x12e0]
push eax
push ecx
call fcn.004018a7
xor eax, eax
mov word [ebp - 0x103c], ax
lea eax, [ebp - 0x10a0]
xor esi, esi
push eax
lea ecx, [ebp - 0x103c]
mov dword [ebp - 0x1028], edi
mov dword [ebp - 0x102c], esi
call fcn.00408a2c
test al, al
je 0x4017b4
xor eax, eax
push 0x40e
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push esi
push eax
call fcn.00409e10
add esp, 0xc
push 0x207
lea eax, [ebp - 0x414]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [ebp - 0x1060], 8
mov eax, dword [ebp - 0x1074]
jae 0x40177a
lea eax, [ebp - 0x1074]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [ebp - 0x1028], 8
mov eax, dword [ebp - 0x103c]
jae 0x40179d
lea eax, [ebp - 0x103c]
push 5
push esi
push eax
lea eax, [ebp - 0x414]
push eax
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 1
xor edi, edi
lea esi, [ebp - 0x103c]
call fcn.00401a97
push 1
xor edi, edi
lea esi, [ebp - 0x1074]
call fcn.00401a97
xor ebx, ebx
inc ebx
jmp 0x4013df