Function at 0x406160
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x541134
mov eax, dword fs:[0]
push eax
sub esp, 0x174
mov eax, dword [0x59ff60]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x148], ecx
mov dword [ebp - 4], 1
call fcn.0040a217
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4061ba
push 0x80004005
call fcn.00401e00
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x140], esi
push 0x5524f0
lea ecx, [ebp - 0x14c]
mov byte [ebp - 4], 2
call fcn.00401bb0
mov byte [ebp - 4], 3
call fcn.0040a217
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4061fe
push 0x80004005
call fcn.00401e00
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x13c], eax
push 0x2f
push dword [ebp + 8]
mov byte [ebp - 4], 4
call fcn.00526f52
mov ecx, eax
add esp, 8
mov eax, dword [ebp + 8]
test ecx, ecx
jne 0x40622d
or ecx, 0xffffffff
jmp 0x40622f
sub ecx, eax
mov eax, dword [eax - 0xc]
sub eax, ecx
lea ecx, [ebp + 8]
dec eax
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.004060e0
push eax
lea ecx, [ebp - 0x13c]
mov byte [ebp - 4], 5
call fcn.00403400
mov edx, dword [ebp - 0x130]
or eax, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x406279
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x551d28
push dword [ebp + 0xc]
call fcn.00526e74
mov edi, dword [ebp - 0x13c]
add esp, 8
test eax, eax
sete al
test al, al
je 0x40630e
push ecx
lea eax, [edi - 0x10]
mov ebx, esp
push eax
call fcn.00403470
mov ecx, dword [ebp - 0x148]
add eax, 0x10
add esp, 4
mov dword [ebx], eax
lea eax, [ebp - 0x12c]
push eax
call fcn.00407ce0
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x4062cc
mov edx, dword [edx]
test edx, edx
jne 0x4062d4
xor ecx, ecx
jmp 0x4062e9
mov ecx, edx
lea ebx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4062e0
sub ecx, ebx
push ecx
push edx
lea ecx, [ebp + 0xc]
call fcn.00402520
cmp dword [ebp - 0x118], 0x10
mov byte [ebp - 4], 4
jb 0x40630e
push dword [ebp - 0x12c]
call fcn.00408e11
add esp, 4
call fcn.0040a217
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40632a
push 0x80004005
call fcn.00401e00
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x144], eax
push edi
lea eax, [ebp - 0x144]
mov byte [ebp - 4], 7
push str._s.upgrade
push eax
call fcn.00405870
mov ebx, dword [ebp - 0x144]
add esp, 8
mov dword [ebp - 0x130], esp
lea eax, [ebx - 0x10]
push eax
call fcn.00403470
mov ecx, dword [ebp - 0x130]
add eax, 0x10
add esp, 4
mov dword [ecx], eax
lea eax, [ebp - 0x12c]
mov ecx, dword [ebp - 0x148]
push eax
call fcn.00407ce0
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 8
jb 0x406394
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x138]
call fcn.00401bb0
cmp dword [ebp - 0x118], 0x10
mov byte [ebp - 4], 0xa
jb 0x4063bb
push dword [ebp - 0x12c]
call fcn.00408e11
add esp, 4
push 0x9001
push dword [ebp - 0x138]
lea ecx, [ebp - 0x160]
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x12c], 0
call fcn.0040a4db
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 0xb
call fcn.00408e34
push 0
push 0
push 0
push 0
push 1
push 0
lea ecx, [ebp - 0x174]
mov byte [ebp - 4], 0xd
call fcn.0040c6c6
push 0
push 4
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 0xe
push eax
push 2
lea ecx, [ebp - 0x174]
mov dword [ebp - 0x130], 0x3e8
call fcn.0040d600
push 0
push 4
lea eax, [ebp - 0x130]
mov dword [ebp - 0x130], 3
push eax
push 3
lea ecx, [ebp - 0x174]
call fcn.0040d600
push 0
push 0
push 0x84000002
push 1
push dword [ebp + 8]
lea ecx, [ebp - 0x174]
call fcn.0040cfff
mov dword [ebp - 0x130], eax
lea ecx, [ecx]
mov edx, dword [eax]
lea ecx, [ebp - 0x131]
push 1
push ecx
mov ecx, eax
call dword [edx + 0x38]
lea ecx, [ebp - 0x160]
test eax, eax
je 0x4064dc
push 1
lea eax, [ebp - 0x131]
mov byte [ebp - 4], 0xf
push eax
call fcn.0040adfd
mov eax, dword [ebp - 0x130]
mov dword [ebp - 4], 0xe
jmp 0x406480
call fcn.0040a9af
lea ecx, [ebp - 0x160]
call fcn.0040a7fd
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x138]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4065a7
mov eax, dword [ebp + 0xc]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00403470
mov ecx, dword [ebp - 0x148]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.00405ab0
call fcn.0040a217
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x406543
push 0x80004005
call fcn.00401e00
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x130], eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 0x11
push dword [ebp - 0x138]
push str.cmd.exe__c_copy__Y___s____s_
push eax
call fcn.00405870
mov esi, dword [ebp - 0x130]
add esp, 0x10
push esi
call fcn.00526b04
add esi, 0xfffffff0
mov byte [ebp - 4], 0xe
add esp, 4
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4065a1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x140]
mov eax, dword [ebp - 0x138]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x130], esp
push eax
call fcn.00403470
mov edx, dword [ebp - 0x130]
add esp, 4
mov ecx, dword [ebp - 0x148]
add eax, 0x10
mov dword [edx], eax
call fcn.00405ab0
lea ecx, [ebp - 0x174]
mov byte [ebp - 4], 0xd
call fcn.0040c9a9
mov dword [ebp - 4], 0xb
call fcn.00408f13
lea ecx, [ebp - 0x160]
mov byte [ebp - 4], 0xa
call fcn.0040a593
mov edx, dword [ebp - 0x138]
or ecx, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 7
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406624
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 4
or ebx, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406644
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 3
mov ecx, ebx
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406661
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x14c]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406684
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 1
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4066a1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4066c1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4066e2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
jmp 0x40678d
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00525164
mov esp, ebp
pop ebp
ret 8