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

Disassembly:
push 0xffffffffffffffff
push 0x522994
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.004a82f0
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 0x569ae0
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x24]
push eax
push 0x569ae0
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.004a7b90
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.004a7a00
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 0x569ad8
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x24]
push eax
push 0x569ad8
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.004a7b90
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 0x4a8753
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 0x4a8650
mov ecx, 0x103
mov eax, dword [esp + 0x18]
cmp eax, ebp
jne 0x4a865d
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 0x4a86b7
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x64]
push edi
push ecx
push edx
call fcn.0049da60
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 0x5658d4
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 0x569acc
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 0x4a879a
mov eax, dword [esi + 4]
cmp eax, ebp
jne 0x4a876b
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 0x4a879a
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 0x4a8788
mov ecx, eax
mov eax, dword [esi + 4]
cmp eax, ebp
jne 0x4a8791
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 0x4a87c0
mov al, byte [ecx - 1]
test al, al
je 0x4a87b4
cmp al, 0xff
je 0x4a87b4
dec al
mov byte [ecx - 1], al
jmp 0x4a87c0
add ecx, 0xfffffffe
push ecx
call fcn.0051e1fa
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 0x4a880b
mov al, byte [ecx - 1]
test al, al
je 0x4a87ff
cmp al, 0xff
je 0x4a87ff
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.0051e1fa
add esp, 4
mov ecx, dword [esp + 0x25c]
mov dword fs:[0], ecx
add esp, 0x268
ret 0x24