joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ed0a0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50153d
mov eax, dword fs:[0]
push eax
sub esp, 0xb4
mov eax, dword [0x53602c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov cx, ax
shr cx, 8
cmp al, 6
jb 0x4ed17b
jne 0x4ed0f0
cmp cx, 1
jbe 0x4ed17b
mov eax, dword fs:[0x2c]
mov ecx, dword [0x5396b4]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x53aa90]
cmp eax, dword [ecx + 4]
jg 0x4ed195
push 0x10000000
push 0
push dword [ebp + 8]
call dword [0x53aa8c]
test eax, eax
jne 0x4ed184
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0x21
push str.E:.conan709e391_sourcesexternalcrashpadutilwincritical_section_with_debug_info.cc
push str.bool___cdecl_crashpad::_anonymous_namespace::CrashpadInitializeCriticalSectionEx_struct__RTL_CRITICAL_SECTION__unsigned_long_unsigned_long_
lea ecx, [ebp - 0xc0]
call fcn.00452ce0
push 0x515dc4
push eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x10], 1
call fcn.004012f0
add esp, 8
lea ecx, [ebp - 0xc0]
call fcn.00452fa0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
push 0x53aa90
call fcn.0047d028
add esp, 4
cmp dword [0x53aa90], 0xffffffff
jne 0x4ed110
push 1
push str.::InitializeCriticalSectionEx
push str.kernel32.dll
mov dword [ebp - 4], 0
call fcn.0044eba0
push 0x53aa90
mov dword [0x53aa8c], eax
mov dword [ebp - 4], 0xffffffff
call fcn.0047cfde
add esp, 0x10
jmp 0x4ed110

Function at 0x4ed4d0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4ed4fd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4ed4fd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x4ef765
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x53602c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x521ff0
push esi
call fcn.004d11a8
pop ecx
pop ecx
test eax, eax
jne 0x4ef793
xor al, al
jmp 0x4ef810
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.004ef3c2
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x4ef7cd
push dword [ebp - 0x210]
call fcn.0048c1e3
xor al, al
jmp 0x4ef80e
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4ef7d3
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x4ef7f3
push edx
call fcn.004ef69c
pop ecx
test al, al
je 0x4ef7be
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4ef801
mov bl, 1
push dword [ebp - 0x210]
call fcn.0048c1e3
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0047d116
leave
ret
Function at 0x4f0a87
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x53602c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x4f0aca
call fcn.004b5d29
mov dword [eax], 0xf
call fcn.004b5d3c
mov dword [eax], 0xd
call fcn.0048c030
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047d116
leave
ret
test eax, eax
jne 0x4f0ad1
inc eax
jmp 0x4f0abe
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x4f0abc
xor eax, eax
cmp ecx, 1
setne al
jmp 0x4f0abe
Function at 0x401000
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
jmp 0x401018
mov ebx, dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrlenA]
push ebx
xor edi, edi
call esi
test eax, eax
jle 0x401036
xor byte [edi + ebx], 0xa5
push ebx
inc edi
call esi
cmp edi, eax
jl 0x40102a
pop edi
mov eax, ebx
pop esi
pop ebx
pop ebp
ret

