Function at 0x401320
Capabilities:
Execute command
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.Enter_file_number
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
call fcn.00401010
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [ebp - 0x6c]
add esp, 4
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__::operator___int__]
push str.Enter_map_number
call fcn.00401010
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [ebp - 0x70]
add esp, 4
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__::operator___int__]
push dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
push str.EncTerrain_d.map
push eax
call fcn.00401040
mov eax, dword [ebp - 0x70]
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x68]
push 0x4031a8
push eax
call edi
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x7c], esi
test esi, esi
jne 0x4013cb
lea eax, [ebp - 0x68]
push eax
push str.File__s_not_open__n
call fcn.00401010
add esp, 8
jmp 0x4014a1
push 2
push 0
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push 0
mov edi, eax
push 0
push esi
mov dword [ebp - 0x74], edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push edi
call fcn.00401636
push dword [ebp - 0x7c]
mov esi, eax
push edi
push 1
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push dword [ebp - 0x7c]
call ebx
push edi
call fcn.00401636
push dword [ebp - 0x74]
mov edi, eax
mov edx, esi
mov ecx, edi
call fcn.00401100
push esi
call fcn.00401631
movzx eax, byte [edi + 1]
add esp, 0x40
push eax
push str.Old_number_map__d__n
call fcn.00401010
mov eax, dword [ebp - 0x78]
push dword [ebp - 0x74]
mov byte [edi + 1], al
call fcn.00401636
push dword [ebp - 0x74]
mov esi, eax
mov edx, edi
mov ecx, esi
call fcn.00401080
lea eax, [ebp - 0x68]
push 0x4031d4
push eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
call eax
add esp, 0x18
mov dword [ebp - 0x78], eax
test eax, eax
jne 0x40147a
push edi
call fcn.00401631
push esi
call fcn.00401631
add esp, 8
jmp 0x40149b
push eax
push dword [ebp - 0x74]
push 1
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [ebp - 0x78]
call ebx
push edi
call fcn.00401631
push esi
call fcn.00401631
add esp, 0x1c
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
lea eax, [ebp - 0x68]
push eax
push str.File__s_modified_successfully__n
call fcn.00401010
push dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
push str.EncTerrain_d.att
push eax
call fcn.00401040
mov edx, dword [ebp - 0x70]
lea ecx, [ebp - 0x68]
add esp, 0x14
call fcn.00401180
cmp al, 1
jne 0x4014e3
lea eax, [ebp - 0x68]
push eax
push str.File__s_modified_successfully__n
call fcn.00401010
add esp, 8
push dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
push str.EncTerrain_d.obj
push eax
call fcn.00401040
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x68]
push 0x4031a8
push eax
call edi
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x401524
lea eax, [ebp - 0x68]
push eax
push str.File__s_not_open__n
call fcn.00401010
add esp, 8
jmp 0x4015f4
push 2
push 0
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push 0
mov esi, eax
push 0
push edi
mov dword [ebp - 0x74], esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push esi
call fcn.00401636
push edi
push dword [ebp - 0x74]
mov esi, eax
push 1
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push edi
call ebx
push dword [ebp - 0x74]
call fcn.00401636
push dword [ebp - 0x74]
mov edi, eax
mov edx, esi
mov ecx, edi
call fcn.00401100
push esi
call fcn.00401631
movzx eax, byte [edi + 1]
add esp, 0x40
push eax
push str.Old_number_obj__d__n
call fcn.00401010
mov eax, dword [ebp - 0x78]
push dword [ebp - 0x74]
mov byte [edi + 1], al
call fcn.00401636
push dword [ebp - 0x74]
mov esi, eax
mov edx, edi
mov ecx, esi
call fcn.00401080
lea eax, [ebp - 0x68]
push 0x4031d4
push eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
call eax
add esp, 0x18
mov dword [ebp - 0x78], eax
test eax, eax
jne 0x4015d3
push edi
call fcn.00401631
push esi
call fcn.00401631
add esp, 8
jmp 0x4015f4
push eax
push dword [ebp - 0x74]
push 1
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [ebp - 0x78]
call ebx
push edi
call fcn.00401631
push esi
call fcn.00401631
add esp, 0x1c
lea eax, [ebp - 0x68]
push eax
push str.File__s_modified_successfully__n
call fcn.00401010
push str.PAUSE
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov ecx, dword [ebp - 4]
add esp, 0xc
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.00401623
mov esp, ebp
pop ebp
ret