Function at 0x10057b1c
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, dword [ebp + 8]
and dword [ebp - 8], 0
mov dword [ebp - 4], eax
test ebx, ebx
jne 0x10057b50
push 0x10136a48
call sym.mono.dll_mono_get_exception_argument_null
push eax
call sym.mono.dll_mono_raise_exception
pop ecx
pop ecx
xor eax, eax
jmp 0x10057ddb
push edi
add ebx, 4
mov edi, 0x101f7510
push esi
mov esi, dword [ebx]
test esi, esi
jne 0x10057b8e
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 4]
call fcn.100579f9
pop ecx
push 0
mov esi, eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x10057bca
call fcn.100579a3
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebx]
mov eax, dword [esi]
test eax, eax
jne 0x10057be4
push eax
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x10057b5a
cmp dword [esi + 4], 1
je 0x10057bec
push str.mon__nest__1
push 0x1f7
push str...monometadatamonitor.c
push str._Assertion_at__s:_d__condition___s_not_met_n
push 4
push eax
call fcn.100010d9
add esp, 0x18
jmp 0x10057bec
push 0
push dword [ebp + 8]
add esi, 0x14
push esi
call fcn.10014141
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10057bec
cmp eax, dword [ebp - 4]
jne 0x10057bf4
inc dword [esi + 4]
xor eax, eax
inc eax
jmp 0x10057dd9
mov eax, dword [0x101f75c0]
inc dword [eax + 0xb4]
cmp dword [ebp + 0xc], 0
jne 0x10057c0c
xor eax, eax
jmp 0x10057dd9
push 1
push dword [ebp + 8]
call fcn.100643fd
pop ecx
pop ecx
mov edi, dword [esi]
xor ebx, ebx
cmp edi, ebx
jne 0x10057c33
push ebx
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x10057dde
cmp edi, dword [ebp - 4]
je 0x10057e12
lea edi, [esi + 0xc]
mov eax, dword [edi]
cmp eax, ebx
jne 0x10057c8f
push ebx
push bind
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov ebx, eax
test ebx, ebx
jne 0x10057c78
push str.sem___NULL
push 0x239
push str...monometadatamonitor.c
push str._Assertion_at__s:_d__condition___s_not_met_n
push 4
push eax
call fcn.100010d9
add esp, 0x18
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x10057c8d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
cmp dword [ebp + 0xc], 0xffffffff
je 0x10057cb1
call sub.KERNEL32.dll_GetTickCount
push 0x64
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
pop ecx
cmp eax, ecx
jae 0x10057cac
mov dword [ebp - 0xc], eax
jmp 0x10057cb8
mov dword [ebp - 0xc], ecx
jmp 0x10057cb8
mov dword [ebp - 0xc], 0x64
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push ebx
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x10057e17
mov eax, dword [0x101f75c0]
inc dword [eax + 0xb8]
mov eax, dword [0x101f75c0]
inc dword [eax + 0xbc]
call sym.mono.dll_mono_thread_current
mov ebx, eax
push 0x20
push ebx
call fcn.1007f6e1
pop ecx
pop ecx
push 1
push dword [ebp - 0xc]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
push 0x20
push ebx
mov edi, eax
call fcn.1007f70a
pop ecx
pop ecx
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [0x101f75c0]
dec dword [eax + 0xb8]
cmp dword [ebp + 0xc], 0xffffffff
je 0x10057d79
call sub.KERNEL32.dll_GetTickCount
cmp eax, dword [ebp - 8]
jae 0x10057d46
or ecx, 0xffffffff
sub ecx, dword [ebp - 8]
add eax, ecx
and dword [ebp - 8], 0
sub eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jb 0x10057d54
and dword [ebp + 0xc], 0
jmp 0x10057d57
sub dword [ebp + 0xc], eax
cmp edi, 0x102
je 0x10057d6d
cmp edi, 0xc0
jne 0x10057d93
cmp dword [ebp + 0x10], 0
jne 0x10057d9b
cmp dword [ebp + 0xc], 0
ja 0x10057c18
jmp 0x10057d93
cmp edi, 0x102
je 0x10057c18
cmp edi, 0xc0
jne 0x10057d93
cmp dword [ebp + 0x10], 0
je 0x10057db3
test edi, edi
je 0x10057c18
push 3
push dword [ebp + 8]
call fcn.100643fd
xor eax, eax
cmp edi, 0xc0
setne al
dec eax
jmp 0x10057dd7
push 3
call sym.mono.dll_mono_thread_current
push eax
call fcn.1007f735
pop ecx
pop ecx
test eax, eax
je 0x10057c18
push 3
push dword [ebp + 8]
call fcn.100643fd
or eax, 0xffffffff
pop ecx
pop ecx
pop esi
pop edi
pop ebx
leave
ret
cmp dword [esi + 4], 1
je 0x10057e03
push str.mon__nest__1
push 0x223
push str...monometadatamonitor.c
push str._Assertion_at__s:_d__condition___s_not_met_n
push 4
push ebx
call fcn.100010d9
add esp, 0x18
push 2
push dword [ebp + 8]
call fcn.100643fd
xor eax, eax
inc eax
jmp 0x10057dd7
inc dword [esi + 4]
jmp 0x10057e03
cmp dword [esi + 4], 1
je 0x10057e3c
push str.mon__nest__1
push 0x261
push str...monometadatamonitor.c
push str._Assertion_at__s:_d__condition___s_not_met_n
push 4
push ebx
call fcn.100010d9
add esp, 0x18
add esi, 8
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
jmp 0x10057e03