Function at 0x40103d
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
jmp 0x40104f
and dword [ebp - 4], 0
mov esi, 0x4030d4
push 0
push esi
call section..text
pop ecx
push eax
call dword [sym.imp.USER32.dll_FindWindowA]
push esi
mov ebx, eax
call section..text
test ebx, ebx
pop ecx
je 0x40109c
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp dword [ebp - 4], 0
je 0x40109c
push dword [ebp - 4]
push 1
push 1
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
pop esi
pop ebx
leave
ret
Function at 0x40110a
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.004017e0
push ebx
push esi
push edi
jmp 0x401133
and byte [ebp - 0x100c], 0
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x100b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 1
lea eax, [ebp - 4]
pop edi
mov esi, 0x4030f0
push eax
push 0xf003f
push 0
push esi
mov dword [ebp - 8], 0xfff
mov dword [ebp - 0xc], edi
call section..text
pop ecx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401187
xor eax, eax
jmp 0x4012d9
push esi
call section..text
pop ecx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x100c]
push eax
lea eax, [ebp - 0xc]
push eax
mov esi, 0x403128
push 0
push esi
call section..text
pop ecx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4011bc
mov dword [ebp - 8], edi
push esi
call section..text
mov ebx, dword [ebp + 8]
pop ecx
test ebx, ebx
jne 0x401222
cmp dword [ebp - 8], edi
jbe 0x40120e
mov ebx, 0x403050
lea eax, [ebp - 0x100c]
push ebx
push eax
call fcn.004010a0
pop ecx
test eax, eax
pop ecx
jne 0x4012d7
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x100c]
push 0x403138
push eax
call edi
lea eax, [ebp - 0x100c]
push ebx
push eax
call edi
jmp 0x401294
lea eax, [ebp - 0x100c]
push 0x403050
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
jmp 0x401297
and dword [ebp + 8], 0
cmp dword [ebx], 0
jle 0x401297
lea edi, [ebx + 4]
cmp dword [ebp + 8], 0x32
jge 0x401294
and byte [edi + 0x1f], 0
push edi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
test eax, eax
jle 0x401287
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
test eax, eax
jle 0x401279
lea eax, [ebp - 0x100c]
push edi
push eax
call fcn.004010a0
pop ecx
test eax, eax
pop ecx
jne 0x401287
lea eax, [ebp - 0x100c]
push 0x403138
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x100c]
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
inc dword [ebp + 8]
add edi, 0x20
mov eax, dword [ebp + 8]
cmp eax, dword [ebx]
jl 0x40122e
push 1
pop edi
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x100c]
push eax
push edi
push 0
push esi
call section..text
pop ecx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x4012c7
xor edi, edi
push esi
call section..text
pop ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012de
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
jmp 0x4012f6
movzx eax, word [ebp + 0x10]
push dword [ebp + 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
mov esi, eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push eax
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
push esi
mov dword [ebp + 0x14], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x401366
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, ebx
je 0x401366
lea eax, [ebp - 4]
push ebx
push eax
push esi
push dword [ebp + 0x14]
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 1
pop ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_FreeResource]
pop edi
mov eax, ebx
pop esi
pop ebx
leave
ret
Function at 0x40142a
Capabilities:
Create process on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x660
push esi
push edi
jmp 0x40144b
lea eax, [ebp - 0x15c]
push 0x104
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov edi, 0x403040
push edi
call section..text
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
pop ecx
push eax
lea eax, [ebp - 0x15c]
push eax
call esi
push edi
call section..text
pop ecx
xor edi, edi
push edi
push 0x80
push 2
push edi
push 1
lea eax, [ebp - 0x15c]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, edi
mov dword [ebp + 8], eax
je 0x4015b1
push ebx
mov ebx, 0x403010
push ebx
call section..text
pop ecx
push eax
lea eax, [ebp - 0x660]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push ebx
call section..text
pop ecx
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x660]
push eax
call esi
mov ebx, 0x40301c
push ebx
call section..text
pop ecx
push eax
lea eax, [ebp - 0x660]
push eax
call esi
push ebx
call section..text
pop ecx
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x660]
push eax
call esi
mov ebx, 0x40302c
push ebx
call section..text
pop ecx
push eax
lea eax, [ebp - 0x660]
push eax
call esi
push ebx
call section..text
pop ecx
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0x660]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
lea eax, [ebp - 0x660]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
push 0x44
lea eax, [ebp - 0x58]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x14]
mov dword [ebp - 0x2c], 1
mov word [ebp - 0x28], di
push eax
lea eax, [ebp - 0x58]
push eax
push edi
push edi
push pe_nt_image_headers32
push edi
push edi
lea eax, [ebp - 0x15c]
push edi
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
pop ebx
test eax, eax
je 0x4015b1
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x14]
call esi
pop edi
pop esi
leave
ret
Function at 0x4015b5
Capabilities:
Copy file
Create process on windows
Create thread
Get common file path
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
push edi
jmp 0x4015cf
push 0x40314c
xor edi, edi
push dword [ebp + 0x10]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.DLL_lstrcmpA]
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov esi, 0x403050
test eax, eax
jne 0x401622
mov dword [ebp - 4], 1
mov edi, 0x644
push 0x403144
push edi
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingA]
test eax, eax
mov dword [ebp + 0x10], eax
jne 0x40166d
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x4015fd
and byte [0x4030cf], 0
push esi
call section..text
pop ecx
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
cmp eax, 0x1f
jle 0x401646
lea eax, [eax + 0x403031]
push eax
push esi
call ebx
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push 0x401376
push edi
push edi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
cmp dword [0x403164], edi
jne 0x4015f8
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x40165b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
xor eax, eax
mov dword [ebp - 8], ecx
push eax
push eax
push eax
push 6
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
xor ecx, ecx
cmp eax, ecx
je 0x4017ae
cmp dword [ebp - 4], ecx
mov dword [0x403160], eax
jne 0x4017c9
cmp dword [ebp - 8], ecx
je 0x401792
push edi
push ecx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [0x403160]
add esp, 0xc
mov dword [eax], 1
mov eax, dword [0x403160]
add eax, 4
push esi
push eax
call ebx
mov edi, 0x104
lea eax, [ebp - 0x210]
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [ebp - 0x10c]
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x10c]
push 0x40313c
push eax
call edi
lea eax, [ebp - 0x10c]
push esi
push eax
call edi
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea ecx, [ebp - 0x10c]
sub ecx, 4
add eax, ecx
cmp byte [eax], 0x2e
jne 0x401735
and byte [eax], 0
mov esi, 0x403048
push esi
call section..text
pop ecx
push eax
lea eax, [ebp - 0x10c]
push eax
call edi
push esi
call section..text
pop ecx
lea eax, [ebp - 0x10c]
push 0
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
lea eax, [ebp - 0x10c]
push 0x403140
push eax
call edi
lea eax, [ebp - 0x10c]
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_WinExec]
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x4017b7
mov ecx, dword [eax]
cmp ecx, 0x32
jge 0x4017ae
inc ecx
push esi
mov dword [eax], ecx
mov eax, dword [0x403160]
mov ecx, dword [eax]
shl ecx, 5
lea eax, [ecx + eax - 0x1c]
push eax
call ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp + 8]
call fcn.0040142a
pop ecx
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10
push dword [0x403160]
call fcn.0040110a
pop ecx
push 0xa
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x4017c9
Function at 0x401000
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x58b010]
test ebx, ebx
je 0x401030
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call ebx
mov ebx, dword [ebp - 4]
sub esp, 0x10
leave
ret
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.advapi32.dll_RegDeleteKeyA
mov ebx, dword [ebp - 4]
sub esp, 8
leave
ret

