Function at 0x60140a10
Capabilities:
Check if file exists
Get common file path
Query environment variable

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x6014b93d
push eax
mov dword fs:[0], esp
sub esp, 0x52c
push ebx
mov ebx, dword [esp + 0x540]
mov ecx, dword [ebx]
mov eax, dword [ecx - 0xc]
test eax, eax
jne 0x60140a59
mov eax, 0x80004005
pop ebx
mov ecx, dword [esp + 0x52c]
mov dword fs:[0], ecx
add esp, 0x538
ret 4
test eax, eax
push esi
jl 0x60140ada
push str.___
push ecx
call dword [sym.imp.MSVCR71.dll__mbsstr]
add esp, 8
test eax, eax
je 0x60140ada
mov ecx, dword [ebx]
sub eax, ecx
mov dword [esp + 0xc], eax
jne 0x60140ada
mov eax, str.___
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x60140a83
mov ecx, dword [ecx - 0xc]
sub eax, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x10]
push eax
mov ecx, ebx
call fcn.6011b230
push eax
mov ecx, ebx
mov dword [esp + 0x540], 0
call fcn.6010a570
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0x53c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x60140ada
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [ebx]
lea edx, [esp + 0x124]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x60140ae5
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesA]
lea eax, [esp + 0x128]
push eax
call edi
push 0x104
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x130]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea eax, [esp + 0x24]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x60140b20
sub eax, edx
push eax
lea eax, [esp + 0x28]
push eax
mov ecx, ebx
call fcn.60104370
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
lea eax, [esp + 0x24]
je 0x60140b6d
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x60140b50
sub eax, edx
push eax
lea edx, [esp + 0x28]
push edx
mov ecx, ebx
call fcn.60104370
xor eax, eax
jmp 0x60140edf
push ebp
push eax
lea ecx, [esp + 0x14]
call fcn.601045b0
mov esi, dword [sym.imp.MSVCR71.dll__mbsrchr]
mov ebp, 1
mov dword [esp + 0x544], ebp
mov bl, 2
lea esp, [esp]
mov ecx, dword [esp + 0x10]
push 0x20
push ecx
call esi
xor ecx, ecx
add esp, 8
cmp eax, ecx
je 0x60140c97
sub eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x60140c97
push eax
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
call fcn.601144e0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x548], bl
call fcn.6010a570
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x544], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x60140bf9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 4]
add eax, 0xfffffff0
cmp ecx, ebp
jle 0x60140c1b
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x14]
call fcn.60104220
mov ecx, dword [esp + 0x10]
lea eax, [ecx - 0x10]
dec dword [eax + 0xc]
jne 0x60140c27
mov dword [eax + 0xc], 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call edi
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 4]
add eax, 0xfffffffc
test ecx, ecx
jge 0x60140c43
inc ecx
mov dword [eax], ecx
jne 0x60140c43
mov dword [eax], ebp
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x60140b90
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x550]
call fcn.6010a570
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x544], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x60140c90
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x60140ede
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
push 0x104
lea eax, [esp + 0x234]
push eax
mov bl, 3
push str.Path
mov byte [esp + 0x550], bl
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea ecx, [esp + 0x18]
push ecx
push 0x601504f8
lea edx, [esp + 0x238]
push edx
call fcn.60140610
push 0x104
lea eax, [esp + 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x104
lea ecx, [esp + 0x338]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edx, [esp + 0x334]
push edx
lea ecx, [esp + 0x18]
call fcn.601045b0
mov eax, dword [eax]
push ebp
push eax
push 0
lea ecx, [esp + 0x24]
mov byte [esp + 0x550], 4
call fcn.601404a0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x544], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x60140d52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x438]
push eax
lea ecx, [esp + 0x18]
call fcn.601045b0
mov eax, dword [eax]
push ebp
push eax
push 0
lea ecx, [esp + 0x24]
mov byte [esp + 0x550], 5
call fcn.601404a0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x544], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x60140d9f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
xor edi, edi
test eax, eax
jbe 0x60140e61
lea ecx, [ecx]
mov eax, dword [0x6015b6f8]
mov ecx, 0x6015b6f8
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
cmp edi, dword [esp + 0x1c]
mov byte [esp + 0x544], 6
jae 0x60140ef9
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + edi*4]
lea edx, [esp + 0x12c]
push edx
push eax
lea ecx, [esp + 0x1c]
call fcn.60126fd0
mov esi, dword [esp + 0x14]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push esi
call ebp
test eax, eax
jne 0x60140f03
cmp edi, dword [esp + 0x1c]
jae 0x60140ef9
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + edi*4]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.60126fd0
mov esi, dword [esp + 0x14]
push esi
call ebp
test eax, eax
jne 0x60140f03
lea eax, [esi - 0x10]
mov byte [esp + 0x544], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x60140e54
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
inc edi
cmp edi, eax
jb 0x60140db0
mov edi, dword [esp + 0x18]
test edi, edi
mov byte [esp + 0x544], 1
je 0x60140eb0
xor esi, esi
test eax, eax
mov ebp, eax
jbe 0x60140ea6
lea esp, [esp]
mov eax, dword [edi + esi*4]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x60140e9d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
inc esi
cmp esi, ebp
jb 0x60140e80
mov edi, dword [esp + 0x18]
push edi
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x544], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x60140ed9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 0x80004005
pop ebp
mov ecx, dword [esp + 0x538]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x538
ret 4
push 0x80070057
call fcn.601040a0
mov ecx, dword [esp + 0x54c]
lea eax, [esp + 0x14]
push eax
call fcn.6010a570
lea eax, [esi - 0x10]
mov byte [esp + 0x544], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x60140f35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x18]
call fcn.6010a7a0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x544], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x60140c86