Function at 0x4035ed
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0xc8], 2
push edi
mov dword [ebp - 8], ebx
mov byte [esi + 0x1a5], bl
je 0x403617
call fcn.00402826
mov dword [esi + 0x1ac], eax
mov eax, dword [esi + 0xc8]
xor edi, edi
inc edi
cmp eax, edi
je 0x403702
cmp eax, 2
jle 0x40368f
cmp eax, 4
jle 0x4036d1
cmp eax, 6
je 0x40364f
cmp eax, 7
jne 0x40368f
mov dword [ebp - 8], 3
mov dword [esi + 0xc8], edi
jmp 0x40368f
push ecx
push ecx
lea eax, [esi + 0xdc]
mov ecx, esp
push eax
call fcn.00401037
push ecx
push ecx
lea eax, [esi + 0xd4]
mov ecx, esp
push eax
call fcn.00401037
push ebx
mov ecx, esi
call fcn.00403528
test al, al
jne 0x4041eb
mov byte [esi + 0x1a4], 1
mov dword [esi + 0xc8], edi
mov dword [ebp - 8], edi
mov eax, dword [esi + 0xc8]
dec eax
je 0x403e3c
dec eax
je 0x403d01
dec eax
je 0x40386a
dec eax
je 0x4037a9
dec eax
je 0x403fb7
sub eax, 4
jne 0x4041eb
lea ecx, [ebp - 0x20]
call fcn.0040102d
lea ecx, [ebp - 0x20]
jmp 0x4041e6
push ecx
push ecx
lea eax, [esi + 0xdc]
mov ecx, esp
push eax
call fcn.00401037
push ecx
push ecx
lea eax, [esi + 0xd4]
mov ecx, esp
push eax
call fcn.00401037
push ebx
mov ecx, esi
call fcn.00403528
test al, al
je 0x40368f
jmp 0x4041eb
mov ecx, dword [esi + 0xc0]
call fcn.00405563
test eax, 0xffffff7f
jne 0x40372d
mov dword [esi + 0xcc], 8
mov dword [esi + 0xc8], 5
jmp 0x40368f
push ecx
push ecx
lea eax, [esi + 0xdc]
mov ecx, esp
push eax
call fcn.00401037
push ecx
push ecx
lea eax, [esi + 0xd4]
mov ecx, esp
push eax
call fcn.00401037
push ebx
mov ecx, esi
call fcn.00403528
test al, al
jne 0x4041eb
cmp byte [esi + 0x1a4], bl
jne 0x40368c
mov ecx, dword [esi + 0xc0]
call fcn.00405563
test al, 2
jg 0x40368c
lea edi, [esi + 0xcc]
cmp dword [edi], 0xffffffff
mov byte [esi + 0x1a5], 1
jne 0x403794
mov dword [edi], 0xfa
mov ecx, dword [esi + 0xc0]
call fcn.00405563
and dword [edi], eax
mov dword [ebp - 8], ebx
jmp 0x40368f
test byte [esi + 0xcc], 8
je 0x4037e3
mov ecx, esi
call fcn.0040210b
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
mov dword [ebp - 8], eax
movzx eax, byte [esi + 0x1a7]
push eax
push ecx
push ecx
lea eax, [esi + 0x16c]
mov ecx, esp
push eax
add edi, 0x20
call fcn.00401037
mov ecx, dword [ebp - 8]
push 8
call dword [edi]
test byte [esi + 0xcc], 0x10
je 0x40381d
mov ecx, esi
call fcn.0040210b
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
mov dword [ebp - 8], eax
movzx eax, byte [esi + 0x1a7]
push eax
push ecx
push ecx
lea eax, [esi + 0x16c]
mov ecx, esp
push eax
add edi, 0x20
call fcn.00401037
mov ecx, dword [ebp - 8]
push 0x10
call dword [edi]
mov ecx, esi
call fcn.0040210b
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
push ecx
push ecx
mov dword [ebp - 8], eax
lea eax, [esi + 0x17c]
mov ecx, esp
push eax
add edi, 0x24
call fcn.00401037
push dword [esi + 0xcc]
mov ecx, dword [ebp - 8]
call dword [edi]
cmp byte [esi + 0x1a4], bl
jne 0x40385e
cmp byte [esi + 0x1a8], bl
je 0x4041eb
mov byte [esi + 0x1a6], 1
jmp 0x4041eb
cmp dword [esi + 0xcc], 0xffffffff
jne 0x40387d
mov dword [esi + 0xcc], 0xfa
mov ecx, dword [esi + 0xc0]
call fcn.00405563
and dword [esi + 0xcc], eax
mov ecx, esi
call fcn.0040210b
mov ecx, dword [eax + 0xc]
push dword [esi + 0xcc]
mov eax, dword [ecx]
call dword [eax + 0x10]
test al, al
jne 0x4038c7
cmp byte [esi + 0x1a7], bl
jne 0x4038c7
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 0x3f5
push 2
push ebx
mov ecx, esi
call fcn.0040268f
test byte [esi + 0xcc], 8
je 0x403b28
cmp byte [esi + 0x1a9], bl
je 0x40390f
mov ecx, esi
call fcn.0040210b
mov ecx, dword [eax + 0xc]
mov eax, dword [esi + 0xcc]
mov edx, dword [ecx]
push eax
call dword [edx + 0x50]
cmp dword [eax + 8], ebx
jbe 0x40390f
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 0x40e
push 2
push ebx
mov ecx, esi
call fcn.0040268f
lea edi, [esi + 0x17c]
push edi
lea ecx, [ebp - 0x20]
call fcn.00401037
push edi
lea ecx, [ebp - 0x10]
call fcn.00401037
push ecx
push ecx
lea eax, [esi + 0x98]
mov ecx, esp
push eax
call fcn.00401037
push 0x5c
lea ecx, [ebp - 0x20]
call fcn.00401510
push ecx
push ecx
lea eax, [esi + 0xa0]
mov ecx, esp
push eax
call fcn.00401037
push 0x5c
lea ecx, [ebp - 0x10]
call fcn.00401510
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.00401037
push ebx
push 0x40c824
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x18]
call fcn.00401835
lea ecx, [ebp - 0x28]
call fcn.00401471
push ecx
push ecx
mov ecx, esp
push str..dll
call fcn.0040140d
lea ecx, [ebp - 0x18]
call fcn.004014d9
mov ecx, esi
call fcn.0040210b
movzx ecx, byte [esi + 0x1a7]
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
push ecx
push ecx
push ecx
mov dword [ebp - 8], eax
lea eax, [esi + 0x16c]
mov ecx, esp
push eax
add edi, 0x18
call fcn.00401037
mov ecx, dword [ebp - 8]
push 8
call dword [edi]
mov ecx, esi
call fcn.0040210b
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
push ecx
push ecx
mov dword [ebp - 8], eax
lea eax, [esi + 0x17c]
mov ecx, esp
push eax
add edi, 0x24
call fcn.00401037
mov ecx, dword [ebp - 8]
push 8
call dword [edi]
push ecx
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00401037
push 0xd
push ebx
push ebx
mov ecx, esi
call fcn.0040268f
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 1
push 8
push ecx
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.0040605d
test al, al
je 0x403b10
push ecx
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.00401037
push 0xf
push ebx
push ebx
mov ecx, esi
call fcn.0040268f
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 1
push 4
push ecx
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.0040605d
test al, al
je 0x403b10
push ecx
push ecx
lea eax, [ebp - 0x18]
mov ecx, esp
push eax
call fcn.00401037
push 0x10
push ebx
push ebx
mov ecx, esi
call fcn.0040268f
push ecx
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.00401037
push 1
push 2
push ecx
push ecx
lea eax, [ebp - 0x18]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.0040605d
test al, al
je 0x403b10
mov ecx, esi
call fcn.0040210b
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
mov dword [ebp - 8], eax
add edi, 0x1c
cmp byte [esi + 0x1a8], bl
sete al
movzx eax, al
push eax
push ecx
push ecx
lea eax, [esi + 0x16c]
mov ecx, esp
push eax
call fcn.00401037
push ecx
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.00401037
push ecx
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [ebp - 8]
push 8
call dword [edi]
lea ecx, [ebp - 0x18]
call fcn.00401471
lea ecx, [ebp - 0x10]
call fcn.00401471
lea ecx, [ebp - 0x20]
call fcn.00401471
test byte [esi + 0xcc], 0x10
je 0x4041eb
lea edi, [esi + 0x17c]
push edi
lea ecx, [ebp - 0x18]
call fcn.00401037
push edi
lea ecx, [ebp - 0x20]
call fcn.00401037
push ecx
push ecx
lea eax, [esi + 0xa8]
mov ecx, esp
push eax
call fcn.00401037
push 0x5c
lea ecx, [ebp - 0x18]
call fcn.00401510
push ecx
push ecx
lea eax, [esi + 0xb0]
mov ecx, esp
push eax
call fcn.00401037
push 0x5c
lea ecx, [ebp - 0x20]
call fcn.00401510
mov ecx, esi
call fcn.0040210b
movzx ecx, byte [esi + 0x1a7]
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
push ecx
push ecx
push ecx
mov dword [ebp - 8], eax
lea eax, [esi + 0x16c]
mov ecx, esp
push eax
add edi, 0x18
mov dword [ebp - 0xc], eax
call fcn.00401037
mov ecx, dword [ebp - 8]
push 0x10
call dword [edi]
mov ecx, esi
call fcn.0040210b
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
push ecx
push ecx
mov dword [ebp - 8], eax
lea eax, [esi + 0x17c]
mov ecx, esp
push eax
add edi, 0x24
call fcn.00401037
mov ecx, dword [ebp - 8]
push 0x10
call dword [edi]
push ecx
push ecx
lea eax, [ebp - 0x18]
mov ecx, esp
push eax
call fcn.00401037
push 0xe
push ebx
push ebx
mov ecx, esi
call fcn.0040268f
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 1
push 0x10
push ecx
push ecx
lea eax, [ebp - 0x18]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.0040605d
test al, al
je 0x4041db
push ecx
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00401037
push 0xf
push ebx
push ebx
mov ecx, esi
call fcn.0040268f
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 1
push 4
push ecx
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.0040605d
test al, al
je 0x4041db
push ecx
push ecx
mov ecx, esp
lea edi, [esi + 0x17c]
push edi
call fcn.00401037
push 0x11
push ebx
push ebx
mov ecx, esi
call fcn.0040268f
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 1
push 0x100
push ecx
push ecx
mov ecx, esp
push edi
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.0040605d
test al, al
je 0x4041db
mov ecx, esi
call fcn.0040210b
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
add edi, 0x1c
cmp byte [esi + 0x1a8], bl
mov dword [ebp - 8], eax
sete al
movzx eax, al
push eax
push ecx
push ecx
mov ecx, esp
push dword [ebp - 0xc]
call fcn.00401037
push ecx
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00401037
push ecx
push ecx
lea eax, [ebp - 0x18]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [ebp - 8]
push 0x10
call dword [edi]
jmp 0x4041db
push str.0697F55F_F461_46fc_BABA_6D27CC032A75
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
push ecx
cmp eax, 0xb7
mov ecx, esp
sete byte [ebp - 1]
call fcn.0040102d
cmp byte [ebp - 1], bl
push 0x3f3
sete al
movzx eax, al
push 3
push eax
mov ecx, esi
call fcn.0040268f
lea eax, [esi + 0xd4]
push eax
lea ecx, [ebp - 0x10]
call fcn.00401037
push ebx
push 0x40c824
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x10]
call fcn.00401835
lea ecx, [ebp - 0x30]
call fcn.00401471
push ecx
push ecx
mov ecx, esp
push str..dll
call fcn.0040140d
lea ecx, [ebp - 0x10]
call fcn.004014d9
push ecx
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.004059ff
test al, al
jne 0x403dc0
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push ebx
push 2
push ecx
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi + 0xc0]
call fcn.0040605d
push 0x10
call fcn.0040450f
mov edi, eax
pop ecx
cmp edi, ebx
je 0x403de7
push ecx
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.00401037
push esi
mov ecx, edi
call fcn.004069d3
mov edi, eax
jmp 0x403de9
xor edi, edi
mov ecx, dword [edi + 0xc]
cmp ecx, ebx
jne 0x403e0a
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 0x3ef
push 3
push ebx
mov ecx, esi
call fcn.0040268f
jmp 0x403e0f
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, edi
call fcn.00406932
push edi
call fcn.00404523
pop ecx
lea ecx, [ebp - 0x10]
call fcn.00401471
cmp dword [ebp - 0x1c], ebx
je 0x4041eb
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4041eb
mov ecx, esi
call fcn.0040210b
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
call dword [eax + 8]
push esi
mov dword [esi + 0x198], eax
mov edx, dword [eax]
push 0x406162
mov ecx, eax
call dword [edx]
push str.FEC7EF28_53E7_4f06_8F56_FA6D670C8D3C
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esi + 0x1b0]
cmp dword [edi], ebx
je 0x403e91
push ecx
push ecx
lea eax, [esi + 0x1b4]
mov ecx, esp
push eax
call fcn.00401037
push dword [edi]
jmp 0x403f0f
cmp eax, 0xb7
jne 0x403ea8
push ecx
push ecx
mov ecx, esp
call fcn.0040102d
push 0x3f3
jmp 0x403f0f
mov eax, dword [esi + 0x1ac]
invalid