Function at 0x401c3f
Capabilities:
Allocate or change rwx memory

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0xe0
call sym.___main
call sym._AllocConsole_0
mov dword [ebp - 0x10], str.hl.exe
mov dword [ebp - 0x14], str.hw.dll
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym.FindProcessId_char_const_
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x401caf
mov dword [esp + 4], str.Process_not_found.
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov ebx, 1
jmp 0x4021bb
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1f0fff
call sym._OpenProcess_12
sub esp, 0xc
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401d19
call sym._GetLastError_0
mov ebx, eax
mov dword [esp + 4], str.Failed_to_open_process._Error_code:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], ebx
mov ecx, eax
call sym.std::ostream::operator___unsigned_long_
sub esp, 4
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov ebx, 1
jmp 0x4021bb
mov dword [esp + 0x10], 0x40
mov dword [esp + 0xc], 0x3000
mov dword [esp + 8], 0xb0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._VirtualAllocEx_20
sub esp, 0x14
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x401da1
call sym._GetLastError_0
mov ebx, eax
mov dword [esp + 4], str.Failed_to_allocate_memory_in_the_remote_process._Error_code:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], ebx
mov ecx, eax
call sym.std::ostream::operator___unsigned_long_
sub esp, 4
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov ebx, 1
jmp 0x4021bb
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xb0
mov dword [esp + 8], 0x405020
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._WriteProcessMemory_20
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x401e4d
call sym._GetLastError_0
mov ebx, eax
mov dword [esp + 4], str.Failed_to_write_hooks_into_the_remote_process._Error_code:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], ebx
mov ecx, eax
call sym.std::ostream::operator___unsigned_long_
sub esp, 4
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov dword [esp + 0xc], 0x8000
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._VirtualFreeEx_16
sub esp, 0x10
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov ebx, 1
jmp 0x4021bb
call sym._MH_Initialize_0
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x401f21
lea eax, [ebp - 0xad]
mov ecx, eax
call fcn.00402388
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._MH_StatusToString_4
sub esp, 4
mov ecx, eax
lea eax, [ebp - 0xc8]
lea edx, [ebp - 0xad]
mov dword [esp + 4], edx
mov dword [esp], ecx
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0xad]
mov ecx, eax
call sym.std::allocator_char_::allocator__
lea eax, [ebp - 0x91]
mov ecx, eax
call fcn.00402388
lea eax, [ebp - 0xac]
lea edx, [ebp - 0x91]
mov dword [esp + 4], edx
mov dword [esp], str.Minhook_init_failed_
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0xac]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.shutdown_void__void__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____
lea eax, [ebp - 0xac]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x91]
mov ecx, eax
call sym.std::allocator_char_::allocator__
mov ebx, 1
lea eax, [ebp - 0xc8]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
jmp 0x4021bb
mov dword [ebp - 0x28], str.kernel32.dll
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x28]
add eax, 0xb0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x2c]
je 0x401ff0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax + 0xc]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 8]
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._MH_CreateHookApi_16
sub esp, 0x10
test eax, eax
setne al
test al, al
je 0x401fe7
lea eax, [ebp - 0x75]
mov ecx, eax
call fcn.00402388
lea eax, [ebp - 0x90]
lea edx, [ebp - 0x75]
mov dword [esp + 4], edx
mov dword [esp], str.CreateHook_failed_
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0x90]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.shutdown_void__void__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____
lea eax, [ebp - 0x90]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x75]
mov ecx, eax
call sym.std::allocator_char_::allocator__
mov ebx, 1
jmp 0x4021bb
add dword [ebp - 0xc], 0x10
jmp 0x401f39
mov byte [ebp - 0x31], 0
xor byte [ebp - 0x31], 1
cmp byte [ebp - 0x31], 0
je 0x402119
mov dword [esp + 4], str.hooks_enabled
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov dword [esp], 0
call sym._MH_EnableHook_4
sub esp, 4
test eax, eax
setne al
test al, al
je 0x402096
lea eax, [ebp - 0x59]
mov ecx, eax
call fcn.00402388
lea eax, [ebp - 0x74]
lea edx, [ebp - 0x59]
mov dword [esp + 4], edx
mov dword [esp], str.Enable_hooks_failed_
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0x74]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.shutdown_void__void__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____
lea eax, [ebp - 0x74]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x59]
mov ecx, eax
call sym.std::allocator_char_::allocator__
jmp 0x4021ac
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym.FindProcessId_char_const_
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x4020d4
mov dword [esp + 4], str.Process_not_found.
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
jmp 0x4021ac
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym.CheckModuleLoaded_unsigned_long__char_const_
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x402119
mov dword [esp + 4], str.Failed_to_get_module_handle.
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
jmp 0x4021ac
mov dword [esp + 4], str.hooks_disabled
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov dword [esp], 0
call sym._MH_DisableHook_4
sub esp, 4
test eax, eax
setne al
test al, al
je 0x401ff0
lea eax, [ebp - 0x3d]
mov ecx, eax
call fcn.00402388
lea eax, [ebp - 0x58]
lea edx, [ebp - 0x3d]
mov dword [esp + 4], edx
mov dword [esp], str.Disable_hooks_failed_
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0x58]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.shutdown_void__void__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____
lea eax, [ebp - 0x58]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x3d]
mov ecx, eax
call sym.std::allocator_char_::allocator__
call sym._MH_Uninitialize_0
call sym._FreeConsole_0
mov ebx, 0
mov eax, ebx
jmp 0x402281
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret