Function at 0x401160
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x401aa0
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.00401860
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 ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
xor edi, edi
mov esi, str.OMSI.EXE
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x48], 8
nop
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, esi
call fcn.00401860
mov edx, 0x403168
mov ecx, eax
call fcn.00401860
push 0x4033e0
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov ecx, dword [ebp - 0x38]
add esp, 0xc
test ecx, ecx
jne 0x401217
push 0x401aa0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.FAILED:_NOT_EXIST
call fcn.00401860
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 dword [ebp - 0x4c], 0xffffffff
jmp 0x401383
mov eax, dword [0x403400]
xor edi, edi
movq xmm0, qword [str.KERNEL32.DLL]
xor esi, esi
mov dword [ebp - 0x1c], eax
movzx eax, byte [0x403404]
movq qword [ebp - 0x24], xmm0
movq xmm0, qword [0x403408]
mov byte [ebp - 0x18], al
mov eax, dword [0x403410]
movq qword [ebp - 0x34], xmm0
xorps xmm0, xmm0
mov dword [ebp - 0x2c], eax
movzx eax, byte [0x403414]
push ecx
mov byte [ebp - 0x28], al
movq qword [ebp - 0x14], xmm0
mov dword [ebp - 0xc], 0
mov byte [ebp - 8], 0
mov dword [ebp - 0x3c], edi
call ebx
add esp, 4
test eax, eax
jne 0x401337
nop dword [eax]
push dword [ebp - 0x38]
lea eax, [ebp - 0x14]
push 0xd
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov edi, eax
cmp esi, 0x186a0
jle 0x4012b0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x403418
xor esi, esi
call fcn.00401860
cmp edi, 0xd
jb 0x401334
lea eax, [ebp - 0x24]
mov byte [ebp - 8], 0
push eax
lea eax, [ebp - 0x14]
inc esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x401308
push 1
push 0xfffffffffffffff3
push dword [ebp - 0x38]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
lea eax, [ebp - 0x34]
push dword [ebp - 0x38]
push 1
push 0xd
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
add esp, 0x10
inc dword [ebp - 0x3c]
mov edx, 0x40316c
call fcn.00401860
jmp 0x401324
push dword [ebp - 0x38]
call ebx
add esp, 4
test eax, eax
jne 0x401334
push 1
push 0xfffffffffffffff4
push dword [ebp - 0x38]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
push dword [ebp - 0x38]
call ebx
add esp, 4
test eax, eax
je 0x401280
mov edi, dword [ebp - 0x3c]
push dword [ebp - 0x38]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov edx, str._OK__
push 0x401aa0
push edi
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.00401860
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._imports_
mov ecx, eax
call fcn.00401860
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 esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
cmp dword [ebp - 0x4c], 0
lea eax, [edi + 1]
cmovle eax, edi
add esi, 0x3c
sub dword [ebp - 0x48], 1
mov edi, eax
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], esi
jne 0x4011b0
push 0x401aa0
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.00401860
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.00401860
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 [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401acf
mov esp, ebp
pop ebp
ret