Function at 0x4272eb
Capabilities:
Check if file exists
Get common file path
Get disk information
Get file attributes
Get file size

Disassembly:
push ebp
sub esp, 0x5e8
lea ebp, [esp - 4]
mov eax, dword [0x491d88]
xor eax, ebp
mov dword [ebp + 0x5e8], eax
push 0xb0
mov eax, 0x46dd19
call fcn.0045736a
mov edi, dword [ebp + 0x5f4]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 0x10], edi
je 0x427961
test byte [0x4a3684], 1
jne 0x427355
or dword [0x4a3684], 1
mov esi, 0x4a3678
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.00425641
push 0x4711ea
call fcn.00453d94
or dword [ebp - 4], 0xffffffff
pop ecx
jmp 0x42735a
mov esi, 0x4a3678
push edi
lea ecx, [ebp - 0x4c]
mov dword [0x4a3654], esi
call fcn.004043b0
lea eax, [ebp - 0x4c]
push eax
xor edi, edi
lea eax, [ebp - 0x1c]
inc edi
push eax
mov ecx, esi
mov dword [ebp - 4], edi
call fcn.00425790
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x4c]
call fcn.00402f50
push esi
push dword [0x4a367c]
lea ecx, [ebp - 0x28]
call fcn.0042b4b1
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042525e
test al, al
jne 0x4273cd
lea ecx, [ebp - 0x1c]
call fcn.00421972
test byte [eax + 0x60], 1
je 0x4273cd
lea ecx, [ebp - 0x1c]
call fcn.00421972
add eax, 0x3c
inc dword [eax]
mov eax, edi
jmp 0x427963
push esi
push dword [0x4a367c]
lea ecx, [ebp - 0x28]
call fcn.0042b4b1
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042525e
test al, al
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
jne 0x42747a
lea ecx, [ebp - 0x1c]
call fcn.00421972
cmp dword [eax + 0x34], ebx
je 0x427411
lea ecx, [ebp - 0x1c]
call fcn.00421972
cmp dword [eax + 0x34], 0xffffffff
jne 0x42747a
call fcn.0042a022
test eax, eax
push ebx
push ebx
push 3
push ebx
je 0x427423
push 3
jmp 0x427425
push 7
push SysReAllocStringLen
push dword [ebp - 0x10]
call edi
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x42745d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.CreateFile__s__fails_with__d_n
push 0x4932a8
call fcn.0041fb18
add esp, 0x10
xor eax, eax
inc eax
jmp 0x427963
lea ecx, [ebp - 0x1c]
call fcn.00421972
lea ecx, [ebp - 0x1c]
mov dword [eax + 0x34], esi
call fcn.00421972
mov esi, eax
add esi, 0x1c
jmp 0x427535
push esi
push dword [0x4a367c]
lea ecx, [ebp - 0x28]
call fcn.0042b4b1
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042525e
test al, al
jne 0x4274c9
lea ecx, [ebp - 0x1c]
call fcn.00421972
cmp dword [eax + 0x34], ebx
je 0x4274c9
lea ecx, [ebp - 0x1c]
call fcn.00421972
cmp dword [eax + 0x34], 0xffffffff
je 0x4274c9
lea ecx, [ebp - 0x1c]
call fcn.00421972
mov esi, eax
mov eax, dword [esi + 0x34]
add esi, 0x1c
mov dword [ebp - 0x14], eax
jmp 0x427535
call fcn.0042a022
test eax, eax
push ebx
push ebx
push 3
push ebx
je 0x4274db
push 3
jmp 0x4274dd
push 7
push SysReAllocStringLen
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x427439
push dword [ebp - 0x10]
lea ecx, [ebp - 0x4c]
call fcn.004043b0
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov dword [ebp - 4], 2
call fcn.00427234
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x4c]
mov esi, eax
call fcn.00402f50
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x10]
lea ecx, [esi + 0x28]
mov dword [esi + 0x44], ebx
mov dword [esi + 0x18], eax
call fcn.00404200
mov eax, dword [esi + 0x44]
cmp eax, ebx
jne 0x4276fd
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [esi + 0x44], eax
je 0x4275a2
push eax
push dword [ebp - 0x10]
push str._s_has_fa_x
push 0x20
push 0x4932a8
call fcn.00401300
add esp, 0x14
test byte [esi + 0x44], 1
jne 0x4275a2
push ebx
push ebx
push 3
push ebx
push 3
push 0x40000000
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
je 0x42758c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x42759e
cmp eax, 0x1779
jne 0x4275a2
or dword [esi + 0x44], 1
mov eax, dword [esi + 0x1c]
cmp eax, 5
je 0x42770e
cmp eax, ebx
jne 0x4275df
push dword [ebp - 0x10]
lea eax, [ebp + 0x3e8]
push 0x104
push eax
call fcn.004542fb
add esp, 0xc
lea eax, [ebp + 0x3e8]
push eax
mov byte [ebp + 0x3eb], bl
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [esi + 0x1c], eax
cmp byte [0x4a3550], bl
mov edi, 0x4a3550
jne 0x4275f8
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [esi + 8], ebx
je 0x427626
cmp dword [esi + 0x18], 0xffffffff
je 0x427626
cmp byte [0x4a3550], bl
je 0x427626
push edi
call fcn.00456310
push eax
push dword [ebp - 0x10]
push edi
call fcn.00452cfc
add esp, 0x10
test eax, eax
jne 0x42770e
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov edi, dword [ebp - 0x14]
push ebx
push edi
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp edi, ebx
mov dword [ebp - 0x14], eax
je 0x42765d
cmp edi, 0xffffffff
je 0x42765d
or dword [esi + 0x18], 0xffffffff
push edi
mov dword [esi + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], ebx
je 0x427961
cmp dword [ebp - 0x14], 0xffffffff
je 0x427961
push 0x4a3678
push dword [0x4a367c]
lea ecx, [ebp - 0x28]
call fcn.0042b4b1
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042525e
test al, al
jne 0x4276be
lea ecx, [ebp - 0x1c]
call fcn.00421972
lea ecx, [ebp - 0x30]
push ecx
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 0xffffffff
je 0x4276be
lea ecx, [ebp - 0x1c]
call fcn.00421972
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x24]
je 0x42770e
inc dword [esi + 0x24]
push 0x4787b8
push dword [ebp - 0x10]
lea eax, [ebp - 0x20]
push eax
call fcn.0045826a
add esp, 0xc
cmp dword [ebp - 0x20], ebx
jne 0x427716
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.Cannot__tfopen__s___last_error_d
push 0x20
push 0x4932a8
call fcn.00401300
add esp, 0x14
jmp 0x427455
cmp eax, 0xffffffff
je 0x4275a2
test al, 1
je 0x4275a2
inc dword [esi + 0x20]
jmp 0x427455
push 0x3e7
lea eax, [ebp + 1]
push ebx
push eax
mov byte [ebp], bl
call fcn.004530b0
push 0xf9
lea eax, [ebp + 0x4ed]
push ebx
push eax
mov byte [ebp + 0x4ec], bl
call fcn.004530b0
mov eax, dword [ebp - 0x14]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esi], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 4], eax
add esi, 0xc
add esp, 0x18
mov ecx, esi
mov dword [ebp - 0x10], esi
call fcn.0042624a
push dword [ebp - 0x20]
lea eax, [ebp]
push 0x3e8
push eax
mov byte [ebp], bl
call fcn.00457dee
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp]
push 0x4787b4
push eax
call fcn.00453f8e
add esp, 0x18
cmp eax, ebx
je 0x427942
push eax
call fcn.00424ec6
mov edi, eax
cmp byte [edi], 0x5b
pop ecx
jne 0x4277e6
mov esi, 0x4787b0
push esi
push edi
call fcn.004538a0
cmp eax, edi
pop ecx
pop ecx
jbe 0x4277e6
push esi
push edi
call fcn.004538a0
push edi
mov byte [eax], bl
call fcn.004541d2
push eax
call fcn.00424ec6
push 0xf9
push eax
lea eax, [ebp + 0x4ec]
push 0xfa
push eax
call fcn.00453da6
add esp, 0x20
jmp 0x427942
cmp byte [ebp + 0x4ec], bl
je 0x427942
mov esi, 0x4787bc
push esi
push edi
call fcn.004538a0
test eax, eax
pop ecx
pop ecx
je 0x427942
cmp byte [edi], 0x3b
je 0x427942
lea eax, [ebp - 0x14]
push eax
push esi
push edi
call fcn.00453f8e
lea eax, [ebp - 0x14]
push eax
push 0x472bd0
push ebx
call fcn.00453f8e
push edi
mov esi, eax
call fcn.00424ec6
add esp, 0x1c
cmp esi, ebx
mov edi, eax
je 0x427870
push esi
call fcn.00424ec6
mov esi, eax
cmp byte [esi], 0x22
pop ecx
jne 0x42786c
push esi
call fcn.00456310
cmp byte [eax + esi - 1], 0x22
pop ecx
jne 0x42786c
push esi
call fcn.004541d2
mov esi, eax
push esi
call fcn.00456310
pop ecx
pop ecx
mov byte [eax + esi - 1], bl
cmp esi, ebx
jne 0x427875
mov esi, 0x473048
push edi
lea ecx, [ebp - 0x84]
call fcn.004043b0
lea eax, [ebp + 0x4ec]
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 3
call fcn.004043b0
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x68]
push eax
mov byte [ebp - 4], 4
call fcn.0042655c
mov ecx, eax
add ecx, 0xc
call fcn.004220ae
push esi
mov ecx, eax
call fcn.00404200
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x68]
call fcn.00402f50
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x84]
call fcn.00402f50
push edi
lea ecx, [ebp - 0xa0]
call fcn.004043b0
lea eax, [ebp + 0x4ec]
push eax
lea ecx, [ebp - 0xbc]
mov dword [ebp - 4], 5
call fcn.004043b0
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0xbc]
push eax
mov byte [ebp - 4], 6
call fcn.0042655c
mov ecx, eax
call fcn.004080a0
push ebx
push esi
lea ecx, [ebp - 0xbc]
call fcn.00402f50
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0xa0]
call fcn.00402f50
push dword [ebp - 0x20]
call fcn.00457d90
test eax, eax
pop ecx
je 0x427761
push dword [ebp - 0x20]
call fcn.00457fe8
pop ecx
jmp 0x427455
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x5e8]
xor ecx, ebp
call fcn.0045309e
add ebp, 0x5ec
leave
ret