Function at 0x4016ab
Capabilities:
Check if file exists
Create directory
Delete file
Move file
Read .ini file
Write file on windows

Disassembly:
sub esp, 0x14c
push ebx
mov ebx, dword [sym.imp.MSVCR71.dll_sprintf]
push ebp
mov ebp, dword [sym.imp.MSVCR71.dll_fwrite]
push esi
xor esi, esi
push edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
jmp 0x4016db
xor esi, esi
push dword [esp + 0x178]
push dword [esp + 0x178]
push dword [esp + 0x178]
push dword [esp + 0x178]
push dword [esp + 0x178]
push dword [esp + 0x178]
push dword [esp + 0x178]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x28], eax
jne 0x401968
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [esp + 0x10], eax
je 0x401968
cmp eax, 3
je 0x401968
cmp eax, 0xd
je 0x401968
cmp eax, 0x10
je 0x401968
push 0x3f
pop ecx
mov byte [esp + 0x5c], 0
xor eax, eax
lea edi, [esp + 0x5d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
push str.D:data_rasATM_FileRetry_
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x20
push 0x405558
mov edi, str.D:data_rasATM_FileRetryMyfilelog.txt
push edi
call dword [sym.imp.MSVCR71.dll__fsopen]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x401905
push 2
push 0
push esi
call dword [sym.imp.MSVCR71.dll_fseek]
push esi
call dword [sym.imp.MSVCR71.dll_ftell]
add esp, 0x10
cmp eax, 0xa00000
jb 0x4017d7
push esi
call dword [sym.imp.MSVCR71.dll_fclose]
pop ecx
mov esi, str.D:data_rasATM_FileRetryMyfilelog_bk.txt
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
push edi
call dword [sym.imp.MSVCR71.dll_rename]
push 0x20
push 0x405558
push edi
call dword [sym.imp.MSVCR71.dll__fsopen]
add esp, 0x14
mov esi, eax
test esi, esi
je 0x401905
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x38]
push eax
movzx eax, word [esp + 0x3a]
push eax
movzx eax, word [esp + 0x3c]
push eax
movzx eax, word [esp + 0x3e]
push eax
movzx eax, word [esp + 0x3e]
push eax
movzx eax, word [esp + 0x40]
push eax
lea eax, [esp + 0x54]
push str._04d__02d__02d__02d:_02d:_02d
push eax
call ebx
add esp, 0x20
lea eax, [esp + 0x3c]
push esi
push eax
call sub.MSVCR71.dll_strlen
pop ecx
push eax
lea eax, [esp + 0x44]
push 1
push eax
call ebp
push str.N_fwrite
mov edi, str.N_CreateFile
push edi
call sub.MSVCR71.dll_strcmp
add esp, 0x18
test eax, eax
jne 0x40189d
push dword [esp + 0x10]
call dword [sym.imp.MSVCR71.dll_strerror]
push eax
push dword [esp + 0x168]
lea eax, [esp + 0x68]
push edi
push 0x405444
push eax
call ebx
add esp, 0x18
lea eax, [esp + 0x5c]
push esi
push eax
call sub.MSVCR71.dll_strlen
pop ecx
push eax
lea eax, [esp + 0x64]
push 1
push eax
call ebp
add esp, 0x10
push esi
mov edi, 0x405478
push edi
call sub.MSVCR71.dll_strlen
pop ecx
push eax
push 1
push edi
call ebp
add esp, 0x10
jmp 0x4018fd
xor eax, eax
push eax
push eax
lea ecx, [esp + 0x28]
push ecx
push 0x400
push dword [esp + 0x20]
push eax
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
je 0x4018fd
push dword [esp + 0x20]
lea eax, [esp + 0x60]
push dword [esp + 0x164]
push edi
push 0x405444
push eax
call ebx
add esp, 0x14
lea eax, [esp + 0x5c]
push esi
push eax
call sub.MSVCR71.dll_strlen
pop ecx
push eax
lea eax, [esp + 0x64]
push 1
push eax
call ebp
add esp, 0x10
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call dword [sym.imp.MSVCR71.dll_fclose]
pop ecx
cmp dword [esp + 0x1c], 0
jne 0x401945
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, str.c:windowsATM.INI
push edi
push 0x64
push str.Create
push str.FileRetryTimer
mov dword [esp + 0x2c], 1
call esi
push edi
push 0xa
push str.Create
push str.FileRetryCounter
mov dword [esp + 0x24], eax
call esi
mov dword [esp + 0x24], eax
cmp dword [esp + 0x14], 0
je 0x401956
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x24]
jle 0x4016d9
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret