Function at 0x16380
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov ebx, dword [ebp + 8]
movzx eax, word [ebx]
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
push edi
add eax, 2
push eax
push 1
mov dword [ebp - 8], 0
call esi
mov edi, eax
test edi, edi
je 0x163be
push 0xc
push 1
call esi
mov esi, eax
test esi, esi
jne 0x163cc
push eax
push edi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
pop edi
pop esi
mov eax, 0xc000009a
pop ebx
mov esp, ebp
pop ebp
ret 4
movzx ecx, word [ebx]
mov edx, dword [ebx + 4]
push ecx
push edx
push edi
call sub.ntoskrnl.exe_memcpy
movzx eax, word [ebx]
shr eax, 1
xor ecx, ecx
mov word [edi + eax*2], cx
lea edx, [ebp - 0x18]
mov dword [ebp - 0x14], edx
mov eax, edx
mov dword [ebp - 0x18], eax
mov dword [esi + 8], edi
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
mov ecx, edx
mov dword [esi + 4], ecx
mov dword [eax + 4], esi
add esp, 0xc
mov eax, esi
mov dword [ebp - 0x18], eax
cmp esi, edx
je 0x16785
mov ecx, dword [eax]
lea edx, [ebp - 0x18]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], eax
mov dword [ecx + 4], edx
cmp dword [ebp - 8], eax
je 0x1673b
mov ecx, dword [ebp - 0x18]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [ecx + 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], eax
mov eax, dword [eax + 8]
push eax
lea ecx, [ebp - 0x20]
push ecx
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
xor esi, esi
push esi
push esi
push 0x20
push 1
push esi
push esi
push esi
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x38], edx
push 0x100018
lea edx, [ebp + 8]
push edx
mov dword [ebp - 0x40], 0x18
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x34], 0x240
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
call dword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov edi, eax
cmp edi, esi
jl 0x16740
mov eax, dword [ebp + 8]
push eax
call fcn.00016230
mov byte [ebp - 0xc], 1
lea esp, [esp]
xor esi, esi
lea ebx, [esi + 0x40]
mov edi, 0x80000005
lea ebx, [ebx]
cmp edi, 0x80000005
je 0x164c0
cmp edi, 0xc0000004
jne 0x16509
test esi, esi
je 0x164cd
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
add ebx, ebx
push ebx
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov esi, eax
test esi, esi
je 0x16502
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
push ecx
push 0
push 0
push 1
push ebx
push esi
lea edx, [ebp - 0x28]
push edx
push 0
push 0
push 0
push eax
call dword [sym.imp.ntoskrnl.exe_ZwQueryDirectoryFile]
mov edi, eax
jmp 0x164b0
mov edi, 0xc000009a
jmp 0x16515
cmp edi, 0x80000006
je 0x16695
mov byte [ebp - 0xc], 0
test edi, edi
jl 0x166f0
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 8]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x16530
sub eax, edx
mov edx, dword [esi + 0x3c]
sar eax, 1
lea eax, [edx + eax*2 + 4]
push eax
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov ebx, eax
test ebx, ebx
je 0x166ff
mov edi, dword [ebp - 4]
mov eax, dword [edi + 8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x16562
mov ecx, dword [esi + 0x3c]
sub eax, edx
sar eax, 1
lea edx, [ecx + eax*2 + 4]
push edx
push 0
push ebx
call sub.ntoskrnl.exe_memset
mov ecx, dword [edi + 8]
add esp, 0xc
mov edx, ebx
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x16590
mov edi, ebx
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x165a6
mov eax, dword [0x1c894]
mov dword [edi], eax
mov eax, ebx
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x165c0
mov ecx, dword [esi + 0x3c]
sub eax, edx
push ecx
sar eax, 1
lea edi, [esi + 0x40]
lea edx, [ebx + eax*2]
push edi
push edx
call sub.ntoskrnl.exe_memcpy
add esp, 0xc
push ebx
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
test byte [esi + 0x38], 0x10
je 0x1663e
mov eax, dword [esi + 0x3c]
cmp eax, 2
jne 0x16602
cmp word [edi], 0x2e
je 0x16676
cmp eax, 4
jne 0x16614
cmp word [edi], 0x2e
jne 0x16614
cmp word [esi + 0x42], 0x2e
je 0x16676
push 0xc
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
test eax, eax
je 0x1670f
mov dword [eax + 8], ebx
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x18]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [ecx + 4], eax
xor ebx, ebx
mov dword [ebp - 0x18], eax
jmp 0x16676
mov eax, dword [ebp - 0x1c]
push 4
push 0x100080
push eax
mov dword [ebp - 0x10], 0
call fcn.00016010
mov edi, eax
test edi, edi
je 0x1666b
push edi
call fcn.00015e90
push edi
mov dword [ebp - 0x10], eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov edi, dword [ebp - 0x10]
test edi, edi
jl 0x16726
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
test ebx, ebx
je 0x164a0
push 0
push ebx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x164a0
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ecx, dword [ebp + 8]
push ecx
call fcn.00016120
mov edi, eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
test edi, edi
jl 0x166d7
mov esi, dword [ebp - 4]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov ebx, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, dword [esi + 8]
push 0
push eax
call ebx
push 0
push esi
call ebx
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
cmp eax, ecx
jne 0x16410
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x166a9
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x166a9
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edi, 0xc000009a
jmp 0x166a9
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
mov edi, 0xc000009a
jmp 0x166a9
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
jmp 0x166a9
mov edi, 0xc0000101
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x18]
cmp eax, edx
je 0x16788
lea ebx, [ebx]
mov ebx, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov esi, eax
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x18]
mov dword [eax + 4], ecx
mov edx, dword [esi + 8]
push 0
push edx
call ebx
push 0
push esi
call ebx
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
cmp eax, ecx
jne 0x16750
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp + 8]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4