Function at 0x12ae0
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 0x12b1e
push 0xc
push 1
call esi
mov esi, eax
test esi, esi
jne 0x12b2c
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 0x12eba
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 0x12e76
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 0x12e7b
mov eax, dword [ebp + 8]
push eax
call fcn.00012990
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 0x12c20
cmp edi, 0xc0000004
jne 0x12c69
test esi, esi
je 0x12c2d
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 0x12c62
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 0x12c10
mov edi, 0xc000009a
jmp 0x12c75
cmp edi, 0x80000006
je 0x12dd0
mov byte [ebp - 0xc], 0
test edi, edi
jl 0x12e2b
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 0x12c90
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 0x12e3a
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 0x12cc2
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 0x12cf0
mov edi, ebx
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x12d06
mov eax, dword [0x172d4]
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 0x12d20
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 0x12d9e
mov eax, dword [esi + 0x3c]
cmp eax, 2
jne 0x12d62
cmp word [edi], 0x2e
je 0x12db1
cmp eax, 4
jne 0x12d74
cmp word [edi], 0x2e
jne 0x12d74
cmp word [esi + 0x42], 0x2e
je 0x12db1
push 0xc
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
test eax, eax
je 0x12e4a
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 0x12db1
mov eax, dword [ebp - 0x18]
push eax
call fcn.00012810
mov edi, eax
test edi, edi
jl 0x12e61
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
test ebx, ebx
je 0x12c00
push 0
push ebx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x12c00
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ecx, dword [ebp + 8]
push ecx
call fcn.00012880
mov edi, eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
test edi, edi
jl 0x12e12
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 0x12b70
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x12de4
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x12de4
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edi, 0xc000009a
jmp 0x12de4
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
mov edi, 0xc000009a
jmp 0x12de4
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
jmp 0x12de4
mov edi, 0xc0000101
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
cmp eax, edx
je 0x12ebd
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 0x12e85
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