Function at 0x49e970
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x4f958b
mov eax, dword fs:[0]
push eax
sub esp, 0x38c
mov eax, dword [0x5e4ce0]
xor eax, esp
mov dword [esp + 0x388], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e4ce0]
xor eax, esp
push eax
lea eax, [esp + 0x3a0]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3b0]
mov edi, dword [esp + 0x3b4]
mov esi, ecx
mov byte [esi + 8], 0
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], eax
lea ebp, [esi + 0x3c]
mov dword [esi + 0x48], eax
lea ebx, [esi + 0x44]
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
lea ecx, [esi + 0xc]
mov dword [esi + 0x4c], eax
mov byte [esi + 0x28], al
mov dword [esi + 0x2c], eax
call fcn.00451240
mov eax, dword [esp + 0x14]
test eax, eax
mov byte [esi + 0x29], 0
jne 0x49ea13
test edi, edi
je 0x49ea0c
mov edx, dword [edi]
mov eax, dword [edx + 0x10]
push str.loadFileInfoAnsi_failed:_no_filename
mov ecx, edi
call eax
xor al, al
jmp 0x49ebb5
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x49ea96
test edi, edi
je 0x49ea54
lea ecx, [esp + 0x78]
push ecx
push 0x320
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edx, dword [edi]
mov edx, dword [edx + 0x28]
lea eax, [esp + 0x78]
push eax
push str.curDir
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
push str.loadFileInfoAnsi_failed:_cannot_get_attributes
mov ecx, edi
call edx
mov ebx, dword [esp + 0x14]
push edi
push ebx
call fcn.00457560
add esp, 8
test al, al
jne 0x49ea7c
test edi, edi
mov byte [esi + 8], 1
je 0x49ea8f
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
push str.File_does_not_exist.
mov ecx, edi
call edx
test edi, edi
je 0x49ea8f
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
push ebx
push str.filename
mov ecx, edi
call edx
xor al, al
jmp 0x49ebb5
mov dword [esi + 0x4c], eax
shr eax, 4
and al, 1
lea ecx, [esp + 0x1c]
mov byte [esi + 0x28], al
call fcn.004537d0
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x3ac], 0
call fcn.00453a00
lea ecx, [esp + 0x1c]
call fcn.00454170
push eax
lea ecx, [esi + 0xc]
call fcn.00452a60
cmp byte [esi + 0x28], 0
push edi
je 0x49eae8
lea ecx, [esp + 0x20]
push ecx
call fcn.004569f0
jmp 0x49eaf2
lea edx, [esp + 0x20]
push edx
call fcn.00456880
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x49eb3b
test edi, edi
je 0x49eb23
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
push str.loadFileInfoAnsi_failed:_cannot_open_for_reading
mov ecx, edi
call edx
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
push ecx
push str.filename
mov ecx, edi
call edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x3a8], 0xffffffff
call fcn.00453880
xor al, al
jmp 0x49ebb5
lea ecx, [esi + 0x34]
push ecx
push ebx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
jne 0x49eb82
test edi, edi
je 0x49eb71
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
push str.loadFileInfoAnsi_failed:_cannot_get_file_time
mov ecx, edi
call edx
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
push ecx
push str.filename
mov ecx, edi
call edx
mov eax, dword [esp + 0x18]
push 0
push eax
call fcn.004661e0
add esp, 8
jmp 0x49eb23
mov edi, dword [esp + 0x18]
lea ecx, [esi + 0x30]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push edi
mov dword [esi + 0x2c], eax
call fcn.004661e0
add esp, 8
lea ecx, [esp + 0x1c]
mov dword [esp + 0x3a8], 0xffffffff
call fcn.00453880
mov al, 1
mov ecx, dword [esp + 0x3a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x388]
xor ecx, esp
call fcn.004d99c4
add esp, 0x398
ret 8