Function at 0x40be90
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Set current directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f1bc
mov eax, dword fs:[0]
push eax
sub esp, 0x344
mov eax, dword [0x5bf23c]
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
xor ebx, ebx
mov dword [ebp - 0x25c], ebx
call fcn.00454710
test al, al
jne 0x40cb30
lea ecx, [ebp - 0x2a0]
call fcn.0041dc60
call fcn.0041b3c0
push 3
call fcn.00482e18
add esp, 4
mov dword [ebp - 0x48], ebx
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], str.uninst.log
call fcn.0041d060
mov esi, dword [0x5d62dc]
lea ecx, [ebp - 0xa0]
mov byte [0x5d62e4], 1
mov byte [0x5d62ec], 1
mov byte [0x5bfd1c], 1
mov byte [0x5d62e5], 1
call fcn.0044da00
cmp dword [ebp - 0x90], ebx
je 0x40bf6c
push 1
mov edx, 0x5a4974
lea ecx, [ebp - 0x28]
mov ebx, 2
call fcn.00403bc0
add esp, 4
cmp dword [eax + 0x14], 0x10
jb 0x40bf59
mov eax, dword [eax]
push eax
mov ecx, esi
call fcn.0041b670
mov byte [ebp - 0x251], 1
test al, al
je 0x40bf73
mov byte [ebp - 0x251], 0
test bl, 2
je 0x40bf90
mov eax, dword [ebp - 0x14]
and ebx, 0xfffffffd
cmp eax, 0x10
jb 0x40bf90
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00408800
cmp byte [ebp - 0x251], 0
je 0x40bffe
push 0x5a433c
lea ecx, [ebp - 0x28]
call fcn.00407aa0
lea edx, [ebp - 0xa0]
lea ecx, [ebp - 0x58]
call fcn.0044d020
push eax
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.0041b8a0
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x40bfd5
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00409090
xor eax, eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x48], 0
cmp eax, 0x10
jb 0x40bffe
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00408800
push 1
mov edx, 0x5a4974
lea ecx, [ebp - 0x28]
call fcn.00403bc0
mov ecx, eax
add esp, 4
cmp dword [ecx + 0x14], 0x10
jb 0x40c01a
mov ecx, dword [ecx]
mov dword [ebp - 0x260], ecx
test ecx, ecx
jne 0x40c02c
mov dword [ebp - 0x25c], ecx
jmp 0x40c04f
cmp byte [ecx], 0
jne 0x40c03d
mov dword [ebp - 0x25c], 0
jmp 0x40c04f
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c040
sub ecx, edx
mov dword [ebp - 0x25c], ecx
test bl, 0x20
je 0x40c062
lea ecx, [ebp - 0x350]
and ebx, 0xffffffdf
call fcn.0041d2d0
mov ecx, dword [0x5d62dc]
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0041b720
push eax
lea ecx, [ebp - 0xa0]
call fcn.00407a10
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jb 0x40c099
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00408800
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
cmp eax, 0x10
jb 0x40c0c0
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00408800
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0xa0]
mov ecx, 0x5d7338
push eax
call fcn.004083e0
call fcn.004452c0
mov edi, eax
mov ecx, dword [edi]
test ecx, ecx
je 0x40c0e8
mov edx, dword [ecx]
push 1
call dword [edx]
push 8
call fcn.004ff5d4
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [eax], 0x5aa560
mov dword [ebp - 4], 0xffffffff
mov dword [eax], 0x5aa558
mov dword [eax + 4], ecx
mov dword [edi], eax
call fcn.00450770
push ecx
call fcn.0044fc20
test al, al
jne 0x40c1c0
mov eax, dword [ebp - 0x8c]
cmp eax, 0x10
jb 0x40c145
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.00408800
cmp dword [0x5d6304], 0
mov dword [ebp - 0x8c], 0xf
mov dword [ebp - 0x90], 0
mov byte [ebp - 0xa0], 0
jne 0x40c17b
test bl, 0x40
je 0x40c18b
lea ecx, [ebp - 0x350]
call fcn.0041d2d0
jmp 0x40c18b
call fcn.0041ddd0
mov eax, dword [ebp - 0x274]
mov dword [0x5d6304], eax
lea ecx, [ebp - 0x288]
call fcn.0041dee0
push dword [ebp - 0x288]
call fcn.004ff607
add esp, 4
mov dword [ebp - 0x288], 0
lea eax, [ebp - 0x2a0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x40cb30
call fcn.00450770
push ecx
call fcn.0044fcf0
test al, al
je 0x40cb1a
xor eax, eax
mov dword [ebp - 0x11c], 7
push str.APPNAME_EN
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x120], 0
mov word [ebp - 0x130], ax
call fcn.00407830
call fcn.00447c90
lea ecx, [ebp - 0x130]
push ecx
lea ecx, [ebp - 0x28]
push ecx
mov ecx, eax
call fcn.00447650
lea ecx, [ebp - 0x28]
call fcn.004077f0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x30], 0
call fcn.00414c90
add esp, 4
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
lea eax, [ebp - 0x70]
push eax
push 6
mov dword [ebp - 0x60], 0
call fcn.0041ecd0
add esp, 8
mov dword [ebp - 0x4c], 0
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x48], 0
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x44], 0
push eax
call fcn.00416c20
push str._uninst.exe
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00409610
add esp, 4
lea eax, [ebp - 0x118]
cmp dword [ebp - 0x104], 8
mov ecx, esp
cmovae eax, dword [ebp - 0x118]
mov dword [ecx], eax
mov eax, dword [ebp - 0x108]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x40]
call fcn.004176e0
lea ecx, [ebp - 0x40]
cmp ecx, eax
je 0x40c2ea
push 0xffffffffffffffff
push 0
push eax
call fcn.00407f70
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40c2ff
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00409090
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x40]
call fcn.00416bd0
test al, al
je 0x40c3c3
mov dl, 1
lea ecx, [ebp - 0x40]
call fcn.00414710
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x70]
call fcn.00415430
lea ecx, [ebp - 0x250]
call fcn.004181b0
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x150]
call fcn.0041b2d0
mov edx, esi
lea ecx, [ebp - 0x150]
call fcn.0041adf0
test bl, 8
je 0x40c362
lea ecx, [ebp - 0x350]
and ebx, 0xfffffff7
call fcn.0041d2d0
test bl, 4
je 0x40c372
lea ecx, [ebp - 0xb8]
call fcn.004077f0
lea eax, [ebp - 0x250]
push eax
push ecx
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x150]
call fcn.0040a1d0
add esp, 4
lea ecx, [ebp - 0x268]
mov edx, eax
call fcn.00415d30
mov eax, dword [ebp - 0x14]
add esp, 4
cmp eax, 8
jb 0x40c3b1
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00409090
lea ecx, [ebp - 0x264]
call fcn.004120b0
push 0
call fcn.0050c309
push str.INST_MUTEX_NAME
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x74], 0xf
mov dword [ebp - 0x78], 0
mov byte [ebp - 0x88], 0
call fcn.00407830
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00447c90
mov ecx, eax
call fcn.00447aa0
lea ecx, [ebp - 0x28]
call fcn.004077f0
push str.APPNAME_EN
lea ecx, [ebp - 0x28]
mov dword [ebp - 0xec], 0xf
mov dword [ebp - 0xf0], 0
mov byte [ebp - 0x100], 0
call fcn.00407830
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00447c90
mov ecx, eax
call fcn.00447aa0
lea ecx, [ebp - 0x28]
call fcn.004077f0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x100]
push eax
lea ecx, [ebp - 0x88]
call fcn.00408640
push str._MUTEX_UNINST
lea ecx, [ebp - 0x88]
call fcn.00407950
cmp dword [ebp - 0x74], 0x10
lea eax, [ebp - 0x88]
cmovae eax, dword [ebp - 0x88]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40c57f
push str._uninst_CreateMutex_ERROR_ALREADY_EXISTS
lea ecx, [ebp - 0x88]
call fcn.00407950
cmp dword [ebp - 0x74], 0x10
lea edx, [ebp - 0x88]
cmovae edx, dword [ebp - 0x88]
sub esp, 0x18
mov ecx, esp
push edx
call fcn.00407aa0
call fcn.00444db0
add esp, 0x18
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x100]
call fcn.004079d0
lea ecx, [ebp - 0x88]
call fcn.004079d0
lea ecx, [ebp - 0x118]
call fcn.004077f0
lea ecx, [ebp - 0x4c]
call fcn.004075d0
mov eax, dword [ebp - 0x5c]
cmp eax, 8
jb 0x40c519
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00409090
xor eax, eax
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x60], 0
cmp eax, 8
jb 0x40c542
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00409090
xor eax, eax
mov dword [ebp - 0x2c], 7
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.004077f0
lea ecx, [ebp - 0xa0]
call fcn.004079d0
lea ecx, [ebp - 0x2a0]
call fcn.0041dce0
or eax, 0xffffffff
jmp 0x40cb32
sub esp, 8
call fcn.0044afc0
add esp, 4
mov ecx, eax
call fcn.0044ac90
push 0x5a85cc
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x1b4], 0xf
mov dword [ebp - 0x1b8], 0
mov byte [ebp - 0x1c8], 0
mov dword [ebp - 0x19c], 0xf
mov dword [ebp - 0x1a0], 0
mov byte [ebp - 0x1b0], 0
mov dword [ebp - 0x184], 0xf
mov dword [ebp - 0x188], 0
mov byte [ebp - 0x198], 0
call fcn.00407830
lea eax, [ebp - 0x1c8]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00447c90
mov ecx, eax
call fcn.00447aa0
lea ecx, [ebp - 0x28]
call fcn.004077f0
push str.OLD_VERSION
lea ecx, [ebp - 0x28]
call fcn.00407830
lea eax, [ebp - 0x1b0]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00447c90
mov ecx, eax
call fcn.00447aa0
lea ecx, [ebp - 0x28]
call fcn.004077f0
push str.REG_MD5
lea ecx, [ebp - 0x28]
call fcn.00407830
lea eax, [ebp - 0x198]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00447c90
mov ecx, eax
call fcn.00447aa0
lea ecx, [ebp - 0x28]
call fcn.004077f0
push 0x5a85fc
lea ecx, [ebp - 0x28]
call fcn.00407aa0
lea edx, [ebp - 0x1c8]
lea ecx, [ebp - 0x28]
call fcn.00444aa0
lea ecx, [ebp - 0x28]
call fcn.004079d0
push 0x5a8600
lea ecx, [ebp - 0x28]
call fcn.00407aa0
lea edx, [ebp - 0x1b0]
lea ecx, [ebp - 0x28]
call fcn.00444aa0
lea ecx, [ebp - 0x28]
call fcn.004079d0
push 0x5a8604
lea ecx, [ebp - 0x28]
call fcn.00407aa0
lea edx, [ebp - 0x198]
lea ecx, [ebp - 0x28]
call fcn.00444aa0
lea ecx, [ebp - 0x28]
call fcn.004079d0
push dword [ebp + 8]
lea ecx, [ebp - 0x208]
call fcn.0040cf10
mov eax, ecx
sub esp, 0x18
mov dword [ebp - 0x26c], eax
mov ecx, esp
push str.BeginDoUnist
call fcn.00407aa0
call fcn.00444db0
xor eax, eax
mov dword [ebp - 0xd4], 7
add esp, 0x18
mov dword [ebp - 0xd8], 0
mov word [ebp - 0xe8], ax
call 0x40c71e
pop eax
add eax, 0xf
push eax
xor eax, eax
mov eax, ecx
ret
lea ecx, [ebp - 0xa0]
call fcn.004079d0
lea ecx, [ebp - 0x2a0]
call fcn.0041dce0
xor eax, eax
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.004ff5c3
mov esp, ebp
pop ebp
ret 0x10