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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x57d5b8]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x508221
cmp word [ebx], dx
jne 0x508221
or byte [eax + edi + 0x28], 4
jmp 0x508226
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x508389
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x508369
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x508267
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x50829d
cmp eax, edx
jae 0x5082ab
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x508242
jmp 0x508389
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x508364
cmp dword [ebp - 0x18], 0
je 0x508364
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x57d5b8]
test byte [eax + edi + 0x28], 0x48
je 0x50833a
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x5082fe
mov word [esi], cx
jmp 0x508335
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x57d5b8]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x57d5b8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x57d5b8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x508389
pop eax
cmp word [ebp - 4], ax
jne 0x50834a
cmp esi, ebx
jne 0x50834a
mov word [esi], ax
jmp 0x508386
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005023f7
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x508389
push 0xd
pop eax
jmp 0x508345
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x57d5b8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x508383
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x508389
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x50b83d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x54207c
push 0x542074
push str.FlsAlloc
push 0x1f
call fcn.0050b668
mov esi, eax
add esp, 0x10
test esi, esi
je 0x50b871
push dword [ebp + 8]
mov ecx, esi
call dword [0x52f778]
call esi
jmp 0x50b877
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x50b8bb
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x54208c
push 0x542084
push str.FlsGetValue
push 0x21
call fcn.0050b668
mov esi, eax
add esp, 0x10
test esi, esi
je 0x50b8f2
push dword [ebp + 8]
mov ecx, esi
call dword [0x52f778]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x50b8fa
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x542094
push 0x54208c
push str.FlsSetValue
push 0x22
call fcn.0050b668
mov esi, eax
add esp, 0x10
test esi, esi
je 0x50b934
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x52f778]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x51210f
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x578134]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x51215a
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.005122aa
test al, al
jne 0x512154
sub edx, 2
cmp edx, edi
jne 0x51213a
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x51217c
lea eax, [edi + 2]
cmp edx, eax
je 0x51217c
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0051205b
add esp, 0x10
jmp 0x512276
push esi
lea ecx, [ebp - 0x255]
call fcn.005122aa
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5121bf
push dword [ebp - 0x25c]
jmp 0x51216c
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x5121fc
cmp word [ebp - 0x226], 0
je 0x51221d
cmp word [ebp - 0x226], ax
jne 0x5121fc
cmp word [ebp - 0x224], 0
je 0x51221d
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0051205b
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x512269
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x5121d6
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x512251
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x512276
push 0x511e8b
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00501730
add esp, 0x10
jmp 0x512246
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004eacf5
leave
ret
Function at 0x512b8c
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x512c29
push ebx
push esi
call fcn.00512b55
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0050ece3
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x512bd6
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x512c28
push edi
push eax
call fcn.0050afe9
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x512bf6
call fcn.0050afaf
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x512c27
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0050ece3
add esp, 0x20
test eax, eax
jne 0x512c15
push edi
call fcn.0050afaf
jmp 0x512c1d
push ebx
call fcn.0050afaf
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x512c2c
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x512c3d
pop esi
ret
push ebx
push edi
push esi
call fcn.00512b55
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0050afe9
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x512c65
push ebx
push esi
push edi
call fcn.004ec860
add esp, 0xc
push 0
call fcn.0050afaf
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x5133bf
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00512eda

