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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1a8], 0xb
je 0x503c8a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1a8], 9
je 0x503c8a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1a8], 0xd
je 0x503c8a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1a8], 6
je 0x503c8a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1a8], 7
je 0x503c8a
mov eax, dword [ebp - 4]
mov byte [eax + 0x240], 0
mov eax, dword [0x52b860]
mov eax, dword [eax]
cmp eax, dword [ebp - 4]
je 0x503875
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x27c]
cmp dword [eax + 8], 2
jl 0x503875
mov eax, dword [ebp - 4]
mov byte [eax + 0x240], 1
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x214]
mov eax, dword [ebp - 4]
sub edx, dword [eax + 0x20c]
mov eax, dword [ebp - 4]
mov si, 0xfff8
call fcn.00403b30
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x214]
mov eax, dword [ebp - 4]
sub edx, dword [eax + 0x20c]
mov eax, dword [ebp - 4]
mov si, 0xfff7
call fcn.00403b30
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x214]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1a8], 0
je 0x503bf6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x214]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x20c]
jl 0x5038f5
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x214]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x210]
jle 0x503907
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20c]
mov edx, dword [ebp - 4]
mov dword [edx + 0x214], eax
mov eax, dword [0x52b860]
mov eax, dword [eax]
cmp eax, dword [ebp - 4]
je 0x503945
mov eax, dword [ebp - 4]
cmp byte [eax + 0x14c], 0
je 0x503945
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x22c]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x18], eax
fild qword [ebp - 0x1c]
fld xword [0x503c90]
fdivp st(1)
call fcn.00402bf8
mov dword [ebp - 0xc], eax
jmp 0x503983
mov eax, dword [ebp - 4]
cmp byte [eax + 0x240], 0
je 0x503977
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x22c]
add eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x18], eax
fild qword [ebp - 0x1c]
fdiv dword [0x503c9c]
call fcn.00402bf8
mov dword [ebp - 0xc], eax
jmp 0x503983
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x22c]
mov dword [ebp - 0xc], eax
call fcn.00406bb0
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x230]
cmp eax, dword [ebp - 0xc]
jbe 0x503bb9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x214]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x210]
jge 0x503a7b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x14c], 0
je 0x503a62
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x164]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x168]
sub edx, 2
cmp eax, edx
je 0x5039e6
push ebp
call fcn.00503788
pop ecx
test al, al
je 0x503a26
mov eax, dword [ebp - 4]
cmp dword [eax + 0x16c], 0
jge 0x503a01
push ebp
call fcn.00503788
pop ecx
test al, al
je 0x503aeb
mov eax, dword [ebp - 4]
inc dword [eax + 0x214]
mov eax, dword [ebp - 4]
inc dword [eax + 0x164]
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x230], eax
jmp 0x503aeb
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x214]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x210]
dec edx
cmp eax, edx
jge 0x503a46
mov eax, dword [ebp - 4]
inc dword [eax + 0x214]
mov eax, dword [ebp - 4]
inc dword [eax + 0x164]
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x230], eax
jmp 0x503aeb
mov eax, dword [ebp - 4]
inc dword [eax + 0x214]
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x230], eax
jmp 0x503aeb
mov eax, dword [ebp - 4]
cmp byte [eax + 0x36], 0
je 0x503a8b
mov eax, dword [ebp - 4]
mov byte [eax + 0x35], 1
mov eax, dword [0x52b860]
mov eax, dword [eax]
cmp eax, dword [ebp - 4]
jne 0x503aca
mov eax, dword [0x52ba54]
mov eax, dword [eax]
call fcn.004b5310
test al, al
je 0x503aeb
mov eax, dword [ebp - 4]
mov si, 0xfff6
call fcn.00403b30
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x1a8], edx
mov eax, dword [ebp - 4]
mov byte [eax + 0x14c], 0
jmp 0x503aeb
mov eax, dword [ebp - 4]
mov si, 0xfff6
call fcn.00403b30
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x1a8], edx
mov eax, dword [ebp - 4]
mov byte [eax + 0x14c], 0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x14c], 0
je 0x503bb9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x164]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x168]
dec edx
cmp eax, edx
jne 0x503bb9
mov eax, dword [ebp - 4]
cmp dword [eax + 0x16c], 0
jle 0x503bae
mov eax, dword [ebp - 4]
add eax, 0x16c
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x14]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0xc]
push eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0x1c]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x20]
push eax
lea eax, [ebp - 0xd]
push eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [0x52b734]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
call fcn.004c55f4
cmp byte [ebp - 0xd], 0
je 0x503ba0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x204]
call fcn.004ff470
jmp 0x503bae
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x208]
call fcn.004ff470
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x16c], edx
mov eax, dword [ebp - 4]
mov ax, word [eax + 0x14]
sub ax, 2
jb 0x503bcc
sub ax, 0x29
jne 0x503bdb
mov eax, dword [ebp - 4]
mov dword [eax + 0x248], 0xfffffff6
jmp 0x503be6
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x248], edx
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x24c], eax
jmp 0x503c62
call fcn.00406bb0
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x258]
cmp eax, 0xc8
jbe 0x503c62
call fcn.00406bb0
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x24c]
cmp eax, 0x1f4
jbe 0x503c56
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x24c], eax
mov eax, dword [ebp - 4]
inc dword [eax + 0x248]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x248]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x250]
jl 0x503c56
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x248], edx
mov eax, dword [ebp - 4]
mov si, 0xfffe
call fcn.00403b30
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x214]
cmp eax, dword [ebp - 8]
je 0x503c8a
call fcn.00406bb0
mov edx, dword [ebp - 4]
mov dword [edx + 0x260], eax
mov eax, dword [ebp - 4]
mov si, 0xfff3
call fcn.00403b30
pop esi
mov esp, ebp
pop ebp
ret