Function at 0x401610
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x210
mov edi, dword [ebp + 0xc]
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str.forceinstall
push dword [edi + 4]
call ebx
mov esi, eax
push 0x42c1c2
push dword [edi + 4]
call ebx
test eax, eax
je 0x4016b7
test esi, esi
je 0x4016b7
push 0x42c3a0
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x401782
push str.uninstall
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40181c
mov esi, dword [ebp + 8]
push 0x42c088
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp esi, 3
jl 0x4018f0
test eax, eax
jne 0x4018f0
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.00407c90
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
jmp 0x4019c0
lea edi, [ebp - 0x21c]
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4016de
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4019d7
mov eax, dword [0x431bbc]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x4329d8]
mov ecx, dword [ecx + 4]
test esi, esi
je 0x40170e
cmp eax, ecx
jg 0x401b09
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x401720
cmp eax, ecx
jg 0x401bac
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
push edi
push 0x4327cc
call fcn.00408660
add esp, 8
push esi
call fcn.00402c90
add esp, 4
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4329d8]
mov edx, dword [edx + 4]
test eax, eax
je 0x401769
cmp ecx, edx
jg 0x401b23
push str.The_service_was_installed_successfully
jmp 0x4018ac
cmp ecx, edx
jg 0x401bf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_install_service.____lu_
jmp 0x401973
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4017a9
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401a3d
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401c3c
push str.Upgrading_service_if_installed...
push 0x4327cc
call fcn.00408660
add esp, 8
push 0
call fcn.00402c90
add esp, 4
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4329d8]
mov edx, dword [edx + 4]
test eax, eax
je 0x401949
cmp ecx, edx
jg 0x401c7f
push str.The_service_was_upgraded_successfully
jmp 0x4018ac
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401843
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401aa3
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401cc2
push str.Uninstalling_service...
push 0x4327cc
call fcn.00408660
add esp, 8
call fcn.00404460
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4329d8]
mov edx, dword [edx + 4]
test eax, eax
je 0x40195f
cmp ecx, edx
jg 0x401d05
push str.The_service_was_uninstalled_successfully
push 0x4327cc
call fcn.00408660
add esp, 8
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
xor ebx, ebx
cmp eax, dword [ecx + 4]
jle 0x4019a4
push 0x4329d8
call fcn.0040a5e7
add esp, 4
xor ebx, ebx
jmp 0x401b76
movups xmm0, xmmword [0x429a20]
lea eax, [ebp - 0x21c]
movups xmmword [eax], xmm0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x401945
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401dce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed.____lu_
push 0x4327cc
call fcn.00408750
add esp, 0xc
xor ebx, ebx
jmp 0x4019c0
cmp ecx, edx
jg 0x401d48
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_upgrade_service.____lu_
jmp 0x401973
cmp ecx, edx
jg 0x401d8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_uninstall_service.____lu_
push 0x4327cc
call fcn.00408750
add esp, 0xc
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401b66
xor ebx, ebx
inc ebx
mov eax, dword [0x4327cc]
test eax, eax
je 0x4019c0
push eax
call fcn.0041249f
add esp, 4
mov dword [0x4327cc], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push str.logs
push edi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x4016de
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push edi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x4016de
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401e11
mov ecx, 0x4327cc
push edi
call fcn.004085f0
jmp 0x4016de
push str.logs
push esi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x4017a9
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push esi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x4017a9
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401e54
mov ecx, 0x4327cc
push esi
call fcn.004085f0
jmp 0x4017a9
push str.logs
push esi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x401843
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_uninstall.log
push esi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x401843
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401e97
mov ecx, 0x4327cc
push esi
call fcn.004085f0
jmp 0x401843
push 0x4329d8
call fcn.0040a5e7
add esp, 4
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x401bc3
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x40175f
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x40175f
push 0x4329d8
call fcn.0040a5e7
add esp, 4
xor ebx, ebx
inc ebx
cmp dword [0x4329d8], 0xffffffff
jne 0x4019a4
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x4019a4
push 0x4329d8
call fcn.0040a5e7
add esp, 4
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
cmp dword [0x4329d8], 0xffffffff
jne 0x401720
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401720
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401771
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401771
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x4017ca
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x4017ca
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401812
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401812
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401864
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401864
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x4018a7
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x4018a7
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401951
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401951
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401967
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401967
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x40192c
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x40192c
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401a2d
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401a2d
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401a93
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401a93
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x401af9
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x401af9