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

Disassembly:
push ebp
sub esp, 0x410
lea ebp, [esp - 4]
mov eax, dword [0x4490e8]
xor eax, ebp
mov dword [ebp + 0x410], eax
push 0x14
mov eax, 0x4308f9
call fcn.00425cc9
mov eax, dword [ebp + 0x420]
mov edi, dword [ebp + 0x41c]
mov dword [ebp - 0x18], eax
mov eax, dword [0x449908]
xor ebx, ebx
mov dword [ebp - 0x20], edi
cmp eax, ebx
je 0x410cb4
mov eax, dword [eax + 8]
test eax, eax
jle 0x410cb4
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
push dword [0x449068]
call esi
push dword [ebp - 0x18]
push dword [0x44906c]
call esi
mov eax, dword [0x449908]
jmp 0x41109e
mov eax, dword [0x44a000]
test eax, eax
je 0x410ce0
push ebx
push 0x436054
push 0x436048
push ebx
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]
jmp 0x410caa
xor eax, eax
mov esi, 0x4496dc
mov dword [ebp - 0x14], ebx
cmp eax, esi
je 0x410cf8
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], ebx
cmp dword [0x449908], ebx
je 0x410d22
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
push dword [0x449068]
call esi
push dword [ebp - 0x18]
push dword [0x44906c]
call esi
jmp 0x411088
call fcn.0040d77a
push 0x103
push 0x4496f8
push eax
mov dword [0x44990c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 8
pop ecx
mov esi, str.mutexTSLOGTSLOG
lea edi, [ebp + 0x208]
rep movsd dword es:[edi], dword [esi]
push 0x1e6
lea eax, [ebp + 0x22a]
push ebx
push eax
movsw word es:[edi], word [esi]
call sub.MSVCR90.dll_memset
push 9
pop ecx
mov esi, str.filemapTSLOGTSLOG
lea edi, [ebp]
rep movsd dword es:[edi], dword [esi]
push 0x1e2
lea eax, [ebp + 0x26]
push ebx
push eax
movsw word es:[edi], word [esi]
call sub.MSVCR90.dll_memset
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, dword [sym.imp.MSVCR90.dll_wcslen]
push eax
push 0x435ff4
mov dword [ebp - 0x1c], eax
lea eax, [ebp + 0x208]
push 0x82
push eax
call esi
mov edi, dword [sym.imp.MSVCR90.dll__snwprintf]
pop ecx
lea eax, [ebp + eax*2 + 0x208]
push eax
call edi
add esp, 0x10
push dword [ebp - 0x1c]
lea eax, [ebp]
push 0x435ff4
push 0x82
push eax
call esi
pop ecx
lea eax, [ebp + eax*2]
push eax
call edi
add esp, 0x10
lea eax, [ebp + 0x208]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x449900], eax
cmp eax, ebx
jne 0x410e0b
push 0x10
push 0x4496f8
push str.CreateMutex_failure
push ebx
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
cmp eax, 0xb7
jne 0x410e28
push 0xffffffffffffffff
push dword [0x449900]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp]
push eax
mov edi, 0x24c
push edi
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [0x449904], eax
cmp eax, ebx
jne 0x410e7a
push 0x10
push 0x4496f8
push str.CreateFileMapping_failure
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [0x449900]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [0x449900]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x449900], ebx
jmp 0x410e03
call esi
push edi
push ebx
push ebx
push 0xf001f
push dword [0x449904]
cmp eax, 0xb7
sete byte [ebp - 0xd]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x449908], eax
cmp eax, ebx
jne 0x410edf
push 0x10
push 0x4496f8
push str.MapViewOfFile_failure
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [0x449904]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [0x449900]
mov dword [0x449904], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [0x449900]
call esi
jmp 0x410e72
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [0x449068]
call esi
push dword [ebp - 0x18]
push dword [0x44906c]
call esi
mov dword [0x44a000], ebx
cmp byte [ebp - 0xd], bl
je 0x410f9c
mov eax, dword [0x449908]
mov edi, 0x1000
cmp dword [eax + 0x244], edi
jae 0x411031
mov esi, dword [eax + 0x240]
cmp esi, ebx
je 0x410f4e
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x449908]
mov dword [eax + 0x244], ebx
mov eax, dword [0x449908]
mov dword [eax + 0x240], ebx
mov esi, 0x2000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [0x449908]
mov dword [ecx + 0x240], eax
mov eax, dword [0x449908]
add eax, 0x240
cmp dword [eax], ebx
je 0x411031
push esi
push ebx
push dword [eax]
call sub.MSVCR90.dll_memset
mov eax, dword [0x449908]
add esp, 0xc
mov dword [eax + 0x244], edi
jmp 0x411031
push edi
push ebx
push dword [0x449908]
call sub.MSVCR90.dll_memset
add esp, 0xc
mov esi, 0x2000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [0x449908]
mov dword [ecx + 0x240], eax
mov eax, dword [0x449908]
add eax, 0x240
cmp dword [eax], ebx
je 0x410ff5
push esi
push ebx
push dword [eax]
call sub.MSVCR90.dll_memset
mov eax, dword [0x449908]
add esp, 0xc
mov dword [eax + 0x244], 0x1000
mov eax, dword [0x449908]
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [0x449908]
mov dword [eax], 0x28100
mov eax, dword [0x449908]
mov dword [eax + 4], edi
mov ecx, dword [0x449908]
push 1
call fcn.0040e995
mov ecx, dword [0x449908]
push 1
call fcn.0041031e
mov eax, dword [0x449908]
push 1
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, dword [0x449908]
mov eax, dword [eax + 8]
mov ecx, dword [0x449908]
mov dword [0x449914], eax
cmp dword [ecx + 0xe8], 0xffffffff
jne 0x41106c
cmp dword [ecx + 0x2c], ebx
je 0x41106c
mov eax, dword [ecx + 0x23c]
inc eax
jmp 0x411072
mov eax, dword [ecx + 0x23c]
mov dword [0x449910], eax
call fcn.0040db3c
push dword [0x449900]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [0x449908]
cmp dword [ebp - 0x14], ebx
je 0x41109c
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.00425cba
add ebp, 0x414
leave
ret