Function at 0x402780
Capabilities:
Check if file exists
Get file attributes
Modify service

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x21c
mov edi, ecx
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea ebx, [ebp - 0x21a]
push 0x105
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4027ea
push ebx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x402839
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402a69
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_remove_file_spec_when_attempting_to_modify_service_description.____lu_
jmp 0x402817
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402aac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_obtain_module_filename_when_attempting_to_modify_service_description.____lu_
push 0x4327cc
call fcn.00408750
add esp, 0xc
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
add esp, 0x21c
pop esi
pop edi
pop ebx
pop ebp
ret
push str.updater.ini
push ebx
call fcn.00424f30
add esp, 8
test eax, eax
je 0x4028c1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4028f3
xor eax, eax
lea esi, [ebp - 0x220]
mov dword [esi], eax
push eax
push esi
push 1
push str.MozillaMaintenanceDescription
push ebx
call fcn.004079a0
add esp, 0x14
mov ebx, dword [esi]
test eax, eax
je 0x402925
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402b32
push str.updater.ini_file_does_not_contain_a_maintenance_service_description.
push 0x4327cc
call fcn.00408750
add esp, 8
test ebx, ebx
jne 0x402a5b
jmp 0x402824
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402aef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_append_updater.ini_filename_when_attempting_to_modify_service_description.____lu_
jmp 0x402817
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402b75
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.updater.ini_file_does_not_exist__will_not_modify_service_description.____lu_
jmp 0x402817
cmp byte [ebx], 0
je 0x402881
xor eax, eax
xor edx, edx
dec edx
mov ecx, 0xfde9
push eax
push eax
push edx
mov esi, edx
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x228], ebx
lea ebx, [eax + eax]
test eax, eax
cmovs ebx, esi
push ebx
call fcn.0040a27b
add esp, 4
mov esi, eax
push ebx
mov ebx, dword [ebp - 0x228]
xor eax, eax
push eax
push esi
call fcn.0040c7e0
add esp, 0xc
push dword [ebp - 0x224]
push esi
xor eax, eax
dec eax
push eax
push ebx
xor eax, eax
push eax
mov eax, 0xfde9
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x4029ef
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x220], esi
lea eax, [ebp - 0x220]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4329d8]
mov edx, dword [edx + 4]
test eax, eax
je 0x402a2b
cmp ecx, edx
jg 0x402bb8
push str.The_service_description_was_updated_successfully.
push 0x4327cc
call fcn.00408660
add esp, 8
jmp 0x402a4c
mov eax, dword [0x4329d8]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402bfb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_convert_description_to_wide_string_format.____lu_
push 0x4327cc
call fcn.00408750
add esp, 0xc
jmp 0x402a52
cmp ecx, edx
jg 0x402c3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_change_service_config.____lu_
push 0x4327cc
call fcn.00408750
add esp, 0xc
mov esi, dword [ebp - 0x224]
push esi
call fcn.0040a507
add esp, 4
push ebx
call fcn.0040a507
add esp, 4
jmp 0x402824
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x4027dc
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x4027dc
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x40280b
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x40280b
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x4028e2
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x4028e2
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x4028a2
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x4028a2
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x402914
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x402914
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x4029db
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x4029db
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x402a10
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x402a10
push 0x4329d8
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d8], 0xffffffff
jne 0x402a33
mov dword [0x4327cc], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d8
call fcn.0040a639
add esp, 4
jmp 0x402a33