Function at 0x401bf0
Capabilities:
Check if file exists
Create directory
Read file on windows
Reference absolute stream path on windows
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp], 0xbb8
call sub.KERNEL32.dll_Sleep
sub esp, 4
mov ebx, dword [sym.imp.SHLWAPI.DLL_PathFileExistsA]
mov dword [esp], str.D:MCxData
call ebx
sub esp, 4
test eax, eax
jne 0x401c30
mov dword [esp], str.D:MCxData
call sub.msvcrt.dll__mkdir
test eax, eax
jne 0x401f9f
mov dword [esp], str.D:MCxDataLog
call ebx
sub esp, 4
test eax, eax
jne 0x401c54
mov dword [esp], str.D:MCxDataLog
call sub.msvcrt.dll__mkdir
test eax, eax
jne 0x401f9f
mov dword [esp], str.D:MCxDataLogSRMon.log
call fcn.00402290
test eax, eax
jne 0x401cb7
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 6
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.D:MCxDataLogSRMon.log
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x401f9f
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov dword [esp + 4], 0x4082df
mov dword [esp], str.D:MCxDataLogSRMon.log:log
call sub.msvcrt.dll_fopen
test eax, eax
mov dword [0x40a02c], eax
je 0x401f9f
call fcn.00401460
test eax, eax
lea edi, [esp + 0x2c]
lea ebp, [esp + 0x30]
je 0x401dcb
jmp 0x401f92
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 6
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.D:MCxDataLogSRMon.log:clock
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
cmp eax, 0xffffffff
mov dword [0x40a028], eax
je 0x401f92
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 8
mov dword [esp + 4], 0x40a020
mov dword [esp], eax
mov dword [0x40a020], 0
mov dword [0x40a024], 0xffff
call sub.KERNEL32.dll_WriteFile
mov eax, dword [0x40a028]
sub esp, 0x14
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [0x40a02c]
sub esp, 4
mov dword [esp + 8], 0x16
mov dword [esp + 4], 1
mov dword [esp], str.Clock_file_created..._n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x7530
call sub.KERNEL32.dll_Sleep
sub esp, 4
mov dword [esp], str.D:MCxDataLogSRMon.log:clock
call fcn.00402290
test eax, eax
je 0x401cf2
mov dword [esp], ebp
call sub.KERNEL32.dll_GetLocalTime
mov eax, dword [0x406004]
sub esp, 4
test eax, eax
jne 0x401fb0
movzx esi, word [esp + 0x32]
movzx eax, word [esp + 0x36]
mov ebx, 3
imul esi, esi, 0x64
add esi, eax
movzx eax, word [esp + 0x30]
imul eax, eax, 0x2710
add esi, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 6
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.D:MCxDataLogSRMon.log:clock
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
cmp eax, 0xffffffff
mov dword [0x40a028], eax
jne 0x401eb9
mov eax, dword [0x40a02c]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 1
mov dword [esp], str.Clock_Data_in_use...__retry_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x3e8
call sub.KERNEL32.dll_Sleep
sub esp, 4
sub ebx, 1
jne 0x401e18
mov eax, dword [0x40a028]
cmp eax, 0xffffffff
je 0x401f60
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 8
mov dword [esp + 4], 0x40a020
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
cmp esi, dword [0x40a020]
je 0x402020
mov dword [0x40a024], 0xffff
mov eax, dword [0x40a028]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_SetFilePointer
mov eax, dword [0x40a028]
sub esp, 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 8
mov dword [esp + 4], 0x40a020
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
mov eax, dword [0x40a028]
sub esp, 0x14
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x401dbc
mov eax, dword [0x40a02c]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 1
mov dword [esp], str.Clock_Data_in_use...__abort_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
movzx eax, word [esp + 0x3c]
mov dword [esp + 4], str._04d__02d__02d__02d:_02d:_02d_Standard_run..._n
mov dword [esp + 0x1c], eax
movzx eax, word [esp + 0x3a]
mov dword [esp + 0x18], eax
movzx eax, word [esp + 0x38]
mov dword [esp + 0x14], eax
movzx eax, word [esp + 0x36]
mov dword [esp + 0x10], eax
movzx eax, word [esp + 0x32]
mov dword [esp + 0xc], eax
movzx eax, word [esp + 0x30]
mov dword [esp + 8], eax
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [0x406004], 0
jmp 0x401df7
mov eax, dword [0x40a024]
cmp eax, 0xffffffff
je 0x401ef6
add eax, 1
mov dword [0x40a024], eax
jmp 0x401ef6