Function at 0x104a15e
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 [0x10d0640]
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.01092a2b
test eax, eax
jne 0x104a1e3
mov eax, 0x8007000e
push eax
push 0x437013e
mov edi, eax
call fcn.0108c503
jmp 0x104a688
push 0x100b2c8
push dword [ebp - 0x828]
call dword [sym.imp.msvcrt.dll_fopen]
pop ecx
pop ecx
mov dword [ebp - 0x81c], eax
cmp eax, ebx
jne 0x104a221
push esi
mov edi, 0x80070002
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x104a214
xor edi, edi
inc edi
push 1
push edi
push 0x446013e
jmp 0x104a644
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 0x104a24c
push edi
push edi
push 0x44b013e
jmp 0x104a644
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 0x104a63b
push 0x100b2b8
push esi
call dword [sym.imp.msvcrt.dll_strstr]
pop ecx
pop ecx
test eax, eax
je 0x104a63b
push 0x5d
push esi
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x104a63b
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, 0x104
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100b2ac
call edi
test eax, eax
jne 0x104a2c1
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100b2a4
call edi
test eax, eax
je 0x104a2c5
cmp eax, esi
jb 0x104a2eb
call fcn.01091f1e
push eax
push 0x45d013e
call fcn.0108c503
push 0x100b2a0
push 0x208
lea eax, [ebp - 0x60c]
push eax
call fcn.01049378
lea eax, [ebp - 0x814]
push eax
push 0
push 0x100b298
lea eax, [ebp - 0x60c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x104a31c
call fcn.01091f1e
mov edi, eax
push edi
push 0x467013e
jmp 0x104a62b
push 0xffffffffffffffff
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x824]
push eax
mov dword [ebp - 0x830], 1
call fcn.01092a2b
test eax, eax
jne 0x104a351
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x46e013e
jmp 0x104a62b
push 0x100b294
push dword [ebp - 0x824]
call dword [sym.imp.msvcrt.dll_fopen]
pop ecx
pop ecx
mov dword [ebp - 0x818], eax
test eax, eax
jne 0x104a380
mov eax, 0x80070002
push eax
mov edi, eax
push 0x474013e
jmp 0x104a62b
mov esi, dword [sym.imp.msvcrt.dll_fputs]
push eax
push 0x100b26c
call esi
push 0
push 0
push dword [ebp - 0x81c]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0x14
test eax, eax
je 0x104a3b7
mov eax, 0x80070026
push eax
mov edi, eax
push 0x47b013e
jmp 0x104a62b
push dword [ebp - 0x81c]
lea eax, [ebp - 0x404]
push 0x400
push eax
call ebx
add esp, 0xc
jmp 0x104a5c9
lea eax, [ebp - 0x404]
push 0xa
push eax
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x104a5fe
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 0x104a419
inc ebx
cmp byte [ebx], 0x20
je 0x104a40d
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 0x104a57e
test eax, eax
je 0x104a57e
lea edi, [eax + 1]
jmp 0x104a446
dec eax
cmp byte [eax], 0x20
jne 0x104a453
lea ecx, [ebp - 0x404]
mov byte [eax], 0
cmp ecx, eax
jb 0x104a440
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 0x104a477
push dword [ebp - 0x818]
push 0x100b268
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push dword [ebp - 0x820]
call esi
pop ecx
pop ecx
test ebx, ebx
je 0x104a49a
push dword [ebp - 0x818]
push 0x100b268
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100b264
call esi
pop ecx
pop ecx
jmp 0x104a4ac
inc edi
cmp byte [edi], 0x20
je 0x104a4ab
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x104a4b6
sub eax, edx
add eax, edi
jmp 0x104a4cc
dec eax
cmp byte [eax], 0x20
jne 0x104a4d0
mov byte [eax], 0
cmp edi, eax
jb 0x104a4c3
push 0x100b260
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 0x104a57e
push dword [ebp - 0x818]
push 0x100b268
call esi
push 0x2c
push edi
call dword [sym.imp.msvcrt.dll_strchr]
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x104a57e
push 0x3d
push ebx
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
jne 0x104a57e
lea eax, [ebx + 1]
cmp byte [eax], 0x20
mov dword [ebp - 0x820], eax
jne 0x104a544
inc eax
cmp byte [eax], 0x20
je 0x104a530
mov dword [ebp - 0x820], eax
jmp 0x104a544
dec ebx
cmp byte [ebx], 0x20
jne 0x104a54b
mov byte [ebx], 0
cmp edi, ebx
jb 0x104a53e
push dword [ebp - 0x818]
push edi
call esi
push dword [ebp - 0x818]
push 0x100b268
call esi
push dword [ebp - 0x818]
push 0x100b25c
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 0x104a5a1
push dword [ebp - 0x818]
push 0x100b268
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100b258
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 0x104a3d3
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 0x104a60d
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x4d9013e
jmp 0x104a62b
mov eax, 0x8007000d
push eax
mov edi, eax
push 0x488013e
jmp 0x104a62b
push dword [ebp - 0x834]
lea eax, [ebp - 0x814]
push eax
call fcn.01091ad0
mov edi, eax
test edi, edi
je 0x104a632
push edi
push 0x4dd013e
call fcn.0108c503
jmp 0x104a649
and dword [ebp - 0x830], 0
jmp 0x104a649
push 1
push 1
push 0x452013e
call fcn.0108c520
mov esi, dword [sym.imp.msvcrt.dll_fclose]
xor ebx, ebx
cmp dword [ebp - 0x81c], ebx
je 0x104a662
push dword [ebp - 0x81c]
call esi
pop ecx
cmp dword [ebp - 0x818], ebx
je 0x104a673
push dword [ebp - 0x818]
call esi
pop ecx
cmp dword [ebp - 0x830], ebx
je 0x104a688
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 0x104a69e
push dword [ebp - 0x828]
call esi
cmp dword [ebp - 0x824], ebx
je 0x104a6ae
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.01077d0b
leave
ret 8