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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov ebx, eax
mov esi, dword [0x531548]
cmp dword [esi], 0
je 0x511e39
mov eax, dword [esi]
cmp byte [eax + 0x375], 0
jne 0x511e39
mov eax, dword [0x531678]
cmp dword [eax], 0
jle 0x511d4b
mov eax, ebx
call fcn.00518480
test al, al
je 0x511d4b
mov eax, ebx
call fcn.00518454
test al, al
je 0x511d4b
mov eax, dword [0x531678]
mov eax, dword [eax]
mov edx, dword [esi]
cmp eax, dword [edx + 8]
jne 0x5118ef
mov eax, dword [0x53152c]
mov eax, dword [eax]
mov edx, dword [esi]
cmp eax, dword [edx + 0xc]
je 0x511d4b
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], eax
mov edi, dword [0x531678]
mov edi, dword [edi]
mov ebp, dword [0x53152c]
mov ebp, dword [ebp]
push ebp
mov ecx, edi
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.004ce290
mov byte [esp + 0xc], al
mov eax, dword [0x531be4]
mov al, byte [eax]
sub al, 1
jb 0x51193b
je 0x511b66
jmp 0x511d4b
mov eax, dword [esi]
call fcn.004c3918
mov dword [esp + 8], eax
cmp dword [esp + 8], 0
jle 0x511b56
xor ecx, ecx
mov cl, byte [esp + 0xc]
mov edx, 0xbc3
mov eax, ebx
call fcn.005185f4
test al, al
je 0x511b56
lea ecx, [esp + 4]
mov edx, esp
mov al, byte [esp + 0xc]
call fcn.004ce14c
mov byte [esp + 0xf], 0
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x67d1ac]
call fcn.004b7048
test al, al
jne 0x511b21
mov byte [esp + 0xe], 0
mov byte [esp + 0xd], 0
cmp byte [esp + 0xe], 0
jne 0x5119e0
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], eax
lea ecx, [esp + 4]
mov edx, esp
mov al, byte [esp + 0xc]
call fcn.004ce14c
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, ebx
call fcn.00514bb4
test al, al
je 0x5119e0
mov byte [esp + 0xf], 1
cmp byte [esp + 0xf], 0
jne 0x511a98
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x67d1ac]
call fcn.004b7080
test al, al
jne 0x511a98
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], eax
xor eax, eax
mov al, byte [esp + 0xc]
call fcn.004ce984
mov byte [esp + 0xd], al
lea ecx, [esp + 4]
mov edx, esp
mov al, byte [esp + 0xd]
call fcn.004ce14c
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x67d1d0]
call fcn.004cd564
test al, al
jne 0x511a93
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], eax
xor eax, eax
mov al, byte [esp + 0xc]
call fcn.004ce994
mov byte [esp + 0xd], al
lea ecx, [esp + 4]
mov edx, esp
mov al, byte [esp + 0xd]
call fcn.004ce14c
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x67d1d0]
call fcn.004cd564
test al, al
je 0x511a98
mov byte [esp + 0xe], 1
jmp 0x511a98
mov byte [esp + 0xe], 1
cmp byte [esp + 0xe], 0
je 0x511ad4
mov eax, dword [esp + 4]
push eax
xor eax, eax
mov al, byte [esp + 0x11]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 0xbc3
call fcn.004c29c8
call fcn.00407464
mov edx, dword [0x531258]
mov dword [edx], eax
jmp 0x511d4b
push ebp
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov ecx, edi
call fcn.004ce290
mov edx, dword [esi]
cmp al, byte [edx + 0x10]
je 0x511b11
mov edx, dword [esi]
mov edx, dword [edx + 0xc]
push edx
and eax, 0xff
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [eax + 8]
mov eax, dword [esi]
mov dx, 0xbc2
call fcn.004c28ec
mov eax, dword [0x531678]
mov dword [eax], 0xffffffff
jmp 0x511d4b
mov eax, dword [esp + 4]
push eax
xor eax, eax
mov al, byte [esp + 0x10]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 0xbc3
call fcn.004c29c8
call fcn.00407464
mov edx, dword [0x531258]
mov dword [edx], eax
jmp 0x511d4b
mov eax, dword [0x531678]
mov dword [eax], 0xffffffff
jmp 0x511d4b
mov eax, dword [0x531ef4]
cmp byte [eax], 0
jne 0x511b7e
mov eax, dword [0x531e28]
cmp dword [eax], 1
jl 0x511d3f
mov eax, dword [esi]
call fcn.004c393c
mov dword [esp + 8], eax
mov eax, dword [esi]
cmp byte [eax + 0x16], 0
je 0x511c41
push ebp
mov ecx, edi
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.004ce120
cmp eax, 3
jl 0x511c41
cmp dword [esp + 8], 0
jle 0x511c41
xor ecx, ecx
mov cl, byte [esp + 0xc]
mov edx, 0xbdb
mov eax, ebx
call fcn.005185f4
test al, al
je 0x511c41
lea ecx, [esp + 4]
mov edx, esp
mov al, byte [esp + 0xc]
call fcn.004ce220
mov eax, dword [esp]
push eax
mov eax, dword [esp + 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov eax, dword [0x67d1ac]
call fcn.004b6e94
test al, al
je 0x511c34
mov eax, dword [esp + 4]
push eax
xor eax, eax
mov al, byte [esp + 0x10]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 0xbdb
call fcn.004c29c8
call fcn.00407464
mov edx, dword [0x531258]
mov dword [edx], eax
jmp 0x511d4b
mov eax, dword [0x531be4]
mov byte [eax], 0
jmp 0x5118ef
push ebp
mov ecx, edi
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.004ce120
cmp eax, 2
jl 0x511cf2
cmp dword [esp + 8], 0
jle 0x511cf2
movzx edi, byte [esp + 0xc]
mov ecx, edi
mov edx, 0xbc5
mov eax, ebx
call fcn.005185f4
test al, al
je 0x511ce5
lea ecx, [esp + 4]
mov edx, esp
mov al, byte [esp + 0xc]
call fcn.004ce1b0
mov eax, dword [esp]
push eax
mov eax, dword [esp + 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov eax, dword [0x67d1ac]
call fcn.004b6e94
test al, al
je 0x511cd8
mov eax, dword [esp + 4]
push eax
push edi
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 0xbc5
call fcn.004c29c8
call fcn.00407464
mov edx, dword [0x531258]
mov dword [edx], eax
jmp 0x511d4b
mov eax, dword [0x531be4]
mov byte [eax], 0
jmp 0x5118ef
mov eax, dword [0x531678]
mov dword [eax], 0xffffffff
jmp 0x511d4b
push ebp
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov ecx, edi
call fcn.004ce290
mov edx, dword [esi]
cmp al, byte [edx + 0x10]
je 0x511d2f
mov edx, dword [esi]
mov edx, dword [edx + 0xc]
push edx
and eax, 0xff
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [eax + 8]
mov eax, dword [esi]
mov dx, 0xbc2
call fcn.004c28ec
mov eax, dword [0x531678]
mov dword [eax], 0xffffffff
jmp 0x51193b
mov eax, dword [0x531e28]
inc dword [eax]
jmp 0x51193b
mov eax, dword [0x531678]
mov dword [eax], 0xffffffff
mov eax, dword [esi]
mov eax, dword [eax + 0x348]
test eax, eax
jle 0x511e39
mov dword [ebx + 0x428], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x354]
mov dword [ebx + 0x42c], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x348]
cmp eax, 0xbc9
jne 0x511db7
mov edx, dword [esi]
mov edx, dword [edx + 0x350]
push edx
mov edx, dword [esi]
mov edx, dword [edx + 0x354]
push edx
mov edx, dword [esi]
mov edx, dword [edx + 0x358]
push edx
mov edx, dword [esi]
mov ecx, dword [edx + 0x34c]
mov edx, eax
mov eax, ebx
call fcn.00516b8c
jmp 0x511dda
mov edx, dword [esi]
mov edx, dword [edx + 0x350]
push edx
mov edx, dword [esi]
mov edx, dword [edx + 0x354]
push edx
mov edx, dword [esi]
mov ecx, dword [edx + 0x34c]
mov edx, eax
mov eax, ebx
call fcn.00516af4
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x348], edx
mov eax, dword [0x531b34]
cmp dword [eax], 0xffffffff
je 0x511e39
mov eax, dword [0x531b34]
mov eax, dword [eax]
mov edx, dword [esi]
sub eax, dword [edx + 8]
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jge 0x511e1a
mov eax, dword [0x531a14]
mov eax, dword [eax]
mov edx, dword [esi]
sub eax, dword [edx + 0xc]
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jl 0x511e39
mov eax, dword [0x531418]
mov byte [eax], 0
mov eax, dword [0x5320e8]
mov eax, dword [eax]
call fcn.004f2a34
mov eax, dword [0x531b34]
mov dword [eax], 0xffffffff
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret