Function at 0x4012d0
Capabilities:
Check if file exists
Copy file
Get file attributes
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x71c
push ebx
mov ebx, dword [esp + 0x724]
push ebp
push esi
push edi
push ebx
call fcn.00402cd0
mov ebp, dword [sym.imp.MSVCRT.dll__snprintf]
mov esi, eax
add esp, 4
mov dword [esp + 0x10], esi
test esi, esi
jne 0x401361
push ebx
push str._s.frc
lea eax, [esp + 0x12c]
push 0x104
push eax
call ebp
lea ecx, [esp + 0x134]
push ecx
call fcn.00402cd0
add esp, 0x14
mov dword [esp + 0x10], eax
test eax, eax
jne 0x401356
mov eax, dword [sym.imp.MSVCRT.dll__iob]
lea edx, [esp + 0x124]
push edx
add eax, 0x40
push str.Could_not_open___s_._n
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
mov esi, dword [esp + 0x10]
lea ebx, [esp + 0x124]
mov edx, dword [esp + 0x734]
test edx, edx
jne 0x4013af
lea ecx, [esp + 0x14]
push ecx
push ebx
call fcn.00401280
mov eax, dword [esp + 0x1c]
add esp, 8
mov cl, byte [eax]
push ebx
test cl, cl
jne 0x401396
push str._s.dll
lea edx, [esp + 0x28]
push 0x104
push edx
jmp 0x4013ee
sub eax, ebx
push eax
push str._.s.dll
lea eax, [esp + 0x2c]
push 0x104
push eax
call ebp
add esp, 0x14
jmp 0x4013f3
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 4
jle 0x4013de
lea edx, [ecx + edx - 4]
push str..dll
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x4013fe
mov edx, dword [esp + 0x734]
push edx
push str._s.dll
lea eax, [esp + 0x28]
push 0x104
push eax
call ebp
add esp, 0x10
lea ecx, [esp + 0x20]
mov dword [esp + 0x734], ecx
mov eax, dword [0x5052d4]
mov dword [esp + 0x18], 0
test eax, eax
jne 0x401426
mov edx, dword [esp + 0x734]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4015a4
push 0
push ebx
call fcn.00401280
mov edi, dword [esp + 0x73c]
mov esi, eax
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.00401280
mov ecx, dword [esp + 0x24]
push eax
sub ecx, eax
sub esi, ebx
push ecx
push ebx
push esi
push str._.s_.s_blank.dll
lea edx, [esp + 0x24c]
push 0x104
push edx
call ebp
add esp, 0x2c
lea eax, [esp + 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4014e3
push 0x40445c
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4014c1
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push edi
add ecx, 0x40
push str.Unable_to_create___s_._n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x10
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
push esi
push 1
push 0x1d0
push 0x405010
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
jmp 0x401598
push 0
lea eax, [esp + 0x22c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x401529
mov edx, dword [sym.imp.MSVCRT.dll__iob]
lea ecx, [esp + 0x228]
push edi
push ecx
add edx, 0x40
push str.Unable_to_copy___s__to___s_._n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x10
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
push 0x404420
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
lea eax, [esp + 0x334]
push esi
push 0x400
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x380]
add esp, 0x18
cmp word [esp + ecx + 0x342], 0x210f
lea eax, [esp + ecx + 0x32c]
jne 0x40158e
push esi
mov byte [eax + 0x16], 0xe
call dword [sym.imp.MSVCRT.dll_rewind]
push esi
push 0x400
lea edx, [esp + 0x338]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x14
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov esi, dword [esp + 0x10]
mov dword [esp + 0x18], 1
push esi
xor edi, edi
xor ebp, ebp
call fcn.00402de0
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40169b
mov cx, word [eax]
test cx, cx
je 0x401686
cmp cx, 0x3b
jne 0x4015fb
test edi, edi
je 0x4015e5
cmp word [eax + 2], 0x2d
jne 0x401686
xor edi, edi
jmp 0x401686
cmp word [eax + 2], 0x2b
jne 0x401686
mov edi, dword [0x505264]
jmp 0x401686
test edi, edi
jne 0x401686
mov dx, word [eax + 2]
cmp dx, 0x20
je 0x401617
cmp dx, 9
jne 0x401782
cmp cx, 0x4c
jne 0x401653
test ebp, ebp
jne 0x401714
lea eax, [esp + 0x1c]
push eax
call fcn.004017e0
add esp, 4
test eax, eax
jl 0x40174b
cmp eax, 0xffff
jg 0x40174b
mov ebp, dword [0x505264]
mov word [0x40522c], ax
jmp 0x401686
cmp cx, 0x53
je 0x401663
cmp cx, 0x48
jne 0x401782
xor edx, edx
cmp cx, 0x48
push ebx
push esi
sete dl
push eax
push edx
call fcn.00401960
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4017b8
mov esi, dword [esp + 0x10]
push esi
call fcn.00402de0
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4015bd
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov ebp, dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 4
test edi, edi
je 0x4016c4
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push edi
push ebx
add eax, 0x40
push str._s:_d:_Warning:_comment_not_closed._n
push eax
call ebp
add esp, 0x10
mov esi, dword [esp + 0x734]
push esi
call fcn.00402f50
add esp, 4
test eax, eax
jne 0x4017d3
mov eax, dword [esp + 0x18]
test eax, eax
mov eax, str.create
jne 0x4016ee
mov eax, str.update
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push esi
push eax
add ecx, 0x40
push str.Could_not__s___s_._n
push ecx
call ebp
add esp, 0x10
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
mov edx, dword [0x505264]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push ebp
push edx
push ebx
add eax, 0x40
push str._s:_d:_Only_one_language_allowed__see_line__d_._n
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x18
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
mov ecx, dword [0x505264]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push ecx
push ebx
add edx, 0x40
push str._s:_d:_Expecting_language_identifier._n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
mov eax, dword [0x505264]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
push ebx
add ecx, 0x40
push str._s:_d:_Syntax_error._n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov eax, 3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x71c
ret