Function at 0x104a21d
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 [0x10d0620]
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.01092a50
test eax, eax
jne 0x104a2a2
mov eax, 0x8007000e
push eax
push 0x437013e
mov edi, eax
call fcn.0108c55a
jmp 0x104a747
push 0x100b2e0
push dword [ebp - 0x828]
call dword [sym.imp.msvcrt.dll_fopen]
pop ecx
pop ecx
mov dword [ebp - 0x81c], eax
cmp eax, ebx
jne 0x104a2e0
push esi
mov edi, 0x80070002
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x104a2d3
xor edi, edi
inc edi
push 1
push edi
push 0x446013e
jmp 0x104a703
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 0x104a30b
push edi
push edi
push 0x44b013e
jmp 0x104a703
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 0x104a6fa
push 0x100b2d0
push esi
call dword [sym.imp.msvcrt.dll_strstr]
pop ecx
pop ecx
test eax, eax
je 0x104a6fa
push 0x5d
push esi
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x104a6fa
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, 0x104
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100b2c4
call edi
test eax, eax
jne 0x104a380
push esi
lea eax, [ebp - 0x60c]
push eax
push 0x100b2bc
call edi
test eax, eax
je 0x104a384
cmp eax, esi
jb 0x104a3aa
call fcn.01091f43
push eax
push 0x45d013e
call fcn.0108c55a
push 0x100b2b8
push 0x208
lea eax, [ebp - 0x60c]
push eax
call fcn.01049437
lea eax, [ebp - 0x814]
push eax
push 0
push 0x100b2b0
lea eax, [ebp - 0x60c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x104a3db
call fcn.01091f43
mov edi, eax
push edi
push 0x467013e
jmp 0x104a6ea
push 0xffffffffffffffff
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x824]
push eax
mov dword [ebp - 0x830], 1
call fcn.01092a50
test eax, eax
jne 0x104a410
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x46e013e
jmp 0x104a6ea
push 0x100b2ac
push dword [ebp - 0x824]
call dword [sym.imp.msvcrt.dll_fopen]
pop ecx
pop ecx
mov dword [ebp - 0x818], eax
test eax, eax
jne 0x104a43f
mov eax, 0x80070002
push eax
mov edi, eax
push 0x474013e
jmp 0x104a6ea
mov esi, dword [sym.imp.msvcrt.dll_fputs]
push eax
push 0x100b284
call esi
push 0
push 0
push dword [ebp - 0x81c]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0x14
test eax, eax
je 0x104a476
mov eax, 0x80070026
push eax
mov edi, eax
push 0x47b013e
jmp 0x104a6ea
push dword [ebp - 0x81c]
lea eax, [ebp - 0x404]
push 0x400
push eax
call ebx
add esp, 0xc
jmp 0x104a688
lea eax, [ebp - 0x404]
push 0xa
push eax
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x104a6bd
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 0x104a4d8
inc ebx
cmp byte [ebx], 0x20
je 0x104a4cc
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 0x104a63d
test eax, eax
je 0x104a63d
lea edi, [eax + 1]
jmp 0x104a505
dec eax
cmp byte [eax], 0x20
jne 0x104a512
lea ecx, [ebp - 0x404]
mov byte [eax], 0
cmp ecx, eax
jb 0x104a4ff
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 0x104a536
push dword [ebp - 0x818]
push 0x100b280
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push dword [ebp - 0x820]
call esi
pop ecx
pop ecx
test ebx, ebx
je 0x104a559
push dword [ebp - 0x818]
push 0x100b280
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100b27c
call esi
pop ecx
pop ecx
jmp 0x104a56b
inc edi
cmp byte [edi], 0x20
je 0x104a56a
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x104a575
sub eax, edx
add eax, edi
jmp 0x104a58b
dec eax
cmp byte [eax], 0x20
jne 0x104a58f
mov byte [eax], 0
cmp edi, eax
jb 0x104a582
push 0x100b278
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 0x104a63d
push dword [ebp - 0x818]
push 0x100b280
call esi
push 0x2c
push edi
call dword [sym.imp.msvcrt.dll_strchr]
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x104a63d
push 0x3d
push ebx
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
jne 0x104a63d
lea eax, [ebx + 1]
cmp byte [eax], 0x20
mov dword [ebp - 0x820], eax
jne 0x104a603
inc eax
cmp byte [eax], 0x20
je 0x104a5ef
mov dword [ebp - 0x820], eax
jmp 0x104a603
dec ebx
cmp byte [ebx], 0x20
jne 0x104a60a
mov byte [ebx], 0
cmp edi, ebx
jb 0x104a5fd
push dword [ebp - 0x818]
push edi
call esi
push dword [ebp - 0x818]
push 0x100b280
call esi
push dword [ebp - 0x818]
push 0x100b274
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 0x104a660
push dword [ebp - 0x818]
push 0x100b280
call esi
pop ecx
pop ecx
push dword [ebp - 0x818]
push 0x100b270
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 0x104a492
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 0x104a6cc
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x4d9013e
jmp 0x104a6ea
mov eax, 0x8007000d
push eax
mov edi, eax
push 0x488013e
jmp 0x104a6ea
push dword [ebp - 0x834]
lea eax, [ebp - 0x814]
push eax
call fcn.01091af5
mov edi, eax
test edi, edi
je 0x104a6f1
push edi
push 0x4dd013e
call fcn.0108c55a
jmp 0x104a708
and dword [ebp - 0x830], 0
jmp 0x104a708
push 1
push 1
push 0x452013e
call fcn.0108c577
mov esi, dword [sym.imp.msvcrt.dll_fclose]
xor ebx, ebx
cmp dword [ebp - 0x81c], ebx
je 0x104a721
push dword [ebp - 0x81c]
call esi
pop ecx
cmp dword [ebp - 0x818], ebx
je 0x104a732
push dword [ebp - 0x818]
call esi
pop ecx
cmp dword [ebp - 0x830], ebx
je 0x104a747
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 0x104a75d
push dword [ebp - 0x828]
call esi
cmp dword [ebp - 0x824], ebx
je 0x104a76d
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.01077dc7
leave
ret 8