Function at 0x402390
Capabilities:
Create process on windows
Modify service
Query service status
Start service

Disassembly:
sub esp, 0x4b4
push ebx
push esi
push edi
mov ecx, 7
mov esi, 0x40f2b8
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
movsw word es:[edi], word [esi]
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov dword [esp + 0x2c], eax
jne 0x40243d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [esp + 0x2b8]
push ebx
push 0x103
push eax
call fcn.00403ba0
add esp, 0xc
lea ecx, [esp + 0xb0]
push eax
push ebx
push 0x40f27c
push 0x103
push ecx
call fcn.004051ce
mov ecx, dword [0x4138a0]
add esp, 0x14
lea edx, [esp + 0xb0]
lea eax, [esp + 0x30]
push edx
mov edx, dword [0x40c2d0]
push 0x288
push eax
push ecx
push edx
push 0x40ef78
push 3
push 0x412858
call fcn.00404600
add esp, 0x20
jmp 0x40256c
mov ecx, dword [str.LSMonSvc]
push ebp
push 0xf01ff
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x40282e
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
lea edx, [esp + 0x14]
push edx
push ebx
push ebx
push eax
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
call ebp
mov ebx, eax
cmp ebx, 0x7a
je 0x4024c4
push ebx
lea eax, [esp + 0x2c0]
push 0x103
push eax
call fcn.00403ba0
add esp, 0xc
lea ecx, [esp + 0xb4]
push eax
push ebx
push 0x40f240
push 0x103
push ecx
call fcn.004051ce
add esp, 0x14
lea edx, [esp + 0xb4]
push edx
push 0x297
jmp 0x402a53
mov eax, dword [esp + 0x14]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
mov dword [esp + 0x2c], esi
jne 0x402581
call ebp
mov ebx, eax
lea ecx, [esp + 0x2bc]
push ebx
push 0x103
push ecx
call fcn.00403ba0
add esp, 0xc
lea edx, [esp + 0xb4]
push eax
push ebx
push 0x40f208
push 0x103
push edx
call fcn.004051ce
add esp, 0x14
lea eax, [esp + 0xb4]
push eax
push 0x2a1
mov edx, dword [0x4138a0]
mov eax, dword [0x40c2d0]
lea ecx, [esp + 0x3c]
push ecx
push edx
push eax
push 0x40ef78
push 3
push 0x412858
call fcn.00404600
add esp, 0x20
test esi, esi
je 0x402553
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
pop ebp
je 0x402565
push eax
call edi
mov edx, dword [esp + 0x2c]
push edx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
add esp, 0x4b4
ret
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push edx
push esi
push eax
call edi
test eax, eax
jne 0x4025df
call ebp
mov ebx, eax
lea ecx, [esp + 0x2bc]
push ebx
push 0x103
push ecx
call fcn.00403ba0
add esp, 0xc
lea edx, [esp + 0xb4]
push eax
push ebx
push 0x40f1d0
push 0x103
push edx
call fcn.004051ce
add esp, 0x14
lea eax, [esp + 0xb4]
push eax
push 0x2ab
jmp 0x402522
mov ecx, dword [str.LSMonSvc.exe]
lea edx, [esp + 0x2bc]
push ecx
push 0x413eac
push 0x40efe8
push 0x103
push edx
call fcn.004051ce
mov eax, dword [esi]
add esp, 0x14
cmp eax, 0x110
jne 0x402648
cmp dword [esi + 4], 2
jne 0x402648
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x2bc]
push eax
push ecx
call fcn.0040523e
add esp, 8
test eax, eax
jne 0x402648
mov edi, dword [str.EventLog]
mov esi, dword [esi + 0x18]
mov ecx, 4
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
mov esi, dword [esp + 0x2c]
je 0x4026e3
mov eax, dword [0x40c25c]
push 0
mov edi, dword [esp + 0x14]
push 0
push 0
push eax
push 0
lea ecx, [esp + 0x2d0]
push 0
push ecx
push 0xffffffffffffffff
push 2
push 0x110
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x4026e7
call ebp
mov ebx, eax
lea edx, [esp + 0x2bc]
push ebx
push 0x103
push edx
call fcn.00403ba0
add esp, 0xc
push eax
push ebx
push 0x40f19c
lea eax, [esp + 0xc0]
push 0x103
push eax
call fcn.004051ce
mov eax, dword [0x4138a0]
add esp, 0x14
lea ecx, [esp + 0xb4]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [0x40c2d0]
push 0x2bf
push edx
push eax
push ecx
push 0x40ef78
push 3
push 0x412858
call fcn.00404600
add esp, 0x20
jmp 0x4026e7
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x98]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x402755
call ebp
mov ebx, eax
lea eax, [esp + 0x2bc]
push ebx
push 0x103
push eax
call fcn.00403ba0
add esp, 0xc
lea ecx, [esp + 0xb4]
push eax
push ebx
push 0x40f164
push 0x103
push ecx
call fcn.004051ce
mov ecx, dword [0x4138a0]
add esp, 0x14
lea edx, [esp + 0xb4]
lea eax, [esp + 0x34]
push edx
mov edx, dword [0x40c2d0]
push 0x2c8
push eax
push ecx
push edx
jmp 0x402534
cmp dword [esp + 0x9c], 4
je 0x402821
push 0x40f140
lea eax, [esp + 0xb8]
push 0x103
push eax
call fcn.004051ce
mov eax, dword [0x4138a0]
add esp, 0xc
lea ecx, [esp + 0xb4]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [0x40c2d0]
push 0x2cf
push edx
push eax
push ecx
push 0x40ef78
push 3
push 0x412858
call fcn.00404600
add esp, 0x20
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x402821
call ebp
mov ebx, eax
cmp ebx, 0x420
je 0x402821
push ebx
lea edx, [esp + 0x2c0]
push 0x103
push edx
call fcn.00403ba0
add esp, 0xc
push eax
push ebx
push 0x40f10c
lea eax, [esp + 0xc0]
push 0x103
push eax
call fcn.004051ce
mov eax, dword [0x4138a0]
add esp, 0x14
lea ecx, [esp + 0xb4]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [0x40c2d0]
push 0x2d6
push edx
push eax
push ecx
jmp 0x402534
mov dword [esp + 0x18], 1
jmp 0x402548
push 0x40f0e8
lea edx, [esp + 0xb8]
push 0x103
push edx
call fcn.004051ce
mov edx, dword [0x4138a0]
add esp, 0xc
lea eax, [esp + 0xb4]
lea ecx, [esp + 0x34]
push eax
mov eax, dword [0x40c2d0]
push 0x2e0
push ecx
push edx
push eax
push 0x40ef78
push 3
push 0x412858
call fcn.00404600
mov ecx, dword [str.LSMonSvc.exe]
add esp, 0x20
lea edx, [esp + 0x2bc]
push ecx
push 0x413eac
push str._s_s__i
push 0x103
push edx
call fcn.004051ce
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x68]
add esp, 0x14
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x54]
push ecx
mov dword [esp + 0x24], eax
push edx
push ebx
mov dword [esp + 0x30], eax
push ebx
push ebx
mov dword [esp + 0x3c], eax
push ebx
push ebx
lea eax, [esp + 0x2d8]
push ebx
push eax
mov ebp, 0x44
mov word [esp + 0xa8], bx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [esp + 0x7c], ebp
mov dword [esp + 0xa8], 1
call ebx
test eax, eax
jne 0x402971
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea ecx, [esp + 0x2bc]
push ebx
push 0x103
push ecx
call fcn.00403ba0
add esp, 0xc
lea edx, [esp + 0xb4]
push eax
push ebx
push 0x40f0a0
push 0x103
push edx
call fcn.004051ce
mov edx, dword [0x4138a0]
add esp, 0x14
lea eax, [esp + 0xb4]
lea ecx, [esp + 0x34]
push eax
mov eax, dword [0x40c2d0]
push 0x2ee
push ecx
push edx
push eax
push 0x40ef78
push 3
push 0x412858
call fcn.00404600
add esp, 0x20
jmp 0x402553
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [str.LSMonSvc.exe]
lea ecx, [esp + 0x2bc]
push eax
push 0x413eac
push str._s_s__s
push 0x103
push ecx
call fcn.004051ce
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x68]
xor edx, edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], edx
add esp, 0x14
mov word [esp + 0x84], ax
mov dword [esp + 0x20], edx
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x54]
mov dword [esp + 0x24], edx
push eax
push ecx
push edx
push edx
push edx
push edx
push edx
mov dword [esp + 0x44], edx
push edx
lea edx, [esp + 0x2dc]
mov edi, 1
push edx
push 0
mov dword [esp + 0x7c], ebp
mov dword [esp + 0xa8], edi
call ebx
test eax, eax
jne 0x402a7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [esp + 0x2bc]
push ebx
push 0x103
push eax
call fcn.00403ba0
add esp, 0xc
lea ecx, [esp + 0xb4]
push eax
push ebx
push 0x40f10c
push 0x103
push ecx
call fcn.004051ce
add esp, 0x14
lea edx, [esp + 0xb4]
push edx
push 0x302
mov ecx, dword [0x4138a0]
mov edx, dword [0x40c2d0]
lea eax, [esp + 0x3c]
push eax
push ecx
push edx
push 0x40ef78
push 3
push 0x412858
call fcn.00404600
add esp, 0x20
jmp 0x402553
mov eax, dword [esp + 0x1c]
push eax
call esi
mov ecx, dword [esp + 0x20]
push ecx
call esi
mov dword [esp + 0x18], edi
xor ebx, ebx
jmp 0x402553