Function at 0x405400
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4251bb
mov eax, dword fs:[0]
push eax
sub esp, 0x8c4
mov eax, dword [0x444624]
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.00404db0
mov dword [ebp - 0x8cc], eax
lea ecx, [ebp - 0x8c4]
lea eax, [ebp - 0x8cc]
push eax
call fcn.00401240
cmp dword [ebp - 0x89c], 0
mov dword [ebp - 4], 0
je 0x405764
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.004140a0
add esp, 0xc
xor edi, edi
mov edi, edi
mov ecx, dword [ebp - 0x89c]
lea esi, [ebp - 0x830]
movzx eax, di
mov dword [ebp - 0x8cc], ecx
mov ebx, dword [ebp + eax*4 - 0x83c]
imul eax, eax, 0x208
push ebx
mov dword [ebp - 0x8d0], ebx
add esi, eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test eax, eax
je 0x40575c
cmp word [eax], 0
je 0x40575c
push eax
push dword [ebp - 0x8cc]
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
je 0x40575c
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push 0x426260
push 0x104
push esi
mov ebx, eax
call fcn.00406f10
test eax, eax
js 0x40575c
test ebx, ebx
je 0x405535
push ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
test eax, eax
je 0x40575c
push 0
push esi
push dword [ebp - 0x8d0]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x405764
inc edi
cmp di, 3
jb 0x4054a0
lea eax, [ebp - 0x830]
mov dword [ebp - fcn.00407cf0], 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.00407cf0
mov ecx, dword [ebp - 0x840]
mov dword [ebp - 0x870], eax
test ecx, ecx
je 0x4055c2
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x864]
cmp ecx, eax
setne al
push eax
call edx
mov dword [ebp - 0x840], 0
lea eax, [ebp - 0x830]
mov dword [ebp - 0x86c], eax
cmp dword [ebp + 0xc], 0
mov byte [ebp - 4], 4
je 0x405696
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor edi, edi
jmp 0x4055f0
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 0x405623
movzx ecx, word [esi + eax]
test cx, cx
je 0x405623
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x405605
test edx, edx
lea ecx, [eax - 2]
cmovne ecx, eax
xor eax, eax
mov word [ecx], ax
test edx, edx
je 0x405692
push 0x426480
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
je 0x405692
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 0x405692
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.004033c0
add esp, 8
test eax, eax
je 0x405692
inc edi
cmp di, 3
jb 0x4055f0
mov edi, 1
jmp 0x405705
xor edi, edi
jmp 0x405705
mov eax, dword [ebp - 0x8c8]
lea ecx, [ebp - 0x420]
push dword [eax + 0x24]
push dword [eax + 0x20]
push 0x426260
push 0x426260
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.00403f10
mov esi, eax
add esp, 0x28
test esi, esi
je 0x4056ec
push esi
push 3
push 0
call sub.WINSPOOL.DRV_AddPrinterDriverW
test eax, eax
je 0x4056ec
mov edi, 1
jmp 0x4056ee
xor edi, edi
test esi, esi
je 0x405705
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], 8
test eax, eax
je 0x405733
mov ecx, dword [ebp - 0x870]
mov dword [ebp - 0x8c8], eax
test ecx, ecx
je 0x4057cf
mov eax, dword [ecx]
lea edx, [ebp - 0x8c8]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x870]
test ecx, ecx
je 0x405766
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x894]
cmp ecx, eax
setne al
push eax
call edx
mov dword [ebp - 0x870], 0
jmp 0x405766
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 4], 9
test eax, eax
je 0x405793
mov ecx, dword [ebp - 0x8a0]
mov dword [ebp - 0x8c8], eax
test ecx, ecx
je 0x4057d4
mov eax, dword [ecx]
lea edx, [ebp - 0x8c8]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x8a0]
test ecx, ecx
je 0x4057b1
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 int.0041284a
mov esp, ebp
pop ebp
ret
call fcn.00412550
call fcn.00412550
int3