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

Disassembly:
push 0x54
mov eax, 0x10e4799
call fcn.01001f95
mov esi, dword [ebp + 8]
mov eax, dword [esi + 8]
test eax, eax
jne 0x10c95ae
mov eax, 0x80004005
call fcn.01001fcf
ret 8
mov ecx, dword [ebp + 0xc]
mov eax, 0x409
mov word [ecx], ax
mov eax, dword [0x10f52cc]
mov ebx, 0x10f52cc
mov edi, 0x10434c0
cmp eax, ebx
je 0x10c95e8
cmp byte [eax + 0x19], 4
jb 0x10c95e8
push dword [esi + 4]
push edi
push 0xc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f7e8
mov eax, dword [0x10f52cc]
cmp byte [0x10fd6f4], 0
jne 0x10c961d
push 0x102f9e8
mov byte [0x10fd6f4], 1
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10c9618
push 0x10c9ba8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10fd6f0], eax
mov eax, dword [0x10f52cc]
cmp dword [0x10fd6f0], 0
jne 0x10c9646
cmp eax, ebx
je 0x10c963e
cmp byte [eax + 0x19], 3
jb 0x10c963e
push edi
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f7c2
xor eax, eax
inc eax
jmp 0x10c95a6
lea ecx, [ebp - 0x60]
call fcn.0100ad56
and dword [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.0100ad56
push 0x5c
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.010c934d
mov edi, eax
lea ecx, [ebp - 0x60]
cmp edi, 0xffffffff
je 0x10c9704
lea eax, [edi + 1]
push eax
push esi
call fcn.010c9547
mov dword [ebp - 0x20], eax
test eax, eax
jge 0x10c96cc
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c96aa
cmp byte [eax + 0x19], 2
jb 0x10c96aa
push dword [ebp - 0x20]
push 0x10434c0
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010a4e26
mov esi, dword [ebp - 0x20]
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0
call fcn.0100a77d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.0100a77d
mov eax, esi
jmp 0x10c95a6
push edi
push esi
lea ecx, [ebp - 0x4c]
call fcn.0104387c
mov esi, eax
test esi, esi
jge 0x10c9778
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c96ad
cmp byte [eax + 0x19], 2
jb 0x10c96ad
push esi
push 0x10434c0
push 0xf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010a4e26
jmp 0x10c96ad
push esi
call fcn.010c942a
mov esi, eax
test esi, esi
jge 0x10c9729
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c96ad
cmp byte [eax + 0x19], 2
jb 0x10c96ad
push esi
push 0x10434c0
push 0x10
jmp 0x10c96f7
mov esi, 0x104
push esi
lea ecx, [ebp - 0x4c]
call fcn.0101d69e
test eax, eax
jne 0x10c9761
mov eax, dword [0x10f52cc]
mov esi, 0x80004005
cmp eax, ebx
je 0x10c96ad
cmp byte [eax + 0x19], 2
jb 0x10c96ad
push esi
push 0x10434c0
push 0x11
jmp 0x10c96f7
push esi
push eax
push 0x10c9b84
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x4c]
call fcn.0101d6f2
lea eax, [ebp - 0x1c]
push eax
xor esi, esi
push esi
lea eax, [ebp - 0x14]
push eax
push 0x34
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x1c], esi
call dword [0x10fd6f0]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jne 0x10c97e8
call edi
cmp eax, esi
jle 0x10c97ab
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jge 0x10c97e8
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c96ad
cmp byte [eax + 0x19], 2
jb 0x10c96ad
push esi
call edi
push eax
mov eax, dword [0x10f52cc]
push 0x10434c0
push 0x12
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f679
jmp 0x10c96ad
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0100f31c
mov esi, eax
pop ecx
mov dword [ebp - 0x20], esi
test esi, esi
jne 0x10c9832
mov eax, dword [0x10f52cc]
mov esi, 0x8007000e
cmp eax, ebx
je 0x10c96ad
cmp byte [eax + 0x19], 2
jb 0x10c96ad
push esi
push 0x10434c0
push 0x13
jmp 0x10c96f7
lea eax, [ebp - 0x1c]
push eax
push esi
lea eax, [ebp - 0x14]
push eax
push 0x34
call dword [0x10fd6f0]
test eax, eax
jne 0x10c988e
push esi
call fcn.0100f30b
pop ecx
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c9877
cmp byte [eax + 0x19], 2
jb 0x10c9877
call edi
push eax
mov eax, dword [0x10f52cc]
push 0x10434c0
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010a4e26
call edi
test eax, eax
jle 0x10c9887
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x10c96ad
lea ecx, [ebp - 0x38]
call fcn.0100ad56
xor edi, edi
mov byte [ebp - 4], 2
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x18], edi
cmp dword [ebp - 0x14], edi
jbe 0x10c99ca
mov eax, dword [ebp - 0x20]
push 0x10
lea ebx, [eax + edi*2]
push 0
push ebx
call dword [sym.imp.msvcrt.dll_wcstol]
movzx esi, ax
mov eax, 0x409
add esp, 0xc
cmp ax, si
jne 0x10c98d1
mov byte [ebp - 0xd], 1
push dword [ebp - 0x5c]
movzx eax, si
push eax
push dword [ebp - 0x48]
lea eax, [ebp - 0x38]
push 0x10c9b64
push eax
call fcn.0104c71d
add esp, 0x14
mov dword [ebp - 0x24], eax
test eax, eax
jl 0x10c997b
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10c9910
test eax, 0x1010
je 0x10c99bf
mov ecx, dword [0x10f52cc]
cmp ecx, 0x10f52cc
je 0x10c9954
cmp byte [ecx + 0x19], 4
jb 0x10c9954
cmp eax, 0xffffffff
jne 0x10c9930
mov eax, 0x10c9b50
jmp 0x10c993e
test al, 0x10
mov eax, 0x10c9b28
jne 0x10c993e
mov eax, 0x10c9b0c
push eax
push dword [ebp - 0x34]
push 0x10434c0
push 0x16
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0106f855
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10c9959
sub eax, edx
sar eax, 1
inc dword [ebp - 0x18]
lea edi, [edi + eax + 1]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x14]
jae 0x10c99c5
jmp 0x10c98ac
mov eax, dword [0x10f52cc]
cmp eax, 0x10f52cc
je 0x10c99a2
cmp byte [eax + 0x19], 2
jb 0x10c99a2
push dword [ebp - 0x34]
push 0x10434c0
push 0x15
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f7e8
push dword [ebp - 0x20]
call fcn.0100f30b
pop ecx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.0100a77d
mov esi, dword [ebp - 0x24]
jmp 0x10c96ad
mov eax, dword [ebp + 0xc]
mov word [eax], si
mov ebx, 0x10f52cc
push dword [ebp - 0x20]
call fcn.0100f30b
mov eax, dword [ebp - 0x18]
pop ecx
cmp eax, dword [ebp - 0x14]
jb 0x10c9a94
cmp byte [ebp - 0xd], 0
je 0x10c99f9
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.0100a77d
xor esi, esi
inc esi
jmp 0x10c96ad
push dword [ebp - 0x5c]
lea eax, [ebp - 0x38]
push 0x409
push dword [ebp - 0x48]
push 0x10c9b64
push eax
call fcn.0104c71d
mov esi, eax
add esp, 0x14
test esi, esi
jge 0x10c9a50
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c9a3f
cmp byte [eax + 0x19], 2
jb 0x10c9a3f
push dword [ebp - 0x34]
push 0x10434c0
push 0x17
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f7e8
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.0100a77d
jmp 0x10c96ad
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10c9a94
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c99e5
cmp byte [eax + 0x19], 4
jb 0x10c99e5
push 0x10c9b50
push dword [ebp - 0x34]
push 0x10434c0
push 0x18
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f855
jmp 0x10c99e5
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c9ab8
cmp byte [eax + 0x19], 4
jb 0x10c9ab8
push dword [ebp - 0x34]
push 0x10434c0
push 0x19
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f7e8
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
call fcn.010c942a
mov esi, eax
test esi, esi
jge 0x10c9af8
mov eax, dword [0x10f52cc]
cmp eax, ebx
je 0x10c9a3f
cmp byte [eax + 0x19], 2
jb 0x10c9a3f
push 0x10434c0
push 0x1a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f7c2
jmp 0x10c9a3f
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.0100a77d
xor esi, esi
jmp 0x10c96ad