joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401c80
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x401cbf
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x401cbf
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401cbf
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x401cbf
cmp dword [ecx + 0x74], 0xe
jbe 0x401cbf
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x42c0e0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1b000]
push edi
or ebp, 0xffffffff
jmp 0x42c102
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x42c109
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x42c0f8
mov eax, 1
add ebx, ebx
jne 0x42c11b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x42c110
jne 0x42c12c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x42c110
xor ecx, ecx
sub eax, 3
jb 0x42c140
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x42c1b2
mov ebp, eax
add ebx, ebx
jne 0x42c14b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x42c158
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x42c17c
inc ecx
add ebx, ebx
jne 0x42c168
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x42c15d
jne 0x42c179
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x42c15d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x42c19c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x42c18d
jmp 0x42c0fe
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x42c19c
add edi, ecx
jmp 0x42c0fe
pop esi
mov edi, esi
mov ecx, 0xa95
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x42c1ba
cmp byte [edi], 0xa
jne 0x42c1ba
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x42c1bf
lea edi, [esi + 0x2a000]
mov eax, dword [edi]
or eax, eax
je 0x42c22e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x2c000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x2c0c8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x42c1ec
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x2c0cc]
or eax, eax
je 0x42c228
mov dword [ebx], eax
add ebx, 4
jmp 0x42c209
call dword [esi + 0x2c0d4]
mov ebp, dword [esi + 0x2c0d0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x207]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x42c262
sub esp, 0xffffff80
jmp 0x40e266
Function at 0x4dfa80
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x9f000]
push edi
jmp 0x4dfa9a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4dfaa1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4dfa90
mov eax, 1
add ebx, ebx
jne 0x4dfab3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4dfac4
jne 0x4dfae3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4dfae3
dec eax
add ebx, ebx
jne 0x4dfad0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x4dfaa8
add ebx, ebx
jne 0x4dfadf
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x4dfb35
xor ecx, ecx
sub eax, 3
jb 0x4dfafb
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x4dfb6a
sar eax, 1
mov ebp, eax
jmp 0x4dfb06
add ebx, ebx
jne 0x4dfb06
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4dfad4
inc ecx
add ebx, ebx
jne 0x4dfb14
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4dfad4
add ebx, ebx
jne 0x4dfb21
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4dfb16
jne 0x4dfb32
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4dfb16
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4dfb54
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4dfb46
jmp 0x4dfa96
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4dfb54
add edi, ecx
jmp 0x4dfa96
pop esi
mov edi, esi
mov ecx, 0x41bd
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x4dfb72
cmp byte [edi], 0x13
jne 0x4dfb72
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x4dfb77
lea edi, [esi + 0xdc000]
mov eax, dword [edi]
or eax, eax
je 0x4dfbef
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xf0bec]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xf0cdc]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4dfba4
mov ecx, edi
jns 0x4dfbd3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xf0ce0]
or eax, eax
je 0x4dfbe9
mov dword [ebx], eax
add ebx, 4
jmp 0x4dfbc1
call dword [esi + 0xf0cf0]
mov ebp, dword [esi + 0xf0ce4]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x237]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x4dfc23
sub esp, 0xffffff80
jmp 0x4520fa
Function at 0x4ed2cd
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004ed143
Function at 0x402770
Capabilities:
Check if file exists
Delete file
Get file attributes
Get file size

