Function at 0x4045ba
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 0x4073dc
push edi
call sub.kernel32.dll_ExpandEnvironmentStringsA
push esi
mov esi, 0x4073dc
mov bl, 0
jmp 0x404607
lodsb al, byte [esi]
cmp al, 0x25
jne 0x404607
push 0x4073dc
call fcn.00405290
push eax
push 0x4073dc
call sub.kernel32.dll_lstrcpyA
mov bl, 1
jmp 0x40460c
cmp byte [esi], 0
jne 0x4045e9
pop esi
mov edi, 0x4073dc
cmp byte [edi + 1], 0x3a
je 0x404667
push 0x400
lea eax, [ebp - 0x400]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
lea eax, [ebp - 0x400]
push eax
call fcn.00401c90
cmp byte [edi], 0x5c
je 0x40464d
push 0x40731e
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcatA
push edi
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [ebp - 0x400]
push eax
push edi
call sub.kernel32.dll_lstrcpyA
push 0x400
push 0x414054
push 5
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x414054
call fcn.00401ce6
push edi
call fcn.00401ce6
cmp bl, 1
je 0x40469c
test dword [esi + 0xd], 1
je 0x4046e9
cmp byte [0x408027], 0
jne 0x4046df
push edi
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcpyA
lea eax, [ebp - 0x400]
push eax
call fcn.00401c90
push edi
call fcn.00405290
push eax
push dword [0x407376]
lea eax, [ebp - 0x400]
push eax
push str.All_Files
push edi
call fcn.00405440
jmp 0x4046e1
xor eax, eax
test al, al
je 0x4049c0
push edi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x404787
test dword [esi + 0xd], 0x10
je 0x404703
jmp 0x40475b
cmp byte [0x408027], 0
jne 0x404738
push 0x400
push 0x414454
push 0x29
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x24
push edi
push 0x414454
push dword [0x407376]
call sub.user32.dll_MessageBoxA
jmp 0x40474d
cmp byte [0x408029], 1
jne 0x404748
mov eax, 6
jmp 0x40474d
mov eax, 7
cmp eax, 7
je 0x4049c0
cmp eax, 6
jne 0x404787
push 0x80
push edi
call sub.kernel32.dll_SetFileAttributesA
push 0x400
push 0x414854
push 0x2a
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x414854
call fcn.00401ce6
cmp byte [edi + 1], 0x3a
jne 0x4047b8
cmp byte [edi + 2], 0x5c
jne 0x4047b8
push edi
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcpyA
lea eax, [ebp - 0x400]
push eax
call fcn.00401c90
lea eax, [ebp - 0x400]
push eax
call fcn.004054b0
mov eax, dword [esi + 5]
lea eax, [eax + esi]
push dword [esi + 1]
push eax
push edi
call fcn.004051c8
or eax, eax
jne 0x404801
push edi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x4049c0
push 0x400
push 0x414c54
push 0x2b
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x414c54
call fcn.00401ce6
jmp 0x4049c0
mov eax, dword [esi + 9]
or eax, eax
je 0x404835
push eax
push edi
call sub.kernel32.dll_SetFileAttributesA
cmp eax, 1
jne 0x404835
push 0x400
push 0x415054
push 0x2c
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x415054
call fcn.00401ce6
test dword [esi + 0xd], 2
je 0x40499f
push 0x400
push 0x415454
push 0x2d
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x415454
call fcn.00401ce6
lea ebx, [esi + 0x21]
cmp byte [ebx], 0
jne 0x40486f
xor ebx, ebx
jmp 0x404887
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 0x40495d
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 0x40732f
lea eax, [ebp - 0x400]
push eax
call sub.kernel32.dll_lstrcpyA
cmp byte [edi + 1], 0x3a
je 0x4048fc
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 0x407331
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 0x407333
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 0x40496f
push 0xa
push 0
push ebx
push edi
push str.open
push 0
call sub.shell32.dll_ShellExecuteA
test dword [esi + 0xd], 8
je 0x40499f
push 0x400
push 0x415854
push 0x2e
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x415854
call fcn.00401ce6
push edi
call sub.kernel32.dll_DeleteFileA
push 0x400
push 0x415c54
push 0x2f
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x415c54
call fcn.00401ce6
push 0x400
push 0x416054
push 0xc
push dword [0x407372]
call sub.user32.dll_LoadStringA
push 0x416054
call fcn.00401ce6
push 0x4070ef
call fcn.00401ce6
pop ebx
pop edi
pop esi
leave
ret 4