Function at 0x401180
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
mov esi, ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push edi
mov edx, esi
call fcn.00401920
mov edx, 0x403168
mov ecx, eax
call fcn.00401920
push 0x403470
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov ecx, dword [ebp - 0x48]
add esp, 0xc
test ecx, ecx
jne 0x401204
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.FAILED:_NOT_EXIST
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_____]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401b8f
mov esp, ebp
pop ebp
ret
cmp byte [0x405382], 0
movq xmm0, qword [0x403498]
mov eax, dword [0x4034a0]
movq xmm1, qword [str.KERNEL32.DLL]
mov bl, byte [0x403494]
mov edx, dword [0x403490]
movq qword [ebp - 0x24], xmm0
xorps xmm0, xmm0
mov dword [ebp - 0x1c], eax
mov al, byte [0x4034a4]
movq qword [ebp - 0x34], xmm1
mov dword [ebp - 0x2c], edx
mov byte [ebp - 0x28], bl
mov byte [ebp - 0x18], al
movq qword [ebp - 0x14], xmm0
mov dword [ebp - 0xc], 0
mov byte [ebp - 8], 0
je 0x40128e
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x34]
movq qword [ebp - 0x44], xmm1
push 0xd
push eax
mov dword [ebp - 0x3c], edx
mov byte [ebp - 0x38], bl
call esi
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x24]
push 0xd
push eax
call esi
mov ecx, dword [ebp - 0x48]
add esp, 0xc
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
xor edi, edi
push ecx
mov dword [ebp - 0x4c], edi
xor esi, esi
call ebx
add esp, 4
test eax, eax
jne 0x401367
nop dword [eax]
push dword [ebp - 0x48]
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 0x4012e0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x4034a8
xor esi, esi
call fcn.00401920
cmp edi, 0xd
jb 0x401364
lea eax, [ebp - 0x34]
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 0x401338
push 1
push 0xfffffffffffffff3
push dword [ebp - 0x48]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
lea eax, [ebp - 0x24]
push dword [ebp - 0x48]
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 - 0x4c]
mov edx, 0x40316c
call fcn.00401920
jmp 0x401354
push dword [ebp - 0x48]
call ebx
add esp, 4
test eax, eax
jne 0x401364
push 1
push 0xfffffffffffffff4
push dword [ebp - 0x48]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
push dword [ebp - 0x48]
call ebx
add esp, 4
test eax, eax
je 0x4012b0
mov edi, dword [ebp - 0x4c]
push dword [ebp - 0x48]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov edx, str._OK__
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]
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._imports_
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 [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401b8f
mov esp, ebp
pop ebp
ret