Function at 0x101b678
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], 0xffffffff
push esi
push edi
je 0x101b76a
test byte [ebp + 0xc], 2
jne 0x101b763
and dword [ebp + 0xc], 0xfffffffe
cmp dword [ebp + 0x10], ebx
jne 0x101b73e
cmp dword [0x7ffe02c0], 1
jne 0x101b772
lea eax, [ebp + 0x18]
push eax
call fcn.0101c508
test al, al
mov esi, str.DosDevicesA:CONFIG.SYS
je 0x101b6d7
movzx eax, word [ebp + 0x18]
push eax
push 0x100ca2c
push esi
call dword [sym.imp.USER32.DLL_wsprintfW]
add esp, 0xc
push esi
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.NTDLL.DLL_RtlInitUnicodeString]
lea eax, [ebp - 0x14]
push 0x20
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x2c]
push 1
push eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0x18
push eax
lea eax, [ebp + 0x10]
push 0x120089
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x40], 0x40
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call dword [sym.imp.NTDLL.DLL_NtOpenFile]
cmp eax, ebx
jl 0x101b758
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 0x10]
call fcn.0101cc89
cmp eax, ebx
jl 0x101b799
lea eax, [ebp - 0x1c]
mov dword [ebp + 0x14], eax
lea eax, [ebp - 0x24]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
cmp eax, 0x3fff
mov dword [0x1022e50], eax
jbe 0x101b77c
push dword [ebp + 0x10]
call dword [sym.imp.NTDLL.DLL_NtClose]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0101b5fd
xor al, al
jmp 0x101b924
mov dword [ebp + 0xc], ebx
jmp 0x101b69b
push str.DosDevicesC:CONFIG.SYS
jmp 0x101b6d8
mov edi, dword [sym.imp.NTDLL.DLL_RtlAllocateHeap]
inc eax
push eax
push ebx
push dword [0x1022c30]
call edi
mov esi, eax
cmp esi, ebx
jne 0x101b79e
mov dword [0x1022e50], ebx
push dword [ebp + 0x10]
jmp 0x101b752
mov eax, dword [0x1022e50]
lea eax, [eax + eax + 2]
push eax
push ebx
push dword [0x1022c30]
call edi
cmp eax, ebx
mov dword [0x1022e4c], eax
jne 0x101b7d0
push esi
push ebx
push dword [0x1022c30]
mov dword [0x1022e50], ebx
call dword [sym.imp.NTDLL.DLL_RtlFreeHeap]
jmp 0x101b799
push ebx
push ebx
push dword [0x1022e50]
lea eax, [ebp - 0x2c]
push esi
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.NTDLL.DLL_NtReadFile]
push dword [ebp + 0x10]
mov dword [ebp - 4], eax
call dword [sym.imp.NTDLL.DLL_NtClose]
cmp dword [ebp - 4], ebx
jge 0x101b82a
push esi
mov esi, dword [sym.imp.NTDLL.DLL_RtlFreeHeap]
push ebx
mov dword [0x1022e50], ebx
push dword [0x1022c30]
call esi
push dword [0x1022e4c]
push ebx
push dword [0x1022c30]
call esi
mov dword [0x1022e4c], ebx
jmp 0x101b758
mov eax, dword [0x1022e50]
push esi
mov byte [esi + eax], bl
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.NTDLL.DLL_RtlInitAnsiString]
mov eax, dword [0x1022e4c]
push ebx
mov dword [ebp - 8], eax
mov eax, dword [0x1022e50]
lea eax, [eax + eax + 2]
mov word [ebp - 0xa], ax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.NTDLL.DLL_RtlOemStringToUnicodeString]
movzx eax, word [ebp - 0xc]
mov ecx, dword [0x1022e4c]
push esi
mov esi, dword [sym.imp.NTDLL.DLL_RtlFreeHeap]
push ebx
shr eax, 1
mov dword [0x1022e50], eax
mov word [ecx + eax*2], bx
push dword [0x1022c30]
call esi
mov eax, dword [0x1022e50]
lea eax, [eax + eax + 2]
push eax
push ebx
push dword [0x1022c30]
call edi
cmp eax, ebx
mov dword [0x1022e54], eax
jne 0x101b8ad
mov dword [0x1022e50], ebx
jmp 0x101b810
push dword [0x1022e4c]
push eax
call dword [sym.imp.MSVCRT.DLL_wcscpy]
pop ecx
pop ecx
push dword [0x1022e54]
call fcn.0101c5b6
mov edi, dword [sym.imp.MSVCRT.DLL_wcsstr]
push 0x100c9b8
push dword [0x1022e54]
call edi
pop ecx
test eax, eax
pop ecx
je 0x101b92b
push 0x100ca18
push dword [0x1022e54]
call edi
pop ecx
test eax, eax
pop ecx
je 0x101b92b
push 0x100ca00
push dword [0x1022e54]
call edi
pop ecx
test eax, eax
pop ecx
je 0x101b92b
mov eax, dword [ebp + 0xc]
or al, 1
push eax
push dword [ebp + 8]
call fcn.0101b5fd
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.0101b62c
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 0x14
push dword [0x1022e4c]
mov dword [0x1022e50], ebx
push ebx
push dword [0x1022c30]
call esi
push dword [0x1022e54]
push ebx
push dword [0x1022c30]
call esi
mov dword [0x1022e4c], ebx
mov dword [0x1022e54], ebx
jmp 0x101b758