joyce8/EMBER2024-capa huggingface dataset:
Function at 0x554410
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Find taskbar
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffa4
mov ebx, eax
mov eax, ebx
xor ecx, ecx
mov edx, 0x10
call fcn.00403764
lea eax, [esp + 0x24]
push eax
call sub.KERNEL32.DLL_GetSystemInfo
call sub.USER32.DLL_GetDesktopWindow
test eax, eax
je 0x55460d
push 0
push 0x554618
push 0
push eax
call sub.USER32.DLL_FindWindowExA
test eax, eax
je 0x55460d
push 0
push 0x554628
push 0
push eax
call sub.USER32.DLL_FindWindowExA
test eax, eax
je 0x55460d
push 0
push 0x554638
push 0
push eax
call sub.USER32.DLL_FindWindowExA
test eax, eax
je 0x55460d
push 0
push 0x554648
push 0
push eax
call sub.USER32.DLL_FindWindowExA
mov ebp, eax
test ebp, ebp
je 0x55460d
push 0
push 0
push 0x418
push ebp
call sub.USER32.DLL_SendMessageA
mov dword [esp + 4], eax
cmp dword [esp + 4], 0
jle 0x55460d
xor eax, eax
mov dword [esp + 8], eax
lea eax, [esp + 8]
push eax
push ebp
call sub.USER32.DLL_GetWindowThreadProcessId
cmp dword [esp + 8], 0
je 0x55460d
mov eax, dword [esp + 8]
push eax
push 0
push 0x1f0fff
call sub.KERNEL32.DLL_OpenProcess
mov esi, eax
test esi, esi
je 0x55460d
push 0x40
push 0x1000
push 0x1000
push 0
push esi
call sub.KERNEL32.DLL_VirtualAllocEx
mov dword [esp + 0xc], eax
cmp dword [esp + 0xc], 0
je 0x55460d
or edi, 0xffffffff
cmp edi, dword [esp + 4]
jge 0x5545f5
inc edi
mov eax, dword [esp + 0xc]
push eax
push edi
push 0x417
push ebp
call sub.USER32.DLL_SendMessageA
test eax, eax
je 0x5545eb
lea eax, [esp + 0x10]
push eax
push 0x18
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x18]
push eax
push esi
call sub.KERNEL32.DLL_ReadProcessMemory
test eax, eax
je 0x5545eb
test byte [esp + 0x51], 0xd
jne 0x5545eb
mov al, byte [esp + 0x50]
and al, 8
cmp al, 8
je 0x5545eb
lea eax, [esp + 0x10]
push eax
push 4
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0x60]
push eax
push esi
call sub.KERNEL32.DLL_ReadProcessMemory
test eax, eax
je 0x5545eb
cmp dword [esp + 0x10], 0
je 0x5545eb
mov eax, dword [0x57ebe0]
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
cmp eax, dword [esp]
jne 0x5545eb
mov eax, dword [esp + 0xc]
push eax
push edi
push 0x41d
push ebp
call sub.USER32.DLL_SendMessageA
test eax, eax
je 0x5545c8
lea eax, [esp + 0x10]
push eax
push 0x10
push ebx
mov eax, dword [esp + 0x18]
push eax
push esi
call sub.KERNEL32.DLL_ReadProcessMemory
cmp dword [esp + 0x10], 0
je 0x5545f5
lea eax, [esp + 0x14]
push eax
push ebp
call sub.USER32.DLL_GetWindowRect
mov eax, ebx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
call fcn.00407250
jmp 0x5545f5
cmp edi, dword [esp + 4]
jl 0x554521
push 0x8000
push 0
mov eax, dword [esp + 0x14]
push eax
push esi
call sub.KERNEL32.DLL_VirtualFreeEx
push esi
call sub.KERNEL32.DLL_CloseHandle_1
add esp, 0x5c
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x56a3a0
Capabilities:
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
test dl, dl
je 0x56a3b5
add esp, 0xfffffff0
call fcn.004041d8
mov dword [ebp - 8], ecx
mov byte [ebp - 1], dl
mov ebx, eax
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x20]
call fcn.00569cd8
mov dword [ebx + 0x10], eax
cmp dword [ebx + 0x10], 0
jne 0x56a3ea
cmp byte [ebp + 0x1c], 0
je 0x56a3e3
mov dword [ebx + 0x10], 0x1bb
jmp 0x56a3ea
mov dword [ebx + 0x10], 0x50
lea eax, [ebx + 4]
mov edx, dword [ebp - 8]
call fcn.00404d04
mov al, byte [ebp + 0x1c]
mov byte [ebx + 0x14], al
lea eax, [ebx + 8]
mov edx, dword [ebp + 0x18]
call fcn.00404d04
lea eax, [ebx + 0xc]
mov edx, dword [ebp + 0x14]
call fcn.00404d04
lea eax, [ebx + 0x1c]
mov edx, 0x56a478
call fcn.00404d04
test esi, esi
jne 0x56a428
mov esi, dword [0x57e62c]
test edi, edi
jne 0x56a432
mov edi, dword [0x57e630]
cmp dword [ebp + 8], 0
jne 0x56a440
mov eax, dword [0x57e634]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
push eax
mov ecx, edi
mov edx, esi
mov eax, ebx
mov esi, dword [eax]
call dword [esi]
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x56a465
call fcn.00404230
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0x1c
Function at 0x404530
Capabilities:
Delete file

