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

Disassembly:
mov eax, 0x424a39
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, ecx
call edi
xor ebx, ebx
mov dword [ebp - 0x14], eax
cmp dword [esi + 0x9c], ebx
je 0x4087d8
mov eax, dword [esi + 0xd8]
cmp eax, ebx
je 0x4087d8
cmp dword [eax + 0x8c], ebx
je 0x4087d8
mov ecx, dword [0x42fd58]
lea eax, [ebp - 0x18]
push ebx
push eax
mov ax, word [esi + 8]
push eax
call sub.Memory.dll_public:_unsigned_long_int___thiscall_CCommonMemory::GetNIOAccess_unsigned_short_int__int___int_
mov ecx, dword [0x42fd58]
lea eax, [ebp - 0xe]
push ebx
push eax
mov ax, word [esi + 8]
push eax
call sub.Memory.dll_public:_unsigned_long_int___thiscall_CCommonMemory::GetDataBlockStatus_unsigned_short_int__unsigned_short_int___unsigned_long_int__
cmp dword [ebp + 0xc], ebx
jne 0x4087eb
cmp dword [esi + 0x28], ebx
jne 0x40879d
call edi
mov ecx, dword [esi + 0x20]
add eax, ecx
mov ecx, dword [esi + 0x24]
cmp ecx, 0xffffffff
mov dword [esi + 0x28], eax
jne 0x408798
mov ecx, dword [esi + 0x18]
add ecx, eax
mov dword [esi + 0x2c], ecx
cmp dword [esi + 0x18], 0xffffffff
je 0x4087d8
cmp dword [esi + 0x28], 0xffffffff
jne 0x4087b7
cmp dword [ebp - 0x18], 1
mov edi, dword [ebp - 0x14]
jne 0x4087ba
mov dword [esi + 0x28], edi
jmp 0x4087ba
mov edi, dword [ebp - 0x14]
cmp dword [esi + 0x24], 0xffffffff
je 0x4087ce
cmp dword [esi + 0x2c], edi
jae 0x4087ce
cmp dword [ebp - 0x18], 1
jne 0x4087ce
mov dword [esi + 0x28], edi
mov eax, dword [esi + 0x30]
add eax, edi
cmp dword [esi + 0x28], eax
jbe 0x4087ee
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
mov edi, dword [ebp - 0x14]
lea eax, [esi + 0xa8]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [esi + 0x40], 1
jne 0x40887e
push 0x64
call sub.MFC42.DLL_operatornew
pop ecx
mov ecx, eax
mov dword [ebp - 0x1c], ecx
cmp ecx, ebx
mov dword [ebp - 4], ebx
je 0x40881f
call fcn.00416ed5
jmp 0x408821
xor eax, eax
mov dword [esi + 0x44], eax
mov dword [eax + 4], esi
mov eax, dword [esi + 0x44]
or dword [ebp - 4], 0xffffffff
mov dword [eax + 8], ebx
mov eax, dword [esi + 0x44]
mov word [eax + 0x40], bx
mov eax, dword [esi + 0xd8]
mov ecx, dword [esi + 0x44]
mov ax, word [eax + 0x7c]
mov word [ecx + 0x34], ax
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0x70]
add eax, 0x2ac
mov ecx, dword [eax]
push ecx
lea edx, [ecx + 1]
mov ecx, esi
mov dword [eax], edx
push dword [esi + 0x44]
call fcn.0040893f
mov ecx, dword [ebp + 8]
push ebx
push ebx
push dword [esi + 0x44]
call fcn.00404ae3
push 1
pop eax
or dword [esi + 0x40], eax
mov dword [ebp + 8], eax
jmp 0x40888e
cmp dword [esi + 0x18], ebx
jbe 0x40888b
cmp dword [esi + 0x1c], ebx
jbe 0x40888b
inc dword [esi + 0x60]
mov dword [ebp + 8], ebx
cmp dword [ebp + 0xc], ebx
jne 0x40892e
cmp dword [ebp - 0x18], 1
jne 0x4088b9
mov eax, dword [esi + 0x18]
add eax, edi
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x24]
cmp eax, 0xffffffff
jne 0x4088b2
or dword [esi + 0x2c], eax
jmp 0x40891d
add edi, eax
mov dword [esi + 0x2c], edi
jmp 0x40891d
cmp dword [esi + 0x2c], edi
ja 0x408915
cmp dword [esi + 0x24], 0xffffffff
je 0x408915
mov eax, dword [esi + 0x1c]
cmp eax, 0xffffffff
jne 0x40890e
or dword [esi + 0x28], eax
cmp dword [esi + 0x3c], ebx
jne 0x4088dc
and word [esi + 0x64], 0xffc3
jmp 0x4088ea
mov ax, word [esi + 0x64]
and ax, 0xffd7
or al, 0x14
mov word [esi + 0x64], ax
and word [esi + 0x64], 0xff3c
mov ax, word [esi + 0x64]
mov ecx, dword [0x42fd58]
push eax
mov ax, word [esi + 8]
push eax
call sub.Memory.dll_public:_unsigned_long_int___thiscall_CCommonMemory::SetDataBlockStatus_unsigned_short_int__unsigned_short_int_
mov ecx, esi
call fcn.0040a2df
jmp 0x40891d
add edi, eax
mov dword [esi + 0x28], edi
jmp 0x40891d
mov eax, dword [esi + 0x18]
add eax, edi
mov dword [esi + 0x28], eax
mov ax, word [esi + 8]
mov ecx, dword [0x42fd58]
push ebx
push eax
call sub.Memory.dll_public:_unsigned_long_int___thiscall_CCommonMemory::SetNIOAccess_unsigned_short_int__int_
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 8]
jmp 0x4087da