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

Disassembly:
push 0xffffffffffffffff
push 0x5213a4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x25c
push ebx
push ebp
push esi
push edi
call fcn.004a7e70
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x38]
mov byte [esp + 0x38], al
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_]
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
mov dword [esp + 0x278], 0
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 0x566ae0
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x24]
push eax
push 0x566ae0
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov edi, dword [esp + 0x298]
mov ebp, dword [esp + 0x294]
mov ebx, dword [esp + 0x290]
mov ecx, dword [esp + 0x28c]
lea edx, [esp + 0x34]
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x28c]
push eax
mov eax, dword [esp + 0x28c]
push esi
push edi
push ebp
push ebx
push ecx
push edx
push eax
mov byte [esp + 0x298], 1
call fcn.004a7710
add esp, 0x24
lea ecx, [esp + 0x24]
mov byte [esp + 0x274], 0
push 1
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_]
mov ecx, dword [esp + 0x27c]
lea edx, [esp + 0x34]
push ecx
push edx
call fcn.004a7580
mov al, byte [esp + 0x1b]
add esp, 8
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], al
push 0
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_]
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
mov byte [esp + 0x278], 2
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 0x566ad8
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x24]
push eax
push 0x566ad8
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
lea edx, [esp + 0x14]
mov byte [esp + 0x274], 3
push edx
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0x290]
mov edx, dword [esp + 0x28c]
push eax
mov eax, dword [esp + 0x28c]
push esi
push edi
push ebp
push ebx
push ecx
push edx
push eax
call fcn.004a7710
add esp, 0x24
lea ecx, [esp + 0x24]
mov byte [esp + 0x274], 2
push 1
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_]
mov esi, dword [esp + 0x29c]
xor ebp, ebp
cmp dword [esi + 8], ebp
je 0x4a82d3
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x66]
mov word [esp + 0x64], bp
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
cmp ecx, 0x103
stosw word es:[edi], ax
jbe 0x4a81d0
mov ecx, 0x103
mov eax, dword [esp + 0x18]
cmp eax, ebp
jne 0x4a81dd
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 ecx
lea ecx, [esp + 0x68]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov edi, eax
lea ecx, [esp + 0x14]
push 1
push edi
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 0x4a8237
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x64]
push edi
push ecx
push edx
call fcn.0049d830
add esp, 0xc
lea ecx, [esp + 0x14]
push edi
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__::_Eos_unsigned_int_]
lea eax, [esp + 0x14]
push 0x5628d4
lea ecx, [esp + 0x48]
push eax
push ecx
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
push esi
lea edx, [esp + 0x64]
push eax
push edx
mov byte [esp + 0x28c], 4
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
push 0x566acc
push eax
lea eax, [esp + 0x44]
mov bl, 5
push eax
mov byte [esp + 0x298], bl
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0x24
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov byte [esp + 0x274], 6
mov edx, dword [ecx]
lea ecx, [esp + 0x14]
push edx
push ebp
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x28]
mov byte [esp + 0x278], bl
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 1
lea ecx, [esp + 0x58]
mov byte [esp + 0x278], 4
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 1
lea ecx, [esp + 0x48]
mov byte [esp + 0x278], 2
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_]
mov esi, dword [esp + 0x280]
cmp dword [esi + 8], ebp
je 0x4a831a
mov eax, dword [esi + 4]
cmp eax, ebp
jne 0x4a82eb
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
je 0x4a831a
mov eax, dword [esp + 0x18]
mov edx, 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 eax, ebp
mov ecx, edx
je 0x4a8308
mov ecx, eax
mov eax, dword [esi + 4]
cmp eax, ebp
jne 0x4a8311
mov eax, edx
push ebp
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [esp + 0x18]
cmp ecx, ebp
je 0x4a8340
mov al, byte [ecx - 1]
test al, al
je 0x4a8334
cmp al, 0xff
je 0x4a8334
dec al
mov byte [ecx - 1], al
jmp 0x4a8340
add ecx, 0xfffffffe
push ecx
call fcn.0051d79a
add esp, 4
mov ecx, dword [esp + 0x38]
pop edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
pop esi
cmp ecx, ebp
pop ebp
pop ebx
je 0x4a838b
mov al, byte [ecx - 1]
test al, al
je 0x4a837f
cmp al, 0xff
je 0x4a837f
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x25c]
mov dword fs:[0], ecx
add esp, 0x268
ret 0x24
add ecx, 0xfffffffe
push ecx
call fcn.0051d79a
add esp, 4
mov ecx, dword [esp + 0x25c]
mov dword fs:[0], ecx
add esp, 0x268
ret 0x24