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

Disassembly:
push ebp
push edi
push esi
push ebx
xor ebx, ebx
sub esp, 0x3c
cmp dword [0x42d760], 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
je 0x407612
mov eax, dword [esp + 0x1c]
mov ebp, 0x422040
test eax, eax
je 0x4075a0
mov dword [esp + 0x28], ebx
mov edx, ebp
mov eax, dword [edx + 4]
lea ebp, [eax + 4]
lea esi, [eax + 0x404]
test eax, eax
je 0x407510
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], edx
mov ebx, dword [ebp]
test ebx, ebx
je 0x4074fe
mov eax, dword [esp + 0x1c]
call eax
test eax, eax
jne 0x407590
mov eax, ebx
mov esi, dword [esp + 0x20]
shr eax, 0x16
mov edx, dword [eax*4 + 0x449174]
mov eax, ebx
shr eax, 0xc
and eax, 0x3ff
mov edx, dword [edx + eax*4]
mov eax, dword [0x42d544]
mov ecx, dword [edx]
mov dword [ebp], ecx
test esi, esi
je 0x407540
movzx edi, word [edx + 0xe]
lea esi, [eax - 1]
cmp edi, esi
je 0x407540
mov ebx, ecx
test ebx, ebx
jne 0x4074b4
mov eax, dword [esp + 0x24]
add ebp, 4
cmp ebp, eax
jne 0x4074ad
mov edx, dword [esp + 0x2c]
lea esi, [esi]
add edx, 0x14
cmp edx, 0x42207c
jne 0x407495
mov ebx, dword [esp + 0x28]
cmp dword [0x42d760], 2
je 0x40774d
mov eax, 1
jmp 0x407592
movzx esi, byte [edx + 0xc]
mov ecx, dword [edx + 0x10]
lea edi, [esi + esi*4]
mov dword [esp + 0x18], ecx
mov esi, ecx
mov ecx, dword [edi*4 + 0x422040]
shr esi, 3
mov word [edx + 0xe], ax
lea esi, [ecx + esi*4]
mov ecx, dword [esp + 0x18]
mov eax, dword [esi]
mov dword [esp + 4], eax
mov eax, dword [edi*4 + 0x422050]
mov dword [esp], eax
mov eax, ebx
call fcn.0040cdb0
mov dword [esi], eax
mov ebx, dword [ebp]
jmp 0x4074b0
xor eax, eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x20]
test edi, edi
je 0x40769e
mov edi, ebp
mov eax, dword [edi + 4]
test eax, eax
je 0x407633
lea ebp, [eax + 4]
add eax, 0x404
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], edi
mov eax, dword [ebp]
mov ecx, dword [0x42d544]
test eax, eax
je 0x407620
lea esi, cs:[esi]
nop
mov edx, eax
lea esi, [ecx - 1]
shr edx, 0x16
mov ebx, dword [edx*4 + 0x449174]
mov edx, eax
shr edx, 0xc
and edx, 0x3ff
mov edx, dword [ebx + edx*4]
mov ebx, dword [edx]
movzx edi, word [edx + 0xe]
mov dword [ebp], ebx
cmp edi, esi
je 0x407650
test ebx, ebx
je 0x407620
mov eax, ebx
jmp 0x4075e0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
jmp 0x40747e
mov eax, dword [esp + 0x1c]
add ebp, 4
cmp ebp, eax
jne 0x4075c9
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
add edi, 0x14
cmp edi, 0x42207c
jne 0x4075ae
jmp 0x407523
movzx ebx, byte [edx + 0xc]
mov edi, dword [edx + 0x10]
lea esi, [ebx + ebx*4]
mov dword [esp + 0x18], edi
mov ebx, edi
mov edi, dword [esi*4 + 0x422040]
shr ebx, 3
mov word [edx + 0xe], cx
lea ebx, [edi + ebx*4]
mov ecx, dword [ebx]
mov dword [esp + 4], ecx
mov ecx, dword [esi*4 + 0x422050]
mov dword [esp], ecx
mov ecx, dword [esp + 0x18]
call fcn.0040cdb0
mov dword [ebx], eax
mov eax, dword [ebp]
test eax, eax
je 0x407620
mov ecx, dword [0x42d544]
jmp 0x4075e0
mov ebp, 0x422040
mov eax, dword [ebp + 4]
test eax, eax
je 0x407739
lea edi, [eax + 0x404]
mov dword [esp + 0x1c], ebx
lea esi, [eax + 4]
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], ebp
jmp 0x407720
mov edx, eax
shr edx, 0x16
mov ecx, dword [edx*4 + 0x449174]
mov edx, eax
shr edx, 0xc
and edx, 0x3ff
mov edx, dword [ecx + edx*4]
mov ecx, dword [edx]
mov dword [esi], ecx
movzx ebx, byte [edx + 0xc]
mov ecx, dword [edx + 0x10]
lea edi, [ebx + ebx*4]
mov ebx, dword [edi*4 + 0x422040]
mov ebp, ecx
shr ebp, 3
lea ebx, [ebx + ebp*4]
mov ebp, dword [0x42d544]
mov word [edx + 0xe], bp
mov ebp, dword [ebx]
mov dword [esp + 4], ebp
mov edi, dword [edi*4 + 0x422050]
mov dword [esp], edi
call fcn.0040cdb0
mov dword [ebx], eax
mov eax, dword [esi]
test eax, eax
jne 0x4076c8
mov eax, dword [esp + 0x18]
add esi, 4
cmp esi, eax
jne 0x407720
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
add ebp, 0x14
cmp ebp, 0x42207c
jne 0x4076a3
jmp 0x407523
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 8], 0
sub eax, ebx
mov dword [esp], 0x4257d0
mov dword [esp + 4], eax
call fcn.00402d00
jmp 0x407530