Function at 0x4940d4
Capabilities:
Get process heap force flags

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
cmp dword [ebp + 0x14], 1
jne 0x494233
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
cmp byte [edi + 0x24], 0
jne 0x49c517
xor ebx, ebx
cmp dword [ebp + 0x18], 1
jne 0x494230
test byte [edi + 0x2d], 8
jne 0x4a93e3
push edi
call sym.ntoskrnl.exe_IoGetRelatedDeviceObject
or byte [edi + 0x2e], 4
cmp dword [ebp + 8], ebx
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 0x2c]
je 0x494144
test al, 2
je 0x494144
lea eax, [edi + 0x44]
mov dword [ebp + 0x14], eax
mov eax, 1
mov ecx, dword [ebp + 0x14]
xchg dword [ecx], eax
cmp eax, ebx
jne 0x510e45
mov ecx, edi
call sym.ntoskrnl.exe_ObfReferenceObject
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x20], 1
mov byte [ebp - 0x1e], 4
mov dword [ebp - 0x1c], ebx
mov dword [edi + 0x60], ebx
movsx eax, byte [eax + 0x30]
push eax
call fcn.00411f9c
mov esi, eax
mov dword [esi + 0x64], edi
mov eax, dword fs:[0x124]
mov dword [esi + 0x50], eax
lea eax, [ebp - 0x20]
mov dword [esi + 0x2c], eax
lea eax, [esi + 0x18]
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x60]
sub eax, 0x24
mov byte [esi + 0x20], 0
mov dword [esi + 0x30], ebx
mov dword [esi + 8], 0x404
mov cl, 1
mov byte [eax], 0x12
mov dword [eax + 0x18], edi
call dword [sym.imp.HAL.dll_KfRaiseIrql]
mov edx, dword [esi + 0x50]
add edx, 0x210
mov ecx, dword [edx]
lea ebx, [esi + 0x10]
mov dword [ebx], ecx
mov dword [ebx + 4], edx
mov dword [ecx + 4], ebx
mov cl, al
mov dword [edx], ebx
call dword [sym.imp.HAL.dll_KfLowerIrql]
call fcn.00411f21
mov ecx, dword [ebp + 0xc]
mov edx, esi
call sym.ntoskrnl.exe_IofCallDriver
cmp eax, 0x103
je 0x510e56
mov cl, 1
call dword [sym.imp.HAL.dll_KfRaiseIrql]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx]
mov dword [ecx], edx
mov dword [edx + 4], ecx
mov cl, al
mov dword [ebx + 4], ebx
mov dword [ebx], ebx
call dword [sym.imp.HAL.dll_KfLowerIrql]
push esi
call sym.ntoskrnl.exe_IoFreeIrp
xor edx, edx
cmp dword [ebp + 8], edx
je 0x494230
test byte [edi + 0x2c], 2
je 0x494230
lea eax, [edi + 0x44]
mov dword [ebp + 0x18], eax
mov eax, 0
mov ecx, dword [ebp + 0x18]
xchg dword [ecx], eax
cmp dword [edi + 0x40], edx
jne 0x4b647d
mov ecx, edi
call sym.ntoskrnl.exe_ObfDereferenceObject
pop edi
pop esi
pop ebx
leave
ret 0x14
cmp dword [ebp + 0x18], 1
je 0x4a22c2
test byte [edi + 0x2d], 8
jne 0x510df0
push edi
call sym.ntoskrnl.exe_IoGetRelatedDeviceObject
mov esi, eax
mov dword [ebp + 0xc], esi
test byte [edi + 0x2c], 2
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x28]
mov dword [ebp - 4], ecx
je 0x4beaf0
lea eax, [edi + 0x44]
mov dword [ebp - 8], eax
mov eax, 1
mov ecx, dword [ebp - 8]
xchg dword [ecx], eax
xor ebx, ebx
cmp eax, ebx
jne 0x4beadf
mov ecx, edi
call sym.ntoskrnl.exe_ObfReferenceObject
mov ecx, dword [ebp - 4]
cmp ecx, ebx
je 0x49c57a
cmp dword [ecx + 0x20], ebx
jne 0x510e07
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov byte [ebp - 0x20], 1
mov byte [ebp - 0x1e], 4
mov dword [ebp - 0x1c], ebx
mov dword [edi + 0x60], ebx
mov al, byte [esi + 0x30]
push eax
call fcn.00411f9c
mov esi, eax
mov dword [esi + 0x64], edi
mov eax, dword fs:[0x124]
mov dword [esi + 0x50], eax
lea eax, [ebp - 0x20]
mov dword [esi + 0x2c], eax
lea eax, [esi + 0x18]
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x60]
sub eax, 0x24
mov byte [esi + 0x20], 0
mov dword [esi + 8], 4
mov dword [esi + 0x30], ebx
mov ecx, edi
mov byte [eax], 0x11
mov byte [eax + 1], 3
mov dword [eax + 0x18], edi
call sym.ntoskrnl.exe_ObfReferenceObject
mov cl, 1
call dword [sym.imp.HAL.dll_KfRaiseIrql]
mov edx, dword [esi + 0x50]
lea ecx, [esi + 0x10]
add edx, 0x210
mov byte [ebp + 0x17], al
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [eax + 4], ecx
mov dword [edx], ecx
mov cl, byte [ebp + 0x17]
call dword [sym.imp.HAL.dll_KfLowerIrql]
mov ecx, dword [ebp + 0xc]
mov edx, esi
call sym.ntoskrnl.exe_IofCallDriver
cmp eax, 0x103
je 0x510e1e
test byte [edi + 0x2c], 2
je 0x4940f8
lea eax, [edi + 0x44]
mov dword [ebp + 0x14], eax
mov eax, 0
mov ecx, dword [ebp + 0x14]
xchg dword [ecx], eax
cmp dword [edi + 0x40], ebx
jne 0x4beb04
mov ecx, edi
call sym.ntoskrnl.exe_ObfDereferenceObject
jmp 0x4940f8
xor ebx, ebx
jmp 0x494102
push dword [edi + 4]
call sym.ntoskrnl.exe_IoGetAttachedDevice
jmp 0x494112
push edx
push edx
lea eax, [edi + 0x4c]
push eax
call sym.ntoskrnl.exe_KeSetEvent
jmp 0x494229
lea eax, [ebp + 0x17]
push eax
push ebx
push ebx
push edi
call fcn.004b63f6
jmp 0x49c56a
xor ebx, ebx
jmp 0x49c56d
test al, al
jne 0x49c61c
jmp 0x49c57a
push ebx
push ebx
lea eax, [edi + 0x4c]
push eax
call sym.ntoskrnl.exe_KeSetEvent
jmp 0x49c63f
push dword [edi + 4]
call sym.ntoskrnl.exe_IoGetAttachedDevice
mov dword [ebp + 0xc], eax
mov esi, eax
jmp 0x49c536
mov eax, dword fs:[0x124]
push esi
lea edx, [ebp - 0x10]
push edx
push dword [eax + 0x44]
push edi
call dword [ecx + 0x20]
jmp 0x4beaf7
push ebx
push ebx
push ebx
push 6
lea eax, [ebp - 0x20]
push eax
call sym.ntoskrnl.exe_KeWaitForMutexObject
jmp 0x49c61c
lea eax, [ebp + 0x1b]
push eax
push ebx
push ebx
push edi
call fcn.004b63f6
jmp 0x494144
xor eax, eax
push eax
push eax
push eax
push 6
lea eax, [ebp - 0x20]
push eax
call sym.ntoskrnl.exe_KeWaitForMutexObject
jmp 0x4941de