Function at 0x184c0
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
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 0x184fe
push 0xc
push 1
call esi
mov esi, eax
test esi, esi
jne 0x1850c
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 - 0x14]
mov dword [ebp - 0x10], edx
mov eax, edx
mov dword [ebp - 0x14], eax
mov dword [esi + 8], edi
mov eax, dword [ebp - 0x14]
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 - 0x14], eax
cmp esi, edx
je 0x1889a
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], eax
mov dword [ecx + 4], edx
cmp dword [ebp - 8], eax
je 0x18856
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [ecx + 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], eax
mov eax, dword [eax + 8]
push eax
lea ecx, [ebp - 0x1c]
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 - 0x24]
push eax
lea ecx, [ebp - 0x3c]
lea edx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x34], edx
push 0x100018
lea edx, [ebp + 8]
push edx
mov dword [ebp - 0x3c], 0x18
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], 0x240
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
call dword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov edi, eax
cmp edi, esi
jl 0x1885b
mov eax, dword [ebp + 8]
push eax
call fcn.00018370
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 0x18600
cmp edi, 0xc0000004
jne 0x18649
test esi, esi
je 0x1860d
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 0x18642
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 - 0x24]
push edx
push 0
push 0
push 0
push eax
call dword [sym.imp.ntoskrnl.exe_ZwQueryDirectoryFile]
mov edi, eax
jmp 0x185f0
mov edi, 0xc000009a
jmp 0x18655
cmp edi, 0x80000006
je 0x187b0
mov byte [ebp - 0xc], 0
test edi, edi
jl 0x1880b
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 0x18670
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 0x1881a
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 0x186a2
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 0x186d0
mov edi, ebx
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x186e6
mov eax, dword [0x20784]
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 0x18700
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 - 0x1c]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
test byte [esi + 0x38], 0x10
je 0x1877e
mov eax, dword [esi + 0x3c]
cmp eax, 2
jne 0x18742
cmp word [edi], 0x2e
je 0x18791
cmp eax, 4
jne 0x18754
cmp word [edi], 0x2e
jne 0x18754
cmp word [esi + 0x42], 0x2e
je 0x18791
push 0xc
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
test eax, eax
je 0x1882a
mov dword [eax + 8], ebx
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [ecx + 4], eax
xor ebx, ebx
mov dword [ebp - 0x14], eax
jmp 0x18791
mov eax, dword [ebp - 0x18]
push eax
call fcn.000181f0
mov edi, eax
test edi, edi
jl 0x18841
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
test ebx, ebx
je 0x185e0
push 0
push ebx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x185e0
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ecx, dword [ebp + 8]
push ecx
call fcn.00018260
mov edi, eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
test edi, edi
jl 0x187f2
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 - 0x14]
lea ecx, [ebp - 0x14]
cmp eax, ecx
jne 0x18550
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x187c4
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x187c4
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edi, 0xc000009a
jmp 0x187c4
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
mov edi, 0xc000009a
jmp 0x187c4
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
jmp 0x187c4
mov edi, 0xc0000101
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
cmp eax, edx
je 0x1889d
mov ebx, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov esi, eax
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x14]
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 - 0x14]
lea ecx, [ebp - 0x14]
cmp eax, ecx
jne 0x18865
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