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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
push esi
call fcn.00403110
neg eax
sbb eax, eax
lea ecx, [ebp - 4]
and eax, 0x100
push ecx
add eax, 0xf003f
xor esi, esi
push eax
push esi
push str.SoftwareMicrosoftWindows_NTCurrentVersionAppCompatFlagsLayers
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404b26
lea eax, [ebp + 8]
push edi
push eax
lea eax, [ebp - 0x804]
push eax
push esi
mov edi, 0x41c928
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
push dword [ebp - 4]
mov dword [ebp + 8], 0x800
call esi
test eax, eax
jne 0x404ac8
lea eax, [ebp - 0x804]
push eax
call sub.MSVCRT.dll__wcsupr
lea eax, [ebp - 0x804]
mov dword [esp], 0x416d78
push eax
call sub.MSVCRT.dll_wcsstr
pop ecx
test eax, eax
pop ecx
jne 0x404abe
lea eax, [ebp - 0x804]
push str.RUNAS
push eax
call sub.MSVCRT.dll_wcsstr
pop ecx
test eax, eax
pop ecx
je 0x404ac8
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea eax, [ebp + 8]
mov edi, 0x41cb30
push eax
lea eax, [ebp - 0x804]
push eax
push 0
push 0
push edi
push dword [ebp - 4]
mov dword [ebp + 8], 0x800
call esi
test eax, eax
jne 0x404b1c
lea eax, [ebp - 0x804]
push eax
call sub.MSVCRT.dll__wcsupr
lea eax, [ebp - 0x804]
mov dword [esp], 0x416d78
push eax
call sub.MSVCRT.dll_wcsstr
pop ecx
test eax, eax
pop ecx
je 0x404b1c
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
leave
ret
Function at 0x405d3b
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov eax, 0x411314
call fcn.00410db0
sub esp, 0x210
or dword [ebp - 0x14], 0xffffffff
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], esp
push edi
call esi
cmp eax, 0xffffffff
jne 0x405dfd
lea eax, [edi + 6]
push 0x5c
push eax
call sub.MSVCRT.dll_wcschr
pop ecx
mov ebx, eax
pop ecx
lea eax, [ebp - 0x21c]
push 0x208
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
test ebx, ebx
je 0x405d9f
mov eax, ebx
sub eax, edi
sar eax, 1
jmp 0x405da6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea eax, [ebp - 0x21c]
push edi
push eax
call sub.MSVCRT.dll_wcsncpy
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
call esi
cmp eax, 0xffffffff
jne 0x405dee
lea eax, [ebp - 0x21c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x405dee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
push edi
call esi
cmp eax, 0xffffffff
jne 0x405dfd
mov eax, dword [ebp - 0x14]
jmp 0x405e17
test ebx, ebx
je 0x405de1
add ebx, 2
push 0x5c
push ebx
jmp 0x405d74
push 0x4150b0
push edi
call fcn.00406275
pop ecx
xor eax, eax
pop ecx
jmp 0x405e17
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret

Function at 0x405e26
Capabilities:
Delete directory
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x66c
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push esi
mov esi, 0x41d424
push esi
lea eax, [ebp - 0x464]
push 0x417374
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x464]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x405ee8
lea ecx, [ebp - 0x25c]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
push ecx
push eax
call edi
and dword [ebp - 8], 0
and dword [ebp - 0xc], 0
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 4]
call edi
test eax, eax
je 0x405ec4
lea eax, [ebp - 0x230]
push eax
push esi
lea eax, [ebp - 0x66c]
push 0x4156e4
push eax
call ebx
add esp, 0x10
lea eax, [ebp - 0xc]
push 0
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x66c]
push eax
call fcn.00405ef6
jmp 0x405e83
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
pop edi
jne 0x405ee8
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push esi
call fcn.00405ef6
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
pop esi
xor eax, eax
pop ebx
leave
ret
Function at 0x406275
Capabilities:
Get file size
Write file on windows