Disassembly:
push ebx
mov ebx, eax
sub esp, 0x18
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
sub esp, 4
mov dword [esp], ebx
call sub.msvcrt.dll_remove
add esp, 0x18
pop ebx
ret

Function at 0x404560
Capabilities:
Query environment variable

Disassembly:
push ebx
mov eax, 0x4018
call fcn.0040a5e0
sub esp, eax
mov eax, dword [esp + 0x4020]
lea ebx, [esp + 0x10]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405210
mov dword [esp + 8], 0x2000
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
sub esp, 0xc
test eax, eax
jne 0x4045c0
add esp, 0x4018
xor eax, eax
pop ebx
ret
lea eax, [esp + 0x2010]
mov dword [esp + 8], 0x2000
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
sub esp, 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0
call fcn.00405070
test eax, eax
je 0x4045ac
cmp byte [eax], 0
je 0x4045ac
mov dword [esp], eax
call sub.msvcrt.dll__strdup
add esp, 0x4018
pop ebx
ret

Function at 0x404610
Capabilities:
Set environment variable

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405210
mov esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405210
mov dword [esp], esi
mov ebx, eax
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
sub esp, 8
mov edi, eax
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], ebx
call sub.msvcrt.dll_free
add esp, 0x10
mov eax, edi
pop ebx
pop esi
pop edi
ret

Function at 0x404680
Capabilities:
Set environment variable

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405210
mov dword [esp + 4], 0
mov ebx, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
sub esp, 8
mov esi, eax
mov dword [esp], ebx
call sub.msvcrt.dll_free
add esp, 0x14
mov eax, esi
pop ebx
pop esi
ret
Function at 0x4046d0
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
push edi
mov eax, 0x202c
push esi
push ebx
call fcn.0040a5e0
sub esp, eax
lea ebx, [esp + 0x20]
mov esi, dword [esp + 0x2040]
mov dword [esp], 0x1000
mov dword [esp + 4], ebx
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
sub esp, 8
lea edi, [esp + 0x10]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0x1000
mov dword [esp], esi
mov ebx, 5
call fcn.00405070
call sub.msvcrt.dll__getpid
mov dword [esp + 4], str._MEI_d
mov dword [esp + 8], eax
mov dword [esp], edi
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__tempnam]
mov dword [esp], eax
mov ebp, eax
call sub.msvcrt.dll__mkdir
test eax, eax
je 0x404770
mov dword [esp], ebp
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x404735
add esp, 0x202c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebp
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
mov dword [esp], ebp
call sub.msvcrt.dll_free
add esp, 0x202c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x404800
Capabilities:
Delete directory

