Function at 0x401f49
Capabilities:
Copy file

Disassembly:
mov eax, 0x43fcb2
call fcn.0042f618
sub esp, 0x238
mov eax, dword [ebp + 0x20]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x24], esi
mov dword [edi], esi
mov dword [eax], 4
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov al, byte [ebp + 0x18]
mov byte [ebp - 0x1c], al
mov al, byte [ebp + 0x1c]
mov byte [ebp - 0x1b], al
lea eax, [ebx + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x60]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x14], esi
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x28]
mov eax, dword [ebp - 0x24]
mov dword [edi], eax
mov eax, dword [ebp - 0x14]
cmp eax, esi
jl 0x401fb7
cmp eax, 4
jg 0x401fb7
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
mov eax, dword [ebp + 0x20]
cmp dword [eax], esi
jne 0x4021ac
lea eax, [ebx + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0x64]
cmp eax, esi
je 0x401fd9
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov eax, dword [ebx + 0x64]
mov dword [ebp + 8], eax
lea eax, [ebx + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp + 8], esi
jne 0x401ffe
mov eax, dword [ebp + 0x20]
mov dword [edi], esi
mov dword [eax], 6
jmp 0x4021ac
lea eax, [ebp + 0x1c]
mov dword [ebp - 0x10], esi
push eax
push 0x441340
push 0x17
push esi
push 0x441350
mov dword [ebp + 0x1c], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov eax, dword [ebp + 0x1c]
lea edx, [ebp - 0x10]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x84]
mov eax, dword [ebp + 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push dword [edi]
lea eax, [ebp - 0x244]
mov dword [ebp + 0x1c], esi
push dword [ebp - 0x10]
push str._s_8.8x.jdf
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp dword [ebp + 0x14], esi
je 0x4020c1
lea eax, [ebp - 0x244]
push esi
push eax
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x244]
test eax, eax
je 0x4020b1
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
mov dword [ebp + 0x18], eax
add eax, 3
and al, 0xfc
call fcn.0042f1b0
mov eax, esp
push esi
push esi
mov dword [ebp + 0x14], eax
push dword [ebp + 0x18]
and byte [eax], 0
push eax
lea eax, [ebp - 0x244]
push 0xffffffffffffffff
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp + 0x14]
push esi
push esi
push esi
push esi
push 4
push 1
push eax
call sub.ADVAPI32.dll_SetNamedSecurityInfoA
jmp 0x402102
lea eax, [ebp - 0x244]
lea ecx, [ebp - 0x3c]
push eax
mov word [ebp - 0x3c], si
call fcn.004021cd
sub esp, 0x10
mov dword [ebp - 4], esi
lea esi, [ebp - 0x3c]
mov edi, esp
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x24]
movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [ecx + 0x108]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov edi, dword [ebp + 0xc]
xor esi, esi
push 0x30
call fcn.0042f231
pop ecx
mov dword [ebp + 0x18], eax
cmp eax, esi
mov dword [ebp - 4], 1
je 0x40212b
lea ecx, [ebp - 0x244]
push ecx
mov ecx, eax
call fcn.00402211
mov dword [ebp + 0x18], eax
jmp 0x40212e
mov dword [ebp + 0x18], esi
mov ecx, dword [ebp + 0x18]
or dword [ebp - 4], 0xffffffff
call fcn.0040cfb1
test eax, eax
jne 0x402164
push dword [edi]
push ebx
call fcn.00406f1f
mov ecx, dword [ebp + 0x18]
cmp ecx, esi
je 0x402154
push 1
call fcn.00402250
mov eax, dword [ebp + 0x20]
mov dword [edi], esi
mov esi, dword [ebp + 8]
mov dword [eax], 5
jmp 0x4021a6
lea esi, [ebx + 0x3c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi]
lea ecx, [ebx + 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.004025b0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [edi]
mov esi, dword [ebp + 8]
push dword [ebp + 0x10]
mov eax, dword [esi]
push esi
call dword [eax + 0x1c]
mov ecx, dword [ebp + 0x18]
call fcn.0040d118
mov eax, dword [esi]
push esi
call dword [eax + 8]
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x250]
xor eax, eax
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x20