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

Disassembly:
mov eax, 0x44d1e8
call fcn.0042c4cc
sub esp, 0x640
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
je 0x41f08b
test byte [0x47b108], 1
mov edi, 0x47b0d8
jne 0x41eab0
mov al, byte [ebp + 0xb]
or byte [0x47b108], 1
mov byte [0x47b0d8], al
mov al, byte [ebp + 0xb]
mov ecx, edi
mov byte [0x47b0d9], al
mov byte [0x47b0e0], bl
call fcn.00421d62
push 0x41f09c
call fcn.0042c06d
pop ecx
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x28]
mov dword [0x47b214], 0x47b0d8
mov byte [ebp - 0x28], al
call fcn.004151e3
push dword [ebp + 8]
call fcn.0042cc10
pop ecx
push eax
lea ecx, [ebp - 0x28]
push dword [ebp + 8]
call fcn.00401879
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], ebx
call fcn.004216f0
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x28]
call fcn.004151e3
mov esi, dword [ebp - 0x14]
cmp esi, dword [0x47b0dc]
je 0x41eb6f
test byte [esi + 0x58], 1
je 0x41eb1a
inc dword [esi + 0x40]
push 1
pop eax
jmp 0x41f08d
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x41eb26
cmp eax, 0xffffffff
jne 0x41eb61
call fcn.0041566d
push ebx
push ebx
test eax, eax
push 3
push ebx
je 0x41eb38
push 3
jmp 0x41eb3a
push 7
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x41eb99
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x38], eax
mov eax, dword [ebp - 0x14]
lea esi, [eax + 0x1c]
jmp 0x41ec1e
mov eax, dword [esi + 0x38]
add esi, 0x1c
mov dword [ebp - 0x10], eax
jmp 0x41ec1e
call fcn.0041566d
push ebx
push ebx
test eax, eax
push 3
push ebx
je 0x41eb81
push 3
jmp 0x41eb83
push 7
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x41ebba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push str.CreateFile__s__fails_with__d_n
push 0x46abb8
call fcn.00414d1c
add esp, 0x10
jmp 0x41eb12
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x28], al
call fcn.004151e3
push dword [ebp + 8]
call fcn.0042cc10
pop ecx
push eax
lea ecx, [ebp - 0x28]
push dword [ebp + 8]
call fcn.00401879
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
mov dword [ebp - 4], 1
call fcn.00420dc2
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.004151e3
mov eax, dword [ebp - 0x10]
push dword [ebp + 8]
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x1c], eax
call fcn.0042cc10
pop ecx
push eax
lea ecx, [esi + 0x2c]
push dword [ebp + 8]
call fcn.00401879
mov eax, dword [esi + 0x3c]
cmp eax, ebx
jne 0x41ecaa
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [esi + 0x3c], eax
je 0x41ecb7
push eax
push dword [ebp + 8]
push str._s_has_fa_x
push 0x20
push 0x46abb8
call fcn.0040121a
add esp, 0x14
test byte [esi + 0x3c], 1
jne 0x41ecb7
push 0x88
lea eax, [ebp - 0x1e8]
push ebx
push eax
call fcn.0042da50
add esp, 0xc
lea eax, [ebp - 0x1e8]
mov byte [ebp - 0x1e8], 0x88
push 0x41
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
je 0x41ec92
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x41eca4
cmp eax, 0x1779
jne 0x41ecb7
or dword [esi + 0x3c], 1
jmp 0x41ecb7
cmp eax, 0xffffffff
je 0x41ecb7
test al, 1
jne 0x41eda2
mov eax, dword [esi + 0x20]
cmp eax, 5
je 0x41eda2
cmp eax, ebx
jne 0x41ecee
push dword [ebp + 8]
lea eax, [ebp - 0x264]
push eax
call fcn.0042cc90
pop ecx
lea eax, [ebp - 0x264]
pop ecx
mov byte [ebp - 0x261], bl
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [esi + 0x20], eax
cmp byte [0x47b110], bl
mov edi, 0x47b110
jne 0x41ed07
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [esi + 8], ebx
je 0x41ed31
cmp dword [esi + 0x1c], 0xffffffff
je 0x41ed31
cmp byte [0x47b110], bl
je 0x41ed31
push edi
call fcn.0042cc10
push eax
push dword [ebp + 8]
push edi
call fcn.0042d377
add esp, 0x10
test eax, eax
jne 0x41eda2
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push ebx
mov edi, eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [0x47b0e8], ebx
mov dword [ebp - 0x18], eax
jne 0x41ed67
push dword [ebp - 0x10]
or dword [esi + 0x1c], 0xffffffff
mov dword [esi + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x41f08b
cmp dword [ebp - 0x18], 0xffffffff
je 0x41f08b
mov eax, dword [ebp - 0x14]
cmp eax, dword [0x47b0dc]
je 0x41edaa
lea ecx, [ebp - 0x30]
add eax, 0x1c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 0xffffffff
je 0x41edaa
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [eax + 0x24]
jne 0x41edaa
inc dword [esi + 0x24]
jmp 0x41eb12
inc dword [esi + 0x28]
push 0x460e5c
push dword [ebp + 8]
call fcn.0042f145
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x10], eax
jne 0x41ede6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push str.Cannot__tfopen__s___last_error_d
push 0x20
push 0x46abb8
call fcn.0040121a
add esp, 0x14
jmp 0x41eb12
mov dl, byte [0x46a9b4]
mov ecx, 0xf9
xor eax, eax
lea edi, [ebp - 0x64b]
mov byte [ebp - 0x64c], dl
push 0x3e
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x15f]
mov byte [ebp - 0x160], dl
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov eax, dword [ebp - 0x18]
lea ecx, [esi + 0xc]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esi], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 4], eax
mov dword [ebp + 8], ecx
call fcn.004212e2
push dword [ebp - 0x10]
lea eax, [ebp - 0x64c]
mov byte [ebp - 0x64c], bl
push 0x3e8
push eax
call fcn.0042eefe
lea eax, [ebp - 0x64c]
push 0x464460
push eax
call fcn.0042cff8
add esp, 0x14
cmp eax, ebx
je 0x41f072
push eax
call fcn.0041e315
mov esi, eax
pop ecx
cmp byte [esi], 0x5b
jne 0x41eeb9
mov edi, 0x46445c
push edi
push esi
call fcn.0042d7f4
pop ecx
cmp eax, esi
pop ecx
jbe 0x41eeb9
push edi
push esi
call fcn.0042d7f4
push esi
mov byte [eax], bl
call fcn.0042ce3b
push eax
call fcn.0041e315
push 0xfa
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.0042cda1
add esp, 0x1c
jmp 0x41f072
cmp byte [ebp - 0x160], bl
je 0x41f072
mov edi, 0x4644b8
push edi
push esi
call fcn.0042d7f4
pop ecx
test eax, eax
pop ecx
je 0x41f072
cmp byte [esi], 0x3b
je 0x41f072
push edi
push esi
call fcn.0042cff8
push 0x462364
push ebx
call fcn.0042cff8
push esi
mov edi, eax
call fcn.0041e315
add esp, 0x14
cmp edi, ebx
mov esi, eax
je 0x41ef3b
push edi
call fcn.0041e315
mov edi, eax
pop ecx
cmp byte [edi], 0x22
jne 0x41ef37
push edi
call fcn.0042cc10
cmp byte [eax + edi - 1], 0x22
pop ecx
jne 0x41ef37
push edi
call fcn.0042ce3b
mov edi, eax
push edi
call fcn.0042cc10
pop ecx
mov byte [eax + edi - 1], bl
pop ecx
cmp edi, ebx
jne 0x41ef40
mov edi, 0x46a9b4
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x60]
mov byte [ebp - 0x60], al
call fcn.004151e3
push esi
call fcn.0042cc10
pop ecx
push eax
push esi
lea ecx, [ebp - 0x60]
call fcn.00401879
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 2
mov byte [ebp - 0x28], al
call fcn.004151e3
lea eax, [ebp - 0x160]
push eax
call fcn.0042cc10
pop ecx
push eax
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x28]
call fcn.00401879
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 3
call fcn.00420d4e
mov ecx, eax
add ecx, 0xc
call fcn.0041acbd
push edi
mov dword [ebp - 0x18], eax
call fcn.0042cc10
pop ecx
mov ecx, dword [ebp - 0x18]
push eax
push edi
call fcn.00401879
push 1
lea ecx, [ebp - 0x28]
pop edi
mov byte [ebp - 4], 2
push edi
call fcn.004151e3
or dword [ebp - 4], 0xffffffff
push edi
lea ecx, [ebp - 0x60]
call fcn.004151e3
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x50]
mov byte [ebp - 0x50], al
call fcn.004151e3
push esi
call fcn.0042cc10
pop ecx
push eax
push esi
lea ecx, [ebp - 0x50]
call fcn.00401879
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 4
mov byte [ebp - 0x40], al
call fcn.004151e3
lea eax, [ebp - 0x160]
push eax
call fcn.0042cc10
pop ecx
push eax
lea eax, [ebp - 0x160]
lea ecx, [ebp - 0x40]
push eax
call fcn.00401879
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], 5
call fcn.00420d4e
mov ecx, dword [eax + 4]
lea edx, [ebp - 0x50]
push edx
push ecx
lea ecx, [ebp - 0x64]
push ecx
mov ecx, eax
call fcn.00404cc4
push edi
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.004151e3
or dword [ebp - 4], 0xffffffff
push edi
lea ecx, [ebp - 0x50]
call fcn.004151e3
mov eax, dword [ebp - 0x10]
test byte [eax + 0xc], 0x10
je 0x41ee34
push eax
call fcn.0042f049
pop ecx
jmp 0x41eb12
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret