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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1007857e
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x1008f3a0]
xor eax, esp
mov dword [esp + 0xa8], eax
push ebx
push esi
push edi
mov eax, dword [0x1008f3a0]
xor eax, esp
push eax
lea eax, [esp + 0xc0]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov edi, ecx
lea eax, [edi + 0x1c]
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0xc8], 0
mov eax, dword [esi]
mov cx, word [esi + 4]
push 1
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x80], eax
push ebx
xor eax, eax
mov word [esp + 0x88], cx
mov byte [esp + 0x23], 0
mov byte [esp + 0x24], 0x3f
call fcn.100180b0
cmp eax, 0xffffffff
je 0x1004a2f9
mov byte [esp + 0x17], 1
lea esi, [edi + 0xc]
lea eax, [esp + 0x24]
push eax
lea edi, [esp + 0x7c]
mov eax, esi
mov dword [esp + 0x24], esi
call fcn.1004ada0
mov edi, dword [esp + 0x24]
test edi, edi
mov ecx, dword [esi + 4]
mov dword [esp + 0x30], ecx
je 0x1004a323
cmp edi, esi
je 0x1004a328
call fcn.10055f58
mov esi, dword [esp + 0x28]
cmp esi, dword [esp + 0x30]
je 0x1004a3aa
test edi, edi
jne 0x1004a33b
call fcn.10055f58
cmp esi, dword [edi + 4]
jne 0x1004a345
call fcn.10055f58
push 0xffffffffffffffff
push 0
lea edi, [esi + 0x14]
push ebx
mov ecx, edi
call fcn.10001720
mov edx, dword [ebx + 0x1c]
mov dword [edi + 0x1c], edx
mov eax, dword [ebx + 0x20]
mov dword [edi + 0x20], eax
mov ecx, dword [ebx + 0x24]
mov dword [edi + 0x24], ecx
mov edx, dword [ebx + 0x28]
mov dword [edi + 0x28], edx
mov edi, dword [esp + 0x24]
cmp esi, dword [edi + 4]
jne 0x1004a37a
call fcn.10055f58
mov dword [esi + 0x40], 0
cmp esi, dword [edi + 4]
jne 0x1004a38b
call fcn.10055f58
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x44], eax
cmp esi, dword [edi + 4]
jne 0x1004a39e
call fcn.10055f58
mov al, byte [esp + 0x17]
mov byte [esi + 0x48], al
jmp 0x1004a491
or eax, 0xffffffff
xor esi, esi
mov dword [esp + 0x98], 0xf
mov dword [esp + 0x94], esi
mov byte [esp + 0x84], 0
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
push eax
push esi
push ebx
lea ecx, [esp + 0x8c]
mov byte [esp + 0xd4], 1
call fcn.10001720
mov ecx, dword [ebx + 0x1c]
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x24]
mov dword [esp + 0x9c], ecx
mov ecx, dword [ebx + 0x28]
mov dword [esp + 0xa0], edx
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], ecx
mov dword [esp + 0xac], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dl, byte [esp + 0x17]
mov dword [esp + 0xb0], eax
lea edi, [esp + 0x80]
lea eax, [esp + 0x78]
lea ebx, [esp + 0x38]
mov byte [esp + 0xb4], dl
call fcn.1004ae10
mov ebx, dword [esp + 0x20]
push eax
lea eax, [esp + 0x30]
push eax
mov byte [esp + 0xd0], 2
call fcn.1004acd0
mov esi, 0x10
cmp dword [esp + 0x58], esi
jb 0x1004a478
mov ecx, dword [esp + 0x44]
push ecx
call fcn.100549f0
add esp, 4
cmp dword [esp + 0x98], esi
jb 0x1004a491
mov edx, dword [esp + 0x84]
push edx
call fcn.100549f0
add esp, 4
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [esp + 0xc0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.1005574a
mov esp, ebp
pop ebp
ret 8