Function at 0x402880
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 [0x43300c]
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 0x42dd90
push dword [edi + 4]
call ebx
test esi, esi
je 0x402927
test eax, eax
je 0x402927
push 0x42df6e
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4029ea
push str.uninstall
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x402a84
mov esi, dword [ebp + 8]
push 0x42dbe0
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp esi, 3
jl 0x402b4e
test eax, eax
jne 0x402b4e
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.0040aa00
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
jmp 0x402c1e
lea edi, [ebp - 0x21c]
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40294e
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x402c35
mov eax, dword [0x433a44]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x43478c]
mov ecx, dword [ecx + 4]
test esi, esi
je 0x402976
xor esi, esi
inc esi
mov edi, str.Installing_service...
jmp 0x402980
mov esi, 2
mov edi, str.Installing_service_with_force_specified...
cmp eax, ecx
jg 0x402daa
push edi
push 0x434580
call fcn.0040b410
add esp, 8
push esi
call fcn.00403f30
add esp, 4
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x43478c]
mov edx, dword [edx + 4]
test eax, eax
je 0x4029d1
cmp ecx, edx
jg 0x402ded
push str.The_service_was_installed_successfully
jmp 0x402b14
cmp ecx, edx
jg 0x402e73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_install_service.____d_
jmp 0x402bd1
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402a11
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x402c9b
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402eb6
push str.Upgrading_service_if_installed...
push 0x434580
call fcn.0040b410
add esp, 8
push 0
call fcn.00403f30
add esp, 4
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x43478c]
mov edx, dword [edx + 4]
test eax, eax
je 0x402ba7
cmp ecx, edx
jg 0x402ef9
push str.The_service_was_upgraded_successfully
jmp 0x402b14
lea esi, [ebp - 0x21c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402aab
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x402d01
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402f3c
push str.Uninstalling_service...
push 0x434580
call fcn.0040b410
add esp, 8
call fcn.004056e0
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x43478c]
mov edx, dword [edx + 4]
test eax, eax
je 0x402bbd
cmp ecx, edx
jg 0x402f7f
push str.The_service_was_uninstalled_successfully
push 0x434580
call fcn.0040b410
add esp, 8
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402d67
mov eax, dword [0x434580]
xor ebx, ebx
jmp 0x402c07
movups xmm0, xmmword [0x42b3f0]
lea eax, [ebp - 0x21c]
movups xmmword [eax], xmm0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x402ba3
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403048
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed.____d_
push 0x434580
call fcn.0040b470
add esp, 0xc
xor ebx, ebx
jmp 0x402c1e
cmp ecx, edx
jg 0x402fc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_upgrade_service.____d_
jmp 0x402bd1
cmp ecx, edx
jg 0x403005
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_uninstall_service.____d_
push 0x434580
call fcn.0040b470
add esp, 0xc
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402e30
mov eax, dword [0x434580]
xor ebx, ebx
inc ebx
test eax, eax
je 0x402c1e
push eax
call fcn.00414dbb
add esp, 4
mov dword [0x434580], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040dac1
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push str.logs
push edi
call fcn.00426d10
add esp, 8
test eax, eax
je 0x40294e
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push edi
call fcn.00426d10
add esp, 8
test eax, eax
je 0x40294e
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40308b
mov ecx, 0x434580
push edi
call fcn.0040b3a0
jmp 0x40294e
push str.logs
push esi
call fcn.00426d10
add esp, 8
test eax, eax
je 0x402a11
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_install.log
push esi
call fcn.00426d10
add esp, 8
test eax, eax
je 0x402a11
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4030ce
mov ecx, 0x434580
push esi
call fcn.0040b3a0
jmp 0x402a11
push str.logs
push esi
call fcn.00426d10
add esp, 8
test eax, eax
je 0x402aab
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.maintenanceservice_uninstall.log
push esi
call fcn.00426d10
add esp, 8
test eax, eax
je 0x402aab
mov eax, dword [0x43478c]
mov ecx, dword [0x433a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403111
mov ecx, 0x434580
push esi
call fcn.0040b3a0
jmp 0x402aab
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402b42
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402b42
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402988
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402988
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x4029c7
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x4029c7
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402bff
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402bff
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x4029d9
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x4029d9
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402a32
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402a32
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402a7a
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402a7a
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402acc
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402acc
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402b0f
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402b0f
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402baf
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402baf
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402bc5
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402bc5
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402b8a
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402b8a
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402c8b
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402c8b
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402cf1
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402cf1
push 0x43478c
call fcn.0040d3c7
add esp, 4
cmp dword [0x43478c], 0xffffffff
jne 0x402d57
mov dword [0x434580], 0
push 0x4037c0
call fcn.0040d63c
add esp, 4
push 0x43478c
call fcn.0040d419
add esp, 4
jmp 0x402d57