Function at 0x100528e0
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x454
mov eax, dword [0x11ad127c]
xor eax, esp
mov dword [esp + 0x450], eax
mov eax, dword [ebp + 8]
mov edx, dword [0x11d0c5b8]
mov dword [esp + 0x2c], eax
mov eax, dword fs:[0x2c]
push ebx
push esi
push edi
mov ebx, dword [eax + edx*4]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x10], ebx
mov eax, dword [ebx + 0x10]
cmp dword [eax + 0x2d0], 0x2000
jb 0x1005294f
cmp byte [ebp + 0x14], 0
je 0x1005294f
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x450]
xor ecx, esp
call fcn.1045066c
mov esp, ebp
pop ebp
ret 0x14
add eax, 0x7a80
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
lea eax, [esp + 0x58]
push 0x100
xor edx, edx
mov dword [esp + 0x18], edi
push edi
xor esi, esi
mov dword [esp + 0x14], edx
push eax
mov dword [esp + 0x24], esi
call fcn.10425c00
add esp, 0xc
lea eax, [esp + 0x258]
push 0x100
push edi
push eax
call fcn.10425c00
add esp, 0xc
lea eax, [esp + 0x358]
push 0x100
push edi
push eax
call fcn.10425c00
add esp, 0xc
lea eax, [esp + 0x158]
push 0x100
push edi
push eax
call fcn.10425c00
xor eax, eax
add esp, 0xc
mov dword [esp + 0x2c], eax
cmp dword [ebp + 0xc], eax
jbe 0x10053086
mov ecx, dword [esp + 0x38]
mov esi, dword [ecx + eax*4]
mov dword [esp + 0x40], esi
mov eax, dword [esi]
test eax, eax
je 0x100529f3
mov eax, dword [eax + 0x48]
and eax, 0x1000000
or eax, 0
jne 0x10052ecf
cmp dword [esi + 8], 0
lea eax, [esi + 8]
mov dword [esp + 0x3c], eax
je 0x10052ecf
mov eax, dword [esi + 0xb38]
test al, 1
jne 0x10052a23
test al, al
js 0x10052ecf
cmp dword [esi + 0xaec], 0xffffffff
jne 0x10052ecf
mov ecx, dword [esp + 0x10]
xor edx, edx
mov esi, dword [esp + 0x3c]
or edi, 0xffffffff
mov dword [esp + 0x20], edx
xor ebx, ebx
mov edx, 1
mov dword [esp + 0x1c], edx
nop
cmp byte [ecx + 8], 0
jne 0x10052a56
call fcn.10450c0b
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 0xbe2c]
cmp dword [eax + ebx*4 + 0x11dc], 0
je 0x10052af2
cmp byte [ecx + 8], 0
jne 0x10052a82
call fcn.10450c0b
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 0xbe2c]
mov edx, dword [eax + 0x107c]
cmp byte [edx + 0x21], 0
je 0x10052ad3
mov eax, dword [esi + 0xc0]
mov ecx, esi
test eax, eax
cmovne ecx, eax
mov eax, dword [ecx + ebx*4 + 0x9cc]
cmp eax, dword [edx + ebx*4 + 0x830]
mov edx, dword [esp + 0x1c]
je 0x10052acb
test dword [ecx + 0x9c4], edx
jne 0x10052acb
mov ecx, dword [esp + 0x10]
xor al, al
jmp 0x10052ae0
mov ecx, dword [esp + 0x10]
mov al, 1
jmp 0x10052ae0
mov edx, dword [esp + 0x1c]
test dword [esi + 0xc8], edx
setne al
test al, al
je 0x10052af2
inc dword [esp + 0x20]
mov eax, ebx
cmp edi, 0xffffffff
cmovne eax, edi
mov edi, eax
inc ebx
rol edx, 1
mov dword [esp + 0x1c], edx
cmp ebx, 0x20
jb 0x10052a40
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x40]
cmp edx, 1
ja 0x10052ec7
cmp dword [esi + 0xb18], 0
je 0x10052c81
cmp dword [esi + 0xb30], 0
je 0x10052b82
inc dword [esi + 0xa6c]
cmp dword [esi + 8], 0
je 0x10052b6a
mov eax, dword [ecx + 0x10]
mov ecx, esi
mov eax, dword [eax + 0x7c5c]
shr eax, 5
and al, 1
mov byte [esp + 0x44], al
push dword [esp + 0x44]
push 0
call fcn.1004ca70
mov eax, dword [esi + 0xb30]
mov dword [esi + 4], eax
mov dword [esi + 0xb30], 0
and dword [esi + 0xb38], 0xffffffdf
mov ecx, esi
call fcn.1004af00
mov edi, eax
test edi, edi
js 0x10052f46
cmp dword [esi + 0xa6c], 0
je 0x10052ba3
and dword [esi + 0xb38], 0xffffffdf
mov ecx, esi
call fcn.1004af00
mov edi, eax
test edi, edi
js 0x10052f59
mov ebx, dword [esp + 0x10]
lea edx, [esi + 8]
xor eax, eax
mov dword [esp + 0x18], eax
push 0
mov eax, dword [ebx + 0x10]
push edx
mov ecx, dword [eax + 0x7a68]
mov eax, dword [ecx]
call dword [eax + 0x144]
mov edx, dword [esi + 0xb18]
or dword [esi + 0xb38], 0x80
mov dword [esp + 0x24], edx
mov edi, dword [edx + 0xafc]
mov ecx, edi
inc dword [edx + 0xaf8]
shl ecx, 0x1c
sar ecx, 0x1c
cmp dword [edx + 0xaf8], 1
jne 0x10052bfd
mov ecx, dword [ebp + 0x10]
jmp 0x10052c0b
mov eax, dword [ebp + 0x10]
cmp eax, ecx
jg 0x10052c09
cmp ecx, 4
jne 0x10052c0b
mov ecx, eax
mov eax, edi
xor eax, ecx
and eax, 0xf
xor eax, edi
mov dword [edx + 0xafc], eax
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x1c0]
mov ecx, dword [edx + 0x1c4]
mov dword [esi + 0xb0c], ecx
mov ecx, dword [esp + 0x24]
mov dword [esi + 0xb08], eax
mov eax, dword [ecx + 0xaf8]
cmp eax, dword [ecx + 0xb10]
jne 0x10052c75
push dword [ebp + 0x18]
mov eax, dword [ecx + 0xafc]
mov ecx, edx
push dword [ebp + 0x14]
shl eax, 0x1c
sar eax, 0x1c
push eax
push 1
lea eax, [esp + 0x34]
push eax
call fcn.100528e0
mov dword [esp + 0x18], eax
test eax, eax
js 0x10052f6c
mov dword [esi + 4], 0
jmp 0x10052ecb
and byte [esi + 0xb00], 0xfe
cmp edx, 1
je 0x10052ddb
cmp byte [ebp + 0x18], 0
jne 0x10052de1
cmp dword [esi + 0xb30], 0
mov eax, 1
mov dword [esp + 0x18], eax
je 0x10052d0c
inc dword [esi + 0xa6c]
cmp dword [esi + 8], 0
je 0x10052cee
mov eax, dword [ecx + 0x10]
mov ecx, esi
mov eax, dword [eax + 0x7c5c]
shr eax, 5
and al, 1
mov byte [esp + 0x30], al
push dword [esp + 0x30]
push 0
call fcn.1004ca70
mov eax, dword [esi + 0xb30]
mov dword [esi + 4], eax
mov dword [esi + 0xb30], 0
and dword [esi + 0xb38], 0xffffffdf
mov ecx, esi
call fcn.1004af00
mov edi, eax
test edi, edi
js 0x10052f46
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [esi + 0xa6c], 0
je 0x10052d33
and dword [esi + 0xb38], 0xffffffdf
mov ecx, esi
call fcn.1004af00
mov edi, eax
test edi, edi
js 0x10052f59
xor eax, eax
mov dword [esp + 0x18], eax
test eax, eax
jne 0x10052d40
or byte [esi + 0xb00], 1
jmp 0x10052d46
xor eax, eax
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x10]
lea edi, [esi + 8]
push 0
push edi
mov eax, dword [ebx + 0x10]
mov ecx, dword [eax + 0x7a68]
mov eax, dword [ecx]
call dword [eax + 0x144]
test byte [esi + 0xb38], 1
mov ecx, dword [esp + 0xc]
je 0x10052daf
mov eax, dword [esi]
mov edi, dword [esp + 0x14]
test eax, eax
je 0x10052ed3
mov eax, dword [eax + 0x28c]
test eax, eax
je 0x10052ed3
mov dword [esp + edi*4 + 0x258], eax
mov dword [esp + edi*4 + 0x358], esi
inc edi
or dword [esi + 0xb38], 0x80
mov dword [esp + 0x14], edi
jmp 0x10052ed3
mov eax, dword [edi]
mov edi, dword [esp + 0x14]
mov dword [esp + ecx*4 + 0x58], eax
or dword [esi + 0xb38], 0x80
mov dword [esp + ecx*4 + 0x158], esi
inc ecx
or byte [esi + 0xb9], 0x10
mov dword [esp + 0xc], ecx
jmp 0x10052ed3
cmp byte [ebp + 0x18], 0
je 0x10052e50
cmp edi, 0xffffffff
jne 0x10052e50
cmp byte [ecx + 8], 0
jne 0x10052df8
call fcn.10450c0b
mov ecx, dword [esp + 0x10]
mov ebx, dword [ecx + 0x10]
mov ecx, esi
push dword [ebx + 0xbe2c]
call fcn.1004efb0
xor edi, edi
nop dword [eax]
mov edx, 1
mov ecx, edi
shl edx, cl
test eax, edx
jne 0x10052e25
inc edi
cmp edi, 0x1f
jb 0x10052e10
jmp 0x10052e2a
cmp edi, 0xffffffff
jne 0x10052e50
mov ecx, dword [ebx + 0xfd48]
xor edi, edi
test ecx, ecx
je 0x10052e4d
lea eax, [ebx + 0xf968]
nop dword [eax]
cmp dword [eax], 1
je 0x10052e50
inc edi
add eax, 0x20
cmp edi, ecx
jb 0x10052e40
or edi, 0xffffffff
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + edi*4 + 0xbc]
test eax, eax
je 0x10052e65
mov dword [eax + 0xae4], esi
mov eax, dword [ecx + edi*4 + 0xbc]
mov ebx, dword [esp + 0x10]
mov dword [esi + 0xae8], eax
inc dword [ecx + edi*4 + 0x13c]
mov dword [ecx + edi*4 + 0xbc], esi
mov eax, dword [esi + 0xaf0]
xor eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0xc]
and eax, 0xf
xor dword [esi + 0xaf0], eax
test byte [esi + 0xb38], 1
mov al, byte [esi + 0xb9]
mov dword [esi + 0xaec], edi
mov edi, dword [esp + 0x14]
je 0x10052ebd
and al, 0xef
mov byte [esi + 0xb9], al
jmp 0x10052ed3
or al, 0x10
mov byte [esi + 0xb9], al
jmp 0x10052ed3
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [ebp + 0xc]
jb 0x100529d1
test ecx, ecx
je 0x10052f76
cmp byte [ebx + 8], 0
jne 0x10052eff
call fcn.10450c0b
mov ecx, dword [esp + 0xc]
push dword [ebp + 0x10]
mov eax, dword [ebx + 0x10]
push ecx
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [eax + 0xbe2c]
push 0
call fcn.101d5da0
mov esi, eax
test esi, esi
jns 0x10052f7a
mov edx, dword [esp + 0xc]
xor ecx, ecx
mov eax, dword [esp + ecx*4 + 0x158]
inc ecx
and dword [eax + 0xb38], 0xffffff7f
and byte [eax + 0xb9], 0xef
cmp ecx, edx
jb 0x10052f27
jmp 0x10052f7a
mov esi, edi
call fcn.1001db80
mov ebx, dword [esp + 0x10]
mov dword [eax + 8], edi
jmp 0x10053086
mov esi, eax
call fcn.1001db80
mov ebx, dword [esp + 0x10]
mov dword [eax + 8], edi
jmp 0x10053086
mov esi, 0x80004005
jmp 0x10053086
mov esi, dword [esp + 0x18]
test edi, edi
je 0x10053086
cmp byte [ebx + 8], 0
jne 0x10052f90
call fcn.10450c0b
mov eax, dword [ebx + 0x10]
xor esi, esi
mov edx, dword [esp + 0x14]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], edx
mov edi, dword [eax + 0xbe2c]
lea eax, [esp + 0x258]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x54], eax
cmp dword [edi + 0x1044], 0x3001
jb 0x10053066
mov ecx, dword [edi + 0x10e8]
test ecx, ecx
je 0x10053066
mov eax, dword [edi]
cmp dword [eax + 0xd45c], 1
jne 0x1005304a
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [edi + 0x1428]
push eax
call esi
mov eax, dword [edi + 0x10e8]
lea ecx, [esp + 0x48]
push ecx
push dword [edi + 0x11cc]
call eax
push eax
push ecx
mov ecx, edi
call fcn.101c9e10
mov dword [esp + 0x18], eax
xorps xmm0, xmm0
lea eax, [esp + 0x30]
movlpd qword [esp + 0x30], xmm0
push eax
call esi
mov ecx, dword [esp + 0x30]
sub ecx, dword [edi + 0x1428]
mov eax, dword [esp + 0x34]
sbb eax, dword [edi + 0x142c]
add dword [edi + 0x1420], ecx
mov esi, dword [esp + 0x18]
adc dword [edi + 0x1424], eax
jmp 0x10053062
lea eax, [esp + 0x48]
push eax
push dword [edi + 0x11cc]
call ecx
push eax
push ecx
mov ecx, edi
call fcn.101c9e10
mov esi, eax
mov edx, dword [esp + 0x14]
test esi, esi
jns 0x10053086
xor ecx, ecx
nop dword [eax]
mov eax, dword [esp + ecx*4 + 0x358]
inc ecx
and dword [eax + 0xb38], 0xffffff7f
cmp ecx, edx
jb 0x10053070
mov eax, dword [ebx + 0x10]
add eax, 0x7a80
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x45c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1045066c
mov esp, ebp
pop ebp
ret 0x14