Function at 0x51553d
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0050a9a6
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x5155ac
cmp esi, dword [ebp - 4]
je 0x5155a7
cmp dword [ebp + 0xc], 0
je 0x5155a7
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x515584
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0051508f
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x5155ae
xor eax, eax
inc eax
jmp 0x5155ae
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x515613
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x578134]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.0050a9a6
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0050a9a6
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x51568a
cmp word [ecx], dx
je 0x51568a
mov eax, dword [0x542804]
push edi
dec eax
push eax
push 0x5426f0
call fcn.005155b2
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x5156fd
cmp word [eax], dx
je 0x5156fd
mov eax, dword [edi]
test eax, eax
je 0x5156ae
cmp word [eax], dx
je 0x5156ae
lea eax, [ebp - 0x10]
push eax
call fcn.00514f95
jmp 0x5156b7
lea eax, [ebp - 0x10]
push eax
call fcn.00515030
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x515727
mov eax, dword [0x5426ec]
push dword [ebp - 0x14]
dec eax
push eax
push 0x5423e0
call fcn.005155b2
add esp, 0xc
test al, al
je 0x515727
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x5156f2
cmp word [eax], di
je 0x5156f2
lea eax, [ebp - 0x10]
push eax
call fcn.00514f95
pop ecx
jmp 0x515729
lea eax, [ebp - 0x10]
push eax
call fcn.00515030
jmp 0x5156ef
mov eax, dword [edi]
test eax, eax
je 0x515714
cmp word [eax], dx
je 0x515714
lea eax, [ebp - 0x10]
push eax
call fcn.00514f4a
pop ecx
jmp 0x515727
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x5157f2
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.00515437
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x5157f2
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x5157f2
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x5157f2
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x51577f
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.0050bad6
test ebx, ebx
je 0x5157ed
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.0050bad6
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x5157f2
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x5157f2
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.004fe96b
add esp, 0x10
xor eax, eax
inc eax
jmp 0x5157f4
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004eacf5
leave
ret
Function at 0x515ef1
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00515e6d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x516060
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x516060
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x516015
jg 0x515f4d
test eax, eax
je 0x51600b
push 1
push 0x1000
call fcn.0050ae83
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x515f70
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x516002
push 0x8000
push ebx
call fcn.00505f1d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x515f99
jg 0x515f94
cmp ecx, 0x1000
jb 0x515f99
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.005092f8
add esp, 0x10
cmp eax, 0xffffffff
je 0x515fde
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x515f94
jl 0x515fc5
test ecx, ecx
jne 0x515f86
push dword [ebp - 0xc]
push ebx
call fcn.00505f1d
push esi
call fcn.0050afaf
add esp, 0xc
xor ebx, ebx
jmp 0x51606e
cmp byte [edi + 0x24], 0
je 0x515ff5
cmp dword [edi + 0x20], 5
jne 0x515ff5
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x516000
mov ebx, dword [edi + 0x18]
jmp 0x516002
xor ebx, ebx
push esi
call fcn.0050afaf
pop ecx
jmp 0x51606e
test ecx, ecx
jg 0x515fd7
jl 0x516015
test eax, eax
jae 0x515fd7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005023f7
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x516035
cmp byte [edi + 0x1c], 0
je 0x515fd7
jmp 0x516066
push ebx
call fcn.0050c11e
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x515fd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x51606e
cmp byte [edi + 0x1c], 0
je 0x51606b
mov ebx, dword [edi + 0x18]
jmp 0x51606e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.005023f7
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x51620f
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x578134]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x516252
call fcn.004fbf65
mov dword [eax], 0xf
call fcn.004fbf78
mov dword [eax], 0xd
call fcn.004fd463
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004eacf5
leave
ret
test eax, eax
jne 0x516259
inc eax
jmp 0x516246
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x516244
xor eax, eax
cmp ecx, 1
setne al
jmp 0x516246
Function at 0x4020a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [0x4308d0]
mov dword [0x431564], 3
mov dword [0x43156c], 0
mov dword [0x431578], 0x3e8
mov dword [0x431568], 0
lea ecx, [eax + 1]
mov dword [0x431574], eax
mov dword [0x4308d0], ecx
push 0x431560
push dword [0x43157c]
call esi
push 0x64
push dword [0x431580]
call edi
cmp eax, 0x102
je 0x4020c0
push dword [0x431580]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x431564], 1
mov dword [0x43156c], 0
mov dword [0x431578], 0
mov dword [0x431568], 5
mov dword [0x431580], 0
mov dword [0x431574], 0
push 0x431560
push dword [0x43157c]
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
push 0
push 0
push 0
push 0x401fe0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x402192
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
pop edi
pop ebp
ret 4
Function at 0x4041b0
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 [0x43000c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push 0
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
push eax
call fcn.0040c661
add esp, 4
mov esi, eax
push eax
push edi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x404233
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], esi
lea ecx, [ebp - 0x14]
push eax
push ecx
push 0x42bf30
push esi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40425e
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
mov edi, 1
movzx ecx, word [eax + 0xa]
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
jmp 0x404296
mov eax, dword [0x43199c]
mov ecx, dword [0x430a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4042b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_obtain_file_info_of_old_service.____d_
jmp 0x404287
mov eax, dword [0x43199c]
mov ecx, dword [0x430a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4042f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_query_file_version_info_of_old_service.____d_
push 0x431588
call fcn.0040b8d0
add esp, 0xc
xor edi, edi
push esi
call fcn.0040c66a
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040ce4a
mov eax, edi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x43199c
call fcn.0040c696
add esp, 4
mov eax, dword [0x43199c]
cmp eax, 0xffffffff
jne 0x404250
mov dword [0x431588], 0
push 0x4021a0
call fcn.0040c8fc
add esp, 4
push 0x43199c
call fcn.0040c6e8
add esp, 4
jmp 0x404250
push 0x43199c
call fcn.0040c696
add esp, 4
mov eax, dword [0x43199c]
cmp eax, 0xffffffff
jne 0x40427b
mov dword [0x431588], 0
push 0x4021a0
call fcn.0040c8fc
add esp, 4
push 0x43199c
call fcn.0040c6e8
add esp, 4
jmp 0x40427b
Function at 0x404340
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 [0x43000c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
je 0x404402
mov esi, eax
push 0xf01ff
push str.MozillaMaintenance
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x40443c
mov edi, eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x30], esi
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4043d9
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push dword [ebp - 0x14]
call ebx
cmp dword [ebp - 0x28], 1
je 0x4043d9
mov eax, dword [ebp - 0x14]
lea esi, [esi + eax + 0xa]
cmp esi, 0xea60
ja 0x4043d9
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x4043b0
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
test eax, eax
jne 0x4043f6
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 0x404474
mov eax, dword [0x43199c]
mov ecx, dword [0x430a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40448f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service_manager.____d_
push 0x431588
call fcn.0040b8d0
add esp, 0xc
xor ebx, ebx
jmp 0x40447b
mov eax, dword [0x43199c]
mov ecx, dword [0x430a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4044d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service.____d_
push 0x431588
call fcn.0040b8d0
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.0040ce4a
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x43199c
call fcn.0040c696
add esp, 4
mov eax, dword [0x43199c]
cmp eax, 0xffffffff
jne 0x40441f
mov dword [0x431588], 0
push 0x4021a0
call fcn.0040c8fc
add esp, 4
push 0x43199c
call fcn.0040c6e8
add esp, 4
jmp 0x40441f
push 0x43199c
call fcn.0040c696
add esp, 4
mov eax, dword [0x43199c]
cmp eax, 0xffffffff
jne 0x404459
mov dword [0x431588], 0
push 0x4021a0
call fcn.0040c8fc
add esp, 4
push 0x43199c
call fcn.0040c6e8
add esp, 4
jmp 0x404459
Function at 0x4056d0
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x210
mov eax, dword [0x43000c]
xor eax, ebp
mov dword [ebp - 0xc], eax
cmp word [ecx], 0
je 0x4057c0
mov esi, ecx
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x405746
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x405746
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x405746
mov eax, dword [0x43199c]
mov ecx, dword [0x430a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4057d4
push esi
push str.Could_not_delete_service_updater_path:__ls.
push 0x431588
call fcn.0040b8d0
add esp, 0xc
lea edi, [ebp - 0x216]
push 0x20a
push 0
push edi
call fcn.0040ebd0
add esp, 0xc
push str.updater.ini
push esi
push edi
call fcn.0040bc40
add esp, 0xc
test eax, eax
je 0x4057c0
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4057c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x4057c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4057c0
mov eax, dword [0x43199c]
mov ecx, dword [0x430a44]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x405818
push edi
push str.Could_not_delete_service_updater_INI_path:__ls.
push 0x431588
call fcn.0040b8d0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0040ce4a
add esp, 0x210
pop esi
pop edi
pop ebp
ret
push 0x43199c
call fcn.0040c696
add esp, 4
mov eax, dword [0x43199c]
cmp eax, 0xffffffff
jne 0x405733
mov dword [0x431588], 0
push 0x4021a0
call fcn.0040c8fc
add esp, 4
push 0x43199c
call fcn.0040c6e8
add esp, 4
jmp 0x405733
push 0x43199c
call fcn.0040c696
add esp, 4
mov eax, dword [0x43199c]
cmp eax, 0xffffffff
jne 0x4057ad
mov dword [0x431588], 0
push 0x4021a0
call fcn.0040c8fc
add esp, 4
push 0x43199c
call fcn.0040c6e8
add esp, 4
jmp 0x4057ad
Function at 0x409360
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
mov eax, dword [0x43000c]
mov edi, ecx
mov ecx, dword [ebp + 8]
mov esi, edx
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 2
push edi
push dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
je 0x409397
xor ebx, ebx
jmp 0x4093e7
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], esi
mov esi, 0xffffffff
add eax, eax
cmovae esi, eax
push esi
call fcn.0040c661
add esp, 4
mov ebx, eax
push esi
mov esi, dword [ebp + 0xc]
push 0
push eax
call fcn.0040ebd0
add esp, 0xc
mov eax, dword [esi]
mov dword [esi], ebx
test eax, eax
jne 0x4093fb
lea eax, [ebp - 0x14]
push eax
push ebx
push 0
push 2
push edi
mov eax, dword [ebp + 8]
push dword [eax + 4]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
sete bl
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040ce4a
mov eax, ebx
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
call fcn.0040c66a
add esp, 4
mov ebx, dword [esi]
test ebx, ebx
jne 0x4093c9
jmp 0x409393