Function at 0x406262
Capabilities:
Check if file exists
Delete file
Get file attributes
Persist via run registry key

Disassembly:
push 0x22c
mov eax, 0x4090a9
call fcn.00408da5
mov esi, ecx
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], esi
mov eax, dword [0x40a040]
cmp eax, 0x40a040
je 0x40629f
test byte [eax + 0x1c], 8
je 0x40629f
push 0x4021a0
push 0x1f
push dword [eax + 0x14]
mov ecx, ebx
push dword [eax + 0x10]
call fcn.004035d6
push 3
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionAccessibility
push 0x80000001
lea edi, reloc.ADVAPI32.dll_EventWrite
call fcn.00406e64
mov esi, eax
test esi, esi
je 0x4062f7
mov eax, dword [0x40a040]
cmp eax, 0x40a040
je 0x4062de
test byte [eax + 0x1c], 8
je 0x4062de
push esi
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00404ab0
test esi, esi
jle 0x40657e
and esi, 0xffff
or esi, 0x80070000
jmp 0x40657e
mov esi, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
mov edx, ebx
call fcn.00406ec0
mov esi, eax
test esi, esi
je 0x406321
mov eax, dword [0x40a040]
cmp eax, 0x40a040
je 0x4062de
test byte [eax + 0x1c], 8
je 0x4062de
push esi
push 0x21
jmp 0x4062d3
xor ecx, ecx
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], ecx
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], ecx
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], ecx
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push 0x20019
push ecx
push 0x402060
mov dword [ebp - 4], ecx
push 0x80000001
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x40654a
mov eax, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x4020e4
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
lea edi, reloc.ADVAPI32.dll_EventWrite
lea esi, reloc.ADVAPI32.dll_EventWrite
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], 0x104
call fcn.004049ff
mov eax, esi
push eax
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
call fcn.0040658b
mov eax, esi
push eax
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
mov byte [ebp - 4], 1
call fcn.0040658b
mov eax, esi
push eax
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
mov byte [ebp - 4], 2
call fcn.0040658b
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
mov edx, 0x4020f4
mov byte [ebp - 4], 3
call fcn.00404850
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
mov edx, 0x402124
call fcn.00404850
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
mov edx, 0x402140
call fcn.00404850
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, reloc.ADVAPI32.dll_EventWrite
je 0x40646c
push reloc.KERNEL32.dll_EnterCriticalSection
mov edi, ebx
call fcn.00406b7c
push dword [ebp - 0x228]
call esi
mov eax, dword [0x40a040]
cmp eax, 0x40a040
je 0x40646c
test byte [eax + 0x1c], 0x10
je 0x40646c
push 0x23
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00404a87
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, reloc.ADVAPI32.dll_EventWrite
je 0x4064b0
push reloc.KERNEL32.dll_EnterCriticalSection
mov edi, ebx
call fcn.00406b7c
push dword [ebp - 0x224]
call esi
mov eax, dword [0x40a040]
cmp eax, 0x40a040
je 0x4064b0
test byte [eax + 0x1c], 0x10
je 0x4064b0
push 0x24
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00404a87
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, reloc.ADVAPI32.dll_EventWrite
je 0x4064f4
push reloc.KERNEL32.dll_EnterCriticalSection
mov edi, ebx
call fcn.00406b7c
push dword [ebp - 0x220]
call esi
mov eax, dword [0x40a040]
cmp eax, 0x40a040
je 0x4064f4
test byte [eax + 0x1c], 0x10
je 0x4064f4
push 0x25
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00404a87
mov byte [ebp - 4], 2
mov edx, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
lea edx, [edx - 0x10]
call fcn.00402822
mov byte [ebp - 4], 1
mov edx, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
lea edx, [edx - 0x10]
call fcn.00402822
mov byte [ebp - 4], 0
mov edx, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
lea edx, [edx - 0x10]
call fcn.00402822
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
test eax, eax
je 0x406546
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - reloc.ADVAPI32.dll_EventWrite], 0
xor eax, eax
jmp 0x406580
mov eax, dword [0x40a040]
cmp eax, 0x40a040
je 0x40656a
test byte [eax + 0x1c], 8
je 0x40656a
push esi
push 0x22
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00404ab0
test esi, esi
jle 0x40657a
and esi, 0xffff
or esi, 0x80070000
or dword [ebp - 4], reloc.ADVAPI32.dll_EventWrite
mov eax, esi
call fcn.00408e37
ret