Function at 0x40bf10
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4881f5
mov eax, dword fs:[0]
push eax
mov eax, 0x10ec
call fcn.00458510
mov eax, dword [0x4db434]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x18]
movq qword [ebx], xmm0
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x6c], eax
mov dword [ebx], 0
mov dword [ebp - 4], 1
mov dword [ebx + 4], 0
mov dword [ebp - 4], 0
push 0xf003f
push 0
push 0
mov dword [ebp - 0x64], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 4], 3
mov eax, dword [ebx]
mov dword [ebp - 0x44], 0
cmp esi, eax
je 0x40c002
test eax, eax
je 0x40c000
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x40bffa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x10f8]
push str.Could_not_close_service_handle___i_.
push eax
call fcn.004052e0
add esp, 0xc
lea eax, [ebp - 0x10f8]
push 0x4d8cc4
push eax
call fcn.00459b3b
mov dword [ebx], 0
mov dword [ebx], esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.0040d670
cmp dword [ebx], 0
jne 0x40c07b
mov edx, edi
lea ecx, [ebp - 0xa4]
call fcn.00402830
mov edi, eax
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x8c]
mov edx, dword [ebp - 0x48]
call fcn.00402830
mov esi, eax
mov byte [ebp - 4], 5
cmp dword [edi + 0x14], 0x10
jb 0x40c045
mov edi, dword [edi]
cmp dword [esi + 0x14], 0x10
jb 0x40c04d
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
lea eax, [ebp - 0x10f8]
push str.Could_not_open_SCM_while_trying_to_create_service_with_name__s_and_path__s___i_.
push eax
call fcn.004052e0
add esp, 0x14
lea eax, [ebp - 0x10f8]
push 0x4d8cc4
push eax
call fcn.00459b3b
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 6
mov esi, dword [ebp - 0x68]
cmp dword [esi + 0x10], eax
je 0x40c1e4
push 2
push 0x4c4884
lea ecx, [ebp - 0xd4]
call fcn.004023e0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xbc]
push 1
push 0x4c4888
call fcn.004023e0
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0xbc]
push edi
push eax
lea eax, [ebp - 0xa4]
push eax
call fcn.00401e70
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xd4]
push ecx
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00401e70
mov byte [ebp - 4], 0xc
push esi
push eax
lea eax, [ebp - 0xec]
push eax
call fcn.00401e70
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.004028a0
add esp, 0x3c
mov esi, eax
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x40c16a
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40c14d
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403b20
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00402f20
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0x4c]
cmp eax, 8
jb 0x40c183
inc eax
lea ecx, [ebp - 0x60]
push eax
push dword [ebp - 0x60]
call fcn.00403b20
xor eax, eax
mov dword [ebp - 0x4c], 7
mov dword [ebp - 0x50], 0
mov word [ebp - 0x60], ax
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0xec]
call fcn.00401c20
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x8c]
call fcn.00401c20
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xa4]
call fcn.00401c20
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xbc]
call fcn.00401c20
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xd4]
call fcn.00401c20
jmp 0x40c25d
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.004028a0
add esp, 8
mov esi, eax
mov byte [ebp - 4], 0xf
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x40c230
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40c213
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403b20
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00402f20
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x4c]
cmp eax, 8
jb 0x40c249
inc eax
lea ecx, [ebp - 0x60]
push eax
push dword [ebp - 0x60]
call fcn.00403b20
xor eax, eax
mov dword [ebp - 0x4c], 7
mov dword [ebp - 0x50], 0
mov word [ebp - 0x60], ax
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
push eax
call fcn.004028a0
add esp, 8
mov byte [ebp - 4], 0x10
lea esi, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
lea edi, [ebp - 0x40]
push 0
cmovae esi, dword [ebp - 0x28]
lea edx, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
push 0
cmovae edi, dword [ebp - 0x40]
cmovae edx, dword [ebp - 0x40]
push 0
push 0
push 0
push esi
push 1
push dword [ebp - 0x6c]
push 0x10
push 0xf01ff
push edi
push edx
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 0x11
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebx + 4]
call fcn.0040d600
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x44]
call fcn.0040d670
cmp dword [ebx + 4], 0
jne 0x40c339
mov edx, dword [ebp - 0x70]
lea ecx, [ebp - 0xa4]
call fcn.00402830
mov edi, eax
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x8c]
mov edx, dword [ebp - 0x48]
call fcn.00402830
mov esi, eax
mov byte [ebp - 4], 0x13
cmp dword [edi + 0x14], 0x10
jb 0x40c303
mov edi, dword [edi]
cmp dword [esi + 0x14], 0x10
jb 0x40c30b
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
lea eax, [ebp - 0x10f8]
push str.Could_not_create_service_with_name__s_and_path__s___i_.
push eax
call fcn.004052e0
add esp, 0x14
lea eax, [ebp - 0x10f8]
push 0x4d8cc4
push eax
call fcn.00459b3b
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40c352
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00403b20
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40c37e
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403b20
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004584f8
mov esp, ebp
pop ebp
ret