Function at 0x12ff53a0
Capabilities:
Create service

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x130726a6
push eax
mov dword fs:[0], esp
sub esp, 0x644
push ebx
push esi
push edi
call fcn.12f9c460
test eax, eax
je 0x12ff53d6
mov dword [0x131ca5b8], 0x32
jmp 0x12ff57a1
mov edi, dword [esp + 0x668]
cmp edi, 4
ja 0x12ff5797
mov eax, dword [esp + 0x660]
xor ebx, ebx
cmp eax, ebx
je 0x12ff5797
cmp byte [eax], bl
je 0x12ff5797
mov esi, dword [esp + 0x678]
cmp esi, ebx
je 0x12ff5797
cmp byte [esi], bl
je 0x12ff5797
push ebp
mov dword [0x131ca5b8], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 0xa
mov dword [esp + 0x28], 2
push 0xa
push ebx
push ebx
mov dword [esp + 0x668], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [esp + 0x18], eax
jne 0x12ff5474
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x12ff56d1
test byte [esp + 0x24], 8
je 0x12ff5494
push eax
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x12ff5494
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x18], ebx
je 0x12ff56d1
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x12ff5726
lea ecx, [esp + 0x10]
call fcn.12ff5280
test eax, eax
je 0x12ff54e2
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, ebx
mov dword [esp + 0x1c], eax
jne 0x12ff5726
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x12ff5726
mov ebp, dword [esp + 0x680]
mov dword [esp + 0x38], ebx
cmp ebp, ebx
mov dword [esp + 0x2c], ebx
je 0x12ff550e
cmp byte [ebp], bl
je 0x12ff550e
lea eax, [esp + 0x38]
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x3c]
xor esi, esi
call fcn.12f4bec0
mov eax, dword [esp + 0x684]
mov byte [esp + 0x65c], 1
cmp eax, ebx
je 0x12ff5536
push eax
lea ecx, [esp + 0x40]
call fcn.12f4c110
mov eax, dword [esp + 0x688]
cmp eax, ebx
je 0x12ff554b
push eax
lea ecx, [esp + 0x40]
call fcn.12f4c110
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x255]
mov byte [esp + 0x254], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x40]
mov dword [esp + 0x34], 0x400
cmp eax, ebx
jle 0x12ff559f
lea ecx, [esp + 0x34]
lea edx, [esp + 0x254]
push ecx
push edx
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.12f53a30
add esp, 0x10
test eax, eax
je 0x12ff5782
lea esi, [esp + 0x254]
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x12ff55f2
mov ecx, dword [esp + 0x24]
push ecx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [esp + 0x18], eax
jne 0x12ff55ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x12ff55f2
test byte [esp + 0x24], 8
je 0x12ff55f2
push eax
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x12ff55ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x690]
mov ecx, dword [esp + 0x68c]
push edx
mov edx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x684]
push esi
push edx
mov edx, dword [esp + 0x680]
push ebp
push ecx
mov ecx, dword [esp + 0x684]
push edx
mov edx, dword [esp + 0x684]
push ecx
mov ecx, dword [esp + 0x694]
push edx
mov edx, dword [esp + 0x688]
push 0xf01ff
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
cmp esi, ebx
je 0x12ff56b1
mov ebp, dword [esp + 0x678]
mov dword [esp + 0x30], 1
cmp ebp, ebx
mov dword [esp + 0x1c], esi
je 0x12ff56bb
call fcn.13002620
cmp dword [0x131caa80], ebx
je 0x12ff56bb
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x4e]
mov word [esp + 0x4c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
lea eax, [esp + 0x50]
push 0x104
push eax
push 0xffffffffffffffff
push ebp
call fcn.12f51030
add esp, 0x14
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x4c]
push edx
push 1
push esi
mov dword [esp + 0x38], ecx
call dword [0x131caa80]
jmp 0x12ff56bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x65c], bl
call fcn.12f4bed0
cmp dword [esp + 0x30], ebx
jne 0x12ff56ec
cmp dword [0x131ca5b8], ebx
jne 0x12ff56ec
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x12ff56e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131ca5b8], eax
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp eax, ebx
pop ebp
je 0x12ff5702
push eax
call esi
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x12ff5715
push eax
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x12ff5720
push eax
call esi
mov eax, dword [esp + 0x2c]
jmp 0x12ff57a3
mov ecx, dword [esp + 0x690]
mov edx, dword [esp + 0x68c]
push ecx
mov ecx, dword [esp + 0x68c]
push edx
mov edx, dword [esp + 0x68c]
push ecx
mov ecx, dword [esp + 0x68c]
push edx
mov edx, dword [esp + 0x688]
push ecx
mov ecx, dword [esp + 0x688]
push esi
push edx
mov edx, dword [esp + 0x68c]
push ecx
mov ecx, dword [esp + 0x688]
push edx
push edi
push ecx
push eax
call fcn.12ff6680
add esp, 0x30
mov dword [esp + 0x30], eax
jmp 0x12ff56cb
lea ecx, [esp + 0x3c]
mov byte [esp + 0x65c], bl
call fcn.12f4bed0
jmp 0x12ff56d1
mov dword [0x131ca5b8], 0x57
xor eax, eax
mov ecx, dword [esp + 0x650]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x650
ret