Function at 0x4af5c0
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6a4228
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x7adbc4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x1c]
xor bl, bl
mov byte [ebp - 0xd], bl
call fcn.004e3ab0
mov dword [ebp - 4], 0
cmp dword [ebp - 0x1c], 0
je 0x4af819
mov byte [ebp - 4], 1
call fcn.00493480
mov ecx, eax
test ecx, ecx
je 0x4af839
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 2
mov edx, 1
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x4af650
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00499950
mov eax, dword [ebp - 0x14]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
neg eax
sbb esi, esi
neg esi
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x14]
push dword [eax - 8]
push eax
call fcn.00675480
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4af82f
mov eax, dword [ebp - 0x14]
cmp ecx, dword [eax - 8]
jg 0x4af82f
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 2
mov word [eax + ecx*2], dx
test esi, esi
je 0x4af843
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x3c]
mov dword [ebp - 0x3c], str.agent_install.log
mov dword [ebp - 0x38], str.agent_uninstall.log
lea ecx, [eax + 4]
add eax, 0x10
mov dword [ebp - 0x20], ecx
or edi, 0xffffffff
mov dword [ebp - 0x2c], eax
nop dword [eax + eax]
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.004998f0
add eax, 0x10
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.004984a0
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x28]
mov esi, dword [ebx]
push 0x7733f0
call fcn.00498800
push esi
mov edx, eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x24]
call fcn.00498800
add esp, 8
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x18]
push dword [eax]
call fcn.00498510
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
mov byte [ebp - 4], 7
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4af73d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
mov byte [ebp - 4], 8
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4af75b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x2c]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
push dword [ebx]
call fcn.00498800
mov esi, dword [ebp - 0x18]
add esp, 4
push 0
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
add edx, 0xfffffff0
mov byte [ebp - 4], 9
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4af79e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x34], 0
mov byte [ebp - 4], 4
je 0x4af7b8
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
mov edx, dword [eax]
call fcn.004a0ac0
or byte [ebp - 0xd], al
add esi, 0xfffffff0
mov byte [ebp - 4], 0xa
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4af7d3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 4
mov byte [ebp - 4], 2
lea eax, [ebp - 0x34]
cmp ebx, eax
jne 0x4af6d0
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov byte [ebp - 4], 0xb
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
mov edi, dword [ebp - 0x1c]
jg 0x4af804
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, edi
call fcn.004ed410
push 0xc
push edi
call fcn.0066a2e8
mov bl, byte [ebp - 0xd]
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00490960
push 0x80004005
call fcn.00490960
push 0x80004005
lea ecx, [ebp + 8]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
int3