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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418880
mov eax, dword fs:[0]
push eax
sub esp, 0x2e0
mov eax, dword [0x4210a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x78], 0xffffffff
mov byte [ebp - 0x61], 0
mov dword [ebp - 4], 0
mov byte [ebp - 0x2ec], 0
mov eax, dword [esi]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call edi
mov ebx, eax
mov dword [ebp - 0x78], ebx
cmp ebx, 0xffffffff
jne 0x4082e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x408345
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffa
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, dword [esi]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push esi
call edi
mov ebx, eax
mov dword [ebp - 0x78], ebx
cmp ebx, 0xffffffff
je 0x408345
xor esi, esi
mov dword [ebp - 0x7c], esi
lea eax, [ebp - 0x7c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x7c], esi
jne 0x408511
mov byte [ebp - 0x60], 0
push 0x3f
push esi
lea ecx, [ebp - 0x5f]
push ecx
call fcn.0040c8a0
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x68], esi
push esi
lea edx, [ebp - 0x68]
push edx
push 0x4c
lea eax, [ebp - 0x60]
push eax
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
jne 0x40834c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x408548
cmp dword [ebp - 0x20], 0x61737777
jne 0x40851a
cmp byte [ebp - 0x1c], 0x66
jne 0x40851a
cmp byte [ebp - 0x1b], 0x65
jne 0x40851a
mov eax, dword [ebp - 0x18]
cmp eax, esi
je 0x40851a
push eax
call fcn.0040bb9d
mov esi, eax
mov dword [ebp - 0x80], esi
mov ecx, dword [ebp - 0x18]
push ecx
push 0
push esi
call fcn.0040c8a0
add esp, 0x10
mov dword [ebp - 0x68], 0
push 0
push 0
push 0x4c
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x68]
push edx
mov eax, dword [ebp - 0x18]
push eax
push esi
push ebx
call edi
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x68], eax
jne 0x408504
mov byte [ebp - 0x1b8], 0
push eax
call fcn.0040bb9d
mov edi, eax
mov dword [ebp - 0x6c], edi
mov ecx, dword [ebp - 0x18]
push ecx
push 0
push edi
call fcn.0040c8a0
mov dword [ebp - 0x70], 0
lea edx, [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x68]
push eax
push edi
push esi
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__]
mov ecx, 0x4d
mov esi, edi
lea edi, [ebp - 0x1b8]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.0040be96
add esp, 0x28
mov ecx, dword [ebp - 0x8c]
mov esi, ecx
sub esi, dword [ebp - 0x74]
mov eax, dword [ebp - 0x18]
add eax, 0x4c
cmp ecx, eax
jae 0x408431
push 0
push 0
push eax
jmp 0x408436
push 2
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x68], 0
mov edi, dword [ebp - 0x88]
push edi
call fcn.0040bb9d
add esp, 4
mov dword [ebp - 0x74], eax
push 0
lea edx, [ebp - 0x68]
push edx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp edi, dword [ebp - 0x68]
jne 0x408501
push edi
call fcn.0040bb9d
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x84], 0
push edi
push 0
push eax
call fcn.0040c8a0
add esp, 0x10
mov dword [ebp - 0x70], 0
mov eax, dword [ebp - 0x68]
test eax, eax
jne 0x4084a8
push 2
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4084f6
lea ecx, [ebp - 0x70]
push ecx
push eax
mov edx, dword [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0x74]
push eax
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
test al, al
je 0x4084fd
push 0
push 0
push 0
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call edi
push 0
lea ecx, [ebp - 0x84]
push ecx
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x6c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 2
push 0
push esi
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov byte [ebp - 0x61], 1
mov esi, dword [ebp - 0x80]
test esi, esi
je 0x408511
push esi
call fcn.0040be96
add esp, 4
mov dword [ebp - 4], 0xffffffff
jmp 0x408539
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x408548
cmp ebx, 0xffffffff
je 0x408545
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x61]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040bbb3
mov esp, ebp
pop ebp
ret