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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov byte [ebp - 5], cl
mov dword [ebp - 0x24], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x58a3e2
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov word [eax + 0x3b4], 0
mov eax, dword [0x5abcfc]
mov edx, dword [ebp + 0xc]
mov dword [eax], edx
mov eax, dword [0x5abb9c]
mov edx, dword [ebp + 8]
mov dword [eax], edx
mov eax, dword [0x5abaa8]
mov byte [eax], 0
mov eax, dword [0x5ab5c8]
xor edx, edx
mov dword [eax], edx
cmp byte [ebp - 5], 1
jne 0x5899cc
mov eax, dword [0x5abf88]
cmp byte [eax], 0
je 0x5899cc
mov eax, dword [0x5ac3a0]
mov eax, dword [eax]
call fcn.0051b360
jmp 0x58a3c4
cmp byte [ebp - 5], 1
jne 0x5899ed
mov eax, dword [0x5ac090]
cmp byte [eax], 0
je 0x5899ed
mov eax, dword [0x5ac3a0]
mov eax, dword [eax]
call fcn.0051b2a0
jmp 0x58a3c4
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [0x5ac1cc]
mov eax, dword [eax]
mov cl, byte [ebp + 0x10]
mov dl, byte [ebp - 5]
call fcn.0049b24c
test al, al
je 0x589a38
mov eax, dword [0x5ac3a0]
mov eax, dword [eax]
mov eax, dword [eax + 0xbc0]
mov byte [eax + 0x26c], 0
mov eax, dword [0x5ac3a0]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
mov byte [eax + 0x26c], 0
jmp 0x58a3c4
mov eax, dword [0x5ac3a0]
mov eax, dword [eax]
mov eax, dword [eax + 0xbc0]
mov byte [eax + 0x26c], 0
mov eax, dword [0x5ac3a0]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
mov byte [eax + 0x26c], 0
mov eax, dword [0x5ab6c4]
cmp dword [eax], 0
je 0x58a3c4
mov eax, dword [0x5b6a14]
mov eax, dword [eax + 0x20]
cmp eax, dword [0x5b6a24]
jne 0x58a3c4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x354]
cmp byte [eax + 0x40], 0
je 0x589ace
xor edx, edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x354]
call fcn.00436654
mov eax, dword [ebp - 4]
call fcn.005a0324
mov eax, dword [ebp - 4]
call fcn.005a03d4
push 0xffffff
mov al, 0xb2
call fcn.00581958
mov ecx, eax
mov edx, 0x58a3f8
mov eax, dword [0x5b6a14]
call fcn.0057ee70
test byte [ebp + 0x10], 0x10
je 0x589d40
mov al, byte [0x58a408]
cmp al, byte [ebp + 0x10]
jne 0x589ae9
mov eax, dword [0x5ac31c]
inc dword [eax]
mov eax, dword [0x5ac31c]
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x5b6a24]
call fcn.004ce024
mov dword [ebp - 0x20], eax
mov eax, dword [0x5ac31c]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x1c]
je 0x589b1f
mov eax, dword [0x5ac31c]
xor edx, edx
mov dword [eax], edx
cmp dword [ebp - 0x20], 0
je 0x589c28
test byte [ebp + 0x10], 4
je 0x589b79
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5ab3a4]
sub eax, dword [edx]
cmp eax, 0x3e8
jbe 0x589b79
mov eax, dword [ebp - 0x20]
mov al, byte [eax + 0x12]
sub al, 2
jb 0x589b51
sub al, 0x94
jne 0x589b79
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
push eax
push 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
mov edx, 0x52
mov eax, dword [ebp - 4]
call fcn.0058c338
jmp 0x58a3c4
test byte [ebp + 0x10], 2
je 0x589c31
mov eax, dword [ebp - 0x20]
mov al, byte [eax + 0x12]
sub al, 2
jb 0x589b95
sub al, 0x94
jne 0x589c31
mov eax, dword [0x5b6a24]
mov eax, dword [eax + 0x30]
mov dl, 1
call fcn.0044933c
push 0x58a414
mov eax, dword [ebp - 0x20]
push dword [eax + 0x34]
push 0x58a420
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00404b08
mov edx, dword [ebp - 0x28]
mov eax, dword [0x5b6a24]
mov eax, dword [eax + 0x30]
call fcn.00449530
mov eax, dword [0x5b6a24]
mov eax, dword [eax + 0x30]
mov edx, dword [eax]
call dword [edx + 0xc4]
mov eax, dword [0x5b6a24]
mov eax, dword [eax + 0x30]
call fcn.00451ce8
mov dl, byte [0x5ab314]
call fcn.00457d54
lea edx, [ebp - 0x2c]
mov eax, dword [0x5b6a24]
mov eax, dword [eax + 0x30]
call fcn.004494f0
mov eax, dword [ebp - 0x2c]
call fcn.00404a48
mov edx, eax
mov eax, dword [0x5b6a24]
mov eax, dword [eax + 0x30]
mov ecx, dword [eax]
call dword [ecx + 0xdc]
jmp 0x58a3c4
mov eax, dword [0x5ac31c]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
jne 0x58a3c4
mov eax, dword [0x5ab4f4]
push eax
mov eax, dword [0x5ab3a0]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x5b6a24]
call fcn.004cddd0
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov edx, dword [0x5ab4f4]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x589d15
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, dword [0x5ab3a0]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x589d15
mov eax, dword [0x5ab3a0]
mov eax, dword [eax]
push eax
mov ecx, dword [0x5ab4f4]
mov ecx, dword [ecx]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.00507510
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.0058fbf4
test al, al
je 0x589d40
mov eax, dword [ebp - 4]
call fcn.0058fbb0
test al, al
je 0x589d40
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov dx, 0xbc2
call fcn.004f7e3c
jmp 0x589d40
mov eax, dword [0x5abe74]
mov byte [eax], 1
mov eax, dword [0x5ab4f4]
mov eax, dword [eax]
mov edx, dword [0x5ab81c]
mov dword [edx], eax
mov eax, dword [0x5ab3a0]
mov eax, dword [eax]
mov edx, dword [0x5ab6a4]
mov dword [edx], eax
jmp 0x58a3c4
test byte [ebp + 0x10], 8
je 0x58a3c4
mov eax, dword [0x5ac31c]
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x5b6a24]
call fcn.004ce024
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x589e0d
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x5b6a24]
call fcn.004ce260
test al, al
je 0x589e0d
mov eax, dword [0x5ab6c4]
cmp dword [eax], 0
je 0x589e0d
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x2c], 0
jne 0x589e0d
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
je 0x589e0d
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5abdcc]
sub eax, dword [edx]
cmp eax, 0x3e8
jbe 0x58a3c4
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5abdcc]
mov dword [edx], eax
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
push eax
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
push 0
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
mov edx, 0x13fd
mov eax, dword [ebp - 4]
call fcn.0058c338
jmp 0x58a3c4
mov eax, dword [0x5ab4f4]
push eax
mov eax, dword [0x5ab3a0]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x5b6a24]
call fcn.004cddd0
mov eax, dword [0x5ac238]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x5ab3f0]
cmp byte [eax + 0x48], 0
je 0x589f3f
cmp dword [ebp - 0x20], 0
jne 0x589f3f
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
jne 0x589f3f
mov eax, dword [0x5ab3f0]
cmp byte [eax + 0x58], 0x13
jne 0x589f3f
mov eax, dword [0x5ab3a0]
mov eax, dword [eax]
push eax
mov ecx, dword [0x5ab4f4]
mov ecx, dword [ecx]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.00507510
and eax, 0xff
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0xc]
call fcn.00507770
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [0x5b6a48]
call fcn.004b2bc8
test al, al
je 0x589edd
test byte [ebp + 0x10], 1
je 0x589f3f
mov eax, dword [ebp - 4]
call fcn.0058fbf4
test al, al
je 0x589f32
mov eax, dword [ebp - 4]
call fcn.0058fbb0
test al, al
je 0x589f32
mov eax, dword [ebp - 4]
call fcn.0058fc44
test al, al
je 0x589f32
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov dx, 0xbc7
call fcn.004f7e3c
mov eax, dword [0x5abaa8]
mov byte [eax], 1
jmp 0x58a3c4
test byte [ebp + 0x10], 2
je 0x58a075
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
jne 0x58a075
mov eax, dword [0x5ab3a0]
mov eax, dword [eax]
push eax
mov ecx, dword [0x5ab4f4]
mov ecx, dword [ecx]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.00507510
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.0058fbf4
test al, al
je 0x58a065
mov eax, dword [ebp - 4]
call fcn.0058fbb0
test al, al
je 0x58a065
mov ecx, dword [0x5ab3a0]
mov ecx, dword [ecx]
mov edx, dword [0x5ab4f4]
mov edx, dword [edx]
mov eax, dword [0x5b6a24]
call fcn.004cf874
mov dword [ebp - 0x20], eax
mov eax, dword [0x5ab5c8]
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
cmp dword [ebp - 0x20], 0
je 0x58a034
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 4]
push eax
mov ecx, dword [0x5ab3a0]
mov ecx, dword [ecx]
mov edx, dword [0x5ab4f4]
mov edx, dword [edx]
mov eax, dword [ebp - 4]
call fcn.0058d88c
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov dx, 0xbc4
call fcn.004f7e3c
jmp 0x58a3c4
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov dx, 0xbc4
call fcn.004f7e3c
mov eax, dword [0x5ab81c]
mov dword [eax], 0xffffffff
jmp 0x58a3c4
cmp dword [ebp - 0x20], 0
jne 0x58a085
test byte [ebp + 0x10], 1
je 0x58a31c
mov eax, dword [0x5ab81c]
mov dword [eax], 0xffffffff
cmp dword [ebp - 0x20], 0
je 0x58a1d8
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0x32
jne 0x58a0d1
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
jne 0x58a0d1
push 0
push 0
push 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
mov edx, 0x3f2
mov eax, dword [ebp - 4]
call fcn.0058c338
jmp 0x58a3c4
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x2c], 0
jne 0x58a13c
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0
jne 0x58a13c
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x270], 0
je 0x58a13c
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5abdcc]
sub eax, dword [edx]
cmp eax, 0x3e8
jbe 0x58a3c4
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5abdcc]
mov dword [edx], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
push eax
push 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
mov edx, 0x13fd
mov eax, dword [ebp - 4]
call fcn.0058c338
jmp 0x58a3c4
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x2c], 0
jne 0x58a3c4
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
jne 0x58a3c4
mov eax, dword [0x5ac238]
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0
je 0x58a1a8
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 1
je 0x58a1a8
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0x96
je 0x58a1a8
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0xc
je 0x58a1a8
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0x32
je 0x58a1a8
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 0x34]
mov eax, 0x58a42c
call fcn.00404d8c
test eax, eax
je 0x58a1bb
test byte [ebp + 0x10], 1
jne 0x58a1bb
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x38], 0x45
jne 0x58a3c4
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
call fcn.005879cc
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5abe60]
mov dword [edx], eax
jmp 0x58a3c4
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
jne 0x58a3c4
mov eax, dword [0x5ab3a0]
mov eax, dword [eax]
push eax
mov ecx, dword [0x5ab4f4]
mov ecx, dword [ecx]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.00507510
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.0058fbf4
test al, al
je 0x58a30a
mov eax, dword [ebp - 4]
call fcn.0058fbb0
test al, al
je 0x58a30a
mov eax, dword [ebp - 4]
call fcn.0058fc44
test al, al
je 0x58a30a
mov eax, 3
call fcn.004031e8
add eax, 0xbc6
mov dword [ebp - 0x18], eax
mov eax, dword [0x5ab5a0]
cmp byte [eax], 0
je 0x58a27f
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.005873b4
test al, al
je 0x58a27f
mov dword [ebp - 0x18], 0xbcb
mov eax, dword [0x5ab6d8]
cmp byte [eax], 0
je 0x58a2ac
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp dword [eax + 0x57], 3
jl 0x58a2ac
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.0058745c
test al, al
je 0x58a2ac
mov dword [ebp - 0x18], 0xbd0
mov eax, dword [0x5abbe4]
cmp byte [eax], 0
je 0x58a2d9
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp dword [eax + 0x57], 6
jl 0x58a2d9
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.005875cc
test al, al
je 0x58a2d9
mov dword [ebp - 0x18], 0xbdc
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
mov dx, word [ebp - 0x18]
call fcn.004f7e3c
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5aba38]
mov dword [edx], eax
jmp 0x58a3c4
mov eax, dword [0x5ab6c4]
mov eax, dword [eax]
cmp byte [eax + 0x270], 0
jne 0x58a3c4
mov eax, dword [0x5ab4f4]
mov eax, dword [eax]
mov edx, dword [0x5ab6c4]
mov edx, dword [edx]
cmp eax, dword [edx + 8]
jne 0x58a37a
mov eax, dword [0x5ab3a0]
mov eax, dword [eax]
mov edx, dword [0x5ab6c4]
mov edx, dword [edx]
cmp eax, dword [edx + 0xc]
jne 0x58a37a
mov eax, dword [ebp - 4]
call fcn.0058fbf4
test al, al
je 0x58a3c4
mov eax, dword [ebp - 4]
call fcn.0058fbb0
test al, al
je 0x58a3c4
mov eax, dword [ebp - 4]
call fcn.0058d290
jmp 0x58a3c4
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x5aba38]
sub eax, dword [edx]
cmp eax, 0x3e8
jbe 0x58a3c4
test byte [ebp + 0x10], 4
je 0x58a39e
mov eax, dword [0x5abe74]
mov byte [eax], 1
jmp 0x58a3a6
mov eax, dword [0x5abe74]
mov byte [eax], 0
mov eax, dword [0x5ab4f4]
mov eax, dword [eax]
mov edx, dword [0x5ab81c]
mov dword [edx], eax
mov eax, dword [0x5ab3a0]
mov eax, dword [eax]
mov edx, dword [0x5ab6a4]
mov dword [edx], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x58a3e9
lea eax, [ebp - 0x2c]
call fcn.00404788
lea eax, [ebp - 0x28]
call fcn.00404788
ret