joyce8/EMBER2024-capa huggingface dataset:
Function at 0x474c90
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x208
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call fcn.0047b110
mov ebp, dword [esp + 0x220]
mov eax, dword [esp + 0x21c]
push ebp
push 0
push 0
push eax
push 0x4f8830
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov edi, eax
cmp edi, 0x20
ja 0x474d89
lea ecx, [esp + 0x10]
push ecx
push str..htm
push closesocket
mov ecx, esi
call fcn.00474da0
test eax, eax
jne 0x474d89
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
push str._shellopencommand
push edx
call ebx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
push eax
push ecx
push closesocket
mov ecx, esi
call fcn.00474da0
test eax, eax
jne 0x474d89
lea edx, [esp + 0x10]
push 0x4f880c
push edx
call fcn.004a3ed0
mov esi, eax
add esp, 8
test esi, esi
jne 0x474d5a
lea eax, [esp + 0x10]
push 0x4f8808
push eax
call fcn.004a3ed0
mov esi, eax
add esp, 8
test esi, esi
jne 0x474d5a
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xf]
jmp 0x474d5d
mov byte [esi], 0
push 0x4f7fd0
push esi
call ebx
mov edx, dword [esp + 0x21c]
push edx
push esi
call ebx
lea eax, [esp + 0x10]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8

Function at 0x474da0
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x474e02
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret 0xc
Function at 0x47b050
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4c3f48
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push edi
mov edi, ecx
mov eax, dword [edi + 0x118]
test eax, eax
jne 0x47b100
mov eax, dword [0x501210]
push esi
mov dword [esp + 8], eax
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0
call fcn.004b4649
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.004b4698
push str.winhlp32.exe
lea ecx, [esp + 0xc]
call fcn.004b45f5
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x47b0e7
push 0x6a
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
test eax, eax
je 0x47b0e7
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [edi + 0x118], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call fcn.004b4265
pop esi
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x47e200
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4c43d0
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x47e3a7
mov ecx, dword [0x501210]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ecx
mov ecx, dword [eax - 8]
mov bl, 1
test ecx, ecx
mov byte [esp + 0x28], bl
jle 0x47e2fc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push edi
push ecx
mov ecx, esi
call fcn.0047cf20
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 2
call fcn.004b4352
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], bl
call fcn.004b4265
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x4f7fd0
call fcn.004b42d3
lea edx, [esp + 0x14]
push 0x3d
push edx
lea eax, [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.0047d2e0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 3
call fcn.004b4352
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
call fcn.004b4265
lea ecx, [esp + 0xc]
call fcn.004b472d
mov ecx, dword [esp + 0xc]
push 0x4f8a0c
push ecx
call fcn.004a2d34
add esp, 8
test eax, eax
je 0x47e324
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx - 8]
cmp ecx, eax
jl 0x47e25d
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.004b4265
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.004b4265
jmp 0x47e3ab
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.0047dfa0
test eax, eax
push 0
je 0x47e38f
lea ecx, [esp + 0x34]
push 0x64
push ecx
mov ecx, esi
call fcn.0047c640
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x47e375
cmp eax, 0x64
jg 0x47e363
mov edx, dword [esp + 0x38]
push eax
push 0x64
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x47e300
push 0x64
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x47e300
cmp eax, 0x64
jge 0x47e2fc
mov ecx, dword [esp + 0x34]
push 0x64
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x47e300
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push eax
mov ecx, esi
call fcn.0047c640
mov esi, eax
jmp 0x47e300
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x47e3b5
mov eax, esi
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10
Function at 0x488580
Capabilities:
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dbc78
push 0x4a45c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
push dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
rdtsc
mov esi, eax
mov edi, edx
call ebx
rdtsc
pop ebx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], 0xffffffff
xor esi, esi
mov edi, dword [ebp - 0x20]
push 1
push esi
push esi
mov eax, dword [ebp - 0x28]
push eax
call fcn.004a2d00
sub eax, esi
sbb edx, edi
mov ecx, dword [ebp - 0x1c]
sub eax, ecx
sbb edx, esi
mov ecx, dword [ebp - 0x24]
add eax, ecx
adc edx, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x488730
Capabilities:
Check os version

Disassembly:
sub esp, 0xa0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x9c
push eax
call esi
test eax, eax
jne 0x488771
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0x94
push ecx
call esi
test eax, eax
je 0x4887de
cmp dword [esp + 0x1c], 2
jne 0x4887de
cmp dword [esp + 0x10], 5
jne 0x4887de
cmp dword [esp + 0x14], 1
jne 0x4887de
push str.kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4887c8
push str.IsWow64Process
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4887b9
lea edx, [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
jmp 0x4887c1
mov dword [esp + 8], 0
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 8]
test eax, eax
je 0x4887de
pop edi
mov eax, 1
pop esi
add esp, 0xa0
ret
pop edi
xor eax, eax
pop esi
add esp, 0xa0
ret

