Function at 0x5198e0
Capabilities:
Check mutex on windows
Get thread local storage value

Disassembly:
push ecx
push ebp
push esi
push edi
push 4
call fcn.005354b8
xor ebp, ebp
add esp, 4
cmp eax, ebp
je 0x5198fc
mov dword [eax], 0x7138e4
jmp 0x5198fe
xor eax, eax
push eax
mov eax, ebx
call fcn.00519c40
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebx], 0x713b98
push ebp
push ebp
mov dword [ebx + 0x74], 0x713a6c
mov dword [ebx + 0x7c], ebp
mov dword [ebx + 0x88], 1
mov dword [ebx + 0x80], ebp
mov dword [ebx + 0x84], ebp
mov dword [ebx + 0x78], ebp
mov edi, 0x712a88
push ebp
mov dword [ebx + 0xbc], edi
mov dword [ebx + 0xc0], ebp
call esi
cmp eax, ebp
mov dword [ebx + 0xc0], eax
jne 0x51996c
push 0x716a3c
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0xffffffff
call sub.MSVCR71.dll__CxxThrowException
push ebp
push ebp
push ebp
mov dword [ebx + 0xc4], edi
mov dword [ebx + 0xc8], ebp
call esi
cmp eax, ebp
mov dword [ebx + 0xc8], eax
jne 0x51999e
push 0x716a3c
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x14], 0xffffffff
call sub.MSVCR71.dll__CxxThrowException
push ebp
push ebp
push ebp
mov dword [ebx + 0xd0], edi
mov dword [ebx + 0xd4], ebp
call esi
cmp eax, ebp
mov dword [ebx + 0xd4], eax
jne 0x5199d0
push 0x716a3c
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], 0xffffffff
call sub.MSVCR71.dll__CxxThrowException
push ebp
push ebp
push ebp
mov dword [ebx + 0xd8], edi
mov dword [ebx + 0xdc], ebp
call esi
cmp eax, ebp
mov dword [ebx + 0xdc], eax
jne 0x519a02
push 0x716a3c
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0xffffffff
call sub.MSVCR71.dll__CxxThrowException
push ebp
push ebp
push ebp
mov dword [ebx + 0xe0], edi
mov dword [ebx + 0xe4], ebp
call esi
cmp eax, ebp
mov dword [ebx + 0xe4], eax
jne 0x519a34
push 0x716a3c
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x14], 0xffffffff
call sub.MSVCR71.dll__CxxThrowException
push ebp
push ebp
push ebp
mov dword [ebx + 0xe8], edi
mov dword [ebx + 0xec], ebp
call esi
cmp eax, ebp
mov dword [ebx + 0xec], eax
jne 0x519a66
push 0x716a3c
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], 0xffffffff
call sub.MSVCR71.dll__CxxThrowException
push ebp
push ebp
push ebp
mov dword [ebx + 0xf0], edi
mov dword [ebx + 0xf4], ebp
call esi
cmp eax, ebp
mov dword [ebx + 0xf4], eax
jne 0x519a98
push 0x716a3c
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0xffffffff
call sub.MSVCR71.dll__CxxThrowException
mov dword [ebx + 0x104], ebp
mov dword [ebx + 0xfc], ebp
mov dword [ebx + 0x100], ebp
mov eax, 0x713b1c
mov dword [ebx + 0xf8], eax
mov dword [ebx + 0x114], ebp
mov dword [ebx + 0x10c], ebp
mov dword [ebx + 0x110], ebp
mov dword [ebx + 0x108], eax
mov dword [ebx + 0x124], ebp
mov dword [ebx + 0x11c], ebp
mov dword [ebx + 0x120], ebp
mov ecx, 0x713a3c
mov dword [ebx + 0x118], ecx
mov dword [ebx + 0x134], ebp
mov dword [ebx + 0x12c], ebp
mov dword [ebx + 0x130], ebp
mov dword [ebx + 0x128], ecx
mov dword [ebx + 0x144], ebp
mov dword [ebx + 0x13c], ebp
mov dword [ebx + 0x140], ebp
mov dword [ebx + 0x138], eax
lea esi, [ebx + 0x148]
mov dword [esi], 0x713a20
mov dword [esi + 8], ebp
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], ebp
mov dword [esi + 0x10], ebp
mov dword [esi + 4], ebp
mov dword [ebx + 0x16c], ebp
mov dword [ebx + 0x164], ebp
mov dword [ebx + 0x168], ebp
mov dword [ebx + 0x160], 0x713acc
push 0x94
mov dword [ebx + 0x170], 0x713b44
mov dword [ebx + 0x174], 0x25
mov dword [ebx + 0x17c], ebp
call fcn.005354dd
mov ecx, dword [ebx + 0x174]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
mov dword [ebx + 0x178], edi
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebx + 0x170], 0x713b7c
mov eax, dword [0x728c28]
mov edi, dword [ebx + 0xc0]
add esp, 4
cmp eax, 0xffffffff
je 0x519bce
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebp
je 0x519bce
or edx, 0xffffffff
mov ecx, edi
call fcn.004fc390
jmp 0x519bd7
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebx + 0x98]
mov dword [ebx + 0x70], ebp
mov edx, dword [0x729430]
mov ecx, eax
mov dword [ecx], edx
mov edx, dword [0x729434]
mov dword [ecx + 4], edx
mov edx, dword [0x729438]
mov dword [ecx + 8], edx
mov edx, dword [eax]
lea ecx, [ebx + 0x8c]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
mov ecx, dword [ebx + 0xc0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, 0x64
call fcn.00528780
pop edi
pop esi
mov dword [ebx + 0x15c], 0x64
mov eax, ebx
pop ebp
pop ecx
ret