Function at 0x406730
Capabilities:
Create service

Disassembly:
push 0xffffffffffffffff
push 0x41fc81
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
mov eax, dword [0x428654]
push ebx
push ebp
xor ebp, ebp
push esi
push edi
mov esi, ecx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x54]
mov dword [esp + 0x12c], ebp
cmp eax, 0x10
jne 0x4067eb
mov eax, dword [esi + 0x60]
lea edi, [esi + 0x60]
push 0x42c988
push eax
call fcn.00408c2e
add esp, 8
test eax, eax
je 0x406812
mov eax, dword [edi]
push str.LocalSystem
push eax
call fcn.00408f96
add esp, 8
test eax, eax
je 0x406812
push 0x5c
mov ecx, edi
call fcn.0041b9a3
cmp eax, 0xffffffff
jne 0x4067d3
push 0x428508
lea ecx, [esp + 0x14]
call fcn.0041b7c8
push edi
lea ecx, [esp + 0x14]
call fcn.0041b8f4
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x10]
push eax
jmp 0x40680b
push edi
lea ecx, [esp + 0x14]
call fcn.0041b778
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x10]
push eax
jmp 0x40680b
mov eax, dword [esi + 0x70]
lea edi, [esi + 0x70]
push 0x42c988
push eax
call fcn.00408c2e
add esp, 8
test eax, eax
je 0x406812
mov edx, dword [edi]
mov ecx, edi
mov eax, dword [edx - 8]
push eax
call fcn.0041b90c
mov ebp, eax
mov eax, dword [esi + 0x64]
lea edi, [esi + 0x64]
push 0x42c988
push eax
call fcn.00408c2e
add esp, 8
test eax, eax
je 0x40683b
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax - 8]
push eax
call fcn.0041b90c
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x50]
mov bl, 1
test eax, eax
je 0x4068db
mov ecx, dword [0x428654]
mov dword [esp + 0x14], ecx
lea edx, [esi + 0x4c]
lea ecx, [esp + 0x14]
push edx
mov byte [esp + 0x130], bl
call fcn.0041b778
push 0x5c
lea ecx, [esp + 0x18]
call fcn.004170c3
cmp eax, 0xffffffff
je 0x4068a8
inc eax
lea ecx, [esp + 0x14]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0041700a
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x130], 2
call fcn.0041b778
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12c], bl
call fcn.0041b68b
lea ecx, [esp + 0x20]
push str._SYSTEMROOT_SYSTEM32_
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x14]
mov byte [esp + 0x12c], 0
call fcn.0041b68b
jmp 0x4068ea
mov eax, dword [esi + 0x4c]
lea ecx, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esi + 0x20]
push 0xf003f
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x40691c
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], 0xffffffff
call fcn.0041b68b
xor eax, eax
jmp 0x4069d3
mov edx, dword [esi + 0x54]
cmp edx, 0x10
jne 0x406930
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x406930
mov edx, 0x110
mov ebx, dword [esp + 0x18]
mov eax, dword [esi + 0x1c]
push ebx
push ebp
mov ecx, dword [esi + 0x18]
push 0
push 0
lea ebx, [esp + 0x30]
push 0
push ebx
mov ebx, dword [esi + 0x58]
push 1
push ebx
push edx
push 0xf01ff
push eax
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x4069a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov ebp, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp ebp, 0x431
je 0x406997
push ebp
mov ecx, esi
call fcn.00406a60
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], 0xffffffff
call fcn.0041b68b
xor eax, eax
jmp 0x4069d3
mov ecx, esi
call fcn.004069f0
mov ecx, esi
call fcn.00406730
jmp 0x4069ba
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call ebp
push edi
call ebp
mov dword [esi + 0x10], 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], 0xffffffff
call fcn.0041b68b
mov eax, 1
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x120
ret