Function at 0x102b645
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 [0x1079e94]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push 0xffffffffffffffff
mov dword [ebp - 0x834], eax
mov dword [eax], ebx
push esi
lea eax, [ebp - 0x828]
push eax
mov dword [ebp - 0x828], ebx
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x818], ebx
mov dword [ebp - 0x830], ebx
call fcn.0106dfe1
test eax, eax
jne 0x102b6ad
mov eax, 0x8007000e
push eax
push 0x429013e
mov edi, eax
call fcn.01053610
jmp 0x102bb4e
push 0x1008010
push dword [ebp - 0x828]
call dword [sym.imp.msvcrt.dll_fopen]
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x81c], eax
jne 0x102b6eb
push esi
mov edi, 0x80070002
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x102b6de
xor edi, edi
inc edi
push 1
push edi
push 0x438013e
jmp 0x102bb0a
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 0x102b716
push edi
push edi
push 0x43d013e
jmp 0x102bb0a
lea eax, [ebp - 0x404]
push 0x5b
push eax
call dword [sym.imp.msvcrt.dll_strchr]
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x102bb01
push 0x1008000
push esi
call dword [sym.imp.msvcrt.dll_strstr]
test eax, eax
pop ecx
pop ecx
je 0x102bb01
push 0x5d
push esi
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x102bb01
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, 0x104
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x1007ff4
call edi
test eax, eax
jne 0x102b78b
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x1007fec
call edi
test eax, eax
je 0x102b78f
cmp eax, esi
jb 0x102b7b3
call fcn.0106d6ff
push eax
push 0x44f013e
call fcn.01053610
lea eax, [ebp - 0x60c]
push 0x1007fe8
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x814]
push eax
push 0
push 0x1007fe0
lea eax, [ebp - 0x60c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x102b7e9
call fcn.0106d6ff
mov edi, eax
push edi
push 0x459013e
call fcn.01053610
jmp 0x102bb0f
push 0xffffffffffffffff
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x824]
push eax
mov dword [ebp - 0x830], 1
call fcn.0106dfe1
test eax, eax
jne 0x102b81b
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x460013e
jmp 0x102b7df
push 0x1007fdc
push dword [ebp - 0x824]
call dword [sym.imp.msvcrt.dll_fopen]
mov edi, eax
test edi, edi
pop ecx
pop ecx
mov dword [ebp - 0x818], edi
jne 0x102b849
mov eax, 0x80070002
push eax
mov edi, eax
push 0x466013e
jmp 0x102b7df
mov esi, dword [sym.imp.msvcrt.dll_fputs]
push edi
push 0x1007fb4
call esi
push 0
push 0
push dword [ebp - 0x81c]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0x14
test eax, eax
je 0x102b880
mov eax, 0x80070026
push eax
mov edi, eax
push 0x46d013e
jmp 0x102b7df
push dword [ebp - 0x81c]
lea eax, [ebp - 0x404]
push 0x400
push eax
call ebx
add esp, 0xc
test eax, eax
je 0x102baa3
lea eax, [ebp - 0x404]
push 0xa
push eax
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x102bac3
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 0x102b8e5
inc ebx
cmp byte [ebx], 0x20
je 0x102b8d9
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 0x102ba4a
test eax, eax
je 0x102ba4a
lea edi, [eax + 1]
jmp 0x102b912
dec eax
cmp byte [eax], 0x20
jne 0x102b91f
lea ecx, [ebp - 0x404]
cmp ecx, eax
mov byte [eax], 0
jb 0x102b90c
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 0x102b943
push dword [ebp - 0x818]
push 0x1007fb0
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push dword [ebp - 0x820]
call esi
test ebx, ebx
pop ecx
pop ecx
je 0x102b966
push dword [ebp - 0x818]
push 0x1007fb0
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x1007fac
call esi
pop ecx
pop ecx
jmp 0x102b978
inc edi
cmp byte [edi], 0x20
je 0x102b977
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x102b982
sub eax, edx
add eax, edi
jmp 0x102b998
dec eax
cmp byte [eax], 0x20
jne 0x102b99c
mov byte [eax], 0
cmp edi, eax
jb 0x102b98f
push 0x1007fa8
push edi
call dword [sym.imp.msvcrt.dll_strcspn]
pop ecx
pop ecx
xor ecx, ecx
cmp byte [eax + edi], cl
setne cl
test ecx, ecx
mov dword [ebp - 0x82c], ecx
je 0x102ba4a
push dword [ebp - 0x818]
push 0x1007fb0
call esi
push 0x2c
push edi
call dword [sym.imp.msvcrt.dll_strchr]
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x102ba4a
push 0x3d
push ebx
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
jne 0x102ba4a
lea eax, [ebx + 1]
cmp byte [eax], 0x20
mov dword [ebp - 0x820], eax
jne 0x102ba10
inc eax
cmp byte [eax], 0x20
je 0x102b9fc
mov dword [ebp - 0x820], eax
jmp 0x102ba10
dec ebx
cmp byte [ebx], 0x20
jne 0x102ba17
cmp edi, ebx
mov byte [ebx], 0
jb 0x102ba0a
push dword [ebp - 0x818]
push edi
call esi
push dword [ebp - 0x818]
push 0x1007fb0
call esi
push dword [ebp - 0x818]
push 0x1007fa4
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 0x102ba6d
push dword [ebp - 0x818]
push 0x1007fb0
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x1007fa0
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 0x102b89f
mov edi, dword [ebp - 0x818]
push edi
call dword [sym.imp.msvcrt.dll_fflush]
test byte [edi + 0xc], 0x20
pop ecx
je 0x102bad5
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x4cb013e
jmp 0x102b7df
mov eax, 0x8007000d
push eax
mov edi, eax
push 0x47a013e
jmp 0x102b7df
push dword [ebp - 0x834]
lea eax, [ebp - 0x814]
push eax
call fcn.0106d913
mov edi, eax
test edi, edi
je 0x102baf8
push edi
push 0x4cf013e
jmp 0x102b7df
and dword [ebp - 0x830], 0
jmp 0x102bb0f
push 1
push 1
push 0x444013e
call fcn.0105362d
mov esi, dword [sym.imp.msvcrt.dll_fclose]
xor ebx, ebx
cmp dword [ebp - 0x81c], ebx
je 0x102bb28
push dword [ebp - 0x81c]
call esi
pop ecx
cmp dword [ebp - 0x818], ebx
je 0x102bb39
push dword [ebp - 0x818]
call esi
pop ecx
cmp dword [ebp - 0x830], ebx
je 0x102bb4e
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x828], ebx
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x102bb64
push dword [ebp - 0x828]
call esi
cmp dword [ebp - 0x824], ebx
je 0x102bb74
push dword [ebp - 0x824]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.0104b509
leave
ret 8