Function at 0x18480
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 0x184be
push 0xc
push 1
call esi
mov esi, eax
test esi, esi
jne 0x184cc
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 0x1885a
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 0x18816
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 0x1881b
mov eax, dword [ebp + 8]
push eax
call fcn.00018330
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 0x185c0
cmp edi, 0xc0000004
jne 0x18609
test esi, esi
je 0x185cd
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 0x18602
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 0x185b0
mov edi, 0xc000009a
jmp 0x18615
cmp edi, 0x80000006
je 0x18770
mov byte [ebp - 0xc], 0
test edi, edi
jl 0x187cb
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 0x18630
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 0x187da
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 0x18662
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 0x18690
mov edi, ebx
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x186a6
mov eax, dword [0x2077c]
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 0x186c0
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 0x1873e
mov eax, dword [esi + 0x3c]
cmp eax, 2
jne 0x18702
cmp word [edi], 0x2e
je 0x18751
cmp eax, 4
jne 0x18714
cmp word [edi], 0x2e
jne 0x18714
cmp word [esi + 0x42], 0x2e
je 0x18751
push 0xc
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
test eax, eax
je 0x187ea
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 0x18751
mov eax, dword [ebp - 0x18]
push eax
call fcn.000181b0
mov edi, eax
test edi, edi
jl 0x18801
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
test ebx, ebx
je 0x185a0
push 0
push ebx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x185a0
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ecx, dword [ebp + 8]
push ecx
call fcn.00018220
mov edi, eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
test edi, edi
jl 0x187b2
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 0x18510
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x18784
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x18784
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edi, 0xc000009a
jmp 0x18784
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
mov edi, 0xc000009a
jmp 0x18784
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
jmp 0x18784
mov edi, 0xc0000101
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
cmp eax, edx
je 0x1885d
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 0x18825
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