Function at 0x401070
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 [0x434040]
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 0x42ef3e
push dword [edi + 4]
call ebx
test eax, eax
je 0x401117
test esi, esi
je 0x401117
push 0x42f11c
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4011e2
push str.uninstall
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40127c
mov esi, dword [ebp + 8]
push 0x42ee04
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp esi, 3
jl 0x401350
test eax, eax
jne 0x401350
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.00408d50
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
jmp 0x401420
lea edi, [ebp - 0x21c]
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40113e
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401437
mov eax, dword [0x434c24]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x435a4c]
mov ecx, dword [ecx + 4]
test esi, esi
je 0x40116e
cmp eax, ecx
jg 0x401569
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x401180
cmp eax, ecx
jg 0x40160c
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
push edi
push 0x435840
call fcn.00408430
add esp, 8
push esi
call fcn.00402bb0
add esp, 4
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x435a4c]
mov edx, dword [edx + 4]
test eax, eax
je 0x4011c9
cmp ecx, edx
jg 0x401583
push str.The_service_was_installed_successfully
jmp 0x40130c
cmp ecx, edx
jg 0x401659
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_install_service.____lu_
jmp 0x4013d3
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401209
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x40149d
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40169c
push str.Upgrading_service_if_installed...
push 0x435840
call fcn.00408430
add esp, 8
push 0
call fcn.00402bb0
add esp, 4
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x435a4c]
mov edx, dword [edx + 4]
test eax, eax
je 0x4013a9
cmp ecx, edx
jg 0x4016df
push str.The_service_was_upgraded_successfully
jmp 0x40130c
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4012a3
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x401503
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401722
push str.Uninstalling_service...
push 0x435840
call fcn.00408430
add esp, 8
call fcn.00404370
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x435a4c]
mov edx, dword [edx + 4]
test eax, eax
je 0x4013bf
cmp ecx, edx
jg 0x401765
push str.The_service_was_uninstalled_successfully
push 0x435840
call fcn.00408430
add esp, 8
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
xor ebx, ebx
cmp eax, dword [ecx + 4]
jle 0x401404
push 0x435a4c
call fcn.0040a351
add esp, 4
xor ebx, ebx
jmp 0x4015d6
movups xmm0, xmmword [0x42c750]
lea eax, [ebp - 0x21c]
movups xmmword [eax], xmm0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x4013a5
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40182e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed.____lu_
push 0x435840
call fcn.00408520
add esp, 0xc
xor ebx, ebx
jmp 0x401420
cmp ecx, edx
jg 0x4017a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_upgrade_service.____lu_
jmp 0x4013d3
cmp ecx, edx
jg 0x4017eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_uninstall_service.____lu_
push 0x435840
call fcn.00408520
add esp, 0xc
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4015c6
xor ebx, ebx
inc ebx
mov eax, dword [0x435840]
test eax, eax
je 0x401420
push eax
call fcn.004142bb
add esp, 4
mov dword [0x435840], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040abc5
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push str.logs
push edi
call fcn.00428490
add esp, 8
test eax, eax
je 0x40113e
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push edi
call fcn.00428490
add esp, 8
test eax, eax
je 0x40113e
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x401871
mov ecx, 0x435840
push edi
call fcn.004083c0
jmp 0x40113e
push str.logs
push esi
call fcn.00428490
add esp, 8
test eax, eax
je 0x401209
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push esi
call fcn.00428490
add esp, 8
test eax, eax
je 0x401209
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4018b4
mov ecx, 0x435840
push esi
call fcn.004083c0
jmp 0x401209
push str.logs
push esi
call fcn.00428490
add esp, 8
test eax, eax
je 0x4012a3
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_uninstall.log
push esi
call fcn.00428490
add esp, 8
test eax, eax
je 0x4012a3
mov eax, dword [0x435a4c]
mov ecx, dword [0x434c24]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4018f7
mov ecx, 0x435840
push esi
call fcn.004083c0
jmp 0x4012a3
push 0x435a4c
call fcn.0040a351
add esp, 4
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x401623
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x4011bf
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x4011bf
push 0x435a4c
call fcn.0040a351
add esp, 4
xor ebx, ebx
inc ebx
cmp dword [0x435a4c], 0xffffffff
jne 0x401404
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x401404
push 0x435a4c
call fcn.0040a351
add esp, 4
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
cmp dword [0x435a4c], 0xffffffff
jne 0x401180
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x401180
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x4011d1
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x4011d1
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x40122a
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x40122a
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x401272
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x401272
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x4012c4
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x4012c4
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x401307
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x401307
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x4013b1
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x4013b1
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x4013c7
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x4013c7
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x40138c
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x40138c
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x40148d
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x40148d
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x4014f3
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x4014f3
push 0x435a4c
call fcn.0040a351
add esp, 4
cmp dword [0x435a4c], 0xffffffff
jne 0x401559
mov dword [0x435840], 0
push 0x402420
call fcn.0040a406
add esp, 4
push 0x435a4c
call fcn.0040a3a0
add esp, 4
jmp 0x401559