Function at 0x401600
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 [0x43200c]
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 0x42cc3e
push dword [edi + 4]
call ebx
test eax, eax
je 0x4016a7
test esi, esi
je 0x4016a7
push 0x42ce1c
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x401772
push str.uninstall
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40180c
mov esi, dword [ebp + 8]
push 0x42cb04
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp esi, 3
jl 0x4018e0
test eax, eax
jne 0x4018e0
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.00407cb0
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
jmp 0x4019b0
lea edi, [ebp - 0x21c]
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4016ce
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4019c7
mov eax, dword [0x432ae4]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x4338fc]
mov ecx, dword [ecx + 4]
test esi, esi
je 0x4016fe
cmp eax, ecx
jg 0x401af9
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x401710
cmp eax, ecx
jg 0x401b9c
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
push edi
push 0x4336f0
call fcn.00408680
add esp, 8
push esi
call fcn.00402cb0
add esp, 4
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4338fc]
mov edx, dword [edx + 4]
test eax, eax
je 0x401759
cmp ecx, edx
jg 0x401b13
push str.The_service_was_installed_successfully
jmp 0x40189c
cmp ecx, edx
jg 0x401be9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_install_service.____lu_
jmp 0x401963
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401799
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401a2d
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401c2c
push str.Upgrading_service_if_installed...
push 0x4336f0
call fcn.00408680
add esp, 8
push 0
call fcn.00402cb0
add esp, 4
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4338fc]
mov edx, dword [edx + 4]
test eax, eax
je 0x401939
cmp ecx, edx
jg 0x401c6f
push str.The_service_was_upgraded_successfully
jmp 0x40189c
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401833
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401a93
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401cb2
push str.Uninstalling_service...
push 0x4336f0
call fcn.00408680
add esp, 8
call fcn.00404490
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4338fc]
mov edx, dword [edx + 4]
test eax, eax
je 0x40194f
cmp ecx, edx
jg 0x401cf5
push str.The_service_was_uninstalled_successfully
push 0x4336f0
call fcn.00408680
add esp, 8
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
xor ebx, ebx
cmp eax, dword [ecx + 4]
jle 0x401994
push 0x4338fc
call fcn.0040a687
add esp, 4
xor ebx, ebx
jmp 0x401b66
movups xmm0, xmmword [0x42a450]
lea eax, [ebp - 0x21c]
movups xmmword [eax], xmm0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x401935
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401dbe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed.____lu_
push 0x4336f0
call fcn.00408760
add esp, 0xc
xor ebx, ebx
jmp 0x4019b0
cmp ecx, edx
jg 0x401d38
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_upgrade_service.____lu_
jmp 0x401963
cmp ecx, edx
jg 0x401d7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_uninstall_service.____lu_
push 0x4336f0
call fcn.00408760
add esp, 0xc
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401b56
xor ebx, ebx
inc ebx
mov eax, dword [0x4336f0]
test eax, eax
je 0x4019b0
push eax
call fcn.00412900
add esp, 4
mov dword [0x4336f0], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040ad81
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push str.logs
push edi
call fcn.00426b00
add esp, 8
test eax, eax
je 0x4016ce
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push edi
call fcn.00426b00
add esp, 8
test eax, eax
je 0x4016ce
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401e01
mov ecx, 0x4336f0
push edi
call fcn.00408610
jmp 0x4016ce
push str.logs
push esi
call fcn.00426b00
add esp, 8
test eax, eax
je 0x401799
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push esi
call fcn.00426b00
add esp, 8
test eax, eax
je 0x401799
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401e44
mov ecx, 0x4336f0
push esi
call fcn.00408610
jmp 0x401799
push str.logs
push esi
call fcn.00426b00
add esp, 8
test eax, eax
je 0x401833
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_uninstall.log
push esi
call fcn.00426b00
add esp, 8
test eax, eax
je 0x401833
mov eax, dword [0x4338fc]
mov ecx, dword [0x432ae4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401e87
mov ecx, 0x4336f0
push esi
call fcn.00408610
jmp 0x401833
push 0x4338fc
call fcn.0040a687
add esp, 4
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x401bb3
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x40174f
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x40174f
push 0x4338fc
call fcn.0040a687
add esp, 4
xor ebx, ebx
inc ebx
cmp dword [0x4338fc], 0xffffffff
jne 0x401994
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401994
push 0x4338fc
call fcn.0040a687
add esp, 4
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
cmp dword [0x4338fc], 0xffffffff
jne 0x401710
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401710
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401761
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401761
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x4017ba
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x4017ba
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401802
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401802
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401854
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401854
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401897
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401897
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401941
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401941
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401957
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401957
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x40191c
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x40191c
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401a1d
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401a1d
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401a83
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401a83
push 0x4338fc
call fcn.0040a687
add esp, 4
cmp dword [0x4338fc], 0xffffffff
jne 0x401ae9
mov dword [0x4336f0], 0
push 0x402530
call fcn.0040a8fc
add esp, 4
push 0x4338fc
call fcn.0040a6d9
add esp, 4
jmp 0x401ae9