Function at 0x48e070
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x536984]
xor edx, edx
cmp eax, edx
jne 0x48e096
xor eax, eax
mov byte [eax + 0x536884], al
inc eax
cmp eax, 0x100
jl 0x48e07e
mov dword [0x536984], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x536884
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x48e127
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x48e0fa
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x48e0c8
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x48e1a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x48e1f3
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x48e1da
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x494b80
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4c47ce
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.004954a0
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x4dcb8c
call fcn.004b3fa6
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x494c13
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004b3fa6
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x494c0c
push 0
mov ecx, eax
call fcn.0048bcb0
mov dword [esi + 0xc], eax
jmp 0x494c15
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x494c15
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8

Function at 0x4b6670
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4b66a8
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004b46c0
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004b4698
jmp 0x4b66b4
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4b7d61
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4b7da3
call fcn.004bdb2c
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4b7da3
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4b7d9a
xor eax, eax
jmp 0x4b7dab
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004b7db1
pop edi
pop esi
pop ebx
ret 4
Function at 0x4be05c
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4be08a
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4be0a8
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004bdfc2
jmp 0x4be0a8
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4be0a8
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004bdfc2
test edi, edi
mov eax, edi
jne 0x4be092
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x401b10
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
xor edx, edx
cmp edi, 4
jle 0x401b74
lea esi, [edi - 1]
mov ecx, dword [esp + 0x10]
shr esi, 2
mov eax, esi
push ebx
neg eax
lea edi, [edi + eax*4]
mov eax, dword [esp + 0x18]
mov ebx, dword [ecx]
mov ebp, dword [eax]
xor ebx, ebp
mov ebp, dword [eax + 4]
add eax, 4
add ecx, 4
or edx, ebx
add eax, 4
mov ebx, dword [ecx]
add ecx, 4
xor ebx, ebp
mov ebp, dword [eax]
or edx, ebx
mov ebx, dword [ecx]
xor ebx, ebp
mov ebp, dword [eax + 4]
add eax, 4
add ecx, 4
or edx, ebx
add eax, 4
mov ebx, dword [ecx]
add ecx, 4
xor ebx, ebp
or edx, ebx
dec esi
jne 0x401b34
pop ebx
jmp 0x401b7c
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
test edi, edi
jle 0x401b93
mov esi, edi
mov edi, dword [ecx]
mov ebp, dword [eax]
xor edi, ebp
add eax, 4
or edx, edi
add ecx, 4
dec esi
jne 0x401b82
xor eax, eax
pop edi
test edx, edx
pop esi
pop ebp
setne al
ret
Function at 0x401000
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x28
mov al, 0x6c
mov cl, 0x6f
mov byte [esp + 7], al
mov byte [esp + 0xf], al
mov byte [esp + 0x16], al
mov byte [esp + 0x1c], al
mov byte [esp + 0x1d], al
xor eax, eax
mov byte [esp + 4], cl
mov byte [esp + 8], cl
mov byte [esp + 0xc], cl
mov byte [esp + 0x18], cl
mov dword [esp + 0x1f], eax
lea ecx, [esp + 0x14]
push esi
mov dl, 0x64
mov dword [esp + 0x27], eax
push ecx
xor esi, esi
mov byte [esp + 8], 0x55
mov byte [esp + 9], 0x52
mov byte [esp + 0xa], 0x4c
mov byte [esp + 0xb], 0x44
mov byte [esp + 0xd], 0x77
mov byte [esp + 0xe], 0x6e
mov byte [esp + 0x11], 0x61
mov byte [esp + 0x12], dl
mov byte [esp + 0x13], 0x54
mov byte [esp + 0x15], 0x46
mov byte [esp + 0x16], 0x69
mov byte [esp + 0x18], 0x65
mov byte [esp + 0x19], 0x41
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov byte [esp + 0x1c], 0x55
mov byte [esp + 0x1d], 0x72
mov byte [esp + 0x1f], 0x6d
mov byte [esp + 0x21], 0x6e
mov byte [esp + 0x22], 0x2e
mov byte [esp + 0x23], dl
mov byte [esp + 0x26], 0
mov byte [esp + 0x2f], al
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x4010ca
lea edx, [esp + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
pop esi
add esp, 0x28
ret
mov eax, esi
pop esi
add esp, 0x28
ret

Function at 0x401120
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
xor eax, eax
push ebx
push esi
mov dword [esp + 0xc], eax
push edi
mov dword [esp + 0x14], eax
mov ecx, 0x10
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x6c]
xor esi, esi
dec ecx
mov dword [esp + 0x18], eax
neg ecx
sbb ecx, ecx
lea edx, [esp + 0xc]
and ecx, 0xfffffffb
mov ebx, dword [esp + 0x64]
add ecx, 5
lea eax, [esp + 0x1c]
mov word [esp + 0x4c], cx
mov ecx, dword [esp + 0x68]
push edx
push eax
push ecx
push esi
push 0x20
push esi
push esi
push esi
push ebx
push esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x44], 0x44
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov word [esp + 0x76], si
mov dword [esp + 0x70], esi
mov dword [esp + 0x78], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov edi, eax
cmp edi, esi
jne 0x4011ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.Create_process_failed._process_name:__s_n
call fcn.00403242
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x54
ret
cmp byte [esp + 0x70], 1
jne 0x4011ce
mov edx, dword [esp + 0xc]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x54
ret
Function at 0x4011f0
Capabilities:
Move file

