joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403bf0
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x44c
mov dword [esp + 0x444], esi
lea esi, [esp + 0x2c]
mov dword [esp + 0x440], ebx
xor ebx, ebx
mov dword [esp + 0x448], edi
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub eax, 1
sub esp, 8
cmp eax, 0x102
ja 0x403cce
lea edi, [esp + 0x236]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x413a62
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
sub esp, 0x10
test eax, eax
je 0x403cce
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000080
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
mov esi, eax
je 0x403d00
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__open_osfhandle]
test eax, eax
mov edi, eax
js 0x403cf0
mov dword [esp + 4], 0x413a41
mov dword [esp], eax
call fcn.004039f0
test eax, eax
mov ebx, eax
je 0x403d0e
mov eax, ebx
mov esi, dword [esp + 0x444]
mov ebx, dword [esp + 0x440]
mov edi, dword [esp + 0x448]
add esp, 0x44c
ret
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x403cce
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
sub esp, 4
jmp 0x403cce
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__close]
jmp 0x403cce

Function at 0x4050c0
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret
Function at 0x4083a0
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov eax, 1
push edi
push esi
push ebx
sub esp, 4
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
test esi, esi
je 0x4084ef
mov edx, dword [esp + 0x20]
movzx ecx, bx
shr ebx, 0x10
test edx, edx
je 0x4084e8
nop
cmp dword [esp + 0x20], 0x15b0
mov ebp, 0x15b0
cmovbe ebp, dword [esp + 0x20]
sub dword [esp + 0x20], ebp
cmp ebp, 0xf
jle 0x40849f
sub ebp, 0x10
mov dword [esp], ebp
shr ebp, 4
mov eax, ebp
shl eax, 4
lea edx, [esi + eax + 0x10]
mov eax, esi
movzx edi, byte [eax]
add ecx, edi
movzx edi, byte [eax + 1]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 2]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 3]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 4]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 5]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 6]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 7]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 8]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 9]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xa]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xb]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xc]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xd]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xe]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xf]
add eax, 0x10
add ebx, ecx
add ecx, edi
add ebx, ecx
cmp eax, edx
jne 0x408403
lea eax, [ebp + 1]
shl eax, 4
add esi, eax
mov eax, dword [esp]
shl ebp, 4
sub eax, ebp
mov ebp, eax
test ebp, ebp
je 0x4084b8
mov edx, ebp
mov eax, esi
movzx edi, byte [eax]
add eax, 1
add ecx, edi
add ebx, ecx
sub edx, 1
jne 0x4084a7
add esi, ebp
mov eax, 0x80078071
mul ecx
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub ecx, edx
mul ebx
mov eax, dword [esp + 0x20]
shr edx, 0xf
imul edx, edx, 0xfff1
sub ebx, edx
test eax, eax
jne 0x4083d0
mov eax, ebx
shl eax, 0x10
or eax, ecx
add esp, 4
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40e640
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
ret

Function at 0x40eeb0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
lea ebx, [esp + 0x24]
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.0040ef10

Function at 0x40ef10
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x4c
mov ecx, dword [0x418084]
mov dword [esp + 0x1c], edx
test ecx, ecx
jle 0x40f019
mov eax, dword [0x418080]
xor esi, esi
mov edx, dword [eax + 4]
cmp ebx, edx
jb 0x40ef49
mov edi, dword [eax + 8]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40efcc
add esi, 1
add eax, 0xc
cmp esi, ecx
jne 0x40ef34
mov dword [esp], ebx
call fcn.0040f410
test eax, eax
mov edi, eax
je 0x40f040
lea edx, [esi + esi*2]
mov esi, dword [0x418080]
shl edx, 2
add esi, edx
mov dword [esi + 8], eax
mov dword [esi], 0
mov dword [esp + 0x18], edx
call fcn.0040f4f0
mov edx, dword [esp + 0x18]
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [0x418080]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + edx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
mov edx, dword [esp + 0x18]
je 0x40f020
mov eax, dword [esp + 0x38]
cmp eax, 4
jne 0x40efe8
add dword [0x418084], 1
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], ebp
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x40
je 0x40efc5
mov eax, dword [esp + 0x30]
add edx, dword [0x418080]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
jmp 0x40efc5
xor esi, esi
jmp 0x40ef53
mov eax, dword [0x418080]
mov eax, dword [eax + edx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.0040eeb0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040eeb0

Function at 0x40f300
Capabilities:
Parse pe header

Disassembly:
mov edx, dword [esp + 4]
xor eax, eax
cmp word [edx], 0x5a4d
je 0x40f310
repz ret
add edx, dword [edx + 0x3c]
cmp dword [edx], 0x4550
jne 0x40f30d
xor eax, eax
cmp word [edx + 0x18], 0x10b
sete al
ret
Function at 0x40f8d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4183e4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4183fc]
sub esp, 4
test ebx, ebx
je 0x40f925
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40f91e
test esi, esi
je 0x40f91e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40f900
mov dword [esp], 0x4183e4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4109a0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
jmp fcn.004103c0
Function at 0x432004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
mov eax, section..reloc
nop
mov ebx, 0x40c7d0
nop
mov ecx, 0x2f2bd7
nop
nop
nop
test eax, eax
nop
nop
nop
je 0x43204e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x432024
nop
nop
mov eax, section..data
mov ebx, 0x42f314
nop
mov ecx, 0xe96ac1
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x432084
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x43206c
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x402530
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x10014
call fcn.0041d7b0
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [0x431014]
xor ecx, ebp
mov dword [ebp - 0x10], ecx
xor ebx, ebx
mov dword [edx], ebx
sub esp, 0x1c
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
movaps xmm0, xmmword [0x429a30]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1001c], eax
cmp eax, 0xffffffff
je 0x4026a2
mov eax, dword [ebp + 0xc]
sub esp, 0x1c
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
movaps xmm0, xmmword [0x429a30]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp eax, 0xffffffff
je 0x402693
xor ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push dword [ebp - 0x1001c]
call edi
mov ecx, edi
mov edi, eax
push ebx
mov dword [ebp - 0x10018], esi
push esi
call ecx
cmp edi, 0xffffffff
je 0x402688
cmp eax, 0xffffffff
mov esi, dword [ebp - 0x10018]
je 0x402693
cmp edi, eax
jne 0x402690
mov dword [ebp - 0x10020], edi
cmp edi, 0x8000
jae 0x4026d1
mov edi, dword [ebp - 0x10020]
and edi, 0x7fff
je 0x40267c
lea ecx, [ebp - 0x10014]
lea esi, [ebp - 0x8010]
push 0
push ecx
push edi
push esi
push dword [ebp - 0x1001c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor ebx, ebx
test eax, eax
je 0x402688
cmp dword [ebp - 0x10014], edi
jne 0x402688
lea edx, [ebp - 0x10010]
push 0
lea ecx, [ebp - 0x10014]
push ecx
push edi
push edx
push dword [ebp - 0x10018]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402688
cmp dword [ebp - 0x10014], edi
jne 0x402688
push edi
lea eax, [ebp - 0x10010]
push eax
push esi
call fcn.0040b8ce
add esp, 0xc
test eax, eax
jne 0x402685
mov eax, dword [ebp + 0x10]
mov dword [eax], 1
xor ebx, ebx
inc ebx
mov esi, dword [ebp - 0x10018]
jmp 0x402693
xor ebx, ebx
inc ebx
mov eax, esi
inc eax
cmp eax, 2
jb 0x4026a2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1001c]
inc eax
cmp eax, 2
jb 0x4026ba
push dword [ebp - 0x1001c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
mov eax, ebx
add esp, 0x10014
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [ebp - 0x10020]
shr edi, 0xf
lea ebx, [ebp - 0x8010]
push 0
lea eax, [ebp - 0x10014]
push eax
push 0x8000
mov esi, ebx
push ebx
push dword [ebp - 0x1001c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor ebx, ebx
test eax, eax
je 0x402688
cmp dword [ebp - 0x10014], 0x8000
jne 0x402688
push 0
lea eax, [ebp - 0x10014]
push eax
push 0x8000
lea eax, [ebp - 0x10010]
push eax
push dword [ebp - 0x10018]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402688
cmp dword [ebp - 0x10014], 0x8000
jne 0x402688
push 0x8000
lea eax, [ebp - 0x10010]
push eax
mov ebx, esi
push esi
call fcn.0040b8ce
add esp, 0xc
test eax, eax
jne 0x402685
dec edi
jne 0x4026e0
jmp 0x402605
Function at 0x4042d0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov dword [ebp - 0x1c], edx
mov ebx, ecx
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
push eax
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
push eax
call fcn.0040a27b
add esp, 4
mov esi, eax
push eax
push edi
xor eax, eax
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x404352
lea eax, [ebp - 0x14]
mov dword [eax], esi
lea ecx, [ebp - 0x18]
push ecx
push eax
push 0x42c542
push esi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40437d
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 0xa]
mov edx, dword [ebp - 0x1c]
mov dword [edx], ecx
mov ecx, dword [ebp + 8]
movzx edx, word [eax + 8]
mov dword [ecx], edx
mov ecx, dword [ebp + 0xc]
movzx edx, word [eax + 0xe]
mov dword [ecx], edx
mov ecx, dword [ebp + 0x10]
movzx eax, word [eax + 0xc]
mov dword [ecx], eax
xor edi, edi
inc edi
jmp 0x4043b5
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4043d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_obtain_file_info_of_old_service.____lu_
jmp 0x4043a6
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x404411
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_query_file_version_info_of_old_service.____lu_
push 0x4327c8
call fcn.00408750
add esp, 0xc
xor edi, edi
push esi
call fcn.0040a507
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
mov eax, edi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x4329d4
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x40436f
mov dword [0x4327c8], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d4
call fcn.0040a639
add esp, 4
jmp 0x40436f
push 0x4329d4
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x40439a
mov dword [0x4327c8], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d4
call fcn.0040a639
add esp, 4
jmp 0x40439a
Function at 0x404460
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
push 0xf003f
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
je 0x404516
mov esi, eax
push 0xf01ff
push str.MozillaMaintenance
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x404550
mov edi, eax
mov dword [ebp - 0x30], esi
lea eax, [ebp - 0x2c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4044ed
xor esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x14]
call ebx
cmp dword [ebp - 0x28], 1
je 0x4044ed
mov eax, dword [ebp - 0x14]
add esi, eax
add esi, 0xa
cmp esi, 0xea60
ja 0x4044ed
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x4044c3
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
test eax, eax
jne 0x40450a
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x430
sete bl
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [ebp - 0x30]
jmp 0x404588
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4045a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service_manager.____lu_
push 0x4327c8
call fcn.00408750
add esp, 0xc
xor ebx, ebx
jmp 0x40458f
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4045e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service.____lu_
push 0x4327c8
call fcn.00408750
add esp, 0xc
xor ebx, ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x4329d4
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x404533
mov dword [0x4327c8], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d4
call fcn.0040a639
add esp, 4
jmp 0x404533
push 0x4329d4
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x40456d
mov dword [0x4327c8], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d4
call fcn.0040a639
add esp, 4
jmp 0x40456d
Function at 0x4057d0
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x210
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0xc], eax
cmp word [ecx], 0
je 0x4058c0
mov esi, ecx
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x405846
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x405846
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x405846
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4058d4
push esi
push str.Could_not_delete_service_updater_path:__ls.
push 0x4327c8
call fcn.00408750
add esp, 0xc
lea edi, [ebp - 0x216]
push 0x20a
push 0
push edi
call fcn.0040c7e0
add esp, 0xc
push str.updater.ini
push esi
push edi
call fcn.00408d70
add esp, 0xc
test eax, eax
je 0x4058c0
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4058c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x4058c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4058c0
mov eax, dword [0x4329d4]
mov ecx, dword [0x431bbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x405917
push edi
push str.Could_not_delete_service_updater_INI_path:__ls.
push 0x4327c8
call fcn.00408750
add esp, 0xc
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0040afa5
add esp, 0x210
pop esi
pop edi
pop ebp
ret
push 0x4329d4
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x405833
mov dword [0x4327c8], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d4
call fcn.0040a639
add esp, 4
jmp 0x405833
push 0x4329d4
call fcn.0040a5e7
add esp, 4
cmp dword [0x4329d4], 0xffffffff
jne 0x4058ad
mov dword [0x4327c8], 0
push 0x402500
call fcn.0040a7ac
add esp, 4
push 0x4329d4
call fcn.0040a639
add esp, 4
jmp 0x4058ad
Function at 0x408750
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov esi, dword [ebp + 8]
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [esi], 0
je 0x4087b9
lea eax, [ebp + 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
inc eax
push dword [esi]
push eax
push 0xd
push str._Warning:
call fcn.0041362b
add esp, 0x10
mov ebx, dword [ebp - 0x14]
mov edi, dword [esi]
call fcn.00401060
push ebx
push 0
push dword [ebp + 0xc]
push edi
push dword [eax + 4]
push dword [eax]
call fcn.0040d077
add esp, 0x18
push dword [esi]
xor eax, eax
inc eax
push eax
push 4
push str._n
call fcn.0041362b
add esp, 0x10
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x408dc0
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov edi, ecx
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0x8000
push section..rdata
call sub.SHELL32.dll_SHGetKnownFolderPath
xor esi, esi
test eax, eax
js 0x408e0a
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.0040a3bb
add esp, 4
cmp eax, 0x105
jb 0x408e1e
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x105
push ebx
push edi
call fcn.0040a50c
add esp, 0xc
push dword [ebp - 0x14]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push str.Mozilla_Maintenance_Service
push edi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x408e0a
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x408e62
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x408e0a
push str.UpdateLogs
push edi
call fcn.00424f30
add esp, 8
test eax, eax
je 0x408e0a
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x408e92
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x408e0a
xor esi, esi
inc esi
jmp 0x408e0a
Function at 0x4094b0
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
push 5
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
je 0x409577
mov ebx, eax
push 4
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x40959d
mov edi, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], 0xcf
imul esi, eax, 0x3e8
test esi, esi
je 0x4095c5
mov dword [ebp - 0x3c], ebx
xor ebx, ebx
lea eax, [ebp - 0x38]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x40952e
cmp dword [ebp - 0x30], 1
jne 0x40955a
jmp 0x409601
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
jle 0x4095e8
lea ecx, [eax - 0x41c]
cmp ecx, 0xa
ja 0x409632
mov edx, 0x601
bt edx, ecx
jae 0x409632
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 0x32
cmp ebx, esi
jb 0x40950c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], eax
mov ebx, dword [ebp - 0x3c]
jmp 0x40966b
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x429
sete cl
xor ecx, 0xff
cmp eax, 5
mov esi, 0xfd
cmovne esi, ecx
jmp 0x40967a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp edi, 0x7a
jg 0x4095d1
cmp edi, 5
je 0x409609
cmp edi, 6
jne 0x409617
mov esi, 0xec
jmp 0x40967a
mov dword [ebp - 0x40], 0xcf
jmp 0x40966b
cmp edi, 0x7b
je 0x409610
cmp edi, 0x424
jne 0x409617
mov esi, 0xee
jmp 0x40967a
cmp eax, 0x56
jg 0x40961e
cmp eax, 5
mov ebx, dword [ebp - 0x3c]
je 0x409648
cmp eax, 6
jne 0x409656
mov eax, 0xd9
jmp 0x409665
mov ebx, dword [ebp - 0x3c]
xor eax, eax
inc eax
jmp 0x409668
mov esi, 0xeb
jmp 0x40967a
mov esi, 0xed
jmp 0x40967a
mov esi, 0xef
jmp 0x40967a
cmp eax, 0x57
mov ebx, dword [ebp - 0x3c]
je 0x40964f
cmp eax, 0x7a
jne 0x409656
mov eax, 0xdb
jmp 0x409665
cmp eax, 0x7c
je 0x40965d
cmp eax, 0x45b
mov ebx, dword [ebp - 0x3c]
jne 0x409656
mov eax, 0xde
jmp 0x409665
mov eax, 0xda
jmp 0x409665
mov eax, 0xdc
jmp 0x409665
mov eax, 0xdf
jmp 0x409665
mov eax, 0xdd
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x40], eax
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
mov esi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040afa5
mov eax, esi
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret