Function at 0x401630
Capabilities:
Acquire debug privileges
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd64
mov eax, 0x40db64
push ebx
push esi
push edi
call fcn.00404edc
call fcn.004024bc
test al, al
jne 0x401660
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
mov eax, edx
jmp 0x40192d
cmp dword [0x40d320], 0
jne 0x4018fb
call fcn.004031af
cmp dword [0x40d15c], 0
jne 0x401697
push 0x1c
lea ecx, [ebp - 0x78]
push ecx
push fcn.00401630
call sub.KERNEL32.DLL_VirtualQuery
test eax, eax
jbe 0x401697
mov eax, dword [ebp - 0x74]
mov dword [0x40d15c], eax
push str.Advapi32.dll
call sub.KERNEL32.DLL_LoadLibraryW
mov ebx, eax
test ebx, ebx
je 0x4016cd
push str.DecryptFileW
push ebx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x40d2e0], eax
push str.GetExplicitEntriesFromAclW
push ebx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x40d2e4], eax
push ebx
call sub.KERNEL32.DLL_FreeLibrary
push 0x208
push 0x4116b8
push dword [0x40d15c]
call sub.KERNEL32.DLL_GetModuleFileNameW
push 0x20
push 0
push dword [0x40ed7c]
call sub.KERNEL32.DLL_HeapAlloc
mov dword [ebp - 4], eax
test eax, eax
je 0x401716
mov word [ebp - 0x18], 0x14
mov edx, 0x4116b8
mov eax, dword [ebp - 4]
call fcn.0040290c
mov word [ebp - 0x18], 8
mov edx, dword [ebp - 4]
jmp 0x401719
mov edx, dword [ebp - 4]
mov dword [0x40d320], edx
push 0x104
lea eax, [ebp - 0x280]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryW
xor esi, esi
xor ebx, ebx
lea eax, [esi*8 + 0x40d2e8]
cmp dword [eax + ebx*4], 0
je 0x40177c
push 0x410
push 0
push dword [0x40ed7c]
call sub.KERNEL32.DLL_HeapAlloc
mov edi, eax
lea eax, [esi*8 + 0x411b00]
mov dword [eax + ebx*4], edi
lea edx, [ebp - 0x280]
push edx
push edi
call sub.KERNEL32.DLL_lstrcpyW
lea ecx, [esi*8 + 0x40d2e8]
push dword [ecx + ebx*4]
push edi
call sub.KERNEL32.DLL_lstrcatW
inc ebx
cmp ebx, 2
jb 0x401734
push 0xffffffffffffffff
push 0x4116b8
push 0xffffffffffffffff
push dword [esi*8 + 0x411b00]
push 1
push 0x400
call sub.KERNEL32.DLL_CompareStringW
cmp eax, 2
jne 0x4017b5
mov eax, dword [esi*8 + 0x411b04]
mov dword [0x411b24], eax
mov dword [0x40d31c], esi
inc esi
cmp esi, 4
jb 0x401732
mov edx, 0x411b20
mov dword [edx], 0x4116b8
mov ecx, dword [0x411b3c]
mov dword [0x40d318], ecx
cmp dword [0x411afc], 5
jae 0x4017e8
mov word [0x40d21e], 0
push 0x40d21e
push 0x411ad0
call sub.KERNEL32.DLL_lstrcpyW
push str.ServRelLcss
push 0x411ad0
call sub.KERNEL32.DLL_lstrcatW
lea eax, [ebp - 0x2c]
push eax
push 0x28
call sub.KERNEL32.DLL_GetCurrentProcess
push eax
call sub.ADVAPI32.DLL_OpenProcessToken
test eax, eax
je 0x401894
mov dword [ebp - 0x29c], 2
lea edx, [ebp - 0x34]
push edx
push str.SeTakeOwnershipPrivilege
push 0
call sub.ADVAPI32.DLL_LookupPrivilegeValueW
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x298], ecx
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x294], ecx
mov dword [ebp - 0x290], 2
push eax
push str.SeDebugPrivilege
push 0
call sub.ADVAPI32.DLL_LookupPrivilegeValueW
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x28c], edx
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x288], edx
mov dword [ebp - 0x284], 2
push 0
push 0
push 0x1c
lea ecx, [ebp - 0x29c]
push ecx
push 0
push dword [ebp - 0x2c]
call sub.ADVAPI32.DLL_AdjustTokenPrivileges
mov esi, 0x40d588
lea edi, [ebp - 0x5c]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
xor ebx, ebx
mov eax, ebx
shl eax, 2
lea eax, [eax + eax*4]
lea edx, [ebp - 0x5c]
add eax, edx
push dword [eax]
push 0
push 0
push 0
push 0
push 0
push 0
push dword [eax + 0x10]
push dword [eax + 0xc]
mov cl, byte [eax + 0xa]
push ecx
add eax, 4
push eax
call sub.ADVAPI32.DLL_AllocateAndInitializeSid
inc ebx
cmp ebx, 2
jb 0x4018a5
push 0x411b28
push 1
push 0
xor edx, edx
push str.SYSTEMCurrentControlSetServicesLcss
push 0x80000002
mov dword [0x411b28], edx
call sub.ADVAPI32.DLL_RegOpenKeyExW
jmp 0x401915
call fcn.00401ce4
test al, al
je 0x401910
mov ecx, dword [ebp - 0x28]
mov dword fs:[0], ecx
jmp 0x40192d
call fcn.00401ff0
call fcn.00401a24
call fcn.00401acc
call fcn.00401a24
mov eax, dword [ebp - 0x28]
mov dword fs:[0], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret