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

Disassembly:
push ebp
sub esp, 0x6ec
lea ebp, [esp - 4]
mov eax, dword [0x517774]
xor eax, ebp
mov dword [ebp + 0x6ec], eax
push 0xb0
mov eax, 0x4cb56d
call fcn.0049aeba
mov edi, dword [ebp + 0x6f8]
xor ebx, ebx
mov dword [ebp - 0x10], edi
cmp edi, ebx
je 0x435510
test byte [0x5297a0], 1
jne 0x434ea4
or dword [0x5297a0], 1
mov esi, 0x529780
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.00434e21
push 0x4d25f2
call fcn.00498212
or dword [ebp - 4], 0xffffffff
pop ecx
jmp 0x434ea9
mov esi, 0x529780
push edi
lea ecx, [ebp - 0x4c]
mov dword [0x52975c], esi
call fcn.00402a30
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.004310af
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x4c]
call fcn.00401a30
push esi
push dword [0x529798]
lea ecx, [ebp - 0x24]
call fcn.0042f5bf
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042ead3
test al, al
jne 0x434f2a
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
cmp dword [eax + 0x74], 0xffffffff
je 0x434f2a
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
test byte [eax + 0x74], 1
je 0x434f2a
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
add eax, 0x50
inc dword [eax]
mov eax, edi
jmp 0x435512
push esi
push dword [0x529798]
lea ecx, [ebp - 0x24]
call fcn.0042f5bf
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042ead3
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
test al, al
jne 0x434fd7
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
cmp dword [eax + 0x48], ebx
je 0x434f6e
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
cmp dword [eax + 0x48], 0xffffffff
jne 0x434fd7
call fcn.004280af
push ebx
push ebx
push 3
push ebx
test eax, eax
je 0x434f80
push 3
jmp 0x434f82
push 7
push SysReAllocString
push dword [ebp - 0x10]
call edi
mov esi, eax
mov dword [ebp - 0x14], eax
cmp esi, 0xffffffff
jne 0x434fba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.CreateFile__s__fails_with__d_n
push 0x519518
call fcn.00426fe1
add esp, 0x10
xor eax, eax
inc eax
jmp 0x435512
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
lea ecx, [ebp - 0x1c]
mov dword [eax + 0x48], esi
call fcn.0042ec85
mov esi, eax
add esi, 0x1c
jmp 0x435092
push esi
push dword [0x529798]
lea ecx, [ebp - 0x24]
call fcn.0042f5bf
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042ead3
test al, al
jne 0x435026
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
cmp dword [eax + 0x48], ebx
je 0x435026
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
cmp dword [eax + 0x48], 0xffffffff
je 0x435026
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
mov esi, eax
mov eax, dword [esi + 0x48]
add esi, 0x1c
mov dword [ebp - 0x14], eax
jmp 0x435092
call fcn.004280af
push ebx
push ebx
push 3
push ebx
test eax, eax
je 0x435038
push 3
jmp 0x43503a
push 7
push SysReAllocString
push dword [ebp - 0x10]
call edi
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x434f96
push dword [ebp - 0x10]
lea ecx, [ebp - 0x4c]
call fcn.00402a30
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov dword [ebp - 4], 2
call fcn.004347e7
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x4c]
mov esi, eax
call fcn.00401a30
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x10]
lea ecx, [esi + 0x3c]
mov dword [esi + 0x58], ebx
mov dword [esi + 0x2c], eax
call fcn.004022d0
mov eax, dword [esi + 0x58]
cmp eax, ebx
jne 0x4352ac
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [esi + 0x58], eax
cmp eax, 0xffffffff
je 0x4350ff
push eax
push dword [ebp - 0x10]
push str._s_has_fa_x
push 0x20
push 0x519518
call fcn.00402450
add esp, 0x14
test byte [esi + 0x58], 1
jne 0x4350ff
push ebx
push ebx
push 3
push ebx
push 3
push 0x40000000
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
je 0x4350e9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x4350fb
cmp eax, 0x1779
jne 0x4350ff
or dword [esi + 0x58], 1
mov eax, dword [esi + 0x30]
cmp eax, 5
je 0x4352bd
mov edi, 0x104
cmp eax, ebx
jne 0x43513d
push dword [ebp - 0x10]
lea eax, [ebp + 0x3e8]
push edi
push eax
call fcn.00497fe1
add esp, 0xc
lea eax, [ebp + 0x3e8]
push eax
mov byte [ebp + 0x3eb], bl
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [esi + 0x30], eax
cmp byte [0x529658], bl
jne 0x435151
push edi
push 0x529658
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x103
lea eax, [ebp + 0x4ed]
push ebx
push eax
mov byte [ebp + 0x4ec], bl
call fcn.00497680
lea eax, [ebp + 0x4ec]
push edi
push eax
call fcn.0042e640
add esp, 0x14
cmp dword [esi + 8], ebx
je 0x4351d7
cmp dword [esi + 0x2c], 0xffffffff
je 0x4351d7
cmp byte [0x529658], bl
je 0x4351d7
cmp byte [ebp + 0x4ec], bl
je 0x4351d7
mov edi, 0x529658
push edi
call fcn.004998a0
push eax
push dword [ebp - 0x10]
push edi
call fcn.004979da
add esp, 0x10
test eax, eax
je 0x4351d7
lea eax, [ebp + 0x4ec]
push eax
call fcn.004998a0
push eax
push dword [ebp - 0x10]
lea eax, [ebp + 0x4ec]
push eax
call fcn.004979da
add esp, 0x10
test eax, eax
jne 0x4352bd
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push ebx
push edi
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
cmp edi, ebx
je 0x43520c
cmp edi, 0xffffffff
je 0x43520c
or dword [esi + 0x2c], 0xffffffff
push edi
mov dword [esi + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], ebx
je 0x435510
cmp dword [ebp - 0x14], 0xffffffff
je 0x435510
push 0x529780
push dword [0x529798]
lea ecx, [ebp - 0x24]
call fcn.0042f5bf
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042ead3
test al, al
jne 0x43526d
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
lea ecx, [ebp - 0x30]
push ecx
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 0xffffffff
je 0x43526d
lea ecx, [ebp - 0x1c]
call fcn.0042ec85
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x24]
je 0x4352bd
inc dword [esi + 0x38]
push 0x4ddff0
push dword [ebp - 0x10]
lea eax, [ebp - 0x28]
push eax
call fcn.0049c887
add esp, 0xc
cmp dword [ebp - 0x28], ebx
jne 0x4352c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x10]
push str.Cannot__tfopen__s___last_error_d
push 0x20
push 0x519518
call fcn.00402450
add esp, 0x14
jmp 0x434fb2
cmp eax, 0xffffffff
je 0x4350ff
test al, 1
je 0x4350ff
inc dword [esi + 0x34]
jmp 0x434fb2
push 0x3e7
lea eax, [ebp + 1]
push ebx
push eax
mov byte [ebp], bl
call fcn.00497680
push 0xf9
lea eax, [ebp + 0x5f1]
push ebx
push eax
mov byte [ebp + 0x5f0], bl
call fcn.00497680
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.00433648
push dword [ebp - 0x28]
lea eax, [ebp]
push 0x3e8
push eax
mov byte [ebp], bl
call fcn.0049bee9
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp]
push 0x4ddfcc
push eax
call fcn.00498c3e
add esp, 0x18
cmp eax, ebx
je 0x4354f1
push eax
call fcn.0042e1c5
mov edi, eax
cmp byte [edi], 0x5b
pop ecx
jne 0x435395
mov esi, 0x4ddfc8
push esi
push edi
call fcn.0049858b
pop ecx
pop ecx
cmp eax, edi
jbe 0x435395
push esi
push edi
call fcn.0049858b
push edi
mov byte [eax], bl
call fcn.00497f9b
push eax
call fcn.0042e1c5
push 0xf9
push eax
lea eax, [ebp + 0x5f0]
push 0xfa
push eax
call fcn.004976fa
add esp, 0x20
jmp 0x4354f1
cmp byte [ebp + 0x5f0], bl
je 0x4354f1
mov esi, 0x4de044
push esi
push edi
call fcn.0049858b
pop ecx
pop ecx
test eax, eax
je 0x4354f1
cmp byte [edi], 0x3b
je 0x4354f1
lea eax, [ebp - 0x14]
push eax
push esi
push edi
call fcn.00498c3e
lea eax, [ebp - 0x14]
push eax
push 0x4d65f0
push ebx
call fcn.00498c3e
push edi
mov esi, eax
call fcn.0042e1c5
add esp, 0x1c
mov edi, eax
cmp esi, ebx
je 0x43541f
push esi
call fcn.0042e1c5
mov esi, eax
cmp byte [esi], 0x22
pop ecx
jne 0x43541b
push esi
call fcn.004998a0
cmp byte [eax + esi - 1], 0x22
pop ecx
jne 0x43541b
push esi
call fcn.00497f9b
mov esi, eax
push esi
call fcn.004998a0
pop ecx
pop ecx
mov byte [eax + esi - 1], bl
cmp esi, ebx
jne 0x435424
mov esi, 0x4d41fc
push edi
lea ecx, [ebp - 0xbc]
call fcn.00402a30
lea eax, [ebp + 0x5f0]
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 3
call fcn.00402a30
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0x68]
push eax
mov byte [ebp - 4], 4
call fcn.00433967
mov ecx, eax
add ecx, 0x1c
call fcn.0042ac9e
push esi
mov ecx, eax
call fcn.004022d0
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x68]
call fcn.00401a30
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0xbc]
call fcn.00401a30
push edi
lea ecx, [ebp - 0x84]
call fcn.00402a30
lea eax, [ebp + 0x5f0]
push eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 5
call fcn.00402a30
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0xa0]
push eax
mov byte [ebp - 4], 6
call fcn.00433967
mov ecx, eax
call fcn.0041b7a0
push ebx
push esi
lea ecx, [ebp - 0xa0]
call fcn.00401a30
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x84]
call fcn.00401a30
push dword [ebp - 0x28]
call fcn.0049be81
pop ecx
test eax, eax
je 0x435310
push dword [ebp - 0x28]
call fcn.0049c621
pop ecx
jmp 0x434fb2
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 + 0x6ec]
xor ecx, ebp
call fcn.004974ba
add ebp, 0x6f0
leave
ret