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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
lea eax, [ebp - 0x3c]
mov esi, dword [ebp + 0xc]
push edi
push eax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp + 0x10]
push esi
call fcn.00491fb0
add esp, 0x10
cmp eax, 2
mov dword [ebp - 0x24], eax
je 0x49316a
cmp eax, 1
jne 0x493166
cmp word [esi + 0xa50], 0
je 0x49316a
xor eax, eax
jmp 0x49316d
push 1
pop eax
mov ecx, dword [ebp + 0x1c]
and word [ecx], 0
mov ecx, dword [ebp + 0x10]
imul ecx, ecx, 0x34
mov ebx, dword [esi + ecx + 8]
mov edi, dword [esi + ecx + 4]
add esi, ecx
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x4931e1
test ax, ax
je 0x4931af
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.00466538
add esp, 0xc
test ax, ax
je 0x4931af
add esi, 0x2e
lea eax, [ebp - 0x3c]
jmp 0x4931b5
add esi, 0x28
lea eax, [ebp - 0x4c]
push edi
mov dword [ebp - 8], eax
call fcn.005005bb
push ebx
mov dword [ebp - 0x2c], eax
call fcn.00586979
push dword [ebp + 8]
mov ebx, eax
neg ebx
sbb ebx, ebx
neg ebx
call fcn.0046356b
add esp, 0xc
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x4931e8
xor eax, eax
jmp 0x4933d3
mov edi, dword [ebp - 0x20]
mov ax, word [esi]
push edi
mov word [ebp - 0x1c], ax
mov dword [ebp - 4], edi
call fcn.00494ccb
cmp word [ebp - 0x1c], 0
pop ecx
mov dword [ebp - 0x18], eax
jne 0x493227
test ax, ax
je 0x493227
push dword [ebp + 0x10]
mov word [esi], 1
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00491a6f
add esp, 0x10
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], 1
call fcn.0045c4ae
push 0xa
sub eax, 0xf
pop edi
cmp eax, edi
jl 0x493247
call fcn.0045c4ae
mov edi, eax
sub edi, 0xf
call fcn.0059d186
add eax, edi
mov dword [ebp - 0x14], eax
call fcn.0045c498
test ax, ax
je 0x4933a5
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 8]
call fcn.00463fcd
push dword [ebp - 8]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.00466538
mov edi, eax
add esp, 0x18
cmp di, word [ebp - 0x28]
mov dword [ebp - 0xc], edi
je 0x4932b8
xor eax, eax
cmp word [ebp - 0x1c], ax
jne 0x4932b8
cmp word [ebp - 0x18], ax
je 0x4932b8
push dword [ebp + 0x10]
xor ecx, ecx
cmp word [esi], ax
push dword [ebp + 0xc]
sete cl
push dword [ebp - 0x10]
mov word [esi], cx
push dword [ebp + 8]
call fcn.00491a6f
add esp, 0x10
test di, di
jne 0x4932e6
call fcn.0045c4ae
push 0xa
sub eax, 0xf
pop edi
cmp eax, edi
jl 0x4932d6
call fcn.0045c4ae
mov edi, eax
sub edi, 0xf
call fcn.0059d186
add eax, edi
and dword [ebp - 4], 0
mov dword [ebp - 0x14], eax
jmp 0x4932ec
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], eax
mov edi, dword [ebp - 0x2c]
test edi, edi
je 0x4932fe
test bx, bx
jne 0x4932fe
cmp word [ebp - 0x18], bx
jne 0x493373
cmp word [ebp - 0xc], 0
je 0x493315
lea eax, [ebp - 0x3c]
cmp dword [ebp - 8], eax
jne 0x493315
call fcn.0059d186
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x24], 2
jne 0x49332f
lea eax, [ebp - 0x3c]
cmp dword [ebp - 8], eax
jne 0x49332f
mov eax, dword [ebp + 0x1c]
mov cx, word [ebp - 0xc]
mov word [eax], cx
jmp 0x493368
cmp word [ebp - 0xc], 0
je 0x493368
call fcn.0059d186
mov ecx, dword [ebp - 0x14]
sub ecx, eax
test ecx, ecx
jg 0x493368
cmp dword [ebp - 0x24], 1
je 0x493388
test edi, edi
je 0x493368
cmp word [ebp - 0x18], 0
je 0x493368
push dword [ebp - 8]
push edi
push dword [ebp + 0xc]
call fcn.004933d8
add esp, 0xc
and dword [ebp - 4], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x28], eax
jmp 0x493251
push dword [ebp - 8]
push edi
push dword [ebp + 0xc]
call fcn.004933d8
add esp, 0xc
and dword [ebp - 4], 0
jmp 0x4933a5
push 0
push dword [ebp + 8]
call fcn.0046580d
pop ecx
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0049341f
add esp, 0x10
mov dword [ebp - 4], eax
cmp word [esi], 0
je 0x4933c3
push dword [ebp + 0x10]
and word [esi], 0
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00491a6f
add esp, 0x10
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.004635b3
mov eax, dword [ebp - 4]
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret