Function at 0x10087040
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100d44b5
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push esi
push edi
mov eax, dword [0x10100230]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x10106f04
mov dword [ebp - 0x24], vtable.nfapi::AutoLock.0
mov dword [ebp - 0x20], 0x10106f04
call esi
cmp byte [0x10107038], 0
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 4], 0
je 0x100870a4
mov dword [ebp - 0x14], 0
jmp 0x10087416
push 1
call fcn.1008d8b0
add esp, 4
test al, al
jne 0x100870be
mov dword [ebp - 0x14], 0xfffffffb
jmp 0x10087416
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1008d5e0
add esp, 8
cmp eax, 0xffffffff
jne 0x100870d8
or esi, eax
jmp 0x10087419
push 0x10106f04
mov dword [0x10100094], eax
mov dword [ebp - 0x14], 0
call esi
mov eax, dword [0x10100094]
cmp eax, 0xffffffff
je 0x1008714f
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 4
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0
push 0x22019c
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1008714f
cmp dword [ebp - 0x1c], 0
jbe 0x1008714f
mov eax, dword [ebp - 0x14]
cmp eax, 2
je 0x1008712c
mov byte [ebp - 0xd], 0
cmp eax, 1
jne 0x10087130
mov byte [ebp - 0xd], 1
push 0x10106f04
call edi
mov eax, dword [0x101000a0]
mov ecx, 0x20000
cmp byte [ebp - 0xd], 0
cmovne eax, ecx
mov dword [0x101000a0], eax
jmp 0x10087156
push 0x10106f04
call edi
push 0x10106f04
mov dword [ebp - 0x14], 0
call esi
mov eax, dword [0x10100094]
cmp eax, 0xffffffff
jne 0x10087179
push 0x10106f04
call edi
xor eax, eax
jmp 0x100871bf
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 4
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0
push 0x22019c
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x100871b3
cmp dword [ebp - 0x1c], 0
jbe 0x100871b3
cmp dword [ebp - 0x14], 2
push 0x10106f04
jne 0x100871b8
call edi
mov eax, 2
jmp 0x100871bf
push 0x10106f04
call edi
mov eax, 1
push 0
push 0
xorps xmm0, xmm0
mov dword [0x10106f00], eax
push 0
push 0
mov dword [ebp - 0x18], 0
movups xmmword [0x10107084], xmm0
movups xmmword [0x10107094], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
mov dword [ebp - 0x1c], esi
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 1
push eax
push 0
push 0x20
push 0x10107084
push 0
push 0
push 0x12c800
push dword [0x10100094]
xorps xmm0, xmm0
mov dword [ebp - 0x28], esi
movlpd qword [ebp - 0x38], xmm0
movlpd qword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10087245
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x10087245
mov ecx, 0x10100094
call fcn.1008a340
jmp 0x10087403
push 1
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [0x10100094]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x10087284
mov eax, dword [0x10100094]
cmp eax, 0xffffffff
je 0x10087403
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov dword [0x10100094], 0xffffffff
jmp 0x10087403
cmp dword [ebp - 0x18], 0x20
je 0x100872af
mov eax, dword [0x10100094]
cmp eax, 0xffffffff
je 0x10087403
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov dword [0x10100094], 0xffffffff
jmp 0x10087403
push 0x3001
mov dword [0x10107040], 0x1010703c
mov dword [0x1010703c], 0x1010703c
mov dword [0x10107050], 0x1010704c
mov dword [0x1010704c], 0x1010704c
call fcn.1008e6b0
push 0x3001
mov dword [0x10106ef0], eax
call fcn.1008e6b0
add esp, 8
mov dword [0x10106ef4], eax
mov dword [0x1010705c], 0
mov dword [0x10107068], 0
mov dword [0x10107074], 0
push 0x10106f04
mov dword [0x10107080], 0
mov dword [0x10107058], 0x10107054
mov dword [0x10107054], 0x10107054
mov dword [0x10107064], 0x10107060
mov dword [0x10107060], 0x10107060
mov dword [0x10107070], 0x1010706c
mov dword [0x1010706c], 0x1010706c
mov dword [0x1010707c], 0x10107078
mov dword [0x10107078], 0x10107078
mov byte [0x10107038], 1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x10100094], 0xffffffff
je 0x100873f7
cmp dword [0x10100098], 0xffffffff
jne 0x100873f7
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x100873f7
push dword [0x10100088]
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [0x10106ef8], eax
call edi
push dword [0x10100084]
call edi
push dword [0x10100080]
call edi
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x10089360
push 0
push 0
call fcn.100a8ff2
add esp, 0x18
test eax, eax
jne 0x10087433
push dword [0x10100084]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [0x10100098], 0xffffffff
push 0x10106f04
call edi
call fcn.10087460
mov dword [ebp - 0x14], 0xffffffff
cmp esi, 0xffffffff
je 0x10087416
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x14]
push 0x10106f04
call edi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push dword [0x10100080]
mov dword [0x10100098], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x10106f04
call edi
mov dword [ebp - 0x14], 0
jmp 0x1008740a