Function at 0x407f60
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418288
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x78
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x24], edx
mov edi, dword [ebx + 8]
mov ecx, edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], 0
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407fb5
sub ecx, esi
sar ecx, 1
push ecx
push edi
lea ecx, [edx + 0x1c]
call fcn.00402320
push 0xb
xor eax, eax
mov dword [ebp - 0x60], 0
push str.Service.log
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
call fcn.00402320
mov ecx, edi
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408011
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x58]
call fcn.00402320
push 0x419ff0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call fcn.004048c0
mov dword [ebp - 0x30], 0
xor ecx, ecx
mov dword [ebp - 0x2c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x40], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x30], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 2
push eax
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x88]
call fcn.00408800
mov esi, eax
add esp, 4
mov eax, dword [ebp - 0x24]
add eax, 0x34
cmp eax, esi
je 0x4080c0
mov ecx, eax
call fcn.00402270
movups xmm0, xmmword [esi]
mov eax, dword [ebp - 0x24]
movups xmmword [eax + 0x34], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [eax + 0x44], xmm0
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov edx, dword [ebp - 0x74]
cmp edx, 8
jb 0x4080fd
mov ecx, dword [ebp - 0x88]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4080f3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4081e6
push edx
push ecx
call fcn.00416baa
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 7
mov word [ebp - 0x88], ax
cmp edx, 8
jb 0x408152
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408148
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4081e6
push edx
push ecx
call fcn.00416baa
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
cmp edx, 8
jb 0x40819f
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408195
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4081e6
push edx
push ecx
call fcn.00416baa
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
cmp edx, 8
jb 0x4081f6
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4081ec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4081ec
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00416baa
add esp, 8
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edx, 2
test eax, eax
jne 0x40832f
lea ecx, [edi + 2]
nop dword [eax]
mov ax, word [edi]
add edi, edx
test ax, ax
jne 0x408210
sub edi, ecx
xor ecx, ecx
sar edi, 1
lea esi, [edi + 1]
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004168ef
mov dword [ebp - 0x20], eax
xor ecx, ecx
lea eax, [edi + 0xa]
add esp, 4
mov dword [ebp - 0x1c], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004168ef
add esp, 4
mov edi, eax
push esi
push 0
push dword [ebp - 0x20]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push dword [ebp - 0x1c]
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push dword [ebp - 0x28]
push esi
mov esi, dword [ebp - 0x20]
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
push eax
push 0x419ff0
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcstok_s]
add esp, 0xc
test eax, eax
je 0x40830b
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
nop dword [eax]
push eax
push dword [ebp - 0x1c]
push edi
call esi
add esp, 0xc
test eax, eax
jne 0x4083c3
push 0x419ff0
push dword [ebp - 0x1c]
push edi
call esi
add esp, 0xc
test eax, eax
jne 0x4083c3
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4082f3
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4083ae
lea eax, [ebp - 0x18]
push eax
push 0x419ff0
push 0
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcstok_s]
add esp, 0xc
test eax, eax
jne 0x4082b0
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x408322
push eax
call fcn.004168fd
add esp, 4
test edi, edi
je 0x40832f
push edi
call fcn.004168fd
add esp, 4
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x408342
push eax
call fcn.004168fd
add esp, 4
mov eax, dword [esi + 0x50]
test eax, eax
je 0x408352
push eax
call fcn.004168fd
add esp, 4
mov eax, dword [esi + 0x54]
xor ecx, ecx
mov edi, 2
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004168ef
mov dword [esi + 0x4c], eax
xor ecx, ecx
mov eax, dword [esi + 0x58]
add esp, 4
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004168ef
mov dword [esi + 0x50], eax
add esp, 4
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004168de
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str._Error_:_CreateMutilFolder_CreateDirectory__s__fail_errorcode___ld__n
call fcn.00404ad0
add esp, 0xc
mov dword [ebp - 0x1c], 0
jmp 0x408312