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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x434718
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x443630]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, ecx
push 0x445f24
mov dword [esp + 0x24], vtable.stapi::AutoLock.0
mov dword [esp + 0x28], 0x445f24
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x60], 0
cmp dword [0x445dfc], 0
je case.0x40b189.6
mov eax, dword [ebx]
cmp eax, 0x14
ja case.0x40b189.6
jmp dword [eax*4 + 0x40bac8]
mov eax, dword [ebx + 8]
mov edi, dword [ebx + 4]
mov esi, dword [0x445df0]
push eax
push edi
call fcn.0040a980
add esp, 8
test eax, eax
je 0x40b1af
lea edi, [eax - 8]
jmp 0x40b1c2
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
push edi
call fcn.0040acc0
add esp, 0xc
mov edi, eax
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
lea ecx, [edi + 0x3b]
push ecx
push edx
push eax
call fcn.0040cee0
add esp, 0xc
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 1
mov eax, dword [ebx + 8]
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
add edi, 0x30
push edi
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 2
mov eax, dword [ebx + 8]
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 8]
lea esi, [ebx + 0x10]
push esi
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [esi], 1
je 0x40b272
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
push esi
push ecx
push edx
call fcn.0040acc0
mov ecx, dword [ebx + 4]
add esp, 0xc
push 0
mov edi, eax
mov eax, dword [ebx + 8]
push 0
push eax
push ecx
push 3
call fcn.0040c120
add esp, 0x14
call fcn.0040adc0
mov eax, dword [ebx + 0xc]
add eax, 0x10
xor ecx, ecx
call fcn.0040aa80
mov esi, eax
test esi, esi
je case.0x40b189.6
mov edx, dword [ebx + 0xc]
add edx, 0x10
push edx
jmp 0x40b73f
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov esi, dword [0x445df0]
push eax
push ecx
call fcn.0040a980
add esp, 8
test eax, eax
je case.0x40b189.6
lea edi, [eax - 8]
call fcn.0040adc0
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 3
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x10]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
mov eax, dword [ebx + 8]
mov edi, dword [ebx + 4]
mov esi, dword [0x445df0]
push eax
push edi
mov dword [esp + 0x20], eax
call fcn.0040a980
mov esi, eax
add esp, 8
test esi, esi
je 0x40b3a5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x6b]
test al, 4
je 0x40b347
cmp dword [ebx + 0xc], 0
jne 0x40b347
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
push 0
push 0
push ecx
push edx
push 2
call fcn.0040c120
add esp, 0x14
jmp case.0x40b189.6
test al, 0x10
je 0x40b36a
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
lea ecx, [ebx + 0x10]
push ecx
push edx
push eax
push 2
call fcn.0040c120
add esp, 0x14
jmp case.0x40b189.6
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 4
mov eax, dword [ebx + 0xc]
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
push eax
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
mov ecx, dword [ebx + 0xc]
mov edx, dword [esp + 0x18]
push ecx
add ebx, 0x10
push ebx
push edx
push edi
push 2
call fcn.0040c120
add esp, 0x14
jmp case.0x40b189.6
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov esi, dword [0x445df0]
push eax
push ecx
call fcn.0040a980
mov esi, eax
add esp, 8
test esi, esi
je 0x40b40c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [esi + 0x6b], 0x10
mov dword [esi + 0x24], eax
je 0x40b40c
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
push edx
mov edx, dword [ebx + 4]
lea eax, [ebx + 0x10]
push eax
push ecx
push edx
push 3
call fcn.0040c120
add esp, 0x14
jmp case.0x40b189.6
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 5
mov edx, dword [ebx + 0xc]
mov ecx, dword [0x445dfc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
push edx
lea edx, [ebx + 0x10]
push edx
mov edx, dword [ebx + 8]
push edx
mov edx, dword [ebx + 4]
push edx
call eax
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
mov esi, dword [0x445df0]
push edx
push eax
call fcn.0040a980
add esp, 8
test eax, eax
je case.0x40b189.6
lea edi, [eax - 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [edi + 0x14]
lea ecx, [edi + 0x14]
mov dword [edi + 0x2c], eax
mov dword [esp + 0x10], ecx
cmp esi, ecx
je 0x40b4be
lea eax, [esi + 8]
call fcn.0040afb0
test eax, eax
jne case.0x40b189.6
mov eax, dword [edi + 0x1c]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x40b4a0
sub eax, ecx
mov dword [edi + 0x1c], eax
jmp 0x40b4a7
mov dword [edi + 0x1c], 0
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, esi
call fcn.0040ab20
mov ecx, dword [esp + 0x10]
jmp 0x40b4c2
and dword [edi + 0x73], 0xffffffdf
mov edx, dword [edi + 0x73]
mov eax, edx
shl eax, 0x1c
sar eax, 0x1f
test eax, eax
jne 0x40b542
test dl, 0x10
je 0x40b50c
add edi, 0x20
cmp dword [edi], edi
jne case.0x40b189.6
cmp dword [ecx], ecx
jne case.0x40b189.6
xor ecx, ecx
lea eax, [ecx + 0x10]
call fcn.0040aa80
test eax, eax
je case.0x40b189.6
mov ecx, dword [ebx + 4]
mov dword [eax + 8], ecx
mov edx, dword [ebx + 8]
mov dword [eax + 0xc], edx
jmp 0x40b627
test eax, eax
jne 0x40b542
cmp dword [ecx], ecx
jne 0x40b542
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 6
mov edx, dword [ebx + 8]
mov ecx, dword [0x445dfc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x1c]
push edx
mov edx, dword [ebx + 4]
push edx
call eax
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 0x4000
cmp dword [edi + 0x28], eax
ja case.0x40b189.6
cmp dword [edi + 0x1c], eax
ja case.0x40b189.6
mov edx, dword [edi + 0x73]
shl edx, 0x1e
sar edx, 0x1f
push edx
push edi
call fcn.0040bf50
jmp 0x40baa4
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov esi, dword [0x445df0]
push eax
push ecx
call fcn.0040a980
add esp, 8
test eax, eax
je case.0x40b189.6
lea edi, [eax - 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [edi + 0x20]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x20]
cmp esi, eax
je 0x40b5db
lea eax, [esi + 8]
call fcn.0040afb0
test eax, eax
jne case.0x40b189.6
mov eax, dword [edi + 0x28]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x40b5c3
sub eax, ecx
mov dword [edi + 0x28], eax
jmp 0x40b5ca
mov dword [edi + 0x28], 0
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, esi
call fcn.0040ab20
mov ecx, dword [edi + 0x73]
mov eax, ecx
shl eax, 0x1c
sar eax, 0x1f
test eax, eax
jne 0x40b67b
test cl, 0x10
je 0x40b642
lea eax, [edi + 0x20]
cmp dword [eax], eax
jne case.0x40b189.6
lea eax, [edi + 0x14]
cmp dword [eax], eax
jne case.0x40b189.6
xor ecx, ecx
lea eax, [ecx + 0x10]
call fcn.0040aa80
test eax, eax
je case.0x40b189.6
mov edx, dword [ebx + 4]
mov dword [eax + 8], edx
mov ecx, dword [ebx + 8]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x445dbc]
mov dword [eax], 0x445db8
mov dword [eax + 4], ecx
mov dword [ecx], eax
mov dword [0x445dbc], eax
jmp case.0x40b189.6
test eax, eax
jne 0x40b67b
lea eax, [edi + 0x20]
cmp dword [eax], eax
jne 0x40b67b
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 7
mov eax, dword [ebx + 8]
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x20]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 0x4000
cmp dword [edi + 0x28], eax
ja case.0x40b189.6
cmp dword [edi + 0x1c], eax
ja case.0x40b189.6
mov ecx, dword [edi + 0x73]
shl ecx, 0x1e
sar ecx, 0x1f
push ecx
push edi
call fcn.0040bf50
jmp 0x40baa4
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
lea edi, [ebx + 0x10]
push edi
push edx
push eax
call fcn.0040ae30
add esp, 0xc
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 8
mov eax, dword [ebx + 8]
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x24]
push edi
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 9
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x28]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0xc]
add eax, 0x10
xor ecx, ecx
call fcn.0040aa80
mov esi, eax
test esi, esi
je case.0x40b189.6
mov ecx, dword [ebx + 0xc]
add ecx, 0x10
push ecx
push ebx
push esi
call fcn.00421960
add esp, 0xc
mov eax, esi
call fcn.0040afb0
mov eax, esi
call fcn.0040ab20
jmp case.0x40b189.6
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
mov esi, dword [0x445df8]
push edx
push eax
call fcn.0040a980
add esp, 8
test eax, eax
je 0x40b77e
lea edi, [eax - 8]
call fcn.0040af30
lea esi, [esp + 0x14]
call fcn.0040ac50
mov byte [esp + 0x60], 0xa
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x2c]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
mov ecx, dword [ebx + 0x30]
mov edx, dword [ebx + 0xc]
mov edi, dword [ebx + 4]
mov esi, dword [0x445df8]
lea eax, [ecx + ebx + 0x34]
sub edx, eax
mov dword [esp + 0x14], eax
lea eax, [edx + ebx + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 8]
push eax
push edi
call fcn.0040a980
add esp, 8
test eax, eax
jne 0x40b827
mov cx, word [ebx + 0x10]
mov dword [esp + 0x34], eax
lea edx, [esp + 0x30]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov word [esp + 0x50], ax
mov eax, dword [ebx + 8]
push edx
push eax
push edi
mov word [esp + 0x40], cx
call fcn.0040ae30
add esp, 0xc
lea esi, [esp + 0x28]
call fcn.0040ac50
mov byte [esp + 0x60], 0xb
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x30]
lea eax, [ebx + 0x2c]
push eax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
push eax
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
mov ecx, dword [ebx + 0x30]
mov edx, dword [ebx + 0xc]
mov edi, dword [ebx + 4]
mov esi, dword [0x445df8]
lea eax, [ecx + ebx + 0x34]
sub edx, eax
mov dword [esp + 0x10], eax
lea eax, [edx + ebx + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 8]
push eax
push edi
call fcn.0040a980
add esp, 8
test eax, eax
jne 0x40b8de
mov cx, word [ebx + 0x10]
mov dword [esp + 0x34], eax
lea edx, [esp + 0x30]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov word [esp + 0x50], ax
mov eax, dword [ebx + 8]
push edx
push eax
push edi
mov word [esp + 0x40], cx
call fcn.0040ae30
add esp, 0xc
lea esi, [esp + 0x28]
call fcn.0040ac50
mov byte [esp + 0x60], 0xc
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x34]
lea eax, [ebx + 0x2c]
push eax
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push eax
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x40b189.6
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov esi, dword [0x445df8]
push ecx
push edx
call fcn.0040a980
add esp, 8
test eax, eax
je case.0x40b189.6
lea edi, [eax - 8]
mov esi, dword [edi + 0x14]
lea eax, [edi + 0x14]
cmp esi, eax
je 0x40b98c
lea eax, [esi + 8]
call fcn.0040afb0
test eax, eax
jne case.0x40b189.6
mov eax, dword [esi + 0x14]
sub dword [edi + 0x1c], eax
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, esi
call fcn.0040ab20
lea eax, [edi + 0x14]
cmp dword [eax], eax
jne 0x40b9be
lea esi, [esp + 0x28]
call fcn.0040ac50
mov byte [esp + 0x60], 0xd
jmp 0x40b99e
and dword [edi + 0x4e], 0xfffffff7
lea esi, [esp + 0x28]
call fcn.0040ac50
mov byte [esp + 0x60], 0xe
mov eax, dword [ebx + 8]
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x38]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 0x4000
cmp dword [edi + 0x28], eax
ja case.0x40b189.6
cmp dword [edi + 0x1c], eax
ja case.0x40b189.6
mov ecx, dword [edi + 0x4e]
shl ecx, 0x1e
sar ecx, 0x1f
push ecx
push edi
jmp 0x40ba9f
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
mov esi, dword [0x445df8]
push edx
push eax
call fcn.0040a980
add esp, 8
test eax, eax
je case.0x40b189.6
lea edi, [eax - 8]
mov esi, dword [edi + 0x20]
mov dword [esp + 0x10], edi
add edi, 0x20
cmp esi, edi
je 0x40ba53
lea eax, [esi + 8]
call fcn.0040afb0
test eax, eax
jne case.0x40b189.6
mov ecx, dword [esi + 0x14]
mov eax, dword [esp + 0x10]
sub dword [eax + 0x28], ecx
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, esi
call fcn.0040ab20
cmp dword [edi], edi
jne 0x40ba81
lea esi, [esp + 0x28]
call fcn.0040ac50
mov byte [esp + 0x60], 0xf
jmp 0x40ba61
lea esi, [esp + 0x28]
call fcn.0040ac50
mov byte [esp + 0x60], 0x10
mov eax, dword [ebx + 8]
mov ecx, dword [0x445dfc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x3c]
push eax
mov eax, dword [ebx + 4]
push eax
call edx
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x10]
mov eax, 0x4000
cmp dword [ecx + 0x28], eax
ja case.0x40b189.6
cmp dword [ecx + 0x1c], eax
ja case.0x40b189.6
mov edx, dword [ecx + 0x4e]
shl edx, 0x1e
sar edx, 0x1f
push edx
push ecx
call fcn.0040c400
add esp, 8
push 0x445f24
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret