Function at 0x403860
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Get file attributes
Query environment variable
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff3ac
push esi
push edi
push ebx
mov esi, dword [ebp + 8]
lea edi, [esi + 0x421]
push 0x400
push 0x406707
push edi
call sub.kernel32.dll_ExpandEnvironmentStringsA
push esi
mov esi, 0x406707
mov bl, 0
jmp 0x4038ad
lodsb al, byte [esi]
cmp al, 0x25
jne 0x4038ad
push 0x406707
call fcn.004042d0
push eax
push 0x406707
call sub.kernel32.dll_lstrcpyA
mov bl, 1
jmp 0x4038b2
cmp byte [esi], 0
jne 0x40388f
pop esi
mov edi, 0x406707
push 0x406583
call fcn.00401bc7
push edi
call fcn.00401bc7
cmp bl, 1
je 0x4038d6
test dword [esi + 0xd], 1
je 0x403923
cmp byte [0x406fc6], 0
jne 0x403919
push edi
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcpyA
lea eax, [ebp - 0x400]
push eax
call fcn.00401b76
push edi
call fcn.004042d0
push eax
push dword [0x4066a6]
lea eax, [ebp - 0x400]
push eax
push 0x406591
push edi
call fcn.00404480
jmp 0x40391b
xor eax, eax
test al, al
je 0x403b2f
push edi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40397a
cmp byte [0x406fc6], 0
jne 0x40394c
push 0x24
push edi
push 0x4065a0
push dword [0x4066a6]
call sub.user32.dll_MessageBoxA
jmp 0x403961
cmp byte [0x406fc8], 1
jne 0x40395c
mov eax, 6
jmp 0x403961
mov eax, 7
cmp eax, 6
jne 0x403971
push 0x80
push edi
call sub.kernel32.dll_SetFileAttributesA
cmp eax, 7
je 0x403b2f
cmp byte [edi + 1], 0x3a
jne 0x4039ab
cmp byte [edi + 2], 0x5c
jne 0x4039ab
push edi
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcpyA
lea eax, [ebp - 0x400]
push eax
call fcn.00401b76
lea eax, [ebp - 0x400]
push eax
call fcn.004044f0
mov eax, dword [esi + 5]
lea eax, [eax + esi]
push dword [esi + 1]
push eax
push edi
call fcn.0040420c
or eax, eax
jne 0x4039dd
push edi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x403b2f
push 0x4065bf
call fcn.00401bc7
jmp 0x403b2f
mov eax, dword [esi + 9]
or eax, eax
je 0x4039fa
push eax
push edi
call sub.kernel32.dll_SetFileAttributesA
cmp eax, 1
jne 0x4039fa
push 0x4065d6
call fcn.00401bc7
test dword [esi + 0xd], 2
je 0x403b25
push 0x4065ea
call fcn.00401bc7
lea ebx, [esi + 0x21]
cmp byte [ebx], 0
jne 0x403a1d
xor ebx, ebx
jmp 0x403a35
push 0x400
lea eax, [ebp - 0x800]
push eax
push ebx
call sub.kernel32.dll_ExpandEnvironmentStringsA
lea ebx, [ebp - 0x800]
test dword [esi + 0xd], 4
je 0x403afa
push 0x44
lea eax, [ebp - 0xc44]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0x10
lea eax, [ebp - 0xc54]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0x4065f9
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcpyA
cmp byte [edi + 1], 0x3a
je 0x403a99
lea eax, [ebp - 0xc00]
push eax
push 0x400
call sub.kernel32.dll_GetCurrentDirectoryA
lea eax, [ebp - 0xc00]
push eax
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcatA
push edi
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcatA
push 0x4065fb
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcatA
push ebx
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [ebp - 0xc54]
push eax
lea eax, [ebp - 0xc44]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x400]
push eax
push edi
call sub.kernel32.dll_CreateProcessA
push 0xffffffffffffffff
push dword [ebp - 0xc54]
call sub.kernel32.dll_WaitForSingleObject
jmp 0x403b0c
push 0xa
push 0
push ebx
push edi
push str.open
push 0
call sub.shell32.dll_ShellExecuteA
test dword [esi + 0xd], 8
je 0x403b25
push 0x4065fe
call fcn.00401bc7
push edi
call sub.kernel32.dll_DeleteFileA
push 0x40660c
call fcn.00401bc7
push 0x406139
call fcn.00401bc7
push 0x406142
call fcn.00401bc7
pop ebx
pop edi
pop esi
leave
ret 4