Function at 0x16630
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 0x1666e
push 0xc
push 1
call esi
mov esi, eax
test esi, esi
jne 0x1667c
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 0x16a35
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 0x169eb
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 0x169f0
mov eax, dword [ebp + 8]
push eax
call fcn.000164e0
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 0x16770
cmp edi, 0xc0000004
jne 0x167b9
test esi, esi
je 0x1677d
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 0x167b2
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 0x16760
mov edi, 0xc000009a
jmp 0x167c5
cmp edi, 0x80000006
je 0x16945
mov byte [ebp - 0xc], 0
test edi, edi
jl 0x169a0
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 0x167e0
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 0x169af
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 0x16812
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 0x16840
mov edi, ebx
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x16856
mov eax, dword [0x1c89c]
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 0x16870
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 0x168ee
mov eax, dword [esi + 0x3c]
cmp eax, 2
jne 0x168b2
cmp word [edi], 0x2e
je 0x16926
cmp eax, 4
jne 0x168c4
cmp word [edi], 0x2e
jne 0x168c4
cmp word [esi + 0x42], 0x2e
je 0x16926
push 0xc
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
test eax, eax
je 0x169bf
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 0x16926
mov eax, dword [ebp - 0x1c]
push 4
push 0x100080
push eax
mov dword [ebp - 0x10], 0
call fcn.000162c0
mov edi, eax
test edi, edi
je 0x1691b
push edi
call fcn.00016140
push edi
mov dword [ebp - 0x10], eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov edi, dword [ebp - 0x10]
test edi, edi
jl 0x169d6
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
test ebx, ebx
je 0x16750
push 0
push ebx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x16750
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ecx, dword [ebp + 8]
push ecx
call fcn.000163d0
mov edi, eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
test edi, edi
jl 0x16987
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 0x166c0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x16959
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x16959
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edi, 0xc000009a
jmp 0x16959
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
mov edi, 0xc000009a
jmp 0x16959
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0
push ebx
call esi
jmp 0x16959
mov edi, 0xc0000101
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x18]
cmp eax, edx
je 0x16a38
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 0x16a00
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