Function at 0x4010f0
Capabilities:
Get common file path

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x378
cmp dword [ecx], 1
mov eax, dword [ecx + 4]
jbe 0x4012f0
mov ebx, dword [eax + 4]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
sub esp, 0x10
mov dword [section..bss], eax
test eax, eax
je 0x4012d8
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._OpenSCManagerW_12
sub esp, 0xc
mov dword [0x405004], eax
test eax, eax
je 0x4012d8
mov dword [esp + 8], ebx
mov dword [esp + 4], sym._service_handler_16
mov dword [esp], section..data
call sym._RegisterServiceCtrlHandlerExW_12
sub esp, 0xc
mov dword [0x405008], eax
test eax, eax
je 0x4012d8
lea esi, [ebp - 0x220]
mov dword [esp + 4], 0x104
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
sub esp, 8
mov dword [esp], esi
mov dword [esp + 4], str.drivers
call dword [sym.imp.ntoskrnl.exe_wcscat]
mov dword [esp], esi
lea esi, [ebp - 0x34c]
call dword [sym.imp.kernel32.dll_AddDllDirectory]
sub esp, 4
test byte [0x403018], 8
jne 0x401300
mov dword [ebp - 0x34c], 0x30
mov dword [ebp - 0x348], 4
mov dword [ebp - 0x344], 5
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0
mov dword [esp + 4], esi
mov eax, dword [0x405008]
mov dword [esp], eax
call sym._SetServiceStatus_8
mov eax, dword [section..bss]
sub esp, 8
mov dword [esp], eax
call sym._wine_ntoskrnl_main_loop
test byte [0x403018], 8
jne 0x401440
mov dword [ebp - 0x34c], 0x30
mov dword [ebp - 0x348], 1
mov dword [ebp - 0x344], 0
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0
mov dword [esp + 4], esi
mov eax, dword [0x405008]
mov dword [esp], eax
call sym._SetServiceStatus_8
mov eax, dword [0x405004]
sub esp, 8
mov dword [esp], eax
call sym._CloseServiceHandle_4
mov eax, dword [section..bss]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 8
mov ebx, dword [eax]
jmp 0x401116
test ebx, ebx
je 0x401730
mov eax, ebx
shr eax, 0x10
je 0x401620
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x401412
cmp word [ebx], 0
je 0x401761
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x401340
mov eax, 0x224c
mov dword [ebp - 0x35c], ebx
mov esi, ebx
mov word [ebp - 0x34c], ax
lea eax, [ebp - 0x34a]
jmp 0x4013a3
cmp cx, 9
je 0x4015a8
cmp cx, 0xa
jne 0x401690
mov edi, 0x6e5c
add eax, 2
mov word [eax - 2], di
sub edx, 1
jb 0x401750
lea ecx, [ebp - 0x22a]
cmp ecx, eax
jb 0x4013e0
movzx ecx, word [esi]
add esi, 2
cmp cx, 0xd
je 0x4015d8
jbe 0x401370
cmp cx, 0x22
je 0x4015c0
cmp cx, 0x5c
jne 0x4016e8
mov ecx, 0x5c5c
add eax, 2
mov word [eax - 2], cx
jmp 0x401390
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x35c]
test edx, edx
je 0x401759
mov byte [eax + 3], 0x2e
mov edx, 0x2e2e
mov word [eax + 1], dx
lea edx, [eax + 4]
lea esi, [ebp - 0x34c]
mov byte [edx], 0
mov dword [esp], esi
call sym.___wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.starting_service_group__s_n
mov dword [esp + 8], str.ServiceMain
mov dword [esp + 4], 0x403018
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4011e9
test ebx, ebx
je 0x401720
mov eax, ebx
shr eax, 0x10
je 0x401608
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x401546
cmp word [ebx], 0
je 0x40177f
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x401480
mov eax, 0x224c
mov dword [ebp - 0x35c], ebx
mov word [ebp - 0x34c], ax
lea eax, [ebp - 0x34a]
jmp 0x4014e3
cmp cx, 9
je 0x4015f0
cmp cx, 0xa
jne 0x401638
mov edi, 0x6e5c
add eax, 2
mov word [eax - 2], di
sub edx, 1
jb 0x401740
lea ecx, [ebp - 0x22a]
cmp ecx, eax
jb 0x401520
add dword [ebp - 0x35c], 2
mov edi, dword [ebp - 0x35c]
movzx ecx, word [edi - 2]
cmp cx, 0xd
je 0x401578
jbe 0x4014b0
cmp cx, 0x22
je 0x401590
cmp cx, 0x5c
jne 0x401700
mov ecx, 0x5c5c
add eax, 2
mov word [eax - 2], cx
jmp 0x4014d0
mov byte [eax], 0x22
test edx, edx
je 0x401743
mov byte [eax + 3], 0x2e
mov edx, 0x2e2e
mov word [eax + 1], dx
lea edx, [eax + 4]
mov byte [edx], 0
mov dword [esp], esi
call sym.___wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.service_group__s_stopped_n
mov dword [esp + 8], str.ServiceMain
mov dword [esp + 4], 0x403018
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40125d
movzx edi, word [str._r_]
add eax, 2
mov word [eax - 2], di
jmp 0x4014d0
movzx edi, word [0x40416c]
add eax, 2
mov word [eax - 2], di
jmp 0x4014d0
mov ebx, 0x745c
add eax, 2
mov word [eax - 2], bx
jmp 0x401390
movzx edi, word [0x40416c]
add eax, 2
mov word [eax - 2], di
jmp 0x401390
movzx edi, word [str._r_]
add eax, 2
mov word [eax - 2], di
jmp 0x401390
mov ebx, 0x745c
add eax, 2
mov word [eax - 2], bx
jmp 0x4014d0
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401546
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401412
mov edi, ecx
mov byte [eax], 0x5c
add eax, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefdevice_handler]
mov edi, ecx
shr di, 8
and edi, 0xf
mov byte [eax - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefdevice_handler]
mov edi, ecx
and ecx, 0xf
shr di, 4
movzx ecx, byte [ecx + str.0123456789abcdefdevice_handler]
and edi, 0xf
mov byte [eax - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefdevice_handler]
mov byte [eax - 1], cl
mov byte [eax - 2], bl
jmp 0x4014d0
mov edi, ecx
mov byte [eax], 0x5c
add eax, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefdevice_handler]
mov edi, ecx
shr di, 8
and edi, 0xf
mov byte [eax - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefdevice_handler]
mov edi, ecx
and ecx, 0xf
shr di, 4
movzx ecx, byte [ecx + str.0123456789abcdefdevice_handler]
and edi, 0xf
mov byte [eax - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefdevice_handler]
mov byte [eax - 1], cl
mov byte [eax - 2], bl
jmp 0x401390
lea edi, [ecx - 0x20]
cmp di, 0x5e
ja 0x401690
mov byte [eax], cl
add eax, 1
jmp 0x401390
lea edi, [ecx - 0x20]
cmp di, 0x5e
ja 0x401638
mov byte [eax], cl
add eax, 1
jmp 0x4014d0
mov eax, str._null_
jmp 0x401546
mov eax, str._null_
jmp 0x401412
mov byte [eax], 0x22
lea edx, [eax + 1]
jmp 0x40153b
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x35c]
lea edx, [eax + 1]
jmp 0x401401
mov eax, 0x224c
mov byte [ebp - 0x34a], 0x22
lea edx, [ebp - 0x349]
mov word [ebp - 0x34c], ax
jmp 0x401401
mov eax, 0x224c
mov byte [ebp - 0x34a], 0x22
lea edx, [ebp - 0x349]
mov word [ebp - 0x34c], ax
jmp 0x40153b