Disassembly:
sub esp, 0x4c
mov eax, dword [0x4e7744]
xor eax, esp
mov dword [esp + 0x48], eax
cmp byte [esp + 0x54], 1
push esi
mov esi, dword [esp + 0x54]
push edi
je 0x402821
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x402799
mov eax, dword [esi]
push 0
push 0x42200000
push 3
push 0
push 7
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x402821
push 0x40
lea eax, [esp + 0x14]
push 0
push eax
call fcn.004ac5e0
add esp, 0xc
lea eax, [esp + 0x10]
push 0
push 0x40
push eax
push 1
push edi
call sub.cldapi.dll_CfGetPlaceholderInfo
test eax, eax
js 0x40281a
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
lea eax, [esp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40281a
mov edx, dword [esp + 8]
mov eax, edx
mov ecx, dword [esp + 0xc]
or eax, ecx
je 0x402836
cmp dword [esp + 0x10], edx
jne 0x402836
cmp dword [esp + 0x14], ecx
jne 0x402836
push 0
push 0
push edi
call sub.cldapi.dll_CfRevertPlaceholder
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov al, 1
pop esi
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004aa4f4
add esp, 0x4c
ret 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x402847
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402821
test eax, 0x1000
je 0x402821
cmp dword [esi + 0x14], 8
jb 0x402862
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x50]
mov al, 1
pop edi
pop esi
xor ecx, esp
call fcn.004aa4f4
add esp, 0x4c
ret 8
Function at 0x403060
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c7cb5
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x4e7744]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x28]
push 2
xor eax, eax
mov dword [ebp - 0x28], 0
push 0x4ca750
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.00409f70
cmp dword [edi + 0x14], 8
mov eax, edi
mov dword [ebp - 4], 0
jb 0x4030cc
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403209
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov ebx, edi
cmovae eax, dword [ebp - 0x28]
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x144], eax
jb 0x4030f7
mov ebx, dword [edi]
cmp dword [ebp - 0x18], 0
mov esi, dword [edi + 0x10]
je 0x4031d7
test esi, esi
je 0x4031d7
push 0x100
lea eax, [ebp - 0x140]
push 0
push eax
call fcn.004ac5e0
mov ecx, dword [ebp - 0x144]
add esp, 0xc
mov eax, dword [ebp - 0x18]
dec esi
lea eax, [ecx + eax*2]
push eax
push ecx
lea ecx, [ebp - 0x140]
call fcn.00409990
test al, al
jne 0x40317b
or eax, 0xffffffff
cmp esi, eax
cmovb eax, esi
lea ecx, [ebx + eax*2]
jmp 0x403150
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x144]
test edx, edx
je 0x40316d
movzx esi, word [ecx]
cmp word [eax], si
je 0x4031ab
add eax, 2
sub edx, 1
jne 0x403160
cmp ecx, ebx
je 0x403176
sub ecx, 2
jmp 0x403150
or ecx, 0xffffffff
jmp 0x4031af
or eax, 0xffffffff
mov edx, 0x100
cmp esi, eax
cmovb eax, esi
lea ecx, [ebx + eax*2]
jmp 0x403190
movzx eax, word [ecx]
cmp ax, dx
jae 0x4031a2
cmp byte [ebp + eax - 0x140], 0
jne 0x4031ab
cmp ecx, ebx
je 0x4031d7
sub ecx, 2
jmp 0x403190
sub ecx, ebx
sar ecx, 1
cmp ecx, 0xffffffff
je 0x4031d7
push ecx
push 0
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
call fcn.0040abd0
push eax
mov byte [ebp - 4], 1
call fcn.00403060
add esp, 4
lea ecx, [ebp - 0x40]
call fcn.004022d0
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4031e1
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x403216
cmp dword [edi + 0x14], 8
jb 0x4031f6
mov edi, dword [edi]
push edi
push str.Failed_to_create_directory_recursively__s
call fcn.0040b3d0
add esp, 8
or esi, 0xffffffff
jmp 0x403218
push str.The_directory_to_be_created_already_exist_n
call fcn.0040b3d0
add esp, 4
xor esi, esi
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40324e
mov edx, dword [ebp - 0x28]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403244
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40326c
push ecx
push edx
call fcn.004aa4d8
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004aa4f4
mov esp, ebp
pop ebp
ret
call fcn.004aeecf
int3
Function at 0x403f90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c7ea0
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x4e7744]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0x218]
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push eax
push 0
push dword [0x4e85f0]
push dword [ebp + 8]
push 0
call esi
test eax, eax
jne 0x40409e
lea eax, [ebp - 0x420]
push eax
push 0
push dword [0x4e85f0]
push dword [ebp + 0xc]
push 0
call esi
test eax, eax
jne 0x40409e
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
jmp 0x404010
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404010
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004aef20
add esp, 0xc
test eax, eax
jne 0x40409e
lea esi, [ebp - 0x218]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x404043
sub esi, ecx
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x450]
sar esi, 1
call fcn.00401ac0
push 0xffffffffffffffff
push esi
lea ecx, [ebp - 0x438]
mov dword [ebp - 4], 0
push ecx
mov ecx, eax
call fcn.0040abd0
push eax
mov ecx, edi
call fcn.00402660
lea ecx, [ebp - 0x438]
call fcn.004022d0
lea ecx, [ebp - 0x450]
call fcn.004022d0
mov al, 1
jmp 0x4040a0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004aa4f4
mov esp, ebp
pop ebp
ret
Function at 0x404320
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov eax, 0x200c
call fcn.004aa510
mov eax, dword [0x4e7744]
xor eax, esp
mov dword [esp + 0x2008], eax
push ebp
mov ebp, dword [esp + 0x2018]
push esi
mov esi, dword [esp + 0x2018]
mov eax, esi
push edi
or edi, 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0x1000
cmp dword [esi + 0x14], 8
jb 0x404366
mov eax, dword [esi]
lea ecx, [esp + 0xc]
push ecx
push 0x20119
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x404394
push str.Failed_to_open_reg_key_n
call fcn.0040b3d0
add esp, 4
jmp 0x404434
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push 0
push 0
push str.ProfileImagePath
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4043ce
cmp dword [esi + 0x14], 8
jb 0x4043bd
mov esi, dword [esi]
push eax
push esi
push str.Failed_to_get_value_for_sub_key__s__res:__d_n
call fcn.0040b3d0
add esp, 0xc
jmp 0x404434
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [esp + 0x14]
push ebx
push 0
push 0
push eax
call edi
xor ecx, ecx
mov esi, eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004aa4e6
add esp, 4
mov ebx, eax
lea eax, [esp + 0x18]
push esi
push ebx
push eax
call edi
mov edx, ebx
lea ecx, [edx + 2]
jmp 0x404410
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x404410
sub edx, ecx
mov ecx, ebp
sar edx, 1
push edx
push ebx
call fcn.00409f70
push ebx
call fcn.004aa4ef
add esp, 4
xor edi, edi
pop ebx
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x404443
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2014]
mov eax, edi
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004aa4f4
add esp, 0x200c
ret
Function at 0x404da0
Capabilities:
Check os version

