Function at 0x401000
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x210
mov eax, dword [0x43300c]
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 0x42dbca
push dword [edi + 4]
call ebx
test esi, esi
je 0x4010a7
test eax, eax
je 0x4010a7
push 0x42dda8
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x401150
push str.uninstall
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4011e9
mov esi, dword [ebp + 8]
push str.check_cert
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp esi, 3
jl 0x4012ba
test eax, eax
jne 0x4012ba
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.0040a780
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
jmp 0x4016b5
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 0x40132c
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4014a1
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 0x434588
call fcn.0040b170
add esp, 8
push ebx
call fcn.00402a30
add esp, 4
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov esi, eax
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4014e4
test esi, esi
je 0x40152a
push str.The_service_was_installed_successfully
jmp 0x401278
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401177
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401392
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40153b
push str.Upgrading_service_if_installed...
push 0x434588
call fcn.0040b170
add esp, 8
push 0
call fcn.00402a30
add esp, 4
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov esi, eax
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40157e
test esi, esi
je 0x4015c4
push str.The_service_was_upgraded_successfully
jmp 0x401278
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401210
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4013f8
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4015d5
push str.Uninstalling_service...
push 0x434588
call fcn.0040b170
add esp, 8
call fcn.00404080
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov esi, eax
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401618
test esi, esi
je 0x40165e
push str.The_service_was_uninstalled_successfully
push 0x434588
call fcn.0040b170
add esp, 8
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40145e
mov eax, dword [0x434588]
xor ebx, ebx
test eax, eax
jne 0x4016a2
jmp 0x4016b5
movsd xmm0, qword [0x42b3e8]
movsd xmm1, qword [0x42b3e0]
lea eax, [ebp - 0x21c]
movsd qword [ebp - 0x214], xmm0
movsd qword [ebp - 0x21c], xmm1
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x401325
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401708
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed.____d_
push 0x434588
call fcn.0040b1d0
add esp, 0xc
xor ebx, ebx
jmp 0x4016b5
push str.logs
push edi
call fcn.0040c350
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.0040c350
add esp, 8
test eax, eax
je 0x4010ce
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40174b
mov ecx, 0x434588
push edi
call fcn.0040b100
jmp 0x4010ce
push str.logs
push esi
call fcn.0040c350
add esp, 8
test eax, eax
je 0x401177
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push esi
call fcn.0040c350
add esp, 8
test eax, eax
je 0x401177
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40178e
mov ecx, 0x434588
push esi
call fcn.0040b100
jmp 0x401177
push str.logs
push esi
call fcn.0040c350
add esp, 8
test eax, eax
je 0x401210
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_uninstall.log
push esi
call fcn.0040c350
add esp, 8
test eax, eax
je 0x401210
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4017d1
mov ecx, 0x434588
push esi
call fcn.0040b100
jmp 0x401210
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x4012a6
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x4012a6
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x4010ef
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x4010ef
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x40113e
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
test esi, esi
jne 0x401146
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_install_service.____d_
jmp 0x40166a
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x401198
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x401198
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x4011d7
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
test esi, esi
jne 0x4011df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_upgrade_service.____d_
jmp 0x40166a
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x401231
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x401231
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x40126b
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
test esi, esi
jne 0x401273
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_uninstall_service.____d_
push 0x434588
call fcn.0040b1d0
add esp, 0xc
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov eax, dword [0x434794]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4016cc
mov eax, dword [0x434588]
mov ebx, 1
test eax, eax
je 0x4016b5
push eax
call fcn.004153ef
add esp, 4
mov dword [0x434588], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e0d1
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x401694
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x401694
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x40130c
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x40130c
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x401382
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x401382
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x4013e8
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x4013e8
push 0x434794
call fcn.0040d9e7
add esp, 4
cmp dword [0x434794], 0xffffffff
jne 0x40144e
mov dword [0x434588], 0
push 0x401f30
call fcn.0040dc5c
add esp, 4
push 0x434794
call fcn.0040da39
add esp, 4
jmp 0x40144e