Function at 0x401553
Capabilities:
Get file attributes
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
xor eax, eax
push esi
push edi
mov word [ebp - 0x20], ax
lea edi, [ebp - 0x1e]
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x50], ebx
lea edi, [ebp - 0x4c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x62656e66
stosd dword es:[edi], eax
mov esi, 0x208
push esi
xor eax, eax
mov dword [ebp - 0x2c], ebx
lea edi, [ebp - 0x28]
push 1
mov byte [ebp - 1], 0
stosd dword es:[edi], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, ebx
je 0x40172a
push esi
push ebx
mov ebx, dword [sym.imp.ntoskrnl.exe_memset]
push edi
call ebx
mov dword [ebp - 0x1c], edi
add esp, 0xc
lea esi, [ebp - 0x20]
mov edi, 0x4083d8
mov dword [ebp - 0x20], 0x2080000
call fcn.00403093
push dword [ebp - 0x1c]
call fcn.00402e03
xor esi, esi
mov dword [ebp - 0xc], eax
cmp eax, esi
je 0x4016cb
xor eax, eax
push 5
mov dword [ebp - 0x38], esi
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
push 0x18
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x14], esi
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
test eax, eax
js 0x4016cb
cmp dword [ebp - 0x44], esi
jg 0x4016cb
mov esi, dword [ebp - 0x48]
jl 0x40162a
cmp esi, 0x400000
jae 0x4016cb
mov edi, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
push 0x62656e66
mov dword [ebp - 0x18], esi
add esi, 0x40
push esi
push 1
call edi
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4016cb
push esi
push 0
push eax
call ebx
add esp, 0xc
push 0x62656e66
mov esi, 0x2000
push esi
push 1
call edi
mov dword [ebp - 8], eax
test eax, eax
je 0x4016cb
push esi
xor edi, edi
push edi
push eax
call ebx
jmp 0x401696
mov eax, dword [ebp - 0x28]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ntoskrnl.exe_memcpy]
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x38], eax
add esp, 0xc
push esi
push edi
push dword [ebp - 8]
call ebx
add esp, 0xc
push edi
lea eax, [ebp - 0x38]
push eax
push esi
push dword [ebp - 8]
lea eax, [ebp - 0x2c]
push eax
push edi
push edi
push edi
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwReadFile]
cmp eax, edi
jge 0x401673
cmp eax, 0xc0000011
jne 0x4016cb
mov byte [ebp - 1], 1
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
push 0x62656e66
push dword [ebp - 0x24]
call esi
xor ebx, ebx
mov edi, 0x62656e66
cmp dword [ebp - 8], ebx
je 0x4016ed
push edi
push dword [ebp - 8]
call esi
cmp dword [ebp - 0xc], ebx
je 0x4016fb
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwClose]
cmp byte [ebp - 1], bl
jne 0x40170b
cmp dword [ebp - 0x10], ebx
je 0x40172a
push edi
push dword [ebp - 0x10]
jmp 0x401728
mov ecx, dword [ebp - 0x10]
mov eax, dword [0x4070e4]
mov dword [0x4070e4], ecx
mov ecx, dword [ebp - 0x18]
mov dword [0x4070f0], ecx
cmp eax, ebx
je 0x40172a
push edi
push eax
call esi
pop edi
pop esi
pop ebx
leave
ret