joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45f8f4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
imul ecx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
cmp byte [edi], 0
je 0x45f927
push 0
lea eax, [ebp + 0x10]
push eax
push ecx
push dword [ebp + 8]
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45f922
mov byte [edi + 0x10], 1
mov eax, dword [ebp + 0x10]
jmp 0x45f951
mov edx, dword [edi + 0x20]
push esi
mov esi, dword [edi + 0x1c]
sub esi, edx
lea eax, [edx + ecx]
cmp eax, dword [edi + 0x1c]
cmovbe esi, ecx
mov ecx, dword [edi + 0x18]
push esi
add ecx, edx
push ecx
push dword [ebp + 8]
call fcn.00482e60
add esp, 0xc
mov eax, esi
add dword [edi + 0x20], esi
pop esi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebp
ret

Function at 0x45fadf
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x45faed
xor eax, eax
pop ebp
ret
mov ecx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
not ecx
cmp esi, 8
jb 0x45fbac
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
sub edi, 1
jne 0x45fb05
pop edi
test esi, esi
je 0x45fbc8
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4adf58]
inc edx
sub esi, 1
jne 0x45fbb0
not ecx
mov eax, ecx
pop esi
pop ebp
ret
Function at 0x47e0a5
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 8]
mov edi, eax
mov edx, eax
and edi, 7
je 0x47e0d3
cmp eax, edi
jge 0x47e0c7
push esi
call fcn.0047a59e
mov eax, dword [esi + 8]
pop ecx
mov ecx, edi
shr dword [esi + 0xc], cl
sub eax, edi
mov dword [esi + 8], eax
mov edx, eax
xor ecx, ecx
test eax, eax
jle 0x47e0f6
mov edi, dword [esi + 0xc]
mov al, byte [esi + 0xc]
sub edx, 8
mov byte [ebp + ecx + 8], al
inc ecx
shr edi, 8
mov dword [esi + 0xc], edi
test edx, edx
jg 0x47e0dc
mov dword [esi + 8], edx
jmp 0x47e10b
mov eax, dword [esi]
cmp eax, dword [esi + 4]
jb 0x47e101
xor dl, dl
jmp 0x47e106
mov dl, byte [eax]
inc eax
mov dword [esi], eax
mov byte [ebp + ecx + 8], dl
inc ecx
cmp ecx, 4
jl 0x47e0f6
mov eax, dword [ebp + 8]
movzx ecx, byte [ebp + 0xb]
movzx edi, ah
movzx eax, al
shl edi, 8
add edi, eax
shl ecx, 8
movzx eax, byte [ebp + 0xa]
add ecx, eax
mov eax, edi
xor eax, 0xffff
cmp ecx, eax
je 0x47e145
push str.zlib_corrupt
call fcn.0047a4c9
add esp, 4
jmp 0x47e185
mov eax, dword [esi]
add eax, edi
cmp eax, dword [esi + 4]
jbe 0x47e155
push str.read_past_buffer
jmp 0x47e13b
mov ecx, dword [esi + 0x10]
lea eax, [ecx + edi]
cmp eax, dword [esi + 0x18]
jbe 0x47e16f
push edi
push ecx
push esi
call fcn.00480bc1
add esp, 0xc
test eax, eax
je 0x47e185
push edi
push dword [esi]
push dword [esi + 0x10]
call fcn.00482e60
add dword [esi], edi
xor eax, eax
add dword [esi + 0x10], edi
add esp, 0xc
inc eax
pop edi
pop esi
pop ebp
ret
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x438004]
jne 0x40100a
repz ret
jmp fcn.00401424

Function at 0x406ecc
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x438004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00404a1c
and dword [ebp - 0x14], 0
cmp dword [0x43a958], 0
mov dword [ebp - 0x18], eax
jne 0x406f7f
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x407027
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x407027
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x43a958], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x43a95c], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x43a960], eax
call edi
push eax
call esi
mov dword [0x43a968], eax
test eax, eax
je 0x406f7f
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x43a964], eax
mov eax, dword [0x43a964]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x406fd8
cmp dword [0x43a968], ecx
je 0x406fd8
push eax
call esi
push dword [0x43a968]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x406fd8
test ebx, ebx
je 0x406fd8
call edi
test eax, eax
je 0x406fcf
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x406fcf
test byte [ebp - 8], 1
jne 0x406fd8
or dword [ebp + 0x10], 0x200000
jmp 0x40700b
mov eax, dword [0x43a95c]
cmp eax, dword [ebp - 0x18]
je 0x40700b
push eax
call esi
test eax, eax
je 0x40700b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40700b
mov eax, dword [0x43a960]
cmp eax, dword [ebp - 0x18]
je 0x40700b
push eax
call esi
test eax, eax
je 0x40700b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x43a958]
call esi
test eax, eax
je 0x407027
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x407029
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401000
leave
ret
Function at 0x401818
Capabilities:
Create thread

