Function at 0x10166a6
Capabilities:
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x668
push ebx
push esi
push edi
xor edx, edx
mov word [ebp - 0x210], dx
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x20e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, 0x103d5cc
push esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], edx
call edi
push 0x104
push dword [0x103d578]
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x418]
push eax
call fcn.0103202c
test eax, eax
mov ebx, dword [ebp + 8]
jne 0x101675b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x18
mov dword [ebp - 4], eax
pop eax
call fcn.0102e8e0
mov esi, esp
test esi, esi
je 0x101673b
push dword [ebp - 4]
push 0x1001814
push esi
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
push esi
lea eax, [ebp - 0x418]
push eax
push 0xc0007d2e
push 2
push 1
push 2
call sub.FXSEVENT.dll_FaxLog
add esp, 0x18
jmp 0x101691c
lea eax, [ebp - 8]
push eax
mov eax, dword [ebx + 0x158]
push dword [eax + 0xf8]
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
test eax, eax
jne 0x1016783
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x101691c
push dword [ebp - 8]
lea eax, [ebp - 0x210]
push dword [ebx + 0xc]
push dword [ebx + 8]
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.01025849
test eax, eax
je 0x10168df
push 0
lea eax, [ebp - 0x210]
push eax
push dword [ebx + 0x34]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x101680c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x18
mov dword [ebp - 4], eax
pop eax
call fcn.0102e8e0
mov esi, esp
test esi, esi
je 0x10167e6
push dword [ebp - 4]
push 0x1001814
push esi
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
push esi
push 0xc0007d2f
push 1
push 1
push 2
call sub.FXSEVENT.dll_FaxLog
add esp, 0x14
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x101691c
push ebx
lea eax, [ebp - 0x210]
push eax
call fcn.0101632c
test eax, eax
jne 0x1016844
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01025788
push eax
lea eax, [ebp - 0x210]
push eax
push 0xc0007d4a
push 2
push 1
push 2
call sub.FXSEVENT.dll_FaxLog
add esp, 0x18
mov eax, dword [ebx + 0x158]
push dword [eax + 0xf8]
push 0
push 0x40
push dword [ebx + 0xc]
push dword [ebx + 8]
call fcn.01026bd9
lea eax, [ebp - 0x668]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x10168c0
push esi
call edi
cmp dword [0x103d590], 0xffffffff
jne 0x1016890
cmp dword [0x103d594], 0xffffffff
je 0x10168b0
mov edx, dword [ebp - 0x648]
mov ecx, dword [ebp - 0x64c]
xor eax, eax
xor edi, edi
or eax, edx
or ecx, edi
add dword [0x103d590], eax
adc dword [0x103d594], ecx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x210]
push eax
push dword [ebx + 0x34]
push 0x40007d13
push 2
push 3
push 2
call sub.FXSEVENT.dll_FaxLog
add esp, 0x18
jmp 0x1016955
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x18
mov dword [ebp - 4], eax
pop eax
call fcn.0102e8e0
mov esi, esp
test esi, esi
je 0x1016908
push dword [ebp - 4]
push 0x1001814
push esi
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
push esi
push 0xc0007d2f
push 1
push 1
push 2
call sub.FXSEVENT.dll_FaxLog
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01025788
push eax
lea eax, [ebp - 0x418]
push eax
push dword [ebx + 0x34]
push 0xc0007d14
push 3
push 1
push 2
call sub.FXSEVENT.dll_FaxLog
add esp, 0x1c
cmp dword [ebp - 4], 0
je 0x1016955
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], 0
je 0x1016964
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
cmp dword [ebp - 4], eax
sete al
lea esp, [ebp - 0x674]
pop edi
pop esi
pop ebx
leave
ret 4