Function at 0x40f2a0
Capabilities:
Create service

Disassembly:
push 0xffffffffffffffff
push 0x446638
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4630d0]
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 0x40f346
lea ecx, [esp + 0x90]
mov byte [esp + 0x88], 1
call fcn.0040fd60
lea ecx, [esp + 0x98]
mov byte [esp + 0x88], 0
call fcn.0040fd60
lea ecx, [esp + 0xa0]
mov dword [esp + 0x88], 0xffffffff
call fcn.0040fd60
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 0x40f2eb
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x40f3fc
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.00403070
lea esi, [eax + 4]
mov eax, dword [esi]
sub eax, 0x10
cmp dword [eax + 0xc], 1
mov byte [esp + 0x88], 4
jle 0x40f3c1
mov edx, dword [eax + 4]
push edx
mov ecx, esi
call fcn.00401bf0
mov esi, dword [esi]
push esi
push 7
call fcn.00410660
add esp, 8
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], bl
call fcn.0040fd60
lea ecx, [esp + 0x20]
mov byte [esp + 0x88], 2
call fcn.0040fd60
mov dword [esp + 0x18], 0x64
jmp 0x40f79a
mov eax, dword [esp + 0xa8]
cmp eax, 4
ja case.0x40f408.0
jmp dword [eax*4 + 0x40f7f4]
mov esi, 3
jmp case.0x40f408.0
mov esi, 4
jmp case.0x40f408.0
xor esi, esi
jmp case.0x40f408.0
mov esi, 1
cmp dword [esp + 0xac], 0
mov ebx, 0x10
je 0x40f43a
mov ebx, 0x110
mov ebp, dword [esp + 0xa4]
cmp dword [ebp - 4], 1
jle 0x40f45e
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [esp + 0xa8]
call fcn.00401bf0
mov ebp, dword [esp + 0xa4]
mov edi, dword [esp + 0x9c]
cmp dword [edi - 4], 1
jle 0x40f482
mov ecx, dword [edi - 0xc]
push ecx
lea ecx, [esp + 0xa0]
call fcn.00401bf0
mov edi, dword [esp + 0x9c]
mov eax, dword [esp + 0x94]
cmp dword [eax - 4], 1
jle 0x40f4a6
mov edx, dword [eax - 0xc]
push edx
lea ecx, [esp + 0x98]
call fcn.00401bf0
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 0x40f72a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
sub eax, 0x431
je 0x40f647
sub eax, 5
je 0x40f561
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.00410660
add esp, 8
lea ecx, [esp + 0x30]
mov byte [esp + 0x88], bl
call fcn.0040fd60
lea ecx, [esp + 0x38]
mov byte [esp + 0x88], 2
call fcn.0040fd60
mov dword [esp + 0x18], 0x64
jmp 0x40f793
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.00410660
add esp, 8
lea ecx, [esp + 0x40]
mov byte [esp + 0x88], bl
call fcn.0040fd60
lea ecx, [esp + 0x48]
mov byte [esp + 0x88], 0xc
call fcn.0040fd60
lea ecx, [esp + 0x50]
mov byte [esp + 0x88], 0xb
call fcn.0040fd60
lea ecx, [esp + 0x58]
mov byte [esp + 0x88], 0xa
call fcn.0040fd60
lea ecx, [esp + 0x20]
mov byte [esp + 0x88], 2
call fcn.0040fd60
jmp 0x40f793
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.00410660
add esp, 8
lea ecx, [esp + 0x60]
mov byte [esp + 0x88], bl
call fcn.0040fd60
lea ecx, [esp + 0x68]
mov byte [esp + 0x88], 7
call fcn.0040fd60
lea ecx, [esp + 0x70]
mov byte [esp + 0x88], 6
call fcn.0040fd60
lea ecx, [esp + 0x78]
mov byte [esp + 0x88], 5
call fcn.0040fd60
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], 2
call fcn.0040fd60
jmp 0x40f793
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.00410660
add esp, 8
lea ecx, [esp + 0x78]
mov byte [esp + 0x88], bl
call fcn.0040fd60
lea ecx, [esp + 0x70]
mov byte [esp + 0x88], 2
call fcn.0040fd60
push esi
call edi
mov eax, dword [esp + 0x1c]
push eax
call edi
lea ecx, [esp + 0x90]
mov byte [esp + 0x88], 1
call fcn.0040fd60
lea ecx, [esp + 0x98]
mov byte [esp + 0x88], 0
call fcn.0040fd60
lea ecx, [esp + 0xa0]
mov dword [esp + 0x88], 0xffffffff
call fcn.0040fd60
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