Function at 0x401000
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x210
mov eax, dword [0x43200c]
mov edi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
xor eax, ebp
mov dword [ebp - 0x10], eax
push str.forceinstall
push dword [edi + 4]
call ebx
mov esi, eax
push 0x42cc10
push dword [edi + 4]
call ebx
test esi, esi
je 0x4010a7
test eax, eax
je 0x4010a7
push 0x42cdee
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40115d
push str.uninstall
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4011f6
mov esi, dword [ebp + 8]
push 0x42ca60
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp esi, 3
jl 0x4012bf
test eax, eax
jne 0x4012bf
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.0040a460
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
jmp 0x40138e
lea edi, [ebp - 0x21c]
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4010ce
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4013a5
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40151a
xor ebx, ebx
test esi, esi
mov eax, str.Installing_service_with_force_specified...
mov ecx, str.Installing_service...
cmove ecx, eax
sete bl
inc ebx
push ecx
push 0x433580
call fcn.0040adf0
add esp, 8
push ebx
call fcn.00402950
add esp, 4
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov esi, eax
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40155d
test esi, esi
je 0x40114c
push str.The_service_was_installed_successfully
jmp 0x401285
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_install_service.____d_
jmp 0x401341
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401184
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x40140b
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4015e3
push str.Upgrading_service_if_installed...
push 0x433580
call fcn.0040adf0
add esp, 8
push 0
call fcn.00402950
add esp, 4
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov esi, eax
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401626
test esi, esi
je 0x401327
push str.The_service_was_upgraded_successfully
jmp 0x401285
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40121d
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401471
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401669
push str.Uninstalling_service...
push 0x433580
call fcn.0040adf0
add esp, 8
call fcn.00403fa0
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov esi, eax
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4016ac
test esi, esi
je 0x401335
push str.The_service_was_uninstalled_successfully
push 0x433580
call fcn.0040adf0
add esp, 8
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4014d7
mov eax, dword [0x433580]
xor ebx, ebx
jmp 0x401377
movsd xmm0, qword [0x42a3d0]
movsd xmm1, qword [0x42a3c8]
lea eax, [ebp - 0x21c]
movsd qword [eax + 8], xmm0
movsd qword [eax], xmm1
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x401323
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4016ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed.____d_
push 0x433580
call fcn.0040aea0
add esp, 0xc
xor ebx, ebx
jmp 0x40138e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_upgrade_service.____d_
jmp 0x401341
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_uninstall_service.____d_
push 0x433580
call fcn.0040aea0
add esp, 0xc
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4015a0
mov eax, dword [0x433580]
xor ebx, ebx
inc ebx
test eax, eax
je 0x40138e
push eax
call fcn.004153d8
add esp, 4
mov dword [0x433580], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040dec1
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push str.logs
push edi
call fcn.0040c1f0
add esp, 8
test eax, eax
je 0x4010ce
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push edi
call fcn.0040c1f0
add esp, 8
test eax, eax
je 0x4010ce
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401732
mov ecx, 0x433580
push edi
call fcn.0040ad80
jmp 0x4010ce
push str.logs
push esi
call fcn.0040c1f0
add esp, 8
test eax, eax
je 0x401184
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push esi
call fcn.0040c1f0
add esp, 8
test eax, eax
je 0x401184
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401775
mov ecx, 0x433580
push esi
call fcn.0040ad80
jmp 0x401184
push str.logs
push esi
call fcn.0040c1f0
add esp, 8
test eax, eax
je 0x40121d
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_uninstall.log
push esi
call fcn.0040c1f0
add esp, 8
test eax, eax
je 0x40121d
mov ecx, dword [0x432a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43378c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4017b8
mov ecx, 0x433580
push esi
call fcn.0040ad80
jmp 0x40121d
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x4012b3
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x4012b3
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x4010ef
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x4010ef
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x40113e
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x40113e
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x40136f
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x40136f
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x4011a5
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x4011a5
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x4011e4
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x4011e4
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x40123e
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x40123e
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x401278
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x401278
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x40130a
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x40130a
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x4013fb
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x4013fb
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x401461
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x401461
push 0x43378c
call fcn.0040d7c7
add esp, 4
cmp dword [0x43378c], 0xffffffff
jne 0x4014c7
mov dword [0x433580], 0
push 0x401f00
call fcn.0040da3c
add esp, 4
push 0x43378c
call fcn.0040d819
add esp, 4
jmp 0x4014c7