Function at 0x406210
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41aacd
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x42501c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 4
lea ecx, [ebp - 0x14]
call fcn.00403ac0
lea ecx, [ebp - 0x14]
call fcn.004056e0
mov dword [ebp - 4], 0
push 0x104
push 0x425a98
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40629f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetModuleFileName_failed_w_err_0x_08lx_n
push 0x425e2c
call fcn.00402860
add esp, 0xc
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x425e2c
call fcn.00401b60
mov ecx, 0x425ce8
call fcn.004031c0
jmp 0x406434
push 0x425a98
push str.__s_
lea eax, [ebp - 0x14]
push eax
call fcn.00402860
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [0x425b9c], eax
cmp dword [0x425b9c], 0
jne 0x40630a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x41c470
push 0x425e2c
call fcn.00402860
add esp, 0xc
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push 0x425e2c
call fcn.00401b60
mov ecx, 0x425ce8
call fcn.004031c0
jmp 0x406434
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x14]
call fcn.00401f70
push eax
push 1
mov ecx, dword [section..data]
push ecx
push 0x10
push 0xf01ff
push 0x41c494
push 0x41c4a8
mov edx, dword [0x425b9c]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [0x425ba0], eax
cmp dword [0x425ba0], 0
jne 0x40638a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed_w_err_0x_08lx_n
push 0x425e2c
call fcn.00402860
add esp, 0xc
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x425e2c
call fcn.00401b60
mov ecx, 0x425ce8
call fcn.004031c0
jmp 0x406434
push 0xf01ff
push 0x41c4e0
mov eax, dword [0x425b9c]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [0x425ba0], eax
cmp dword [0x425ba0], 0
jne 0x4063e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x41c4f4
push 0x425e2c
call fcn.00402860
add esp, 0xc
push ecx
mov ecx, esp
mov dword [ebp - 0x28], esp
push 0x425e2c
call fcn.00401b60
mov ecx, 0x425ce8
call fcn.004031c0
jmp 0x406434
mov dword [ebp - 0x18], 0x41c518
lea ecx, [ebp - 0x18]
push ecx
push 1
mov edx, dword [0x425ba0]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
test eax, eax
jge 0x406434
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x41c52c
push 0x425e2c
call fcn.00402860
add esp, 0xc
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push 0x425e2c
call fcn.00401b60
mov ecx, 0x425ce8
call fcn.004031c0
cmp dword [0x425b9c], 0
je 0x406453
mov eax, dword [0x425b9c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [0x425b9c], 0
cmp dword [0x425ba0], 0
je 0x406473
mov ecx, dword [0x425ba0]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [0x425ba0], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00401e00
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004081dc
mov esp, ebp
pop ebp
ret