Function at 0x1005c090
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 [0x101c0618]
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 0x1005c0cb
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 0x1005c418
push ebx
push 0x1017db78
push dword [edi + 0x2c]
call fcn.10108615
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1005c417
push ebx
mov dword [ebp - 0xec], 1
call fcn.1011eba0
add esp, 4
test eax, eax
jne 0x1005c11c
push ebx
push 1
push 2
push 0x1017db80
call fcn.1011ee3b
add esp, 0x10
cmp dword [edi + 0x30], 0
je 0x1005c1e5
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.100ec480
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.1005c570
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 0x1005c1c0
sub ecx, edx
sar ecx, 1
push ebx
push 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.1011ee3b
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 0x1005c221
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.1011ee3b
inc esi
add esp, 0x10
cmp esi, dword [ebp - 0xe4]
jl 0x1005c200
push ebx
call fcn.1011de4d
push ebx
call fcn.1011eba0
push ebx
mov dword [ebp - 0xe4], eax
call fcn.1010813d
mov eax, dword [edi + 0x34]
add esp, 0xc
test eax, eax
jle 0x1005c417
mov ebx, dword [ebp - 0xe4]
cmp ebx, eax
jl 0x1005c417
cmp ebx, 0x32000
jge 0x1005c268
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
jmp 0x1005c26d
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.100b45a3
mov ecx, eax
add esp, 4
mov dword [ebp - 0xe4], ecx
test ecx, ecx
je 0x1005c417
lea eax, [esi + esi]
mov dword [ebp - 0xe8], eax
add eax, 2
push eax
push 0
push ecx
call fcn.100ec480
push 0x1017dc48
push dword [edi + 0x2c]
mov byte [ebp - 0xdd], 0
call fcn.10108615
mov esi, eax
add esp, 0x14
test esi, esi
je 0x1005c306
sub ebx, dword [ebp - 0xe8]
push 0
push ebx
push esi
call fcn.1011e578
mov ebx, dword [ebp - 0xe4]
push esi
push 1
push dword [ebp - 0xe8]
push ebx
call fcn.1011e0fb
cmp eax, 1
push esi
sete byte [ebp - 0xdd]
call fcn.1010813d
add esp, 0x20
jmp 0x1005c30c
mov ebx, dword [ebp - 0xe4]
push 0x1017dc50
push dword [edi + 0x2c]
call fcn.10108615
mov esi, eax
add esp, 8
test esi, esi
je 0x1005c40e
push esi
push 1
push 2
push 0x1017db80
call fcn.1011ee3b
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.100ec480
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.1005c570
lea ecx, [ebp - 0xcc]
add esp, 0x2c
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1005c3c5
sub ecx, edx
sar ecx, 1
push esi
push 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.1011ee3b
add esp, 0x10
cmp byte [ebp - 0xdd], 0
je 0x1005c405
push esi
push 1
push dword [ebp - 0xe8]
push ebx
call fcn.1011ee3b
add esp, 0x10
push esi
call fcn.1010813d
add esp, 4
push ebx
call fcn.100b46bc
add esp, 4
pop ebx
lea ecx, [edi + 0x20]
call fcn.1005c770
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xec]
xor ecx, ebp
pop edi
pop esi
call fcn.100b4568
mov esp, ebp
pop ebp
ret