Function at 0x4080cd
Capabilities:
Check if file exists
Copy file

Disassembly:
mov eax, 0x4da5d0
call fcn.004d1d50
sub esp, 0x58
mov eax, dword [0x52e400]
push ebx
xor eax, ebp
push esi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x50], eax
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov eax, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
push dword [eax]
xor ebx, ebx
push 0x5c
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
cmp eax, dword [ecx]
je 0x408125
push eax
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::resize_unsigned_int_]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
call esi
cmp eax, 1
jne 0x408165
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call esi
cmp eax, 1
jne 0x408165
push dword [ebp + 0x10]
push dword [ebp - 0x50]
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
je 0x4082a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4082a6
push ebx
lea eax, [ebp - 0x4c]
push eax
push 0x4ec6d4
push edi
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x54], ebx
call fcn.00408a4c
add esp, 0x10
cmp eax, ebx
jne 0x4082a6
push ebx
lea eax, [ebp - 0x54]
push eax
push 0x4ec6cc
push dword [ebp - 0x50]
call fcn.00408a4c
add esp, 0x10
push dword [ebp - 0x4c]
mov esi, eax
cmp esi, ebx
je 0x4081b1
call fcn.00407908
pop ecx
mov ebx, esi
jmp 0x4082a8
call fcn.004078d2
cmp edx, ebx
pop ecx
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
jl 0x40828e
jg 0x4081d5
cmp eax, ebx
jb 0x40828e
push ebx
push 0x1000
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_unsigned_int__char_]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x50], eax
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push ebx
push eax
push dword [ebp - 0x50]
push dword [ebp - 0x4c]
call fcn.004078aa
mov edi, edx
add esp, 0x10
cmp edi, ebx
mov esi, eax
jl 0x408282
jg 0x40821b
cmp esi, ebx
jbe 0x408282
push edi
push esi
push dword [ebp - 0x50]
push dword [ebp - 0x54]
call fcn.00407c05
add esp, 0x10
cmp eax, esi
jne 0x40825d
cmp edx, edi
jne 0x40825d
add dword [ebp - 0x5c], eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
adc dword [ebp - 0x58], edx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x60]
jl 0x4081d5
jg 0x40828e
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x5c], eax
jbe 0x4081d5
jmp 0x40828e
push dword [ebp - 0x4c]
call fcn.00407908
push dword [ebp - 0x54]
call fcn.00407908
pop ecx
pop ecx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ebx, 0x40000003
jmp 0x4082a8
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push dword [ebp - 0x4c]
mov esi, dword [sym.imp.XLFSIO.dll_long_int___stdcall_XLFS_CloseFile_void__]
call esi
cmp eax, ebx
jne 0x4082a6
push dword [ebp - 0x54]
call esi
cmp eax, ebx
je 0x4082a8
mov ebx, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.004d1da7
leave
ret