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

Disassembly:
sub esp, 0xf4
mov eax, dword [0x89b044]
xor eax, esp
mov dword [esp + 0xf0], eax
push ebx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x44]
push edi
xor edi, edi
push eax
mov dword [esp + 0x28], edi
call ebx
test eax, eax
jne 0x6677bc
mov eax, dword [esi + 0x44]
push edi
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov eax, dword [esi + 0x44]
push eax
call ebx
test eax, eax
je 0x667aee
mov eax, dword [esi + 0x38]
push 0x830208
push eax
call fcn.0072b299
mov ebp, eax
add esp, 8
cmp ebp, edi
je 0x667aee
push ebp
mov dword [esp + 0x28], 1
call fcn.0072b056
add esp, 4
test eax, eax
jne 0x66780c
push ebp
push 1
push 2
push 0x8105b0
call fcn.0072b81c
add esp, 0x10
cmp dword [esi + 0x3c], edi
je 0x6678c9
xor eax, eax
lea edx, [esp + 0x14]
xor ecx, ecx
push edx
mov dword [esi + 0x3c], edi
mov word [esp + 0x18], cx
mov dword [esp + 0x1a], eax
mov dword [esp + 0x1e], eax
mov dword [esp + 0x22], eax
mov word [esp + 0x26], ax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0xc6
lea ecx, [esp + 0x3e]
xor eax, eax
push edi
push ecx
mov word [esp + 0x44], ax
call fcn.007202b0
movzx edx, word [esp + 0x2c]
movzx eax, word [esp + 0x2a]
movzx ecx, word [esp + 0x28]
add esp, 0xc
push edx
movzx edx, word [esp + 0x1e]
push eax
movzx eax, word [esp + 0x1e]
push ecx
movzx ecx, word [esp + 0x20]
push edx
push eax
push ecx
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 edx, [esp + 0x5c]
push 0x400
push edx
call fcn.00574cd0
lea eax, [esp + 0x64]
add esp, 0x2c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x6678a7
sub eax, edx
push ebp
sar eax, 1
push 1
add eax, eax
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.0072b81c
add esp, 0x10
mov ebx, dword [esi + 0x30]
sub ebx, dword [esi + 0x2c]
sar ebx, 2
test ebx, ebx
jle 0x667924
mov edx, dword [esi + 0x30]
sub edx, dword [esi + 0x2c]
sar edx, 2
cmp edi, edx
jb 0x6678e8
call fcn.0071ffb6
mov eax, dword [esi + 0x2c]
mov edx, dword [esi + 0x30]
mov ecx, dword [eax + edi*4]
sub edx, eax
sar edx, 2
mov dword [esp + 0x14], ecx
cmp edi, edx
jb 0x667903
call fcn.0071ffb6
mov eax, dword [esi + 0x2c]
mov ecx, dword [eax + edi*4]
mov edx, dword [ecx - 0xc]
mov eax, dword [esp + 0x14]
push ebp
push 1
add edx, edx
push edx
push eax
call fcn.0072b81c
inc edi
add esp, 0x10
cmp edi, ebx
jl 0x6678d6
push ebp
call fcn.0072f68a
push ebp
call fcn.0072b056
push ebp
mov ebx, eax
call fcn.0072ab63
mov eax, dword [esi + 0x40]
add esp, 0xc
test eax, eax
jle 0x667aee
cmp ebx, eax
jl 0x667aee
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x19000
jl 0x667961
mov eax, 0x19000
shr eax, 1
mov edi, eax
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0070a654
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x667aee
lea ebp, [edi + edi]
lea ecx, [ebp + 2]
push ecx
push 0
push eax
call fcn.007202b0
mov eax, dword [esi + 0x38]
push 0x8302c4
push eax
mov byte [esp + 0x27], 0
call fcn.0072b299
mov edi, eax
add esp, 0x14
test edi, edi
je 0x6679e2
push 0
sub ebx, ebp
push ebx
push edi
call fcn.0072b14e
mov edx, dword [esp + 0x20]
push edi
push 1
push ebp
push edx
call fcn.0072ae9c
cmp eax, 1
push edi
sete bl
call fcn.0072ab63
add esp, 0x20
jmp 0x6679e6
mov bl, byte [esp + 0x13]
mov eax, dword [esi + 0x38]
push 0x8302cc
push eax
call fcn.0072b299
mov edi, eax
add esp, 8
test edi, edi
je 0x667ae1
push edi
push 1
push 2
push 0x8105b0
call fcn.0072b81c
xor eax, eax
add esp, 0x10
lea ecx, [esp + 0x28]
push ecx
mov word [esp + 0x2c], ax
mov dword [esp + 0x2e], eax
mov dword [esp + 0x32], eax
mov dword [esp + 0x36], eax
mov word [esp + 0x3a], ax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
xor edx, edx
push 0xc6
push edx
lea eax, [esp + 0x42]
push eax
mov word [esp + 0x44], dx
call fcn.007202b0
movzx ecx, word [esp + 0x40]
movzx edx, word [esp + 0x3e]
movzx eax, word [esp + 0x3c]
add esp, 0xc
push ecx
movzx ecx, word [esp + 0x32]
push edx
movzx edx, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x34]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x810428
lea ecx, [esp + 0x5c]
push 0x400
push ecx
call fcn.00574cd0
lea eax, [esp + 0x64]
add esp, 0x2c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x667aa0
sub eax, edx
sar eax, 1
push edi
lea edx, [eax + eax]
push 1
push edx
lea eax, [esp + 0x44]
push eax
call fcn.0072b81c
add esp, 0x10
test bl, bl
je 0x667ad8
mov ecx, dword [esp + 0x14]
push edi
push 1
push ebp
push ecx
call fcn.0072b81c
add esp, 0x10
push edi
call fcn.0072ab63
add esp, 4
mov edx, dword [esp + 0x14]
push edx
call fcn.00725356
add esp, 4
mov ebx, dword [esi + 0x30]
add esi, 0x20
cmp dword [esi + 0xc], ebx
jbe 0x667afe
call fcn.0071ffb6
mov edi, dword [esi + 0xc]
mov ebp, dword [esi]
cmp edi, dword [esi + 0x10]
jbe 0x667b0d
call fcn.0071ffb6
mov eax, dword [esi]
push ebx
push ebp
push edi
push eax
lea eax, [esp + 0x24]
push eax
mov ecx, esi
call fcn.00667480
mov ecx, dword [esp + 0x100]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0071fe0b
add esp, 0xf4
ret