Function at 0x4096d0
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x447c09
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x14], edi
mov esi, dword [esp + 0x30]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
xor ebp, ebp
cmp esi, ebp
mov dword [esp + 0x24], ebp
je 0x409706
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x409764
mov ecx, edi
call fcn.00409910
cmp esi, ebp
je 0x40974e
mov al, byte [esi - 1]
test al, al
je 0x409742
cmp al, 0xff
je 0x409742
dec al
pop edi
mov byte [esi - 1], al
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 0x10
add esi, 0xfffffffe
push esi
call fcn.0043c8a0
add esp, 4
pop edi
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 0x10
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
cmp esi, ebp
je 0x40976f
mov eax, esi
push ebx
push ebp
push 0x80
push 3
push ebp
push 7
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4098c8
push ebp
push ebx
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea edi, [esi + 2]
push edi
call fcn.0043c870
mov ecx, edi
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x18]
push eax
push esi
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4098b0
cmp byte [ebp], 0xff
jne 0x409838
cmp byte [ebp + 1], 0xfe
jne 0x409838
push ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov esi, eax
mov ecx, 0x457ff0
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x4098b0
mov eax, dword [0x457ff4]
mov ecx, ebp
test esi, esi
jbe 0x409824
mov edx, esi
mov di, word [ecx]
add ecx, 2
mov word [eax], di
add eax, 2
dec edx
jne 0x409815
mov ecx, dword [0x457ff4]
mov dword [0x457ff8], esi
mov word [ecx + esi*2], 0
jmp 0x4098b0
lea edx, [esp + 0x1c]
lea eax, [esp + 0x10]
push edx
push eax
push esi
push ebp
mov dword [esp + 0x20], 0
call fcn.00430e10
mov eax, dword [esp + 0x20]
push eax
mov edi, eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 0x14
mov esi, eax
mov ecx, 0x457ff0
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x4098a3
mov eax, dword [0x457ff4]
mov ecx, edi
test esi, esi
jbe 0x409891
mov edx, esi
mov di, word [ecx]
add ecx, 2
mov word [eax], di
add eax, 2
dec edx
jne 0x409882
mov ecx, dword [0x457ff4]
mov dword [0x457ff8], esi
mov word [ecx + esi*2], 0
mov edx, dword [esp + 0x10]
push edx
call fcn.0043c8a0
add esp, 4
push ebp
call fcn.0043c8a0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x34]
mov ecx, edi
call fcn.00409910
test esi, esi
pop ebx
je 0x4098f2
mov al, byte [esi - 1]
test al, al
je 0x4098e6
cmp al, 0xff
je 0x4098e6
dec al
mov byte [esi - 1], al
jmp 0x4098f2
add esi, 0xfffffffe
push esi
call fcn.0043c8a0
add esp, 4
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
mov al, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x1c
ret 0x10