Function at 0x5b8384
Capabilities:
Check for time delay via gettickcount
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xfc
mov edx, dword [ebp + 8]
lea ebx, [ebp - 0xb8]
lea esi, [ebp + 0xc]
mov ecx, 8
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x64]
mov dword [ebp - 0xdc], eax
mov cl, 0xc
xor eax, eax
mov edi, dword [ebp - 0xdc]
rep stosb byte es:[edi], al
cmp edx, 0xffffffff
je 0x5b88c0
mov dword [ebp - 0x64], edx
mov dword [ebp - 0xc4], 2
mov dword [ebp - 0xcc], 0
mov esi, 1
mov eax, dword [0x8e4d70]
test eax, eax
jne 0x5b86bc
mov dword [ebp - 0xc4], esi
mov dword [ebp - 0xd0], 0xffffffff
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0xb0]
and eax, dword [ebp - 0xac]
inc eax
je 0x5b84b4
cmp byte [ebp - 0xa8], 0
je 0x5b8710
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0xb8]
xor edx, edx
mov esi, dword [ebp - 0xb0]
mov edi, dword [ebp - 0xac]
cmp edx, edi
jb 0x5b88e3
jbe 0x5b88db
xor esi, esi
cmp byte [ebp - 0xa8], 0
jne 0x5b84b4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
call fcn.00630f98
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], edx
mov byte [ebp - 0x88], 1
mov dword [ebp - 0x90], esi
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x98], edi
lea esi, [ebp - 0x98]
mov ecx, 8
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [ebp - 0xc4]
mov edi, 1
mov byte [ebp - 0xc5], 0
mov dword [ebp - 0xc4], 0xffffffff
jmp 0x5b84d0
mov ebx, dword [ebp - 0xc4]
mov edi, 1
mov byte [ebp - 0xc5], 0
mov dword [ebp - 0xc4], 0xffffffff
xor esi, esi
mov dword [ebp - 0xc0], 0
jmp 0x5b854e
mov eax, dword [ebp - 0xc0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
lea ecx, [ebp - 0x64]
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub esp, 0x10
cmp ebx, eax
jbe 0x5b852d
cmp dword [ebp - 0xcc], eax
je 0x5b8d06
cmp dword [ebp - 0xd0], eax
je 0x5b8d0d
cmp dword [ebp - 0xc4], eax
je 0x5b8604
cmp byte [ebp - 0xa8], 0
je 0x5b8544
add dword [ebp - 0xb0], 2
adc dword [ebp - 0xac], 0xffffffff
mov edx, esi
test dl, dl
je 0x5b8604
mov ecx, edi
test cl, cl
jne 0x5b8584
test ebx, ebx
je 0x5b8570
cmp byte [ebp - 0xc5], 0
je 0x5b84e0
mov eax, 0xffffffff
jmp 0x5b84e6
mov eax, dword [ebp - 0xc0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push ecx
jmp 0x5b852d
mov eax, dword [ebp - 0xb0]
and eax, dword [ebp - 0xac]
inc eax
je 0x5b85ec
cmp byte [ebp - 0xa8], 0
je 0x5b8628
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0xb8]
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xbc], 0
mov eax, dword [ebp - 0xb0]
mov edx, dword [ebp - 0xac]
cmp dword [ebp - 0xbc], edx
jae 0x5b86ac
sub eax, dword [ebp - 0xc0]
sbb edx, dword [ebp - 0xbc]
cmp edx, 0
jbe 0x5b868b
lea esi, [esi]
mov eax, 0xfffffffe
mov esi, 1
mov dword [ebp - 0xc0], eax
jmp 0x5b8554
xor ebx, ebx
mov eax, dword [ebp - 0x1c]
lea edx, [eax - 1]
cmp edx, 0xfffffffd
ja 0x5b861b
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov al, bl
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
call fcn.00630f98
mov ecx, eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
cmp edx, dword [ebp - 0x9c]
jge 0x5b869c
lea esi, [ebp - 0x50]
mov dword [esp + 8], esi
lea eax, [ebp - 0xa0]
mov dword [esp + 4], eax
lea edx, [ebp - 0x58]
mov dword [esp], edx
call fcn.006b96d8
push eax
mov dword [esp + 8], 0x3e8
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
add eax, 1
adc edx, 0
cmp edx, 0
ja 0x5b85ec
cmp eax, 0xfffffffe
ja 0x5b85ec
xor esi, esi
jmp 0x5b85f6
jle 0x5b88ac
xor eax, eax
xor esi, esi
jmp 0x5b85f6
ja 0x5b86a2
cmp dword [ebp - 0xc0], eax
jb 0x5b85d4
jmp 0x5b86a2
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push edi
test eax, eax
je 0x5b83ec
mov eax, dword [0x8e4d70]
test eax, eax
je 0x5b86df
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push ecx
cmp byte [eax + 0x18], 0
je 0x5b83ec
mov eax, dword [0x8e4d70]
test eax, eax
je 0x5b86fb
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push edx
mov eax, dword [eax + 0xc]
mov dword [ebp + esi*4 - 0x64], eax
mov dword [ebp - 0xd0], esi
jmp 0x5b83fc
call fcn.00630f98
mov ecx, eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
cmp edx, dword [ebp - 0x9c]
jg 0x5b844b
jge 0x5b8cc6
lea edx, [ebp - 0x40]
lea eax, [ebp - 0x50]
mov dword [esp + 8], eax
lea eax, [ebp - 0xa0]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.006b96d8
push eax
mov dword [esp + 8], 0x3e8
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
add eax, 1
adc edx, 0
cmp edx, 0
jbe 0x5b8cd7
lea esi, [esi]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateWaitableTimerA
sub esp, 0xc
mov ebx, eax
mov eax, dword [ebp - 0x1c]
lea edx, [eax - 1]
cmp edx, 0xfffffffd
jbe 0x5b8d4b
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x5b84b4
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
cmp byte [ebp - 0xa8], 0
je 0x5b8907
call sub.KERNEL32.dll_GetTickCount
mov ecx, eax
sub ecx, dword [ebp - 0xb8]
xor ebx, ebx
mov eax, dword [ebp - 0xb0]
mov edx, dword [ebp - 0xac]
sub eax, ecx
sbb edx, ebx
cmp edx, 0
jl 0x5b8843
jle 0x5b8f18
mov esi, eax
mov edi, edx
shld edi, esi, 2
add esi, esi
add esi, esi
mov ecx, eax
mov ebx, edx
shld ebx, ecx, 7
shl ecx, 7
sub ecx, esi
sbb ebx, edi
add ecx, eax
adc ebx, edx
mov eax, ecx
mov edx, ebx
shld edx, eax, 2
add eax, eax
add eax, eax
add eax, ecx
adc edx, ebx
shld edx, eax, 4
shl eax, 4
neg eax
adc edx, 0
neg edx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_SetWaitableTimer
sub esp, 0x18
test eax, eax
je 0x5b84b4
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0xc4]
mov dword [ebp + edx*4 - 0x64], eax
mov ebx, edx
inc ebx
xor edi, edi
mov byte [ebp - 0xc5], 1
jmp 0x5b84d0
cmp ecx, dword [ebp - 0xa0]
jb 0x5b863d
jmp 0x5b86a2
mov dword [ebp - 0xc4], 1
mov dword [ebp - 0xcc], 0xffffffff
xor esi, esi
jmp 0x5b83df
cmp eax, esi
jae 0x5b844b
sub esi, eax
sbb edi, edx
cmp edi, 0
ja 0x5b8780
cmp esi, 0xfffffffe
ja 0x5b8780
cmp esi, 0x14
jbe 0x5b844d
jmp 0x5b8780
lea edx, [ebp - 0x74]
mov dword [ebp - 0xe0], edx
mov ecx, 0x10
xor eax, eax
mov edi, edx
rep stosb byte es:[edi], al
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0x9c]
lea edx, [eax - 0x80000000]
or edx, ecx
je 0x5b8ce7
mov ebx, eax
xor ebx, 0x7fffffff
mov edx, ecx
not edx
or edx, ebx
je 0x5b8f0e
mov edx, ecx
xor edx, 0xfffffffe
or ebx, edx
je 0x5b8f31
lea ebx, [ebp - 0x2a]
mov dword [esp + 8], 0x1dd76000
mov dword [esp + 0xc], 0x14
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0064d8b8
push eax
mov dword [esp], ebx
call fcn.0064d80c
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0064d8b8
push esi
mov ax, word [ebp - 0x2a]
mov word [ebp - 0x74], ax
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0x9c]
lea edx, [eax - 0x80000000]
or edx, ecx
je 0x5b8e1a
mov esi, eax
xor esi, 0x7fffffff
mov edx, ecx
not edx
or edx, esi
je 0x5b8f04
mov edx, ecx
xor edx, 0xfffffffe
or esi, edx
je 0x5b8f26
mov dword [esp + 8], 0x1dd76000
mov dword [esp + 0xc], 0x14
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0064d8b8
push edi
mov dword [esp], ebx
call fcn.0064d80c
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0064d8b8
push ecx
mov eax, dword [ebp - 0x28]
mov word [ebp - 0x72], ax
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0x9c]
lea edx, [eax - 0x80000000]
or edx, ecx
je 0x5b8ee2
mov esi, eax
xor esi, 0x7fffffff
mov edx, ecx
not edx
or edx, esi
je 0x5b8efd
mov edx, ecx
xor edx, 0xfffffffe
or esi, edx
je 0x5b8f2d
mov dword [esp + 8], 0x1dd76000
mov dword [esp + 0xc], 0x14
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0064d8b8
push esi
mov edi, dword [ebp - 0x28]
movzx eax, di
mov ecx, 0xe
sub ecx, eax
mov edx, 0x2aaaaaab
mov eax, ecx
imul edx
sar edx, 1
sar ecx, 0x1f
sub dx, cx
mov ecx, edx
mov ax, word [ebp - 0x2a]
add eax, 0x12c0
sub ax, dx
movzx edx, word [ebp - 0x26]
mov dword [ebp - 0xc0], edx
movzx esi, ax
lea edx, [esi + esi*8]
lea edx, [esi + edx*8]
lea edx, [edx + edx*4]
mov esi, dword [ebp - 0xc0]
lea edx, [esi + edx - 0x7d2d]
mov dword [ebp - 0xc0], edx
mov edx, eax
shr dx, 2
movzx edx, dx
mov esi, dword [ebp - 0xc0]
add esi, edx
mov dword [ebp - 0xc0], esi
shr ax, 4
movzx esi, ax
lea eax, [esi + esi*4]
lea eax, [esi + eax*8]
shl eax, 5
sub eax, esi
shl eax, 1
shr eax, 0x10
mov esi, dword [ebp - 0xc0]
add esi, eax
lea eax, [edx + edx*4]
lea eax, [edx + eax*8]
shl eax, 5
sub eax, edx
shl eax, 2
sub eax, edx
shr eax, 0x11
sub esi, eax
lea ecx, [ecx + ecx*2]
lea edx, [edi + ecx*4 - 3]
movzx edx, dx
lea eax, [edx + edx*8]
lea eax, [edx + eax*2]
lea eax, [edx + eax*8 + 2]
mov edx, 0x66666667
imul edx
sar edx, 1
lea edx, [esi + edx]
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0064d8b8
push edx
mov ax, word [ebp - 0x26]
mov word [ebp - 0x6e], ax
mov esi, dword [ebp - 0xa0]
mov ebx, dword [ebp - 0x9c]
lea edi, [ebx - 0x80000000]
mov ecx, edi
or ecx, esi
je 0x5b8e36
mov edx, ebx
xor edx, 0x7fffffff
mov eax, esi
not eax
or eax, edx
je 0x5b8ef3
mov eax, esi
xor eax, 0xfffffffe
or edx, eax
je 0x5b8f3f
mov dword [esp + 8], 0x1dd76000
mov dword [esp + 0xc], 0x14
mov dword [esp], esi
mov dword [esp + 4], ebx
call sub.libgcc_s_dw2_1.dll___moddi3
mov dword [esp + 8], 0xd693a400
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
mov word [ebp - 0x6c], ax
mov edx, ebx
xor edx, 0x7fffffff
mov eax, esi
xor eax, 0xfffffffe
or edx, eax
je 0x5b8f38
mov dword [esp + 8], 0x1dd76000
mov dword [esp + 0xc], 0x14
mov dword [esp], esi
mov dword [esp + 4], ebx
call sub.libgcc_s_dw2_1.dll___moddi3
mov dword [esp + 8], 0x3938700
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___moddi3
mov word [ebp - 0x6a], ax
mov dword [esp + 8], 0x1dd76000
mov dword [esp + 0xc], 0x14
mov dword [esp], esi
mov dword [esp + 4], ebx
call sub.libgcc_s_dw2_1.dll___moddi3
mov dword [esp + 8], 0xf4240
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___moddi3
mov word [ebp - 0x68], ax
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
lea edx, [ebp - 0x74]
mov dword [esp], edx
call sub.KERNEL32.dll_SystemTimeToFileTime
sub esp, 8
test eax, eax
jne 0x5b8d5a
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
jmp 0x5b8843
cmp ecx, dword [ebp - 0xa0]
jae 0x5b844b
jmp 0x5b872f
cmp eax, 0xfffffffe
ja 0x5b8780
mov esi, eax
jmp 0x5b88f9
mov eax, 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x20]
mov dword [esp], eax
call fcn.0065084c
mov eax, dword [ebp - 0x20]
lea ebx, [ebp - 0x2a]
jmp 0x5b898a
mov bl, 1
jmp 0x5b8606
mov eax, dword [0x8e4d70]
test eax, eax
jne 0x5b8e0c
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push ebx
mov dword [esp], 1
call fcn.00767ac4
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80be38
mov dword [esp], eax
call fcn.007682d4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
jmp 0x5b87b0
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0x9c]
lea edx, [eax - 0x80000000]
or edx, ecx
je 0x5b8f46
mov ebx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0xe8], ebx
mov dword [ebp - 0xe4], esi
cmp eax, 0x7fffffff
je 0x5b8ff5
mov edi, eax
xor edi, 0x7fffffff
mov edx, ecx
xor edx, 0xfffffffe
or edi, edx
je 0x5b8fdf
mov dword [esp + 8], 0x1dd76000
mov dword [esp + 0xc], 0x14
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.libgcc_s_dw2_1.dll___moddi3
mov dword [esp + 8], 0xf4240
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___moddi3
mov esi, eax
mov edi, edx
add esi, eax
adc edi, edx
shld edx, eax, 3
shl eax, 3
add esi, eax
adc edi, edx
mov ebx, esi
mov esi, edi
add ebx, dword [ebp - 0xe8]
adc esi, dword [ebp - 0xe4]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], esi
jmp 0x5b8843
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push esi
jmp 0x5b8d1a
mov eax, 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x24]
mov dword [esp], eax
call fcn.0065084c
mov eax, dword [ebp - 0x24]
jmp 0x5b8a0b
mov eax, 1
mov edx, dword [eax*8 + 0x7f2c84]
mov eax, dword [eax*8 + 0x7f2c80]
mov dword [esp + 8], 0xd693a400
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
mov word [ebp - 0x6c], ax
mov eax, edi
or eax, esi
jne 0x5b8fc0
mov eax, 1
mov edx, dword [eax*8 + 0x7f2c84]
mov eax, dword [eax*8 + 0x7f2c80]
mov dword [esp + 8], 0x3938700
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___moddi3
mov word [ebp - 0x6a], ax
or edi, esi
jne 0x5b8f9c
mov eax, 1
mov edx, dword [eax*8 + 0x7f2c84]
mov eax, dword [eax*8 + 0x7f2c80]
jmp 0x5b8c5a
mov eax, 1
mov edx, dword [eax*4 + 0x7f2ca8]
jmp 0x5b8b43
mov eax, 2
jmp 0x5b8e3b
mov eax, 2
jmp 0x5b8ee7
mov eax, 2
jmp 0x5b8e1f
mov eax, 2
jmp 0x5b8cec
cmp eax, 0
jbe 0x5b8843
jmp 0x5b8800
xor eax, eax
jmp 0x5b8e1f
xor eax, eax
jmp 0x5b8ee7
xor eax, eax
jmp 0x5b8cec
xor eax, eax
jmp 0x5b8e78
xor eax, eax
jmp 0x5b8e3b
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0xe4], edx
mov eax, 1
mov edx, dword [eax*8 + 0x7f2c84]
mov eax, dword [eax*8 + 0x7f2c80]
mov dword [esp + 8], 0xf4240
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___moddi3
imul ebx, edx, 0xa
mov esi, 0xa
mul esi
mov esi, eax
mov edi, edx
add edi, ebx
jmp 0x5b8df1
cmp ebx, 0x7fffffff
je 0x5b8fe6
mov edx, ebx
xor edx, 0x7fffffff
mov eax, esi
xor eax, 0xfffffffe
or edx, eax
jne 0x5b8c3e
xor eax, eax
jmp 0x5b8ecf
cmp ebx, 0x7fffffff
jne 0x5b8bd1
cmp esi, 0xffffffff
jne 0x5b8bd1
mov eax, 2
jmp 0x5b8e78
xor eax, eax
jmp 0x5b8f5d
cmp esi, 0xffffffff
jne 0x5b8fa4
mov eax, 2
jmp 0x5b8ecf
cmp ecx, 0xffffffff
jne 0x5b8d91
mov eax, 2
jmp 0x5b8f5d