Function at 0x1049a70
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x834
mov eax, dword [0x10cd598]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
push 0x3ff
lea eax, [ebp - 0x403]
push ebx
push eax
mov dword [ebp - 0x834], edi
mov dword [ebp - 0x828], ebx
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x818], ebx
mov byte [ebp - 0x404], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x828]
push eax
mov dword [ebp - 0x830], ebx
mov dword [edi], ebx
call fcn.0108f8d0
test eax, eax
jne 0x1049af5
mov eax, 0x8007000e
push eax
push 0x437013e
mov edi, eax
call fcn.010893e6
jmp 0x1049f9a
push 0x100b1e0
push dword [ebp - 0x828]
call dword [sym.imp.msvcrt.dll_fopen]
pop ecx
pop ecx
mov dword [ebp - 0x81c], eax
cmp eax, ebx
jne 0x1049b33
push esi
mov edi, 0x80070002
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1049b26
xor edi, edi
inc edi
push 1
push edi
push 0x446013e
jmp 0x1049f56
mov ebx, dword [sym.imp.msvcrt.dll_fgets]
push eax
lea eax, [ebp - 0x404]
push 0x400
xor edi, edi
push eax
inc edi
call ebx
add esp, 0xc
test eax, eax
jne 0x1049b5e
push edi
push edi
push 0x44b013e
jmp 0x1049f56
lea eax, [ebp - 0x404]
push 0x5b
push eax
call dword [sym.imp.msvcrt.dll_strchr]
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x1049f4d
push 0x100b1d0
push esi
call dword [sym.imp.msvcrt.dll_strstr]
pop ecx
pop ecx
test eax, eax
je 0x1049f4d
push 0x5d
push esi
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x1049f4d
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, 0x104
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100b1c4
call edi
test eax, eax
jne 0x1049bd3
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100b1bc
call edi
test eax, eax
je 0x1049bd7
cmp eax, esi
jb 0x1049bfd
call fcn.0108edc3
push eax
push 0x45d013e
call fcn.010893e6
push 0x100b1b8
push 0x208
lea eax, [ebp - 0x60c]
push eax
call fcn.01048c8a
lea eax, [ebp - 0x814]
push eax
push 0
push 0x100b1b0
lea eax, [ebp - 0x60c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x1049c2e
call fcn.0108edc3
mov edi, eax
push edi
push 0x467013e
jmp 0x1049f3d
push 0xffffffffffffffff
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x824]
push eax
mov dword [ebp - 0x830], 1
call fcn.0108f8d0
test eax, eax
jne 0x1049c63
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x46e013e
jmp 0x1049f3d
push 0x100b1ac
push dword [ebp - 0x824]
call dword [sym.imp.msvcrt.dll_fopen]
pop ecx
pop ecx
mov dword [ebp - 0x818], eax
test eax, eax
jne 0x1049c92
mov eax, 0x80070002
push eax
mov edi, eax
push 0x474013e
jmp 0x1049f3d
mov esi, dword [sym.imp.msvcrt.dll_fputs]
push eax
push 0x100b184
call esi
push 0
push 0
push dword [ebp - 0x81c]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0x14
test eax, eax
je 0x1049cc9
mov eax, 0x80070026
push eax
mov edi, eax
push 0x47b013e
jmp 0x1049f3d
push dword [ebp - 0x81c]
lea eax, [ebp - 0x404]
push 0x400
push eax
call ebx
add esp, 0xc
jmp 0x1049edb
lea eax, [ebp - 0x404]
push 0xa
push eax
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x1049f10
and dword [ebp - 0x82c], 0
lea edi, [ebp - 0x404]
mov byte [eax], 0
cmp byte [ebp - 0x404], 0x20
mov ebx, edi
mov dword [ebp - 0x820], ebx
jne 0x1049d2b
inc ebx
cmp byte [ebx], 0x20
je 0x1049d1f
mov dword [ebp - 0x820], ebx
lea eax, [ebp - 0x404]
push 0x3d
push eax
call dword [sym.imp.msvcrt.dll_strchr]
cmp byte [ebx], 0x3b
pop ecx
pop ecx
je 0x1049e90
test eax, eax
je 0x1049e90
lea edi, [eax + 1]
jmp 0x1049d58
dec eax
cmp byte [eax], 0x20
jne 0x1049d65
lea ecx, [ebp - 0x404]
mov byte [eax], 0
cmp ecx, eax
jb 0x1049d52
push 0x20
push ebx
call dword [sym.imp.msvcrt.dll_strchr]
mov ebx, eax
neg ebx
sbb ebx, ebx
neg ebx
pop ecx
pop ecx
je 0x1049d89
push dword [ebp - 0x818]
push 0x100b180
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push dword [ebp - 0x820]
call esi
pop ecx
pop ecx
test ebx, ebx
je 0x1049dac
push dword [ebp - 0x818]
push 0x100b180
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100b17c
call esi
pop ecx
pop ecx
jmp 0x1049dbe
inc edi
cmp byte [edi], 0x20
je 0x1049dbd
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1049dc8
sub eax, edx
add eax, edi
jmp 0x1049dde
dec eax
cmp byte [eax], 0x20
jne 0x1049de2
mov byte [eax], 0
cmp edi, eax
jb 0x1049dd5
push 0x100b178
push edi
call dword [sym.imp.msvcrt.dll_strcspn]
pop ecx
pop ecx
xor ecx, ecx
cmp byte [eax + edi], cl
setne cl
mov dword [ebp - 0x82c], ecx
test ecx, ecx
je 0x1049e90
push dword [ebp - 0x818]
push 0x100b180
call esi
push 0x2c
push edi
call dword [sym.imp.msvcrt.dll_strchr]
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x1049e90
push 0x3d
push ebx
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
jne 0x1049e90
lea eax, [ebx + 1]
cmp byte [eax], 0x20
mov dword [ebp - 0x820], eax
jne 0x1049e56
inc eax
cmp byte [eax], 0x20
je 0x1049e42
mov dword [ebp - 0x820], eax
jmp 0x1049e56
dec ebx
cmp byte [ebx], 0x20
jne 0x1049e5d
mov byte [ebx], 0
cmp edi, ebx
jb 0x1049e50
push dword [ebp - 0x818]
push edi
call esi
push dword [ebp - 0x818]
push 0x100b180
call esi
push dword [ebp - 0x818]
push 0x100b174
call esi
mov edi, dword [ebp - 0x820]
add esp, 0x18
and dword [ebp - 0x82c], 0
push dword [ebp - 0x818]
push edi
call esi
cmp dword [ebp - 0x82c], 0
pop ecx
pop ecx
je 0x1049eb3
push dword [ebp - 0x818]
push 0x100b180
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100b170
call esi
push dword [ebp - 0x81c]
lea eax, [ebp - 0x404]
push 0x400
push eax
call dword [sym.imp.msvcrt.dll_fgets]
add esp, 0x14
test eax, eax
jne 0x1049ce5
push dword [ebp - 0x818]
call dword [sym.imp.msvcrt.dll_fflush]
push dword [ebp - 0x818]
call dword [sym.imp.msvcrt.dll_ferror]
pop ecx
pop ecx
test eax, eax
je 0x1049f1f
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x4d9013e
jmp 0x1049f3d
mov eax, 0x8007000d
push eax
mov edi, eax
push 0x488013e
jmp 0x1049f3d
push dword [ebp - 0x834]
lea eax, [ebp - 0x814]
push eax
call fcn.0108e981
mov edi, eax
test edi, edi
je 0x1049f44
push edi
push 0x4dd013e
call fcn.010893e6
jmp 0x1049f5b
and dword [ebp - 0x830], 0
jmp 0x1049f5b
push 1
push 1
push 0x452013e
call fcn.01089403
mov esi, dword [sym.imp.msvcrt.dll_fclose]
xor ebx, ebx
cmp dword [ebp - 0x81c], ebx
je 0x1049f74
push dword [ebp - 0x81c]
call esi
pop ecx
cmp dword [ebp - 0x818], ebx
je 0x1049f85
push dword [ebp - 0x818]
call esi
pop ecx
cmp dword [ebp - 0x830], ebx
je 0x1049f9a
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x828], ebx
je 0x1049fb0
push dword [ebp - 0x828]
call esi
cmp dword [ebp - 0x824], ebx
je 0x1049fc0
push dword [ebp - 0x824]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01074bd5
leave
ret 8