Function at 0x40605f
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push 0x2e4
mov eax, 0x40948a
call fcn.004092e5
mov edi, ecx
or dword [ebp - 0x19c], 0xffffffff
xor ebx, ebx
mov byte [ebp - 0x195], bl
mov dword [ebp - 4], ebx
mov byte [ebp - 0x2f0], bl
mov eax, dword [edi]
push ebx
push 0x80
push 3
push ebx
push 1
push 0xc0000000
push eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call esi
mov dword [ebp - 0x19c], eax
cmp eax, 0xffffffff
jne 0x4060f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4060ee
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffa
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edi, dword [edi]
push ebx
push 0x80
push 3
push ebx
push 1
push 0xc0000000
push edi
call esi
mov dword [ebp - 0x19c], eax
cmp eax, 0xffffffff
jne 0x4060f5
xor al, al
jmp 0x4063a1
mov dword [ebp - 0x1b4], ebx
lea eax, [ebp - 0x1b4]
push eax
push dword [ebp - 0x19c]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1a8], eax
cmp dword [ebp - 0x1b4], ebx
jne 0x406382
mov byte [ebp - 0x60], bl
push 0x3f
push ebx
lea eax, [ebp - 0x5f]
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x1a0], ebx
push ebx
lea eax, [ebp - 0x1a0]
push eax
push 0x4c
lea eax, [ebp - 0x60]
push eax
mov esi, dword [ebp - 0x19c]
push esi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
jne 0x40616a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4060ee
push 6
push str.wwsafe
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.MSVCR100.dll_memcmp]
add esp, 0xc
test eax, eax
jne 0x4063a7
cmp dword [ebp - 0x18], ebx
je 0x4063a7
push dword [ebp - 0x18]
call fcn.004088ca
mov dword [ebp - 0x1ac], eax
push dword [ebp - 0x18]
push ebx
push eax
call dword [sym.imp.MSVCR100.dll_memset]
add esp, 0x10
mov dword [ebp - 0x1a0], ebx
push ebx
push ebx
push 0x4c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call esi
push ebx
lea eax, [ebp - 0x1a0]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1ac]
push dword [ebp - 0x19c]
call edi
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x1a0], eax
jne 0x40636d
mov byte [ebp - 0x194], bl
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x193]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
push 0x112
push ebx
lea eax, [ebp - 0x172]
push eax
call sub.MSVCR100.dll_memset
push dword [ebp - 0x18]
call fcn.004088ca
mov edi, eax
push dword [ebp - 0x18]
push ebx
push edi
call dword [sym.imp.MSVCR100.dll_memset]
mov dword [ebp - 0x1a4], ebx
lea eax, [ebp - 0x1a4]
push eax
push dword [ebp - 0x1a0]
push edi
push dword [ebp - 0x1ac]
push str.ke_3._r0
call dword [sym.imp.baselib.DLL_public:_static_bool___cdecl_DesUtil::Decrypt_char_const___unsigned_char___unsigned_char___long_int__long_int__]
push 0x134
push edi
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.MSVCR100.dll_memcpy]
add esp, 0x3c
cmp edi, ebx
je 0x406268
push edi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
pop ecx
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0x1a8]
mov dword [ebp - 0x1a8], eax
mov ecx, dword [ebp - 0x18]
add ecx, 0x4c
cmp dword [ebp - 0x68], ecx
jae 0x406290
push ebx
push ebx
push ecx
mov edi, dword [ebp - 0x19c]
push edi
call esi
jmp 0x4062a2
push 2
push ebx
push eax
push dword [ebp - 0x19c]
call esi
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x1a0], ebx
push dword [ebp - 0x64]
call fcn.004088ca
pop ecx
mov dword [ebp - 0x1b8], eax
push ebx
lea ecx, [ebp - 0x1a0]
push ecx
push dword [ebp - 0x64]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x64]
cmp eax, dword [ebp - 0x1a0]
jne 0x40636d
push eax
call fcn.004088ca
mov dword [ebp - 0x1b0], eax
mov dword [ebp - 0x1bc], ebx
push dword [ebp - 0x64]
push ebx
push eax
call dword [sym.imp.MSVCR100.dll_memset]
add esp, 0x10
mov dword [ebp - 0x1a4], ebx
cmp dword [ebp - 0x1a0], ebx
je 0x406353
lea eax, [ebp - 0x1a4]
push eax
push dword [ebp - 0x1a0]
push dword [ebp - 0x1b0]
push dword [ebp - 0x1b8]
push str.ke_3._r0
call dword [sym.imp.baselib.DLL_public:_static_bool___cdecl_DesUtil::Decrypt_char_const___unsigned_char___unsigned_char___long_int__long_int__]
add esp, 0x14
cmp al, bl
je 0x406366
push ebx
push ebx
push ebx
push edi
call esi
push ebx
lea eax, [ebp - 0x1bc]
push eax
push dword [ebp - 0x1a4]
push dword [ebp - 0x1b0]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 2
push ebx
push dword [ebp - 0x1a8]
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov byte [ebp - 0x195], 1
cmp dword [ebp - 0x1ac], ebx
je 0x406382
push dword [ebp - 0x1ac]
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
pop ecx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x19c], 0xffffffff
je 0x40639b
push dword [ebp - 0x19c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x195]
call fcn.00409341
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x4063a1