Function at 0x139f0
Capabilities:
Get file attributes
Print debug messages
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov al, byte [eax + 0x3ff]
xor ebx, ebx
push 0x139ba
mov byte [ebp - 1], al
mov byte [ebp - 8], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0x10], bl
call sub.ntoskrnl.exe_DbgPrint
mov dword [esp], 0x139c2
call sub.ntoskrnl.exe_DbgPrint
mov dword [esp], 0x139ee
call sub.ntoskrnl.exe_DbgPrint
cmp dword [0x2bbd0], ebx
pop ecx
je 0x13aab
cmp dword [0x2bbc0], ebx
je 0x13aab
cmp dword [0x2bbc8], ebx
je 0x13aab
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax*8 + 0x2b9c0]
mov eax, dword [eax*8 + 0x2b9c4]
cmp eax, 0x10
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
jl 0x13a6a
push 0x10
pop eax
push ecx
push eax
call fcn.0002a284
test al, al
je 0x13aab
mov edi, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov esi, 0x10000
push 0x546b6c42
push esi
push 1
call edi
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x13aab
push 0x546b6c42
push esi
push 1
call edi
cmp eax, ebx
mov dword [ebp - 0x1c], eax
jne 0x13ab4
push dword [ebp - 0x18]
call dword [sym.imp.ntoskrnl.exe_ExFreePool]
xor al, al
pop edi
pop esi
pop ebx
leave
ret 0x10
push 0xe
lea eax, [ebp - 0x2c]
push 8
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x2c], ebx
push eax
mov dword [ebp - 0x28], ebx
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwSetInformationFile]
test eax, eax
jl 0x13d59
mov al, byte [ebp + 8]
mov byte [ebp + 0x17], al
and byte [ebp + 0x17], 1
je 0x13aef
mov eax, dword [ebp + 0xc]
or byte [eax + 0x3ff], 1
jmp 0x13b0d
test al, 2
je 0x13aff
mov eax, dword [ebp + 0xc]
or byte [eax + 0x3ff], 2
jmp 0x13b0d
test al, 4
je 0x13b0d
mov eax, dword [ebp + 0xc]
or byte [eax + 0x3ff], 4
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp + 0xc]
call fcn.00016a10
push ebx
push ebx
push 0x400
lea eax, [ebp - 0x24]
push dword [ebp + 0xc]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwWriteFile]
test eax, eax
jl 0x13d59
test byte [ebp - 1], 1
mov eax, dword [0x2bbcc]
je 0x13b84
test byte [ebp - 1], 8
je 0x13b6d
mov esi, dword [0x2bbc4]
xor edi, edi
cmp esi, ebx
jle 0x13b84
mov ecx, dword [0x2bbc0]
mov cl, byte [ecx + edi]
add byte [ebp - 8], cl
inc edi
cmp edi, esi
jl 0x13b5a
jmp 0x13b84
xor esi, esi
cmp eax, ebx
jle 0x13b84
mov ecx, dword [0x2bbc8]
mov cl, byte [ecx + esi]
add byte [ebp - 8], cl
inc esi
cmp esi, eax
jl 0x13b73
test byte [ebp - 1], 2
je 0x13ba7
mov esi, dword [0x2bbd4]
xor edi, edi
cmp esi, ebx
jle 0x13ba7
mov ecx, dword [0x2bbd0]
mov cl, byte [ecx + edi]
add byte [ebp - 0x10], cl
inc edi
cmp edi, esi
jl 0x13b96
test byte [ebp - 1], 4
je 0x13bc4
xor esi, esi
cmp eax, ebx
jle 0x13bc4
mov ecx, dword [0x2bbc8]
mov cl, byte [ecx + esi]
add byte [ebp - 0xc], cl
inc esi
cmp esi, eax
jl 0x13bb3
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 0x18]
mov ecx, 0x100
push ebx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x1c]
push ebx
push 0x10000
lea eax, [ebp - 0x24]
push esi
push eax
push ebx
push ebx
push ebx
mov dword [ebp - 0x14], ebx
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwReadFile]
cmp eax, ebx
jl 0x13d1d
mov cl, byte [ebp + 8]
mov al, byte [ebp - 1]
or al, cl
mov byte [ebp + 0xb], cl
and byte [ebp + 0xb], 2
mov byte [ebp + 0xf], cl
and byte [ebp + 0xf], 4
mov byte [ebp - 1], al
and byte [ebp - 1], 4
mov byte [ebp - 2], al
and byte [ebp - 2], 2
mov byte [ebp - 3], al
and byte [ebp - 3], 1
cmp byte [ebp + 0x17], bl
mov edi, dword [ebp - 0x20]
je 0x13c3d
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp - 0x14]
push dword [ebp - 8]
push edi
push esi
call fcn.00010dca
cmp byte [ebp + 0xb], bl
je 0x13c4c
push dword [ebp - 0x10]
push edi
push esi
call fcn.00010e6a
cmp byte [ebp + 0xf], bl
je 0x13c5b
push dword [ebp - 0xc]
push edi
push esi
call fcn.00010e6a
cmp byte [ebp - 1], bl
je 0x13c6a
push dword [ebp - 0xc]
push edi
push esi
call fcn.00010d7a
cmp byte [ebp - 2], bl
je 0x13c79
push dword [ebp - 0x10]
push edi
push esi
call fcn.00010d7a
cmp byte [ebp - 3], bl
je 0x13c91
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp - 0x14]
push dword [ebp - 8]
push edi
push esi
call fcn.00010d96
push 0xe
lea eax, [ebp - 0x2c]
add dword [ebp - 0x14], edi
push 8
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
test eax, eax
jl 0x13aab
mov eax, dword [ebp - 0x2c]
push ebx
sub eax, edi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x3c]
push eax
push ebx
lea eax, [ebp - 0x24]
push esi
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwReadFile]
test eax, eax
jl 0x13aab
lea eax, [ebp - 0x3c]
push ebx
push eax
push edi
lea eax, [ebp - 0x24]
push esi
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwWriteFile]
test eax, eax
jl 0x13aab
push ebx
push ebx
push 0x10000
lea eax, [ebp - 0x24]
push esi
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwReadFile]
cmp eax, ebx
jge 0x13c22
push 0xe
lea eax, [ebp - 0x2c]
push 8
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
test eax, eax
jl 0x13d57
mov eax, dword [ebp - 0x2c]
push 0x14
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x44]
push 8
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ntoskrnl.exe_ZwSetInformationFile]
mov bl, 1
push dword [ebp - 0x18]
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePool]
call esi
push dword [ebp - 0x1c]
call esi
mov al, bl
jmp 0x13aad