Function at 0x40d248
Capabilities:
Copy file

Disassembly:
push 0x84
mov eax, 0x4124ac
call fcn.004105ff
mov dword [ebp - 0x90], ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
mov edi, dword [ebp + 0xc]
xor ecx, ecx
push 7
pop edx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], ebx
mov word [ebp - 0x3c], cx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x5c], ebx
mov word [ebp - 0x6c], cx
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 1
push ecx
push eax
call dword [sym.imp.RPCRT4.dll_UuidToStringW]
mov esi, eax
test esi, esi
jne 0x40d39d
push dword [ebp - 0x74]
call fcn.00404334
pop ecx
push eax
push dword [ebp - 0x74]
lea ecx, [ebp - 0x6c]
call fcn.00409eca
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeW]
inc ebx
xor al, al
mov byte [ebp - 0x6d], al
cmp ebx, 0x3e8
jge 0x40d396
push 0x403b50
lea ecx, [ebp - 0x54]
call fcn.00407fb9
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x54]
call fcn.00409fd6
push 0x403b58
call fcn.00404334
pop ecx
push eax
push 0x403b58
lea ecx, [ebp - 0x54]
call fcn.0040afb3
push 0xa
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
mov esi, eax
push esi
call fcn.00404334
add esp, 0x10
lea ecx, [ebp - 0x54]
push eax
push esi
call fcn.0040afb3
cmp dword [ebp - 0x40], 8
mov eax, dword [ebp - 0x54]
jae 0x40d34b
lea eax, [ebp - 0x54]
push 0x403b6c
push eax
call dword [sym.imp.msvcrt.dll__wfopen]
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40d372
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x54]
mov byte [ebp - 0x6d], 1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00409f45
push esi
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
push 0
push 1
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
inc ebx
call fcn.00409d62
mov al, byte [ebp - 0x6d]
test al, al
je 0x40d2d7
test al, al
jne 0x40d3c6
xor esi, esi
inc esi
xor ebx, ebx
push ebx
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], bl
call fcn.00409d62
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
push ebx
push 1
call fcn.00409d62
mov eax, esi
call fcn.004105ae
ret 8
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x40d3d2
lea eax, [ebp - 0x3c]
cmp dword [edi + 0x14], 8
jb 0x40d3da
mov edi, dword [edi]
push 1
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x40d3ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40d39d
movzx esi, si
or esi, 0x80070000
jmp 0x40d39d
push 0x403b44
call fcn.00404334
pop ecx
push eax
push ecx
push ecx
lea ecx, [ebp - 0x3c]
call fcn.0040e0e2
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x80]
xor ebx, ebx
mov byte [ebp - 0x6d], 0x30
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
lea esi, [eax*2 + 0x18]
mov dword [ebp - 0x78], ebx
lea eax, [ebp - 0x6d]
mov dword [ebp - 0x8c], esi
push eax
push esi
call fcn.0040dfc5
push esi
mov byte [ebp - 4], 3
push ebx
mov ebx, dword [ebp - 0x80]
push ebx
call sub.msvcrt.dll_memset
movzx eax, si
lea edi, [ebx + 4]
mov esi, dword [ebp - 0x84]
add esp, 0xc
mov dword [ebx], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x2c]
add eax, eax
mov word [ebx + 0x14], ax
cmp dword [ebp - 0x28], 8
mov ecx, dword [ebp - 0x3c]
movzx edx, ax
jae 0x40d47d
lea ecx, [ebp - 0x3c]
push edx
push ecx
lea eax, [ebx + 0x16]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x88]
xor ecx, ecx
push ecx
push eax
mov eax, dword [ebp - 0x90]
push ecx
push ecx
push dword [ebp - 0x8c]
push ebx
push 0x2af354
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40d4b9
xor esi, esi
jmp 0x40d4ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40d4ce
movzx esi, si
or esi, 0x80070000
push ebx
mov byte [ebp - 4], 1
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
xor ebx, ebx
pop ecx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], ebx
jmp 0x40d39f