Function at 0x402f20
Capabilities:
Check if file exists
Read file on windows

Disassembly:
mov eax, dword [0x456b00]
sub esp, 0xd0
cmp eax, 4
push ebx
push ebp
jne 0x4031bd
mov eax, dword [0x45829c]
xor ebp, ebp
cmp eax, ebp
jne 0x402f46
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]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402f57
mov dword [0x45823c], ebp
mov eax, dword [0x45829c]
cmp eax, ebp
jne 0x402f65
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]
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
jne 0x402f92
mov dword [0x45823c], ebp
pop ebp
pop ebx
add esp, 0xd0
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [esp + 0x14]
push ebp
push eax
push 4
push 0x45823c
push ebx
mov dword [esp + 0x28], ebp
call esi
lea ecx, [esp + 0x14]
push ebp
push ecx
lea edx, [esp + 0x18]
push 4
push edx
push ebx
mov dword [esp + 0x24], ebp
call esi
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], bp
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
push ebp
stosw word es:[edi], ax
lea eax, [esp + 0x18]
lea edx, [ecx + ecx]
push eax
lea eax, [esp + 0x20]
push edx
push eax
push ebx
call esi
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov edi, eax
add esp, 4
cmp edi, 0x7ffffffd
jbe 0x40300a
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [0x45802c]
cmp eax, ebp
je 0x403036
mov cl, byte [eax - 1]
test cl, cl
je 0x403036
cmp cl, 0xff
je 0x403036
cmp edi, ebp
jne 0x403065
dec cl
push ebp
mov byte [eax - 1], cl
mov ecx, 0x458028
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x403094
cmp edi, ebp
jne 0x403049
push 1
mov ecx, 0x458028
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x403094
mov ecx, dword [0x458034]
cmp ecx, 0x1f
ja 0x403058
cmp ecx, edi
jae 0x403076
push 1
mov ecx, 0x458028
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push edi
mov ecx, 0x458028
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Copy_unsigned_int_]
mov eax, dword [0x45802c]
lea edx, [esp + 0x18]
push edi
push edx
push eax
call fcn.00401270
mov eax, dword [0x45802c]
mov dword [0x458030], edi
add esp, 0xc
mov word [eax + edi*2], bp
lea ecx, [esp + 0x14]
push ebp
push ecx
push 1
push 0x4582d1
push ebx
call esi
lea edx, [esp + 0x14]
push ebp
push edx
lea eax, [esp + 0x18]
push 4
push eax
push ebx
call esi
mov eax, dword [esp + 0x10]
cmp eax, ebp
jle 0x4031b4
lea ecx, [eax + eax + 2]
push ecx
call fcn.0043c870
mov edx, dword [esp + 0x14]
mov ebp, eax
xor eax, eax
mov edi, ebp
lea ecx, [edx + edx + 2]
add esp, 4
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
lea edx, [ecx + ecx + 2]
push edx
push ebp
push ebx
call esi
push ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
mov esi, eax
add esp, 4
cmp esi, 0x7ffffffd
jbe 0x403117
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [0x457f0c]
test eax, eax
je 0x403143
mov cl, byte [eax - 1]
test cl, cl
je 0x403143
cmp cl, 0xff
je 0x403143
test esi, esi
jne 0x403172
dec cl
push esi
mov byte [eax - 1], cl
mov ecx, 0x457f08
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x4031ab
test esi, esi
jne 0x403156
push 1
mov ecx, 0x457f08
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x4031ab
mov ecx, dword [0x457f14]
cmp ecx, 0x1f
ja 0x403165
cmp ecx, esi
jae 0x403183
push 1
mov ecx, 0x457f08
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push esi
mov ecx, 0x457f08
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Copy_unsigned_int_]
mov eax, dword [0x457f0c]
test esi, esi
mov ecx, ebp
jbe 0x40319f
mov edx, esi
mov di, word [ecx]
add ecx, 2
mov word [eax], di
add eax, 2
dec edx
jne 0x40318b
mov eax, dword [0x457f0c]
mov dword [0x457f10], esi
mov word [eax + esi*2], 0
push ebp
call fcn.0043c8a0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd0
ret