Function at 0x406822
Capabilities:
Copy file
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0x480]
sub esp, 0x500
mov eax, dword [0x427d40]
xor eax, ebp
mov dword [ebp + 0x47c], eax
mov eax, dword [ebp + 0x488]
push ebx
push esi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
mov dword [ebp - 0x28], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
jne 0x406864
xor eax, eax
jmp 0x406921
push edi
push 0xf01ff
push str.MozillaMaintenance
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x20], edi
push esi
cmp edi, ebx
jne 0x40688b
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40691e
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4068b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x4068b4
push edi
call esi
jmp 0x40691e
push dword [ebp - 0x24]
call fcn.0040e3e3
pop ecx
mov edi, eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x24]
mov dword [ebp - 0x2c], edi
push edi
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
push dword [ebp - 0x20]
test eax, eax
jne 0x4068de
call esi
jmp 0x406917
call esi
push dword [edi + 0xc]
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
xor eax, eax
mov esi, 0x208
push esi
mov word [ebp - 0x1c], ax
lea eax, [ebp - 0x1a]
push ebx
push eax
call fcn.0040b2f0
push str.maintenanceservice_tmp.exe
push dword [edi + 0xc]
lea eax, [ebp - 0x1c]
push eax
call fcn.00406371
add esp, 0x18
test eax, eax
jne 0x406938
push edi
call fcn.0040dbd1
pop ecx
xor eax, eax
pop edi
mov ecx, dword [ebp + 0x47c]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b2d4
add ebp, 0x480
leave
ret
xor eax, eax
push esi
mov word [ebp + 0x1f0], ax
lea eax, [ebp + 0x1f2]
push ebx
push eax
call fcn.0040b2f0
push 0x104
push dword [ebp - 0x28]
lea eax, [ebp + 0x1f0]
push eax
call fcn.0040dcb3
lea eax, [ebp + 0x1f0]
push str.maintenanceservice.exe
push eax
call fcn.00405f31
add esp, 0x20
push ebx
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x1f0]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x406998
push edi
call fcn.0040dbd1
pop ecx
mov eax, ebx
jmp 0x406920
push 0x40
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.0040b2f0
xor eax, eax
mov dword [ebp - 0x3c], ebx
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
push 0x7e
mov word [ebp + 0x3fc], ax
lea eax, [ebp + 0x3fe]
push ebx
push eax
mov dword [ebp - 0x80], 0x44
mov dword [ebp - 0x78], 0x41f324
call fcn.0040b2f0
push 0x3f
lea eax, [ebp + 0x3fc]
push str.dummyparam.exe_upgrade
push eax
call fcn.0040dcb3
add esp, 0x24
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0x28]
lea eax, [ebp + 0x3fc]
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
cmp edi, ebx
je 0x406a22
push dword [ebp - 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x38]
call esi
mov ebx, edi
mov edi, dword [ebp - 0x2c]
jmp 0x40698d