Function at 0x4226aa
Capabilities:
Check if file exists
Get common file path
Get disk information

Disassembly:
push 0x58
mov eax, 0x5b12ae
call fcn.00580bb4
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 8]
push eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x60], ebx
call fcn.004084d7
mov dword [ebp - 4], ebx
xor edi, edi
inc edi
mov esi, 0x105
lea eax, [ebp - 0x48]
mov dword [ebp - 0x60], edi
call fcn.0040fcea
mov dword [ebp - 4], edi
push 0x104
push ebx
lea ecx, [ebp - 0x48]
call fcn.0042d1b9
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
lea ecx, [ebp - 0x48]
call fcn.0042d1b9
movsx eax, byte [eax]
push eax
call fcn.00575e59
mov byte [ebp - 0x4d], al
pop ecx
mov esi, 0x400
lea eax, [ebp - 0x2c]
call fcn.0040fcea
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x18]
push ebx
lea ecx, [ebp - 0x2c]
call fcn.0042d1b9
push eax
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
push ebx
lea ecx, [ebp - 0x2c]
call fcn.0042d1b9
mov edi, eax
jmp 0x422815
lea eax, [ebp - 0x4c]
push eax
call fcn.004083c5
mov byte [ebp - 4], 3
push edi
push 0x681f70
lea eax, [ebp - 0x4c]
call fcn.0041759b
mov eax, dword [ebp - 0x4c]
cmp dword [eax - 0xc], ebx
pop ecx
pop ecx
jl 0x42281f
movsx eax, byte [eax]
push eax
call fcn.00575e59
pop ecx
movsx ecx, byte [ebp - 0x4d]
cmp eax, ecx
je 0x4227f7
lea esi, [ebp - 0x4c]
call fcn.004084c0
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x4227f7
push str.System_Volume_Information
mov eax, esi
push eax
call fcn.004134da
push dword [ebp - 0x4c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4227f7
lea eax, [ebp - 0x54]
push str._test.sys
push eax
call fcn.004135e5
pop ecx
pop ecx
mov byte [ebp - 4], 4
mov eax, dword [eax]
push ebx
push 0x4000000
push 2
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x64], esi
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x54]
call fcn.0040842d
cmp esi, 0xffffffff
jne 0x422829
mov byte [ebp - 4], 3
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4227fc
sub eax, edx
lea edi, [edi + eax + 1]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.0040842d
cmp byte [edi], bl
jne 0x422747
jmp 0x422866
push 0x80070057
call fcn.00402d73
push dword [ebp - 0x4c]
lea eax, [ebp - 0x54]
push eax
call fcn.00470250
pop ecx
pop ecx
mov byte [ebp - 4], 7
mov edi, dword [ebp - 0x5c]
call fcn.00408591
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x54]
call fcn.0040856e
mov byte [ebp - 4], 3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.0040842d
mov edi, dword [ebp - 0x5c]
mov eax, dword [edi]
cmp dword [eax - 0xc], ebx
je 0x4228bb
cmp dword [ebp - 0x58], ebx
je 0x4228bb
lea eax, [ebp - 0x4c]
push 0x681f9c
push eax
mov ecx, edi
call fcn.0040fc0a
mov byte [ebp - 4], 8
push dword [ebp - 0x58]
lea ecx, [ebp - 0x54]
push ecx
mov ecx, eax
call fcn.0040fc0a
add esp, 0x10
mov byte [ebp - 4], 9
call fcn.00408591
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x54]
call fcn.0040856e
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.0040856e
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.004096f9
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.004096f9
mov eax, edi
call fcn.00580c37
ret