Function at 0x401612
Capabilities:
Check os version
Delete file
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
push ebx
push esi
push edi
push 7
pop ecx
xor ebx, ebx
push ebx
push ebx
xor eax, eax
push 1
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
mov edi, dword [0x4064a0]
push ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebx
mov dword [0x4064ac], eax
je 0x401686
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x406498], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push ebx
push 0x47a
mov dword [0x406494], eax
mov dword [0x4064a0], edi
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, ebx
mov dword [0x406490], eax
jne 0x401682
or dword [0x406490], 0xffffffff
xor eax, eax
jmp 0x40168c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov edi, eax
jne 0x4019c3
mov dword [esp + 0x18], ebx
xor eax, eax
lea edi, [esp + 0x1c]
stosd dword es:[edi], eax
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x30], 0x14
call dword [sym.imp.USER32.dll_GetCursorInfo]
mov eax, dword [esp + 0x3c]
sub eax, dword [esp + 0x1c]
sub eax, esi
add eax, dword [esp + 0x38]
push eax
call fcn.004037cd
mov esi, dword [esp + 0x38]
mov edi, eax
cmp edi, 0xc
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x1c], eax
je 0x4016a5
cmp edi, ebx
jne 0x4019c3
mov eax, dword [0x406490]
push ebx
call fcn.00402b95
test eax, eax
je 0x401700
mov dword [0x40649c], 1
push 1
lea eax, [esp + 0x14]
push eax
push dword [0x4064a0]
call fcn.0040355b
test eax, eax
jne 0x401759
mov edi, dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push ebx
push ebx
push dword [esp + 0x18]
call edi
mov esi, eax
cmp esi, ebx
je 0x401750
lea eax, [esi + esi + 2]
push eax
call fcn.00401047
cmp eax, ebx
mov dword [0x4064a8], eax
je 0x401750
push esi
push eax
push dword [esp + 0x18]
call edi
push dword [esp + 0x10]
call fcn.0040105c
jmp 0x401759
mov eax, dword [esp + 0x10]
mov dword [0x4064a8], eax
call fcn.004014e9
mov ecx, dword [0x4064ec]
xor ecx, eax
push ecx
mov dword [0x40645c], eax
call fcn.00403c92
cmp eax, ebx
mov dword [0x4064b0], eax
jne 0x401792
push dword [0x406494]
call fcn.00403c92
cmp eax, ebx
mov dword [0x4064b0], eax
je 0x40196e
xor eax, 0xcf8558fc
mov dword [0x4064b0], eax
call fcn.00401071
test eax, eax
je 0x40196e
call fcn.0040374b
mov edi, eax
cmp edi, ebx
jne 0x401969
push 6
pop ecx
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
push 0x80000001
lea eax, [esp + 0x44]
call fcn.00401231
cmp eax, ebx
jne 0x401840
push 0x80000002
lea eax, [esp + 0x44]
call fcn.00401231
cmp eax, ebx
jne 0x401840
push 0xb
pop edi
lea eax, [esp + 0x40]
call fcn.004012a6
test eax, eax
je 0x4019c3
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x78]
push dword [esp + 0x78]
call fcn.0040132e
mov esi, eax
cmp esi, ebx
je 0x4019c3
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x48]
push eax
call fcn.0040140d
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401969
cmp byte [0x406498], 5
push ebx
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x28], 0xc
mov dword [esp + 0x30], ebx
push 1
jbe 0x401864
push section..bss
jmp 0x401869
push 0x4070d3
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorA
push dword [0x40644c]
lea eax, [esp + 0x24]
push ebx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
cmp esi, ebx
je 0x4018b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4018ae
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
xor esi, esi
cmp eax, ebx
je 0x40190c
mov edi, dword [sym.imp.SHLWAPI.dll_StrChrW]
push 0x22
add eax, 2
push eax
call edi
mov esi, eax
cmp esi, ebx
je 0x40190c
push 0x20
push esi
call edi
mov esi, eax
cmp esi, ebx
je 0x40190c
push esi
xor eax, eax
call fcn.00403a24
mov esi, eax
cmp esi, ebx
je 0x40190c
push 0x40528c
push esi
call dword [sym.imp.SHLWAPI.dll_StrTrimW]
cmp word [esi], bx
jne 0x40190c
push esi
push ebx
push dword [0x406448]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x18], esi
call fcn.004035e2
mov edi, eax
cmp edi, ebx
jne 0x401969
push dword [0x406450]
lea eax, [esp + 0x24]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov esi, eax
cmp esi, ebx
je 0x40195d
or dword [esp + 0x1c], 0xffffffff
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x28]
push eax
push esi
mov dword [esp + 0x30], 0xff676980
call dword [sym.imp.KERNEL32.dll_SetWaitableTimer]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
cmp edi, 0xffffffff
jne 0x401976
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [esp + 0x14], ebx
je 0x4019c3
mov esi, 0xbb8
push 0x80
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4019a2
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4019c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x4019b2
cmp eax, 0x20
jne 0x4019c1
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esi, 0x64
cmp esi, ebx
jg 0x401981
xor edi, edi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4