Function at 0x123ae
Capabilities:
Get file attributes
Persist via application shimming
Print debug messages
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x2a740
push 0x2a536
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xe4
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0xc4], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], ebx
mov byte [ebp - 0x20], bl
mov byte [ebp - 0x28], bl
mov byte [ebp - 0x34], bl
mov dword [ebp - 0xc0], ebx
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0xe8], ebx
mov dword [ebp - 0x1c], ebx
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x88]
rep stosd dword es:[edi], eax
mov dword [ebp - 4], ebx
cmp dword [0x2bbd0], ebx
je 0x124ac
cmp dword [0x2bbc0], ebx
je 0x124ac
cmp dword [0x2bbc8], ebx
je 0x124ac
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0x8c]
push eax
push dword [ebp + 0x1c]
call fcn.00020fe3
test al, al
je 0x124ac
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax*8 + 0x2b9c0]
mov dword [ebp - 0xdc], ecx
mov eax, dword [eax*8 + 0x2b9c4]
mov dword [ebp - 0xd8], eax
mov esi, 0x546b6c42
push esi
push 0x10000
push 1
mov edi, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
call edi
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x124c1
push 0x11ff0
call sub.ntoskrnl.exe_DbgPrint
mov dword [esp], 0x11ff8
call sub.ntoskrnl.exe_DbgPrint
mov dword [esp], 0x1202c
call sub.ntoskrnl.exe_DbgPrint
pop ecx
mov dword [ebp - 0x30], 0xc000000f
or dword [ebp - 4], 0xffffffff
call fcn.00012c19
jmp 0x12c50
push esi
push 0x400
push 1
call edi
mov dword [ebp - 0xc4], eax
cmp eax, ebx
jne 0x124f4
push 0x12030
call sub.ntoskrnl.exe_DbgPrint
mov dword [esp], 0x12038
call sub.ntoskrnl.exe_DbgPrint
mov dword [esp], 0x1206c
jmp 0x124a6
push 5
push 0x18
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jl 0x129be
mov dword [ebp - 0xb0], ebx
mov dword [ebp - 0xac], ebx
push 0xe
push 8
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_ZwSetInformationFile]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jl 0x129be
mov dword [ebp - 0xf4], ebx
mov dword [ebp - 0xf0], ebx
push ebx
lea eax, [ebp - 0xf4]
push eax
push 0x400
push dword [ebp - 0xc4]
lea eax, [ebp - 0xe4]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_ZwReadFile]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jge 0x125bb
push 0x12070
call sub.ntoskrnl.exe_DbgPrint
mov esi, dword [ebp - 0xb4]
push esi
push 0x12078
call sub.ntoskrnl.exe_DbgPrint
push 0x120a8
call sub.ntoskrnl.exe_DbgPrint
add esp, 0x10
jmp 0x12c07
push esi
mov esi, 0x80
push esi
push 1
call edi
mov dword [ebp - 0xe8], eax
cmp eax, ebx
je 0x124ac
mov dword [ebp - 0x1c], esi
lea eax, [ebp - 0x1c]
push eax
mov esi, dword [ebp - 0xe8]
push esi
mov edi, dword [ebp - 0xc4]
push edi
call fcn.00016a6a
cmp dword [ebp - 0xdc], ebx
je 0x12600
mov eax, dword [ebp - 0xd8]
cmp eax, ebx
jne 0x1260f
mov dword [ebp - 0xdc], esi
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xd8], eax
cmp eax, 0x10
jl 0x12617
push 0x10
pop eax
push dword [ebp - 0xdc]
push eax
call fcn.0002a284
test al, al
je 0x124ac
mov al, byte [edi + 0x375]
mov byte [ebp - 0xec], al
mov al, byte [edi + 0x3ff]
mov byte [ebp - 0x2c], al
mov dword [ebp - 0xb0], ebx
mov dword [ebp - 0xac], ebx
push 0xe
push 8
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwSetInformationFile]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jl 0x129be
mov dword [ebp - 0xf4], ebx
mov dword [ebp - 0xf0], ebx
cmp byte [ebp + 0x14], 0x10
jne 0x1268d
cmp byte [ebp - 0x2c], 0x10
je 0x126c7
cmp byte [ebp + 0x14], 0x11
je 0x126c7
movzx eax, byte [ebp - 0x2c]
movzx ecx, byte [ebp + 0x14]
mov esi, ecx
xor esi, eax
mov edx, 0x7ffffff
test edx, esi
je 0x126c7
and eax, 0x7fffffb
or al, 4
and ecx, edx
cmp ecx, eax
je 0x126c7
mov al, byte [ebp - 0x2c]
cmp al, 4
jne 0x126d2
test byte [ebp + 0x14], al
je 0x126eb
cmp byte [ebp + 0x10], 1
jne 0x126d2
push ebx
lea eax, [ebp - 0xf4]
push eax
push ebx
jmp 0x1271c
test byte [ebp + 0x14], 4
je 0x126eb
test al, 4
je 0x126eb
cmp byte [ebp + 0x10], 1
jne 0x126eb
and byte [edi + 0x3ff], 0xb
jmp 0x1270f
test byte [ebp + 0x14], 2
je 0x126fe
test al, 2
je 0x126fe
and byte [edi + 0x3ff], 0xd
jmp 0x1270f
test byte [ebp + 0x14], 1
je 0x1270f
test al, 1
je 0x1270f
and byte [edi + 0x3ff], 6
push ebx
lea eax, [ebp - 0xf4]
push eax
push 0x400
push edi
lea eax, [ebp - 0xe4]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwWriteFile]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jge 0x12765
push 0x120ac
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xe0]
mov esi, dword [ebp - 0xb4]
push esi
push 0x120b4
call sub.ntoskrnl.exe_DbgPrint
push 0x120e8
jmp 0x12bff
mov cl, byte [ebp + 0x14]
test cl, 1
je 0x127c1
test byte [ebp - 0x2c], 1
je 0x127c1
test cl, 8
je 0x12797
xor eax, eax
mov dword [ebp - 0xbc], eax
cmp eax, dword [0x2bbc4]
jge 0x127c1
mov edx, dword [0x2bbc0]
mov dl, byte [edx + eax]
add byte [ebp - 0x20], dl
inc eax
jmp 0x1277a
mov dword [ebp - 0xbc], ebx
cmp dword [ebp - 0xbc], 0x80
jae 0x127c1
mov eax, dword [ebp - 0xbc]
mov al, byte [eax + edi + 0x37e]
add byte [ebp - 0x20], al
inc dword [ebp - 0xbc]
jmp 0x1279d
test cl, 2
je 0x127eb
test byte [ebp - 0x2c], 2
je 0x127eb
xor eax, eax
mov dword [ebp - 0xbc], eax
cmp eax, dword [0x2bbd4]
jge 0x127eb
mov edx, dword [0x2bbd0]
mov dl, byte [edx + eax]
add byte [ebp - 0x34], dl
inc eax
jmp 0x127ce
test cl, 4
je 0x12815
test byte [ebp - 0x2c], 4
je 0x12815
xor eax, eax
mov dword [ebp - 0xbc], eax
cmp eax, dword [0x2bbcc]
jge 0x12815
mov ecx, dword [0x2bbc8]
mov cl, byte [ecx + eax]
add byte [ebp - 0x28], cl
inc eax
jmp 0x127f8
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0x90], ebx
mov edi, 0x10000
push ebx
push ebx
push edi
push dword [ebp - 0x24]
lea eax, [ebp - 0xe4]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_ZwReadFile]
mov esi, eax
mov dword [ebp - 0xb4], esi
cmp dword [ebp - 0xe0], edi
je 0x12881
push 0x120ec
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xe0]
push edi
push esi
push 0x120f4
call sub.ntoskrnl.exe_DbgPrint
push 0x1214c
call sub.ntoskrnl.exe_DbgPrint
add esp, 0x18
cmp esi, ebx
jge 0x129c6
mov edi, 0xc0000011
cmp esi, edi
je 0x12907
push 0x12150
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xe0]
push esi
push 0x12158
call sub.ntoskrnl.exe_DbgPrint
push 0x1218c
call sub.ntoskrnl.exe_DbgPrint
add esp, 0x14
push 0xe
push 8
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
mov esi, eax
mov dword [ebp - 0xb4], esi
push 0x12190
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xac]
push dword [ebp - 0xb0]
push 0x12198
call sub.ntoskrnl.exe_DbgPrint
push 0x121d0
jmp 0x12bff
push 0x121d4
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xe0]
push edi
push 0x121dc
call sub.ntoskrnl.exe_DbgPrint
push 0x12220
call sub.ntoskrnl.exe_DbgPrint
add esp, 0x14
push 0xe
push 8
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 8]
mov esi, dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
call esi
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jl 0x12999
mov eax, dword [ebp - 0xb0]
sub eax, 0x400
mov ecx, dword [ebp - 0xac]
sbb ecx, ebx
mov dword [ebp - 0xd0], eax
mov dword [ebp - 0xcc], ecx
push 0x14
push 8
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 0xc]
call fcn.000228b4
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jl 0x129be
push 5
push 0x18
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 0xc]
call esi
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jge 0x12c0f
mov dword [ebp - 0x30], eax
jmp 0x124b3
mov edi, dword [ebp - 0xe0]
mov dword [ebp - 0x40], edi
cmp byte [ebp + 0x14], 0x10
jne 0x12a08
cmp byte [ebp - 0x2c], 0x10
jne 0x12a08
push dword [ebp - 0xd8]
push dword [ebp - 0xdc]
push dword [ebp - 0x90]
mov eax, dword [ebp - 0xc4]
mov al, byte [eax + 0x371]
push eax
push edi
push dword [ebp - 0x24]
call fcn.00010e34
jmp 0x12aba
cmp byte [ebp + 0x14], 0x11
jne 0x12a50
test byte [ebp - 0x2c], 1
je 0x12a3c
push dword [ebp - 0xd8]
push dword [ebp - 0xdc]
push dword [ebp - 0x90]
mov eax, dword [ebp - 0xc4]
mov al, byte [eax + 0x371]
push eax
push edi
push dword [ebp - 0x24]
call fcn.00010dca
test byte [ebp - 0x2c], 2
je 0x12aa2
push dword [ebp - 0x34]
push edi
push dword [ebp - 0x24]
call fcn.00010e6a
jmp 0x12aa2
test byte [ebp + 0x14], 1
je 0x12a84
test byte [ebp - 0x2c], 1
je 0x12a84
push dword [ebp - 0xd8]
push dword [ebp - 0xdc]
push dword [ebp - 0x90]
mov eax, dword [ebp - 0xc4]
mov al, byte [eax + 0x371]
push eax
push edi
push dword [ebp - 0x24]
call fcn.00010dca
test byte [ebp + 0x14], 2
je 0x12a9c
test byte [ebp - 0x2c], 2
je 0x12a9c
push dword [ebp - 0x34]
push edi
push dword [ebp - 0x24]
call fcn.00010e6a
test byte [ebp + 0x14], 4
je 0x12aba
test byte [ebp - 0x2c], 4
je 0x12aba
cmp byte [ebp + 0x10], 1
jne 0x12aba
push dword [ebp - 0x28]
push edi
push dword [ebp - 0x24]
call fcn.00010e6a
add dword [ebp - 0x90], edi
push 0xe
push 8
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jge 0x12b0c
push 0x12224
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xb4]
push 0x1222c
call sub.ntoskrnl.exe_DbgPrint
push 0x12264
call sub.ntoskrnl.exe_DbgPrint
add esp, 0x10
mov eax, dword [ebp - 0xb0]
cmp dword [ebp - 0xa0], eax
jb 0x124ac
cmp byte [ebp + 0x14], 0x10
jne 0x12b2a
cmp byte [ebp - 0x2c], 0x10
je 0x12b69
cmp byte [ebp + 0x14], 0x11
je 0x12b69
movzx esi, byte [ebp - 0x2c]
movzx ecx, byte [ebp + 0x14]
mov edx, ecx
xor edx, esi
test edx, 0x7ffffff
je 0x12b69
and esi, 0x7fffffb
or esi, 4
and ecx, 0x7ffffff
cmp ecx, esi
je 0x12b69
cmp byte [ebp - 0x2c], 4
jne 0x12b72
test byte [ebp + 0x14], 4
je 0x12b72
cmp byte [ebp + 0x10], 1
jne 0x12b72
sub eax, edi
sub eax, 0x400
jmp 0x12b74
sub eax, edi
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], ebx
push ebx
lea eax, [ebp - 0xf4]
push eax
push edi
push dword [ebp - 0x24]
lea eax, [ebp - 0xe4]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwWriteFile]
mov esi, eax
mov dword [ebp - 0xb4], esi
cmp edi, dword [ebp - 0xe0]
je 0x12bd7
push 0x12268
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xe0]
push edi
push 0x12270
call sub.ntoskrnl.exe_DbgPrint
push 0x122c4
call sub.ntoskrnl.exe_DbgPrint
add esp, 0x14
cmp esi, ebx
jge 0x1282a
push 0x122c8
call sub.ntoskrnl.exe_DbgPrint
push dword [ebp - 0xe0]
push esi
push 0x122d0
call sub.ntoskrnl.exe_DbgPrint
push 0x1230c
call sub.ntoskrnl.exe_DbgPrint
add esp, 0x14
mov dword [ebp - 0x30], esi
jmp 0x124b3
mov dword [ebp - 0x30], ebx
jmp 0x124b3
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.ntoskrnl.exe_wcslen]
pop ecx
test eax, eax
jbe 0x12c94
mov dword [ebp - 4], 1
dec dword [0x2b508]
push 4
push 0x2b508
push 4
push 0x12310
push 0x12324
call fcn.00026892
jmp 0x12c90
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x18