Disassembly:
sub esp, 0x20
push edi
mov ecx, 6
xor eax, eax
lea edi, [esp + 8]
mov dword [esp + 4], 0
lea edx, [esp + 4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2c]
push edx
stosw word es:[edi], ax
mov eax, dword [esp + 0x2c]
mov word [esp + 0x18], 0x50
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], 1
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
test eax, eax
pop edi
je 0x40124d
push str.Error:_copy_files_failed._n
call fcn.00403242
add esp, 4
xor eax, eax
add esp, 0x20
ret
mov eax, 1
add esp, 0x20
ret

Function at 0x4012d0
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
push ebx
push 0x104
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40134f
mov cl, byte [eax + ebx - 1]
push edi
cmp cl, 0x5c
je 0x40131c
mov edi, 0x409114
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.mcupdatepackage.exe
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
ret
mov eax, esi
pop esi
pop ebx
ret
Function at 0x401720
Capabilities:
Check mutex on windows

Disassembly:
push esi
push str.CleanMacroApp
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x401765
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
push esi
jne 0x401758
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
ret
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
ret

Function at 0x4017c0
Capabilities:
Check if file exists
Get file version info

Disassembly:
sub esp, 0x214
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x40bc40
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.CleanMacro.exe
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 + 0x20]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401915
lea ecx, [esp + 0x20]
push ebp
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
jle 0x401915
push esi
call fcn.00403393
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x401915
push ebx
push esi
lea edx, [esp + 0x28]
push ebp
push edx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x40190c
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push ecx
push str.VarFileInfoTranslation
push ebx
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [esp + 0x10]
xor edx, edx
xor ecx, ecx
mov dx, word [eax + 2]
mov cx, word [eax]
push edx
push ecx
push str.StringFileInfo_04x_04xFileVersion
lea edx, [esp + 0x130]
push 0x100
push edx
call fcn.00403342
add esp, 0x14
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x124]
push eax
push ecx
push edx
push ebx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x40190c
mov edi, dword [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
mov ebp, 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x228]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call fcn.00403337
add esp, 4
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x214
ret
Function at 0x401a10
Capabilities:
Check if file exists
Delete file
Read .ini file

Disassembly:
sub esp, 0x12c
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], bl
mov byte [esp + 0x10], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x11]
lea edx, [esp + 0x38]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x40bc40
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.tmpupd.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x38]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
call edi
cmp eax, 1
jne 0x401ab5
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x38]
push edx
push str.http:__www.starwoodd.net_MacroClean_update.txt
call fcn.004010e0
add esp, 8
test eax, eax
je 0x401b90
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x14]
push 0x28
push ecx
push 0x40bd4c
push 0x4091c4
push str.info
call esi
test eax, eax
je 0x401b90
mov eax, dword [esp + 0x148]
mov ecx, dword [esp + 0x144]
lea edx, [esp + 0x38]
push edx
push eax
push ecx
push 0x40bd4c
push 0x4091b8
push str.info
call esi
test eax, eax
je 0x401b90
mov eax, dword [esp + 0x150]
mov ecx, dword [esp + 0x14c]
lea edx, [esp + 0x38]
push edx
push eax
push ecx
push 0x40bd4c
push str.UpUrl
push str.info
call esi
test eax, eax
je 0x401b90
cmp byte [esp + 0x10], bl
je 0x401b90
mov edx, dword [esp + 0x140]
lea eax, [esp + 0x10]
push edx
push eax
call fcn.00401930
add esp, 8
lea ecx, [esp + 0x38]
push ecx
call edi
cmp eax, 1
jne 0x401b80
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x12c
ret
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x12c
ret

Function at 0x401ba0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x14
xor ecx, ecx
xor eax, eax
mov dword [esp + 9], ecx
mov byte [esp + 8], al
mov dword [esp + 0xd], ecx
mov dword [esp + 4], eax
lea edx, [esp]
push esi
mov byte [esp + 0x15], cl
lea eax, [esp + 0xc]
push edx
lea ecx, [esp + 0xc]
push eax
push ecx
push str.AutoUpdateFlag
push str.SoftwareVB_and_VBA_Program_SettingsCleanMacrooption
push 0x80000001
xor esi, esi
mov dword [esp + 0x1c], 0xa
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
test eax, eax
jne 0x401c10
cmp dword [esp + 4], 3
ja 0x401c10
lea edx, [esp + 0xc]
push 0x4091d4
push edx
call fcn.00407d00
add esp, 8
test eax, eax
mov eax, 1
je 0x401c12
mov eax, esi
pop esi
add esp, 0x14
ret