Disassembly:
push ebp
push edi
mov eax, 0x125c
push esi
push ebx
call fcn.0040a5e0
sub esp, eax
mov eax, dword [esp + 0x1270]
lea ebp, [esp + 0x24f]
mov dword [esp], ebp
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], ebp
call sub.msvcrt.dll_strlen
mov edx, eax
mov dword [esp + 0x12c], eax
movzx edx, byte [esp + edx + 0x24e]
cmp dl, 0x5c
je 0x404851
cmp dl, 0x2f
jne 0x404900
lea ebx, [esp + 0x134]
mov edx, 0x2a
mov word [ebp + eax], dx
mov dword [esp], ebp
mov dword [esp + 4], ebx
call dword [sym.imp.msvcrt.dll__findfirst]
cmp eax, 0xffffffff
mov dword [esp + 0x128], eax
je 0x4048e1
mov edi, esp
mov esi, ebx
mov ecx, 0x46
rep movsd dword es:[edi], dword [esi]
mov eax, ebp
mov edx, dword [esp + 0x12c]
call fcn.00404930
jmp 0x4048b9
mov edi, esp
mov esi, ebx
mov ecx, 0x46
rep movsd dword es:[edi], dword [esi]
mov eax, ebp
mov edx, dword [esp + 0x12c]
call fcn.00404930
mov eax, dword [esp + 0x128]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__findnext]
test eax, eax
je 0x4048a0
mov eax, dword [esp + 0x128]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__findclose]
mov eax, dword [esp + 0x1270]
mov dword [esp], eax
call sub.msvcrt.dll__rmdir
add esp, 0x125c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 0x5c
mov word [ebp + eax], cx
add eax, 1
mov dword [esp], ebp
mov dword [esp + 0x12c], eax
call sub.msvcrt.dll_strlen
jmp 0x404851
Function at 0x404c80
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push edi
push esi
mov eax, 0x20a0
push ebx
call fcn.0040a5e0
sub esp, eax
mov eax, dword [esp + 0x20b0]
lea esi, [esp + 0xa0]
mov dword [esp + 8], 0x1000
mov dword [esp + 0x3c], 0
lea edi, [esp + 0x5c]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00405210
mov dword [esp + 4], 1
mov dword [esp], 0x16
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 0xf
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 0x15
call sub.msvcrt.dll_signal
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoW]
mov eax, 1
sub esp, 4
mov word [esp + 0x8c], ax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x88], 0x101
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov ebx, dword [sym.imp.msvcrt.dll__get_osfhandle]
mov dword [esp], eax
call ebx
mov dword [esp + 0x94], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov dword [esp], eax
call ebx
mov dword [esp + 0x98], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov dword [esp], eax
call ebx
mov dword [esp + 0x9c], eax
call dword [sym.imp.KERNEL32.DLL_GetCommandLineW]
lea edx, [esp + 0x4c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], edx
lea edx, [esp + 0x40]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x404e30
mov dword [esp], str.Error_creating_child_process__n
call fcn.00401e10
add esp, 0x20a0
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
ret
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
sub esp, 8
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetExitCodeProcess]
sub esp, 8
mov eax, dword [esp + 0x3c]
add esp, 0x20a0
pop ebx
pop esi
pop edi
ret
Function at 0x4099e0
Capabilities:
Write file on windows

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

Function at 0x409a40
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov eax, dword [0x41e2f0]
test eax, eax
jle 0x409b43
mov edx, dword [0x41e2f4]
xor ebx, ebx
mov ecx, dword [edx + 4]
cmp ecx, esi
ja 0x409a71
mov edi, dword [edx + 8]
add ecx, dword [edi + 8]
cmp esi, ecx
jb 0x409ae6
add ebx, 1
add edx, 0xc
cmp ebx, eax
jne 0x409a60
mov dword [esp], esi
call fcn.0040a3c0
test eax, eax
mov edi, eax
je 0x409b6a
lea esi, [ebx + ebx*2]
mov ebx, dword [0x41e2f4]
shl esi, 2
add ebx, esi
mov dword [ebx + 8], eax
mov dword [ebx], 0
call fcn.0040a4b0
add eax, dword [edi + 0xc]
mov dword [ebx + 4], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [0x41e2f4]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x409b4a
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
jne 0x409af0
add dword [0x41e2f0], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 4
je 0x409adf
cmp eax, 0x80
je 0x409adf
cmp eax, 8
je 0x409adf
mov eax, dword [ebp - 0x28]
add esi, dword [0x41e2f4]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x409adf
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.004099e0
xor ebx, ebx
jmp 0x409a7b
mov eax, dword [0x41e2f4]
mov eax, dword [eax + esi + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.004099e0
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.004099e0
lea esi, [esi]

Function at 0x40a2e0
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x40a318
xor edx, edx
nop
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
ja 0x40a30e
add ecx, dword [eax + 8]
cmp ebx, ecx
jb 0x40a31a
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x40a300
xor eax, eax
pop ebx
pop esi
ret
Function at 0x4052ce
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x4aa944
call fcn.004a9484
push ebx
push esi
mov esi, dword [ebp + 8]
or dword [esi + 8], 0xffffffff
or dword [esi + 4], 0xffffffff
and dword [esi + 0xc], 0
push edi
and dword [ebp - 4], 0
lea edi, [esi + 0x14]
mov ecx, edi
mov dword [esi], vtable.TiXmlAttribute.0
call fcn.004053b8
lea ebx, [esi + 0x30]
mov ecx, ebx
call fcn.004053b8
push dword [ebp + 0xc]
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.0040534c
push dword [ebp + 0x10]
mov ecx, ebx
call fcn.0040534c
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x4c], eax
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc

Function at 0x408297
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
jne 0x4082ae
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov edi, eax
test edi, edi
je 0x4082e3
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x4082df
cmp edi, eax
jae 0x4082e3
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x4082d1
cmp edi, eax
jb 0x4082e7
xor eax, eax
jmp 0x4082f1
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret

Function at 0x408494
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebx]
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], ecx
je 0x408522
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [ebp - 4]
push edx
push ecx
lea edx, [ebp - 8]
push edx
push ecx
push dword [ebp + 8]
push eax
call edi
cmp dword [ebp - 8], 1
je 0x4084cb
cmp dword [ebp - 8], 2
jne 0x408521
push esi
mov esi, dword [ebp + 0xc]
call fcn.00408161
mov eax, dword [ebp - 4]
shr eax, 1
inc eax
push eax
call fcn.00408062
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 8]
push dword [ebx]
call edi
test eax, eax
jne 0x408509
mov eax, dword [ebp - 4]
shr eax, 1
and word [esi + eax*2], 0
mov dword [ebp - 0xc], 1
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x408519
push eax
call fcn.00479b8e
pop ecx
mov edx, esi
call fcn.0040801e
pop esi
pop edi
mov eax, dword [ebp - 0xc]
leave
ret 8
Function at 0x40874e
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov eax, 0x4ab1e5
call fcn.004a9484
push ecx
push ebx
push esi
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.004081a1
push dword [ebp + 8]
and dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x408799
xor esi, esi
inc esi
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.00407f26
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
mov esi, dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
push 0
push dword [ebp + 8]
call esi
test eax, eax
jne 0x40877a
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call edi
mov ebx, 0xb7
cmp eax, ebx
je 0x40877a
lea ecx, [ebp - 0x10]
call fcn.00455b38
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jne 0x4087d0
xor esi, esi
jmp 0x40877d
push eax
call fcn.0040874e
test eax, eax
pop ecx
je 0x4087cc
push 0
push dword [ebp + 8]
call esi
test eax, eax
jne 0x40877a
call edi
cmp eax, ebx
jne 0x4087cc
jmp 0x40877a

Function at 0x40a70d
Capabilities:
Set registry value

Disassembly:
push edi
xor edi, edi
cmp dword [esi], edi
je 0x40a73b
push dword [esp + 0xc]
call fcn.00479b8e
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [esp + 0x10]
push 1
push edi
push dword [esp + 0x18]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40a73b
inc edi
mov eax, edi
pop edi
ret 8

Function at 0x40a755
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
xor eax, eax
mov dword [esi], eax
push ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
mov dword [edi], eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov ebx, eax
test ebx, ebx
je 0x40a7de
push ebx
call fcn.00475e32
pop ecx
push eax
push ebx
push dword [ebp - 8]
mov dword [ebp - 4], eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x40a7cf
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x4bbf90
push dword [ebp - 4]
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40a7cf
cmp dword [ebp - 0xc], ebx
je 0x40a7cf
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
mov dword [edi], ecx
mov eax, dword [eax + 0xc]
mov dword [esi], eax
mov dword [ebp - 0x14], 1
cmp dword [ebp - 4], 0
je 0x40a7de
push dword [ebp - 4]
call fcn.004791f7
pop ecx
mov eax, dword [ebp - 0x14]
pop ebx
leave
ret
Function at 0x40a8ae
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4aacc1
call fcn.004a9484
sub esp, 0x20c
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 4], edi
mov ecx, 0x4dc148
mov dword [ebp - 0x10], edi
call fcn.004081e4
push 0x206
lea eax, [ebp - 0x216]
mov dword [ebp - 4], edi
push edi
push eax
mov dword [ebp - 0x10], 1
mov word [ebp - 0x218], di
call fcn.00479200
add esp, 0xc
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.004083bc
push esi
call fcn.0040a81a
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret

