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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1058
call fcn.004d7290
sub esp, eax
mov eax, dword [ebp + 0x10]
mov byte [ebp - 0x102c], al
mov dword [ebp - 0x10], 0
mov dword [esp + 4], 0x5035ed
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x492d00
cmp dword [ebp + 0x18], 0
jne 0x492cf6
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.At_w_copy_file__:_Couldnt_open_file__s
mov dword [esp + 8], str.w_copy_file
mov dword [esp + 4], 0x944
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov eax, 0xffffffff
jmp 0x492f48
cmp byte [ebp - 0x102c], 0x61
jne 0x492d21
mov dword [esp + 4], 0x504942
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0xc], eax
jmp 0x492d37
mov dword [esp + 4], 0x5036dc
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x492d83
cmp dword [ebp + 0x18], 0
jne 0x492d6e
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.At_w_copy_file__:_Couldnt_open_file__s
mov dword [esp + 8], str.w_copy_file
mov dword [esp + 4], 0x954
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
mov eax, 0xffffffff
jmp 0x492f48
cmp dword [ebp + 0x14], 0
je 0x492f1c
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sym._fwrite
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jne 0x492dda
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._ferror
test eax, eax
je 0x492f1c
cmp dword [ebp + 0x18], 0
jne 0x492e0b
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_write_file__s
mov dword [esp + 8], str.w_copy_file
mov dword [esp + 4], 0x961
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x10]
jmp 0x492f48
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 1
lea eax, [ebp - 0x101c]
mov dword [esp], eax
call sym._fread
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._ferror
test eax, eax
je 0x492ea4
cmp dword [ebp + 0x18], 0
jne 0x492e98
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_read_file__s
mov dword [esp + 8], str.w_copy_file
mov dword [esp + 4], 0x96f
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov dword [ebp - 0x10], 0xffffffff
jmp 0x492f2f
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x101c]
mov dword [esp], eax
call sym._fwrite
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jne 0x492ee2
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._ferror
test eax, eax
je 0x492f1c
cmp dword [ebp + 0x18], 0
jne 0x492f13
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_write_file__s
mov dword [esp + 8], str.w_copy_file
mov dword [esp + 4], 0x979
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov dword [ebp - 0x10], 0xffffffff
jmp 0x492f2f
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._feof
test eax, eax
je 0x492e30
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x10]
leave
ret