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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xf
push 0
push 0
dec ecx
jne 0x4c9f44
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040573c
xor eax, eax
push ebp
push 0x4ca505
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4c9f88
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x28]
call fcn.004c9b60
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4c9fb4
cmp byte [0x884cd0], 0
je 0x4c9fff
lea eax, [ebp - 0x34]
mov ecx, dword [ebp - 4]
mov edx, 0x4ca534
call fcn.00405598
mov eax, dword [ebp - 0x34]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 0x28]
mov edx, 0x4ca558
call fcn.00405598
mov eax, dword [ebp - 0x38]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
mov eax, 0xca9acc
mov edx, dword [ebp - 4]
call fcn.004052e0
mov eax, 0xca9ac8
mov edx, dword [ebp - 4]
call fcn.004052e0
mov eax, dword [0xca9ac8]
call fcn.0040554c
test eax, eax
jle 0x4ca05a
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], 1
mov eax, dword [0xca9ac8]
mov edx, dword [ebp - 0x24]
cmp byte [eax + edx - 1], 0x20
jne 0x4ca052
mov eax, 0xca9ac8
call fcn.004057a4
mov edx, dword [ebp - 0x24]
mov byte [eax + edx - 1], 0x5f
inc dword [ebp - 0x24]
dec dword [ebp - 0x30]
jne 0x4ca031
mov edx, 0x4ca568
mov cl, 1
mov eax, 0x4ca590
call fcn.00410d68
test al, al
jne 0x4ca088
mov edx, 0x4ca568
mov cl, 1
mov eax, 0x4ca5a0
call fcn.00410d68
test al, al
jne 0x4ca088
xor eax, eax
jmp 0x4ca08a
mov al, 1
mov byte [0xca9ac4], al
cmp byte [0x884cd0], 0
je 0x4ca0c8
lea ecx, [ebp - 0x40]
xor edx, edx
mov al, byte [0xca9ac4]
call fcn.0040ab6c
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 0x4ca5b4
call fcn.00405598
mov eax, dword [ebp - 0x3c]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
cmp byte [0xca9ac4], 0
je 0x4ca11d
mov eax, dword [0x892f14]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x34]
push 0
mov ecx, dword [0x892f14]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x4c9c3c]
call fcn.004c9e4c
mov dword [0xca9abc], eax
cmp byte [0x884cd0], 0
je 0x4ca114
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
mov eax, 0x4ca5c4
call fcn.004c9098
mov byte [ebp - 5], 1
jmp 0x4ca4cd
cmp byte [0x884cd0], 0
je 0x4ca139
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
mov eax, 0x4ca5e4
call fcn.004c9098
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4ca2a5
push 0xf01ff
mov eax, dword [0xca9ac8]
call fcn.0040574c
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 [0xca9ac4]
cmp byte [0xca9ac4], 0
je 0x4ca29c
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.00409fc4
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x4ca28c
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 [0x884cd0], 0
je 0x4ca1f4
lea eax, [ebp - 0x44]
mov ecx, dword [0xca9ac8]
mov edx, 0x4ca5f8
call fcn.00405598
mov eax, dword [ebp - 0x44]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0x1c]
call fcn.00405484
cmp byte [0x884cd0], 0
je 0x4ca22c
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0x18]
mov edx, 0x4ca610
call fcn.00405598
mov eax, dword [ebp - 0x48]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
mov edx, 0x4ca630
mov eax, dword [ebp - 0x18]
call fcn.0040a110
test eax, eax
jne 0x4ca274
lea eax, [ebp - 0x18]
mov edx, 0x4ca644
call fcn.00405324
cmp byte [0x884cd0], 0
je 0x4ca274
lea eax, [ebp - 0x4c]
mov ecx, dword [ebp - 0x18]
mov edx, 0x4ca654
call fcn.00405598
mov eax, dword [ebp - 0x4c]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4ca293
xor edx, edx
mov eax, dword [ebp - 0x1c]
call fcn.0040283c
ret
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
cmp byte [0x884cd0], 0
je 0x4ca2c1
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
mov eax, 0x4ca674
call fcn.004c9098
cmp byte [0xca9ac4], 0
je 0x4ca41f
mov dword [ebp - 0x20], pe_nt_image_headers32
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x20]
call fcn.004058d8
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x14]
call fcn.0040574c
push eax
call sub.advapi32.dll_GetUserNameA
cmp byte [0x884cd0], 0
je 0x4ca32c
mov eax, dword [ebp - 0x14]
call fcn.0040574c
lea edx, [ebp - 0x54]
call fcn.0040b6bc
mov ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
mov edx, 0x4ca688
call fcn.00405598
mov eax, dword [ebp - 0x50]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
cmp byte [0x884cd0], 0
je 0x4ca356
lea eax, [ebp - 0x58]
mov ecx, dword [ebp - 0x18]
mov edx, 0x4ca6a0
call fcn.00405598
mov eax, dword [ebp - 0x58]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
mov eax, dword [ebp - 0x14]
call fcn.0040574c
call fcn.0040b47c
mov edx, eax
lea eax, [ebp - 0x14]
call fcn.004058d8
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.0040a110
test eax, eax
sete byte [0xca9ac4]
cmp byte [0x884cd0], 0
je 0x4ca3ba
lea ecx, [ebp - 0x60]
xor edx, edx
mov al, byte [0xca9ac4]
call fcn.0040ab6c
mov ecx, dword [ebp - 0x60]
lea eax, [ebp - 0x5c]
mov edx, 0x4ca6b8
call fcn.00405598
mov eax, dword [ebp - 0x5c]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
cmp byte [0xca9ac4], 0
jne 0x4ca3e6
lea edx, [ebp - 0x64]
mov eax, dword [ebp - 0x28]
call fcn.0040a048
mov edx, dword [ebp - 0x64]
mov eax, 0x4ca6d0
call fcn.00405890
test eax, eax
jle 0x4ca3e6
mov byte [0xca9ac4], 1
cmp byte [0x884cd0], 0
je 0x4ca41f
lea ecx, [ebp - 0x6c]
xor edx, edx
mov al, byte [0xca9ac4]
call fcn.0040ab6c
mov ecx, dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
mov edx, 0x4ca6e4
call fcn.00405598
mov eax, dword [ebp - 0x68]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
mov al, byte [0xca9ac4]
mov byte [ebp - 5], al
cmp byte [0xca9ac4], 0
je 0x4ca4cd
cmp byte [0x884cd0], 0
je 0x4ca46d
lea ecx, [ebp - 0x74]
xor edx, edx
mov al, byte [0xca9ac4]
call fcn.0040ab6c
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
mov edx, 0x4ca6fc
call fcn.00405598
mov eax, dword [ebp - 0x70]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
mov eax, dword [0x892f14]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x34]
push 0
mov ecx, dword [0x892f14]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x4c9c3c]
call fcn.004c9e4c
mov dword [0xca9abc], eax
cmp byte [0x884cd0], 0
je 0x4ca4cd
lea ecx, [ebp - 0x7c]
xor edx, edx
mov al, byte [0xca9ac4]
call fcn.0040ab6c
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x78]
mov edx, 0x4ca710
call fcn.00405598
mov eax, dword [ebp - 0x78]
or ecx, 0xffffffff
mov edx, dword [0x884cd4]
call fcn.004c9098
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4ca50c
lea eax, [ebp - 0x7c]
mov edx, 0x13
call fcn.004052b0
lea eax, [ebp - 0x28]
call fcn.0040528c
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004052b0
lea eax, [ebp - 4]
call fcn.0040528c
ret