Function at 0x411ce0
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Set thread local storage value
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x4213ab
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x4300b8]
xor eax, esp
mov dword [esp + 0x420], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4300b8]
xor eax, esp
push eax
lea eax, [esp + 0x438]
mov dword fs:[0], eax
mov eax, dword [0x430e50]
xor ebp, ebp
mov edi, ecx
mov ebx, edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], ebx
cmp eax, ebp
je 0x411d5d
mov eax, dword [eax + 8]
test eax, eax
jle 0x411d5d
mov ecx, dword [0x430468]
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
push ecx
call esi
mov edx, dword [0x43046c]
push ebx
push edx
call esi
mov eax, dword [0x430e50]
jmp 0x4121ae
mov eax, dword [0x432c20]
test eax, eax
je 0x411d91
push ebp
push 0x425b78
push 0x425b80
push ebp
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [0x430e50]
jmp 0x4121ae
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x18], esi
cmp ecx, 0x430b28
je 0x411db5
push 0x430b28
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, 0x430b28
mov dword [esp + 0x18], esi
mov dword [esp + 0x440], ebp
cmp dword [0x430e50], ebp
je 0x411e04
mov edx, dword [0x430468]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
call edi
mov eax, dword [0x43046c]
push ebx
push eax
call edi
mov edi, dword [0x430e50]
mov dword [esp + 0x440], 0xffffffff
cmp esi, ebp
je 0x411dfd
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x18], ebp
mov eax, edi
jmp 0x4121ae
call fcn.00415dc0
push 0x103
push 0x430920
push eax
mov dword [0x430e54], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, 8
mov esi, str.mutexTSLOGTSLOG
lea edi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
push 0x1e6
lea ecx, [esp + 0x4a]
push ebp
push ecx
movsw word es:[edi], word [esi]
call sub.MSVCR90.dll_memset
mov ecx, 9
mov esi, str.filemapTSLOGTSLOG
lea edi, [esp + 0x238]
rep movsd dword es:[edi], dword [esi]
push 0x1e2
lea edx, [esp + 0x262]
push ebp
push edx
movsw word es:[edi], word [esi]
call sub.MSVCR90.dll_memset
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
lea eax, [esp + 0x24]
lea edx, [eax + 2]
jmp 0x411e80
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x411e80
mov edi, dword [sym.imp.MSVCR90.dll__snwprintf]
sub eax, edx
push esi
sar eax, 1
push 0x4256e4
lea eax, [esp + eax*2 + 0x2c]
push 0x82
push eax
call edi
lea eax, [esp + 0x23c]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x411eb4
push esi
sub eax, edx
sar eax, 1
push 0x4256e4
lea ecx, [esp + eax*2 + 0x234]
push 0x82
push ecx
call edi
add esp, 0x10
lea edx, [esp + 0x24]
push edx
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x430e48], eax
cmp eax, ebp
jne 0x411f0d
push 0x10
push 0x430920
push str.CreateMutex_failure
push ebp
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
or edi, 0xffffffff
cmp eax, 0xb7
jne 0x411f2c
mov eax, dword [0x430e48]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ecx, [esp + 0x22c]
push ecx
push 0x24c
push ebp
push 4
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [0x430e4c], eax
cmp eax, ebp
jne 0x411f86
push 0x10
push 0x430920
push str.CreateFileMapping_failure
push ebp
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [0x430e48]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [0x430e48]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov dword [0x430e48], ebp
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call esi
mov ecx, dword [0x430e4c]
push 0x24c
push ebp
push ebp
push 0xf001f
cmp eax, 0xb7
push ecx
sete bl
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x430e50], eax
cmp eax, ebp
jne 0x411ffc
push 0x10
push 0x430920
push str.MapViewOfFile_failure
push ebp
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [0x430e4c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [0x430e48]
push eax
mov dword [0x430e4c], ebp
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x430e48]
push ecx
call esi
push edi
mov dword [0x430e48], ebp
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov edx, dword [esp + 0x20]
mov eax, dword [0x430468]
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
push eax
call esi
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x43046c]
push ecx
push edx
call esi
mov dword [0x432c20], ebp
test bl, bl
je 0x4120ac
mov esi, dword [0x430e50]
mov ebx, 0x1000
cmp dword [esi + 0x244], ebx
jae 0x412132
mov esi, dword [esi + 0x240]
cmp esi, ebp
je 0x41206b
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x430e50]
mov dword [eax + 0x244], ebp
mov dword [eax + 0x240], ebp
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, dword [0x430e50]
mov dword [esi + 0x240], eax
cmp eax, ebp
je 0x412132
push 0x2000
push ebp
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov dword [esi + 0x244], ebx
jmp 0x412132
mov eax, dword [0x430e50]
push 0x24c
push ebp
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, dword [0x430e50]
mov dword [esi + 0x240], eax
cmp eax, ebp
je 0x4120fc
push 0x2000
push ebp
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov dword [esi + 0x244], 0x1000
add esi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [0x430e50]
push 1
mov dword [eax], 0x28100
mov dword [eax + 4], 0x24c
call fcn.004122a0
mov ecx, dword [0x430e50]
push 1
call fcn.004149f0
mov esi, dword [0x430e50]
push 1
add esi, 8
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov ecx, dword [0x430e50]
mov edx, dword [ecx + 8]
mov esi, dword [0x430e50]
mov dword [0x430e5c], edx
cmp dword [esi + 0xe8], edi
jne 0x41216e
cmp dword [esi + 0x2c], ebp
je 0x41216e
mov eax, dword [esi + 0x23c]
inc eax
mov dword [0x430e58], eax
jmp 0x41217a
mov ecx, dword [esi + 0x23c]
mov dword [0x430e58], ecx
call fcn.00415fd0
mov edx, dword [0x430e48]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [0x430e50]
mov dword [esp + 0x440], edi
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x4121ac
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x18], ebp
mov eax, esi
mov ecx, dword [esp + 0x438]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x420]
xor ecx, esp
call fcn.0041e4d2
add esp, 0x430
ret