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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 0x42f098
mov eax, dword [ebp + 0xc]
push eax
call fcn.0042045e
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x42162b
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT20.dll_strerror]
add esp, 4
push eax
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
push 0x4300e0
push 0x44
call fcn.004093aa
add esp, 0x10
push 0x4326d0
push 0x44
call fcn.004093aa
add esp, 8
mov eax, dword [ebp + 0xc]
push eax
push 0x42f968
push 0x44
call fcn.004093aa
add esp, 0xc
call fcn.004173be
mov eax, 0xffffffff
jmp 0x4219de
push 0x42f0a4
mov eax, dword [ebp + 8]
push eax
call fcn.0042045e
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4216b2
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.MSVCRT20.dll_fclose]
add esp, 4
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT20.dll_strerror]
add esp, 4
push eax
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
push 0x4300e0
push 0x44
call fcn.004093aa
add esp, 0x10
push 0x4326d0
push 0x44
call fcn.004093aa
add esp, 8
mov eax, dword [ebp + 8]
push eax
push 0x42f968
push 0x44
call fcn.004093aa
add esp, 0xc
call fcn.004173be
mov eax, 0xffffffff
jmp 0x4219de
push 0x6c00
call fcn.0041a3d0
add esp, 4
mov dword [ebp - 0xc], eax
call fcn.004203c7
mov eax, dword [ebp - 0x14]
push eax
push 0x6c00
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_fread]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x42172a
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_fwrite]
add esp, 0x10
cmp eax, dword [ebp - 0x10]
je 0x421725
push 0x42fa18
push 0
call fcn.004093aa
add esp, 8
call fcn.004173be
jmp 0x42172a
jmp 0x4216c7
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT20.dll_fclose]
add esp, 4
test eax, eax
je 0x421763
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.MSVCRT20.dll_fclose]
add esp, 4
mov eax, 0xffffffff
jmp 0x4219de
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.MSVCRT20.dll_fclose]
add esp, 4
test eax, eax
je 0x421782
mov eax, 0xffffffff
jmp 0x4219de
mov eax, dword [ebp + 8]
push eax
call fcn.00420b66
add esp, 4
test eax, eax
je 0x4217a2
mov eax, dword [ebp + 8]
push eax
call fcn.00420fc5
add esp, 4
cmp dword [ebp - 0x10], 0
jne 0x4219c3
cmp dword [ebp + 0x10], 0
je 0x4219c3
mov eax, dword [ebp + 8]
push eax
push 0x431270
push 0
call fcn.004093aa
add esp, 0xc
push 0x42f098
mov eax, dword [ebp + 0xc]
push eax
call fcn.0042045e
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x421843
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT20.dll_strerror]
add esp, 4
push eax
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
push 0x4300e0
push 0x44
call fcn.004093aa
add esp, 0x10
push 0x4326d0
push 0x44
call fcn.004093aa
add esp, 8
mov eax, dword [ebp + 0xc]
push eax
push 0x42f968
push 0x44
call fcn.004093aa
add esp, 0xc
call fcn.004173be
mov eax, 0xffffffff
jmp 0x4219de
push 0x42f098
mov eax, dword [ebp + 8]
push eax
call fcn.0042045e
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4218ca
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.MSVCRT20.dll_fclose]
add esp, 4
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT20.dll_strerror]
add esp, 4
push eax
call dword [sym.imp.MSVCRT20.dll__errno]
mov eax, dword [eax]
push eax
push 0x4300e0
push 0x44
call fcn.004093aa
add esp, 0x10
push 0x4326d0
push 0x44
call fcn.004093aa
add esp, 8
mov eax, dword [ebp + 8]
push eax
push 0x42f968
push 0x44
call fcn.004093aa
add esp, 0xc
call fcn.004173be
mov eax, 0xffffffff
jmp 0x4219de
push 0x3600
call fcn.0041a3d0
add esp, 4
mov dword [ebp - 0xc], eax
push 0x3600
call fcn.0041a3d0
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x14]
push eax
push 0x3600
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_fread]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x42195b
mov eax, dword [ebp - 4]
push eax
push 0x3600
push 1
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.MSVCRT20.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 0x10]
je 0x421935
jmp 0x42195b
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.MSVCRT20.dll_memcmp
add esp, 0xc
test eax, eax
je 0x421956
jmp 0x42195b
jmp 0x4218ea
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT20.dll_fclose]
add esp, 4
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.MSVCRT20.dll_fclose]
add esp, 4
push 0x432ee0
push 0
call fcn.004093aa
add esp, 8
mov eax, str.OK_________n
mov ecx, 0x42fbc0
xor edx, edx
cmp dword [ebp - 0x10], 0
sete dl
dec edx
sub ecx, eax
and edx, ecx
add edx, eax
push edx
push 0
call fcn.004093aa
add esp, 8
cmp dword [ebp - 0x10], 0
jbe 0x4219d7
mov eax, 0xffffffff
jmp 0x4219d9
xor eax, eax
jmp 0x4219de
pop edi
pop esi
pop ebx
leave
ret