Disassembly:
mov eax, 0x411320
call fcn.00410db0
sub esp, 0x14
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x10], esp
push esi
push esi
push 3
push esi
push 3
push 0xc0000000
push 0x41c4f8
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x1c], ebx
jne 0x4062b6
push 0xfffffffffffffffe
pop eax
jmp 0x4063bb
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call edi
push dword [ebp + 0xc]
mov edx, eax
mov dword [ebp - 0x18], edx
call edi
mov ecx, dword [ebp - 0x18]
add ecx, eax
lea eax, [ecx + ecx + 2]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x14], eax
push dword [ebp + 0xc]
mov dword [ebp - 0x18], esi
push dword [ebp + 8]
push 0x4156e4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, esi
jbe 0x406382
push esi
push edi
push esi
push 4
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, esi
mov dword [ebp + 8], eax
je 0x406382
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, esi
mov dword [ebp + 0xc], eax
je 0x406374
lea eax, [edi + edi + 2]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
pop ecx
cmp ebx, esi
je 0x406368
push edi
push dword [ebp + 0xc]
push ebx
call sub.MSVCRT.dll_memcpy
push dword [ebp - 0x14]
mov word [ebx + edi*2], si
push ebx
call sub.MSVCRT.dll_wcsstr
add esp, 0x14
test eax, eax
je 0x406361
mov dword [ebp - 0x18], 1
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ebx, dword [ebp - 0x1c]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], esi
jne 0x4063a8
push 2
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x20]
push esi
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 1
push eax
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x4063d0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x41132c
call fcn.00410db0
sub esp, 0x7f4
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], edi
je 0x40640d
push edi
lea eax, [ebp - 0x14]
push edi
push eax
push 0x400
push dword [ebp + 0xc]
push edi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [ebp - 0x30]
push 0xa
push eax
push dword [ebp + 0xc]
call sub.MSVCRT.dll__itow
add esp, 0xc
cmp dword [ebp + 0x14], edi
je 0x4064e0
cmp dword [ebp + 0x10], edi
jne 0x40644a
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x800]
push dword [ebp + 8]
push str._s._Error_ID_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
jmp 0x406479
push dword [ebp + 0x10]
call sub.MSVCRT.dll_wcslen
cmp eax, 0x104
pop ecx
ja 0x406479
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x800]
push dword [ebp + 0x10]
push dword [ebp + 8]
push str._s.__s_Error_ID_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
push edi
push edi
push 4
push edi
push 1
push 0x10000000
push 0x41dc44
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 2
mov ebx, eax
push edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x18]
push edi
push eax
lea eax, [ebp - 0x800]
push eax
call sub.MSVCRT.dll_wcslen
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
pop ecx
shl eax, 1
push eax
lea eax, [ebp - 0x800]
push eax
push ebx
call esi
lea eax, [ebp - 0x1c]
push edi
push eax
push dword [ebp + 0x1c]
call sub.MSVCRT.dll_wcslen
pop ecx
shl eax, 1
push eax
push dword [ebp + 0x1c]
push ebx
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x18], edi
je 0x40654a
cmp dword [ebp - 0x14], edi
je 0x4064f7
push dword [ebp - 0x14]
call sub.MSVCRT.dll_wcslen
pop ecx
mov esi, eax
jmp 0x4064f9
xor esi, esi
push dword [ebp + 8]
call sub.MSVCRT.dll_wcslen
lea eax, [eax + esi + 0x64]
add eax, eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, edi
pop ecx
jne 0x40651d
mov eax, 0x41c4f4
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [ebp + 8]
push str._s_r_n_s_r_nError_ID:__s
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
push 0x10
push str.Error
push esi
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x14], edi
je 0x406558
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
add eax, ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x4065e3
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
lea eax, [ebp - 0xc]
push edi
xor ebx, ebx
push eax
push 0x20
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4066e5
push 1
push str.SeTakeOwnershipPrivilege
push dword [ebp - 0xc]
call fcn.00406579
add esp, 0xc
test eax, eax
jne 0x406630
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4066e5
push str.Advapi32
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
je 0x4066e5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetNamedSecurityInfoW
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x4066e5
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
lea eax, [ebp - 0x28]
push 2
push eax
mov byte [ebp - 0x28], bl
mov byte [ebp - 0x27], bl
mov byte [ebp - 0x26], bl
mov byte [ebp - 0x25], bl
mov byte [ebp - 0x24], bl
mov byte [ebp - 0x23], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4066e5
push ebx
push ebx
push ebx
push dword [ebp - 4]
push 1
push 4
push dword [ebp + 8]
call dword [ebp - 0x10]
test eax, eax
jne 0x4066e5
push str.AllocateAndInitializeSid
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x4066e5
push str.GetLengthSid
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x4066e5
push str.InitializeAcl
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x4066e5
push str.AddAccessAllowedAce
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x4066ec
xor eax, eax
jmp 0x40676f
lea eax, [ebp - 8]
mov byte [ebp - 0x30], bl
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x30]
push 1
push eax
mov byte [ebp - 0x2f], bl
mov byte [ebp - 0x2e], bl
mov byte [ebp - 0x2d], bl
mov byte [ebp - 0x2c], bl
mov byte [ebp - 0x2b], 1
call dword [ebp - 0x14]
push dword [ebp - 8]
call dword [ebp - 0x18]
mov esi, eax
add esi, 0x10
push esi
call sub.MSVCRT.dll_malloc
pop ecx
mov edi, eax
push 2
push esi
push edi
call dword [ebp - 0x1c]
push dword [ebp - 8]
push 0x10000000
push 2
push edi
call dword [ebp - 0x20]
push ebx
push edi
push ebx
push ebx
push 4
push 4
push dword [ebp + 8]
call dword [ebp - 0x10]
push edi
call sub.MSVCRT.dll_free
cmp dword [ebp - 4], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
pop ecx
je 0x406762
push dword [ebp - 4]
call esi
cmp dword [ebp - 8], ebx
je 0x40676c
push dword [ebp - 8]
call esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407831
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov ax, word [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
and dword [esi + 0x38], 0
mov word [esi + 0x18], ax
call fcn.004078e0
mov ax, word [esi + 0x18]
cmp ax, 9
je 0x40789b
mov ebx, dword [esi + 4]
xor ecx, ecx
test ebx, ebx
jle 0x40789b
movzx edi, ax
mov eax, dword [esi + 8]
lea edx, [eax + 0x24]
cmp dword [edx], edi
je 0x407874
inc ecx
add edx, 0x28
cmp ecx, ebx
jl 0x407866
jmp 0x40789b
lea edi, [ecx + ecx*4]
mov dword [esi + 0x38], 1
shl edi, 3
lea ecx, [esi + 0x1c]
push dword [eax + edi]
call fcn.0040754e
mov eax, dword [esi + 8]
lea ecx, [esi + 0x28]
push dword [eax + edi + 0xc]
call fcn.0040754e
xor ecx, ecx
cmp dword [ebp + 0xc], ecx
je 0x4078c7
mov eax, dword [esi + 0x3c]
cmp eax, ecx
je 0x4078d2
movzx edx, word [esi + 0x18]
mov dword [ebp + 8], edx
lea edx, [ebp + 8]
push 4
push edx
push 4
push ecx
push str.LanguageID
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x4078d2
cmp dword [esi + 0x38], ecx
jne 0x4078d2
mov word [esi + 0x18], 9
mov ecx, esi
call fcn.004081bb
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x407b1b
Capabilities:
Get keyboard layout
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx edi, ax
mov eax, edi
and ax, 0x3ff
cmp ax, 9
jne 0x407bc5
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx edi, ax
mov eax, edi
and ax, 0x3ff
cmp ax, 9
jne 0x407bc5
and dword [ebp - 8], 0
mov esi, str.Kernel32
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
test ebx, ebx
jne 0x407b7c
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 8], 1
test ebx, ebx
je 0x407bc5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetSystemDefaultUILanguage
push ebx
call esi
push str.GetUserDefaultUILanguage
push ebx
mov dword [ebp - 4], eax
call esi
cmp dword [ebp - 4], 0
mov esi, eax
je 0x407ba3
call dword [ebp - 4]
movzx edi, ax
mov eax, edi
and ax, 0x3ff
cmp ax, 9
jne 0x407bb8
test esi, esi
je 0x407bb8
call esi
movzx edi, ax
cmp dword [ebp - 8], 0
je 0x407bc5
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, edi
push 9
and cx, 0x3ff
pop eax
cmp cx, ax
jne 0x407c41
mov esi, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov dword [ebp - 8], eax
xor eax, eax
push eax
push eax
mov dword [ebp - 4], eax
call esi
test eax, eax
mov dword [ebp - 0xc], eax
je 0x407c41
shl eax, 4
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
pop ecx
test ebx, ebx
je 0x407c41
push ebx
push dword [ebp - 0xc]
call esi
xor edx, edx
test eax, eax
jbe 0x407c30
xor ecx, ecx
mov cx, word [ebx + ecx*4]
mov esi, ecx
and si, 0x3ff
cmp si, 9
je 0x407c28
inc dword [ebp - 4]
cmp dword [ebp - 4], 1
jne 0x407c28
mov dword [ebp - 8], ecx
inc edx
movzx ecx, dx
cmp ecx, eax
jb 0x407c0b
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
cmp dword [ebp - 4], 0
pop ecx
jle 0x407c41
movzx edi, word [ebp - 8]
mov eax, edi
and eax, 0x3ff
cmp edi, 0x416
je 0x407d41
cmp edi, 0x403
je 0x407d41
cmp ax, 0x16
jne 0x407c70
mov eax, 0x816
jmp 0x407d43
cmp ax, 0x3e
jne 0x407c80
mov eax, 0x43e
jmp 0x407d43
mov ecx, 0x813
cmp edi, ecx
je 0x407d3d
add ecx, 0xfffffff1
cmp edi, ecx
je 0x407d3d
cmp edi, 4
je 0x407d3d
cmp edi, 0x7804
je 0x407d3d
cmp edi, 0x1004
je 0x407d3d
cmp edi, 0x181a
mov ecx, 0x81a
je 0x407d3d
cmp edi, 0x701a
je 0x407d3d
cmp edi, 0x7c1a
je 0x407d3d
cmp edi, 0x2c1a
je 0x407d3d
cmp edi, 0x241a
je 0x407d3d
cmp edi, ecx
je 0x407d3d
cmp edi, 0x1c1a
mov ecx, 0xc1a
je 0x407d3d
cmp edi, 0x6c1a
je 0x407d3d
cmp edi, 0x301a
je 0x407d3d
cmp edi, 0x281a
je 0x407d3d
cmp edi, ecx
je 0x407d3d
mov ecx, 0x141a
cmp edi, ecx
je 0x407d3d
cmp edi, 0x681a
je 0x407d3d
cmp edi, 0x781a
je 0x407d3d
mov ecx, 0x480
cmp edi, ecx
je 0x407d3d
cmp edi, 0x80
jne 0x407d43
mov eax, ecx
jmp 0x407d43
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407fb7
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, ecx
call fcn.00407b1b
mov ecx, esi
mov dword [ebp - 4], eax
call fcn.0040740f
mov edi, dword [ebp + 8]
lea ebx, [esi + 0xc]
push edi
mov ecx, ebx
call fcn.0040754e
push edi
call sub.MSVCRT.dll_wcslen
cmp word [edi + eax*2 - 2], 0x5c
pop ecx
je 0x407ffa
push 0x4150b8
mov ecx, ebx
call fcn.0040810f
push dword [ebp + 0xc]
mov ecx, esi
call fcn.00408d35
mov eax, dword [esi + 0x3c]
push 1
xor ebx, ebx
pop edi
cmp eax, ebx
mov dword [ebp - 0xc], edi
je 0x408085
lea ecx, [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push ecx
lea ecx, [ebp - 8]
push ecx
push ebx
push ebx
push str.LanguageID
push eax
mov dword [ebp + 8], 4
call edi
test eax, eax
jne 0x40804d
push ebx
mov ecx, esi
push dword [ebp - 8]
call fcn.00407831
cmp dword [ebp + 0xc], ebx
mov dword [ebp - 0xc], ebx
jne 0x40804d
mov byte [esi + 0x34], 1
lea eax, [ebp + 8]
mov dword [ebp + 8], 4
push eax
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push str.bShLc2
push dword [esi + 0x3c]
call edi
test eax, eax
jne 0x408079
push 1
pop eax
cmp dword [ebp - 8], eax
jne 0x408079
mov dword [0x41d004], eax
cmp dword [ebp - 0xc], ebx
je 0x408108
push 1
pop edi
cmp dword [ebp + 0xc], ebx
push ebx
je 0x408096
push 9
mov ecx, esi
call fcn.00407831
jmp 0x408108
push dword [ebp - 4]
mov ecx, esi
call fcn.00407831
cmp dword [0x41de4c], ebx
jne 0x408108
cmp word [ebp - 4], 0x13
je 0x4080ba
cmp word [ebp - 4], 0x11
je 0x4080ba
mov eax, edi
jmp 0x4080bc
xor eax, eax
cmp word [esi + 0x18], 9
jne 0x4080ce
cmp word [ebp - 4], 9
je 0x408108
cmp eax, ebx
je 0x408108
push ebx
push 0x407d48
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
push 0x76
push dword [0x41d420]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
mov esi, dword [esi + 0x3c]
mov dword [ebp + 0xc], edi
cmp esi, ebx
je 0x408108
lea eax, [ebp + 0xc]
push 4
push eax
push 4
push ebx
push str.LIDwa
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x408d35
Capabilities:
Enumerate files on windows

Disassembly:
mov eax, 0x411490
call fcn.00410db0
sub esp, 0x268
push ebx
push esi
push edi
xor ebx, ebx
mov esi, ecx
push 2
lea eax, [ebp - 0x14]
push ebx
push eax
mov dword [esi + 4], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 8], ebx
mov eax, dword [esi + 0xc]
mov dword [ebp - 4], ebx
je 0x408d7e
cmp eax, ebx
jne 0x408d76
lea eax, [esi + 0x10]
push eax
push str._sLanguagesinst_.lng
jmp 0x408d8b
cmp eax, ebx
jne 0x408d85
lea eax, [esi + 0x10]
push eax
push str._sIDM.
lea ecx, [ebp - 0x18]
call fcn.00408e66
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jne 0x408d9d
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x274]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x408e49
push 2
lea eax, [ebp - 0x20]
push ebx
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 8], ebx
mov eax, dword [esi + 0xc]
mov byte [ebp - 4], 1
je 0x408ded
cmp eax, ebx
jne 0x408dde
lea eax, [esi + 0x10]
lea ecx, [ebp - 0x248]
push ecx
push eax
push str._sLanguages_s
jmp 0x408e01
cmp eax, ebx
jne 0x408df4
lea eax, [esi + 0x10]
lea ecx, [ebp - 0x248]
push ecx
push eax
push str._s_s
lea ecx, [ebp - 0x24]
call fcn.00408f65
mov eax, dword [ebp - 0x24]
cmp eax, ebx
jne 0x408e13
lea eax, [ebp - 0x20]
push eax
mov ecx, esi
call fcn.00408b04
lea eax, [ebp - 0x274]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x24]
je 0x408e3d
call fcn.0040114f
jmp 0x408db6
call fcn.0040114f
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0040114f
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x4091f4
Capabilities:
Check os version
Persist via run registry key
Query or enumerate registry value

