Function at 0x417940
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bf0b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.0040eae0
add esp, 4
movsx cx, byte [0x422af9]
mov edi, dword [ebp - 0x20]
xor ebx, ebx
inc ecx
cmp edi, 4
mov dword [ebp - 4], ebx
mov word [0x422b0e], cx
jbe 0x417d30
mov al, byte [0x4229c0]
add al, 0x62
and eax, 0xff
add eax, 3
and al, 0xfc
call fcn.0041a770
mov ecx, esp
mov edx, 0x4229c0
call fcn.004196b0
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, eax
add edi, 0xfffffffc
lea ecx, [ebp - 0x38]
mov eax, dword [edx]
push eax
push edi
push ecx
lea ecx, [ebp - 0x28]
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__::substr_unsigned_int__unsigned_int_]
mov edx, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp - 4], 1
repne scasb al, byte es:[edi]
mov eax, dword [edx + 8]
not ecx
dec ecx
push ecx
push esi
push eax
push ebx
mov ecx, edx
call dword [sym.imp.MSVCP60.dll_public:_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::compare_unsigned_int__unsigned_int__char_const___unsigned_int_const]
push 1
lea ecx, [ebp - 0x38]
mov esi, eax
mov byte [ebp - 4], 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_]
cmp esi, ebx
je 0x417b48
mov dl, byte [0x422afb]
mov al, byte [0x4229c0]
test dl, dl
setne cl
add al, 0x62
mov word [0x422b0e], 0xffff
and eax, 0xff
mov byte [0x422afa], cl
add eax, 3
and al, 0xfc
call fcn.0041a770
mov ecx, esp
mov edx, 0x4229c0
call fcn.004196b0
push eax
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x38]
push edx
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
mov eax, dword [eax + 4]
mov edx, 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]
add esp, 0xc
cmp eax, ebx
jne 0x417a5e
mov eax, edx
mov ecx, dword [ebp - 0x24]
cmp ecx, ebx
jne 0x417a67
mov ecx, edx
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
push 1
lea ecx, [ebp - 0x38]
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 al, byte [0x4229c0]
add al, 0x62
and eax, 0xff
add eax, 3
and al, 0xfc
call fcn.0041a770
mov ecx, esp
mov edx, 0x4229c0
call fcn.004196b0
mov ebx, eax
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x20]
sub edx, ecx
cmp edx, esi
ja 0x417ac4
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x417b08
mov eax, dword [ebp - 0x20]
push 0
add eax, esi
lea ecx, [ebp - 0x28]
push eax
mov dword [ebp - 0x18], eax
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 0x417b08
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
lea edi, [edx + ecx]
mov ecx, esi
mov eax, ecx
mov esi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov byte [ecx + eax], 0
movsx dx, byte [0x422afd]
movsx eax, byte [0x422afc]
movsx ecx, byte [0x422afa]
add dx, word [0x422b08]
add eax, ecx
cmp word [0x422b02], 0
mov dword [0x422b2c], eax
mov word [0x422b12], dx
setne dl
mov byte [0x422afc], dl
xor ebx, ebx
jmp 0x417b4d
mov eax, dword [0x422b2c]
xor ecx, ecx
cmp eax, ebx
setne cl
cmp word [0x422b04], bx
mov word [0x422b0e], cx
je 0x417b77
mov al, byte [0x422afb]
mov dword [0x422b30], 1
test al, al
jne 0x417b7d
mov dword [0x422b30], ebx
mov al, byte [0x422990]
mov byte [0x422b00], 1
add al, 0x62
and eax, 0xff
add eax, 3
and al, 0xfc
call fcn.0041a770
mov ecx, esp
lea edx, [ebp - 0x14]
push ebx
push edx
push ebx
push 0x20006
push ebx
push ebx
push ebx
mov edx, 0x422990
call fcn.004196b0
push eax
push SysReAllocString
call dword [0x422f7c]
test eax, eax
je 0x417c08
mov al, byte [0x422990]
add al, 0x62
and eax, 0xff
add eax, 3
and al, 0xfc
call fcn.0041a770
mov ecx, esp
lea eax, [ebp - 0x14]
push ebx
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
mov edx, 0x422990
call fcn.004196b0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [0x422f7c]
test eax, eax
jne 0x417d24
mov cx, word [0x422b30]
mov dl, byte [ebp - 0xd]
mov word [0x422b04], cx
mov byte [ebp - 0x38], dl
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov cl, byte [0x422afc]
mov byte [ebp - 4], 2
test cl, cl
setne al
mov byte [0x422b00], al
mov al, byte [0x422aff]
test al, al
je 0x417c55
mov al, byte [0x422af8]
mov dword [0x422b38], 1
test al, al
jne 0x417c5b
mov dword [0x422b38], ebx
lea ecx, [ebp - 0x38]
push ecx
push 7
call fcn.0040af40
mov dl, byte [0x422b0e]
mov ax, word [0x422b08]
and dl, al
mov ecx, dword [ebp - 0x24]
movsx eax, ax
imul eax, dword [0x422b28]
add esp, 8
mov byte [0x422af9], dl
mov edx, 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 ecx, ebx
mov dword [0x422b28], eax
jne 0x417c9b
mov ecx, edx
mov eax, dword [ebp - 0x34]
cmp eax, ebx
jne 0x417ca4
mov eax, edx
mov edx, dword [ebp - 0x20]
push edx
push ecx
push 1
push ebx
push eax
mov eax, dword [ebp - 0x14]
push eax
call dword [0x422f94]
movsx ecx, word [0x422b12]
mov edx, dword [ebp - 0x14]
and ecx, 0x37efffff
push edx
mov dword [0x422b38], ecx
mov byte [0x422afc], 0xfe
call dword [0x422f78]
mov al, byte [0x422aff]
mov cl, byte [0x422b0a]
inc al
mov byte [0x422aff], al
mov al, byte [0x422b12]
dec al
inc cl
mov byte [0x422afc], cl
mov ecx, dword [ebp - 0x34]
cmp ecx, ebx
mov byte [0x422afb], al
je 0x417d24
mov al, byte [ecx - 1]
test al, al
je 0x417d1a
cmp al, 0xff
je 0x417d1a
dec al
mov byte [ecx - 1], al
jmp 0x417d24
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dl, byte [0x422b18]
mov byte [0x422afa], dl
movsx ax, byte [0x422b00]
mov ecx, dword [ebp - 0x24]
dec eax
cmp ecx, ebx
mov word [0x422b12], ax
mov word [0x422b06], 1
je 0x417d7d
mov al, byte [ecx - 1]
test al, al
je 0x417d73
cmp al, 0xff
je 0x417d73
dec al
mov byte [ecx - 1], al
lea esp, [ebp - 0x44]
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]
lea esp, [ebp - 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret