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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45923e
push eax
mov dword fs:[0], esp
sub esp, 0x94
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0x44]
test eax, eax
je 0x4133af
xor eax, eax
jmp 0x41368a
mov edi, dword [esp + 0xb4]
mov eax, dword [edi + 0x20]
test eax, eax
je 0x4133c5
xor esi, esi
mov dword [esp + 0x10], esi
jmp 0x4133ce
mov ecx, dword [ebp + 0x58]
mov dword [esp + 0x10], ecx
mov esi, ecx
test eax, eax
je 0x4133d8
mov ebx, dword [ebp + 0x64]
dec ebx
jmp 0x4133db
mov ebx, dword [ebp + 0x58]
cmp esi, ebx
jg 0x4133ec
push esi
mov ecx, ebp
call fcn.004141a0
inc esi
cmp esi, ebx
jle 0x4133df
xor eax, eax
mov dword [ebp + 0x54], eax
mov dword [ebp + 0x50], eax
call dword [0x45b1bc]
mov ecx, ebp
mov dword [esp + 0x1c], eax
call fcn.00413220
test eax, eax
mov dword [ebp + 0x54], eax
jge 0x413413
xor eax, eax
jmp 0x41368a
push 0x580
call fcn.00447e47
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov dword [esp + 0xac], 0
je 0x413444
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push edx
push ecx
mov ecx, eax
call fcn.004146b0
jmp 0x413446
xor eax, eax
mov esi, dword [esp + 0x10]
mov ecx, ebp
push esi
mov dword [esp + 0xb0], 0xffffffff
mov dword [ebp + 0x44], eax
mov dword [esp + 0x14], esi
call fcn.00413790
test eax, eax
jne 0x4135f3
jmp 0x413472
mov esi, dword [esp + 0x10]
cmp esi, dword [ebp + 0x64]
jge 0x413483
test esi, esi
jl 0x413483
mov edx, dword [ebp + 0x60]
mov esi, dword [edx + esi*4]
jmp 0x413485
xor esi, esi
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x28]
push eax
mov eax, dword [edi + 4]
push ecx
mov ecx, dword [edi]
push eax
push ecx
call fcn.004136b0
add esp, 0x10
lea ecx, [esp + 0x20]
mov ebx, eax
mov dword [esp + 0x18], edx
call fcn.00414680
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x30], ecx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x20], edx
mov edx, dword [edi + 0x10]
mov dword [esp + 0x3c], ecx
mov ecx, dword [edi + 0x2c]
mov dword [esp + 0x28], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x48], ecx
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x38], edx
mov edx, dword [edi + 0x28]
mov dword [esp + 0x24], ebx
test ecx, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], edx
je 0x413500
mov dword [esp + 0x40], 1
mov ecx, dword [edi + 0x24]
test ecx, ecx
je 0x41350c
or dword [esp + 0x40], 4
mov ecx, dword [edi + 0x1c]
test ecx, ecx
je 0x413522
cmp eax, 8
jne 0x413522
mov eax, dword [esp + 0x40]
or al, 2
mov dword [esp + 0x40], eax
mov ecx, dword [ebp + 0x44]
lea edx, [esp + 0x20]
push edx
call fcn.00414830
mov dword [ebp + 0x54], eax
mov eax, dword [esi + 0x18]
or al, 1
push 1
mov dword [esi + 0x18], eax
mov ecx, dword [ebp + 0x44]
call fcn.00414f70
mov dword [esi + 0xc], eax
mov ecx, dword [ebp + 0x44]
push 1
call fcn.00414fb0
mov dword [esi + 0x10], eax
mov ecx, dword [ebp + 0x44]
push 1
call fcn.00414f90
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x14], eax
test ecx, ecx
je 0x41356c
or dword [esi + 0x18], 2
mov edx, dword [esi + 0x10]
test edx, edx
je 0x413577
or dword [esi + 0x18], 8
test eax, eax
je 0x413583
mov eax, dword [esi + 0x18]
or al, 0x24
mov dword [esi + 0x18], eax
lea eax, [esp + 0x50]
push eax
push 0x54
push ecx
call dword [0x45b090]
test eax, eax
je 0x4135b6
mov ecx, dword [esp + 0x6c]
mov dword [esi], ecx
mov eax, dword [esp + 0x70]
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
mov edx, dword [esp + 0x76]
and edx, 0xffff
mov dword [esi + 8], edx
jmp 0x4135c6
mov eax, dword [esp + 0x18]
mov dword [esi], ebx
mov dword [esi + 4], eax
mov dword [esi + 8], 0x18
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0x54]
xor ebx, ebx
inc ecx
cmp eax, ebx
mov dword [esp + 0x10], ecx
jl 0x4135fa
cmp dword [edi + 0x20], ebx
je 0x4135fa
test byte [ebp + 0x10], 3
je 0x4135fa
push ecx
mov ecx, ebp
call fcn.00413790
test eax, eax
je 0x41346e
xor eax, eax
jmp 0x41368a
mov esi, dword [ebp + 0x44]
cmp esi, ebx
je 0x413617
mov ecx, esi
call fcn.004147e0
push esi
call fcn.00447e70
add esp, 4
mov dword [ebp + 0x44], ebx
mov dword [ebp + 0x50], ebx
mov edx, dword [ebp + 0x4c]
push edx
call fcn.00447e70
mov ecx, dword [ebp + 8]
add esp, 4
cmp ecx, ebx
mov dword [ebp + 0x4c], ebx
je 0x41363a
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x41363a
push eax
call fcn.0041af20
mov ecx, dword [ebp]
mov dword [ebp + 0xc], ebx
cmp ecx, ebx
je 0x413649
mov eax, dword [ecx]
call dword [eax + 0xc]
cmp dword [ebp + 0x54], 0xfffffff7
jne 0x413657
cmp dword [edi + 0x20], ebx
je 0x413657
mov dword [ebp + 0x54], ebx
call dword [0x45b1bc]
mov ecx, dword [esp + 0x1c]
mov esi, dword [ebp + 0x44]
sub eax, ecx
cmp esi, ebx
mov dword [ebp + 0x50], eax
je 0x41367d
mov ecx, esi
call fcn.004147e0
push esi
call fcn.00447e70
add esp, 4
mov ecx, dword [ebp + 0x54]
xor eax, eax
cmp ecx, ebx
mov dword [ebp + 0x44], ebx
sete al
mov ecx, dword [esp + 0xa4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xa0
ret 4