Function at 0x401050
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
lea ecx, [ebp - 0x20]
sub esp, 0x3c
mov dword [ebp - 0x20], 4
mov esi, dword [ebp + 8]
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x24]
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x1c]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.advapi32.dll_RegQueryValueExA
mov edi, eax
mov eax, dword [ebp + 0xc]
sub esp, 0x18
mov dword [esp], str..._wine_dlls_msi_tests_action.c
mov dword [esp + 4], eax
call fcn.0052ae70
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Failed_to_query_value__error__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp + 0xc]
mov dword [esp], str..._wine_dlls_msi_tests_action.c
mov dword [esp + 4], eax
call fcn.0052ae70
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], str.Got_wrong_type__u_n
cmp eax, 4
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0052b0e0
test esi, esi
je 0x401119
mov esi, dword [str.windows]
mov edi, 0x52e054
mov ecx, 5
repe cmpsb byte [esi], byte es:[edi]
seta al
sbb al, 0
test al, al
sete al
movzx eax, al
mov esi, eax
mov dword [esp], esi
call fcn.0052b250
jmp 0x40115e
mov eax, dword [ebp + 0xc]
mov dword [esp], str..._wine_dlls_msi_tests_action.c
mov dword [esp + 4], eax
call fcn.0052ae70
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x52e059
cmp eax, ebx
mov dword [esp + 0xc], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0052b0e0
call fcn.0052b2a0
call fcn.0052b280
test eax, eax
jne 0x401123
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x401210
Capabilities:
Check for peb beingdebugged flag
Get process heap flags
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x1c]
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x4c
mov dword [ebp - 0x1c], 0
mov dword [esp + 4], edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.advapi32.dll_RegQueryValueExA
xor edx, edx
sub esp, 0x18
test eax, eax
jne 0x4012bc
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
add eax, 2
mov dword [esp + 8], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edx, eax
test eax, eax
je 0x4012bc
mov byte [eax], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [ebp - 0x2c], eax
call sub.advapi32.dll_RegQueryValueExA
mov edx, dword [ebp - 0x2c]
sub esp, 0x18
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4012d0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x24]
lea edi, [ebp - 0x20]
push ebx
mov esi, dword fs:[0x18]
sub esp, 0x3c
mov dword [ebp - 0x20], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 8
mov dword [esp], 0xffffffff
mov dword [ebp - 0x1c], 0
call sub.advapi32.dll_OpenProcessToken
mov eax, dword [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.advapi32.dll_GetTokenInformation
mov eax, dword [ebp - 0x20]
sub esp, 0x14
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ebx, eax
mov eax, dword [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.advapi32.dll_GetTokenInformation
lea eax, [ebp - 0x1c]
sub esp, 0x14
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sub.advapi32.dll_ConvertSidToStringSidA
sub esp, 8
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x24]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4025d0
Capabilities:
Get file size
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
lea eax, [ebp - 0x2c]
sub esp, 0x50
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetSystemInfo]
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x52e06e
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov esi, eax
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
mov ecx, dword [ebp - 0x28]
xor edx, edx
sub esp, 8
lea eax, [eax + ecx - 1]
mov dword [esp], esi
div ecx
lea ebx, [eax + 1]
imul ebx, ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
shr eax, 0xa
pop ebp
ret
Function at 0x405da0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
mov ebx, ecx
sub esp, 0x4c
mov dword [ebp - 0x2c], edx
mov dword [esp], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov esi, eax
mov dword [esp + 4], 0xa54
mov dword [esp], str..._wine_dlls_msi_tests_action.c
call fcn.0052ae70
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x52eb04
mov dword [esp + 0xc], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0052b0e0
mov edx, dword [ebp - 0x2c]
mov dword [esp + 4], edi
mov dword [esp], 0
mov dword [esp + 8], edx
call dword [sym.imp.kernel32.dll_FindResourceA]
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0xa57
mov dword [esp], str..._wine_dlls_msi_tests_action.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 4], 0x52eb2b
setne al
mov dword [esp], eax
call fcn.0052b0e0
mov edi, dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov dword [esp], 0
call edi
sub esp, 4
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LoadResource]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LockResource]
sub esp, 4
mov dword [ebp - 0x2c], eax
mov dword [esp], 0
call edi
mov edx, dword [sym.imp.kernel32.dll_SizeofResource]
sub esp, 4
mov dword [ebp - 0x30], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call edx
lea ecx, [ebp - 0x1c]
sub esp, 8
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0xc], ecx
mov dword [esp], esi
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov dword [esp + 4], 0xa5a
mov dword [esp], str..._wine_dlls_msi_tests_action.c
call fcn.0052ae70
mov dword [esp], 0
call edi
mov edx, dword [ebp - 0x30]
sub esp, 4
mov dword [esp + 4], ebx
mov dword [esp], eax
call edx
sub esp, 8
cmp dword [ebp - 0x1c], eax
sete al
mov dword [esp + 4], 0x52eb43
movzx eax, al
mov dword [esp], eax
call fcn.0052b0e0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x406e60
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x64
mov ecx, dword [edx + 4]
mov ebx, dword [edx + 8]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], ecx
mov ecx, 0x74
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], 0x7469736d
mov dword [ebp - 0x44], 0x20747365
mov dword [ebp - 0x40], 0x74736572
mov dword [ebp - 0x3c], 0x2065726f
mov dword [ebp - 0x38], 0x6e696f70
mov word [ebp - 0x34], cx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [0x58b004]
mov ebx, dword [ebp - 4]
sub esp, 8
leave
ret
Function at 0x4079f0
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
lea ebx, [ebp - 0x117]
sub esp, 0x140
mov esi, dword [sym.imp.msvcrt.dll_strcpy]
mov dword [esp], ebx
mov dword [esp + 4], 0x59c220
call esi
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov ecx, 0x2a5c
mov dword [ebp - 0x12d], ebx
mov dword [ebp - 0x135], 0
lea edx, [ebx + eax]
mov dword [edx], 0x69736d5c
mov dword [edx + 4], 0x74736574
mov word [edx + 8], cx
mov byte [edx + 0xa], 0
mov byte [ebp + eax - 0x10c], 0
mov eax, 0x1494
mov word [ebp - 0x125], ax
lea eax, [ebp - 0x135]
mov dword [esp], eax
mov dword [ebp - 0x131], 3
mov dword [ebp - 0x129], 0
call sub.shell32.dll_SHFileOperationA
sub esp, 4
mov dword [esp], ebx
mov dword [esp + 4], 0x59c220
call esi
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add eax, ebx
mov dword [eax], 0x69736d5c
mov dword [eax + 4], 0x74736574
mov byte [eax + 8], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_RemoveDirectoryA]
sub esp, 4
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret