Function at 0x458450
Capabilities:
Check if file exists
Create directory
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
mov eax, dword [0x56f790]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
mov edi, ecx
mov dword [ebp - 0xec], 0
push dword [edi + 0x38]
call esi
test eax, eax
jne 0x45848b
push eax
push dword [edi + 0x38]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [edi + 0x38]
call esi
test eax, eax
je 0x4587d8
push ebx
push 0x5377c8
push dword [edi + 0x2c]
call fcn.004cd845
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4587d7
push ebx
mov dword [ebp - 0xec], 1
call fcn.004d4bca
add esp, 4
test eax, eax
jne 0x4584dc
push ebx
push 1
push 2
push 0x5377d0
call fcn.004d4e65
add esp, 0x10
cmp dword [edi + 0x30], 0
je 0x4585a5
lea eax, [ebp - 0xdc]
mov dword [edi + 0x30], 0
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0xdc], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0xc8
lea eax, [ebp - 0xcc]
push 0
push eax
call fcn.004b17e0
movzx eax, word [ebp - 0xd0]
add esp, 0xc
push eax
movzx eax, word [ebp - 0xd2]
push eax
movzx eax, word [ebp - 0xd4]
push eax
movzx eax, word [ebp - 0xd6]
push eax
movzx eax, word [ebp - 0xda]
push eax
movzx eax, word [ebp - 0xdc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str._r_n_Start_Log___06x:_06x_:__04d__02d__02d__02d:_02d:_02d__n
lea eax, [ebp - 0xcc]
push 0x400
push eax
call fcn.00458930
lea ecx, [ebp - 0xcc]
add esp, 0x2c
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x458580
sub ecx, edx
sar ecx, 1
push ebx
push 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.004d4e65
add esp, 0x10
mov eax, dword [edi + 0x24]
xor esi, esi
sub eax, dword [edi + 0x20]
sar eax, 2
mov dword [ebp - 0xe4], eax
test eax, eax
jle 0x4585e1
nop word [eax + eax]
mov eax, dword [edi + 0x20]
push ebx
push 1
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx - 0xc]
add eax, eax
push eax
push ecx
call fcn.004d4e65
inc esi
add esp, 0x10
cmp esi, dword [ebp - 0xe4]
jl 0x4585c0
push ebx
call fcn.004d3e77
push ebx
call fcn.004d4bca
push ebx
mov dword [ebp - 0xe4], eax
call fcn.004cd36d
mov eax, dword [edi + 0x34]
add esp, 0xc
test eax, eax
jle 0x4587d7
mov ebx, dword [ebp - 0xe4]
cmp ebx, eax
jl 0x4587d7
cmp ebx, 0x32000
jge 0x458628
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
jmp 0x45862d
mov esi, 0x19000
shr esi, 1
xor ecx, ecx
mov edx, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ac4f3
mov ecx, eax
add esp, 4
mov dword [ebp - 0xe4], ecx
test ecx, ecx
je 0x4587d7
lea eax, [esi + esi]
mov dword [ebp - 0xe8], eax
add eax, 2
push eax
push 0
push ecx
call fcn.004b17e0
push 0x537898
push dword [edi + 0x2c]
mov byte [ebp - 0xdd], 0
call fcn.004cd845
mov esi, eax
add esp, 0x14
test esi, esi
je 0x4586c6
sub ebx, dword [ebp - 0xe8]
push 0
push ebx
push esi
call fcn.004d45a2
mov ebx, dword [ebp - 0xe4]
push esi
push 1
push dword [ebp - 0xe8]
push ebx
call fcn.004d4125
cmp eax, 1
push esi
sete byte [ebp - 0xdd]
call fcn.004cd36d
add esp, 0x20
jmp 0x4586cc
mov ebx, dword [ebp - 0xe4]
push 0x5378a0
push dword [edi + 0x2c]
call fcn.004cd845
mov esi, eax
add esp, 8
test esi, esi
je 0x4587ce
push esi
push 1
push 2
push 0x5377d0
call fcn.004d4e65
add esp, 0x10
lea eax, [ebp - 0xdc]
xorps xmm0, xmm0
movups xmmword [ebp - 0xdc], xmm0
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0xc8
lea eax, [ebp - 0xcc]
push 0
push eax
call fcn.004b17e0
movzx eax, word [ebp - 0xd0]
add esp, 0xc
push eax
movzx eax, word [ebp - 0xd2]
push eax
movzx eax, word [ebp - 0xd4]
push eax
movzx eax, word [ebp - 0xd6]
push eax
movzx eax, word [ebp - 0xda]
push eax
movzx eax, word [ebp - 0xdc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str._r_n_Truncate_Log___06x:_06x_:__04d__02d__02d__02d:_02d:_02d__n
lea eax, [ebp - 0xcc]
push 0x400
push eax
call fcn.00458930
lea ecx, [ebp - 0xcc]
add esp, 0x2c
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x458785
sub ecx, edx
sar ecx, 1
push esi
push 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.004d4e65
add esp, 0x10
cmp byte [ebp - 0xdd], 0
je 0x4587c5
push esi
push 1
push dword [ebp - 0xe8]
push ebx
call fcn.004d4e65
add esp, 0x10
push esi
call fcn.004cd36d
add esp, 4
push ebx
call fcn.004ac60c
add esp, 4
pop ebx
lea ecx, [edi + 0x20]
call fcn.00458b30
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xec]
xor ecx, ebp
pop edi
pop esi
call fcn.004ac4b8
mov esp, ebp
pop ebp
ret