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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd94
test esi, esi
je 0x401559
mov dword [0x87e055], ecx
jmp 0x40156b
mov dword [0x87e0f7], eax
mov dword [0x87e07f], ebx
mov dword [0x87e09a], eax
mov dword [0x87e06d], edx
add ebx, 0x1e
mov edx, dword [0x87e061]
mov dword [ebp - 4], 0x1e92f
mov dword [ebp - 8], 0x155a7
mov eax, 0x402d18
mov dword [ebp - 0xc], eax
mov eax, 0x402d1c
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x4015bf
mov dword [esp - 0x28], edx
mov dword [esp - 0xc], esi
mov dword [0x87e0a6], eax
mov dword [0x87e052], 0x13671
cmp esi, 0xffffffff
jl 0x4015e7
mov dword [0x87e022], eax
mov edi, ecx
mov dword [0x87e03c], esi
mov dword [0x87e0b7], 0x12df1
inc esi
mov dword [0x87e018], edx
mov dword [0x87e030], 0x14663
inc ebx
add dword [0x87e067], edi
test bh, bh
je 0x401608
mov dword [esp - 0x28], edx
jmp 0x401615
lea eax, [0x87e058]
mov dword [eax + 0x24], 0xc1
mov ecx, dword [0x87e08b]
mov dword [0x87e0d9], 0x14e48
mov dword [ebp - 0x14], 0x1a98e
mov dword [ebp - 0x18], 0x1a78f
mov eax, 0x402d3c
mov dword [ebp - 0x1c], eax
mov eax, 0x402d50
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x40167a
mov dword [0x87e093], ebx
sub dword [0x87e071], edi
inc byte [0x87e0ea]
and dword [0x87e038], esi
mov dword [0x87e0b4], edx
call fcn.0040857c
mov dword [ebp - 0x24], 0x1c033
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_RevertToSelf_1
mov byte [0x87e0ea], 0xb6
mov dword [0x87e0af], edi
lea esi, [0x87e0f4]
mov dword [esi + 0x20], 0xb0
mov dword [ebp - 0x28], 0x16bc1
mov dword [ebp - 0x2c], 0x1e114
mov eax, 0x402d60
mov dword [ebp - 0x30], eax
mov eax, 0x402d68
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x4016f9
mov dword [0x87e0a0], edi
mov dword [0x87e03c], 0x11207
mov word [0x87e086], 0xba4b
xchg dword [0x87e038], edi
mov dword [0x87e0af], esi
mov dword [0x87e05d], 0x12c87
lea eax, [ebp - 0x40]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x40174e
mov dword [esp - 0x1c], ebx
mov byte [0x87e0ad], 0xda
cmp eax, 0xffffffff
jge 0x401738
and dword [0x87e05a], edx
mov dword [0x87e0b6], eax
lea esi, [0x87e0bb]
add dword [esi], 0xc7
mov dword [esp - 0x12], ebx
mov dword [0x87e104], esi
mov dword [ebp - 0x44], 0x187a4
mov dword [ebp - 0x48], 0x1bf97
mov eax, 0x402d74
mov dword [ebp - 0x4c], eax
mov eax, 0x402d88
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x44]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
je 0x40179b
sub eax, dword [0x87e012]
mov dword [0x87e062], ecx
mov dword [0x87e04f], 0x17501
mov dword [0x87e086], ecx
xchg dword [0x87e09f], ebx
cmp byte [0x87e069], 0
je 0x4017cf
mov dword [0x87e05a], edx
mov dword [0x87e075], 0x15a3d
mov dword [0x87e0bb], ecx
mov byte [0x87e015], 0x2c
jmp 0x4017db
sub dword [0x87e067], ebx
sub dword [0x87e087], edx
cmp ecx, 0xffffffff
jle 0x4017ef
mov word [0x87e0f4], 0x655d
and dword [0x87e0b5], eax
mov edi, dword [0x87e06a]
mov dword [0x87e03c], eax
mov dword [ebp - 0x54], 0x156b3
mov dword [ebp - 0x58], 0x18a15
mov eax, 0x402d90
mov dword [ebp - 0x5c], eax
mov eax, 0x402d98
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x58]
push eax
mov eax, dword [ebp - 0x54]
push eax
call sub.user32.dll_CloseWindow
cmp dword [0x87e0de], 0
jge 0x401844
mov ebx, esi
mov eax, 0xa7
mov dword [0x87e0ed], esi
sub edx, 0x94
dec dword [0x87e085]
sub dword [0x87e09f], edi
mov dword [esp - 0x18], ebx
lea ecx, [0x87e0b9]
mov dword [ecx], 0xb
mov dword [0x87e016], eax
test edi, edi
jne 0x40188e
mov word [0x87e0e7], 0x79f
mov dword [0x87e026], 0x10eb8
lea edi, [0x87e0ce]
add dword [edi], 0x72
jmp 0x40189a
mov dword [0x87e038], eax
xchg dword [0x87e10a], edi
mov dword [ebp - 0x64], 0x13da3
mov dword [ebp - 0x68], 0x17de4
mov eax, 0x402db0
mov dword [ebp - 0x6c], eax
mov eax, 0x402dbc
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x64]
push eax
call sub.user32.dll_AnyPopup
mov byte [0x87e0ac], 0x5a
mov esi, ecx
mov dword [0x87e0e3], edi
mov dword [0x87e07d], ecx
mov dword [0x87e040], eax
mov byte [ebp - 0x269], 0
mov dword [ebp - 0x74], 0x186ce
mov dword [ebp - 0x78], 0x11519
mov eax, 0x402dd8
mov dword [ebp - 0x7c], eax
mov eax, 0x402de8
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x80]
push eax
mov eax, dword [ebp - 0x7c]
push eax
mov eax, dword [ebp - 0x78]
push eax
mov eax, dword [ebp - 0x74]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x401946
mov word [0x87e098], 0xb38d
mov dword [0x87e05e], edi
lea ecx, [0x87e06b]
mov dword [ecx + 0x10], 0x5e
mov dword [esp - 4], edi
inc byte [ebp - 0x269]
cmp byte [ebp - 0x269], 2
jne 0x4018ef
mov byte [ebp - 0x269], 0
mov word [0x87e0b0], 0xfdb
xchg dword [0x87e0bd], edx
cmp esi, 0xffffffff
jg 0x401978
mov dword [0x87e014], eax
jmp 0x401987
add dword [0x87e06d], edx
mov word [0x87e097], 0x8554
xor eax, eax
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x8c]
push eax
mov eax, dword [ebp - 0x88]
push eax
mov eax, dword [ebp - 0x84]
push eax
call sub.advapi32.dll_RevertToSelf
xchg dword [0x87e07d], ebx
mov dword [esp - 0x28], edi
mov dword [0x87e016], esi
mov dword [0x87e029], 0x15e2f
add eax, 6
mov byte [0x87e0ea], 0xb6
mov dword [0x87e0af], edi
lea esi, [0x87e0f4]
mov dword [esi + 0x20], 0xb0
inc byte [ebp - 0x269]
cmp byte [ebp - 0x269], 1
jne 0x40195c
lea eax, [ebp - 0x98]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x401a16
mov dword [esp - 0x20], esi
mov dword [0x87e01c], edi
mov word [0x87e018], 0xe3bf
mov dword [0x87e0ee], eax
cmp byte [0x87e02d], 0
jg 0x401a40
mov dword [0x87e0d4], ebx
mov byte [0x87e097], 0x44
mov dword [0x87e0a9], esi
mov dword [0x87e01c], eax
jmp 0x401a52
and dword [0x87e07c], ecx
mov dword [0x87e01a], edi
and dword [0x87e024], ebx
mov edx, 0x1c8
lea eax, [ebp - 0xa0]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x401a79
mov dword [0x87e0c8], 0x17946
mov edi, esi
mov dword [0x87e02b], esi
mov word [0x87e086], 0x6398
mov dword [0x87e06a], ebx
mov dword [esp - 0x28], edx
mov dword [0x87e06b], 0x123ee
sub dword [0x87e105], edi
mov dword [ebp - 0xa4], 0x14fbf
mov dword [ebp - 0xa8], 0x1c59d
mov eax, 0x402e14
mov dword [ebp - 0xac], eax
mov eax, 0x402e1c
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0xb0]
push eax
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp - 0xa8]
push eax
mov eax, dword [ebp - 0xa4]
push eax
call sub.user32.dll_CloseWindow
mov dword [0x87e108], ecx
mov dword [0x87e102], edi
mov dword [0x87e0a0], ebx
cmp byte [0x87e05a], 0
jle 0x401b17
mov dword [0x87e01e], 0x16c14
mov word [0x87e02a], 0xf58c
jmp 0x401b36
mov dword [0x87e02d], edx
mov dword [0x87e0bc], 0x11443
mov dword [0x87e0c9], 0x17b2c
mov esi, 0x2c
xor eax, eax
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp - 0xbc]
push eax
mov eax, dword [ebp - 0xb8]
push eax
mov eax, dword [ebp - 0xb4]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x401b78
lea eax, [0x87e01d]
mov dword [eax + 0x18], esi
sub ecx, dword [0x87e0de]
lea esi, [0x87e03f]
mov dword [esi + 0xc], 0xad
mov dword [0x87e0a7], 0x10549
inc byte [0x87e076]
mov edx, dword [0x87e011]
mov dword [0x87e0e3], esi
mov dword [0x87e041], ecx
mov byte [ebp - 0x269], 0
mov word [0x87e04f], 0x9c20
mov byte [0x87e065], 0x4e
mov dword [0x87e05a], edi
cmp edx, 0xffffffff
jl 0x401bd3
mov esi, 0x1de
mov dword [0x87e01d], edx
mov dword [0x87e057], 0x144da
jmp 0x401be5
mov dword [0x87e056], ebx
mov dword [0x87e0ac], esi
mov dword [0x87e0eb], ecx
cmp esi, dword [ebp - 0x20]
jne 0x401bef
sub ebx, 0x55
jmp 0x401c02
mov byte [0x87e0fc], 0x4d
mov dword [0x87e0f6], esi
add dword [0x87e047], ebx
mov dword [ebp - 0xc0], 0x17d06
mov dword [ebp - 0xc4], 0x1954e
mov eax, 0x402e34
mov dword [ebp - 0xc8], eax
mov eax, 0x402e40
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0xcc]
push eax
mov eax, dword [ebp - 0xc8]
push eax
mov eax, dword [ebp - 0xc4]
push eax
mov eax, dword [ebp - 0xc0]
push eax
call sub.user32.dll_CloseWindow
cmp dword [0x87e058], 0
jl 0x401c6a
mov dword [0x87e0c3], eax
mov dword [0x87e0f4], ecx
xchg dword [0x87e030], edi
mov esi, edx
mov dword [0x87e02f], ebx
mov dword [0x87e0a3], 0x16293
xchg dword [0x87e0b0], eax
mov dword [0x87e066], ecx
inc byte [ebp - 0x269]
cmp byte [ebp - 0x269], 2
jne 0x401ba1
mov byte [ebp - 0x269], 0
lea eax, [ebp - 0xd8]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x401cde
cmp edi, dword [0x87e055]
jle 0x401cc7
mov byte [0x87e0fb], 0x42
add dword [0x87e0fc], ebx
jmp 0x401ccd
mov dword [0x87e090], ecx
mov dword [0x87e048], edi
mov eax, 0x11
xchg dword [0x87e102], edx
inc byte [ebp - 0x269]
cmp byte [ebp - 0x269], 3
jne 0x401ca0
mov dword [ebp - 0xdc], 0x14d3b
mov dword [ebp - 0xe0], 0x15616
mov eax, 0x402e58
mov dword [ebp - 0xe4], eax
mov eax, 0x402e84
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0xe8]
push eax
mov eax, dword [ebp - 0xe4]
push eax
mov eax, dword [ebp - 0xe0]
push eax
mov eax, dword [ebp - 0xdc]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x401d5c
mov dword [0x87e0fb], edi
mov dword [0x87e0d0], edx
mov dword [0x87e02c], edi
mov dword [0x87e0e9], 0x1701a
mov dword [esp - 0x12], edx
lea eax, [ebp - 0xf0]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
call fcn.004033a0
mov dword [0x87e108], ecx
mov dword [0x87e102], edi
mov dword [0x87e0a0], ebx
cmp byte [0x87e05a], 0
jle 0x401d9d
mov dword [0x87e01e], 0x16c14
mov word [0x87e02a], 0xf58c
jmp 0x401dbc
mov dword [0x87e02d], edx
mov dword [0x87e0bc], 0x11443
mov dword [0x87e0c9], 0x17b2c
mov esi, 0x2c
mov byte [ebp - 0x269], 0
mov dword [0x87e0a1], ecx
mov ebx, 0x164
mov byte [0x87e0ea], 0x9d
mov dword [ebp - 0xf4], 0x19bde
mov dword [ebp - 0xf8], 0x130ff
mov eax, 0x402e94
mov dword [ebp - 0xfc], eax
mov eax, 0x402ea0
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x100]
push eax
mov eax, dword [ebp - 0xfc]
push eax
mov eax, dword [ebp - 0xf8]
push eax
mov eax, dword [ebp - 0xf4]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x401e3d
mov dword [0x87e097], ecx
mov byte [0x87e01d], 0x94
mov byte [0x87e0a6], 0x3b
mov edi, 0x42
inc byte [ebp - 0x269]
cmp byte [ebp - 0x269], 3
jne 0x401dc3
mov dword [esp - 0xc], edx
cmp esi, 0xbb
jg 0x401e71
sub dword [0x87e012], eax
mov dword [0x87e044], edi
mov word [0x87e0c1], 0xa1f3
mov dword [0x87e050], eax
mov dword [0x87e028], 0x17e97
lea ecx, [0x87e0fe]
and dword [ecx + 0x18], eax
mov eax, ebx
mov dword [0x87e101], edx
cmp word [0x87e041], 0
jle 0x401ebe
mov dword [0x87e061], 0x164c0
and ebx, 0x40
mov dword [0x87e07b], eax
mov byte [0x87e098], 0xf1
mov dword [0x87e0a4], esi
jmp 0x401ece
sub dword [0x87e0ae], ecx
mov word [0x87e094], 0xc498
inc esi
lea eax, [0x87e04f]
mov dword [eax + 0x1c], 0xd0
mov dword [ebp - 0x104], 0x14a91
mov eax, dword [ebp - 0x104]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x401f07
xchg dword [0x87e0fc], edx
mov dword [0x87e0a4], esi
mov dword [0x87e0df], ebx
xor eax, eax
mov dword [ebp - 0x110], eax
mov eax, dword [ebp - 0x110]
push eax
mov eax, dword [ebp - 0x10c]
push eax
mov eax, dword [ebp - 0x108]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
je 0x401f48
mov dword [0x87e02e], 0x124e4
xchg dword [esp - 0x12], ecx
mov byte [0x87e0ed], 0xf7
dec dword [0x87e0b8]
mov dword [ebp - 0x114], 0x1abad
mov eax, dword [ebp - 0x114]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x401f88
mov dword [0x87e08b], 0x138d7
mov dword [0x87e06f], 0x10c4f
mov dword [0x87e0e9], ebx
xchg dword [0x87e079], edi
xchg dword [0x87e087], esi
call fcn.00403c3c
mov byte [ebp - 0x269], 0
mov byte [0x87e029], 0x38
mov dword [0x87e0eb], ebx
mov ecx, esi
xor eax, eax
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x120]
push eax
mov eax, dword [ebp - 0x11c]
push eax
mov eax, dword [ebp - 0x118]
push eax
call sub.advapi32.dll_RevertToSelf
mov dword [0x87e014], esi
mov dword [0x87e042], edx
and ebx, 0x6b
sub dword [0x87e0dc], eax
inc byte [ebp - 0x269]
cmp byte [ebp - 0x269], 2
jne 0x401f94
mov byte [ebp - 0x269], 0
mov dword [ebp - 0x124], 0x1c579
mov dword [ebp - 0x128], 0x1c4b6
mov eax, 0x402eac
mov dword [ebp - 0x12c], eax
mov eax, 0x402eb8
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x130]
push eax
mov eax, dword [ebp - 0x12c]
push eax
mov eax, dword [ebp - 0x128]
push eax
mov eax, dword [ebp - 0x124]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
je 0x40205b
inc byte [0x87e091]
mov byte [0x87e074], 0xd5
mov edx, 0xf5
lea esi, [0x87e09d]
add dword [esi + 0x18], 0x50
inc byte [ebp - 0x269]
cmp byte [ebp - 0x269], 1
jne 0x401ff0
mov dword [ebp - 0x134], 0x1b94c
mov eax, dword [ebp - 0x134]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40209b
mov dword [0x87e0a0], ecx
xchg dword [0x87e091], ebx
mov dword [0x87e0d9], esi
mov edx, 0x111
mov byte [0x87e0ea], 0xb6
mov dword [0x87e0af], edi
lea esi, [0x87e0f4]
mov dword [esi + 0x20], 0xb0
mov dword [ebp - 0x138], 0x13cd5
mov eax, dword [ebp - 0x138]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax