Function at 0x1042ad7
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 [0x10b5894]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
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.010a50e9
test eax, eax
jne 0x1042b41
mov eax, 0x8007000e
push eax
push 0x432013e
mov edi, eax
call fcn.0107ae44
jmp 0x1042fe6
push 0x100a7a0
push dword [ebp - 0x828]
call dword [sym.imp.msvcrt.dll_fopen]
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x81c], eax
jne 0x1042b7f
push esi
mov edi, 0x80070002
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1042b72
xor edi, edi
inc edi
push 1
push edi
push 0x441013e
jmp 0x1042fa2
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 0x1042baa
push edi
push edi
push 0x446013e
jmp 0x1042fa2
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 0x1042f99
push 0x100a790
push esi
call dword [sym.imp.msvcrt.dll_strstr]
test eax, eax
pop ecx
pop ecx
je 0x1042f99
push 0x5d
push esi
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x1042f99
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, 0x104
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100a784
call edi
test eax, eax
jne 0x1042c1f
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100a77c
call edi
test eax, eax
je 0x1042c23
cmp eax, esi
jb 0x1042c49
call fcn.010a4804
push eax
push 0x458013e
call fcn.0107ae44
push 0x100a778
push 0x208
lea eax, [ebp - 0x60c]
push eax
call fcn.01042598
lea eax, [ebp - 0x814]
push eax
push 0
push 0x100a770
lea eax, [ebp - 0x60c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x1042c7a
call fcn.010a4804
mov edi, eax
push edi
push 0x462013e
jmp 0x1042f89
push 0xffffffffffffffff
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x824]
push eax
mov dword [ebp - 0x830], 1
call fcn.010a50e9
test eax, eax
jne 0x1042caf
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x469013e
jmp 0x1042f89
push 0x100a76c
push dword [ebp - 0x824]
call dword [sym.imp.msvcrt.dll_fopen]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x818], eax
jne 0x1042cde
mov eax, 0x80070002
push eax
mov edi, eax
push 0x46f013e
jmp 0x1042f89
mov esi, dword [sym.imp.msvcrt.dll_fputs]
push eax
push 0x100a744
call esi
push 0
push 0
push dword [ebp - 0x81c]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0x14
test eax, eax
je 0x1042d15
mov eax, 0x80070026
push eax
mov edi, eax
push 0x476013e
jmp 0x1042f89
push dword [ebp - 0x81c]
lea eax, [ebp - 0x404]
push 0x400
push eax
call ebx
add esp, 0xc
jmp 0x1042f27
lea eax, [ebp - 0x404]
push 0xa
push eax
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x1042f5c
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 0x1042d77
inc ebx
cmp byte [ebx], 0x20
je 0x1042d6b
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 0x1042edc
test eax, eax
je 0x1042edc
lea edi, [eax + 1]
jmp 0x1042da4
dec eax
cmp byte [eax], 0x20
jne 0x1042db1
lea ecx, [ebp - 0x404]
cmp ecx, eax
mov byte [eax], 0
jb 0x1042d9e
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 0x1042dd5
push dword [ebp - 0x818]
push 0x100a740
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push dword [ebp - 0x820]
call esi
test ebx, ebx
pop ecx
pop ecx
je 0x1042df8
push dword [ebp - 0x818]
push 0x100a740
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100a73c
call esi
pop ecx
pop ecx
jmp 0x1042e0a
inc edi
cmp byte [edi], 0x20
je 0x1042e09
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1042e14
sub eax, edx
add eax, edi
jmp 0x1042e2a
dec eax
cmp byte [eax], 0x20
jne 0x1042e2e
mov byte [eax], 0
cmp edi, eax
jb 0x1042e21
push 0x100a738
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 0x1042edc
push dword [ebp - 0x818]
push 0x100a740
call esi
push 0x2c
push edi
call dword [sym.imp.msvcrt.dll_strchr]
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x1042edc
push 0x3d
push ebx
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
jne 0x1042edc
lea eax, [ebx + 1]
cmp byte [eax], 0x20
mov dword [ebp - 0x820], eax
jne 0x1042ea2
inc eax
cmp byte [eax], 0x20
je 0x1042e8e
mov dword [ebp - 0x820], eax
jmp 0x1042ea2
dec ebx
cmp byte [ebx], 0x20
jne 0x1042ea9
cmp edi, ebx
mov byte [ebx], 0
jb 0x1042e9c
push dword [ebp - 0x818]
push edi
call esi
push dword [ebp - 0x818]
push 0x100a740
call esi
push dword [ebp - 0x818]
push 0x100a734
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 0x1042eff
push dword [ebp - 0x818]
push 0x100a740
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100a730
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 0x1042d31
push dword [ebp - 0x818]
call dword [sym.imp.msvcrt.dll_fflush]
push dword [ebp - 0x818]
call dword [sym.imp.msvcrt.dll_ferror]
test eax, eax
pop ecx
pop ecx
je 0x1042f6b
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x4d4013e
jmp 0x1042f89
mov eax, 0x8007000d
push eax
mov edi, eax
push 0x483013e
jmp 0x1042f89
push dword [ebp - 0x834]
lea eax, [ebp - 0x814]
push eax
call fcn.010a4a18
mov edi, eax
test edi, edi
je 0x1042f90
push edi
push 0x4d8013e
call fcn.0107ae44
jmp 0x1042fa7
and dword [ebp - 0x830], 0
jmp 0x1042fa7
push 1
push 1
push 0x44d013e
call fcn.0107ae61
mov esi, dword [sym.imp.msvcrt.dll_fclose]
xor ebx, ebx
cmp dword [ebp - 0x81c], ebx
je 0x1042fc0
push dword [ebp - 0x81c]
call esi
pop ecx
cmp dword [ebp - 0x818], ebx
je 0x1042fd1
push dword [ebp - 0x818]
call esi
pop ecx
cmp dword [ebp - 0x830], ebx
je 0x1042fe6
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 0x1042ffc
push dword [ebp - 0x828]
call esi
cmp dword [ebp - 0x824], ebx
je 0x104300c
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.01068363
leave
ret 8