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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0x102568c4
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x102568dc]
cmp eax, 0x2710
jbe 0x1005d2a4
call esi
push ecx
mov dword [0x102568dc], eax
mov esi, esp
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x1005d2b6
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov ecx, esi
push 0x102211c0
mov dword [esi], eax
call fcn.10004a70
test al, al
jne 0x1005d090
push 0xb
push 0x102211c0
mov ecx, esi
call fcn.10004050
lea eax, [ebp - 4]
push eax
call fcn.100e5ee0
mov eax, dword [ebp - 4]
add esp, 8
mov ecx, 0x10219d7c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1005d0ca
test dx, dx
je 0x1005d0c6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1005d0ca
add eax, 4
add ecx, 4
test dx, dx
jne 0x1005d0a4
xor eax, eax
jmp 0x1005d0cf
sbb eax, eax
or eax, 1
or edi, 0xffffffff
test eax, eax
jne 0x1005d161
push 0x102211c0
lea eax, [ebp - 0x10]
push 0x10219e0c
push eax
call fcn.100e6750
add esp, 4
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.100233d0
add esp, 0xc
push eax
lea eax, [ebp - 8]
push eax
call fcn.100233d0
add esp, 0xc
lea ecx, [ebp - 4]
push eax
call fcn.10004870
mov edx, dword [ebp - 8]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1005d12d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0xc]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1005d147
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x10]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1005d161
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 4]
call fcn.100e5b40
add esp, 8
test eax, eax
je 0x1005d183
mov eax, dword [ebp - 0x14]
cmp dword [ebx + 0x1c], eax
je 0x1005d28c
mov dword [ebx + 0x1c], eax
mov ecx, ebx
call fcn.1005e260
push 0x1024d5b0
push dword [ebp - 4]
mov ecx, ebx
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x10], 0
call fcn.1005dfa0
mov dword [ebx + 0x18], eax
test eax, eax
je 0x1005d28c
call fcn.100e8970
test eax, eax
je 0x1005d28c
push ecx
mov ecx, esp
push str.LibDefaEx.dat
call fcn.10004700
lea eax, [ebp - 8]
push eax
call fcn.100e5ee0
mov eax, dword [ebp - 8]
add esp, 8
mov edx, 0x10219d7c
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x1005d208
test si, si
je 0x1005d204
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x1005d208
add ecx, 4
add edx, 4
test si, si
jne 0x1005d1e2
xor ecx, ecx
jmp 0x1005d20d
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x1005d265
push str.LibDefaEx.dat
lea eax, [ebp - 0x18]
push 0x10219e0c
push eax
call fcn.100e6750
add esp, 4
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.100233d0
add esp, 0xc
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.100233d0
add esp, 0xc
lea ecx, [ebp - 8]
push eax
call fcn.10004870
lea ecx, [ebp - 0x10]
call int.10008f10
lea ecx, [ebp - 0xc]
call int.10008f10
lea ecx, [ebp - 0x18]
call int.10008f10
mov eax, dword [ebp - 8]
push 0x1024d5b8
push eax
mov ecx, ebx
call fcn.1005dfa0
mov edx, dword [ebp - 8]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1005d28c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 4]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x1005d2a4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x102568c4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.100030c0
int3