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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x484
mov eax, dword [0x6ddfa0]
xor eax, dword [ebp + 4]
push ebx
mov dword [esp + 0x484], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], eax
mov eax, dword [0x70f1a0]
push edi
xor edi, edi
test eax, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], edi
mov dword [esp + 0x38], 0xffffffff
mov esi, eax
je 0x65ff75
mov ebx, 0x10
mov edi, edi
mov ecx, dword [esi + 0x6c]
test ecx, ecx
je 0x65ff31
cmp ecx, dword [esp + 0x14]
je 0x65ff31
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x20]
push eax
push 0
push 0x220
lea edx, [esp + 0x50]
push edx
push ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x48], ebx
call fcn.00656490
add esp, 0x18
test eax, eax
mov dword [esp + 0x30], eax
jg 0x65ff3a
mov eax, dword [0x70f1a0]
mov esi, dword [esi + 0x68]
test esi, esi
jne 0x65fef0
jmp 0x65ff75
add eax, 0xfffffff8
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x24]
movzx ecx, al
movzx edx, ah
movzx eax, byte [esp + 0x26]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x27]
shl ecx, 8
or ecx, eax
mov eax, dword [0x70f1a0]
shl ecx, 8
or ecx, edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], 1
test eax, eax
mov ebx, eax
je 0x660320
nop
call sub.KERNEL32.dll_GetTickCount
mov edi, eax
mov eax, dword [esp + 0x2c]
test eax, eax
mov eax, dword [esp + 0x38]
mov dword [ebp + 8], edi
jne 0x65ffc1
mov ecx, dword [esp + 0x14]
cmp ecx, dword [ebx + 0x6c]
jne 0x65ffc1
cmp dword [ebx + 0x80], 3
jne 0x65ffc1
test eax, eax
jne 0x65ffc3
mov eax, dword [esp + 0x44]
test eax, eax
je 0x65ffc9
cmp dword [esp + 0x40], 1
jne 0x65ffc9
mov dword [esp + 0x2c], ebx
jmp 0x65ffc9
test eax, eax
jl 0x66019a
mov eax, dword [ebx + 0x80]
cmp eax, 3
je 0x66019a
cmp eax, 5
je 0x66019a
mov edx, dword [esp + 0x14]
cmp edx, dword [ebx + 0x6c]
jne 0x66019a
lea eax, [esp + 0x1c]
push eax
lea ecx, [ebx + 0x70]
push ecx
call fcn.00655950
add esp, 8
test eax, eax
jne 0x66019a
mov edx, dword [esp + 0x38]
mov esi, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x64]
add esi, edx
inc ecx
mov dword [ebx + 0x5c], esi
mov dword [ebx + 0x64], ecx
mov edx, dword [esp + 0x40]
cmp edx, 1
je 0x660187
cmp edx, 2
je 0x660187
cmp edx, 3
je 0x660187
cmp dword [ebx + 0x80], 4
jne 0x660192
cmp edx, 4
jne 0x660065
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0xc8], eax
lea eax, [esp + 0x38]
mov ecx, ebx
call fcn.0065fb60
jmp 0x660192
cmp edx, 0x10000000
jbe 0x660163
mov ecx, dword [ebx + 0x9c]
mov eax, edx
shr eax, 0x1c
and edx, 0xfffffff
sub edx, eax
test eax, eax
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x268], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x10], eax
mov dword [esp + 0x264], ecx
mov dword [esp + 0x26c], edx
mov dword [ebx + 0xc8], ecx
jl 0x660192
jmp 0x6600c0
mov eax, dword [esp + 0x10]
lea ecx, [ecx]
test eax, eax
mov eax, dword [esp + 0x38]
jle 0x6600d4
dec eax
mov dword [esp + 0x38], eax
movzx ecx, byte [esp + eax + 0x48]
jmp 0x6600d6
mov ecx, eax
sub eax, ecx
mov dword [esp + 0x260], ecx
mov dword [esp + 0x38], eax
lea esi, [esp + eax + 0x48]
mov eax, ecx
shr ecx, 2
lea edi, [esp + 0x270]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x260]
mov ecx, ebx
call fcn.0065fb60
lea ecx, [esp + 0x260]
push ecx
call fcn.0065fc10
add esp, 4
test eax, eax
jge 0x660128
mov dword [esp + 0x10], 0
jmp 0x660140
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x660140
mov eax, dword [ebx + 0x9c]
cmp dword [esp + 0x34], eax
je 0x660140
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x268]
mov eax, dword [esp + 0x10]
inc ecx
dec eax
mov dword [esp + 0x268], ecx
mov dword [esp + 0x10], eax
jns 0x6600b9
mov edi, dword [ebp + 8]
jmp 0x660192
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x38]
mov ecx, ebx
mov dword [ebx + 0xc8], edx
call fcn.0065fb60
lea eax, [esp + 0x38]
push eax
call fcn.0065fc10
add esp, 4
jmp 0x660192
lea esi, [esp + 0x38]
mov eax, ebx
call fcn.0065f730
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [ebx + 0x80]
mov esi, 2
cmp eax, esi
jne 0x6601c2
mov edx, dword [ebx + 0xc4]
mov ecx, edi
sub ecx, edx
cmp ecx, 0x3e8
jbe 0x6601c2
mov ecx, ebx
call fcn.0065f7b0
cmp dword [ebx + 0x80], 4
jne 0x660211
mov edx, dword [ebx + 0xb8]
cmp edx, dword [ebx + 0xb0]
je 0x6601de
call fcn.0065f830
cmp dword [ebx + 0x80], 4
jne 0x660211
mov edx, dword [ebx + 0xc8]
mov eax, edi
sub eax, edx
cmp eax, 0x1d4c0
jbe 0x660211
mov edx, dword [ebx + 0xc4]
mov ecx, edi
sub ecx, edx
cmp ecx, 0x7d0
jae 0x660211
mov ecx, ebx
call fcn.0065f6b0
cmp dword [ebx + 0x80], 3
jne 0x66023a
cmp word [ebx + 0x70], si
jne 0x66023a
mov edx, dword [ebx + 0xc4]
add edx, 0x3e8
cmp edi, edx
jbe 0x66023a
mov edi, ebx
call fcn.0065fd50
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 0x208]
xor esi, esi
cmp eax, esi
jne 0x660265
mov eax, dword [ebx + 0xcc]
add eax, 0xfa
cmp edi, eax
jbe 0x660265
mov dword [ebx + 0xcc], edi
mov dword [ebx + 0x208], 4
cmp dword [ebx + 0x204], esi
jne 0x6602b2
mov ecx, dword [ebx + 0x208]
cmp ecx, esi
je 0x6602b2
mov edx, dword [ebx + 0x204]
mov eax, dword [ebx + 0x20c]
inc edx
cmp eax, esi
mov dword [ebx + 0x204], edx
je 0x660295
push ecx
push ebx
call eax
add esp, 8
mov eax, dword [ebx + 0x204]
dec eax
mov dword [ebx + 0x204], eax
mov dword [ebx + 0x208], esi
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp + 8], eax
mov edi, eax
cmp dword [ebx + 0x80], 4
jne 0x66030c
mov ecx, dword [ebx + 0xb0]
cmp dword [ebx + 0xb8], ecx
jne 0x66030c
sub edi, dword [ebx + 0xc4]
mov eax, edi
cmp eax, 0x64
jbe 0x6602ec
mov edx, dword [ebx + 0xa0]
cmp edx, dword [ebx + 0x9c]
jne 0x6602ff
cmp ecx, dword [ebx + 0xb4]
jne 0x6602ff
cmp eax, 0x9c4
ja 0x6602ff
cmp dword [ebx + 0xa4], 0x800
jl 0x66030c
mov ecx, ebx
mov dword [ebx + 0xa4], esi
call fcn.0065fda0
mov ebx, dword [ebx + 0x68]
cmp ebx, esi
jne 0x65ff80
mov eax, dword [0x70f1a0]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
test ecx, ecx
jl 0x66037b
cmp dword [esp + 0x40], 5
jne 0x66037b
mov esi, dword [esp + 0x1c]
mov ecx, 2
cmp si, cx
jne 0x66037b
test eax, eax
je 0x66037b
mov edx, dword [esp + 0x14]
cmp dword [eax + 0x80], ecx
jne 0x660358
cmp word [eax + 0x70], cx
jne 0x660358
cmp edx, dword [eax + 0x6c]
je 0x660361
mov eax, dword [eax + 0x68]
test eax, eax
jne 0x660345
jmp 0x66037b
add eax, 0x70
mov dword [eax], esi
mov ecx, dword [esp + 0x20]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x24]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x28]
mov dword [eax + 0xc], ecx
test edi, edi
je 0x6603c4
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x6603c4
mov eax, dword [esp + 0x1c]
lea edx, [edi + 0x70]
mov dword [edx], eax
mov ecx, dword [esp + 0x20]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x24]
mov dword [edx + 8], eax
mov ecx, dword [esp + 0x28]
mov dword [edx + 0xc], ecx
mov edx, dword [esp + 0x44]
lea esi, [esp + 0x38]
mov eax, edi
mov dword [edi + 0x84], edx
mov dword [edi + 0x80], 4
call fcn.0065f730
mov ecx, dword [esp + 0x48c]
xor ecx, dword [ebp + 4]
mov eax, dword [esp + 0x18]
call fcn.006684c2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret