Function at 0x401868
Capabilities:
Get file attributes
Get system information on windows
Map section object
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x45c
mov al, byte [0x40a0aa]
push ebx
push esi
movsx eax, al
push edi
call fcn.00408ef0
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0x24], esp
mov dword [ebp - 0x14], esi
xor edi, edi
mov dword [ebp - 0x44], 0x1000
mov eax, dword [ebp - 0x44]
cmp edi, eax
jae 0x4018ac
sub eax, edi
call fcn.00408ef0
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x14], esp
sub edi, esp
mov esi, esp
lea eax, [ebp - 0x44]
push eax
push edi
push esi
push 0xb
call dword [sym.imp.ntdll.dll_ZwQuerySystemInformation]
cmp eax, 0xc0000004
je 0x401894
cmp eax, ebx
jl 0x401cb5
mov eax, dword [esi]
push 0xf
pop ecx
mov dword [ebp - 4], eax
lea eax, [esi + 4]
push 0x1c4
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x41c]
push ebx
mov esi, str._systemroot_system32drivers_
lea edi, [ebp - 0x458]
push eax
mov dword [ebp - 0x10], ebx
mov byte [ebp - 5], bl
rep movsd dword es:[edi], dword [esi]
call sub.ntdll.dll_memset
add esp, 0xc
cmp dword [ebp - 4], ebx
je 0x401cb5
mov edi, dword [ebp - 0x24]
dec dword [ebp - 4]
xor eax, eax
mov word [edi + 0x14], ax
movzx eax, word [edi + 0x1a]
lea esi, [eax + edi + 0x1c]
cmp byte [ebp - 5], bl
jne 0x401940
push str.classpnp.sys
push esi
call sub.ntdll.dll__stricmp
neg eax
sbb al, al
pop ecx
inc al
pop ecx
mov byte [ebp - 5], al
je 0x401a61
push str.win32k.sys
push esi
call sub.ntdll.dll__stricmp
pop ecx
pop ecx
test eax, eax
je 0x401a73
mov eax, dword [ebp + 8]
cmp dword [edi + 0xc], eax
jb 0x401a61
mov eax, esi
call fcn.0040142b
test eax, eax
je 0x401a61
push esi
lea eax, [ebp - 0x41e]
push 0x409414
push eax
call dword [sym.imp.ntdll.dll_swprintf]
add esp, 0xc
lea eax, [ebp - 0x458]
push eax
lea esi, [ebp - 0x68]
call fcn.00402684
mov eax, esi
push eax
call fcn.004017eb
push 0x20
push 7
lea eax, [ebp - 0x1c]
push eax
mov eax, esi
push eax
push 0x12019f
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntdll.dll_ZwOpenFile]
test eax, eax
jl 0x401a61
mov esi, dword [sym.imp.ntdll.dll_ZwReadFile]
push ebx
lea eax, [ebp - 0x38]
push eax
push 0x40
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
call esi
test eax, eax
jl 0x401a58
cmp dword [ebp - 0x18], 0x40
jne 0x401a58
mov eax, dword [ebp - 0x21c]
push ebx
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
push 0xf8
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
call esi
test eax, eax
jl 0x401a58
cmp dword [ebp - 0x18], 0xf8
jne 0x401a58
cmp dword [ebp - 0x1dc], ebx
jne 0x401a58
push 5
push 0x18
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_ZwQueryInformationFile]
test eax, eax
jl 0x401a58
mov eax, dword [ebp - 0x78]
cmp dword [ebp + 8], eax
ja 0x401a58
inc dword [ebp - 0x10]
xor ecx, ecx
inc ecx
mov word [edi + 0x14], cx
mov dword [edi + 0xc], eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_ZwClose]
add edi, 0x11c
mov dword [ebp - 0x24], edi
cmp dword [ebp - 4], ebx
jne 0x40190b
cmp dword [ebp - 0x10], ebx
je 0x401cb5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call fcn.0040124d
mul dword [ebp - 0x10]
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
cmp word [esi + 0x14], bx
je 0x401aa4
mov ecx, edx
dec edx
test ecx, ecx
je 0x401aad
add esi, 0x11c
dec eax
jne 0x401a97
movzx eax, word [esi + 0x1a]
lea edi, [eax + esi + 0x1c]
push edi
lea eax, [ebp - 0x41e]
push 0x409414
push eax
call dword [sym.imp.ntdll.dll_swprintf]
add esp, 0xc
push 0x2e
push edi
call sub.ntdll.dll_strrchr
push edi
mov byte [eax], bl
call sub.ntdll.dll_strlen
add esp, 0xc
lea eax, [eax + eax + 4]
call fcn.00408ef0
mov dword [ebp - 0x14], esp
push edi
push str.._S
push dword [ebp - 0x14]
call dword [sym.imp.ntdll.dll_swprintf]
mov eax, dword [esi + 0xc]
add esp, 0xc
push ebx
mov dword [ebp - 0x40], eax
xor eax, eax
push 0x8000000
lea edi, [ebp - 0x3c]
stosd dword es:[edi], eax
push 4
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x14]
lea esi, [ebp - 0x160]
call fcn.00402684
push eax
push 0xf001f
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.ntdll.dll_ZwCreateSection]
test eax, eax
jl 0x401cb5
mov edi, dword [sym.imp.ntdll.dll_ZwMapViewOfSection]
push 4
push ebx
push 2
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x2c]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x24], ebx
call edi
test eax, eax
jl 0x401bf6
push 0x20
push 7
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x458]
push eax
lea esi, [ebp - 0x140]
call fcn.00402684
push eax
push 0x120089
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntdll.dll_ZwOpenFile]
test eax, eax
jl 0x401bca
push ebx
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x40]
lea eax, [ebp - 0x1c]
push dword [ebp - 4]
mov dword [ebp - 0x38], ebx
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x34], ebx
call dword [sym.imp.ntdll.dll_ZwReadFile]
push dword [ebp - 0xc]
xor ecx, ecx
test eax, eax
setge cl
mov dword [ebp - 0x24], ecx
call dword [sym.imp.ntdll.dll_ZwClose]
push dword [ebp - 4]
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_ZwUnmapViewOfSection]
cmp dword [ebp - 0x24], ebx
je 0x401bf6
push dword [ebp + 0xc]
lea eax, [ebp - 0x458]
push dword [ebp + 8]
push dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x14]
add eax, 2
push eax
call fcn.004014fa
push 2
push ebx
push 2
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x2c]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
call edi
test eax, eax
jl 0x401cac
push 0x14
pop ecx
push 0x30
lea eax, [ebp - 0xd0]
push ebx
mov esi, str.__ACPIPNP03032da1a3ff0L12345678
lea edi, [ebp - 0x120]
push eax
rep movsd dword es:[edi], dword [esi]
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 0xe2]
push eax
call fcn.00401742
push ebx
push ebx
push 0x20
push 5
push 7
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x120]
push eax
lea esi, [ebp - 0xa0]
call fcn.00402684
push eax
push 0x100004
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntdll.dll_ZwCreateFile]
test eax, eax
jl 0x401ca1
push ebx
push ebx
push dword [ebp - 0x40]
lea eax, [ebp - 0x1c]
push dword [ebp - 4]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_ZwWriteFile]
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_ZwClose]
push dword [ebp - 4]
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_ZwUnmapViewOfSection]
push dword [ebp - 0x2c]
call dword [sym.imp.ntdll.dll_ZwClose]
lea esp, [ebp - 0x468]
pop edi
pop esi
pop ebx
leave
ret 8