Function at 0x401b50
Capabilities:
Enumerate services
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x107c
call fcn.00414550
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
xor ebx, ebx
mov dword [ebp - 0x1060], 0
push 4
push ebx
push ebx
mov dword [ebp - 0x1054], 0
mov dword [ebp - 0x1070], 0
mov dword [ebp - 0x105c], ebx
mov dword [ebp - 0x1074], ebx
mov dword [ebp - 0x104c], ebx
mov dword [0x41e8e0], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x106c], edi
test edi, edi
je 0x402578
push esi
push 0x510
call fcn.00412b39
add esp, 4
mov esi, eax
lea eax, [ebp - 0x1070]
mov dword [ebp - 0x1058], esi
push eax
lea eax, [ebp - 0x1054]
push eax
lea eax, [ebp - 0x1060]
push eax
push 0x24
push esi
push 3
push 0x30
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
call edi
test eax, eax
jne 0x401c74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x1058]
test eax, eax
je 0x401c15
push eax
call fcn.00412825
add esp, 4
cmp esi, 0xea
jne 0x40248b
mov esi, dword [ebp - 0x1060]
xor ecx, ecx
add esi, 0x24
mov edx, 0x24
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00412b39
add esp, 4
mov dword [ebp - 0x1058], eax
lea eax, [ebp - 0x1070]
push eax
lea eax, [ebp - 0x1054]
push eax
lea eax, [ebp - 0x1060]
push eax
push esi
mov esi, dword [ebp - 0x1058]
push esi
push 3
push 0x30
push dword [ebp - 0x106c]
call edi
test esi, esi
je 0x40248b
mov dword [ebp - 0x1078], ebx
cmp dword [ebp - 0x1054], ebx
jbe 0x402482
mov eax, esi
mov dword [ebp - 0x1050], esi
push 5
push dword [eax]
push dword [ebp - 0x106c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x1068], eax
test eax, eax
je 0x402454
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1064], 0
push ecx
xor edi, edi
push edi
push edi
push eax
mov dword [ebp - 0x1048], edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x401d43
mov dword [ebp - 0x1048], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401d43
mov esi, dword [ebp - 0x1064]
xor ecx, ecx
mov eax, esi
mov edx, 0x24
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00412b39
add esp, 4
mov edi, eax
lea eax, [ebp - 0x1064]
mov dword [ebp - 0x1048], edi
push eax
push esi
mov esi, dword [ebp - 0x1068]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x401d43
push edi
call fcn.00412825
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402454
mov byte [ebp - 0x424], 0
mov byte [ebp - 0x824], 0
push 0x2f
push dword [edi + 0xc]
call dword [sym.imp.VCRUNTIME140.dll_strchr]
mov esi, dword [ebp - 0x1048]
mov edi, eax
add esp, 8
mov esi, dword [esi + 0xc]
test edi, edi
je 0x401de6
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401d73
sub ecx, edx
mov edx, edi
lea ebx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401d81
sub edx, ebx
lea eax, [ebp - 0x824]
sub ecx, edx
push ecx
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov eax, dword [ebp - 0x1048]
add esp, 0xc
mov ecx, dword [eax + 0xc]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401db0
sub ecx, edx
mov edx, edi
lea esi, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x401dc0
sub edx, esi
sub ecx, edx
cmp ecx, 0x400
jae 0x40258a
mov ebx, dword [ebp - 0x105c]
mov byte [ebp + ecx - 0x824], al
jmp 0x401dfe
lea ecx, [ebp - 0x824]
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x401df0
push 0x4182e8
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
push 7
push str.MonServ
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
add esp, 0xc
mov esi, eax
lea eax, [ebp - 0x824]
push 0x14
push str.CIUMonServiceStartup
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
add esp, 0xc
test eax, eax
sete al
test esi, esi
je 0x4020cc
test al, al
jne 0x4020cc
push 0xa
push str.CIUWatcher
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x402434
mov byte [ebp - 0xc24], al
mov byte [ebp - 0x424], al
test edi, edi
je 0x402434
lea ecx, [ebp - 0x1024]
sub ecx, edi
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [edi + ecx - 1], al
test al, al
jne 0x401ea5
mov edi, dword [sym.imp.VCRUNTIME140.dll_strstr]
lea eax, [ebp - 0x1024]
push str._service
push eax
call edi
add esp, 8
test eax, eax
je 0x401fb6
lea esi, [eax + 9]
push 0x4183c8
push esi
call edi
mov edi, eax
add esp, 8
test edi, edi
je 0x401f0f
sub edi, esi
lea eax, [ebp - 0x424]
push edi
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
cmp edi, 0x400
jae 0x40258a
mov byte [ebp + edi - 0x424], 0
jmp 0x401f24
lea ecx, [ebp - 0x424]
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x401f17
push 0x4182e8
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov edi, dword [sym.imp.VCRUNTIME140.dll_strstr]
lea eax, [ebp - 0x1024]
push str._condition
push eax
call edi
add esp, 8
test eax, eax
je 0x401fb6
lea esi, [eax + 0xb]
push 0x4183c8
push esi
call edi
mov edi, eax
add esp, 8
test edi, edi
je 0x401f8f
sub edi, esi
lea eax, [ebp - 0xc24]
push edi
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
cmp edi, 0x400
jae 0x40258a
mov byte [ebp + edi - 0xc24], 0
jmp 0x401fa4
lea ecx, [ebp - 0xc24]
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x401f97
push 0x4182e8
lea eax, [ebp - 0xc24]
push eax
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x18
call edi
mov esi, eax
add esp, 4
test esi, esi
je 0x402434
lea ecx, [ebp - 0x424]
mov dword [esi], 0
mov dword [esi + 0xc], 0
lea edx, [ecx + 1]
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov word [esi + 0x10], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401ff7
sub ecx, edx
lea eax, [ecx + 1]
push eax
call edi
mov ecx, eax
lea edx, [ebp - 0x424]
add esp, 4
mov dword [esi + 4], ecx
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x402014
lea ecx, [ebp - 0xc24]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402030
sub ecx, edx
je 0x40205e
lea eax, [ecx + 1]
push eax
call edi
mov ecx, eax
lea edx, [ebp - 0xc24]
add esp, 4
mov dword [esi + 8], ecx
nop
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x402050
mov edi, dword [ebp - 0x1050]
mov ecx, dword [edi + 4]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402070
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, eax
add esp, 4
mov dword [esi + 0xc], ecx
mov edx, dword [edi + 4]
nop
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x402090
mov eax, dword [ebp - 0x1048]
test ebx, ebx
cmove ebx, esi
mov dword [ebp - 0x105c], ebx
mov eax, dword [eax + 4]
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x1074]
test eax, eax
je 0x4020c1
mov dword [eax], esi
mov dword [ebp - 0x1074], esi
jmp 0x402434
xor ebx, ebx
mov byte [ebp - 0x1041], 0
mov byte [ebp - 0x1042], 0
test edi, edi
je 0x402236
lea edx, [ebp - 0x1024]
mov ecx, edi
sub edx, edi
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4020f0
mov ebx, dword [sym.imp.VCRUNTIME140.dll_strstr]
push str._relay
push edi
call ebx
add esp, 8
test eax, eax
je 0x402161
lea eax, [ebp - 0x1024]
mov byte [ebp - 0x1041], 1
push str._name
push eax
call ebx
add esp, 8
test eax, eax
je 0x402161
mov eax, dword [str._name]
mov dword [ebp - 0x14], eax
movzx eax, word [0x418318]
mov word [ebp - 0x10], ax
mov al, byte [0x41831a]
mov byte [ebp - 0xe], al
mov eax, dword [str._udp]
mov dword [ebp - 0x24], eax
movzx eax, word [0x418320]
mov byte [ebp - 0x1042], 1
jmp 0x402184
mov al, byte [0x41832c]
movq xmm0, qword [str._config]
mov byte [ebp - 0xc], al
mov eax, dword [str.__vsp]
mov dword [ebp - 0x24], eax
mov ax, word [0x418334]
movq qword [ebp - 0x14], xmm0
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1024]
push eax
call ebx
mov edx, eax
add esp, 8
test edx, edx
je 0x402215
lea ecx, [ebp - 0x14]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4021a8
sub ecx, esi
lea eax, [ebp - 0x24]
push eax
lea esi, [ecx + edx]
push esi
call ebx
mov edi, eax
add esp, 8
test edi, edi
je 0x4021ee
sub edi, esi
lea eax, [ebp - 0x424]
push edi
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
cmp edi, 0x400
jae 0x40258a
mov byte [ebp + edi - 0x424], 0
jmp 0x402203
lea ecx, [ebp - 0x424]
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4021f6
push 0x4182e8
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
lea eax, [ebp - 0x1024]
xor ebx, ebx
push str._vsp
push eax
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
mov eax, 1
cmovne ebx, eax
lea eax, [ebp - 0x1040]
push eax
push dword [ebp - 0x1068]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x104c], 0
jne 0x402265
call fcn.00409680
mov dword [ebp - 0x104c], eax
test eax, eax
je 0x40238b
call fcn.00409680
mov esi, eax
test esi, esi
je 0x40238b
mov edi, dword [ebp - 0x1050]
push dword [edi]
push 1
push str.name
push esi
call fcn.0040a2c0
push dword [edi + 4]
push 1
push str.displayname
push esi
call fcn.0040a2c0
mov edi, dword [ebp - 0x1048]
push dword [edi + 4]
push 2
push str.Startup
push esi
call fcn.0040a2c0
push dword [edi + 4]
push 2
push str.WatcherStartup
push esi
call fcn.0040a2c0
add esp, 0x40
push 0
push 2
push str.Watcher
push esi
call fcn.0040a2c0
lea ecx, [ebp - 0x424]
add esp, 0x10
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4022e0
sub ecx, edx
je 0x402302
lea eax, [ebp - 0x424]
push eax
push 1
push str.Config
push esi
call fcn.0040a2c0
add esp, 0x10
mov eax, dword [edi]
shr eax, 8
and eax, 1
push eax
push 2
push str.Desktop
push esi
call fcn.0040a2c0
push ebx
push 2
push 0x418384
push esi
call fcn.0040a2c0
xor eax, eax
cmp byte [ebp - 0x1041], al
setne al
push eax
push 2
push str.RelayService
push esi
call fcn.0040a2c0
xor eax, eax
cmp byte [ebp - 0x1042], al
setne al
push eax
push 2
push str.OldRelayService
push esi
call fcn.0040a2c0
add esp, 0x40
push dword [edi + 0xc]
push 1
push str.binary
push esi
call fcn.0040a2c0
mov edi, dword [ebp - 0x1050]
push esi
push 0x40
push dword [edi]
push dword [ebp - 0x104c]
call fcn.0040a2c0
add esp, 0x20
mov ecx, esi
call fcn.00409420
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov ecx, 0x41ecf0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4023a0
sub ecx, edx
jne 0x4023c4
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x824]
lea ecx, [ecx + 1]
mov byte [ecx + 0x41ecef], al
test al, al
jne 0x4023b0
mov ecx, 0x41e8f0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4023d0
sub ecx, edx
je 0x402434
cmp byte [ecx + 0x41e8ef], 0x5c
jne 0x4023f1
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea eax, [ebp - 0x824]
push 0x41e8f0
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x402434
mov byte [0x41e018], 0
xor ecx, ecx
nop dword [eax]
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x824]
lea ecx, [ecx + 1]
mov byte [ecx + 0x41ecef], al
test al, al
jne 0x402420
push dword [ebp - 0x1048]
call fcn.00412825
add esp, 4
push dword [ebp - 0x1068]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [ebp - 0x105c]
mov ecx, dword [ebp - 0x1078]
mov eax, dword [ebp - 0x1050]
inc ecx
add eax, 0x24
mov dword [ebp - 0x1078], ecx
mov dword [ebp - 0x1050], eax
cmp ecx, dword [ebp - 0x1054]
jb 0x401c96
mov esi, dword [ebp - 0x1058]
push esi
call fcn.00412825
add esp, 4
push dword [ebp - 0x106c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x104c]
test eax, eax
je 0x4024a8
mov ecx, eax
call fcn.00402590
mov esi, ebx
test ebx, ebx
je 0x40256c
mov ebx, dword [ebp - 0x104c]
test ebx, ebx
je 0x402521
mov edx, dword [esi + 4]
mov ecx, ebx
call fcn.0040a560
mov edi, eax
test edi, edi
je 0x402521
push 1
push 2
push str.Watcher
push edi
call fcn.0040a2c0
mov eax, dword [esi + 8]
add esp, 0x10
test eax, eax
je 0x4024f6
push eax
push 1
push str.ConditionFile
push edi
call fcn.0040a2c0
add esp, 0x10
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40250e
push eax
push 1
push str.WatcherDisplay
push edi
call fcn.0040a2c0
add esp, 0x10
push dword [esi + 0x14]
push 2
push str.WatcherStartup
push edi
call fcn.0040a2c0
add esp, 0x10
mov esi, dword [esi]
test esi, esi
jne 0x4024b8
mov ebx, dword [ebp - 0x105c]
test ebx, ebx
je 0x40256c
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebx + 4]
test eax, eax
je 0x402544
push eax
call edi
add esp, 4
mov eax, dword [ebx + 8]
test eax, eax
je 0x402551
push eax
call edi
add esp, 4
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x40255e
push eax
call edi
add esp, 4
mov esi, dword [ebx]
push ebx
call edi
add esp, 4
mov ebx, esi
test esi, esi
jne 0x402537
mov eax, dword [ebp - 0x104c]
mov dword [0x41e8e0], eax
pop esi
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop ebx
call fcn.00412814
mov esp, ebp
pop ebp
ret
call fcn.0041294b
int3