Disassembly:
xor eax, eax
push eax
push eax
push eax
push 0x401805
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x401835
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
ret
Function at 0x401ec6
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x10014
call fcn.0040cbd0
mov eax, dword [0x421050]
xor eax, esp
mov dword [esp + 0x10010], eax
mov eax, dword [esp + 0x10018]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ebp, ebp
push edi
push ebp
push ebp
push 3
push ebp
push 1
push 0x80000000
push ecx
mov ebx, edx
mov dword [esp + 0x38], eax
mov dword [eax], ebp
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x40208b
push ebp
push ebp
push 3
push ebp
push 1
push 0x80000000
push ebx
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x402072
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebp
push edi
call ebx
push ebp
push esi
mov dword [esp + 0x1c], eax
call ebx
mov ebx, dword [esp + 0x14]
cmp ebx, 0xffffffff
je 0x402072
cmp eax, 0xffffffff
je 0x402072
cmp ebx, eax
jne 0x402062
mov eax, ebx
mov dword [esp + 0x14], ebp
shr eax, 0xf
and ebx, 0x7fff
mov dword [esp + 0x18], eax
test eax, eax
je 0x402007
push ebp
lea eax, [esp + 0x14]
push eax
push 0x8000
lea eax, [esp + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402072
mov ecx, 0x8000
cmp dword [esp + 0x10], ecx
jne 0x402072
push ebp
lea eax, [esp + 0x14]
push eax
push ecx
lea eax, [esp + 0x802c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402072
cmp dword [esp + 0x10], 0x8000
jne 0x402072
lea edx, [esp + 0x20]
mov ecx, ebp
mov eax, dword [edx + ecx*4]
lea edx, [esp + 0x8020]
cmp eax, dword [edx + ecx*4]
lea edx, [esp + 0x20]
jne 0x402062
inc ecx
cmp ecx, 0x2000
jne 0x401fd8
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x18]
jb 0x401f78
test ebx, ebx
je 0x402067
push ebp
lea eax, [esp + 0x14]
push eax
push ebx
lea eax, [esp + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402072
cmp dword [esp + 0x10], ebx
jne 0x402072
push ebp
lea eax, [esp + 0x14]
push eax
push ebx
lea eax, [esp + 0x802c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402072
cmp dword [esp + 0x10], ebx
jne 0x402072
push ebx
lea eax, [esp + 0x8024]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.0041052e
add esp, 0xc
test eax, eax
je 0x402067
xor ebp, ebp
inc ebp
jmp 0x402072
mov eax, dword [esp + 0x1c]
xor ecx, ecx
inc ecx
mov ebp, ecx
mov dword [eax], ecx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x402084
cmp esi, 0xffffffff
je 0x402084
push esi
call ebx
test edi, edi
je 0x40208b
push edi
call ebx
mov ecx, dword [esp + 0x10020]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040502c
add esp, 0x10014
ret
Function at 0x4020a6
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov dword [esp + 0x14], edx
mov ebx, ecx
push ebp
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov edi, eax
push edi
call fcn.004057c4
pop ecx
mov esi, eax
push esi
push edi
push ebp
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x4020e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_obtain_file_info_of_old_service.____d_
jmp 0x40210e
lea eax, [esp + 0x18]
mov dword [esp + 0x10], esi
push eax
lea eax, [esp + 0x14]
push eax
push 0x41cef4
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x40211e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_query_file_version_info_of_old_service.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
jmp 0x40214d
mov edx, dword [esp + 0x10]
xor ebp, ebp
mov ecx, dword [esp + 0x14]
inc ebp
movzx eax, word [edx + 0xa]
mov dword [ecx], eax
mov eax, dword [esp + 0x20]
movzx ecx, word [edx + 8]
mov dword [eax], ecx
mov eax, dword [esp + 0x24]
movzx ecx, word [edx + 0xe]
mov dword [eax], ecx
mov eax, dword [esp + 0x28]
movzx ecx, word [edx + 0xc]
mov dword [eax], ecx
test esi, esi
je 0x402158
push esi
call fcn.00405799
pop ecx
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x402162
Capabilities:
Check if file exists
Get file attributes
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb80
mov eax, dword [0x421050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x105
lea eax, [ebp - 0x218]
mov edi, ecx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4021b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_obtain_module_filename_when_attempting_to_modify_service_description.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
jmp 0x402303
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4021cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_remove_file_spec_when_attempting_to_modify_service_description.____d_
jmp 0x40219d
mov edx, str.updater.ini
lea ecx, [ebp - 0x218]
call fcn.004049a6
test eax, eax
jne 0x4021f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_append_updater.ini_filename_when_attempting_to_modify_service_description.____d_
jmp 0x40219d
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402211
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.updater.ini_file_does_not_exist__will_not_modify_service_description.____d_
jmp 0x40219d
push ecx
lea eax, [ebp - 0x470]
push eax
push ecx
lea ecx, [ebp - 0x218]
call fcn.004040d4
mov esi, eax
lea eax, [ebp - 0x470]
test esi, esi
push 0x257
setne cl
push eax
lea eax, [ebp - 0xb78]
dec cl
and byte [ebp - 0x470], cl
push eax
call fcn.00405840
add esp, 0x18
mov byte [ebp - 0x921], 0
test esi, esi
jne 0x4022f1
lea ecx, [ebp - 0xb78]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402267
sub ecx, edx
je 0x4022f1
push 0x258
lea eax, [ebp - 0x920]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0xb78]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4022a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_convert_description_to_wide_string_format.____d_
jmp 0x40219d
lea eax, [ebp - 0x920]
mov dword [ebp - 0xb7c], eax
lea eax, [ebp - 0xb7c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x4022da
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_change_service_config.____d_
jmp 0x40219d
push str.The_service_description_was_updated_successfully.
call fcn.00401000
push eax
call fcn.00404e43
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x402305
push str.updater.ini_file_does_not_contain_a_maintenance_service_description.
call fcn.00401000
push eax
call fcn.00404e6e
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040502c
mov esp, ebp
pop ebp
ret
Function at 0x402315
Capabilities:
Modify service

Disassembly:
sub esp, 0x210
mov eax, dword [0x421050]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
mov ebx, dword [esp + 0x218]
push ebp
push esi
push edi
mov edi, edx
mov ebp, ecx
mov esi, edi
xor ecx, ecx
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, cx
jne 0x40233f
sub esi, edx
sar esi, 1
cmp esi, 2
jbe 0x402390
push str.maintenanceservice_tmp.exe
push edi
call fcn.00405964
pop ecx
pop ecx
test eax, eax
jne 0x402390
push 0x22
pop eax
cmp word [edi], ax
jne 0x402390
cmp word [edi + esi*2 - 2], ax
jne 0x402390
push str.The_MozillaMaintenance_service_path_is_correct.
call fcn.00401000
push eax
call fcn.00404e43
and dword [ebx], 0
xor eax, eax
pop ecx
pop ecx
inc eax
jmp 0x402479
push edi
push str.The_MozillaMaintenance_path_is_NOT_correct._It_was:__ls
call fcn.00401000
push eax
call fcn.00404e43
xor esi, esi
xor eax, eax
inc esi
mov word [esp + 0x1c], ax
mov dword [ebx], esi
lea eax, [esp + 0x1e]
push 0x208
xor ebx, ebx
push ebx
push eax
call fcn.0040bf90
push 0x104
lea eax, [esp + 0x2c]
push edi
push eax
call fcn.0040517b
add esp, 0x24
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x40240a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Couldnt_remove_file_spec.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
xor eax, eax
jmp 0x402479
mov edx, 0x41d244
lea ecx, [esp + 0x10]
call fcn.004049a6
test eax, eax
jne 0x40242a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Couldnt_append_file_spec.____d_
jmp 0x4023f8
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x28]
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x40245f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_fix_service_path.____d_
jmp 0x4023f8
lea ecx, [esp + 0x10]
push ecx
push str.Fixed_service_path_to:__ls.
call fcn.00401000
push eax
call fcn.00404e43
add esp, 0xc
mov eax, esi
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040502c
add esp, 0x210
ret
Function at 0x402a25
Capabilities:
Stop service

Disassembly:
sub esp, 0x20
mov eax, dword [0x421050]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push esi
push edi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
jne 0x402a6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service_manager.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
jmp 0x402b57
push 0xf01ff
push str.MozillaMaintenance
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x402aa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402b57
push str.Sending_stop_request...
call fcn.00401000
push eax
call fcn.00404e43
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [esp + 0xc]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x402af9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x402af9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_sending_stop_request.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push str.Waiting_for_service_stop...
call fcn.00401000
push eax
call fcn.00404e43
pop ecx
pop ecx
call fcn.00404ad3
mov esi, eax
call fcn.00404c61
cmp eax, 0x490
je 0x402b3b
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x1e
jb 0x402b1e
push esi
push str.Done_waiting_for_service_stop__last_service_state:__d
call fcn.00401000
push eax
call fcn.00404e43
xor ebx, ebx
add esp, 0xc
cmp esi, 1
sete bl
mov ecx, dword [esp + 0x28]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040502c
add esp, 0x20
ret
Function at 0x402b6b
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x421050]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x402bb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service_manager.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
jmp 0x402c4e
push 0xf01ff
push str.MozillaMaintenance
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x402be5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
jmp 0x402c47
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x402c1e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 8]
add eax, 0xa
add ebx, eax
cmp dword [ebp - 0x1c], 1
je 0x402c22
cmp ebx, 0xea60
ja 0x402c22
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x402bf4
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
test ebx, ebx
jne 0x402c40
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ebx, [eax - 0x430]
neg ebx
sbb ebx, ebx
inc ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040502c
mov esp, ebp
pop ebp
ret
Function at 0x402f58
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x244
mov eax, dword [0x421050]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push ebp
push esi
push edi
xor eax, eax
mov ebp, edx
xor ebx, ebx
mov word [esp + 0x44], ax
push 0x208
lea eax, [esp + 0x4a]
mov esi, ecx
push ebx
push eax
mov dword [ebp], ebx
call fcn.0040bf90
push 0x104
lea eax, [esp + 0x54]
push esi
push eax
call fcn.0040517b
add esp, 0x18
lea ecx, [esp + 0x44]
mov edx, str.update.status
call fcn.004049a6
test eax, eax
jne 0x402fce
push str.Could_not_append_path_for_update.status_file
call fcn.00401000
push eax
call fcn.00404e6e
pop ecx
pop ecx
xor eax, eax
jmp 0x40308b
push ebx
push ebx
push 3
push ebx
push 7
push 0x80000000
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, 0xffffffff
jne 0x402ff7
push str.Could_not_open_update.status_file
jmp 0x403026
push 7
pop ecx
xor eax, eax
mov byte [esp + 0x24], bl
lea edi, [esp + 0x25]
rep stosd dword es:[edi], eax
push ebx
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x18]
push eax
push 0x20
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403035
push str.Could_not_read_from_update.status_file
call fcn.00401000
push eax
call fcn.00404e6e
pop ecx
pop ecx
jmp 0x403079
lea eax, [esp + 0x24]
push eax
push str.updater.exe_returned_status:__s
call fcn.00401000
push eax
call fcn.00404e43
mov esi, str.applying
lea edi, [esp + 0x24]
push 8
lea eax, [esp + 0x28]
push eax
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x38]
push eax
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
call fcn.00405c00
mov esi, dword [esp + 0x28]
add esp, 0x18
neg eax
sbb eax, eax
xor ebx, ebx
inc eax
inc ebx
mov dword [ebp], eax
test esi, esi
je 0x403089
cmp esi, 0xffffffff
je 0x403089
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [esp + 0x250]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040502c
add esp, 0x244
ret
Function at 0x403a11
Capabilities:
Create directory

