Function at 0x423f70
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, eax
test esi, esi
je 0x423fba
push ebx
call fcn.00423ed0
add esp, 4
test eax, eax
je 0x423fba
cmp esi, 1
jl 0x42415b
cmp byte [esi + ebx - 1], 0x5c
jne 0x42415b
mov byte [esi + ebx - 1], 0
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x423fdd
cmp byte [ebx], 0
je 0x423fdd
cmp byte [ebx + 1], 0x3a
jne 0x423fdd
cmp byte [ebx + 2], 0x5c
jne 0x423fdd
mov byte [ebx + 2], 0
jmp 0x424024
cmp byte [ebx], 0x5c
jne 0x424018
mov cl, byte [ebx + 1]
lea eax, [ebx + 1]
cmp cl, 0x5c
jne 0x424018
mov cl, byte [eax]
test cl, cl
je 0x424000
cmp cl, 0x5c
je 0x424000
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x423ff3
mov cl, byte [eax]
test cl, cl
je 0x424013
cmp cl, 0x5c
je 0x424013
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x424006
mov byte [eax], 0
jmp 0x424024
push 0x49546c
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x495470
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0xc
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4240dc
cmp dword [esi], 0
jne 0x4240dc
push str.ADVAPI32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x4240d3
push str.InitializeSecurityDescriptor
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetSecurityDescriptorDacl
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xc], eax
test ecx, ecx
je 0x4240d3
test eax, eax
je 0x4240d3
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4240dc
push 1
push edi
call dword [ebp + 8]
test eax, eax
jne 0x4240aa
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4240dc
push 0
push 0
push 1
push edi
call dword [ebp + 0xc]
test eax, eax
jne 0x4240c1
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4240dc
mov dword [esi], 0xc
mov dword [esi + 4], edi
mov dword [esi + 8], 1
jmp 0x4240dc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x42411d
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x42411d
test esi, esi
je 0x424116
mov dword [esi], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x42410f
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 4], 0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 1
jl 0x424135
cmp byte [eax + ebx - 1], 0x5c
jne 0x424135
mov byte [eax + ebx - 1], 0
test esi, esi
je 0x42415b
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x424154
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 4], 0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret