Function at 0x40ebd0
Capabilities:
Get common file path
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.0040ace0
mov eax, dword [0x41a004]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x78
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.004010f0
add esp, 0xc
push 0x800
lea edx, [ebp - 0x1018]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.ADVAPI32.DLL
lea eax, [ebp - 0x1018]
push eax
call fcn.0040116a
add esp, 8
lea ecx, [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40f161
push str.RegOpenKeyW
mov edx, dword [ebp + 8]
push edx
call fcn.004011c0
add esp, 8
push 0x417020
mov eax, dword [ebp + 8]
add eax, 0x78
push eax
call fcn.004011c0
add esp, 8
push str.GetServiceKeyNameW
mov ecx, dword [ebp + 8]
add ecx, 0xf0
push ecx
call fcn.004011c0
add esp, 8
push str.RegCreateKeyW
mov edx, dword [ebp + 8]
add edx, 0x168
push edx
call fcn.004011c0
add esp, 8
push str.RegCreateKeyExW
mov eax, dword [ebp + 8]
add eax, 0x1e0
push eax
call fcn.004011c0
add esp, 8
push 0x417064
mov ecx, dword [ebp + 8]
add ecx, 0x258
push ecx
call fcn.004011c0
add esp, 8
push str.RegDeleteKeyW
mov edx, dword [ebp + 8]
add edx, 0x2d0
push edx
call fcn.004011c0
add esp, 8
push 0x417080
mov eax, dword [ebp + 8]
add eax, 0x348
push eax
call fcn.004011c0
add esp, 8
push str.RegDeleteKeyValueW
mov ecx, dword [ebp + 8]
add ecx, 0x3c0
push ecx
call fcn.004011c0
add esp, 8
push str.RegDeleteValueW
mov edx, dword [ebp + 8]
add edx, 0x438
push edx
call fcn.004011c0
add esp, 8
push 0x4170b4
mov eax, dword [ebp + 8]
add eax, 0x4b0
push eax
call fcn.004011c0
add esp, 8
push str.RegEnumKeyExW
mov ecx, dword [ebp + 8]
add ecx, 0x528
push ecx
call fcn.004011c0
add esp, 8
push str.RegEnumValueW
mov edx, dword [ebp + 8]
add edx, 0x5a0
push edx
call fcn.004011c0
add esp, 8
push str.RegFlushKey
mov eax, dword [ebp + 8]
add eax, 0x618
push eax
call fcn.004011c0
add esp, 8
push str.RegGetKeySecurity
mov ecx, dword [ebp + 8]
add ecx, 0x690
push ecx
call fcn.004011c0
add esp, 8
push str.RegLoadKeyW
mov edx, dword [ebp + 8]
add edx, 0x708
push edx
call fcn.004011c0
add esp, 8
push str.RegQueryInfoKeyW
mov eax, dword [ebp + 8]
add eax, 0x780
push eax
call fcn.004011c0
add esp, 8
push str.RegQueryMultipleValuesW
mov ecx, dword [ebp + 8]
add ecx, 0x7f8
push ecx
call fcn.004011c0
add esp, 8
push str.RegQueryValueW
mov edx, dword [ebp + 8]
add edx, 0x870
push edx
call fcn.004011c0
add esp, 8
push 0x417148
mov eax, dword [ebp + 8]
add eax, 0x8e8
push eax
call fcn.004011c0
add esp, 8
push str.RegReplaceKeyW
mov ecx, dword [ebp + 8]
add ecx, 0x960
push ecx
call fcn.004011c0
add esp, 8
push str.RegRestoreKeyW
mov edx, dword [ebp + 8]
add edx, 0x9d8
push edx
call fcn.004011c0
add esp, 8
push str.RegSaveKeyW
mov eax, dword [ebp + 8]
add eax, 0xa50
push eax
call fcn.004011c0
add esp, 8
push str.RegSaveKeyExW
mov ecx, dword [ebp + 8]
add ecx, 0xac8
push ecx
call fcn.004011c0
add esp, 8
push str.RegSetKeyValueW
mov edx, dword [ebp + 8]
add edx, 0xb40
push edx
call fcn.004011c0
add esp, 8
push str.RegSetValueW
mov eax, dword [ebp + 8]
add eax, 0xbb8
push eax
call fcn.004011c0
add esp, 8
push 0x4171b8
mov ecx, dword [ebp + 8]
add ecx, 0xc30
push ecx
call fcn.004011c0
add esp, 8
push str.RegSetKeySecurity
mov edx, dword [ebp + 8]
add edx, 0xca8
push edx
call fcn.004011c0
add esp, 8
push str.RegUnLoadKeyW
mov eax, dword [ebp + 8]
add eax, 0xd20
push eax
call fcn.004011c0
add esp, 8
push 0x4171ec
mov ecx, dword [ebp + 8]
add ecx, 0xd98
push ecx
call fcn.004011c0
add esp, 8
push str.CreateProcessAsUserW
mov edx, dword [ebp + 8]
add edx, 0xe10
push edx
call fcn.004011c0
add esp, 8
push str.CreateProcessWithLogonW
mov eax, dword [ebp + 8]
add eax, 0xe88
push eax
call fcn.004011c0
add esp, 8
push str.DuplicateToken
mov ecx, dword [ebp + 8]
add ecx, 0xf00
push ecx
call fcn.004011c0
add esp, 8
push str.DuplicateTokenEx
mov edx, dword [ebp + 8]
add edx, 0xf78
push edx
call fcn.004011c0
add esp, 8
push str.GetTokenInformation
mov eax, dword [ebp + 8]
add eax, 0xff0
push eax
call fcn.004011c0
add esp, 8
push 0x41726c
mov ecx, dword [ebp + 8]
add ecx, 0x1068
push ecx
call fcn.004011c0
add esp, 8
push str.SetSecurityDescriptorDacl
mov edx, dword [ebp + 8]
add edx, 0x10e0
push edx
call fcn.004011c0
add esp, 8
push str.SetSecurityDescriptorSacl
mov eax, dword [ebp + 8]
add eax, 0x1158
push eax
call fcn.004011c0
add esp, 8
push str.SetSecurityDescriptorOwner
mov ecx, dword [ebp + 8]
add ecx, 0x11d0
push ecx
call fcn.004011c0
add esp, 8
push str.SetSecurityInfo
mov edx, dword [ebp + 8]
add edx, 0x1248
push edx
call fcn.004011c0
add esp, 8
push str.SetSecurityInfoExW
mov eax, dword [ebp + 8]
add eax, 0x12c0
push eax
call fcn.004011c0
add esp, 8
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea ecx, [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1020], eax
cmp dword [ebp - 0x1020], 0xffffffff
je 0x40f157
push 0
mov edx, dword [ebp - 0x1020]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
push 0
mov eax, dword [ebp - 8]
push eax
push 0
push 0x1000002
push 0
mov ecx, dword [ebp - 0x1020]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x101c], eax
cmp dword [ebp - 0x101c], 0
je 0x40f14a
mov edx, dword [ebp - 8]
push edx
push 0
push 0
push 4
mov eax, dword [ebp - 0x101c]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40f13d
mov dword [ebp - 0x1024], 0
jmp 0x40f084
mov ecx, dword [ebp - 0x1024]
add ecx, 1
mov dword [ebp - 0x1024], ecx
mov edx, dword [ebp - 0x1024]
cmp edx, dword [ebp + 0xc]
jge 0x40f133
mov eax, dword [ebp - 0x1024]
imul eax, eax, 0x78
add eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1024]
imul edx, edx, 0x78
mov ecx, dword [ebp + 8]
mov dword [ecx + edx + 0x74], eax
mov edx, dword [ebp - 0x1024]
imul edx, edx, 0x78
mov eax, dword [ebp + 8]
cmp dword [eax + edx + 0x74], 0
je 0x40f12e
mov ecx, dword [ebp - 0x1024]
imul ecx, ecx, 0x78
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x74]
sub eax, dword [ebp - 0xc]
add eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jb 0x40f11a
mov edx, dword [ebp - 4]
add edx, dword [ebp - 8]
cmp dword [ebp - 0x10], edx
jae 0x40f11a
push 0x10
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x1024]
imul ecx, ecx, 0x78
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x64]
push eax
call fcn.004012c0
add esp, 0xc
jmp 0x40f12e
mov ecx, dword [ebp - 0x1024]
imul ecx, ecx, 0x78
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x74], 0
jmp 0x40f075
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x101c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1020]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004010d5
mov esp, ebp
pop ebp
ret