Function at 0x402450
Capabilities:
Delete file
Get file size
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40406b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 4], 1
test esi, esi
jne 0x402485
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov al, byte [ebp + 0x17]
push 0
lea ecx, [ebp - 0x34]
mov byte [ebp - 0x34], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push 1
lea edx, [ebp - 0x11]
mov byte [ebp - 4], 2
mov eax, dword [ecx]
lea ecx, [ebp - 0x34]
push eax
push edx
mov byte [ebp - 0x11], 0x5c
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
mov ecx, dword [ebp - 0x2c]
lea edi, [eax + 1]
mov esi, ecx
sub esi, eax
cmp ecx, edi
jae 0x4024e1
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xran_void_]
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Split_void_]
mov eax, dword [ebp - 0x2c]
sub eax, edi
cmp eax, esi
jae 0x4024f5
mov esi, eax
test esi, esi
jbe 0x40252e
mov ecx, dword [ebp - 0x30]
sub eax, esi
add ecx, edi
push eax
lea edx, [ecx + esi]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
mov edi, dword [ebp - 0x2c]
add esp, 0xc
sub edi, esi
lea ecx, [ebp - 0x34]
push 0
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40252e
push edi
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov edi, 0x4057f4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x4057f4
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov esi, dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
lea edx, [ebp + 8]
push 0x405c08
push edx
call esi
add esp, 8
test al, al
jne 0x4027d7
lea eax, [ebp + 0x18]
push 0x405c08
push eax
call esi
add esp, 8
test al, al
jne 0x4027d7
lea ecx, [ebp - 0x34]
push 0x405c08
push ecx
call esi
add esp, 8
test al, al
jne 0x4027d7
mov eax, dword [ebp + 0x1c]
mov byte [ebp - 4], 3
test eax, eax
jne 0x4025a4
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call ebx
lea edx, [ebp - 0x20]
mov esi, eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0x7270e00
mov dword [ebp - 0x24], edi
ja 0x4027c8
cmp edi, 0x1f40
jb 0x4027c8
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], eax
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x402617
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call ebx
lea edx, [ebp - 0x20]
mov esi, eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov edi, eax
lea eax, [ebp - 0x18]
push 0
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x402668
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push 6
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [ebp - 0x18]
push 0
push ecx
mov esi, eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push esi
call ebx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x18]
push 0
push edx
push eax
push ecx
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp - 0x30]
xor edi, edi
add esp, 8
cmp eax, edi
jne 0x4026c9
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [ebp + 0x1c]
cmp eax, edi
jne 0x4026e1
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push eax
call esi
test eax, eax
je 0x402716
mov eax, dword [ebp + 0x1c]
mov ecx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp eax, edi
je 0x4026fd
mov ecx, eax
mov eax, dword [ebp - 0x30]
cmp eax, edi
jne 0x402709
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
jmp 0x402725
mov eax, dword [ebp - 0x30]
cmp eax, edi
jne 0x402722
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call esi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x30]
cmp ecx, edi
je 0x402750
mov al, byte [ecx - 1]
test al, al
je 0x402746
cmp al, 0xff
je 0x402746
dec al
mov byte [ecx - 1], al
jmp 0x402750
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x30], edi
cmp ecx, edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
je 0x40277c
mov al, byte [ecx - 1]
test al, al
je 0x402772
cmp al, 0xff
je 0x402772
dec al
mov byte [ecx - 1], al
jmp 0x40277c
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp + 0x1c]
mov dword [ebp + 0xc], edi
cmp ecx, edi
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x14], edi
je 0x402807
mov al, byte [ecx - 1]
test al, al
je 0x4027ad
cmp al, 0xff
je 0x4027ad
dec al
mov byte [ecx - 1], al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [ebp + 0x18]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret