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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x36
push 0
push 0
dec ecx
jne 0x654189
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x654cd4
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov eax, dword [ebx + 0x2e0]
cmp byte [eax + 0x50], 0
je 0x6541d4
push 1
mov edx, dword [0x6c0e34]
mov edx, dword [edx]
xor ecx, ecx
mov eax, ebx
call fcn.006658ec
jmp 0x654c8c
cmp byte [ebx + 0x15b1], 0x64
jae 0x6541e3
inc byte [ebx + 0x15b1]
movzx eax, byte [esi + 0x12]
sub al, 1
jb 0x6541fe
je 0x6542bd
dec al
je 0x65467c
jmp 0x654c8c
cmp word [ebx + 0x11e], 0
jbe 0x654254
movzx eax, byte [esi + 0x14]
dec al
je 0x654216
dec al
je 0x654227
jmp 0x654230
movzx ecx, word [esi + 0x25]
movzx edx, word [esi + 0x21]
mov eax, ebx
call fcn.0066eb30
jmp 0x654254
mov byte [ebx + 0x31c], 1
jmp 0x654254
movzx eax, word [esi + 0x21]
test ax, ax
jbe 0x654242
movzx eax, ax
add dword [ebx + 0xc8], eax
movzx eax, word [esi + 0x25]
test ax, ax
jbe 0x654254
movzx eax, ax
add dword [ebx + 0xcc], eax
mov eax, dword [ebp - 4]
cmp word [eax + 0xc], 1
jbe 0x6542b4
mov eax, dword [ebp - 4]
dec word [eax + 0xc]
cmp byte [esi + 0x58], 1
jne 0x6542ab
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xc]
push eax
push 0x654cf0
push 0x654cfc
push 0x654d08
push 0x654d14
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
lea edx, [esi + 2]
call fcn.004055f8
mov ecx, dword [ebp - 0x1c]
mov edx, 6
mov eax, ebx
call fcn.004a0a40
mov byte [ebp - 5], 0
jmp 0x654c8c
mov byte [ebp - 5], 1
jmp 0x654c8c
cmp byte [esi + 0x14], 0
jne 0x65433c
mov edx, esi
mov eax, ebx
call fcn.00646a84
mov eax, dword [ebp - 4]
cmp word [eax + 0xc], 0x3e8
jbe 0x654333
mov eax, dword [ebp - 4]
sub word [eax + 0xc], 0x3e8
mov byte [ebp - 5], 0
cmp byte [esi + 0x58], 1
jne 0x654c8c
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xc]
push eax
push 0x654cf0
push 0x654cfc
push 0x654d24
push 0x654d14
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x20]
lea edx, [esi + 2]
call fcn.004055f8
mov ecx, dword [ebp - 0x20]
mov edx, 6
mov eax, ebx
call fcn.004a0a40
jmp 0x654c8c
mov byte [ebp - 5], 1
jmp 0x654c8c
cmp byte [esi + 0x14], 1
jne 0x65443d
mov eax, dword [ebx + 0x28c]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x6543d1
inc eax
mov dword [ebp - 0x18], eax
xor edi, edi
mov edx, edi
mov eax, dword [ebx + 0x28c]
call fcn.0041fbf0
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
cmp byte [eax + 0x288], 7
jae 0x6543cb
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x288], 7
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx + 0x5c]
mov eax, dword [ebp - 0x10]
call fcn.0066b314
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x24]
push eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x28]
push eax
push 0
push 0
mov cx, 0x12
mov dx, 0xd9
mov eax, dword [ebp - 0x10]
call fcn.006633cc
push 1
mov edx, dword [0x6c09f8]
mov edx, dword [edx]
mov cl, 2
mov eax, ebx
call fcn.006658ec
jmp 0x6543d1
inc edi
dec dword [ebp - 0x18]
jne 0x65435a
mov eax, dword [ebp - 4]
cmp word [eax + 0xc], 0x3e8
jbe 0x654434
mov eax, dword [ebp - 4]
sub word [eax + 0xc], 0x3e8
cmp byte [esi + 0x58], 1
jne 0x65442b
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xc]
push eax
push 0x654cf0
push 0x654cfc
push 0x654d24
push 0x654d14
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x24]
lea edx, [esi + 2]
call fcn.004055f8
mov ecx, dword [ebp - 0x24]
mov edx, 6
mov eax, ebx
call fcn.004a0a40
mov byte [ebp - 5], 0
jmp 0x654c8c
mov byte [ebp - 5], 1
jmp 0x654c8c
cmp byte [esi + 0x14], 9
jne 0x6545f9
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xc]
add eax, eax
lea eax, [eax + eax*4]
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0xc], 0
jle 0x654565
imul edx, edi, 0x39
cmp word [ebx + edx*2 + 0x428], 0
jbe 0x654565
imul eax, edi, 0x39
movzx edx, word [ebx + eax*2 + 0x430]
cmp dx, word [ebx + eax*2 + 0x432]
jae 0x654565
imul eax, edi, 0x39
movzx edx, word [ebx + eax*2 + 0x428]
mov eax, dword [0x6c0ec4]
mov eax, dword [eax]
call fcn.005eed6c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x654565
mov dl, 2
mov eax, dword [ebp - 4]
call fcn.004c9fb0
test al, al
jne 0x654565
mov eax, dword [ebp - 0x14]
test byte [eax + 0x13], 1
je 0x654565
imul eax, edi, 0x39
movzx eax, word [ebx + eax*2 + 0x432]
imul edx, edi, 0x39
movzx edx, word [ebx + edx*2 + 0x430]
sub eax, edx
test eax, eax
jle 0x654565
cmp eax, dword [ebp - 0xc]
jge 0x654501
imul edx, edi, 0x39
add word [ebx + edx*2 + 0x430], ax
sub dword [ebp - 0xc], eax
jmp 0x654515
imul eax, edi, 0x39
movzx edx, word [ebp - 0xc]
add word [ebx + eax*2 + 0x430], dx
xor eax, eax
mov dword [ebp - 0xc], eax
push 1
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 4
lea edx, [ebp - 0x30]
mov eax, dword [0x6c06f8]
mov eax, dword [eax]
xor ecx, ecx
call fcn.0040bb18
mov edx, dword [ebp - 0x28]
mov cl, 1
mov eax, ebx
call fcn.006658ec
imul eax, edi, 0x39
movzx eax, word [ebx + eax*2 + 0x432]
push eax
imul eax, edi, 0x39
movzx ecx, word [ebx + eax*2 + 0x430]
mov edx, edi
mov eax, ebx
call fcn.00661bf0
inc edi
cmp edi, 0x10
jne 0x654458
cmp dword [ebp - 0xc], 0x3e8
jl 0x6545f0
fild dword [ebp - 0xc]
fdiv dword [0x654d2c]
call fcn.00403560
mov dword [ebp - 0xc], eax
cmp byte [esi + 0x58], 1
jne 0x6545dc
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0x654cf0
push 0x654cfc
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xc]
sub eax, dword [ebp - 0xc]
call fcn.0040a784
mov eax, dword [ebp - 0x34]
push eax
push 0x654d14
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x38]
lea edx, [esi + 2]
call fcn.004055f8
mov ecx, dword [ebp - 0x38]
mov edx, 6
mov eax, ebx
call fcn.004a0a40
mov eax, dword [ebp - 4]
movzx edx, word [ebp - 0xc]
mov word [eax + 0xc], dx
mov byte [ebp - 5], 0
jmp 0x654c8c
mov byte [ebp - 5], 1
jmp 0x654c8c
mov byte [ebp - 5], 0
movzx edx, byte [esi + 0x14]
mov eax, ebx
call fcn.00654ff8
test al, al
je 0x654c8c
mov eax, dword [ebp - 4]
cmp word [eax + 0xc], 0x3e8
jbe 0x654673
mov eax, dword [ebp - 4]
sub word [eax + 0xc], 0x3e8
cmp byte [esi + 0x58], 1
jne 0x65466a
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xc]
push eax
push 0x654cf0
push 0x654cfc
push 0x654d24
push 0x654d14
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x3c]
lea edx, [esi + 2]
call fcn.004055f8
mov ecx, dword [ebp - 0x3c]
mov edx, 6
mov eax, ebx
call fcn.004a0a40
mov byte [ebp - 5], 0
jmp 0x654c8c
mov byte [ebp - 5], 1
jmp 0x654c8c
movzx eax, byte [esi + 0x14]
cmp al, 0x12
jne 0x654708
xor edi, edi
movzx eax, word [ebx + 0xcc0]
add edi, eax
movzx eax, word [ebx + 0xcc2]
add edi, eax
movzx eax, word [ebx + 0xcc4]
add edi, eax
movzx eax, word [ebx + 0xcc6]
add edi, eax
movzx eax, word [ebx + 0xcc8]
add edi, eax
movzx eax, word [ebx + 0xcca]
add edi, eax
movzx eax, word [esi + 0x1f]
mov edx, eax
add edx, dword [ebx + 0xcd0]
cmp edi, edx
jle 0x6546d8
add dword [ebx + 0xcd0], eax
jmp 0x6546f8
xor eax, eax
mov dword [ebx + 0xcd0], eax
lea eax, [ebx + 0xcc0]
xor ecx, ecx
mov edx, 0xc
call fcn.0048a158
add dword [ebx + 0xccc], edi
mov eax, ebx
call fcn.0064232c
mov byte [ebp - 5], 1
jmp 0x654c8c
cmp al, 0x11
jne 0x654726
movzx eax, word [esi + 0x17]
imul edx, eax, 0x3e8
mov eax, ebx
call fcn.0063c66c
mov byte [ebp - 5], 1
jmp 0x654c8c
cmp al, 0x10
jne 0x654750
mov eax, 0x64
call fcn.00403484
movzx edx, byte [esi + 0x16]
cmp eax, edx
setl cl
movzx edx, word [esi + 0x17]
mov eax, ebx
call fcn.006595e8
mov byte [ebp - 5], al
jmp 0x654c8c
cmp al, 0xf
jne 0x654802
mov byte [ebp - 5], 0
mov eax, dword [ebx + 0x2fc]
test eax, eax
je 0x6547ed
movzx edx, word [esi + 0x17]
call fcn.004d5358
mov edx, 0x654d30
lea eax, [ebp - 0x54]
call fcn.004039c4
lea edx, [ebx + 0x15]
lea eax, [ebp - 0x54]
mov cl, 0xf
call fcn.00403994
lea edx, [ebp - 0x54]
lea eax, [ebp - 0x74]
call fcn.004039c4
mov edx, 0x654d34
lea eax, [ebp - 0x74]
mov cl, 0x1f
call fcn.00403994
lea edx, [ebp - 0x74]
lea eax, [ebp - 0x44]
call fcn.004055f8
push dword [ebp - 0x44]
lea edx, [ebp - 0x78]
movzx eax, word [esi + 0x17]
call fcn.0040a784
push dword [ebp - 0x78]
push 0x654d50
lea eax, [ebp - 0x40]
mov edx, 3
call fcn.00405728
mov edx, dword [ebp - 0x40]
mov eax, dword [ebx + 0x2fc]
call fcn.004d6bd4
mov byte [ebp - 5], 1
jmp 0x654c8c
push 1
xor ecx, ecx
mov edx, 0x654d5c
mov eax, ebx
call fcn.006658ec
jmp 0x654c8c
cmp al, 0xe
jne 0x65485f
mov byte [ebp - 5], 0
movzx eax, word [esi + 0x1f]
movzx edx, ax
imul edx, edx, 0x3c
cmp edx, dword [ebx + 0x3968]
jg 0x65484a
movzx eax, ax
imul eax, eax, 0x3c
sub dword [ebx + 0x3968], eax
movzx edx, word [esi + 0x17]
movzx eax, word [esi + 0x19]
imul edx, eax
mov eax, ebx
call fcn.0063c66c
mov eax, ebx
call fcn.0066c2c4
mov byte [ebp - 5], 1
jmp 0x654c8c
push 1
xor ecx, ecx
mov edx, 0x654d7c
mov eax, ebx
call fcn.006658ec
jmp 0x654c8c
cmp al, 0xd
jne 0x65496b
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x15]
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x6548c1
lea edx, [ebp - 0x7c]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x3c]
call fcn.0040a784
mov eax, dword [ebp - 0x7c]
push eax
lea edx, [ebp - 0x80]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x3a]
call fcn.0040a784
mov eax, dword [ebp - 0x80]
push eax
lea eax, [ebp - 0x84]
mov edx, dword [ebp - 4]
add edx, 0x25
call fcn.004055f8
mov edx, dword [ebp - 0x84]
mov eax, ebx
pop ecx
call fcn.006552d8
jmp 0x654c8c
lea eax, [ebp - 0x184]
mov edx, dword [ebx + 0x2e0]
mov edx, dword [edx + 8]
mov ecx, 0xff
call fcn.00405630
lea edx, [ebp - 0x184]
mov eax, dword [ebp - 4]
add eax, 0x16
mov cl, 0xe
call fcn.004039d0
lea eax, [ebp - 0x184]
mov edx, dword [ebx + 0x2e0]
mov edx, dword [edx + 4]
mov ecx, 0xff
call fcn.00405630
lea edx, [ebp - 0x184]
mov eax, dword [ebp - 4]
add eax, 0x25
mov cl, 0x14
call fcn.004039d0
mov eax, dword [ebp - 4]
movzx edx, word [ebx + 0x24]
mov word [eax + 0x3a], dx
mov eax, dword [ebp - 4]
movzx edx, word [ebx + 0x28]
mov word [eax + 0x3c], dx
mov eax, dword [ebp - 4]
mov byte [eax + 0x15], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0x188]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00645684
mov eax, dword [ebp - 0x188]
push eax
mov cx, 0x14b8
mov edx, ebx
mov eax, ebx
call fcn.00662ab4
jmp 0x654c8c
cmp al, 0xc
jne 0x654c7f
xor eax, eax
cmp word [esi + 0x29], 0
jbe 0x6549f5
mov byte [ebx + 0x1fe], 1
movzx eax, word [esi + 0x29]
mov word [ebx + 0x204], ax
call sub.kernel32.dll_GetTickCount_1
movzx edx, word [esi + 0x27]
imul edx, edx, 0x3e8
add eax, edx
mov dword [ebx + 0x210], eax
push 1
push 0x654d9c
lea edx, [ebp - 0x190]
movzx eax, word [esi + 0x27]
call fcn.0040a784
push dword [ebp - 0x190]
push 0x654db0
lea eax, [ebp - 0x18c]
mov edx, 3
call fcn.00405728
mov edx, dword [ebp - 0x18c]
mov cl, 1
mov eax, ebx
call fcn.006658ec
mov cl, 1
mov edx, 4
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov al, 1
cmp word [esi + 0x2d], 0
jbe 0x654a75
mov byte [ebx + 0x1ff], 1
movzx eax, word [esi + 0x2d]
mov word [ebx + 0x206], ax
call sub.kernel32.dll_GetTickCount_1
movzx edx, word [esi + 0x27]
imul edx, edx, 0x3e8
add eax, edx
mov dword [ebx + 0x214], eax
push 1
push 0x654dbc
lea edx, [ebp - 0x198]
movzx eax, word [esi + 0x27]
call fcn.0040a784
push dword [ebp - 0x198]
push 0x654db0
lea eax, [ebp - 0x194]
mov edx, 3
call fcn.00405728
mov edx, dword [ebp - 0x194]
mov cl, 1
mov eax, ebx
call fcn.006658ec
mov cl, 1
mov edx, 7
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov al, 1
cmp word [esi + 0x31], 0
jbe 0x654af5
mov byte [ebx + 0x200], 1
movzx eax, word [esi + 0x31]
mov word [ebx + 0x208], ax
call sub.kernel32.dll_GetTickCount_1
movzx edx, word [esi + 0x27]
imul edx, edx, 0x3e8
add eax, edx
mov dword [ebx + 0x218], eax
push 1
push 0x654dd0
lea edx, [ebp - 0x1a0]
movzx eax, word [esi + 0x27]
call fcn.0040a784
push dword [ebp - 0x1a0]
push 0x654db0
lea eax, [ebp - 0x19c]
mov edx, 3
call fcn.00405728
mov edx, dword [ebp - 0x19c]
mov cl, 1
mov eax, ebx
call fcn.006658ec
mov cl, 1
mov edx, 2
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov al, 1
cmp word [esi + 0x23], 0
jbe 0x654b67
mov byte [ebx + 0x201], 1
movzx eax, word [esi + 0x23]
mov word [ebx + 0x20a], ax
call sub.kernel32.dll_GetTickCount_1
movzx edx, word [esi + 0x27]
imul edx, edx, 0x3e8
add eax, edx
mov dword [ebx + 0x21c], eax
push 1
push 0x654de4
lea edx, [ebp - 0x1a8]
movzx eax, word [esi + 0x27]
call fcn.0040a784
push dword [ebp - 0x1a8]
push 0x654db0
lea eax, [ebp - 0x1a4]
mov edx, 3
call fcn.00405728
mov edx, dword [ebp - 0x1a4]
mov cl, 1
mov eax, ebx
call fcn.006658ec
mov al, 1
cmp word [esi + 0x21], 0
jbe 0x654be7
mov byte [ebx + 0x1fc], 1
movzx eax, word [esi + 0x21]
mov word [ebx + 0x20c], ax
call sub.kernel32.dll_GetTickCount_1
movzx edx, word [esi + 0x27]
imul edx, edx, 0x3e8
add eax, edx
mov dword [ebx + 0x220], eax
push 1
push 0x654dfc
lea edx, [ebp - 0x1b0]
movzx eax, word [esi + 0x27]
call fcn.0040a784
push dword [ebp - 0x1b0]
push 0x654db0
lea eax, [ebp - 0x1ac]
mov edx, 3
call fcn.00405728
mov edx, dword [ebp - 0x1ac]
mov cl, 1
mov eax, ebx
call fcn.006658ec
mov cl, 1
mov edx, 0xa
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov al, 1
cmp word [esi + 0x25], 0
jbe 0x654c67
mov byte [ebx + 0x1fd], 1
movzx eax, word [esi + 0x25]
mov word [ebx + 0x20e], ax
call sub.kernel32.dll_GetTickCount_1
movzx edx, word [esi + 0x27]
imul edx, edx, 0x3e8
add eax, edx
mov dword [ebx + 0x224], eax
push 1
push 0x654e10
lea edx, [ebp - 0x1b8]
movzx eax, word [esi + 0x27]
call fcn.0040a784
push dword [ebp - 0x1b8]
push 0x654db0
lea eax, [ebp - 0x1b4]
mov edx, 3
call fcn.00405728
mov edx, dword [ebp - 0x1b4]
mov cl, 1
mov eax, ebx
call fcn.006658ec
mov cl, 1
mov edx, 8
mov eax, ebx
mov esi, dword [eax]
call dword [esi + 0xc]
mov al, 1
test al, al
je 0x654c8c
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x5c]
mov eax, ebx
call fcn.00667a90
mov byte [ebp - 5], 1
jmp 0x654c8c
movzx edx, al
mov eax, ebx
call fcn.00654ff8
mov byte [ebp - 5], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x654cdb
lea eax, [ebp - 0x1b8]
mov edx, 0xd
call fcn.004053b8
lea eax, [ebp - 0x84]
mov edx, 4
call fcn.004053b8
lea eax, [ebp - 0x44]
mov edx, 5
call fcn.004053b8
lea eax, [ebp - 0x28]
mov edx, 4
call fcn.004053b8
ret