joyce8/EMBER2024-capa huggingface dataset:
Function at 0x415f54
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1014
call fcn.0041c2d0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00415b9e
mov dword [ebp - 0x1010], eax
cmp dword [ebp - 0x1010], 0
jne 0x415f82
xor eax, eax
jmp 0x4160b7
mov eax, dword [ebp + 0x18]
mov dword [eax], 0x3ff
push dword [ebp + 0x18]
lea eax, [ebp - 0x800]
push eax
push dword [ebp + 0x14]
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x1010]
call dword [0x421040]
mov dword [ebp - 0x100c], eax
cmp dword [ebp - 0x100c], 0
je 0x415fcb
push dword [ebp - 0x1010]
call dword [0x421004]
xor eax, eax
jmp 0x4160b7
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
jle 0x41604c
cmp dword [ebp - 0x1014], 2
jle 0x415ffc
cmp dword [ebp - 0x1014], 3
jle 0x41604c
cmp dword [ebp - 0x1014], 5
jle 0x416011
jmp 0x41604c
lea eax, [ebp - 0x800]
push eax
push dword [ebp + 0x1c]
call dword [0x42116c]
jmp 0x416095
lea eax, [ebp - 0x800]
mov dword [ebp - 0x1008], eax
mov eax, dword [ebp - 0x1008]
push dword [eax]
push 0x423ed4
lea eax, [ebp - 0x1000]
push eax
call dword [0x4212a4]
add esp, 0xc
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 0x1c]
call dword [0x42116c]
jmp 0x416095
and dword [ebp - 0x1004], 0
jmp 0x416062
mov eax, dword [ebp - 0x1004]
inc eax
mov dword [ebp - 0x1004], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x1004]
cmp ecx, dword [eax]
jge 0x416089
mov eax, dword [ebp + 0x1c]
add eax, dword [ebp - 0x1004]
mov ecx, dword [ebp - 0x1004]
mov cl, byte [ebp + ecx - 0x800]
mov byte [eax], cl
jmp 0x416055
mov eax, dword [ebp + 0x1c]
add eax, dword [ebp - 0x1004]
and byte [eax], 0
push dword [ebp - 0x1010]
call dword [0x421004]
mov dword [ebp - 0x100c], eax
cmp dword [ebp - 0x100c], 0
je 0x4160b4
xor eax, eax
jmp 0x4160b7
push 1
pop eax
leave
ret 0x18
Function at 0x4162ed
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
and dword [ebp - 0x14], 0
and byte [ebp - 0x10], 0
and byte [ebp - 0xf], 0
and byte [ebp - 0xe], 0
and byte [ebp - 0xd], 0
and byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 5
cmp dword [0x427030], 0
je 0x416320
push 1
pop eax
jmp 0x416451
lea eax, [ebp - 8]
push eax
push 0
push 8
call dword [0x421118]
push eax
call dword [0x421054]
test eax, eax
jne 0x41636d
call dword [0x421114]
cmp eax, 0x3f0
jne 0x416366
lea eax, [ebp - 8]
push eax
push 8
call dword [0x4210d4]
push eax
call dword [0x421014]
test eax, eax
jne 0x416364
xor eax, eax
jmp 0x416451
jmp 0x41636d
xor eax, eax
jmp 0x416451
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 2
push dword [ebp - 8]
call dword [0x421050]
test eax, eax
je 0x41638b
xor eax, eax
jmp 0x416451
call dword [0x421114]
cmp eax, 0x7a
je 0x41639d
xor eax, eax
jmp 0x416451
mov eax, dword [ebp - 0x1c]
add eax, 3
and al, 0xfc
call fcn.0041c2d0
mov dword [ebp - 0x24], esp
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4163c0
xor eax, eax
jmp 0x416451
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push 2
push dword [ebp - 8]
call dword [0x421050]
test eax, eax
jne 0x4163dd
xor eax, eax
jmp 0x416451
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
call dword [section..rdata]
test eax, eax
jne 0x416408
xor eax, eax
jmp 0x416451
and dword [ebp - 4], 0
and dword [ebp - 0x20], 0
jmp 0x416419
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [eax]
jae 0x416445
push dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
push dword [ecx + eax*8 + 4]
call dword [0x42104c]
test eax, eax
je 0x416443
mov dword [ebp - 4], 1
jmp 0x416445
jmp 0x416412
push dword [ebp - 0x18]
call dword [0x421020]
mov eax, dword [ebp - 4]
lea esp, [ebp - 0x24]
leave
ret

Function at 0x41b6d0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ecx
mov al, byte [esp + 8]
mov cl, 1
test al, al
mov byte [esp], cl
je 0x41b6ee
mov dl, al
and dl, 1
xor cl, dl
shr al, 1
jne 0x41b6df
mov byte [esp], cl
mov eax, dword [esp]
and eax, 0xff
pop ecx
ret 4
Function at 0x49df10
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x66000]
push edi
jmp 0x49df2a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x49df31
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49df20
mov eax, 1
add ebx, ebx
jne 0x49df43
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x49df54
jne 0x49df73
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49df73
dec eax
add ebx, ebx
jne 0x49df60
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x49df38
add ebx, ebx
jne 0x49df6f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x49dfc5
xor ecx, ecx
sub eax, 3
jb 0x49df8b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x49dffa
sar eax, 1
mov ebp, eax
jmp 0x49df96
add ebx, ebx
jne 0x49df96
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49df64
inc ecx
add ebx, ebx
jne 0x49dfa4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49df64
add ebx, ebx
jne 0x49dfb1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x49dfa6
jne 0x49dfc2
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x49dfa6
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x49dfe4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x49dfd6
jmp 0x49df26
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x49dfe4
add edi, ecx
jmp 0x49df26
pop esi
mov edi, esi
mov ecx, 0x2c6d
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x49e002
cmp byte [edi], 0x11
jne 0x49e002
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 0x49e007
lea edi, [esi + 0x9a000]
mov eax, dword [edi]
or eax, eax
je 0x49e07f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xb6030]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xb6148]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x49e034
mov ecx, edi
jns 0x49e063
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 + 0xb614c]
or eax, eax
je 0x49e079
mov dword [ebx], eax
add ebx, 4
jmp 0x49e051
call dword [esi + 0xb615c]
mov ebp, dword [esi + 0xb6150]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x217]
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 0x49e0b3
sub esp, 0xffffff80
jmp 0x454bde
Function at 0x408ffc
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41003c]
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.0040583e
and dword [ebp - 0x14], 0
cmp dword [0x411ca8], 0
mov dword [ebp - 0x18], eax
jne 0x4090af
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x409157
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x409157
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x411ca8], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x411cac], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x411cb0], eax
call edi
push eax
call esi
mov dword [0x411cb8], eax
test eax, eax
je 0x4090af
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x411cb4], eax
mov eax, dword [0x411cb4]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x409108
cmp dword [0x411cb8], ecx
je 0x409108
push eax
call esi
push dword [0x411cb8]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x409108
test ebx, ebx
je 0x409108
call edi
test eax, eax
je 0x4090ff
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4090ff
test byte [ebp - 8], 1
jne 0x409108
or dword [ebp + 0x10], 0x200000
jmp 0x40913b
mov eax, dword [0x411cac]
cmp eax, dword [ebp - 0x18]
je 0x40913b
push eax
call esi
test eax, eax
je 0x40913b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40913b
mov eax, dword [0x411cb0]
cmp eax, dword [ebp - 0x18]
je 0x40913b
push eax
call esi
test eax, eax
je 0x40913b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x411ca8]
call esi
test eax, eax
je 0x409157
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x409159
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402b34
leave
ret

Function at 0x430000
Capabilities:
Encode data using xor

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
mov ecx, 0x6b7f4b39
nop
nop
nop
nop
test eax, eax
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x430024
mov eax, section..data
nop
nop
mov ebx, 0x42e1d0
nop
mov ecx, 0x122b2c4e
nop
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
xor dword [eax], ecx
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x401180
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
push edi
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x44]
lea edx, [esp + 4]
push edx
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0x40
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x40512c
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], 0x40549c
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
xor eax, eax
pop edi
add esp, 0x3c
ret

Function at 0x4011e0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
push edi
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x44]
lea edx, [esp + 4]
push edx
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0x40
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x40512c
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], 0x405134
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov eax, dword [esp + 0x3c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
pop edi
add esp, 0x3c
ret

Function at 0x401250
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
push eax
xor esi, esi
push ecx
push ebx
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x4012ef
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
test ebp, ebp
je 0x4012ef
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [esp + 0x24]
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push edx
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4012d1
lea eax, [esp + 0x1c]
push 0
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x28]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov edi, 1
jne 0x4012d5
mov edi, dword [esp + 0x10]
test esi, esi
je 0x4012e0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x401300
Capabilities:
Create shortcut via ishelllink

Disassembly:
sub esp, 0x210
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp]
push eax
push 0x404194
push 1
push 0
push 0x4041a4
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x401334
xor eax, eax
add esp, 0x210
ret
mov eax, dword [esp]
mov edx, dword [esp + 0x214]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov eax, dword [esp]
mov edx, dword [esp + 0x21c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [esp]
lea edx, [esp + 4]
push edx
push 0x4041b4
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jge 0x401378
xor eax, eax
add esp, 0x210
ret
mov ecx, dword [esp + 0x218]
lea eax, [esp + 8]
push 0x104
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
push 2
push ecx
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
mov eax, dword [esp + 4]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, 1
add esp, 0x210
ret

Function at 0x4013d0
Capabilities:
Create directory
Get common file path

Disassembly:
sub esp, 0x20c
mov dl, byte [0x40549c]
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10d]
mov byte [esp + 0x10c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
push 0x17
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40150c
mov eax, dword [esp + 4]
test eax, eax
je 0x40150c
lea ecx, [esp + 0x10c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x40150c
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x114]
push 0x405164
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x114]
lea ecx, [esp + 0x10]
push eax
push ecx
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edx, [esp + 0x10]
push 0
push edx
call ebx
lea eax, [esp + 0x114]
push 0x405154
push eax
call esi
lea ecx, [esp + 0x114]
lea edx, [esp + 0x10]
push ecx
push edx
call edi
lea eax, [esp + 0x10]
push 0
push eax
call ebx
lea ecx, [esp + 0x10]
push 0x405144
push ecx
call esi
mov eax, dword [esp + 0x21c]
lea edx, [esp + 0x10]
push 0x40549c
push edx
push eax
call fcn.00401300
add esp, 0xc
lea ecx, [esp + 0x114]
lea edx, [esp + 0x10]
push ecx
push edx
call edi
lea eax, [esp + 0x10]
push 0x405138
push eax
call esi
mov edx, dword [esp + 0x220]
lea ecx, [esp + 0x10]
push 0x40549c
push ecx
push edx
call fcn.00401300
add esp, 0xc
pop esi
pop ebx
pop edi
add esp, 0x20c
ret
Function at 0x401520
Capabilities:
Delete file
Move file

