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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10018130
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x1001e388]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x1001e388]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebx + 4]
cmp eax, 1
mov dword [esp + 0x18], ebx
jne 0x10002306
mov eax, dword [ebx + 0x10]
shr eax, 0x19
test al, 1
je 0x1000209a
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
lea eax, [esp + 0x2c]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], 0x19
mov dword [esp + 0x38], 0
call fcn.10014b80
push 0x100202e8
mov dword [esp + 0x20], vtable.nfapi::AutoLock.0
mov dword [esp + 0x24], 0x100202e8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x50], 0
mov edi, dword [0x100201cc]
mov eax, dword [edi]
mov esi, dword [ebx + 8]
mov ebx, dword [ebx + 0xc]
push 0
push eax
push ebx
push esi
call fcn.10017c80
mov eax, dword [edi + eax*4 + 4]
test eax, eax
je 0x100024d3
mov ecx, dword [eax]
cmp ecx, esi
jne 0x100020ee
mov edx, dword [eax + 4]
cmp edx, ebx
je 0x100020fa
mov eax, dword [eax + 8]
test eax, eax
jne 0x100020e1
jmp 0x100024d3
mov esi, dword [esp + 0x18]
lea ebx, [eax - 8]
mov eax, dword [esi + 0x10]
shr eax, 4
test al, 1
je 0x100021e0
mov ecx, dword [ebx + 0x34]
mov dword [esp + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebx + 0x5c], eax
lea eax, [ebx + 0x2c]
cmp dword [eax], eax
je 0x100021b1
cmp dword [esp + 0x14], 0
mov esi, dword [ebx + 0x2c]
jne 0x1000213a
cmp dword [esi + 0x14], 0
ja 0x100021b1
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
push 0x100202e8
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi + 8]
call fcn.10014b80
push 0x100202e8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edx, edx
cmp edi, edx
jne 0x100021a1
mov eax, dword [ebx + 0x34]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x1000217b
sub eax, ecx
mov dword [ebx + 0x34], eax
jmp 0x1000217e
mov dword [ebx + 0x34], edx
mov eax, dword [esi + 0x14]
cmp dword [esp + 0x14], eax
jb 0x1000218d
sub dword [esp + 0x14], eax
jmp 0x10002191
mov dword [esp + 0x14], edx
mov eax, esi
call fcn.10017920
lea eax, [ebx + 0x2c]
cmp dword [eax], eax
jne 0x1000212a
jmp 0x100021b1
mov ecx, dword [ebx + 0x2c]
lea eax, [ebx + 0x2c]
mov dword [esi], ecx
mov dword [esi + 4], eax
mov dword [ecx + 4], esi
mov dword [eax], esi
test byte [ebx + 0xab], 2
jne 0x100021dc
lea eax, [ebx + 0x2c]
cmp dword [eax], eax
jne 0x100021dc
mov esi, dword [esp + 0x18]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
push edx
push eax
mov edx, 4
call fcn.100158e0
add esp, 8
jmp 0x100021e0
mov esi, dword [esp + 0x18]
mov ecx, dword [esi + 0x10]
shr ecx, 5
test cl, 1
je 0x100022c0
mov edx, dword [ebx + 0x40]
mov dword [esp + 0x14], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebx + 0x5c], eax
lea eax, [ebx + 0x38]
cmp dword [eax], eax
je 0x10002291
cmp dword [esp + 0x14], 0
mov esi, dword [ebx + 0x38]
jne 0x1000221a
cmp dword [esi + 0x14], 0
ja 0x10002291
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
push 0x100202e8
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi + 8]
call fcn.10014b80
push 0x100202e8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edx, edx
cmp edi, edx
jne 0x10002281
mov eax, dword [ebx + 0x40]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x1000225b
sub eax, ecx
mov dword [ebx + 0x40], eax
jmp 0x1000225e
mov dword [ebx + 0x40], edx
mov eax, dword [esi + 0x14]
cmp dword [esp + 0x14], eax
jb 0x1000226d
sub dword [esp + 0x14], eax
jmp 0x10002271
mov dword [esp + 0x14], edx
mov eax, esi
call fcn.10017920
lea eax, [ebx + 0x38]
cmp dword [eax], eax
jne 0x1000220a
jmp 0x10002291
mov ecx, dword [ebx + 0x38]
lea eax, [ebx + 0x38]
mov dword [esi], ecx
mov dword [esi + 4], eax
mov dword [ecx + 4], esi
mov dword [eax], esi
test byte [ebx + 0xab], 2
jne 0x100022bc
lea eax, [ebx + 0x38]
cmp dword [eax], eax
jne 0x100022bc
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
push eax
push ecx
mov edx, 5
call fcn.100158e0
add esp, 8
jmp 0x100022c0
mov esi, dword [esp + 0x18]
mov eax, 0x800000
cmp dword [ebx + 0x40], eax
ja 0x100022ed
cmp dword [ebx + 0x34], eax
ja 0x100022ed
cmp dword [ebx + 0x28], 0x40000
ja 0x100022ed
cmp dword [ebx + 0x1c], eax
ja 0x100022ed
mov edx, dword [ebx + 0xa7]
push edx
push ebx
call fcn.10015760
add esp, 8
mov eax, dword [esi + 0x10]
shr eax, 1
test al, 1
je 0x100024d3
mov edi, ebx
call fcn.10013ae0
jmp 0x100024d3
cmp eax, 2
jne 0x100024de
push 0x100202e8
mov dword [esp + 0x20], vtable.nfapi::AutoLock.0
mov dword [esp + 0x24], 0x100202e8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x50], 1
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov esi, dword [0x100201d4]
push ecx
push edx
call fcn.10017b80
add esp, 8
test eax, eax
je 0x100024d3
lea edi, [eax - 8]
mov eax, dword [ebx + 0x10]
shr eax, 0xc
test al, 1
je 0x100023ef
mov ecx, dword [edi + 0x2c]
lea eax, [edi + 0x2c]
cmp ecx, eax
mov dword [esp + 0x14], ecx
je 0x100023cc
lea esi, [esp + 0x24]
call fcn.100010f0
mov esi, dword [esp + 0x14]
lea eax, [esi + 8]
call fcn.10014b80
mov ecx, dword [esp + 0x28]
push ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x14], 0
jne 0x100023d3
mov eax, dword [edi + 0x34]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x100023ab
sub eax, ecx
mov dword [edi + 0x34], eax
jmp 0x100023b2
mov dword [edi + 0x34], 0
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, esi
call fcn.10017920
or dword [edi + 0xc0], 2
jmp 0x100023d3
and dword [edi + 0xc0], 0xfffffffd
lea eax, [edi + 0x2c]
cmp dword [eax], eax
jne 0x100023ef
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
push edx
push eax
mov edx, 0xc
call fcn.100158e0
add esp, 8
mov ecx, dword [ebx + 0x10]
shr ecx, 0xd
test cl, 1
je 0x1000249b
mov edx, dword [edi + 0x40]
lea eax, [edi + 0x38]
cmp dword [eax], eax
mov dword [esp + 0x14], edx
je 0x1000247f
mov esi, dword [edi + 0x38]
push 0x100202e8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi + 8]
call fcn.10014b80
push 0x100202e8
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edx, edx
cmp ebx, edx
jne 0x1000247b
mov eax, dword [edi + 0x40]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x10002446
sub eax, ecx
mov dword [edi + 0x40], eax
jmp 0x10002449
mov dword [edi + 0x40], edx
mov eax, dword [esi + 0x14]
cmp dword [esp + 0x14], eax
jb 0x10002458
sub dword [esp + 0x14], eax
jmp 0x1000245c
mov dword [esp + 0x14], edx
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, esi
call fcn.10017920
cmp dword [esp + 0x14], 0
je 0x1000247b
lea eax, [edi + 0x38]
cmp dword [eax], eax
jne 0x1000240c
mov ebx, dword [esp + 0x18]
lea eax, [edi + 0x38]
cmp dword [eax], eax
jne 0x1000249b
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
push eax
push ecx
mov edx, 0xd
call fcn.100158e0
add esp, 8
mov eax, 0x800000
cmp dword [edi + 0x40], eax
ja 0x100024c4
cmp dword [edi + 0x34], eax
ja 0x100024c4
cmp dword [edi + 0x28], eax
ja 0x100024c4
cmp dword [edi + 0x1c], eax
ja 0x100024c4
mov edx, dword [edi + 0xbc]
push edx
push edi
call fcn.10015640
add esp, 8
mov eax, dword [ebx + 0x10]
shr eax, 9
test al, 1
je 0x100024d3
call fcn.10013910
push 0x100202e8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.10007bc1
mov esp, ebp
pop ebp
ret