Function at 0x418e00
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 0x418e4a
push ebx
call fcn.00418d60
add esp, 4
test eax, eax
je 0x418e4a
cmp esi, 1
jl 0x418feb
cmp byte [esi + ebx - 1], 0x5c
jne 0x418feb
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 0x418e6d
cmp byte [ebx], 0
je 0x418e6d
cmp byte [ebx + 1], 0x3a
jne 0x418e6d
cmp byte [ebx + 2], 0x5c
jne 0x418e6d
mov byte [ebx + 2], 0
jmp 0x418eb4
cmp byte [ebx], 0x5c
jne 0x418ea8
mov cl, byte [ebx + 1]
lea eax, [ebx + 1]
cmp cl, 0x5c
jne 0x418ea8
mov cl, byte [eax]
test cl, cl
je 0x418e90
cmp cl, 0x5c
je 0x418e90
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x418e83
mov cl, byte [eax]
test cl, cl
je 0x418ea3
cmp cl, 0x5c
je 0x418ea3
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x418e96
mov byte [eax], 0
jmp 0x418eb4
push 0x47d9e0
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str._rf
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 0x418f6c
cmp dword [esi], 0
jne 0x418f6c
push 0x4519a4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x418f63
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 0x418f63
test eax, eax
je 0x418f63
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x418f6c
push 1
push edi
call dword [ebp + 8]
test eax, eax
jne 0x418f3a
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x418f6c
push 0
push 0
push 1
push edi
call dword [ebp + 0xc]
test eax, eax
jne 0x418f51
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x418f6c
mov dword [esi], 0xc
mov dword [esi + 4], edi
mov dword [esi + 8], 1
jmp 0x418f6c
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 0x418fad
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x418fad
test esi, esi
je 0x418fa6
mov dword [esi], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x418f9f
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 0x418fc5
cmp byte [eax + ebx - 1], 0x5c
jne 0x418fc5
mov byte [eax + ebx - 1], 0
test esi, esi
je 0x418feb
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x418fe4
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