Function at 0x4c7320
Capabilities:
Get session user name
Query service configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xf
push 0
push 0
dec ecx
jne 0x4c7328
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405738
xor eax, eax
push ebp
push 0x4c78e9
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4c736c
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x28]
call fcn.004c6f44
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4c7398
cmp byte [0x7ccccc], 0
je 0x4c73e3
lea eax, [ebp - 0x34]
mov ecx, dword [ebp - 4]
mov edx, 0x4c7918
call fcn.00405594
mov eax, dword [ebp - 0x34]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 0x28]
mov edx, 0x4c793c
call fcn.00405594
mov eax, dword [ebp - 0x38]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
mov eax, 0xbedacc
mov edx, dword [ebp - 4]
call fcn.004052cc
mov eax, 0xbedac8
mov edx, dword [ebp - 4]
call fcn.004052cc
mov eax, dword [0xbedac8]
call fcn.00405548
test eax, eax
jle 0x4c743e
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], 1
mov eax, dword [0xbedac8]
mov edx, dword [ebp - 0x24]
cmp byte [eax + edx - 1], 0x20
jne 0x4c7436
mov eax, 0xbedac8
call fcn.004057a0
mov edx, dword [ebp - 0x24]
mov byte [eax + edx - 1], 0x5f
inc dword [ebp - 0x24]
dec dword [ebp - 0x30]
jne 0x4c7415
mov edx, 0x4c794c
mov cl, 1
mov eax, 0x4c7974
call fcn.00410cd0
test al, al
jne 0x4c746c
mov edx, 0x4c794c
mov cl, 1
mov eax, 0x4c7984
call fcn.00410cd0
test al, al
jne 0x4c746c
xor eax, eax
jmp 0x4c746e
mov al, 1
mov byte [0xbedac4], al
cmp byte [0x7ccccc], 0
je 0x4c74ac
lea ecx, [ebp - 0x40]
xor edx, edx
mov al, byte [0xbedac4]
call fcn.0040ac1c
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 0x4c7998
call fcn.00405594
mov eax, dword [ebp - 0x3c]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
cmp byte [0xbedac4], 0
je 0x4c7501
mov eax, dword [0x7d6e88]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x34]
push 0
mov ecx, dword [0x7d6e88]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x4c7020]
call fcn.004c7230
mov dword [0xbedabc], eax
cmp byte [0x7ccccc], 0
je 0x4c74f8
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
mov eax, 0x4c79a8
call fcn.004c647c
mov byte [ebp - 5], 1
jmp 0x4c78b1
cmp byte [0x7ccccc], 0
je 0x4c751d
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
mov eax, 0x4c79c8
call fcn.004c647c
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4c7689
push 0xf01ff
mov eax, dword [0xbedac8]
call fcn.00405748
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
setne byte [0xbedac4]
cmp byte [0xbedac4], 0
je 0x4c7680
lea eax, [ebp - 0x20]
push eax
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfigA
mov eax, dword [ebp - 0x20]
call fcn.0040a074
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x4c7670
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfigA
cmp byte [0x7ccccc], 0
je 0x4c75d8
lea eax, [ebp - 0x44]
mov ecx, dword [0xbedac8]
mov edx, 0x4c79dc
call fcn.00405594
mov eax, dword [ebp - 0x44]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0x1c]
call fcn.00405480
cmp byte [0x7ccccc], 0
je 0x4c7610
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0x18]
mov edx, 0x4c79f4
call fcn.00405594
mov eax, dword [ebp - 0x48]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
mov edx, 0x4c7a14
mov eax, dword [ebp - 0x18]
call fcn.0040a1c0
test eax, eax
jne 0x4c7658
lea eax, [ebp - 0x18]
mov edx, 0x4c7a28
call fcn.00405310
cmp byte [0x7ccccc], 0
je 0x4c7658
lea eax, [ebp - 0x4c]
mov ecx, dword [ebp - 0x18]
mov edx, 0x4c7a38
call fcn.00405594
mov eax, dword [ebp - 0x4c]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c7677
xor edx, edx
mov eax, dword [ebp - 0x1c]
call fcn.00402828
ret
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
cmp byte [0x7ccccc], 0
je 0x4c76a5
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
mov eax, 0x4c7a58
call fcn.004c647c
cmp byte [0xbedac4], 0
je 0x4c7803
mov dword [ebp - 0x20], pe_nt_image_headers32
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x20]
call fcn.004058d4
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x14]
call fcn.00405748
push eax
call sub.advapi32.dll_GetUserNameA
cmp byte [0x7ccccc], 0
je 0x4c7710
mov eax, dword [ebp - 0x14]
call fcn.00405748
lea edx, [ebp - 0x54]
call fcn.0040b624
mov ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
mov edx, 0x4c7a6c
call fcn.00405594
mov eax, dword [ebp - 0x50]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
cmp byte [0x7ccccc], 0
je 0x4c773a
lea eax, [ebp - 0x58]
mov ecx, dword [ebp - 0x18]
mov edx, 0x4c7a84
call fcn.00405594
mov eax, dword [ebp - 0x58]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
mov eax, dword [ebp - 0x14]
call fcn.00405748
call fcn.0040b40c
mov edx, eax
lea eax, [ebp - 0x14]
call fcn.004058d4
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.0040a1c0
test eax, eax
sete byte [0xbedac4]
cmp byte [0x7ccccc], 0
je 0x4c779e
lea ecx, [ebp - 0x60]
xor edx, edx
mov al, byte [0xbedac4]
call fcn.0040ac1c
mov ecx, dword [ebp - 0x60]
lea eax, [ebp - 0x5c]
mov edx, 0x4c7a9c
call fcn.00405594
mov eax, dword [ebp - 0x5c]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
cmp byte [0xbedac4], 0
jne 0x4c77ca
lea edx, [ebp - 0x64]
mov eax, dword [ebp - 0x28]
call fcn.0040a0f8
mov edx, dword [ebp - 0x64]
mov eax, 0x4c7ab4
call fcn.0040588c
test eax, eax
jle 0x4c77ca
mov byte [0xbedac4], 1
cmp byte [0x7ccccc], 0
je 0x4c7803
lea ecx, [ebp - 0x6c]
xor edx, edx
mov al, byte [0xbedac4]
call fcn.0040ac1c
mov ecx, dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
mov edx, 0x4c7ac8
call fcn.00405594
mov eax, dword [ebp - 0x68]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
mov al, byte [0xbedac4]
mov byte [ebp - 5], al
cmp byte [0xbedac4], 0
je 0x4c78b1
cmp byte [0x7ccccc], 0
je 0x4c7851
lea ecx, [ebp - 0x74]
xor edx, edx
mov al, byte [0xbedac4]
call fcn.0040ac1c
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
mov edx, 0x4c7ae0
call fcn.00405594
mov eax, dword [ebp - 0x70]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
mov eax, dword [0x7d6e88]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x34]
push 0
mov ecx, dword [0x7d6e88]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x4c7020]
call fcn.004c7230
mov dword [0xbedabc], eax
cmp byte [0x7ccccc], 0
je 0x4c78b1
lea ecx, [ebp - 0x7c]
xor edx, edx
mov al, byte [0xbedac4]
call fcn.0040ac1c
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x78]
mov edx, 0x4c7af4
call fcn.00405594
mov eax, dword [ebp - 0x78]
or ecx, 0xffffffff
mov edx, dword [0x7cccd0]
call fcn.004c647c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c78f0
lea eax, [ebp - 0x7c]
mov edx, 0x13
call fcn.0040529c
lea eax, [ebp - 0x28]
call fcn.00405278
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.0040529c
lea eax, [ebp - 4]
call fcn.00405278
ret