Function at 0x404ec0
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4252c6
mov eax, dword fs:[0]
push eax
sub esp, 0x8c4
mov eax, dword [0x443624]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
call fcn.00404a20
mov dword [ebp - 0x8cc], eax
lea ecx, [ebp - 0x8c4]
lea eax, [ebp - 0x8cc]
push eax
call fcn.004012a0
cmp dword [ebp - 0x89c], 0
mov dword [ebp - 4], 0
je 0x405245
mov ecx, dword [esi + 0x24]
push 0x618
push 0
mov dword [ebp - 0x8c8], ecx
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x83c], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x838], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x834], eax
lea eax, [ebp - 0x830]
push eax
call fcn.00413a20
add esp, 0xc
xor edi, edi
mov edi, edi
movzx ecx, di
lea esi, [ebp - 0x830]
imul eax, ecx, 0x208
mov ebx, dword [ebp + ecx*4 - 0x83c]
push ebx
add esi, eax
mov dword [ebp - 0x8d0], ebx
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 0x8cc], eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test eax, eax
je 0x40523d
cmp word [eax], 0
je 0x40523d
push eax
push dword [ebp - 0x8cc]
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
je 0x40523d
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push 0x42626c
push 0x104
push esi
mov ebx, eax
call fcn.004069f0
test eax, eax
js 0x40523d
test ebx, ebx
je 0x404ff5
push ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
test eax, eax
je 0x40523d
push 0
push esi
push dword [ebp - 0x8d0]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x405245
inc edi
cmp di, 3
jb 0x404f60
lea eax, [ebp - 0x830]
mov dword [ebp - fcn.00407800], vtable.std::_Func_impl_no_alloc_class__lambda_464d2fa0c2797f4bdf423e89e90720df___void__wchar_t____3__260__.0
mov dword [ebp - 0x860], eax
lea ecx, [ebp - 0x864]
lea eax, [ebp - 0x864]
mov dword [ebp - 0x870], 0
mov dword [ebp - 0x840], eax
lea eax, [ebp - 0x894]
push eax
call fcn.00407800
mov ecx, dword [ebp - 0x840]
mov dword [ebp - 0x870], eax
test ecx, ecx
je 0x405081
mov edx, dword [ecx]
lea eax, [ebp - 0x864]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
xor ecx, ecx
mov dword [ebp - 0x840], ecx
lea eax, [ebp - 0x830]
mov dword [ebp - 0x86c], eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x4050b3
mov edx, dword [ecx]
lea eax, [ebp - 0x864]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [ebp - 0x840], 0
cmp dword [ebp + 0xc], 0
je 0x405176
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor edi, edi
jmp 0x4050d0
mov esi, dword [ebp - 0x89c]
lea eax, [ebp - 0x218]
mov ecx, eax
mov edx, 0x104
sub esi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x405103
movzx ecx, word [eax + esi]
test cx, cx
je 0x405103
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4050e5
test edx, edx
lea ecx, [eax - 2]
cmovne ecx, eax
xor eax, eax
mov word [ecx], ax
test edx, edx
je 0x405172
push 0x426490
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
je 0x405172
movzx eax, di
lea esi, [ebp - 0x830]
imul eax, eax, 0x208
add esi, eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
je 0x405172
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.00403350
add esp, 8
test eax, eax
je 0x405172
inc edi
cmp di, 3
jb 0x4050d0
mov edi, 1
jmp 0x4051e5
xor edi, edi
jmp 0x4051e5
mov eax, dword [ebp - 0x8c8]
lea ecx, [ebp - 0x420]
push dword [eax + 0x24]
push dword [eax + 0x20]
push 0x42626c
push 0x42626c
push ecx
lea ecx, [ebp - 0x628]
push ecx
lea ecx, [ebp - 0x830]
push ecx
push dword [eax + 8]
push dword [eax + 4]
push dword [eax]
call fcn.00403d20
mov esi, eax
add esp, 0x28
test esi, esi
je 0x4051cc
push esi
push 3
push 0
call sub.WINSPOOL.DRV_AddPrinterDriverW
test eax, eax
je 0x4051cc
mov edi, 1
jmp 0x4051ce
xor edi, edi
test esi, esi
je 0x4051e5
lea eax, [esi - 4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x86c]
mov byte [ebp - 4], 3
test eax, eax
je 0x405213
mov ecx, dword [ebp - 0x870]
mov dword [ebp - 0x8c8], eax
test ecx, ecx
je 0x4052b0
mov eax, dword [ecx]
lea edx, [ebp - 0x8c8]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x870]
test ecx, ecx
je 0x405247
mov edx, dword [ecx]
lea eax, [ebp - 0x894]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [ebp - 0x870], 0
jmp 0x405247
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 4], 4
test eax, eax
je 0x405274
mov ecx, dword [ebp - 0x8a0]
mov dword [ebp - 0x8c8], eax
test ecx, ecx
je 0x4052b5
mov eax, dword [ecx]
lea edx, [ebp - 0x8c8]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x8a0]
test ecx, ecx
je 0x405292
mov esi, dword [ecx]
lea eax, [ebp - 0x8c4]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411faa
mov esp, ebp
pop ebp
ret
call fcn.00411cb0
call fcn.00411cb0
int3