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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x5683e0
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x5c42f0]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x34], esi
call fcn.00431114
mov ecx, dword [eax + 4]
call fcn.00431540
mov ebx, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0x80], edi
cmp ebx, edi
jl 0x404685
mov dword [esi + 0xc0], ebx
inc dword [esi + 0xc4]
lea eax, [esi + 0xc4]
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esi + 0xc8], edi
mov dword [esp + 0x38], eax
sete al
test al, al
sete al
mov dword [esp + 0x30], edi
test al, al
je 0x40487b
cmp dword [esi + 0xcc], edi
sete al
test al, al
sete al
test al, al
je 0x40487b
cmp ebx, 3
ja case.default.0x4046d4
jmp dword [ebx*4 + 0x404b20]
mov edi, 0x3e8
jmp 0x4046f5
mov edi, 0x2710
jmp 0x4046f5
mov edi, 0x186a0
jmp 0x4046f5
mov edi, 0xf4240
mov dword [esp + 0x30], edi
mov ebx, dword [esi + 0xc8]
test ebx, ebx
jne 0x40470d
push 0x80004003
call fcn.00556ab0
mov eax, dword [ebx]
mov ecx, dword [eax + 0x51c]
push 1
push ebx
call ecx
test eax, eax
jns 0x40472a
push 0x59e194
push ebx
push eax
call fcn.00556ad0
mov ebx, dword [esi + 0xc8]
test ebx, ebx
jne 0x40473e
push 0x80004003
call fcn.00556ab0
mov edx, dword [ebx]
mov eax, dword [edx + 0x74]
push ebx
call eax
test eax, eax
jns 0x404756
push 0x59e194
push ebx
push eax
call fcn.00556ad0
mov ebx, dword [esi + 0xcc]
test ebx, ebx
jne 0x40476a
push 0x80004003
call fcn.00556ab0
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x28]
push ebx
call edx
test eax, eax
jns 0x404782
push 0x59e174
push ebx
push eax
call fcn.00556ad0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x2c], 0
test edi, edi
jle 0x40481e
jmp 0x4047a0
mov esi, dword [esi + 0xcc]
test esi, esi
je 0x404703
mov ecx, dword [0x5c5778]
mov edx, dword [0x5c577c]
mov edi, dword [0x5c5780]
mov ebx, dword [esi]
lea eax, [esp + 0x40]
push eax
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [eax + 8], edi
mov edi, dword [0x5c5784]
mov dword [eax + 0xc], edi
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x5c5780]
mov dword [eax + 4], edx
mov edx, dword [ebx + 0x20]
push 0
mov dword [eax + 8], ecx
push esi
mov dword [eax + 0xc], edi
call edx
test eax, eax
jns 0x40480b
push 0x59e174
push esi
push eax
call fcn.00556ad0
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x34]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x30]
jl 0x4047a0
mov ebx, dword [esi + 0xc8]
test ebx, ebx
jne 0x404832
push 0x80004003
call fcn.00556ab0
mov eax, dword [ebx]
mov ecx, dword [eax + 0x78]
push ebx
call ecx
test eax, eax
jns 0x40484a
push 0x59e194
push ebx
push eax
call fcn.00556ad0
mov ebx, dword [esi + 0xc8]
test ebx, ebx
jne 0x40485e
push 0x80004003
call fcn.00556ab0
mov edx, dword [ebx]
mov eax, dword [edx + 0x51c]
push 0
push ebx
call eax
test eax, eax
jns 0x40487b
push 0x59e194
push ebx
push eax
call fcn.00556ad0
call fcn.00470f04
test eax, eax
je 0x404af5
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
mov edi, eax
test edi, edi
je 0x404af5
mov ecx, dword [0x5cc130]
push ecx
lea ecx, [esp + 0x30]
call fcn.00402650
push 0x1c
push str.__Exontrol.ExGrid__Version:
lea ecx, [esp + 0x34]
mov byte [esp + 0x88], 1
call fcn.00404eb0
mov esi, dword [esi + 0xc8]
test esi, esi
jne 0x4048d7
push 0x80004003
call fcn.00556ab0
lea ebx, [esp + 0x34]
mov ecx, esi
call fcn.004036d0
mov byte [esp + 0x80], 2
mov eax, dword [eax]
test eax, eax
je 0x4048fa
mov edx, dword [eax]
test edx, edx
jne 0x404900
xor eax, eax
jmp 0x404914
xor edx, edx
xor eax, eax
jmp 0x404914
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404905
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x34]
call fcn.00404eb0
mov bl, 1
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x34]
test eax, eax
je 0x40496a
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40496a
test esi, esi
je 0x40496a
mov eax, dword [esi]
test eax, eax
je 0x404951
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
test eax, eax
je 0x404961
push eax
call fcn.004053f2
add esp, 4
push esi
call fcn.004053f2
add esp, 4
push 7
push str.__TTE:
lea ecx, [esp + 0x34]
call fcn.00404eb0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x38]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
jns 0x404994
fadd qword [0x59e1a8]
sub esp, 8
lea esi, [esp + 0x3c]
fstp qword [esp]
call fcn.00403980
add esp, 8
mov byte [esp + 0x80], 3
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x34]
call fcn.00404eb0
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4049e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 3
push 0x59df68
lea ecx, [esp + 0x34]
call fcn.00404eb0
push 9
push str.__Items:
lea ecx, [esp + 0x34]
call fcn.00404eb0
fild dword [esp + 0x30]
sub esp, 8
lea esi, [esp + 0x40]
fstp qword [esp]
call fcn.00403980
add esp, 8
mov byte [esp + 0x80], 4
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x34]
call fcn.00404eb0
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a5a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 8
push str.__Runs:
lea ecx, [esp + 0x34]
call fcn.00404eb0
mov ecx, dword [esp + 0x3c]
fild dword [ecx]
sub esp, 8
lea esi, [esp + 0x44]
fstp qword [esp]
call fcn.00403980
add esp, 8
mov byte [esp + 0x80], 5
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x34]
call fcn.00404eb0
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404ac1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, edi
call fcn.004243f4
mov byte [esp + 0x80], 0
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404af5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x2b]
mov dword [esp + 0x80], 0xffffffff
call fcn.00401b90
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4