Function at 0x40b369
Capabilities:
Create service
Modify service

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x416004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
call fcn.0040a17d
test eax, eax
je 0x40b391
xor eax, eax
jmp 0x40b5a5
push ebx
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x214], eax
cmp eax, ebx
jne 0x40b3c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40b3bf
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
push esi
push 0x40bb30
jmp 0x40b401
push 0x104
lea eax, [ebp - 0x20c]
push eax
push dword [0x416628]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x40b412
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40b3f9
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
push esi
push 0x40bab8
push 1
call fcn.004018db
add esp, 0xc
mov eax, esi
jmp 0x40b5a4
push edi
push ebx
push 0x40ba80
push 0x40ba70
push ebx
push ebx
lea eax, [ebp - 0x20c]
push eax
xor edi, edi
inc edi
push edi
push 3
push 0x10
push 0xf01ff
lea eax, [esi + 0x270]
push eax
add esi, 0x70
push esi
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x210], eax
cmp eax, ebx
jne 0x40b547
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov edx, 0xffff
mov ecx, 0x80070000
jle 0x40b471
and eax, edx
or eax, ecx
mov esi, eax
cmp esi, 0x80070431
jne 0x40b52b
push 0x40ba10
push edi
call fcn.004018db
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push 0x40b990
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40b4db
push dword [ebp - 0x218]
call fcn.00412a3b
cmp eax, ebx
jge 0x40b4cf
push eax
push 0x40b918
push edi
call fcn.004018db
add esp, 0xc
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x404298
call fcn.004132c5
cmp eax, ebx
jge 0x40b4f8
push eax
push 0x40b8a8
push edi
call fcn.004018db
add esp, 0xc
call fcn.00412e73
cmp eax, ebx
jge 0x40b510
push eax
push 0x40b840
push edi
call fcn.004018db
add esp, 0xc
cmp dword [ebp - 0x210], ebx
je 0x40b524
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor esi, esi
jmp 0x40b608
cmp esi, ebx
jle 0x40b533
and esi, edx
or esi, ecx
push esi
push 0x40b7d0
push edi
call fcn.004018db
add esp, 0xc
jmp 0x40b608
mov esi, dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
lea ecx, [ebp - 0x220]
push ecx
push 5
push eax
mov dword [ebp - 0x220], edi
call esi
test eax, eax
jne 0x40b5b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, ebx
jle 0x40b57b
and edi, 0xffff
or edi, 0x80070000
push edi
push 0x40b748
push 1
call fcn.004018db
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0xc
push dword [ebp - 0x210]
call esi
push dword [ebp - 0x214]
call esi
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004018c9
leave
ret
lea eax, [ebp - 0x21c]
push eax
push 6
push dword [ebp - 0x210]
mov dword [ebp - 0x21c], 0x40b6b8
call esi
test eax, eax
jne 0x40b48c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x40b5ed
and esi, 0xffff
or esi, 0x80070000
push esi
push 0x40b618
push edi
call fcn.004018db
add esp, 0xc
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
jmp 0x40b5a3