Function at 0x10081d90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a8
mov eax, dword [0x103b1004]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [ebp + 8], 0
mov eax, 0x2200000
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x294], 0
push 0
mov ecx, 0x2000000
mov dword [ebp - 0x290], esi
cmovne eax, ecx
xorps xmm0, xmm0
push eax
push 3
push 0
push 0
push 0x80
push esi
mov ebx, edx
movlpd qword [ebp - 0x29c], xmm0
mov dword [ebp - 0x2a4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x2a0], edi
cmp edi, 0xffffffff
jne 0x1008200f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2a8], eax
cmp eax, 0x57
ja 0x10081fab
je 0x10081f68
cmp eax, 5
je 0x10081e2b
cmp eax, 0x20
jne case.0x10081eff.2
mov edi, esi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10081e30
sub esi, ecx
sar esi, 1
je 0x10081eb5
mov eax, edi
movzx eax, word [eax + esi*2 - 2]
cmp eax, 0x5c
je 0x10081e52
cmp eax, 0x2f
jne 0x10081eb5
lea eax, [esi*2 + 2]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov edi, eax
lea eax, [esi + 1]
push esi
push dword [ebp - 0x290]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
sub esi, 1
je 0x10081e99
nop
movzx eax, word [edi + esi*2]
cmp eax, 0x5c
je 0x10081e8e
cmp eax, 0x2f
jne 0x10081e99
xor eax, eax
mov word [edi + esi*2], ax
sub esi, 1
jne 0x10081e80
test esi, esi
je 0x10081ea9
cmp esi, 1
jne 0x10081eb5
cmp word [edi + 2], 0x3a
jne 0x10081eb5
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x10081ee8
lea eax, [ebp - 0x28c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [ebp - 0x290]
mov dword [ebp - 0x294], eax
cmp esi, edi
je 0x10081ee3
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x294]
add esp, 4
cmp eax, 0xffffffff
jne 0x10081f06
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
add eax, 0xfffffffe
cmp eax, 0x41
ja case.0x10081eff.4
movzx eax, byte [eax + 0x10082288]
jmp dword [eax*4 + 0x10082280]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x298]
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x28c]
call fcn.10081d20
add esp, 4
test dword [ebp - 0x3c], 0x400
je 0x100821b1
cmp dword [ebp + 8], 0
jne case.0x10081eff.4
test dword [ebp - 0x298], 0x20000000
jne 0x100821b1
push dword [ebp - 0x2a8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push dword [ebp - 0x2a4]
push 3
push 0
push 3
push 0x80000080
push esi
call eax
mov edi, eax
mov dword [ebp - 0x2a0], edi
cmp edi, 0xffffffff
jne 0x1008200f
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
cmp eax, 0x780
jne case.0x10081eff.2
cmp dword [ebp + 8], 0
je 0x10081ff0
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x2200000
push 3
push 0
push 0
push 0x80
push esi
mov dword [ebp + 8], 0
mov dword [ebp - 0x294], 1
call eax
mov edi, eax
mov dword [ebp - 0x2a0], eax
cmp edi, 0xffffffff
jne 0x1008200f
push 0x780
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
cmp esi, 1
je 0x1008209b
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x10082035
call edi
test eax, eax
je 0x10082035
or ebx, 0xffffffff
jmp 0x1008222a
push dword [ebp - 0x290]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x68
push 0
push ebx
mov dword [ebp - 0x2a4], eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x2a4]
add esp, 0xc
cmp eax, 0xffffffff
je 0x10082071
test al, 0x10
je 0x10082071
mov eax, 0x4000
mov word [ebx + 0x10], ax
jmp 0x10082228
cmp esi, 2
jne 0x10082084
mov eax, 0x2000
mov word [ebx + 0x10], ax
jmp 0x10082228
cmp esi, 3
jne 0x10082228
mov eax, 0x1000
mov word [ebx + 0x10], ax
jmp 0x10082228
cmp dword [ebp + 8], 0
jne 0x1008215f
push 8
lea eax, [ebp - 0x29c]
push eax
push 9
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandleEx]
test eax, eax
jne 0x100820f2
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
sub eax, 1
je 0x100820dc
sub eax, 0x31
je 0x100820dc
sub eax, 0x25
je 0x100820dc
or ebx, 0xffffffff
mov edi, esi
jmp 0x1008222a
mov dword [ebp - 0x29c], 0x80
mov dword [ebp - 0x298], 0
jmp 0x10082165
test dword [ebp - 0x29c], 0x400
je 0x1008215f
test dword [ebp - 0x298], 0x20000000
je 0x1008212c
cmp dword [ebp - 0x294], 0
je 0x1008215f
push 0x780
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
or ebx, 0xffffffff
jmp 0x1008222a
cmp dword [ebp - 0x294], 0
jne 0x1008215f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x290]
mov edx, ebx
push 1
call fcn.10081d90
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x100821ab
call esi
sub eax, 1
je 0x10082193
sub eax, 0x31
je 0x10082193
sub eax, 0x25
je 0x10082193
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
or ebx, 0xffffffff
jmp 0x1008222a
push 0x68
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
mov eax, 0x6000
add esp, 0xc
mov word [ebx + 0x10], ax
jmp 0x10082222
mov esi, dword [ebp - 0x290]
mov edx, dword [ebp - 0x298]
lea ecx, [ebp - 0x3c]
push ebx
call fcn.101e8f10
add esp, 4
test byte [ebp - 0x3c], 0x10
jne 0x10082222
push 0x2e
push esi
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x10082222
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
push str..exe
push esi
call edi
add esp, 8
test eax, eax
je 0x1008221d
push str..bat
push esi
call edi
add esp, 8
test eax, eax
je 0x1008221d
push str..cmd
push esi
call edi
add esp, 8
test eax, eax
je 0x1008221d
push str..com
push esi
call edi
add esp, 8
test eax, eax
jne 0x10082222
or word [ebx + 0x10], 0x49
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
mov esi, dword [ebp - 0x2a0]
cmp esi, 0xffffffff
je 0x1008226d
test ebx, ebx
je 0x1008223f
call edi
mov edi, eax
jmp 0x10082241
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x10082262
or ebx, 0xffffffff
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x1008226d
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1024a596
mov esp, ebp
pop ebp
ret