Function at 0x401010
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 0x42c1d2
push dword [edi + 4]
call ebx
test eax, eax
je 0x4010b7
test esi, esi
je 0x4010b7
push 0x42c3b0
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x401182
push str.uninstall
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40121c
mov esi, dword [ebp + 8]
push 0x42c098
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp esi, 3
jl 0x4012f0
test eax, eax
jne 0x4012f0
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.00408d80
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
jmp 0x4013c0
lea edi, [ebp - 0x21c]
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4010de
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4013d7
mov eax, dword [0x431bbc]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x4329d4]
mov ecx, dword [ecx + 4]
test esi, esi
je 0x40110e
cmp eax, ecx
jg 0x401509
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x401120
cmp eax, ecx
jg 0x4015ac
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
push edi
push 0x4327c8
call fcn.00408470
add esp, 8
push esi
call fcn.00402bb0
add esp, 4
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4329d4]
mov edx, dword [edx + 4]
test eax, eax
je 0x401169
cmp ecx, edx
jg 0x401523
push str.The_service_was_installed_successfully
jmp 0x4012ac
cmp ecx, edx
jg 0x4015f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_install_service.____lu_
jmp 0x401373
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4011a9
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x40143d
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40163c
push str.Upgrading_service_if_installed...
push 0x4327c8
call fcn.00408470
add esp, 8
push 0
call fcn.00402bb0
add esp, 4
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4329d4]
mov edx, dword [edx + 4]
test eax, eax
je 0x401349
cmp ecx, edx
jg 0x40167f
push str.The_service_was_upgraded_successfully
jmp 0x4012ac
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401243
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4014a3
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4016c2
push str.Uninstalling_service...
push 0x4327c8
call fcn.00408470
add esp, 8
call fcn.00404370
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4329d4]
mov edx, dword [edx + 4]
test eax, eax
je 0x40135f
cmp ecx, edx
jg 0x401705
push str.The_service_was_uninstalled_successfully
push 0x4327c8
call fcn.00408470
add esp, 8
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
xor ebx, ebx
cmp eax, dword [ecx + 4]
jle 0x4013a4
push 0x4329d4
call fcn.0040a037
add esp, 4
xor ebx, ebx
jmp 0x401576
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 0x401345
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4017ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed.____lu_
push 0x4327c8
call fcn.00408560
add esp, 0xc
xor ebx, ebx
jmp 0x4013c0
cmp ecx, edx
jg 0x401748
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_upgrade_service.____lu_
jmp 0x401373
cmp ecx, edx
jg 0x40178b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_uninstall_service.____lu_
push 0x4327c8
call fcn.00408560
add esp, 0xc
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401566
xor ebx, ebx
inc ebx
mov eax, dword [0x4327c8]
test eax, eax
je 0x4013c0
push eax
call fcn.0041202c
add esp, 4
mov dword [0x4327c8], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040a9b5
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push str.logs
push edi
call fcn.00424cd0
add esp, 8
test eax, eax
je 0x4010de
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push edi
call fcn.00424cd0
add esp, 8
test eax, eax
je 0x4010de
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401811
mov ecx, 0x4327c8
push edi
call fcn.00408400
jmp 0x4010de
push str.logs
push esi
call fcn.00424cd0
add esp, 8
test eax, eax
je 0x4011a9
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push esi
call fcn.00424cd0
add esp, 8
test eax, eax
je 0x4011a9
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401854
mov ecx, 0x4327c8
push esi
call fcn.00408400
jmp 0x4011a9
push str.logs
push esi
call fcn.00424cd0
add esp, 8
test eax, eax
je 0x401243
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_uninstall.log
push esi
call fcn.00424cd0
add esp, 8
test eax, eax
je 0x401243
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401897
mov ecx, 0x4327c8
push esi
call fcn.00408400
jmp 0x401243
push 0x4329d4
call fcn.0040a037
add esp, 4
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x4015c3
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x40115f
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x40115f
push 0x4329d4
call fcn.0040a037
add esp, 4
xor ebx, ebx
inc ebx
cmp dword [0x4329d4], 0xffffffff
jne 0x4013a4
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x4013a4
push 0x4329d4
call fcn.0040a037
add esp, 4
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
cmp dword [0x4329d4], 0xffffffff
jne 0x401120
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x401120
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x401171
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x401171
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x4011ca
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x4011ca
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x401212
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x401212
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x401264
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x401264
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x4012a7
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x4012a7
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x401351
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x401351
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x401367
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x401367
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x40132c
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x40132c
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x40142d
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x40142d
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x401493
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x401493
push 0x4329d4
call fcn.0040a037
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x4014f9
mov dword [0x4327c8], 0
push 0x402420
call fcn.0040a1fc
add esp, 4
push 0x4329d4
call fcn.0040a089
add esp, 4
jmp 0x4014f9