Function at 0x1002e0e
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
movzx ecx, word [edi]
xor eax, eax
inc eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], ebx
cmp cx, 0x5c
je 0x100333b
push esi
mov esi, dword [sym.imp.msvcrt.dll_wcsrchr]
cmp cx, 0x24
jne 0x1002f1c
push 0x3a
push edi
call esi
pop ecx
pop ecx
test eax, eax
je 0x1002f1c
push 0x3a
push edi
call esi
pop ecx
inc eax
inc eax
pop ecx
mov ecx, eax
sub ecx, edi
dec ecx
dec ecx
push 0x1001234
sar ecx, 1
xor edx, edx
push eax
mov word [edi + ecx*2], dx
mov dword [ebp + 8], eax
call dword [sym.imp.SHLWAPI.dll_StrTrimW]
lea esi, [edi + 2]
push esi
call dword [sym.imp.msvcrt.dll__wgetenv]
mov edi, eax
pop ecx
cmp edi, ebx
je 0x1002fd0
push ebx
push esi
call fcn.01004462
add eax, 0xa
push eax
call fcn.0100457f
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x1003353
push eax
call fcn.01004628
shr eax, 1
push eax
push esi
push dword [ebp - 0x10]
call fcn.01004bf4
push ebx
push edi
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x100338f
push eax
call fcn.01004628
shr eax, 1
push eax
push edi
push dword [ebp - 4]
call fcn.01004bf4
cmp dword [ebp - 4], ebx
jne 0x1002faa
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.01004213
jmp 0x1003353
push 0x3a
push edi
call esi
pop ecx
pop ecx
cmp eax, ebx
je 0x1002fb7
inc eax
inc eax
mov ecx, eax
sub ecx, edi
dec ecx
dec ecx
push 0x1001234
sar ecx, 1
xor edx, edx
push eax
mov word [edi + ecx*2], dx
mov dword [ebp + 8], eax
call dword [sym.imp.SHLWAPI.dll_StrTrimW]
push ebx
push edi
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x100338f
push ebx
push edi
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x100338f
push dword [ebp - 4]
call fcn.01004628
shr eax, 1
push eax
push edi
push dword [ebp - 4]
call fcn.01004bf4
push dword [ebp - 4]
call fcn.01004628
shr eax, 1
push eax
push edi
push dword [ebp - 0x10]
call fcn.01004bf4
push 0x10012f0
push dword [ebp - 4]
jmp 0x1003305
push ebx
push dword [ebp - 4]
mov esi, 0x1001350
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp edi, ebx
jne 0x1003005
cmp dword [ebp + 0xc], ebx
jne 0x1002ff3
push esi
push 0x42
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 1
add eax, 0x40
push 1
push eax
call fcn.010059d1
add esp, 0x14
push 0x42
call fcn.01005b24
push eax
call fcn.010041ac
jmp 0x100338f
push ebx
push esi
call fcn.01004462
lea eax, [eax + eax + 2]
push eax
call fcn.0100457f
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x100302f
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.01004213
jmp 0x100338f
push eax
call fcn.01004628
shr eax, 1
push eax
push esi
push dword [ebp - 0x10]
call fcn.01004bf4
lea eax, [edi + edi + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x100305a
lea eax, [ebp - 4]
jmp 0x1003389
push eax
call fcn.01004628
shr eax, 1
push eax
mov edi, 0x1001348
push edi
push dword [ebp - 4]
call fcn.01004bf4
push dword [ebp - 0x20]
push ebx
push edi
call fcn.01004462
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x1002faa
cmp dword [ebp + 0xc], ebx
jne 0x10030b4
push esi
push 0x42
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 1
add eax, 0x40
push 1
push eax
call fcn.010059d1
add esp, 0x14
push 0x42
call fcn.01005b24
push eax
call fcn.010041ac
jmp 0x100334a
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10032ff
test al, 0x10
je 0x10032ff
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov esi, eax
cmp esi, ebx
je 0x1003193
lea eax, [esi + esi + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x100334a
lea ecx, [ebp - 0x1c]
push ecx
push eax
add esi, 5
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push ebx
push dword [ebp - 0xc]
push dword [ebp - 0x18]
call edi
mov esi, eax
lea eax, [esi + esi + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x1003341
add esi, 5
push esi
push eax
push dword [ebp - 0x18]
call edi
push ebx
push dword [ebp - 0xc]
call fcn.01004462
mov ecx, eax
mov eax, dword [ebp - 0xc]
cmp word [eax + ecx*2 - 2], 0x5c
jne 0x100318a
push ebx
push eax
call fcn.01004462
mov ecx, eax
mov eax, dword [ebp - 0xc]
cmp word [eax + ecx*2 - 4], 0x3a
je 0x100318a
push ebx
push eax
call fcn.01004462
mov edx, dword [ebp - 0xc]
xor ecx, ecx
mov word [edx + eax*2 - 2], cx
lea eax, [ebp - 0x18]
push eax
call fcn.0100485a
cmp dword [ebp - 8], ebx
je 0x1003217
push ebx
push dword [ebp - 8]
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x1003358
push eax
call fcn.01004628
mov ecx, dword [ebp - 0x14]
cmp eax, ebx
je 0x10031c9
mov byte [ecx], bl
inc ecx
dec eax
jne 0x10031c3
push dword [ebp - 0x14]
call fcn.01004628
shr eax, 1
push eax
push dword [ebp - 8]
push dword [ebp - 0x14]
call fcn.01004bf4
push dword [ebp - 0x14]
jmp 0x10031f7
push ebx
xor esi, esi
inc esi
push esi
push dword [ebp - 0xc]
push eax
call fcn.01004483
test eax, eax
je 0x1003202
push ebx
call fcn.01001f66
cmp eax, ebx
jne 0x10031e4
jmp 0x1003205
mov dword [ebp - 0x20], esi
lea eax, [ebp - 0x14]
push eax
call fcn.0100485a
cmp dword [ebp - 0x20], ebx
jne 0x10032d8
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.01002176
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x28], eax
call fcn.01004462
mov ecx, dword [ebp - 0x24]
lea eax, [ecx + eax + 0xa]
mov dword [ebp - 0x24], eax
add eax, eax
push eax
cmp dword [ebp - 8], ebx
je 0x1003264
lea eax, [ebp - 8]
push eax
call fcn.010048d5
test eax, eax
jne 0x100327f
lea eax, [ebp - 8]
push eax
call fcn.0100485a
mov dword [ebp - 8], ebx
jmp 0x100327f
call fcn.0100457f
push eax
mov dword [ebp - 8], eax
call fcn.01004628
mov ecx, dword [ebp - 8]
cmp eax, ebx
je 0x100327f
mov byte [ecx], bl
inc ecx
dec eax
jne 0x1003279
cmp dword [ebp - 8], ebx
je 0x100336f
push ebx
push dword [ebp - 8]
call fcn.01004462
push dword [ebp - 8]
test eax, eax
jne 0x10032ad
call fcn.01004628
shr eax, 1
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.01004bf4
jmp 0x10032c0
call fcn.01004628
shr eax, 1
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.01004c37
push dword [ebp - 8]
call fcn.01004628
shr eax, 1
push eax
push 0x1001344
push dword [ebp - 8]
call fcn.01004c37
push 0x10012f0
push ebx
call dword [sym.imp.msvcrt.dll_wcstok]
pop ecx
pop ecx
mov edi, eax
cmp dword [ebp - 0x28], ebx
jne 0x10032f4
mov dword [ebp - 0x2c], 1
lea eax, [ebp - 0xc]
push eax
call fcn.0100485a
jmp 0x100330f
push 0x10012f0
push ebx
call dword [sym.imp.msvcrt.dll_wcstok]
pop ecx
mov edi, eax
pop ecx
cmp edi, ebx
jne 0x10030c6
lea eax, [ebp - 4]
push eax
call fcn.0100485a
lea eax, [ebp - 8]
push eax
call fcn.0100485a
lea eax, [ebp - 0x10]
push eax
call fcn.0100485a
xor eax, eax
cmp dword [ebp - 0x2c], ebx
sete al
pop esi
pop edi
pop ebx
leave
ret 0x10
lea eax, [ebp - 0x18]
push eax
call fcn.0100485a
lea eax, [ebp - 4]
push eax
call fcn.0100485a
lea eax, [ebp - 0x10]
jmp 0x1003389
lea eax, [ebp - 4]
push eax
call fcn.0100485a
lea eax, [ebp - 0x10]
push eax
call fcn.0100485a
lea eax, [ebp - 8]
jmp 0x1003380
call fcn.01004213
lea eax, [ebp - 4]
push eax
call fcn.0100485a
lea eax, [ebp - 0x10]
push eax
call fcn.0100485a
lea eax, [ebp - 0xc]
push eax
call fcn.0100485a
xor eax, eax
inc eax
jmp 0x100333a