Function at 0x4085a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xfc
mov eax, dword [0x5c7004]
xor eax, esp
mov dword [esp + 0xf8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
push str.EnableWarnings
mov dword [esp + 0x38], ebx
mov dword [esp + 0x58], 0
call sym.ProcessHacker.exe_PhGetIntegerSetting
lea esp, [esp]
test eax, eax
je 0x408648
mov eax, dword [edi + 0x14]
dec eax
cmp eax, 4
ja case.default.0x408655
jmp dword [eax*4 + 0x408ac0]
cmp dword [0x5c7aa8], 0x3e
mov ecx, str.unload
mov eax, str.Unloading_a_module_may_cause_the_process_to_crash.
jb 0x408628
mov eax, str.Unloading_a_module_may_cause_the_process_to_crash._NOTE:_This_feature_may_not_work_correctly_on_your_version_of_Windows_and_some_programs_may_restrict_access_or_ban_your_account.
jmp 0x408628
mov ecx, str.unload
mov eax, str.Unloading_a_driver_may_cause_system_instability.
jmp 0x408628
mov ecx, str.unmap
mov eax, str.Unmapping_a_section_view_may_cause_the_process_to_crash.
push 1
push eax
mov eax, dword [edi + 0x1c]
push dword [eax + 4]
push ecx
push ebx
call sym.ProcessHacker.exe_PhShowConfirmMessage
jmp 0x408640
test al, al
je case.default.0x408655
mov eax, dword [edi + 0x14]
dec eax
cmp eax, 4
ja case.default.0x408655
jmp dword [eax*4 + 0x408ad4]
mov eax, dword [0x5c7aa8]
add eax, 0xffffffc2
cmp eax, 1
ja 0x40867c
push esi
mov edx, 0x1fffff
lea ecx, [esp + 0x58]
call fcn.004d3720
test eax, eax
jns 0x408698
push esi
mov edx, 0x303a
lea ecx, [esp + 0x58]
lfence
call fcn.004d3720
mov esi, eax
test esi, esi
js 0x408814
mov eax, dword [edi]
xor ebx, ebx
cmp dword [0x5c7aa8], 0x3e
mov esi, dword [esp + 0x54]
mov dword [esp + 0xf8], 0xfd050f80
mov dword [esp + 0xfc], 0xffffffff
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x2c], ebx
jae 0x40870c
mov dword [esp + 0x20], eax
mov edx, 0x4d6f20
push ecx
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0xc0000135
push eax
mov ecx, esi
mov dword [esp + 0x2c], 1
call fcn.004d6b20
mov esi, eax
test esi, esi
js 0x408806
mov esi, dword ds:[esp + 0x1c]
test esi, esi
js 0x408806
mov esi, dword [esp + 0x10]
mov ecx, 0x584d10
call fcn.004c05e0
test eax, eax
jne 0x408722
mov dword ds:[esp + 0x30], ebx
jmp 0x408734
push 0
mov edx, 0x598f20
mov ecx, eax
call fcn.004c0760
mov dword [esp + 0x30], eax
cmp dword [0x5c7aa8], 0x3e
jb 0x408756
lea edx, [esp + 0x2c]
mov ecx, esi
call fcn.004dc5a0
mov esi, eax
test esi, esi
js 0x408806
mov ebx, dword [esp + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x20]
push dword [esp + 0x3c]
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x34]
call dword [sym.imp.ntdll.dll_RtlCreateUserThread]
mov esi, eax
test esi, esi
js 0x408806
lea eax, [esp + 0xf8]
push eax
push 0
push dword [esp + 0x1c]
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov esi, eax
test esi, esi
jne 0x4087c0
push eax
push 0x1c
lea eax, [esp + 0x40]
push eax
push esi
push dword [esp + 0x24]
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
mov esi, eax
test esi, esi
cmovns esi, dword [esp + 0x38]
push dword [esp + 0x14]
call dword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
je 0x408806
xor eax, eax
mov dword [esp + 0x1c], ebx
push eax
push eax
mov dword [esp + 0x2c], eax
mov byte [esp + 0x2c], al
mov dword [esp + 0x30], eax
lea eax, [esp + 0x24]
push 0x10
push eax
push 0x2c
mov dword [esp + 0x34], 3
call dword [sym.imp.ntdll.dll_NtPowerInformation]
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
push dword [esp + 0x54]
call dword [sym.imp.ntdll.dll_NtClose]
mov ebx, dword [esp + 0x34]
cmp esi, 0xc0000135
jne 0x408836
push str.Unable_to_find_the_module_to_unload.
push 0x5634d8
push 0x10
push ebx
call sym.ProcessHacker.exe_PhShowMessage
add esp, 0x10
jmp case.default.0x408655
test esi, esi
jns 0x408a6a
lfence
mov eax, dword [edi + 0x1c]
push dword [eax + 4]
push str.Unable_to_unload
call sym.ProcessHacker.exe_PhConcatStrings2
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push 0
push esi
push dword [eax + 4]
jmp 0x408a9c
mov eax, dword [edi + 0x1c]
push dword [eax + 4]
push dword [edi]
call sym.ProcessHacker.exe_PhUnloadDriver
mov esi, eax
test esi, esi
jns 0x408a6a
lfence
mov ecx, dword [edi + 0x1c]
mov byte [esp + 0xe], 0
push dword [ecx + 4]
push str.Unable_to_unload
call sym.ProcessHacker.exe_PhConcatStrings2
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
lea ecx, [esp + 0xf]
push ecx
push esi
mov edx, dword [eax + 4]
mov ecx, ebx
call fcn.00401700
test al, al
je 0x408a0f
cmp byte [esp + 0xf], 0
je 0x408919
mov eax, dword [edi + 0x1c]
xor ebx, ebx
push 0xa0
push ebx
mov esi, dword [eax + 4]
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x24], esi
call fcn.00536b00
mov ecx, dword [0x5d0188]
add esp, 0xc
test ecx, ecx
jne 0x408934
mov esi, 0xc0000037
lfence
mov eax, dword [edi + 0x1c]
push dword [eax + 4]
push str.Unable_to_unload
call sym.ProcessHacker.exe_PhConcatStrings2
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push 0
push esi
push dword [eax + 4]
push dword [esp + 0x40]
call sym.ProcessHacker.exe_PhShowStatus
call sym.ProcessHacker.exe__PhUiDisconnectFromPhSvc_0
mov al, byte [esp + 0xe]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xf8]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi]
mov dword [esp + 0x70], 3
mov dword [esp + 0x78], eax
test esi, esi
je 0x4089b0
push esi
call sym.ProcessHacker.exe_PhCountStringZ
mov ecx, dword [0x5d018c]
add eax, eax
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x408a05
push eax
push 0
push ecx
lfence
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
test ebx, ebx
je 0x408a05
push dword [esp + 0x10]
mov esi, ebx
push dword [esp + 0x1c]
sub esi, dword [0x5d018c]
push ebx
lfence
call fcn.00537fe0
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov ecx, dword [0x5d0188]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], esi
lea eax, [esp + 0x58]
mov dword [esp + 0x58], 0xa00088
push eax
push eax
push ecx
mov dword [esp + 0x68], 0
call dword [sym.imp.ntdll.dll_NtRequestWaitReplyPort]
mov esi, dword [esp + 0x74]
test eax, eax
cmovs esi, eax
test ebx, ebx
je 0x4089ee
mov eax, dword [0x5d018c]
nop
test eax, eax
je 0x4089ee
push ebx
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test esi, esi
js 0x4088e9
mov byte ds:[esp + 0xe], 1
jmp 0x408914
mov esi, 0xc0000017
jmp 0x4088e9
push 0
lfence
mov eax, dword [edi + 0x1c]
push esi
push str.._Make_sure_Process_Hacker_is_running_with_administrative_privileges.
push dword [eax + 4]
push str.Unable_to_unload
push 3
call fcn.00401570
add esp, 0x10
jmp 0x408a98
push esi
mov edx, 8
lea ecx, [esp + 0x58]
call fcn.004d3720
mov esi, eax
test esi, esi
js 0x408a83
push dword [edi]
push dword [esp + 0x58]
call dword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
push dword ds:[esp + 0x54]
mov esi, eax
call dword [sym.imp.ntdll.dll_NtClose]
test esi, esi
js 0x408a83
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xf8]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc
push 0
push esi
lfence
push dword [edi]
push str.Unable_to_unmap_the_section_view_at_0x_p
call fcn.004015a0
add esp, 8
mov eax, dword [eax + 4]
push eax
push ebx
call sym.ProcessHacker.exe_PhShowStatus
mov ecx, dword [esp + 0x104]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc