Function at 0x401a40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
mov ebx, edx
sub esp, 0x2c
mov dword [ebp - 0x14], ecx
test byte [global___dbch.0], 8
jne 0x401c20
lea esi, [ebp - 0x10]
mov ecx, 2
mov edx, 1
mov eax, edi
mov dword [esp], esi
call dbg.validate_context_handle
test eax, eax
jne 0x401c0f
mov dword [esp], ebx
mov edi, dword [ebp - 0x10]
call dbg.validate_service_name
mov edx, eax
mov eax, 0x7b
test edx, edx
je 0x401c0f
mov eax, dword [ebp + 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x24]
mov dword [esp], eax
call dbg.check_multisz
mov edx, eax
mov eax, 0x57
test edx, edx
je 0x401c0f
cmp word [ebx], 0
je 0x401c0f
mov ecx, dword [ebp + 0x18]
cmp word [ecx], 0
je 0x401c0f
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x401ae2
test byte [global___dbch.0], 1
jne 0x401d10
mov dword [esp + 4], esi
mov dword [esp], ebx
call dbg.service_create
test eax, eax
jne 0x401c0f
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp - 0x10]
test ecx, ecx
je 0x401cf3
mov eax, dword [ebp + 0x24]
cmp word [eax], 0
je 0x401cf3
mov eax, dword [ebp + 0x24]
lea ecx, [edx + 0x64]
add edx, 0x60
call sym._parse_dependencies.isra.7.part.8
mov edx, dword [ebp - 0x10]
test eax, eax
jne 0x401ce0
mov eax, dword [ebp + 0x38]
mov esi, dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [ebp - 0x18], edx
mov dword [edx + 0x78], eax
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x14], eax
mov dword [edx + 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [edx + 0x38], eax
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x3c], eax
mov eax, dword [ebp + 0x18]
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x40], eax
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x10]
mov dword [esp], eax
mov dword [ebp - 0x18], edx
call esi
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x44], eax
mov eax, dword [ebp + 0x2c]
mov edx, dword [ebp - 0x10]
mov dword [esp], eax
mov dword [ebp - 0x18], edx
call esi
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x50], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov dword [esp], eax
mov dword [ebp - 0x18], edx
call esi
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x54], eax
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp - 0x10]
test edx, edx
je 0x401d60
mov ecx, dword [ebp + 0x20]
mov edx, dword [ecx]
mov dword [eax + 0x48], edx
mov dword [esp], eax
call dbg.validate_service_config
test eax, eax
je 0x401d40
mov eax, dword [edi + 8]
mov dword [esp], eax
call sym._scmdatabase_lock
mov dword [esp + 4], ebx
mov eax, dword [edi + 8]
mov dword [esp], eax
call sym._scmdatabase_find_service
test eax, eax
je 0x401c80
mov eax, dword [eax + 0x74]
test eax, eax
sete al
movzx eax, al
add eax, 0x430
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov edx, dword [edi + 8]
mov dword [esp], edx
call sym._scmdatabase_unlock
mov edx, dword [ebp - 0x10]
mov dword [esp], edx
call dbg.free_service_entry
mov eax, dword [ebp - 0x14]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x18]
call sym._wine_dbgstr_wn.constprop.13
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
call sym._wine_dbgstr_wn.constprop.13
mov esi, eax
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.13
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], str.__s___s__0x_lx___s__n
mov dword [esp + 8], str.create_serviceW
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.16
jmp 0x401a5d
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x54]
test eax, eax
cmove eax, dword [edx + 0x10]
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call dbg.scmdatabase_find_service_by_displayname
test eax, eax
jne 0x401da0
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call dbg.scmdatabase_add_service
test eax, eax
jne 0x401dc0
mov eax, dword [edi + 8]
mov dword [esp], eax
call sym._scmdatabase_unlock
mov ecx, dword [ebp + 0x34]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
call dbg.create_handle_for_service
jmp 0x401c0f
mov dword [esp], edx
mov dword [ebp - 0x14], eax
call dbg.free_service_entry
mov eax, dword [ebp - 0x14]
jmp 0x401c0f
mov dword [edx + 0x60], 0
mov dword [edx + 0x64], 0
jmp 0x401b2a
mov dword [esp + 0xc], str.Dont_know_how_to_add_a_password_n
mov dword [esp + 8], str.create_serviceW
mov dword [esp + 4], global___dbch.0
mov dword [esp], 0
call sym._wine_dbg_log.constprop.16
jmp 0x401ae2
test byte [global___dbch.0], 2
jne 0x401d70
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.free_service_entry
mov eax, 0x57
jmp 0x401c0f
mov dword [eax + 0x48], 0
jmp 0x401bae
mov dword [esp + 0xc], str.Invalid_data_while_trying_to_create_service_n
mov dword [esp + 8], str.create_serviceW
mov dword [esp + 4], global___dbch.0
mov dword [esp], 1
call sym._wine_dbg_log.constprop.16
jmp 0x401d49
mov eax, dword [edi + 8]
mov dword [esp], eax
call sym._scmdatabase_unlock
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.free_service_entry
mov eax, 0x436
jmp 0x401c0f
mov dword [ebp - 0x14], eax
jmp 0x401bf6