Function at 0x403d80
Capabilities:
Modify service
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x4eee2b
mov eax, dword fs:[0]
push eax
sub esp, 0x634
mov eax, dword [0x539050]
xor eax, esp
mov dword [esp + 0x630], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x539050]
xor eax, esp
push eax
lea eax, [esp + 0x648]
mov dword fs:[0], eax
push 0x206
xor ebp, ebp
lea ecx, [esp + 0x23a]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x240], ax
call fcn.00406000
add esp, 0xc
xor eax, eax
nop
movzx ecx, word [eax + str.SYSTEMCurrentControlSetServices_]
mov word [esp + eax + 0x234], cx
add eax, 2
cmp cx, bp
jne 0x403de0
mov eax, 0x542fc8
mov edx, eax
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x403e00
lea edi, [esp + 0x234]
sub eax, edx
add edi, 0xfffffffe
jmp 0x403e20
mov cx, word [edi + 2]
add edi, 2
cmp cx, bp
jne 0x403e20
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
lea edx, [esp + 0x14]
push edx
push 0x2011f
push ebp
lea eax, [esp + 0x240]
push eax
push reloc.WS2_32.dll_bind
mov dword [esp + 0x664], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403ee7
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
push eax
push ebp
push str.Start
push ecx
mov dword [esp + 0x30], 0x100
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, 2
cmp dword [esp + 0x20], eax
je 0x403ee7
push 4
lea edx, [esp + 0x20]
push edx
push 4
push ebp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
push str.Start
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x403ee7
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x403edd
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x40406a
push closesocket
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
cmp esi, ebp
jne 0x403f1a
mov ebx, str.OpenSCManager_Null
call fcn.00403150
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x403f13
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x40406a
push 3
push 0x542fc8
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp edi, ebp
jne 0x403f3c
mov ebx, str.OpenService_Null
jmp 0x403eff
push 0x2000
mov dword [esp + 0x28], ebp
call fcn.004047d2
add esp, 4
lea ecx, [esp + 0x24]
push ecx
push 0x2000
mov esi, eax
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov ebp, eax
test ebp, ebp
jne 0x403fa3
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
push 0x206
mov ebx, eax
push edx
lea eax, [esp + 0x36]
push eax
mov word [esp + 0x38], dx
call fcn.00406000
push ebx
lea ecx, [esp + 0x3c]
push str.QueryServiceConfig__d
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea ebx, [esp + 0x2c]
call fcn.00403150
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x446]
push eax
mov word [esp + 0x448], dx
call fcn.00406000
mov ecx, dword [esi + 4]
push ecx
lea edx, [esp + 0x44c]
push str.lpServiceConfig__dwStartType__d
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea ebx, [esp + 0x43c]
call fcn.00403150
cmp dword [esi + 4], 2
je 0x404049
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov ebp, eax
test ebp, ebp
jne 0x404049
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x36]
push ecx
mov word [esp + 0x38], ax
call fcn.00406000
push ebx
lea edx, [esp + 0x3c]
push str.ChangeServiceConfig__d
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea ebx, [esp + 0x2c]
call fcn.00403150
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call fcn.0040490e
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x404068
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebp
mov ecx, dword [esp + 0x648]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x630]
xor ecx, esp
call fcn.004047dd
add esp, 0x640
ret