Disassembly:
push esi
push 0x104
mov esi, ecx
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x403a44
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_obtain_module_filename_when_attempting_to_use_a_secure_updater_path.____d_
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
xor eax, eax
pop esi
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x403a5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Couldnt_remove_file_spec_when_attempting_to_use_a_secure_updater_path.____d_
jmp 0x403a32
mov edx, str.update
mov ecx, esi
call fcn.004049a6
test eax, eax
jne 0x403a7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Couldnt_append_file_spec_when_attempting_to_use_a_secure_updater_path.____d_
jmp 0x403a32
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, str.updater.exe
mov ecx, esi
call fcn.004049a6
test eax, eax
je 0x403a6d
xor eax, eax
inc eax
pop esi
ret

Function at 0x403a99
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x421050]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
xor eax, eax
push esi
mov esi, eax
cmp word [ebx], ax
je 0x403b63
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x403af3
call edi
cmp eax, 3
je 0x403af3
call edi
cmp eax, 2
je 0x403af3
push ebx
push str.Could_not_delete_service_updater_path:__ls.
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.0040bf90
push str.updater.ini
mov edx, ebx
lea ecx, [ebp - 0x210]
call fcn.004043b9
add esp, 0x10
test eax, eax
je 0x403b62
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
test esi, esi
jne 0x403b62
call edi
cmp eax, 3
je 0x403b62
call edi
cmp eax, 2
je 0x403b62
lea eax, [ebp - 0x210]
push eax
push str.Could_not_delete_service_updater_INI_path:__ls.
call fcn.00401000
push eax
call fcn.00404e6e
add esp, 0xc
pop edi
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040502c
mov esp, ebp
pop ebp
ret