Function at 0x404160
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x407907
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x40c01c]
xor eax, esp
mov dword [esp + 0x254], eax
push ebp
push esi
push edi
mov eax, dword [0x40c01c]
xor eax, esp
push eax
lea eax, [esp + 0x268]
mov dword fs:[0], eax
push str.entry_KillResMgrProcess__n
call fcn.00401900
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0
push 0xf
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0xffffffff
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [esp + 0x10], eax
mov dword [esp + 0x270], 0
push 0x228
lea eax, [esp + 0x3c]
push 0
push eax
mov dword [esp + 0x40], 0x22c
call sub.MSVCR90.dll_memset
mov edx, dword [esp + 0x1c]
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
push edx
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x404340
mov ecx, dword [esp + 0x3c]
test ecx, ecx
jne 0x404238
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x34]
push eax
push ecx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
je 0x404234
cmp dword [esp + 0x3c], 0
jne 0x404234
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x14]
call fcn.004060f0
mov ecx, dword [esp + 0x3c]
test eax, eax
je 0x404340
mov ebp, dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, dword [sym.imp.MSVCR90.dll_wcsstr]
jmp 0x404254
mov ecx, dword [esp + 0x3c]
cmp ecx, dword [esp + 0x14]
je 0x404310
push ecx
push 0
push 0x411
call ebp
mov esi, eax
test esi, esi
je 0x404310
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [esp + 0x270], 1
lea eax, [esp + 0x18]
push eax
call fcn.004034d0
add esp, 4
cmp dword [esp + 0x2c], 0
je 0x4042f7
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x4042a7
lea eax, [esp + 0x1c]
push str._RunResMgr
push eax
call edi
add esp, 8
test eax, eax
je 0x4042f7
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x4042c5
lea eax, [esp + 0x1c]
push str._MainFrmIpc
push eax
call edi
add esp, 8
test eax, eax
je 0x4042f7
push str.before_TerminateProcess_n
call fcn.00401900
add esp, 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push str.after_TerminateProcess_n
call fcn.00401900
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x270], 0
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x34]
push ecx
push edx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
je 0x404340
cmp dword [esp + 0x3c], 0
jne 0x404338
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x14]
call fcn.004060f0
test eax, eax
jne 0x404250
push str.exit_KillResMgrProcess__n
call fcn.00401900
add esp, 4
mov dword [esp + 0x270], 0xffffffff
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x404368
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x268]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x254]
xor ecx, esp
call fcn.004063e8
add esp, 0x264
ret