Disassembly:
mov eax, 0x4114e8
call fcn.00410db0
sub esp, 0xb60
push ebx
push esi
xor ebx, ebx
push edi
cmp dword [ebp + 8], ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], ebx
jne 0x40921b
mov al, 1
jmp 0x4093f7
lea eax, [ebp - 0x144]
mov byte [ebp - 0x11], bl
push eax
mov dword [ebp - 0x144], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x409300
cmp dword [ebp - 0x134], 2
jne 0x409300
cmp dword [ebp - 0x140], 6
jb 0x409300
push str.shell32
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
je 0x409300
push str.SHGetKnownFolderPath
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x4092f4
push ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], 0xb4bfcc3a
mov word [ebp - 0x24], 0xdb2c
mov word [ebp - 0x22], 0x424c
mov byte [ebp - 0x20], 0xb0
mov byte [ebp - 0x1f], 0x29
mov byte [ebp - 0x1e], 0x7f
mov byte [ebp - 0x1d], 0xe9
mov byte [ebp - 0x1c], 0x9a
mov byte [ebp - 0x1b], 0x87
mov byte [ebp - 0x1a], 0xc6
mov byte [ebp - 0x19], 0x41
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x18]
push eax
push ebx
lea eax, [ebp - 0x28]
push ebx
push eax
call esi
cmp eax, ebx
jne 0x4092ee
cmp dword [ebp - 0x18], ebx
je 0x4092ee
push dword [ebp - 0x18]
lea eax, [ebp - 0x75c]
push eax
call sub.MSVCRT.dll_wcscpy
pop ecx
mov byte [ebp - 0x11], 1
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
call dword [sym.imp.ole32.dll_CoUninitialize]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [ebp - 0x11], bl
jne 0x409373
lea eax, [ebp - 0x2c]
push eax
push 0xf003f
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders_
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409214
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x208
push eax
lea eax, [ebp - 0xb6c]
push eax
push ebx
push ebx
push str.Desktop
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409361
lea eax, [ebp - 0xb6c]
push eax
lea eax, [ebp - 0x75c]
push eax
call sub.MSVCRT.dll_wcscpy
pop ecx
mov byte [ebp - 0x11], 1
pop ecx
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x11], bl
je 0x409214
push dword [ebp + 8]
lea eax, [ebp - 0x34c]
push eax
call sub.MSVCRT.dll_wcscpy
lea eax, [ebp - 0x34c]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0xc
cmp word [ebp + eax*2 - 0x34e], 0x5c
jne 0x4093b1
lea eax, [ebp - 0x34c]
push eax
call sub.MSVCRT.dll_wcslen
pop ecx
mov word [ebp + eax*2 - 0x34e], bx
lea eax, [ebp - 0x75c]
push eax
call sub.MSVCRT.dll_wcslen
cmp word [ebp + eax*2 - 0x75e], 0x5c
pop ecx
jne 0x4093de
lea eax, [ebp - 0x75c]
push eax
call sub.MSVCRT.dll_wcslen
pop ecx
mov word [ebp + eax*2 - 0x75e], bx
lea eax, [ebp - 0x75c]
push eax
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
setne al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret