Function at 0x4013c0
Capabilities:
Extract resource via kernel32 functions
Resolve function by parsing pe exports
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov edx, str.No_More_Sleep_AutoPatcher___OMSI_2_version
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov dword [esp + 0x18], edi
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x401b60
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
mov ebx, 1
cmp dword [ebp + 8], ebx
jle 0x4014cb
mov edi, dword [edi + ebx*4]
push str._ODE
push edi
call esi
movzx ecx, byte [0x405380]
test eax, eax
mov eax, 1
cmove ecx, eax
push 0x403308
push edi
mov byte [0x405380], cl
call esi
movzx ecx, byte [0x405381]
test eax, eax
mov eax, 1
cmove ecx, eax
push 0x40330c
push edi
mov byte [0x405381], cl
call esi
movzx ecx, byte [0x405382]
test eax, eax
mov eax, 1
cmove ecx, eax
push 0x403310
push edi
mov byte [0x405382], cl
call esi
add esp, 0x20
test eax, eax
je 0x40184d
push 0x403314
push edi
call esi
add esp, 8
test eax, eax
je 0x40184d
push str._HELP
push edi
call esi
add esp, 8
test eax, eax
je 0x40184d
mov edi, dword [esp + 0x10]
inc ebx
cmp ebx, dword [ebp + 8]
jl 0x401424
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Starting...
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
cmp byte [0x405381], 0
jne 0x40157c
cmp byte [0x405382], 0
mov edx, str.The_patcher_will_restore_the_original_DLL_links_in_the_modified_files._nContinue___Y_N_
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jne 0x401518
mov edx, str.WARNING:_The_program_modifies_files_without_making_a_backup_copy._nMake_a_backup_copy_of_the_files_to_avoid_a_troublesome_repair_reinstall._n_nYou_can_find_a_list_of_files_by_typing_NMSPATCHER____or_NMSPATCHER__help._n_nContinue_anyway___Y_N_
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0x64
lea eax, [esp + 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [esp + 0x24]
add esp, 0xc
push 0
push 0x64
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::getline_char___long_long___int64__]
lea eax, [esp + 0x18]
push 0x403468
push eax
call esi
add esp, 8
test eax, eax
je 0x40157c
lea eax, [esp + 0x18]
push 0x40346c
push eax
call esi
add esp, 8
test eax, eax
je 0x40157c
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp byte [0x405382], 0
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceW]
je 0x4015b9
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.If_you_have_updated_ODE__you_will_need_to_manually_revert_to_an_older_version.
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
jmp 0x401641
cmp byte [0x405380], 0
je 0x4015ce
mov byte [0x405380], 1
jmp 0x401653
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Do_you_also_want_to_use_the_newer_version_of_Open_Dynamics_Engine__nThis_version_has_been_compiled_with_newer_tools_with_optimizations__but_the_functionality_of_this_version_has_not_been_fully_tested._n_nIf_you_want_to_keep_a_backup_copy_of_the_original_file__copy_the_ODE.DLL_file_to_a_safe_location_NOW._n_nExtract_and_replace_the_file___Y_N_
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0x64
lea eax, [esp + 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [esp + 0x24]
add esp, 0xc
push 0
push 0x64
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::getline_char___long_long___int64__]
lea eax, [esp + 0x18]
push 0x403468
push eax
call esi
add esp, 8
test eax, eax
je 0x40163f
lea eax, [esp + 0x18]
push 0x40346c
push eax
call esi
add esp, 8
test eax, eax
je 0x40163f
xor al, al
jmp 0x401641
mov al, 1
cmp byte [0x405382], 0
mov byte [0x405380], al
jne 0x4016f6
push 0xa
push 4
push 0
call edi
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x4034e8
mov esi, eax
mov dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push 0x4034ec
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0xc
cmp dword [esp + 0x10], 0
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jne 0x4016c4
mov edx, str.Failed_to_unpack_KRNL32.DLL
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x4016f0
mov edx, str.Unpacking_KRNL32.DLL...
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push dword [esp + 0x10]
push 1
push esi
push edi
call ebx
push dword [esp + 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp byte [0x405380], 0
je 0x4017a0
push 0xa
push 0x66
push 0
call edi
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x4034e8
mov esi, eax
mov dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push str.ODE.DLL
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0xc
cmp dword [esp + 0x10], 0
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jne 0x401774
mov edx, str.Failed_to_unpack_KRNL32.DLL
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x4017a0
mov edx, str.Unpacking_ODE.DLL...
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push dword [esp + 0x10]
push 1
push esi
push edi
call ebx
push dword [esp + 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
push 0x401b60
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Patching_files...
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor edi, edi
mov esi, str.OMSI.EXE
lea ebx, [edi + 7]
nop dword [eax + eax]
mov ecx, esi
call fcn.00401180
test eax, eax
jle 0x4017dc
inc edi
add esi, 0x3c
sub ebx, 1
jne 0x4017d0
push 0x401b60
push edi
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Patched
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push ecx
mov edx, str._files.
mov ecx, eax
call fcn.00401920
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [esp + 0x17]
push ebx
push 1
push eax
mov byte [esp + 0x23], bl
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::getline_char___long_long___int64__]
mov ecx, dword [esp + 0x84]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401b8f
mov esp, ebp
pop ebp
ret
call fcn.00401000
int3