Function at 0x40dd0d
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 [0x44bd40]
xor eax, ebp
mov dword [ebp + 0x5e8], eax
push 0xb0
mov eax, 0x439b03
call fcn.0042501a
mov edi, dword [ebp + 0x5f4]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 0x10], edi
je 0x40e383
test byte [0x45d3fc], 1
jne 0x40dd77
or dword [0x45d3fc], 1
mov esi, 0x45d3f0
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040b26e
push 0x43b4ca
call fcn.00423659
or dword [ebp - 4], 0xffffffff
pop ecx
jmp 0x40dd7c
mov esi, 0x45d3f0
push edi
lea ecx, [ebp - 0x4c]
mov dword [0x45d3cc], esi
call fcn.004033c0
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.0040b431
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x4c]
call fcn.00401ec0
push esi
push dword [0x45d3f4]
lea ecx, [ebp - 0x28]
call fcn.00411bb8
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004119f7
test al, al
jne 0x40ddef
lea ecx, [ebp - 0x1c]
call fcn.00407685
test byte [eax + 0x60], 1
je 0x40ddef
lea ecx, [ebp - 0x1c]
call fcn.00407685
add eax, 0x3c
inc dword [eax]
mov eax, edi
jmp 0x40e385
push esi
push dword [0x45d3f4]
lea ecx, [ebp - 0x28]
call fcn.00411bb8
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004119f7
test al, al
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
jne 0x40de9c
lea ecx, [ebp - 0x1c]
call fcn.00407685
cmp dword [eax + 0x34], ebx
je 0x40de33
lea ecx, [ebp - 0x1c]
call fcn.00407685
cmp dword [eax + 0x34], 0xffffffff
jne 0x40de9c
call fcn.004118e7
test eax, eax
push ebx
push ebx
push 3
push ebx
je 0x40de45
push 3
jmp 0x40de47
push 7
push 0x80000000
push dword [ebp - 0x10]
call edi
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x40de7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.CreateFile__s__fails_with__d_n
push 0x44d160
call fcn.00406a88
add esp, 0x10
xor eax, eax
inc eax
jmp 0x40e385
lea ecx, [ebp - 0x1c]
call fcn.00407685
lea ecx, [ebp - 0x1c]
mov dword [eax + 0x34], esi
call fcn.00407685
mov esi, eax
add esi, 0x1c
jmp 0x40df57
push esi
push dword [0x45d3f4]
lea ecx, [ebp - 0x28]
call fcn.00411bb8
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004119f7
test al, al
jne 0x40deeb
lea ecx, [ebp - 0x1c]
call fcn.00407685
cmp dword [eax + 0x34], ebx
je 0x40deeb
lea ecx, [ebp - 0x1c]
call fcn.00407685
cmp dword [eax + 0x34], 0xffffffff
je 0x40deeb
lea ecx, [ebp - 0x1c]
call fcn.00407685
mov esi, eax
mov eax, dword [esi + 0x34]
add esi, 0x1c
mov dword [ebp - 0x14], eax
jmp 0x40df57
call fcn.004118e7
test eax, eax
push ebx
push ebx
push 3
push ebx
je 0x40defd
push 3
jmp 0x40deff
push 7
push 0x80000000
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x40de5b
push dword [ebp - 0x10]
lea ecx, [ebp - 0x4c]
call fcn.004033c0
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov dword [ebp - 4], 2
call fcn.0040d79f
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x4c]
mov esi, eax
call fcn.00401ec0
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.00403400
mov eax, dword [esi + 0x44]
cmp eax, ebx
jne 0x40e11f
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [esi + 0x44], eax
je 0x40dfc4
push eax
push dword [ebp - 0x10]
push str._s_has_fa_x
push 0x20
push 0x44d160
call fcn.00401110
add esp, 0x14
test byte [esi + 0x44], 1
jne 0x40dfc4
push ebx
push ebx
push 3
push ebx
push 3
push 0x40000000
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
je 0x40dfae
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x40dfc0
cmp eax, 0x1779
jne 0x40dfc4
or dword [esi + 0x44], 1
mov eax, dword [esi + 0x1c]
cmp eax, 5
je 0x40e130
cmp eax, ebx
jne 0x40e001
push dword [ebp - 0x10]
lea eax, [ebp + 0x3e8]
push 0x104
push eax
call fcn.00421daf
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 [0x45d2c8], bl
mov edi, 0x45d2c8
jne 0x40e01a
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [esi + 8], ebx
je 0x40e048
cmp dword [esi + 0x18], 0xffffffff
je 0x40e048
cmp byte [0x45d2c8], bl
je 0x40e048
push edi
call fcn.00423fc0
push eax
push dword [ebp - 0x10]
push edi
call fcn.00422c32
add esp, 0x10
test eax, eax
jne 0x40e130
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 0x40e07f
cmp edi, 0xffffffff
je 0x40e07f
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 0x40e383
cmp dword [ebp - 0x14], 0xffffffff
je 0x40e383
push 0x45d3f0
push dword [0x45d3f4]
lea ecx, [ebp - 0x28]
call fcn.00411bb8
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004119f7
test al, al
jne 0x40e0e0
lea ecx, [ebp - 0x1c]
call fcn.00407685
lea ecx, [ebp - 0x30]
push ecx
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 0xffffffff
je 0x40e0e0
lea ecx, [ebp - 0x1c]
call fcn.00407685
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x24]
je 0x40e130
inc dword [esi + 0x24]
push 0x43e610
push dword [ebp - 0x10]
lea eax, [ebp - 0x20]
push eax
call fcn.004263c9
add esp, 0xc
cmp dword [ebp - 0x20], ebx
jne 0x40e138
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.Cannot__tfopen__s___last_error_d
push 0x20
push 0x44d160
call fcn.00401110
add esp, 0x14
jmp 0x40de77
cmp eax, 0xffffffff
je 0x40dfc4
test al, 1
je 0x40dfc4
inc dword [esi + 0x20]
jmp 0x40de77
push 0x3e7
lea eax, [ebp + 1]
push ebx
push eax
mov byte [ebp], bl
call fcn.00421e30
push 0xf9
lea eax, [ebp + 0x4ed]
push ebx
push eax
mov byte [ebp + 0x4ec], bl
call fcn.00421e30
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.0040c7b5
push dword [ebp - 0x20]
lea eax, [ebp]
push 0x3e8
push eax
mov byte [ebp], bl
call fcn.00425c75
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp]
push 0x43e5ec
push eax
call fcn.004227bc
add esp, 0x18
cmp eax, ebx
je 0x40e364
push eax
call fcn.0040aaa1
mov edi, eax
cmp byte [edi], 0x5b
pop ecx
jne 0x40e208
mov esi, 0x43e5e8
push esi
push edi
call fcn.0042569a
cmp eax, edi
pop ecx
pop ecx
jbe 0x40e208
push esi
push edi
call fcn.0042569a
push edi
mov byte [eax], bl
call fcn.00422c49
push eax
call fcn.0040aaa1
push 0xf9
push eax
lea eax, [ebp + 0x4ec]
push 0xfa
push eax
call fcn.00422552
add esp, 0x20
jmp 0x40e364
cmp byte [ebp + 0x4ec], bl
je 0x40e364
mov esi, 0x43e664
push esi
push edi
call fcn.0042569a
test eax, eax
pop ecx
pop ecx
je 0x40e364
cmp byte [edi], 0x3b
je 0x40e364
lea eax, [ebp - 0x14]
push eax
push esi
push edi
call fcn.004227bc
lea eax, [ebp - 0x14]
push eax
push 0x43d8c8
push ebx
call fcn.004227bc
push edi
mov esi, eax
call fcn.0040aaa1
add esp, 0x1c
cmp esi, ebx
mov edi, eax
je 0x40e292
push esi
call fcn.0040aaa1
mov esi, eax
cmp byte [esi], 0x22
pop ecx
jne 0x40e28e
push esi
call fcn.00423fc0
cmp byte [eax + esi - 1], 0x22
pop ecx
jne 0x40e28e
push esi
call fcn.00422c49
mov esi, eax
push esi
call fcn.00423fc0
pop ecx
pop ecx
mov byte [eax + esi - 1], bl
cmp esi, ebx
jne 0x40e297
mov esi, 0x43c600
push edi
lea ecx, [ebp - 0x84]
call fcn.004033c0
lea eax, [ebp + 0x4ec]
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 3
call fcn.004033c0
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x68]
push eax
mov byte [ebp - 4], 4
call fcn.0040cac7
mov ecx, eax
add ecx, 0xc
call fcn.00407dfc
push esi
mov ecx, eax
call fcn.00403400
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x68]
call fcn.00401ec0
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x84]
call fcn.00401ec0
push edi
lea ecx, [ebp - 0xa0]
call fcn.004033c0
lea eax, [ebp + 0x4ec]
push eax
lea ecx, [ebp - 0xbc]
mov dword [ebp - 4], 5
call fcn.004033c0
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0xbc]
push eax
mov byte [ebp - 4], 6
call fcn.0040cac7
mov ecx, eax
call fcn.004046b0
push ebx
push esi
lea ecx, [ebp - 0xbc]
call fcn.00401ec0
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0xa0]
call fcn.00401ec0
push dword [ebp - 0x20]
call fcn.00425c46
test eax, eax
pop ecx
je 0x40e183
push dword [ebp - 0x20]
call fcn.00426147
pop ecx
jmp 0x40de77
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.00421e14
add ebp, 0x5ec
leave
ret