Function at 0x10002463
Capabilities:
Check if file exists
Get file attributes
Get file size
Query environment variable
Read file via mapping
Set environment variable
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff3fc
pushal
mov dword [ebp - 0xc04], 0
mov byte [0x1000e50e], 0
push 0x400
lea eax, [ebp - 0xc00]
push eax
push dword [ebp + 8]
call sub.kernel32.dll_ExpandEnvironmentStringsA
push 0x400
push 0x1000d8f1
lea eax, [ebp - 0xc00]
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsA
mov esi, 0x1000d8f1
jmp 0x100024cb
lodsb al, byte [esi]
cmp al, 0x25
jne 0x100024cb
push 0x1000d8f1
call fcn.10006f00
push eax
push 0x1000d8f1
call sub.kernel32.dll_lstrcpyA
jmp 0x100024d0
cmp byte [esi], 0
jne 0x100024af
mov edi, 0x1000d8f1
cmp byte [edi + 1], 0x3a
je 0x10002546
cmp byte [0x1000e93f], 0
jne 0x10002505
push 0x400
lea eax, [ebp - 0xc00]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
lea eax, [ebp - 0xc00]
push eax
call fcn.1000226a
jmp 0x10002516
push 0x1000e93f
lea eax, [ebp - 0xc00]
push eax
call sub.kernel32.dll_lstrcpyA
cmp byte [edi], 0x5c
je 0x1000252c
push 0x1000d10d
lea eax, [ebp - 0xc00]
push eax
call sub.kernel32.dll_lstrcatA
push edi
lea eax, [ebp - 0xc00]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [ebp - 0xc00]
push eax
push edi
call sub.kernel32.dll_lstrcpyA
push 0x400
push 0x1001321d
push 0x13
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
push 0x1001321d
call sym.dup2patcher.dll_AddMsg
push 0x1000d8f1
call sym.dup2patcher.dll_AddMsg
push 0x1000d8f1
call sub.kernel32.dll_GetFileAttributesA
mov dword [0x1000e4f1], eax
cmp eax, 0xffffffff
je 0x100025b9
test dword [ebp + 0x10], 0x80000000
je 0x10002590
jmp 0x100025b9
test eax, 1
je 0x100025af
xor eax, 1
push eax
push 0x1000d8f1
call sub.kernel32.dll_SetFileAttributesA
push str.Removing_readonly_file_attribute
call sym.dup2patcher.dll_AddMsg
push 0x1000d8f1
call fcn.10002313
test dword [ebp + 0x10], 0x80000000
je 0x100025e0
push 0
push 0x82
push 3
push 0
push 1
push 0x80000000
push 0x1000d8f1
call sub.kernel32.dll_CreateFileA
jmp 0x100025fc
push 0
push 0x82
push 3
push 0
push 2
push 0xc0000000
push 0x1000d8f1
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x10002780
cmp byte [0x1000e93c], 0
jne 0x1000277b
push 0x1000d8f1
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x100026f3
push 0x1000d8f1
call fcn.10006f00
cmp word [eax], 0x2e2a
je 0x10002673
cmp word [eax], 0
je 0x10002673
push 0x400
push 0x1001361d
push 0x10
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
push 0x34
push 0x1000d8f1
push 0x1001361d
push dword [0x1000d886]
call sub.user32.dll_MessageBoxA
cmp eax, 6
jne 0x1000277b
lea esi, [ebp - 0x400]
mov edi, 0x1000d8f1
cmp byte [edi + 1], 0x3a
jne 0x1000268c
push edi
call fcn.10006f00
mov edi, eax
push edi
push esi
call sub.kernel32.dll_lstrcpyA
push esi
call fcn.10006cf0
cmp eax, 0
jbe 0x1000269f
inc eax
push esi
push eax
add esi, eax
push edi
push esi
call sub.kernel32.dll_lstrcpyA
pop eax
add esi, eax
push 0x2e
push str.Exe_Files__.exe_
push esi
call sub.kernel32.dll_RtlMoveMemory
pop esi
lea ebx, [ebp - 0x800]
push 0x1000d8f1
push ebx
call sub.kernel32.dll_lstrcpyA
push ebx
call fcn.1000226a
push dword [0x1000d886]
push ebx
push esi
push 0x1000d8f1
call fcn.10006e90
cmp eax, 1
jne 0x100026ee
jmp 0x10002546
jmp 0x1000277b
test dword [ebp + 0x10], 2
je 0x10002743
cmp byte [0x1000e50e], 0
jne 0x1000277b
push 0x1000d8f1
call fcn.10002411
cmp eax, 1
jne 0x10002741
mov byte [0x1000e50e], 1
push 0x400
push 0x10013a1d
push 0x11
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
push 0x10013a1d
call sym.dup2patcher.dll_AddMsg
jmp 0x10002546
jmp 0x1000277b
push 0x400
push 0x10013e1d
push 0x12
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
push 0x34
push 0x1000d8f1
push 0x10013e1d
push dword [0x1000d886]
call sub.user32.dll_MessageBoxA
cmp eax, 6
jne 0x1000277b
jmp 0x10002546
jmp 0x100028be
mov dword [0x1000e4f5], eax
push 0x1000f171
push 0x1000f169
push 0x1000f161
push dword [0x1000e4f5]
call sub.kernel32.dll_GetFileTime
push 0x1000e4fd
push dword [0x1000e4f5]
call sub.kernel32.dll_GetFileSize
mov dword [0x1000e4f9], eax
cmp dword [ebp + 0xc], 0
jne 0x100027bd
mov dword [ebp + 0xc], eax
test dword [ebp + 0x10], 4
je 0x100027df
add eax, 0x278
add eax, dword [0x1000d860]
push 0x100
push eax
call fcn.10006f40
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
pop dword [0x1000e509]
test dword [ebp + 0x10], 0x80000000
je 0x10002808
push 0
push 0
push 0
push 2
push 0
push dword [0x1000e4f5]
call sub.kernel32.dll_CreateFileMappingA
jmp 0x1000281d
push 0
push 0
push 0
push 4
push 0
push dword [0x1000e4f5]
call sub.kernel32.dll_CreateFileMappingA
or eax, eax
jne 0x10002844
push 0x400
push 0x1001421d
push 0x14
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
push 0x1001421d
call sym.dup2patcher.dll_AddMsg
jmp 0x100028be
mov dword [0x1000e505], eax
test dword [ebp + 0x10], 0x80000000
je 0x10002862
push 0
push 0
push 0
push 4
push eax
call sub.kernel32.dll_MapViewOfFile
jmp 0x10002870
push 0
push 0
push 0
push 2
push eax
call sub.kernel32.dll_MapViewOfFile
or eax, eax
jne 0x10002876
jmp 0x10002821
mov dword [0x1000e501], eax
mov dword [ebp - 0xc04], eax
push 0x1000d8f1
push 0x1000d15e
call sub.kernel32.dll_SetEnvironmentVariableA
push 0x1000d8f1
lea eax, [ebp - 0xc00]
push eax
call sub.kernel32.dll_lstrcpyA
lea eax, [ebp - 0xc00]
push eax
call fcn.1000226a
lea eax, [ebp - 0xc00]
push eax
push 0x1000d16d
call sub.kernel32.dll_SetEnvironmentVariableA
cmp dword [ebp - 0xc04], 0
jne 0x100028d1
push str.File_not_loaded
call sym.dup2patcher.dll_AddMsg
popal
mov eax, dword [ebp - 0xc04]
leave
ret 0xc