Function at 0x405250
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x411acc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esp + 0x68]
xor ebx, ebx
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x64], ebx
call fcn.00410ce8
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 8]
cmp eax, ebx
jle 0x4052a4
mov dl, byte [eax + ecx - 1]
dec eax
cmp dl, 0x5c
je 0x4052a4
cmp eax, ebx
jg 0x405296
lea ecx, [eax + ecx + 1]
push ecx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 1
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x60], 2
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x60], 3
call sub.MFC42.DLL_CString::CString_1
mov dl, byte [esp + 0x68]
mov esi, dword [ebp + 0xa4]
push ebx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x64], 4
mov byte [esp + 0x2c], dl
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, [esp + 0x30]
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_]
lea esi, [ebp + 0x10c]
mov byte [esp + 0x60], 5
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
lea edi, [esi + 8]
push eax
push ecx
mov ecx, edi
call fcn.00407360
mov ecx, edi
call fcn.00407340
lea ecx, [esi + 0x20]
mov dword [esi + 4], eax
mov byte [esi + 0x19], 1
mov dword [esi + 0x1c], ebx
call fcn.004074e0
lea ecx, [esi + 0x34]
mov dword [esi + 0x30], ebx
call fcn.004075c0
mov eax, dword [esi + 0x10]
lea edi, [esi + 8]
lea ecx, [esp + 0x28]
push ecx
push eax
mov ecx, edi
call fcn.00407b00
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
push ebx
push eax
push ecx
call fcn.00408b30
mov ebp, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
push ebp
push eax
call fcn.00408e30
add esp, 0x14
push ebp
push eax
push ebp
push eax
call fcn.00408e70
add esp, 0xc
mov ecx, edi
push eax
call fcn.00407360
mov eax, dword [edi + 4]
cmp eax, ebx
jne 0x4053a3
xor edi, edi
jmp 0x4053ab
mov edi, dword [edi + 8]
sub edi, eax
sar edi, 4
mov dl, byte [esp + 0x68]
push ebx
lea ecx, [esp + 0x4c]
mov dword [esi + 4], edi
mov byte [esp + 0x4c], dl
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, 0x4172c0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x4172c0
lea ecx, [esp + 0x50]
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 al, byte [esp + 0x68]
xor ebp, ebp
mov bl, 6
push ebp
lea ecx, [esp + 0x3c]
mov byte [esp + 0x64], bl
mov byte [esp + 0x3c], 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, 0x4172c0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x4172c0
lea ecx, [esp + 0x40]
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_]
lea ecx, [esp + 0x48]
lea edx, [esp + 0x38]
push ecx
push edx
push 1
mov ecx, esi
mov byte [esp + 0x6c], 7
call fcn.0040b6c0
push 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x64], bl
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, [esp + 0x4c]
mov byte [esp + 0x64], 5
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 eax, dword [esp + 0x68]
lea ecx, [esp + 0x14]
push eax
mov dword [esp + 0x20], ebp
call fcn.00410ce8
mov eax, dword [esi + 0x30]
xor edi, edi
cmp eax, ebp
jle 0x40547f
mov edx, dword [esi + 0x38]
xor ecx, ecx
mov ebx, dword [ecx + edx + 0x10]
add ecx, 0x24
add edi, ebx
dec eax
jne 0x405473
xor ebx, ebx
cmp edi, ebp
jle 0x4054f4
mov ebp, dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x48]
push ebx
push ecx
mov ecx, esi
call fcn.00403440
mov eax, dword [eax + 4]
mov byte [esp + 0x60], 8
test eax, eax
jne 0x4054a9
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
lea ecx, [esp + 0x14]
call fcn.00410ce8
push 1
lea ecx, [esp + 0x4c]
mov byte [esp + 0x64], 5
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 edx, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x4054ed
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 0
push eax
push ecx
call ebp
test eax, eax
je 0x4054ed
inc dword [esp + 0x1c]
inc ebx
cmp ebx, edi
jl 0x40548b
xor ebp, ebp
mov eax, dword [esp + 0x2c]
cmp eax, ebp
je 0x405519
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x405510
cmp al, 0xff
je 0x405510
dec al
mov byte [ecx], al
jmp 0x405519
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x24]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov byte [esp + 0x60], 3
call fcn.00410bb6
lea ecx, [esp + 0x10]
mov byte [esp + 0x60], 2
call fcn.00410bb6
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 1
call fcn.00410bb6
lea ecx, [esp + 0x20]
mov byte [esp + 0x60], 0
call fcn.00410bb6
lea ecx, [esp + 0x18]
mov dword [esp + 0x60], 0xffffffff
call fcn.00410bb6
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x54
ret 4