Disassembly:
sub esp, 0x134
mov eax, dword [0x4e7744]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push ebp
mov ebp, dword [esp + 0x144]
lea eax, [esp + 0x28]
push esi
mov esi, dword [esp + 0x144]
push 0x110
push 0
push eax
call fcn.004ac5e0
add esp, 0xc
mov dword [esp + 0x28], 0x114
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x2c], 5
mov edx, str.AppDataLocal
mov eax, str.Local_SettingsApplication_Data
cmovbe edx, eax
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404e03
sub ecx, ebx
mov eax, 0x7ffffffe
sub eax, dword [esi + 0x10]
sar ecx, 1
cmp eax, ecx
jb 0x404e98
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x404e28
mov eax, dword [esi]
push ecx
push edx
push dword [esi + 0x10]
lea ecx, [esp + 0x1c]
push eax
push esi
push dword [esp + 0x20]
call fcn.00401b00
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.00402660
mov edx, dword [esp + 0x24]
cmp edx, 8
jb 0x404e80
mov ecx, dword [esp + 0x10]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404e76
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e9d
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov ecx, dword [esp + 0x13c]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004aa4f4
add esp, 0x134
ret
call fcn.00409af0
call fcn.004aeecf
int3
Function at 0x404eb0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c7fcd
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x4e7744]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push 0
mov ebx, dword [ebp + 8]
push 0
push 0
push 0
push 0
push 0
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x404f1f
push str.Failed_to_query_registry_info_n
call fcn.0040b3d0
jmp 0x405009
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
inc eax
mov edx, 2
mov dword [ebp - 0x2c], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004aa4e6
mov edi, eax
add esp, 4
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x405003
xor esi, esi
test eax, eax
je 0x405003
mov eax, dword [ebp - 0x2c]
push 0
push 0
push 0
push 0
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push eax
push edi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x404ff9
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], eax
mov word [ebp - 0x28], ax
mov eax, edi
mov dword [ebp - 0x14], 7
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404f90
sub eax, edx
lea ecx, [ebp - 0x28]
sar eax, 1
push eax
push edi
call fcn.00409f70
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 4], 0
call fcn.0040a930
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x404ff9
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404fef
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405028
push edx
push ecx
call fcn.004aa4d8
add esp, 8
inc esi
cmp esi, dword [ebp - 0x30]
jb 0x404f56
push edi
call fcn.004aa4ef
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004aa4f4
mov esp, ebp
pop ebp
ret
call fcn.004aeecf
int3
Function at 0x405f80
Capabilities:
Delete directory
Get common file path
Get startup folder

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x4c8115
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x4e7744]
xor eax, ebp
mov dword [ebp + 0x250], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
mov dword [ebp - 4], eax
lea eax, [ebp + 0x48]
push eax
push 0
push dword [0x4e85f0]
push 0x17
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x406091
lea ecx, [ebp + 0x48]
mov dword [ebp + 0x30], eax
mov dword [ebp + 0x40], eax
lea edx, [ecx + 2]
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406007
sub ecx, edx
lea eax, [ebp + 0x48]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp + 0x30]
call fcn.00409f70
push str.Synology
lea eax, [ebp + 0x30]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp]
push eax
call fcn.00401400
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x406044
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [ebp]
call fcn.004022d0
mov edx, dword [ebp + 0x44]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x406091
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406087
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406147
push edx
push ecx
call fcn.004aa4d8
add esp, 8
lea eax, [ebp + 0x18]
push eax
call fcn.00403c30
add esp, 4
test eax, eax
js 0x4060f1
mov ecx, dword [ebp + 0x28]
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 9
jb 0x40614c
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
push 9
cmovae eax, dword [ebp + 0x18]
push str.Synology
push ecx
push eax
lea eax, [ebp + 0x18]
push eax
push dword [ebp - 0x10]
lea ecx, [ebp + 0x30]
call fcn.00401b00
cmp dword [ebp + 0x44], 8
lea eax, [ebp + 0x30]
cmovae eax, dword [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [ebp + 0x30]
call fcn.004022d0
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x406127
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40611d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406151
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp + 0x250]
xor ecx, ebp
call fcn.004aa4f4
lea esp, [ebp + 0x254]
pop ebp
ret
call fcn.004aeecf
call fcn.00409af0
call fcn.004aeecf
int3
Function at 0x407330
Capabilities:
Delete registry key

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x40733f
mov eax, dword [esi]
lea ecx, [esp + 8]
push ecx
push 0xf013f
push 0
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x407377
cmp dword [esi + 0x14], 8
jb 0x407363
mov esi, dword [esi]
push eax
push esi
push str.Failed_to_open_reg_key_for_CLSID:___s___reason:__d_n
call fcn.0040b3d0
add esp, 0xc
or eax, 0xffffffff
pop esi
ret
push edi
mov edi, dword [esp + 0x10]
mov edi, dword [edi]
mov esi, dword [edi]
cmp esi, edi
je 0x4073cd
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteTreeA]
lea esp, [esp]
cmp dword [esi + 0x18], 0
lea ebx, [esi + 8]
je 0x4073c5
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x4073a3
mov eax, dword [ebx]
push eax
push dword [esp + 0x18]
call ebp
test eax, eax
je 0x4073c5
cmp dword [ebx + 0x14], 0x10
jb 0x4073b6
mov ebx, dword [ebx]
push eax
push ebx
push str.Failed_to_RegDeleteTree___s___res___d_n
call fcn.0040ace0
add esp, 0xc
mov esi, dword [esi]
cmp esi, edi
jne 0x407390
pop ebp
pop ebx
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
xor eax, eax
pop esi
ret
Function at 0x408db0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
cmp dword [eax + 0x14], 8
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp], 0x3c
mov dword [esp + 4], 0x40
mov dword [esp + 8], 0
mov dword [esp + 0xc], str.open
mov dword [esp + 0x10], str.MsiExec.exe
jb 0x408e16
mov eax, dword [eax]
mov dword [esp + 0x14], eax
lea eax, [esp]
push eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
push 0xffffffffffffffff
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x408e6c
push dword [esp + 0x40]
push str.Return_value_of_MsiExec.exe:__d_n
call fcn.0040b3d0
add esp, 8
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x40]
add esp, 0x3c
ret