Function at 0x478460
Capabilities:
Check if file exists
Copy file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d658
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x572bb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov edi, ecx
mov dword [ebp - 0x28], edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4784a4
test al, 0x10
jne 0x47869b
mov edx, dword [ebp + 8]
mov ecx, ebx
push 1
call fcn.00477910
add esp, 4
test al, al
jne 0x47869b
push str.directory_create_error:
lea ecx, [ebp - 0x14]
call fcn.00471c70
push str.CopyDirectory
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.00471bb0
mov byte [ebp - 4], 1
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4784fc
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 2
push eax
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x20]
call fcn.00472fc0
push ebx
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00472fc0
push 2
mov edx, eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x18]
call fcn.00473b30
mov byte [ebp - 4], 3
or edi, 0xffffffff
mov edx, dword [ebp - 0x24]
add esp, 0xc
add edx, 0xfffffff0
mov eax, edi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x478561
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478581
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47859e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4785be
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4785e1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x20]
call fcn.00473060
mov esi, eax
push str.copydirectory_failed_to_create_dir_
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 5
call fcn.00471c70
push esi
mov edx, eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2c]
call fcn.00472fc0
add esp, 4
mov ecx, dword [ebp + 8]
push eax
mov byte [ebp - 4], 7
call fcn.00473a30
mov byte [ebp - 4], 6
mov ecx, edi
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478646
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478666
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x478687
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
or eax, ecx
jge 0x4786b5
push 0
mov ecx, edi
call fcn.00471f40
mov esi, dword [edi]
lea ecx, [esi + 2]
lea ebx, [ebx]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4786c0
sub esi, ecx
mov edx, 2
sar esi, 1
xor ecx, ecx
lea eax, [esi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ea22e
mov ecx, dword [edi]
mov edx, 1
add esp, 4
mov dword [ebp - 0x18], eax
sub edx, dword [ecx - 4]
mov ecx, dword [ecx - 8]
or ecx, edx
jge 0x478708
push 0
mov ecx, edi
call fcn.00471f40
push dword [edi]
mov edi, dword [ebp - 0x18]
lea eax, [esi + 2]
push eax
push edi
call fcn.004ec142
xor eax, eax
mov ecx, 1
mov dword [edi + esi*2], eax
add esp, 0xc
mov eax, dword [ebx]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
or eax, ecx
jge 0x478739
push 0
mov ecx, ebx
call fcn.00471f40
mov esi, dword [ebx]
lea ecx, [esi + 2]
mov edi, edi
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x478740
sub esi, ecx
mov edx, 2
sar esi, 1
xor ecx, ecx
lea eax, [esi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ea22e
mov ecx, dword [ebx]
mov edi, eax
mov eax, 1
mov dword [ebp - 0x30], edi
add esp, 4
sub eax, dword [ecx - 4]
mov ecx, dword [ecx - 8]
or ecx, eax
jge 0x47878a
push 0
mov ecx, ebx
call fcn.00471f40
push dword [ebx]
lea eax, [esi + 2]
push eax
push edi
call fcn.004ec142
xor eax, eax
add esp, 0xc
mov dword [edi + esi*2], eax
or edi, 0xffffffff
cmp byte [0x579b6b], al
je 0x47890f
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4787c9
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 8
push dword [ebx]
mov eax, dword [ebp - 0x28]
push dword [eax]
lea eax, [ebp - 0x14]
push str.pszFrom___s__pszTo___s_
push eax
call fcn.00472d30
add esp, 0x10
lea ecx, [ebp - 0x24]
push str.CopyDirectory
call fcn.00471bb0
mov byte [ebp - 4], 9
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x478822
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xa
push eax
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x2c]
call fcn.00472fc0
add esp, 4
mov esi, eax
push 0x54c6b8
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xb
call fcn.00471bb0
push 0
push esi
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00473100
mov byte [ebp - 4], 0xb
mov ecx, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47888c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
mov ecx, edi
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4788ac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4788cc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4788ec
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47890f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x64], eax
mov eax, 0x654
mov word [ebp - 0x5c], ax
lea eax, [ebp - 0x6c]
push eax
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 2
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5a], 0
mov dword [ebp - 0x52], 0
mov dword [ebp - 0x56], 0
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x478964
push eax
call fcn.004ea229
add esp, 4
test esi, esi
je 0x478971
push esi
call fcn.004ea229
add esp, 4
cmp dword [ebp - 0x24], 0
sete al
mov byte [ebp - 0xd], al
test al, al
jne 0x478cf9
push str._error
lea ecx, [ebp - 0x2c]
call fcn.00471bb0
push str._to
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xd
call fcn.00471bb0
push str.SHFileOperation_from
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xe
call fcn.00471c70
push str.CopyDirectory
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xf
call fcn.00471bb0
mov byte [ebp - 4], 0x10
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4789e6
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0x11
push eax
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x44]
call fcn.00472fc0
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x40]
push dword [ebp - 0x28]
mov edx, eax
call fcn.00472fc0
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0x13
push ecx
mov edx, eax
lea ecx, [ebp - 0x3c]
call fcn.00472fc0
push ebx
mov edx, eax
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x38]
call fcn.00472fc0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0x15
push ecx
mov edx, eax
lea ecx, [ebp - 0x34]
call fcn.00472fc0
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x30]
mov ebx, dword [ebp - 0x24]
mov edx, eax
push ebx
call fcn.00472f20
add esp, 0x18
mov esi, eax
push 0x54c6b8
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x17
call fcn.00471bb0
push 2
push esi
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0x18
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00473100
mov byte [ebp - 4], 0x17
mov ecx, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478aa6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x16
mov ecx, edi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478ac6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x15
mov ecx, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478ae6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x14
mov ecx, edi
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478b06
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x13
mov ecx, edi
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478b26
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x12
mov ecx, edi
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478b46
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x11
mov ecx, edi
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478b66
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478b86
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xf
mov ecx, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478ba6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xe
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478bc6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478be6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov ecx, edi
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478c09
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.CopyDirectory_SHFileOperation_
lea ecx, [ebp - 0x28]
call fcn.00471bb0
mov dword [ebp - 4], 0x19
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x478c39
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0x1a
push eax
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x4c]
call fcn.00472fc0
push ebx
mov edx, eax
mov byte [ebp - 4], 0x1b
lea ecx, [ebp - 0x48]
call fcn.00472f20
add esp, 8
mov ecx, dword [ebp + 8]
push eax
mov byte [ebp - 4], 0x1c
call fcn.00473a30
mov byte [ebp - 4], 0x1b
mov ecx, edi
mov edx, dword [ebp - 0x48]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478c98
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1a
mov ecx, edi
mov edx, dword [ebp - 0x4c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478cb8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0x19
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x478cd5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x28]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x478cf6
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret