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

Disassembly:
push 0x58
mov eax, 0x5b15b1
call fcn.00580ed4
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.0040850b
mov dword [ebp - 4], ebx
xor edi, edi
inc edi
mov esi, 0x105
lea eax, [ebp - 0x48]
mov dword [ebp - 0x60], edi
call fcn.0040fd33
mov dword [ebp - 4], edi
push 0x104
push ebx
lea ecx, [ebp - 0x48]
call fcn.0042ced6
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
lea ecx, [ebp - 0x48]
call fcn.0042ced6
movsx eax, byte [eax]
push eax
call fcn.00576179
mov byte [ebp - 0x4d], al
pop ecx
mov esi, 0x400
lea eax, [ebp - 0x2c]
call fcn.0040fd33
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x18]
push ebx
lea ecx, [ebp - 0x2c]
call fcn.0042ced6
push eax
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
push ebx
lea ecx, [ebp - 0x2c]
call fcn.0042ced6
mov edi, eax
jmp 0x422b12
lea eax, [ebp - 0x4c]
push eax
call fcn.004083f9
mov byte [ebp - 4], 3
push edi
push 0x6727b4
lea eax, [ebp - 0x4c]
call fcn.004177e8
mov eax, dword [ebp - 0x4c]
cmp dword [eax - 0xc], ebx
pop ecx
pop ecx
jl 0x422b1c
movsx eax, byte [eax]
push eax
call fcn.00576179
pop ecx
movsx ecx, byte [ebp - 0x4d]
cmp eax, ecx
je 0x422af4
lea esi, [ebp - 0x4c]
call fcn.004084f4
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x422af4
push 0x677fb8
mov eax, esi
push eax
call fcn.004134e9
push dword [ebp - 0x4c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x422af4
lea eax, [ebp - 0x54]
push str._test.sys
push eax
call fcn.004135f4
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.00408461
cmp esi, 0xffffffff
jne 0x422b26
mov byte [ebp - 4], 3
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x422af9
sub eax, edx
lea edi, [edi + eax + 1]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.00408461
cmp byte [edi], bl
jne 0x422a44
jmp 0x422b63
push 0x80070057
call fcn.00402d79
push dword [ebp - 0x4c]
lea eax, [ebp - 0x54]
push eax
call fcn.00470690
pop ecx
pop ecx
mov byte [ebp - 4], 7
mov edi, dword [ebp - 0x5c]
call fcn.004085c5
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x54]
call fcn.004085a2
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.00408461
mov edi, dword [ebp - 0x5c]
mov eax, dword [edi]
cmp dword [eax - 0xc], ebx
je 0x422bb8
cmp dword [ebp - 0x58], ebx
je 0x422bb8
lea eax, [ebp - 0x4c]
push 0x670fe8
push eax
mov ecx, edi
call fcn.0040fc53
mov byte [ebp - 4], 8
push dword [ebp - 0x58]
lea ecx, [ebp - 0x54]
push ecx
mov ecx, eax
call fcn.0040fc53
add esp, 0x10
mov byte [ebp - 4], 9
call fcn.004085c5
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x54]
call fcn.004085a2
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.004085a2
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.00409746
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.00409746
mov eax, edi
call fcn.00580f57
ret