Function at 0x40a9fc
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x11c
push esi
push edi
mov esi, 0x11c
push esi
xor edi, edi
lea eax, [ebp - 0xa4]
push edi
push eax
call fcn.00479200
add esp, 0xc
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetVersionExW]
push eax
call esi
cmp eax, edi
jne 0x40aa55
lea eax, [ebp - 0xa4]
push eax
mov dword [ebp - 0xa4], 0x114
call esi
cmp eax, edi
je 0x40ab0b
mov eax, dword [ebp - 0x94]
dec eax
je 0x40aaf7
dec eax
jne 0x40ab0b
mov eax, dword [ebp - 0xa0]
xor edx, edx
push 6
pop ecx
inc edx
cmp eax, ecx
jne 0x40aaa4
cmp dword [ebp - 0x9c], edx
jne 0x40aa8e
xor eax, eax
cmp byte [ebp + 0x76], dl
setne al
add eax, 8
jmp 0x40aaf3
cmp dword [ebp - 0x9c], edi
jne 0x40aadc
xor eax, eax
cmp byte [ebp + 0x76], dl
setne al
lea eax, [eax + eax + 7]
jmp 0x40aaf3
cmp eax, 5
jne 0x40aace
cmp dword [ebp - 0x9c], 2
jne 0x40aab5
push eax
jmp 0x40aad5
cmp dword [ebp - 0x9c], 1
jne 0x40aac2
mov edi, ecx
jmp 0x40ab0b
cmp dword [ebp - 0x9c], edi
jne 0x40ab0b
push 3
jmp 0x40aad5
cmp eax, 4
ja 0x40aad8
push 4
pop edi
jmp 0x40ab0b
cmp eax, ecx
jb 0x40ab0b
cmp dword [ebp - 0x9c], 2
jae 0x40aae9
cmp eax, ecx
jbe 0x40ab0b
cmp byte [ebp + 0x76], dl
jne 0x40ab0b
call fcn.0040a931
mov edi, eax
jmp 0x40ab0b
mov eax, dword [ebp - 0x98]
and eax, 0xffff0000
cmp eax, 0x45a0000
sbb edi, edi
inc edi
inc edi
mov eax, edi
pop edi
pop esi
add ebp, 0x78
leave
ret
Function at 0x40b254
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x10], ebx
call fcn.0040a365
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x40b301
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov edi, eax
cmp edi, 0x200000
ja 0x40b300
lea eax, [edi + 1]
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp + 8], edi
call fcn.0040a3a4
mov esi, eax
mov dword [ebp - 4], esi
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x40b300
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x40b300
sub dword [ebp + 8], eax
add dword [ebp - 4], eax
cmp dword [ebp + 8], ebx
jne 0x40b2b1
mov byte [esi + edi], bl
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
cmp eax, ebx
jne 0x40b2eb
xor eax, eax
jmp 0x40b2f2
push eax
call fcn.004766a0
pop ecx
mov edx, esi
call fcn.0040a3ca
mov dword [ebp - 0x10], 1
pop edi
cmp dword [ebp - 8], ebx
pop esi
pop ebx
je 0x40b311
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 8

Function at 0x40bc59
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
push esi
push 0
push 2
call sub.KERNEL32.DLL_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x40bc7e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x40bd3f
push edi
push 0x228
xor edi, edi
lea eax, [ebp - 0x22c]
push edi
push eax
mov dword [ebp - 4], 0x490
call fcn.00479200
add esp, 0xc
lea eax, [ebp - 0x230]
push eax
push esi
mov dword [ebp - 0x230], 0x22c
call sub.KERNEL32.DLL_Process32FirstW
test eax, eax
je 0x40bcee
lea eax, [ebp - 0x20c]
push 0x4bc150
push eax
call fcn.0047b0c4
test eax, eax
pop ecx
pop ecx
je 0x40bce2
lea eax, [ebp - 0x230]
push eax
push esi
call sub.KERNEL32.DLL_Process32NextW
test eax, eax
jne 0x40bcb8
jmp 0x40bcf7
mov edi, dword [ebp - 0x228]
and dword [ebp - 4], 0
jmp 0x40bcf7
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
push edi
push 0
push 0x400
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov edi, eax
test edi, edi
jne 0x40bd1c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x40bd3e
push dword [ebp + 8]
push 0xf01ff
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40bd38
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 4], eax
push edi
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret