Function at 0x1008c77
Capabilities:
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov al, byte [ebp + 0xc]
mov ecx, dword [ebp + 8]
not al
movzx eax, al
and eax, 0x10
push esi
shl eax, 0x11
or eax, 0x4001
push eax
push 1
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x3c]
push eax
xor esi, esi
push 0x100001
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x3c], 0x18
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], 0x40
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
call dword [sym.imp.ntdll.dll_NtOpenFile]
cmp eax, esi
mov dword [ebp - 4], eax
jl 0x1008e74
mov eax, dword [ebp + 0x1c]
push edi
mov edi, dword [ebp + 0x18]
push 1
push esi
push esi
push 3
add eax, 0xfffffffe
push eax
push edi
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x24]
push eax
push esi
push esi
push esi
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtQueryDirectoryFile]
cmp eax, esi
mov dword [ebp - 4], eax
jl 0x1008e5e
push ebx
cmp dword [ebp - 4], 0x103
jne 0x1008d2b
push esi
push 1
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov eax, dword [ebp - 0x24]
cmp eax, esi
mov dword [ebp - 4], eax
jl 0x1008e5d
lea eax, [edi + 0x3c]
mov dword [ebp - 0xc], eax
mov eax, dword [eax]
shr eax, 1
lea eax, [edi + eax*2 + 0x5e]
mov cx, word [eax]
mov word [eax], si
lea eax, [edi + 0x5e]
push eax
mov dword [ebp + 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
mov word [ebp - 0x10], cx
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov eax, dword [ebp + 8]
xor esi, esi
mov si, word [eax]
add si, word [ebp - 0x1c]
inc esi
inc esi
movzx eax, si
add eax, 0x14
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x100f50f
push dword [ebp + 8]
lea eax, [ebx + 8]
and word [eax], 0
lea ecx, [ebx + 0x10]
push eax
mov word [ebx + 0xa], si
mov dword [ebx + 0xc], ecx
call dword [sym.imp.ntdll.dll_RtlCopyUnicodeString]
push 0x1009164
lea esi, [ebx + 8]
push esi
call dword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.ntdll.dll_RtlAppendUnicodeStringToString]
mov eax, dword [edi + 0x38]
test al, 0x10
je 0x1009168
push 0x1005f48
push dword [ebp + 0x1c]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x1008de7
push 0x1008e4c
push dword [ebp + 0x1c]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
mov byte [ebp + 0x1f], 0
jne 0x1008deb
mov byte [ebp + 0x1f], 1
test byte [ebp + 0xc], 2
je 0x10091ee
test byte [ebp + 0xc], 4
je 0x10091d4
cmp byte [ebp + 0x1f], 0
je 0x10091d4
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
jl 0x10091e7
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov cx, word [ebp - 0x10]
shr eax, 1
mov word [edi + eax*2 + 0x5e], cx
mov eax, dword [edi]
test eax, eax
je 0x1008e52
add edi, eax
lea eax, [edi + 0x3c]
mov dword [ebp - 0xc], eax
mov eax, dword [eax]
shr eax, 1
lea eax, [edi + eax*2 + 0x5e]
mov cx, word [eax]
and word [eax], 0
jmp 0x1008d3f
xor esi, esi
cmp dword [ebp - 4], esi
jge 0x10091a8
pop ebx
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 4], 0x80000006
pop edi
jne 0x1008e74
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop esi
leave
ret 0x1c
test byte [ebp + 0xc], 1
je 0x1008e09
push dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [ebp + 0x10]
mov dword [ebp - 4], eax
jmp 0x1008e09
push esi
push esi
push esi
push 3
push dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push dword [ebp + 0x18]
push eax
push esi
push esi
push esi
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtQueryDirectoryFile]
cmp eax, esi
mov dword [ebp - 4], eax
jl 0x10091e7
mov edi, dword [ebp + 0x18]
xor esi, esi
jmp 0x1008d08
push dword [ebp + 0x14]
lea eax, [ebp - 0x1c]
push dword [edi + 0x38]
push eax
push esi
call dword [ebp + 0x10]
mov dword [ebp - 4], eax
jmp 0x10091ee
xor esi, esi
jmp 0x1008e5d
cmp byte [ebp + 0x1f], 0
jne 0x1008e09
test byte [ebp + 0xc], 8
je 0x1008e09
mov ecx, dword [ebp + 0x20]
mov eax, dword [ecx + 4]
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov dword [ecx + 4], ebx
jmp 0x1008e10
mov dword [ebp - 4], 0xc000009a
jmp 0x1008e52