Function at 0x40ec90
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x550070]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 0
mov byte [ebp - 0xa], 0
mov byte [ebp - 9], 0
mov byte [ebp - 8], 0
mov byte [ebp - 7], 1
mov byte [ebp - 0x14], 0
mov byte [ebp - 0x13], 0
mov byte [ebp - 0x12], 0
mov byte [ebp - 0x11], 0
mov byte [ebp - 0x10], 0
mov byte [ebp - 0xf], 5
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0
je 0x40ed08
mov eax, 1
jmp 0x40ef34
lea ecx, [ebp - 0x24]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40ed36
jmp 0x40eedd
xor eax, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x54], 0x10000000
mov dword [ebp - 0x50], 2
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 5
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x38], ecx
lea edx, [ebp - 0x28]
push edx
push 0
lea eax, [ebp - 0x54]
push eax
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x40ed9e
jmp 0x40eedd
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40edbb
jmp 0x40eedd
push 1
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x40edd5
jmp 0x40eedd
push 0
mov edx, dword [ebp - 0x28]
push edx
push 1
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x40edf5
jmp 0x40eedd
mov dword [ebp - 0x60], 0xc
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x20], 0xb60
mov edx, dword [ebp - 0x20]
add edx, 0xfff
and edx, 0xfffff000
mov dword [ebp - 0x20], edx
push 0x514068
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x18]
cmp dword [edx + 8], 0
jne 0x40ee60
cmp dword [ebp + 8], 0
je 0x40ee60
push str.GlobalHRDAEMON_STATUS_MUTEX
push 0
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x18]
cmp dword [edx + 8], 0
je 0x40eedd
push 0x5140e0
push 0
push 6
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov ecx, dword [ebp - 0x18]
mov dword [ecx], eax
mov edx, dword [ebp - 0x18]
cmp dword [edx], 0
jne 0x40eea9
cmp dword [ebp + 8], 0
je 0x40eea9
push str.GlobalHRDAEMON_STATUS
mov eax, dword [ebp - 0x20]
push eax
push 0
push 4
lea ecx, [ebp - 0x60]
push ecx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edx, dword [ebp - 0x18]
mov dword [edx], eax
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0
je 0x40eedd
mov ecx, dword [ebp - 0x20]
push ecx
push 0
push 0
push 6
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x18]
cmp dword [edx + 4], 0
je 0x40eedd
mov dword [ebp - 0x30], 1
cmp dword [ebp - 0x24], 0
je 0x40eeed
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x2c], 0
je 0x40eefd
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x28], 0
je 0x40ef0d
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x1c], 0
je 0x40ef1d
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x30], 0
jne 0x40ef2f
mov ecx, dword [ebp - 0x18]
call fcn.0040ef50
xor eax, eax
jmp 0x40ef34
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d181f
mov esp, ebp
pop ebp
ret 4