Function at 0x40fd30
Capabilities:
Create service

Disassembly:
push 0xffffffffffffffff
push 0x4466f8
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4630d8]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov eax, dword [esp + 0x94]
cmp dword [eax - 0xc], 0
mov esi, 2
mov dword [esp + 0x88], esi
mov dword [esp + 0x18], 0
jne 0x40fdd6
lea ecx, [esp + 0x90]
mov byte [esp + 0x88], 1
call fcn.0040ed80
lea ecx, [esp + 0x98]
mov byte [esp + 0x88], 0
call fcn.0040ed80
lea ecx, [esp + 0xa0]
mov dword [esp + 0x88], 0xffffffff
call fcn.0040ed80
mov eax, 0x6a
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret
mov ecx, dword [esp + 0xa4]
cmp dword [ecx - 0xc], 0
je 0x40fd7b
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x40fe8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.OpenSCManager_failed_with_error
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], eax
call fcn.004010e0
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x2c]
push ecx
mov bl, 3
mov ecx, eax
mov byte [esp + 0x90], bl
call fcn.00403040
lea esi, [eax + 4]
mov eax, dword [esi]
sub eax, 0x10
cmp dword [eax + 0xc], 1
mov byte [esp + 0x88], 4
jle 0x40fe51
mov edx, dword [eax + 4]
push edx
mov ecx, esi
call fcn.00401c20
mov esi, dword [esi]
push esi
push 7
call fcn.0040ebe0
add esp, 8
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], bl
call fcn.0040ed80
lea ecx, [esp + 0x20]
mov byte [esp + 0x88], 2
call fcn.0040ed80
mov dword [esp + 0x18], 0x64
jmp 0x41022a
mov eax, dword [esp + 0xa8]
cmp eax, 4
ja case.0x40fe98.0
jmp dword [eax*4 + 0x410284]
mov esi, 3
jmp case.0x40fe98.0
mov esi, 4
jmp case.0x40fe98.0
xor esi, esi
jmp case.0x40fe98.0
mov esi, 1
cmp dword [esp + 0xac], 0
mov ebx, 0x10
je 0x40feca
mov ebx, 0x110
mov ebp, dword [esp + 0xa4]
cmp dword [ebp - 4], 1
jle 0x40feee
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [esp + 0xa8]
call fcn.00401c20
mov ebp, dword [esp + 0xa4]
mov edi, dword [esp + 0x9c]
cmp dword [edi - 4], 1
jle 0x40ff12
mov ecx, dword [edi - 0xc]
push ecx
lea ecx, [esp + 0xa0]
call fcn.00401c20
mov edi, dword [esp + 0x9c]
mov eax, dword [esp + 0x94]
cmp dword [eax - 4], 1
jle 0x40ff36
mov edx, dword [eax - 0xc]
push edx
lea ecx, [esp + 0x98]
call fcn.00401c20
mov eax, dword [esp + 0x94]
push 0
push 0
push 0
push 0
push 0
push ebp
push 1
push esi
push ebx
push 0xf01ff
push edi
push eax
mov eax, dword [esp + 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x4101ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
sub eax, 0x431
je 0x4100d7
sub eax, 5
je 0x40fff1
push str.CreateService_failed_with_unexpected_error
lea ecx, [esp + 0x3c]
call fcn.004010e0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
mov bl, 0xf
push edx
mov ecx, eax
mov byte [esp + 0x90], bl
call fcn.00401270
mov ecx, eax
mov byte [esp + 0x88], 0x10
call fcn.00401190
push eax
push 2
call fcn.0040ebe0
add esp, 8
lea ecx, [esp + 0x30]
mov byte [esp + 0x88], bl
call fcn.0040ed80
lea ecx, [esp + 0x38]
mov byte [esp + 0x88], 2
call fcn.0040ed80
mov dword [esp + 0x18], 0x64
jmp 0x410223
push str.__already_existing._Error
lea ecx, [esp + 0x24]
call fcn.004010e0
push str.CreateService_failed_due_to_the_service_name__
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 0xa
call fcn.004010e0
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0x54]
push edx
mov ecx, eax
mov byte [esp + 0x90], 0xb
call fcn.004011f0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x4c]
push edx
mov ecx, eax
mov byte [esp + 0x90], 0xc
call fcn.004011f0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x44]
mov bl, 0xd
push edx
mov ecx, eax
mov byte [esp + 0x90], bl
call fcn.00401270
mov ecx, eax
mov byte [esp + 0x88], 0xe
call fcn.00401190
push eax
push 7
call fcn.0040ebe0
add esp, 8
lea ecx, [esp + 0x40]
mov byte [esp + 0x88], bl
call fcn.0040ed80
lea ecx, [esp + 0x48]
mov byte [esp + 0x88], 0xc
call fcn.0040ed80
lea ecx, [esp + 0x50]
mov byte [esp + 0x88], 0xb
call fcn.0040ed80
lea ecx, [esp + 0x58]
mov byte [esp + 0x88], 0xa
call fcn.0040ed80
lea ecx, [esp + 0x20]
mov byte [esp + 0x88], 2
call fcn.0040ed80
jmp 0x410223
push str.__already_existing._Error
lea ecx, [esp + 0x2c]
call fcn.004010e0
push str.CreateService_failed_due_to_the_service__
lea ecx, [esp + 0x7c]
mov byte [esp + 0x8c], 5
call fcn.004010e0
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x74]
push edx
mov ecx, eax
mov byte [esp + 0x90], 6
call fcn.004011f0
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x6c]
push edx
mov ecx, eax
mov byte [esp + 0x90], 7
call fcn.004011f0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x64]
mov bl, 8
push edx
mov ecx, eax
mov byte [esp + 0x90], bl
call fcn.00401270
mov ecx, eax
mov byte [esp + 0x88], 9
call fcn.00401190
push eax
push 7
call fcn.0040ebe0
add esp, 8
lea ecx, [esp + 0x60]
mov byte [esp + 0x88], bl
call fcn.0040ed80
lea ecx, [esp + 0x68]
mov byte [esp + 0x88], 7
call fcn.0040ed80
lea ecx, [esp + 0x70]
mov byte [esp + 0x88], 6
call fcn.0040ed80
lea ecx, [esp + 0x78]
mov byte [esp + 0x88], 5
call fcn.0040ed80
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], 2
call fcn.0040ed80
jmp 0x410223
push str.Service_installed_OK:
lea ecx, [esp + 0x74]
call fcn.004010e0
lea ecx, [esp + 0xa0]
push ecx
lea edx, [esp + 0x7c]
mov bl, 0x11
push edx
mov ecx, eax
mov byte [esp + 0x90], bl
call fcn.004011f0
mov ecx, eax
mov byte [esp + 0x88], 0x12
call fcn.00401190
push eax
push 7
call fcn.0040ebe0
add esp, 8
lea ecx, [esp + 0x78]
mov byte [esp + 0x88], bl
call fcn.0040ed80
lea ecx, [esp + 0x70]
mov byte [esp + 0x88], 2
call fcn.0040ed80
push esi
call edi
mov eax, dword [esp + 0x1c]
push eax
call edi
lea ecx, [esp + 0x90]
mov byte [esp + 0x88], 1
call fcn.0040ed80
lea ecx, [esp + 0x98]
mov byte [esp + 0x88], 0
call fcn.0040ed80
lea ecx, [esp + 0xa0]
mov dword [esp + 0x88], 0xffffffff
call fcn.0040ed80
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret