Function at 0x40d190
Capabilities:
Copy file
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.005817c0
mov eax, dword [0x5f3008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1020], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x101c], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, edx
dec eax
push esi
xor dl, dl
mov dword [ebp - 0x1014], ebx
mov byte [ebp - 0x1005], dl
mov esi, ecx
mov dword [ebp - 0x100c], esi
cmp eax, ebx
jl 0x40d669
push edi
mov edi, 0x5165
cmp eax, 5
jle 0x40d65f
cmp word [esi + eax*2 - 4], di
jne 0x40d65f
lea edx, [esi + eax*2]
mov ecx, 0x308b
cmp word [edx - 2], cx
jne 0x40d659
mov ecx, 0xff3d
cmp word [edx], cx
jne 0x40d659
lea edi, [eax - 3]
xor ebx, ebx
mov dword [ebp - 0x1010], edi
cmp edi, dword [ebp - 0x1014]
jl 0x40d3b1
movzx eax, word [edx - 6]
cmp eax, 0x2e
jne 0x40d380
movzx esi, word [edx - 4]
cmp esi, 0x70
je 0x40d24b
cmp esi, 0x50
jne 0x40d26e
movzx ecx, word [edx - 2]
cmp ecx, 0x6e
je 0x40d259
cmp ecx, 0x4e
jne 0x40d26e
movzx eax, word [edx]
cmp eax, 0x67
je 0x40d336
cmp eax, 0x47
je 0x40d336
cmp esi, 0x67
je 0x40d278
cmp esi, 0x47
jne 0x40d29b
movzx ecx, word [edx - 2]
cmp ecx, 0x69
je 0x40d286
cmp ecx, 0x49
jne 0x40d29b
movzx eax, word [edx]
cmp eax, 0x66
je 0x40d336
cmp eax, 0x46
je 0x40d336
cmp esi, 0x62
je 0x40d2a5
cmp esi, 0x42
jne 0x40d2c0
movzx ecx, word [edx - 2]
cmp ecx, 0x6d
je 0x40d2b3
cmp ecx, 0x4d
jne 0x40d2c0
movzx eax, word [edx]
cmp eax, 0x70
je 0x40d336
cmp eax, 0x50
je 0x40d336
cmp esi, 0x6a
je 0x40d2ce
cmp esi, 0x4a
jne 0x40d395
movzx ecx, word [edx - 2]
cmp ecx, 0x70
je 0x40d2dc
cmp ecx, 0x50
jne 0x40d2e9
movzx eax, word [edx]
cmp eax, 0x67
je 0x40d336
cmp eax, 0x47
je 0x40d336
cmp esi, 0x6a
je 0x40d2f7
cmp esi, 0x4a
jne 0x40d395
movzx ecx, word [edx - 2]
cmp ecx, 0x70
je 0x40d309
cmp ecx, 0x50
jne 0x40d395
movzx eax, word [edx]
cmp eax, 0x65
je 0x40d31a
cmp eax, 0x45
jne 0x40d395
movzx edi, word [edx + 2]
cmp edi, 0x67
je 0x40d330
cmp edi, 0x47
mov edi, dword [ebp - 0x1010]
jne 0x40d395
jmp 0x40d336
mov edi, dword [ebp - 0x1010]
mov ebx, edi
cmp esi, 0x6a
je 0x40d342
cmp esi, 0x4a
jne 0x40d368
cmp cx, 0x70
je 0x40d34e
cmp cx, 0x50
jne 0x40d368
cmp ax, 0x65
je 0x40d35a
cmp ax, 0x45
jne 0x40d368
movzx eax, word [edx + 2]
cmp eax, 0x67
je 0x40d374
cmp eax, 0x47
je 0x40d374
mov dword [ebp - 0x1018], 3
jmp 0x40d395
mov dword [ebp - 0x1018], 4
jmp 0x40d395
mov ecx, 0xff3b
cmp ax, cx
jne 0x40d395
mov eax, 0xff03
cmp word [edx - 4], ax
je 0x40d3ce
dec edi
sub edx, 2
mov dword [ebp - 0x1010], edi
cmp edi, dword [ebp - 0x1014]
jge 0x40d230
mov esi, dword [ebp - 0x100c]
mov eax, dword [ebp - 0x1010]
mov edi, 0x5165
mov dl, byte [ebp - 0x1005]
dec eax
mov ebx, dword [ebp - 0x1014]
jmp 0x40d65f
cmp edi, dword [ebp - 0x1014]
jl 0x40d3ab
mov esi, dword [ebp - 0x100c]
test ebx, ebx
jle 0x40d3b1
movzx eax, word [esi + ebx*2 - 2]
lea ecx, [ebx - 1]
mov edi, 0xff03
cmp ax, di
je 0x40d3b1
mov edx, 0xff08
cmp ax, dx
je 0x40d42a
cmp ax, 0x28
je 0x40d42a
movzx eax, word [esi + ecx*2 - 2]
dec ecx
cmp ax, di
jne 0x40d3f7
mov eax, dword [ebp - 0x1010]
mov edi, 0x5165
mov dl, byte [ebp - 0x1005]
dec eax
mov ebx, dword [ebp - 0x1014]
jmp 0x40d65f
mov esi, dword [ebp - 0x1018]
lea eax, [ecx + 1]
add esi, ebx
xor edx, edx
cmp eax, esi
jg 0x40d476
mov edi, dword [ebp - 0x100c]
sub esi, eax
add edi, 2
inc esi
lea ecx, [edi + ecx*2]
nop word [eax + eax]
movzx eax, word [ecx]
mov word [ebp + edx*2 - 0x404], ax
cmp eax, 0x2f
jne 0x40d46d
mov eax, 0x5c
mov word [ebp + edx*2 - 0x404], ax
inc edx
add ecx, 2
sub esi, 1
jne 0x40d450
add edx, edx
cmp edx, 0x400
jae 0x40d67b
push dword [ebp - 0x101c]
xor eax, eax
or esi, 0xffffffff
mov word [ebp + edx - 0x404], ax
lea eax, [ebp - 0x1004]
push 0x200
push eax
call fcn.00565fee
mov ax, word [ebp - 0x1004]
add esp, 0xc
xor ecx, ecx
test ax, ax
je 0x40d4db
movzx edx, ax
nop dword [eax]
cmp dx, 0x5c
mov eax, ecx
cmovne eax, esi
inc ecx
mov esi, eax
movzx eax, word [ebp + ecx*2 - 0x1004]
mov edx, eax
test ax, ax
jne 0x40d4c0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
xor eax, eax
mov word [ebp + esi*2 - 0x1002], ax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x1004]
push eax
call ebx
push dword [ebp - 0x1020]
lea eax, [ebp - 0x804]
or esi, 0xffffffff
push 0x200
push eax
call fcn.00565fee
mov ax, word [ebp - 0x804]
add esp, 0xc
xor ecx, ecx
test ax, ax
je 0x40d54b
movzx edx, ax
nop dword [eax]
cmp dx, 0x5c
mov eax, ecx
cmovne eax, esi
inc ecx
mov esi, eax
movzx eax, word [ebp + ecx*2 - 0x804]
mov edx, eax
test ax, ax
jne 0x40d530
xor eax, eax
mov word [ebp + esi*2 - 0x802], ax
lea eax, [ebp - 0x804]
push str.Scrapbook_
push eax
call ebx
lea eax, [ebp - 0x804]
push eax
lea eax, [ebp - 0xc04]
push 0x200
push eax
call fcn.00565fee
add esp, 0xc
lea eax, [ebp - 0xc04]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
xor ebx, ebx
mov ax, word [ebp - 0x404]
test ax, ax
je 0x40d60d
lea edi, [ebp - 0x404]
movzx ecx, ax
add esi, esi
cmp cx, 0x5c
jne 0x40d5d3
lea eax, [ebp - 0xc04]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x40d5d3
push eax
lea eax, [ebp - 0xc04]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40d3ab
mov ax, word [edi]
mov word [ebp + esi - 0xc04], ax
add esi, 2
cmp esi, 0x400
jge 0x40d60d
jae 0x40d67b
inc ebx
lea edi, [ebp - 0x404]
xor eax, eax
lea edi, [edi + ebx*2]
mov word [ebp + esi - 0xc04], ax
movzx eax, word [edi]
mov ecx, eax
test ax, ax
jne 0x40d5a6
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 1
lea eax, [ebp - 0x804]
push eax
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [ebp - 0x1010]
mov dl, 1
mov esi, dword [ebp - 0x100c]
dec eax
mov ebx, dword [ebp - 0x1014]
mov edi, 0x5165
mov byte [ebp - 0x1005], dl
jmp 0x40d65f
mov dl, byte [ebp - 0x1005]
dec eax
cmp eax, ebx
jge 0x40d1e5
pop edi
mov ecx, dword [ebp - 4]
mov al, dl
pop esi
xor ecx, ebp
pop ebx
call fcn.0056060a
mov esp, ebp
pop ebp
ret
call fcn.0056073a
int3