Function at 0x4650f0
Capabilities:
Copy file
Delete file
Set file attributes
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x224]
sub esp, 0x224
push 0xffffffffffffffff
push 0x4d943d
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x515080]
xor eax, ebp
mov dword [ebp + 0x220], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
push 0x104
lea eax, [ebp + 0x18]
push eax
push dword [0x516d44]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp + 0x18]
lea ebx, [esi + 0x14]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x465150
sub ecx, edx
lea eax, [ebp + 0x18]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.004025b0
cmp byte [ebp + 0x22c], 0
je 0x4653f9
push ecx
mov edx, 0x4f3fec
lea ecx, [ebp]
call fcn.00406d10
add esp, 4
mov edx, eax
mov dword [ebp - 4], 0
cmp dword [edx + 0x14], 7
jbe 0x46519a
mov edx, dword [edx]
test edx, edx
jne 0x4651a2
xor ecx, ecx
jmp 0x4651b6
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4651a7
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.00403890
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.004040e0
push 0x5c
push dword [ebx]
call fcn.004a31bb
mov ecx, eax
add esp, 8
or esi, 0xffffffff
test ecx, ecx
je 0x465238
mov eax, dword [ebx]
sub ecx, eax
sar ecx, 1
js 0x465238
mov eax, dword [eax - 0xc]
sub eax, ecx
mov ecx, ebx
dec eax
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00408bd0
mov dword [ebp - 4], 3
mov ecx, ebx
push eax
call fcn.00409b90
mov dword [ebp - 4], esi
mov eax, esi
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x465238
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
or esi, 0xffffffff
push 0x2e
push dword [ebx]
call fcn.004a31bb
add esp, 8
test eax, eax
je 0x465296
sub eax, dword [ebx]
sar eax, 1
js 0x465296
push eax
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
call fcn.0040b1b0
mov dword [ebp - 4], 5
mov ecx, ebx
push eax
call fcn.00409b90
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x465296
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
mov ebx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push str..exe
push eax
mov ecx, ebx
call fcn.00464d30
mov dword [ebp - 4], 7
lea esi, [ebx + 4]
push eax
mov ecx, esi
call fcn.00409b90
mov dword [ebp - 4], 0xffffffff
or edi, 0xffffffff
mov ecx, dword [ebp - 0x10]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4652f1
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
or edi, 0xffffffff
lea esi, [ebx + 4]
push 0
push dword [esi]
lea eax, [ebp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0x80
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push str..ini
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.00464d30
mov dword [ebp - 4], 9
lea ecx, [ebx + 0x10]
push eax
call fcn.00409b90
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x46535c
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
or edi, 0xffffffff
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], 0x4ed624
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0xb
mov eax, 0xfeff
push 0
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4653c7
test esi, esi
je 0x4653be
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
xor esi, esi
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], 0x4ed624
test esi, esi
je 0x4653e7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.004046f0
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4654ec
jmp 0x465415
mov edx, esi
mov ecx, ebx
call fcn.00481220
test al, al
jne 0x4651ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4654c7
mov eax, dword [eax]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4e2514]
mov ecx, dword [ebp - 0x14]
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0xc
lea eax, [ebp + 0x18]
push eax
lea ecx, [ebp - 0x10]
call fcn.00403700
test al, al
jne 0x46546c
lea ecx, [ebp + 0x18]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x465450
sub ecx, edx
lea eax, [ebp + 0x18]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00403890
mov dword [ebp - 4], 0xd
lea eax, [ebp - 0x10]
push eax
push str.RealUpdaterPath
mov ecx, ebx
call fcn.004655d0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], edi
dec edi
test edi, edi
jg 0x4654ae
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
lea eax, [ebx + 4]
mov ecx, ebx
push eax
call fcn.00465500
lea eax, [ebx + 0x10]
push eax
lea ecx, [ebx + 0x18]
call fcn.004097c0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x220]
xor ecx, ebp
call fcn.004a1bc0
lea esp, [ebp + 0x224]
pop ebp
ret 4
push 0x80004005
call fcn.00402720
int3