Function at 0x424997
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 [0x484c64]
xor eax, ebp
mov dword [ebp + 0x5e8], eax
push 0xb0
mov eax, 0x463241
call fcn.0044ba5a
mov edi, dword [ebp + 0x5f4]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 0x10], edi
je 0x42500d
test byte [0x496dbc], 1
jne 0x424a01
or dword [0x496dbc], 1
mov esi, 0x496db0
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.00421fdb
push 0x465fcd
call fcn.00448d54
or dword [ebp - 4], 0xffffffff
pop ecx
jmp 0x424a06
mov esi, 0x496db0
push edi
lea ecx, [ebp - 0x4c]
mov dword [0x496d8c], esi
call fcn.00402f00
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.0042219e
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x4c]
call fcn.00401c10
push esi
push dword [0x496db4]
lea ecx, [ebp - 0x28]
call fcn.00421bb0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00421b45
test al, al
jne 0x424a79
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
test byte [eax + 0x60], 1
je 0x424a79
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
add eax, 0x3c
inc dword [eax]
mov eax, edi
jmp 0x42500f
push esi
push dword [0x496db4]
lea ecx, [ebp - 0x28]
call fcn.00421bb0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00421b45
test al, al
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
jne 0x424b26
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
cmp dword [eax + 0x34], ebx
je 0x424abd
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
cmp dword [eax + 0x34], 0xffffffff
jne 0x424b26
call fcn.0041bed5
test eax, eax
push ebx
push ebx
push 3
push ebx
je 0x424acf
push 3
jmp 0x424ad1
push 7
push SysReAllocStringLen
push dword [ebp - 0x10]
call edi
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x424b09
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.CreateFile__s__fails_with__d_n
push 0x4866f8
call fcn.00419d26
add esp, 0x10
xor eax, eax
inc eax
jmp 0x42500f
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
lea ecx, [ebp - 0x1c]
mov dword [eax + 0x34], esi
call fcn.0041d3b5
mov esi, eax
add esi, 0x1c
jmp 0x424be1
push esi
push dword [0x496db4]
lea ecx, [ebp - 0x28]
call fcn.00421bb0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00421b45
test al, al
jne 0x424b75
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
cmp dword [eax + 0x34], ebx
je 0x424b75
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
cmp dword [eax + 0x34], 0xffffffff
je 0x424b75
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
mov esi, eax
mov eax, dword [esi + 0x34]
add esi, 0x1c
mov dword [ebp - 0x14], eax
jmp 0x424be1
call fcn.0041bed5
test eax, eax
push ebx
push ebx
push 3
push ebx
je 0x424b87
push 3
jmp 0x424b89
push 7
push SysReAllocStringLen
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x424ae5
push dword [ebp - 0x10]
lea ecx, [ebp - 0x4c]
call fcn.00402f00
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov dword [ebp - 4], 2
call fcn.00424429
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x4c]
mov esi, eax
call fcn.00401c10
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.004049f0
mov eax, dword [esi + 0x44]
cmp eax, ebx
jne 0x424da9
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [esi + 0x44], eax
je 0x424c4e
push eax
push dword [ebp - 0x10]
push str._s_has_fa_x
push 0x20
push 0x4866f8
call fcn.00401000
add esp, 0x14
test byte [esi + 0x44], 1
jne 0x424c4e
push ebx
push ebx
push 3
push ebx
push 3
push 0x40000000
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
je 0x424c38
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x424c4a
cmp eax, 0x1779
jne 0x424c4e
or dword [esi + 0x44], 1
mov eax, dword [esi + 0x1c]
cmp eax, 5
je 0x424dba
cmp eax, ebx
jne 0x424c8b
push dword [ebp - 0x10]
lea eax, [ebp + 0x3e8]
push 0x104
push eax
call fcn.00448647
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 [0x496c88], bl
mov edi, 0x496c88
jne 0x424ca4
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [esi + 8], ebx
je 0x424cd2
cmp dword [esi + 0x18], 0xffffffff
je 0x424cd2
cmp byte [0x496c88], bl
je 0x424cd2
push edi
call fcn.0044aa00
push eax
push dword [ebp - 0x10]
push edi
call fcn.00448a08
add esp, 0x10
test eax, eax
jne 0x424dba
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 0x424d09
cmp edi, 0xffffffff
je 0x424d09
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 0x42500d
cmp dword [ebp - 0x14], 0xffffffff
je 0x42500d
push 0x496db0
push dword [0x496db4]
lea ecx, [ebp - 0x28]
call fcn.00421bb0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00421b45
test al, al
jne 0x424d6a
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
lea ecx, [ebp - 0x30]
push ecx
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 0xffffffff
je 0x424d6a
lea ecx, [ebp - 0x1c]
call fcn.0041d3b5
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x24]
je 0x424dba
inc dword [esi + 0x24]
push 0x46df40
push dword [ebp - 0x10]
lea eax, [ebp - 0x20]
push eax
call fcn.0044cf5c
add esp, 0xc
cmp dword [ebp - 0x20], ebx
jne 0x424dc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.Cannot__tfopen__s___last_error_d
push 0x20
push 0x4866f8
call fcn.00401000
add esp, 0x14
jmp 0x424b01
cmp eax, 0xffffffff
je 0x424c4e
test al, 1
je 0x424c4e
inc dword [esi + 0x20]
jmp 0x424b01
push 0x3e7
lea eax, [ebp + 1]
push ebx
push eax
mov byte [ebp], bl
call fcn.00447ba0
push 0xf9
lea eax, [ebp + 0x4ed]
push ebx
push eax
mov byte [ebp + 0x4ec], bl
call fcn.00447ba0
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.0042343f
push dword [ebp - 0x20]
lea eax, [ebp]
push 0x3e8
push eax
mov byte [ebp], bl
call fcn.0044c808
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp]
push 0x46df1c
push eax
call fcn.00448403
add esp, 0x18
cmp eax, ebx
je 0x424fee
push eax
call fcn.004217ad
mov edi, eax
cmp byte [edi], 0x5b
pop ecx
jne 0x424e92
mov esi, 0x46df18
push esi
push edi
call fcn.0044803e
cmp eax, edi
pop ecx
pop ecx
jbe 0x424e92
push esi
push edi
call fcn.0044803e
push edi
mov byte [eax], bl
call fcn.00448a1f
push eax
call fcn.004217ad
push 0xf9
push eax
lea eax, [ebp + 0x4ec]
push 0xfa
push eax
call fcn.00447cd6
add esp, 0x20
jmp 0x424fee
cmp byte [ebp + 0x4ec], bl
je 0x424fee
mov esi, 0x46df94
push esi
push edi
call fcn.0044803e
test eax, eax
pop ecx
pop ecx
je 0x424fee
cmp byte [edi], 0x3b
je 0x424fee
lea eax, [ebp - 0x14]
push eax
push esi
push edi
call fcn.00448403
lea eax, [ebp - 0x14]
push eax
push 0x46c7f4
push ebx
call fcn.00448403
push edi
mov esi, eax
call fcn.004217ad
add esp, 0x1c
cmp esi, ebx
mov edi, eax
je 0x424f1c
push esi
call fcn.004217ad
mov esi, eax
cmp byte [esi], 0x22
pop ecx
jne 0x424f18
push esi
call fcn.0044aa00
cmp byte [eax + esi - 1], 0x22
pop ecx
jne 0x424f18
push esi
call fcn.00448a1f
mov esi, eax
push esi
call fcn.0044aa00
pop ecx
pop ecx
mov byte [eax + esi - 1], bl
cmp esi, ebx
jne 0x424f21
mov esi, 0x46853b
push edi
lea ecx, [ebp - 0x84]
call fcn.00402f00
lea eax, [ebp + 0x4ec]
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 3
call fcn.00402f00
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x68]
push eax
mov byte [ebp - 4], 4
call fcn.00423751
mov ecx, eax
add ecx, 0xc
call fcn.0041db2c
push esi
mov ecx, eax
call fcn.004049f0
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x68]
call fcn.00401c10
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x84]
call fcn.00401c10
push edi
lea ecx, [ebp - 0xa0]
call fcn.00402f00
lea eax, [ebp + 0x4ec]
push eax
lea ecx, [ebp - 0xbc]
mov dword [ebp - 4], 5
call fcn.00402f00
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0xbc]
push eax
mov byte [ebp - 4], 6
call fcn.00423751
mov ecx, eax
call fcn.004073b0
push ebx
push esi
lea ecx, [ebp - 0xbc]
call fcn.00401c10
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0xa0]
call fcn.00401c10
push dword [ebp - 0x20]
call fcn.0044c7d9
test eax, eax
pop ecx
je 0x424e0d
push dword [ebp - 0x20]
call fcn.0044ccda
pop ecx
jmp 0x424b01
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.00447b4c
add ebp, 0x5ec
leave
ret