Function at 0x4064a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xec
mov eax, dword [0x5ac004]
xor eax, esp
mov dword [esp + 0xe8], 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 + 0x18], ebx
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x406538
mov eax, dword ds:[edi + 0x14]
dec eax
cmp eax, 4
ja case.default.0x406549
jmp dword [eax*4 + 0x406900]
cmp dword [sym.ProcessHacker.exe_WindowsVersion], 0x3e
mov ecx, str.unload
mov eax, str.Unloading_a_module_may_cause_the_process_to_crash.
jb 0x406520
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 0x406520
mov ecx, str.unload
mov eax, str.Unloading_a_driver_may_cause_system_instability.
jmp 0x406520
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
test al, al
je case.default.0x406549
mov eax, dword ds:[edi + 0x14]
dec eax
cmp eax, 4
ja case.default.0x406549
jmp dword [eax*4 + 0x406914]
push esi
mov edx, 0x103a
lea ecx, [esp + 0x48]
call fcn.004c3180
mov esi, eax
test esi, esi
js 0x406666
cmp dword [sym.ProcessHacker.exe_WindowsVersion], 0x3e
mov esi, dword [edi]
mov eax, dword [esp + 0x44]
mov dword [esp + 0xe8], 0xfd050f80
mov dword [esp + 0xec], 0xffffffff
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
jae 0x4065d8
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 0xc0000135
push ecx
mov edx, 0x4c6540
mov dword [esp + 0x28], esi
mov ecx, eax
mov dword [esp + 0x2c], 1
call fcn.004c6140
mov esi, eax
test esi, esi
js 0x40665a
mov esi, dword [esp + 0x1c]
test esi, esi
js 0x40665a
mov esi, dword [esp + 0x14]
mov ecx, 0x56c3b8
lea ecx, [ecx]
call fcn.004b2780
test eax, eax
je 0x4065f7
push 0
mov edx, 0x57eea0
mov ecx, eax
call fcn.004b2840
push 0
lea ecx, [esp + 0x14]
push ecx
push esi
push eax
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x3c]
call dword [sym.imp.ntdll.dll_RtlCreateUserThread]
mov esi, eax
test esi, esi
js 0x40665a
lea eax, [esp + 0xe8]
push eax
push 0
push dword [esp + 0x18]
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov esi, eax
test esi, esi
jne 0x406650
push eax
push 0x1c
lea eax, [esp + 0x30]
push eax
push esi
push dword [esp + 0x20]
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
mov esi, eax
test esi, esi
cmovns esi, dword [esp + 0x28]
push dword [esp + 0x10]
call dword [sym.imp.ntdll.dll_NtClose]
push dword ds:[esp + 0x44]
call dword [sym.imp.ntdll.dll_NtClose]
cmp esi, 0xc0000135
jne 0x40668d
push str.Unable_to_find_the_module_to_unload.
push 0x54ace8
push 0x10
push ebx
call sym.ProcessHacker.exe_PhShowMessage
add esp, 0x10
jmp case.default.0x406549
test esi, esi
jns 0x4068aa
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 0x4068dc
mov eax, dword [edi + 0x1c]
push dword [eax + 4]
push dword [edi]
call sym.ProcessHacker.exe_PhUnloadDriver
mov esi, eax
test esi, esi
jns 0x4068aa
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.00401680
mov edi, edi
test al, al
je 0x406853
cmp byte [esp + 0xf], 0
je 0x40676a
mov eax, dword [edi + 0x1c]
xor ebx, ebx
push 0xa0
push ebx
mov esi, dword [eax + 4]
lea eax, [esp + 0x50]
push eax
mov dword [esp + 0x24], esi
call fcn.0051fd40
mov ecx, dword [0x5b4940]
add esp, 0xc
test ecx, ecx
jne 0x406785
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 + 0x20]
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 + 0xe8]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi]
mov dword [esp + 0x60], 3
mov dword [esp + 0x68], eax
test esi, esi
je 0x4067fa
push esi
call sym.ProcessHacker.exe_PhCountStringZ
mov ecx, dword [0x5b4944]
add eax, eax
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x406849
push eax
push 0
push ecx
lfence
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
test ebx, ebx
je 0x406849
mov esi, ebx
sub esi, dword [0x5b4944]
lfence
push dword [esp + 0x10]
push dword [esp + 0x1c]
push ebx
call fcn.00521a30
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov ecx, dword [0x5b4940]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], esi
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 0xa00088
push eax
push eax
push ecx
mov dword [esp + 0x58], 0
call dword [sym.imp.ntdll.dll_NtRequestWaitReplyPort]
mov esi, dword [esp + 0x64]
test eax, eax
cmovs esi, eax
test ebx, ebx
je 0x406837
mov eax, dword [0x5b4944]
test eax, eax
je 0x406837
push ebx
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test esi, esi
js 0x40673d
mov byte [esp + 0xe], 1
jmp 0x406765
mov esi, 0xc0000017
jmp 0x40673d
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.00401500
add esp, 0x10
jmp 0x4068d8
push esi
mov edx, 8
lea ecx, [esp + 0x48]
call fcn.004c3180
mov esi, eax
test esi, esi
js 0x4068c3
push dword [edi]
push dword [esp + 0x48]
call dword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
push dword ds:[esp + 0x44]
mov esi, eax
call dword [sym.imp.ntdll.dll_NtClose]
test esi, esi
js 0x4068c3
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe8]
xor ecx, esp
call fcn.0051e068
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.00401520
add esp, 8
mov eax, dword [eax + 4]
push eax
push ebx
call sym.ProcessHacker.exe_PhShowStatus
mov ecx, dword [esp + 0xf4]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0xc