Disassembly:
sub esp, 0x208
push ebx
push ebp
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x111]
mov byte [esp + 0x110], bl
rep stosd dword es:[edi], eax
mov ebp, dword [esp + 0x218]
stosw word es:[edi], ax
push ebp
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, ebx
jne 0x401634
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [esp + 0x118]
push 0x40517c
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x120]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x1c]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x1c]
mov edi, ecx
sub eax, 4
mov ecx, edx
lea esi, [esp + 0x120]
add edi, eax
xor eax, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..30BK
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebp
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 0x14
mov dword [0x405494], 1
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x401640
Capabilities:
Delete registry key
Delete registry value
Persist via run registry key

Disassembly:
sub esp, 0x104
mov al, byte [0x40549c]
push ebx
push ebp
push edi
mov byte [esp + 0x10], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0xc]
xor ebp, ebp
push ecx
stosw word es:[edi], ax
push 0xf003f
push ebp
push 0x4051a4
push 0x80000002
stosb byte es:[edi], al
call ebx
test eax, eax
jne 0x40170b
mov edi, 0x40519c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
lea edx, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x10]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
pop esi
jne 0x40170b
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4016d6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], ebp
lea eax, [esp + 0xc]
push eax
push 0xf003f
push 0
push 0x405180
push 0x80000002
call ebx
test eax, eax
jne 0x40170b
mov ecx, dword [esp + 0xc]
push 0x40549c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x40170b
mov ebp, 1
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40171a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebp
pop edi
pop ebp
pop ebx
add esp, 0x104
ret
Function at 0x401730
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
sub esp, 0x10
push ebp
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 8]
push edi
xor edi, edi
push eax
push 0xf003f
push edi
push 0x4051a4
push 0x80000002
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], edi
call esi
test eax, eax
jne 0x401888
mov edx, dword [esp + 0x20]
or ecx, 0xffffffff
mov edi, edx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x10]
push edx
push 1
push eax
push 0x40519c
push ecx
call ebp
test eax, eax
jne 0x401884
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4017ac
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], 0
lea edx, [esp + 0xc]
push edx
push 0xf003f
push 0
push str.SOFTWAREWESTONE
push 0x80000002
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4017fc
lea eax, [esp + 0x14]
lea ecx, [esp + 0xc]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0x40549c
push 0
push str.SOFTWAREWESTONE
push 0x80000002
call edi
test eax, eax
jne 0x401884
mov eax, dword [esp + 0xc]
test eax, eax
je 0x401813
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], 0
lea edx, [esp + 0xc]
push edx
push 0xf003f
push 0
push 0x405180
push 0x80000002
call esi
test eax, eax
je 0x401859
lea eax, [esp + 0x14]
lea ecx, [esp + 0xc]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0x40549c
push 0
push 0x405180
push 0x80000002
call edi
test eax, eax
jne 0x401884
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x18]
push 4
push edx
push 4
push 0
push str.VERSION
push eax
mov dword [esp + 0x30], 0x1b
call ebp
test eax, eax
jne 0x401884
mov dword [esp + 0x10], 1
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x401897
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x4018a0
call fcn.00401640
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x10
ret
Function at 0x402520
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
push edi
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x44]
lea edx, [esp + 4]
push edx
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0x40
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x40512c
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], 0x40526c
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
xor eax, eax
pop edi
add esp, 0x3c
ret
Function at 0x4045b8
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00407160
test esi, esi
jne 0x4045f0
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.0040729c
jmp 0x40460e
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040449c
mov edi, eax
test esi, esi
je 0x40460e
cmp dword [ebx], 0
je 0x40460e
dec esi
jmp 0x4045f7
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x404640
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x5f8008], 0x8088405
inc edx
mov dword [ebx + 0x5f8008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x4060a4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x603054], 0
je 0x406105
cmp word [0x603330], 0xd7b2
jne 0x4060cd
cmp dword [0x603338], 0
jbe 0x4060cd
mov eax, 0x60332c
call dword [0x603348]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x406130
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x5f8030], 0
jne 0x406121
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x406290
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x5f8034], 0
je 0x4062b6
mov edx, esi
mov eax, ebx
call dword [0x5f8034]
jmp 0x4062c5
mov eax, 8
call fcn.004041e4
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x603055], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x406258
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc