Function at 0x406f2d
Capabilities:
Query service status
Set registry value
Stop service

Disassembly:
jmp 0x4a2320
sub esp, 0x328
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x324], eax
push ebp
mov ebp, dword [esp + 0x330]
test ebp, ebp
je 0x4a26d7
cmp word [ebp], 0
je 0x4a26d7
push ebx
push esi
xor bl, bl
push edi
mov dword [esp + 0x18], ebx
call fcn.00404d2c
push 0
push 0
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0x19
push eax
push 0x22e008
push ebp
mov byte [esp + 0x5c], 1
call fcn.004017d5
add esp, 0x14
mov dword [esp + 0x24], eax
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, eax
test esi, esi
jne 0x4a23b6
push 0
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x4a2653
push 0xf01ff
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x4a240a
lea ecx, [esp + 0x4c]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4a23fa
cmp dword [esp + 0x50], 1
jne 0x4a23fa
mov ebx, 1
jmp 0x4a23fc
xor bl, bl
push dword [esp + 0x10]
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test bl, bl
jne 0x4a2683
lea eax, [esp + 0x128]
push eax
push 0x40
lea eax, [esp + 0x70]
push eax
push 0x566518
call fcn.0040a290
push eax
call fcn.00403481
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [esp + 0x10]
push eax
push 0xf003f
push 0
lea eax, [esp + 0x134]
push eax
push 0x80000002
call esi
test eax, eax
jne 0x4a2653
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push ebp
push 0x80000002
call esi
test eax, eax
je 0x4a26a5
push 0
lea eax, [esp + 0x18]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push ebp
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4a2636
lea eax, [esp + 0xa8]
mov dword [esp + 0x20], 1
push eax
push 0x40
lea eax, [esp + 0x70]
push eax
push 0x5664ec
call fcn.0040a290
push eax
call fcn.00403481
push 4
lea eax, [esp + 0x24]
push eax
push 4
push 0
lea eax, [esp + 0xb8]
push eax
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4a2614
lea eax, [esp + 0xa8]
mov dword [esp + 0x128], 0x5c
push eax
push 0x40
lea eax, [esp + 0x70]
push eax
push str.02____t846__0U
call fcn.0040a290
push eax
call fcn.00403481
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x12c]
push 0x105
push eax
call fcn.00404755
push 0x56656c
lea eax, [esp + 0x138]
push 0x105
push eax
call fcn.00404755
add esp, 0x18
lea eax, [esp + 0xa8]
push eax
push 0x40
lea eax, [esp + 0x70]
push eax
push 0x566518
call fcn.0040a290
push eax
call fcn.00403481
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x12c]
push 0x105
push eax
call fcn.00404755
push 0x56656c
lea eax, [esp + 0x138]
push 0x105
push eax
call fcn.00404755
push ebp
lea eax, [esp + 0x144]
push 0x105
push eax
call fcn.00404755
lea eax, [esp + 0x14c]
add esp, 0x24
mov ecx, eax
mov dword [esp + 0x2c], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a25c4
sub ecx, edx
sar ecx, 1
push 0
push 0x5664c4
lea eax, [ecx + ecx]
mov word [esp + 0x30], ax
add eax, 2
mov word [esp + 0x32], ax
call fcn.004072fc
test eax, eax
je 0x4a2614
lea ecx, [esp + 0x28]
push ecx
call eax
mov ebx, eax
shr ebx, 0x1f
xor bl, 1
je 0x4a2608
push 0
jmp 0x4a2612
push eax
call fcn.004093d6
add esp, 4
push eax
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0x14]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
push dword [esp + 0x14]
call fcn.0040bc08
add esp, 8
push esi
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0x10]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call edi
mov byte [esp + 0x18], bl
test bl, bl
jne 0x4a2683
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x24], 0
je 0x4a2683
call ebx
push 0
mov esi, eax
mov byte [esp + 0x4c], 0
push 0
lea eax, [esp + 0x38]
push eax
push 0x22e008
push ebp
call fcn.004017d5
add esp, 0x14
push esi
call edi
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
movzx eax, al
pop ebp
mov ecx, dword [esp + 0x324]
xor ecx, esp
call fcn.0040512d
add esp, 0x328
ret 4
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
push dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
call ebx
push dword [esp + 0x10]
mov esi, eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call edi
jmp 0x4a2659
mov ecx, dword [esp + 0x328]
xor eax, eax
pop ebp
xor ecx, esp
call fcn.0040512d
add esp, 0x328
ret 4