Function at 0x406080
Capabilities:
Create thread
Inject thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x5c7004]
xor eax, esp
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], 0
call sym.ProcessHacker.exe_PhCreateOpenFileDialog
push 2
mov esi, eax
push 0x5c9548
push esi
call sym.ProcessHacker.exe_PhSetFileDialogFilter
push esi
push dword [esp + 0x2c]
call sym.ProcessHacker.exe_PhShowFileDialog
push esi
test al, al
jne 0x4060de
call sym.ProcessHacker.exe_PhFreeFileDialog
jmp 0x4061e5
mov edi, edi
call sym.ProcessHacker.exe_PhGetFileDialogFileName
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push esi
mov edi, eax
call sym.ProcessHacker.exe_PhFreeFileDialog
mov ecx, dword [0x5c7aa8]
add ecx, 0xffffffc2
cmp ecx, 1
ja 0x40611a
push dword [ebx + 0x10]
mov edx, 0x1fffff
lea ecx, [esp + 0x38]
call fcn.004d3720
test eax, eax
jns 0x406135
push dword [ebx + 0x10]
mov edx, 0x303a
lea ecx, [esp + 0x38]
call fcn.004d3720
mov esi, eax
test esi, esi
js 0x4061cc
mov esi, dword [edi + 4]
mov ecx, str.kernel32.dll
mov ebx, dword [esp + 0x34]
xor edi, edi
mov dword [esp + 0x38], 0xfd050f80
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x30], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], edi
call fcn.004c05e0
test eax, eax
jne 0x406172
mov dword [esp + 0x1c], edi
jmp 0x406189
push 0
mov edx, str.LoadLibraryW
mov ecx, eax
call fcn.004c0760
mov dword [esp + 0x1c], eax
push esi
call sym.ProcessHacker.exe_PhCountStringZ
push 4
push 0x1000
lea eax, [eax*2 + 2]
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov esi, eax
test esi, esi
jns 0x4061fb
push dword [esp + 0x34]
call dword [sym.imp.ntdll.dll_NtClose]
mov ebx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x2c]
mov edx, str.load_the_DLL_into
push esi
push ebx
lfence
call fcn.00403960
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8
push 0
push dword [esp + 0x30]
lfence
push dword [esp + 0x38]
push dword [esp + 0x1c]
push ebx
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov esi, eax
test esi, esi
js 0x406291
cmp dword [0x5c7aa8], 0x3e
jb 0x40623a
lea edx, [esp + 0x18]
mov ecx, ebx
lfence
call fcn.004dc5a0
mov esi, eax
test esi, esi
js 0x406291
mov edi, dword [esp + 0x18]
push 0
lea eax, [esp + 0x24]
push eax
lfence
push dword [esp + 0x18]
push dword [esp + 0x28]
push 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_RtlCreateUserThread]
mov esi, eax
test esi, esi
js 0x406291
lea eax, [esp + 0x38]
push eax
push 0
push dword [esp + 0x28]
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
push dword ds:[esp + 0x20]
mov esi, eax
call dword [sym.imp.ntdll.dll_NtClose]
test edi, edi
je 0x406291
mov ecx, edi
call fcn.004dc6a0
push 0x8000
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
push dword [esp + 0x34]
call dword [sym.imp.ntdll.dll_NtClose]
lea esp, [esp]
test esi, esi
js 0x4061c8
mov ecx, dword [esp + 0x44]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8