Function at 0x40d930
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4503b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
call fcn.0040d7e0
mov ecx, esi
mov dword [ebp - 0x18], eax
call fcn.0040d870
mov edi, eax
or ebx, 0xffffffff
cmp byte [esi + 0x24], 0
mov dword [ebp - 0x14], edi
jne 0x40dc3d
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40dc36
mov eax, dword [esi + 0xc]
cmp dword [eax - 0xc], 0
je 0x40db17
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 4], 0
push dword [esi + 0xc]
lea eax, [ebp - 0x1c]
push ebx
push str._s_s
push eax
call fcn.0040a530
mov eax, dword [section..data]
add esp, 0x10
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 1
push dword [esi + 0xc]
lea eax, [ebp - 0x20]
push edi
push str._s_s
push eax
call fcn.0040a530
mov edi, dword [ebp - 0x20]
add esp, 0x10
push 0
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40da15
cmp dword [0x467194], 6
jb 0x40da15
push ecx
mov ecx, edi
call fcn.004134a0
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 2
push dword [esi + 0x10]
lea eax, [ebp - 0x28]
push ebx
push str._s_s
push eax
call fcn.0040a530
mov eax, dword [section..data]
add esp, 0x10
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 3
push dword [esi + 0x10]
lea eax, [ebp - 0x24]
push dword [ebp - 0x14]
push str._s_s
push eax
call fcn.0040a530
mov esi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
add esp, 0x10
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40da94
cmp dword [0x467194], 6
jb 0x40da94
push ecx
mov ecx, esi
call fcn.004134a0
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40dab4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [ebx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40dad1
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edi + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40daee
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40db11
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
mov ebx, dword [esi + 0x1c]
sub ebx, dword [esi + 0x18]
sar ebx, 2
mov dword [ebp - 0x1c], ebx
mov edx, dword [ebp - 0x1c]
xor ebx, ebx
test edx, edx
jle 0x40dc33
test ebx, ebx
js 0x40dc27
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jae 0x40dc27
mov esi, dword [ecx + ebx*4]
test esi, esi
je 0x40dc24
cmp byte [esi + 4], 0
je 0x40dc24
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 4
push dword [esi + 0xc]
lea eax, [ebp - 0x24]
push dword [ebp - 0x18]
push str._s_s
push eax
call fcn.0040a530
mov eax, dword [section..data]
add esp, 0x10
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 5
push dword [esi + 0xc]
lea eax, [ebp - 0x28]
push edi
push str._s_s
push eax
call fcn.0040a530
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
add esp, 0x10
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40dbe2
cmp dword [0x467194], 6
jb 0x40dbe2
push ecx
mov ecx, esi
call fcn.004134a0
add esi, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40dc00
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40dc21
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
inc ebx
cmp ebx, edx
jl 0x40db30
or ebx, 0xffffffff
mov edi, dword [ebp - 0x14]
mov byte [esi + 0x24], 1
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
push dword [ebp - 0x18]
lea eax, [ebp - 0x28]
push str._s_backup
push eax
mov dword [ebp - 4], 6
call fcn.0040a530
mov edx, edi
mov edi, dword [ebp - 0x28]
add esp, 0xc
mov ecx, edi
call fcn.0040b970
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push str._s_backup
push eax
mov byte [ebp - 4], 7
call fcn.0040a530
mov esi, dword [ebp - 0x24]
add esp, 0xc
mov dl, 1
mov ecx, esi
call fcn.0040cea0
add esi, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [esi + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40dccb
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40dce9
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret