joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ca011
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4d4400
cmp edx, dword [eax]
je 0x4ca033
add eax, 8
inc ecx
cmp eax, 0x4d4490
jl 0x4ca024
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4d4400]
jne 0x4ca161
mov eax, dword [0x4d9e30]
cmp eax, 1
je 0x4ca13b
test eax, eax
jne 0x4ca064
cmp dword [0x4d4328], 1
je 0x4ca13b
cmp edx, 0xfc
je 0x4ca161
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4ca09b
lea eax, [ebp - 0x1a4]
push 0x4cfe28
push eax
call fcn.004ca9f0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004cae80
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4ca0de
lea eax, [ebp - 0x1a4]
push eax
call fcn.004cae80
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4cfe24
push edi
call fcn.004ccd50
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x4cfe08
push eax
call fcn.004ca9f0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004caa00
lea eax, [ebp - 0xa0]
push 0x4cfe04
push eax
call fcn.004caa00
push dword [esi + 0x4d4404]
lea eax, [ebp - 0xa0]
push eax
call fcn.004caa00
push 0x12010
lea eax, [ebp - 0xa0]
push 0x4cfddc
push eax
call fcn.004cccc4
add esp, 0x2c
pop edi
jmp 0x4ca161
lea eax, [ebp + 8]
lea esi, [esi + 0x4d4404]
push 0
push eax
push dword [esi]
call fcn.004cae80
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x406c6c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x406d8d
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 8]
push eax
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x406d77
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
je 0x406cc5
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jne 0x406d77
cmp dword [ebp - 0xc], 0
jne 0x406cda
mov eax, dword [ebp - 4]
call fcn.00403198
mov bl, 1
jmp 0x406d77
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
xor edx, edx
call fcn.00403278
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
call fcn.004034c4
push eax
lea eax, [ebp - 8]
push eax
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
cmp eax, 0xea
je 0x406c91
test eax, eax
jne 0x406d77
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
je 0x406d21
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jne 0x406d77
jmp 0x406d21
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
je 0x406d34
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
cmp byte [eax + edx - 1], 0
je 0x406d1e
cmp dword [ebp - 8], 7
jne 0x406d43
cmp dword [ebp - 0xc], 0
je 0x406d43
inc dword [ebp - 0xc]
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0xc]
call fcn.00403594
cmp dword [ebp - 8], 7
jne 0x406d6a
cmp dword [ebp - 0xc], 0
je 0x406d6a
lea eax, [ebp - 0x10]
call fcn.004034c4
mov edx, dword [ebp - 0xc]
mov byte [eax + edx - 1], 0
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
call fcn.004031e8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406d94
lea eax, [ebp - 0x10]
call fcn.00403198
ret

Function at 0x407590
Capabilities:
Hash data with crc32

Disassembly:
push esi
xor esi, esi
mov ecx, 0x40b55c
mov eax, esi
mov edx, 8
test al, 1
je 0x4075ac
shr eax, 1
xor eax, 0xedb88320
jmp 0x4075ae
shr eax, 1
dec edx
jne 0x40759f
mov dword [ecx], eax
inc esi
add ecx, 4
cmp esi, 0x100
jne 0x407598
pop esi
ret

Function at 0x4075c4
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
cmp dword [0x40b558], 0
jne 0x4075e7
call fcn.00407590
push 1
push 0x40b558
call sub.kernel32.dll_InterlockedExchange
mov eax, edi
test esi, esi
je 0x407612
mov edx, ebx
and dx, 0xff
xor ecx, ecx
mov cl, byte [eax]
xor dx, cx
movzx edx, dx
mov edx, dword [edx*4 + 0x40b55c]
shr ebx, 8
xor edx, ebx
mov ebx, edx
dec esi
inc eax
test esi, esi
jne 0x4075ed
mov eax, ebx
pop edi
pop esi
pop ebx
ret
Function at 0x408e2c
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov esi, eax
xor eax, eax
push ebp
push 0x408f1b
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
call fcn.00406b50
mov edx, dword [ebp - 8]
mov ecx, 0x408f34
xor eax, eax
call fcn.00408d20
push 0
mov eax, dword [ebp - 4]
call fcn.004034b8
push eax
call sub.kernel32.dll_CreateDirectoryA
test eax, eax
jne 0x408ee9
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
cmp ebx, 0xb7
je 0x408e4c
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x18]
mov edx, dword [ebp - 4]
mov al, 0x2f
call fcn.004089b8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00404c50
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.00407044
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x14]
mov ecx, 2
mov al, 0x60
call fcn.00408988
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, 0x40461c
call fcn.0040584c
call fcn.00402eb4
jmp 0x408e4c
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.0040322c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408f22
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.004031b8
lea eax, [ebp - 8]
mov edx, 2
call fcn.004031b8
ret

Function at 0x408f64
Capabilities:
Shutdown system

Disassembly:
add esp, 0xffffffec
cmp dword [0x40a07c], 2
jne 0x408fd1
push esp
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x408f89
call fcn.00408f44
jmp 0x408fe3
lea eax, [esp + 8]
push eax
push 0x408fe8
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
mov dword [esp + 4], 1
mov dword [esp + 0x10], 2
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x408fd1
call fcn.00408f44
jmp 0x408fe3
push 0
push 2
call sub.user32.dll_ExitWindowsEx
test eax, eax
jne 0x408fe3
call fcn.00408f44
add esp, 0x14
ret

Function at 0x408ffc
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, eax
mov esi, edx
dec esi
test esi, esi
jl 0x409059
inc esi
xor ebx, ebx
cmp ebx, 1
jne 0x409022
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_Sleep
jmp 0x409030
cmp ebx, 1
jle 0x409030
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov eax, edi
call fcn.004034b8
push eax
call sub.kernel32.dll_DeleteFileA
test eax, eax
jne 0x409059
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x409059
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x409059
inc ebx
dec esi
jne 0x409012
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 4
Function at 0x409418
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
lea ebx, [ebp - 0x78]
xor eax, eax
push ebp
push 0x409508
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x409520
push esi
push 0x40952c
push edi
lea eax, [ebp - 8]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x4c]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x4c], 0x44
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 8]
call fcn.004034b8
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x40949c
mov al, 0x62
call fcn.00409064
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x4094b3
push ebx
call sub.user32.dll_TranslateMessage
push ebx
call sub.user32.dll_DispatchMessageA
push 1
push 0
push 0
push 0
push ebx
call sub.user32.dll_PeekMessageA
test eax, eax
jne 0x4094a7
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x5c]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x4094b3
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40950f
lea eax, [ebp - 8]
call fcn.00403198
ret

Function at 0x4095c0
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409674
jmp 0x409669
cmp dword [esi + 0x10], 0x1000
jne 0x409655
test byte [esi + 0x15], 1
jne 0x409655
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x409614
cmp eax, 2
je 0x409614
cmp eax, 0x10
je 0x409614
cmp eax, 0x20
jne 0x409629
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x409629
mov bl, 1
xor ebp, ebp
jmp 0x40963a
mov eax, dword [esi]
add eax, ebp
call fcn.004095b8
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x40962d
test bl, bl
je 0x409655
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409674
mov eax, dword [esi + 4]
cmp eax, edi
je 0x4095ec
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x5e3023
Capabilities:
Encode data using xor

Disassembly:
cdq
fdivr dword [ecx]
rcl ah, cl
push ebp
sub byte [ebp - 0x7e], bh
inc ecx
cmp ecx, edi
add bl, byte [edx]
cmc
invalid
sbb dh, ch
and byte [ebx + 0x59], bl
cmp dword [eax + eax - 0x7e435b46], ecx
movsb byte es:[edi], byte [esi]
mov ebp, edi
xchg ecx, eax
add byte [edx + 0x1639418e], dl
movsb byte es:[edi], byte [esi]
pop ecx
add dword [ebx + ebx*4 + 0x5b203941], esi
pop ebp
cmp dword [eax + eax - 0x7efa4346], ecx
mov word [eax], es
mov edx, 0x218105bc
loopne 0x5e2fe8
sub eax, 0x99f93941
mov word [eax], es
mov edx, 0x218105bc
loopne 0x5e2fe8
sub eax, 0x99f93941
fsub dword [edx - 0x1f]
add al, byte [ecx - 0x5a]
mov esp, 0xe6f9da11
adc eax, 0x99f93903
push 0xda9ee562
inc ecx
stc
cdq
inc ecx
movsb byte es:[edi], byte [esi]
mov cl, 0x81
xor dword [ecx], eax
sub al, 0x2e
movsb byte es:[edi], byte [esi]
clc
jp 0x5e3001
invalid
movsd dword es:[edi], dword [esi]
cmp esi, esp
adc eax, 0x99f93958
fsub dword [edx + 0x15]
add byte [ecx], cl
and dword [eax], eax
jb 0x5e30a7
cmp ecx, edi
add bl, byte [edx]
and dword [eax + 0x71], esp
mov dh, 0x2e
stc
cdq
inc ecx
movsb byte es:[edi], byte [esi]
mov esp, 0x1562d611
add al, byte [ecx]
and dword [eax - 0x2c], esp
test eax, 0xa42e2e06
clc
cwde
inc eax
and dword [ecx], 0xfffffff9
loope 0x5e3042
inc ecx
cmp edx, ebp
fcomp dword [edx - 0x1f]
add bl, byte [eax - 0x5a]
mov eax, dword [0x603cd681]
aam 0xa5
sahf
invalid

Function at 0x5e3113
Capabilities:
Encode data using xor

Disassembly:
cdq
fdivr dword [ecx]
rcl ah, cl
push ebp
sub byte [ebp - 0x7e], bh
inc ecx
cmp ecx, edi
add bl, byte [edx]
cmc
invalid
sbb dh, ch
and byte [ebx + 0x59], bl
cmp dword [eax + eax - 0x7e435b46], ecx
movsb byte es:[edi], byte [esi]
mov ebp, edi
xchg ecx, eax
add byte [edx - 0x71], bl
inc ecx
cmp dword [esi], edx
movsb byte es:[edi], byte [esi]
pop ecx
add dword [eax + ebx*4 + 0x5b203941], eax
pop ebp
cmp dword [eax + eax - 0x7efa4346], ecx
mov word [eax], es
mov edx, 0x218105bc
loopne 0x5e30d8
sub eax, 0x99f93941
mov word [eax], es
mov edx, 0x218105bc
loopne 0x5e30d8
sub eax, 0x99f93941
fsub dword [edx - 0x1f]
add al, byte [ecx - 0x5a]
mov esp, 0xe6f9da11
adc eax, 0x99f93903
push 0xda9ee562
inc ecx
stc
cdq
inc ecx
movsb byte es:[edi], byte [esi]
mov cl, 0x81
xor dword [ecx], eax
sub al, 0x2e
movsb byte es:[edi], byte [esi]
clc
jp 0x5e30f1
movsd dword es:[edi], dword [esi]
cmp esi, esp
adc eax, 0x99f93958
fsub dword [edx + 0x15]
add byte [ecx], cl
and dword [eax], eax
jb 0x5e3197
cmp ecx, edi
add bl, byte [edx]
and dword [eax + 0x71], esp
mov dh, 0x2e
stc
cdq
inc ecx
movsb byte es:[edi], byte [esi]
mov esp, 0x1562d611
add al, byte [ecx]
and dword [eax - 0x2c], esp
test eax, 0xa42e2e06
clc
cwde
inc eax
and dword [ecx], 0xfffffff9
retf
Function at 0x5e4506
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
pushal
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x5e45f5
mov ecx, eax
mov ebx, dword [ecx + 0x3c]
add ecx, ebx
mov ecx, dword [ecx + 0x7c]
test ecx, ecx
je 0x5e45f5
mov dword [ebp - 4], ecx
mov ebx, eax
mov ecx, dword [ebx + 0x3c]
add ebx, ecx
mov ebx, dword [ebx + 0x78]
add ebx, eax
mov dword [ebp - 8], ebx
mov eax, dword [ebp + 0xc]
test eax, 0xffff0000
je 0x5e45a1
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x5e45f5
dec ecx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x20]
add eax, dword [ebp - 0xc]
push ecx
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
add eax, dword [ebp - 0xc]
push edi
push dword [ebp + 0xc]
push eax
call dword [edi + 0x124a8537]
pop edi
pop ecx
test eax, eax
jne 0x5e455a
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x24]
add eax, dword [ebp - 0xc]
shl ecx, 1
add eax, ecx
movzx ecx, word [eax]
jmp 0x5e45a7
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebx + 0x10]
mov ebx, dword [ebp - 8]
mov eax, dword [ebx + 0x14]
cmp ecx, eax
jge 0x5e45f5
mov eax, dword [ebp - 0xc]
mov edx, dword [ebx + 0x1c]
add edx, eax
shl ecx, 2
add edx, ecx
cmp dword [edx], 0
je 0x5e45f5
mov ebx, dword [edx]
add eax, ebx
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 8]
jle 0x5e45f5
sub eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
jge 0x5e45f5
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.005e444f
mov dword [ebp - 0x10], eax
popal
mov eax, dword [ebp - 0x10]
leave
ret 8
Function at 0x401e4a
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x401e89
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x401e89
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401e89
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x401e89
cmp dword [ecx + 0x74], 0xe
jbe 0x401e89
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x418070
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 2
mov esi, ecx
mov dword [0x420e6c], 0
push 1
push esi
mov dword [0x420e68], 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x4181e0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [0x420e6c], eax
test eax, eax
je 0x4181e5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x420e64], eax
test eax, eax
je 0x4181eb
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, 0x28
jbe 0x4181eb
mov esi, dword [0x420e64]
cmp dword [esi], 0x28
jne 0x4181eb
mov eax, dword [esi + 4]
movzx ecx, word [esi + 0xe]
mov dword [0x420e60], eax
mov eax, dword [esi + 8]
mov dword [0x420e5c], eax
cmp ecx, 0x18
jne 0x41810c
mov dword [ebp - 4], 0
jmp 0x418126
cmp dword [esi + 0x20], 0
je 0x418118
movzx eax, word [esi + 0x20]
jmp 0x418123
mov eax, 1
shl ax, cl
movzx eax, ax
mov dword [ebp - 4], eax
movzx eax, word [esi + 0xe]
cmp eax, 4
je 0x41813f
cmp eax, 8
jne 0x4181cf
mov edi, 0x100
jmp 0x418144
mov edi, 0x10
push ebx
lea eax, [edi*4 + 8]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
je 0x4181c8
mov word [ebx + 2], di
mov eax, 0x300
mov word [ebx], ax
test edi, edi
jle 0x4181a2
lea ecx, [ebx + 5]
lea edx, [esi + 0x29]
jmp 0x418180
movzx eax, byte [edx + 1]
lea edx, [edx + 4]
mov byte [ecx - 1], al
lea ecx, [ecx + 4]
movzx eax, byte [edx - 4]
mov byte [ecx - 4], al
movzx eax, byte [edx - 5]
mov byte [ecx - 3], al
mov byte [ecx - 2], 0
dec edi
jne 0x418180
push ebx
call dword [sym.imp.GDI32.dll_CreatePalette]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebx
mov dword [0x420e68], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov esi, dword [0x420e64]
pop ebx
mov eax, dword [ebp - 4]
movzx eax, ax
add eax, 0xa
lea eax, [esi + eax*4]
mov dword [0x420e70], eax
mov eax, dword [0x420e6c]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push dword [0x420e6c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov dword [0x420e6c], 0
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x408963
Capabilities:
Encode data using xor

Disassembly:
mov ecx, 0x4085d8
dec edi
sub edi, edi
call fcn.00408983
xor dword [edx], ecx
mov eax, 0x43b2387b
inc edx
sub edi, edi
inc eax
cmp edx, ebx
jne fcn.00408963
dec eax
add edi, eax
ret
Function at 0x10031a0d
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, ecx
push esi
push edi
test edx, edx
je 0x10031a69
xor eax, eax
mov edi, edx
mov dword [ebp - 4], eax
mov esi, eax
mov ecx, edi
lea eax, [ecx + 2]
mov dword [ebp - 8], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 4]
jne 0x10031a31
sub ecx, dword [ebp - 8]
sar ecx, 1
inc ecx
lea edi, [edi + ecx*2]
lea esi, [esi + ecx*2]
cmp ecx, 1
jne 0x10031a29
push esi
push edx
push 7
xor eax, eax
push eax
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, 0x80004005
call fcn.10031868
int3

Function at 0x10031ee8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x424
mov eax, 0x10064e24
call fcn.10064c39
mov edx, dword [ebp + 0x10]
xor esi, esi
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x41c], edx
mov dword [ebp - 0x420], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x42c], ecx
mov dword [ebp - 0x430], esi
mov dword [ebp - 0x418], esi
push 2
pop ecx
push ecx
push esi
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadLibraryExW]
mov edi, eax
mov dword [ebp - 0x424], edi
test edi, edi
jne 0x10031f4b
call fcn.10031908
mov esi, eax
jmp 0x1003207b
push esi
push ebx
push dword [ebp - 0x41c]
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FindResourceExW]
mov ebx, eax
test ebx, ebx
jne 0x10031f6a
call fcn.10031908
jmp 0x10032072
push ebx
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadResource]
mov dword [ebp - 0x428], eax
test eax, eax
je 0x10031f60
push ebx
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_SizeofResource]
mov ebx, eax
mov dword [ebp - 0x41c], ebx
lea eax, [ebx + 1]
cmp eax, ebx
jae 0x10031fc1
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x10031fac
lea ecx, [ebp - 0x418]
call fcn.10035150
lea ecx, [ebp - 0x420]
call fcn.10034b9f
mov eax, 0x8007000e
jmp 0x100320a1
push 2
pop ecx
mul ecx
mov byte [ebp - 4], cl
cmp edx, esi
ja 0x100320a9
cmp eax, 0xffffffff
ja 0x100320a9
cmp eax, 0x400
jbe 0x10031ff5
push eax
lea ecx, [ebp - 0x418]
call fcn.100354f7
mov eax, dword [ebp - 0x418]
jmp 0x10032001
lea eax, [ebp - 0x414]
mov dword [ebp - 0x418], eax
mov dword [ebp - 4], 1
jmp 0x1003202b
test eax, eax
jne 0x10032036
mov esi, 0x8007000e
jmp 0x10032074
push ebx
push eax
push ebx
push dword [ebp - 0x428]
push esi
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
je 0x10031f60
mov eax, dword [ebp - 0x418]
xor edx, edx
push dword [ebp + 0x14]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x430]
push dword [ebp - 0x418]
call fcn.10032a0b
mov esi, eax
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x10032094
lea ecx, [ebp - 0x418]
call fcn.10035150
lea ecx, [ebp - 0x420]
call fcn.10034b9f
mov eax, esi
call fcn.10064b8b
ret 0x10
mov ecx, 0x80070057
call fcn.10031868
int3
Function at 0x100615cc
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov cl, 1
mov esi, ebx
cmp dword [edi + 8], ebx
jle 0x1006162c
mov eax, dword [edi + 0x18]
mov eax, dword [eax + esi*4]
cmp dword [eax + 0x10], 2
jne 0x10061626
mov eax, dword [edi + 0xc]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0x18]
push ebx
push dword [eax + esi*4]
push 0x10060fe0
push ebx
push ebx
call dword [sym.imp.msvcrt.dll__beginthreadex]
mov ecx, dword [edi + 0xc]
add esp, 0x18
mov dword [ecx + esi*4], eax
mov cl, bl
mov eax, dword [edi + 0x18]
mov eax, dword [eax + esi*4]
mov dword [eax + 0x10], ebx
inc esi
cmp esi, dword [edi + 8]
jl 0x100615e2
pop edi
pop esi
mov al, cl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10064710
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x1006474e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x10064746
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x10064750
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x10064736
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x10064820
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x10064836
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x10064851
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
Function at 0x58147307
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push esi
lea eax, [ebp - 0xfe]
push 0xfd
push eax
push dword [0x581b2678]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov eax, dword [0x581ae52c]
cmp dword [eax + 0x538], 0
je 0x5814734d
call fcn.5814807c
mov eax, dword [0x581ae52c]
push 4
pop esi
and dword [eax + 0x538], 0
jmp 0x58147371
xor esi, esi
mov byte [ebp - 0x100], 0x52
mov byte [ebp - 0xff], 0x2b
call fcn.58148014
mov eax, dword [0x581ae52c]
mov dword [eax + 0x538], 1
lea eax, [ebp + esi - 0x100]
push eax
push dword [0x581b2678]
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop esi
leave
ret

Function at 0x5814826f
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [0x581ae52c]
cmp dword [eax + 0x648], 0
je 0x581482ef
cmp dword [eax + 0x80], 0
push esi
je 0x581482d6
add eax, 0x84
push 2
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov esi, eax
cmp esi, 0xffffffff
jle 0x581482cf
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll__llseek]
mov eax, dword [0x581ae52c]
push dword [eax + 0x648]
add eax, 0x548
push eax
push esi
call dword [sym.imp.KERNEL32.dll__lwrite]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x581482e2
push str.Cannot_write_to_debug_output_file
jmp 0x581482dc
add eax, 0x548
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x581ae52c]
pop esi
and dword [eax + 0x648], 0
ret

Function at 0x58149103
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push edi
push 0x11
call esi
mov bx, ax
mov edi, 0x8000
push 0x10
and ebx, edi
call esi
shr eax, 1
and eax, 0x4000
push 0x12
or ebx, eax
shr ebx, 2
call esi
and eax, edi
pop edi
or ebx, eax
pop esi
shr ebx, 0xa
mov eax, ebx
pop ebx
ret