Function at 0x10179990
Capabilities:
Check for peb ntglobalflag flag
Check for time delay via gettickcount

Disassembly:
push 0xffffffffffffffff
push 0x10352cb0
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x105be7d0]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x105be7d0]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov edi, ecx
mov ecx, dword [esp + 0x9c]
mov ebp, 0x80400000
mov eax, dword [esp + 0x98]
mov ebx, dword [esp + 0x94]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x28], ecx
xor ecx, ecx
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x30], eax
mov byte [esp + 0x1b], 0
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], cx
mov dword [esp + 0x8c], ecx
cmp dword [edi + 4], ecx
jne 0x10179c9a
lea ecx, [esp + 0x1b]
push ecx
lea ecx, [esp + 0x50]
push ecx
push eax
mov ecx, ebx
call fcn.10179350
test al, al
je 0x10179c9a
cmp byte [esp + 0x1b], 0
lea esi, [edi + 0x20]
mov eax, 0x80c0f000
mov dword [esp + 0x2c], esi
cmovne ebp, eax
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push eax
push esi
call ebp
mov byte [esp + 0x8c], 1
lea edx, [esp + 0x4c]
cmp dword [esp + 0x60], 8
mov eax, dword [esp + 0x1c]
cmovae edx, dword [esp + 0x4c]
or eax, 0x80000000
push ecx
push eax
push dword [esp + 0x30]
mov ecx, ebx
mov dword [esp + 0x2c], eax
push dword [esp + 0x30]
call fcn.10179910
add esp, 0x10
mov dword [edi + 4], eax
push 0
push esi
call ebp
cmp dword [edi + 4], 0
jne 0x10179ad8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f19
jne 0x10179ad8
push dword [esp + 0x20]
lea eax, [esp + 0x50]
mov ecx, edi
sub esp, 8
push eax
push ebx
call fcn.1017a780
mov byte [esp + 0x8c], 0
push 0
push esi
call ebp
cmp dword [edi + 4], 0
je 0x10179afd
mov ecx, edi
call fcn.1017af40
cmp eax, 0x12e
jne 0x10179c91
test dword [esp + 0x1c], 0x200000
jne 0x10179c91
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push esi
call ebp
mov byte [esp + 0x8c], 2
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x30]
or eax, 0x80200000
push ecx
push eax
push dword [esp + 0x30]
mov ecx, ebx
mov dword [esp + 0x28], eax
push dword [esp + 0x30]
call fcn.10179910
add esp, 0x10
mov dword [edi + 4], eax
push 0
push esi
call ebp
cmp dword [edi + 4], 0
jne 0x10179b75
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f19
jne 0x10179b75
push dword [esp + 0x1c]
lea eax, [esp + 0x50]
mov ecx, edi
sub esp, 8
push eax
push ebx
call fcn.1017a780
mov byte [esp + 0x8c], 0
push 0
push esi
call ebp
cmp dword [edi + 4], 0
mov byte [esp + 0x1b], 0
je 0x10179c82
mov ecx, edi
call fcn.1017af40
cmp eax, 0x12e
jne 0x10179c82
push str.Location
lea ecx, [esp + 0x38]
call fcn.100cd5c0
mov byte [esp + 0x8c], 3
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x68]
mov ecx, edi
push eax
call fcn.1017a560
mov byte [esp + 0x8c], 5
lea ecx, [esp + 0x34]
call fcn.100cd690
cmp dword [esp + 0x74], 0
je 0x10179c6a
mov ecx, dword [edi + 4]
mov byte [esp + 0x1b], 1
call fcn.101705e0
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push esi
call ebp
mov byte [esp + 0x8c], 6
lea edx, [esp + 0x64]
cmp dword [esp + 0x78], 8
push ecx
push dword [esp + 0x24]
cmovae edx, dword [esp + 0x6c]
mov ecx, ebx
push dword [esp + 0x30]
push dword [esp + 0x30]
call fcn.10179910
add esp, 0x10
mov dword [edi + 4], eax
push 0
push esi
call ebp
cmp dword [edi + 4], 0
jne 0x10179c5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f19
jne 0x10179c5d
push dword [esp + 0x20]
lea eax, [esp + 0x68]
mov ecx, edi
sub esp, 8
push eax
push ebx
call fcn.1017a780
mov byte [esp + 0x8c], 5
push 0
push esi
call ebp
mov byte [esp + 0x8c], 0
lea ecx, [esp + 0x64]
call fcn.100cd690
cmp byte [esp + 0x1b], 0
jne 0x10179c91
mov ecx, dword [edi + 4]
call fcn.101705e0
mov dword [edi + 4], 0
cmp dword [edi + 4], 0
setne bl
jmp 0x10179c9c
xor bl, bl
mov dword [esp + 0x8c], 0xffffffff
cmp dword [esp + 0x60], 8
jb 0x10179cbb
push dword [esp + 0x4c]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [esp + 0x60], 7
mov word [esp + 0x4c], ax
mov al, bl
mov dword [esp + 0x5c], 0
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.1033d458
add esp, 0x7c
ret 0x14