joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402f70
Capabilities:
Capture webcam image
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1040c
call fcn.0041d6a0
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x426220]
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
push esi
push edi
push 0x418
push eax
mov esi, ecx
call ebx
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push esi
push 0x14e
push eax
call edi
mov ecx, dword [0x426220]
push 0x419
push ecx
call ebx
push 0
push 0
mov ebx, eax
push 0x14b
push ebx
call edi
mov edx, dword [esi*4 + str.hBtB]
mov dword [ebp - 0x1040c], edx
cmp esi, 4
ja case.default.0x402fe2
jmp dword [esi*4 + 0x4031e8]
mov esi, 0x4000026f
call fcn.00402120
push eax
push 0
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 0
jne 0x40300e
mov dword [ebp - 0x10408], 0x420034
mov esi, 0x40000270
call fcn.00402120
push eax
push 1
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 1
jne case.default.0x402fe2
mov dword [ebp - 0x10408], str.Post
jmp case.default.0x402fe2
mov esi, 0x40000269
call fcn.00402120
push eax
push 0
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 0
jne 0x403061
mov dword [ebp - 0x10408], 0x420034
mov esi, 0x4000026a
call fcn.00402120
push eax
push 1
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 1
jne case.default.0x402fe2
mov dword [ebp - 0x10408], str.Post
jmp case.default.0x402fe2
mov esi, 0x4000026b
call fcn.00402120
push eax
push 0
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 0
jne case.default.0x402fe2
mov dword [ebp - 0x10408], 0x420034
jmp case.default.0x402fe2
mov esi, 0x4000026c
call fcn.00402120
push eax
push 0
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 0
jne case.default.0x402fe2
mov dword [ebp - 0x10408], str.Post
jmp case.default.0x402fe2
mov esi, 0x4000026d
call fcn.00402120
push eax
push 0
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 0
jne 0x403102
mov dword [ebp - 0x10408], str.Change
mov esi, 0x4000026e
call fcn.00402120
push eax
push 1
push 0x14a
push ebx
call edi
cmp dword [ebp + 8], 1
jne case.default.0x402fe2
mov dword [ebp - 0x10408], str.Resume
mov eax, dword [ebp + 8]
push 0
push eax
push 0x14e
push ebx
call edi
mov eax, dword [ebp - 0x10408]
mov ecx, dword [ebp - 0x1040c]
lea edx, [ebp - 0x404]
call fcn.00402f50
cmp word [ebp - 0x404], 0
pop edi
pop esi
pop ebx
je 0x4031d8
cmp byte [ebp + 0xc], 0
push 0x8000
je 0x40319f
mov edx, dword [0x426220]
lea ecx, [ebp - 0x10404]
push ecx
push 0x41a
push edx
call dword [sym.imp.USER32.dll_GetDlgItemTextW]
lea eax, [ebp - 0x10404]
push eax
lea ecx, [ebp - 0x404]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x10404]
push edx
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4031c0
xor ecx, ecx
mov word [ebp - 0x10404], cx
mov eax, dword [0x426220]
lea edx, [ebp - 0x10404]
push edx
push 0x41a
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
Function at 0x403200
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10404
call fcn.0041d6a0
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, ecx
lea edx, [ebp - 0x404]
mov eax, edi
mov ecx, esi
call fcn.00402f50
test eax, eax
jns 0x403241
mov eax, 1
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
push 0x10000
lea eax, [ebp - 0x10404]
push 0
push eax
call fcn.0041a110
add esp, 0xc
push 0x8000
lea ecx, [ebp - 0x10404]
push ecx
lea edx, [ebp - 0x404]
push edx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
lea edx, [ebp - 0x10404]
mov ecx, ebx
call fcn.0040bf40
mov ecx, dword [ebp - 4]
add esp, 4
neg eax
sbb eax, eax
xor ecx, ebp
and eax, 2
pop edi
call fcn.0041427b
mov esp, ebp
pop ebp
ret

Function at 0x405830
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
test eax, eax
je 0x40589c
test ecx, ecx
je 0x40589c
mov edx, dword [eax]
mov esi, dword [eax + 4]
mov eax, edx
or eax, esi
je 0x40589c
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov ebx, eax
or ebx, ecx
je 0x40589c
cmp ecx, esi
jb 0x40589c
ja 0x40586d
cmp eax, edx
jb 0x40589c
push 0
sub eax, edx
push 0x2710
sbb ecx, esi
push ecx
push eax
call fcn.0041da80
push edx
push eax
push str._llu
push 0xffffffffffffffff
lea ecx, [ebp - 0x28]
push 0x10
push ecx
call fcn.004149b0
add esp, 0x18
lea edx, [ebp - 0x28]
push edx
jmp 0x4058a1
push 0x4201bc
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [ebp - 8]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041427b
mov esp, ebp
pop ebp
ret
Function at 0x4068f0
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0x2c]
mov ebx, ecx
mov esi, eax
mov dword [edi], 0
test ebx, ebx
je 0x406932
cmp dword [ebx], 0
jne 0x406932
test esi, esi
je 0x406932
cmp dword [esi], 0
jne 0x406932
push 0
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x40696c
mov eax, dword [esi]
push 1
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0x48
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x406998
push eax
push str.create_logging_thread__
push str.logger
push 0xc00003eb
push 1
call fcn.004021b0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
push 0xc0000431
push 1
call fcn.004021b0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [esi], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esi + 4], edx
mov edx, dword [ebp + 0x14]
mov dword [esi + 8], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ecx
mov edx, dword [ebx]
mov ecx, dword [ebp + 0x1c]
mov dword [esi + 0x14], edx
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x20]
push edi
push eax
mov dword [esi + 0x18], edx
mov edx, dword [ebp + 0x24]
push esi
mov dword [esi + 0x20], ecx
mov cl, byte [ebp + 0x34]
mov dword [esi + 0x24], edx
mov edx, dword [ebp + 0x30]
push 0x407c30
mov byte [esi + 0x30], cl
mov ecx, dword [ebp + 0x28]
mov dword [esi + 0x2c], edx
mov dl, byte [ebp + 0x38]
push eax
push eax
mov dword [esi + 0x28], edi
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x44], ecx
mov byte [esi + 0x40], dl
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
test ebx, ebx
jne 0x406a32
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
push 0xc0000424
push 1
call fcn.004021b0
add esp, 0x10
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret

Function at 0x406a60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [esi + 0x18]
push 0
push eax
push 2
lea ecx, [ebp - 4]
push ecx
push edx
mov dword [ebp - 4], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406aa9
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
mov ecx, dword [esi]
push eax
mov eax, dword [esi + 4]
push eax
push ecx
push 0x80000434
push 2
call fcn.004021b0
add esp, 0x18
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x406e70
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push eax
push str._s_s
push 0xffffffffffffffff
lea eax, [ebp - 0x40]
push 0x1d
push eax
call fcn.004149b0
add esp, 0x18
test eax, eax
jns 0x406ec8
push 0
push str.delete_createfile_parameter__
push esi
push 0xc00003eb
push 1
call fcn.004021b0
add esp, 0x14
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x40]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov ecx, dword [ebp - 4]
neg eax
sbb eax, eax
xor ecx, ebp
inc eax
call fcn.0041427b
mov esp, ebp
pop ebp
ret

Function at 0x406ef0
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push esi
push edi
push 0
push eax
push ecx
push 0
push edx
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x406f38
mov eax, dword [0x45625c]
mov ecx, dword [0x456258]
push 2
push 0
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x406f32
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, esi
pop edi
pop esi
pop ebp
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
push ebx
push 0xc0000419
push 1
call fcn.004021b0
add esp, 0x14
pop edi
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x407880
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, 0x7d0
jmp 0x407890
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
push eax
mov eax, dword [edx + 0x14]
push 0x400
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4078ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x6d
je 0x4078fc
cmp edi, 0x3e3
je 0x4078f5
cmp edi, 0x718
je 0x4078d2
or esi, 0xffffffff
jmp 0x4078de
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 1
add ebx, 0xbb8
cmp ebx, 0x4268
jl 0x407890
jmp 0x4078ff
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
mov esi, 1
jmp 0x4078ff
or esi, 0xffffffff
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x2c]
cmp dword [ecx], 1
jne 0x407936
mov eax, dword [ebp + 0x14]
test byte [eax], 1
jne 0x407933
push 0
call fcn.00402080
mov edx, dword [ebx + 4]
push eax
mov eax, dword [ebx]
push edx
push eax
push 0xc0000432
push 1
call fcn.004021b0
mov eax, dword [ebp + 0x14]
add esp, 0x18
or dword [eax], 1
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret

Function at 0x407940
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, 0x7d0
jmp 0x407950
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push 0
push eax
mov eax, dword [ebp + 8]
push ecx
mov ecx, dword [eax + 0x18]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4079ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x3e5
je 0x4079ad
cmp edi, 0x6d
je 0x4079b4
cmp edi, 0x70
je 0x407991
cmp edi, 0x718
jne 0x407998
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 0xbb8
mov esi, 1
cmp ebx, 0x4268
jl 0x407950
jmp 0x4079b7
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
or esi, 0xffffffff
mov ebx, dword [ebp + 0x18]
test byte [ebx], 2
jne 0x4079e0
push 0
call fcn.00402080
push eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
push edx
push eax
push 0xc0000433
push 1
call fcn.004021b0
add esp, 0x18
or dword [ebx], 2
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret

Function at 0x4084e0
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0xc]
push ecx
mov byte [0x426245], bl
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40853d
mov edx, dword [ebp - 0x10]
push 0x426245
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0041427b
mov esp, ebp
pop ebp
ret
Function at 0x408550
Capabilities:
Accept command line arguments
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push eax
call fcn.004147fb
add eax, 0x40
push eax
call fcn.00402220
push 0x3c
lea ecx, [ebp - 0x3c]
push 0
push ecx
call fcn.0041a110
add esp, 0x14
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x30], str.runas
call fcn.004086e0
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0xfffe
push 8
mov dword [ebp - 0x2c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x4085d2
push str.elevate__
push str.GetCommandLine__
push 0xc00001fa
call fcn.004147fb
add eax, 0x40
push eax
call fcn.00402220
add esp, 0x10
lea eax, [esi + 0x6f]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push 0x4200a8
push 0xffffffffffffffff
push 0x7fff
push esi
call fcn.004149b0
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add esp, 0x14
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4085f6
sub eax, edx
sar eax, 1
cmp word [esi], 0x22
push edi
lea edi, [eax + 1]
jne 0x408612
add edi, 2
movzx eax, word [esi + edi*2]
push eax
call fcn.00414f93
add esp, 4
test eax, eax
je 0x408636
movzx ecx, word [esi + edi*2 + 2]
inc edi
push ecx
call fcn.00414f93
add esp, 4
test eax, eax
jne 0x408623
lea edx, [esi + edi*2]
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x20], 5
xor edi, edi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x408656
lea edi, [eax + 0x64]
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408bd0
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push edi
lea eax, [ebp - 0x28]
push eax
push 0
push 0x28
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
push eax
call edi
test eax, eax
jne 0x408c21
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x408c21
push 2
call dword [sym.imp.ADVAPI32.dll_ImpersonateSelf]
lea ecx, [ebp - 0x28]
push ecx
push 0
push 0x28
call esi
push eax
call edi
cmp dword [ebp - 0x28], 0
je 0x408c4d
lea edx, [ebp - 0x34]
push edx
push str.SeDebugPrivilege
push 0
mov dword [ebp - 0x2c], 0x10
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x408c60
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
mov esi, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov dword [ebp - 0x20], ecx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x2c]
push edx
lea eax, [ebp - 0x24]
push eax
push 0
mov edi, 1
push ecx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x18], 0
call esi
test eax, eax
jne 0x408cba
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
or dword [ebp - 8], 2
push 0
push 0
push edx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x28]
push 0
push ecx
mov dword [ebp - 0x14], edi
call esi
test eax, eax
je 0x408c9d
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
pop edi
xor ecx, ebp
pop esi
call fcn.0041427b
mov esp, ebp
pop ebp
ret
Function at 0x409020
Capabilities:
Enumerate threads

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
xor ebx, ebx
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ecx, eax
mov dword [ebp - 0x24], ecx
cmp ecx, 0xffffffff
jne 0x40907a
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
mov eax, dword [esi]
push eax
push 0xc0000408
push 1
call fcn.004021b0
add esp, 0x14
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
xor eax, eax
lea edx, [ebp - 0x20]
push edx
mov dword [ebp - 0x20], eax
push ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x20], 0x1c
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
jne 0x4090e4
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
mov eax, dword [esi]
push eax
push 0xc0000409
push 1
call fcn.004021b0
mov ecx, dword [ebp - 0x24]
add esp, 0x14
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x14]
mov edi, dword [sym.imp.USER32.dll_PostThreadMessageW]
cmp edx, dword [esi + 0xc]
jne 0x409102
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x18]
push 0
push eax
push 0x12
push ecx
call edi
mov ebx, eax
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
je 0x40913e
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [esi + 0xc]
jne 0x40912c
mov edx, dword [esi + 0x10]
mov eax, dword [ebp - 0x18]
push 0
push edx
push 0x12
push eax
call edi
or ebx, eax
mov edx, dword [ebp - 0x24]
lea ecx, [ebp - 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x409114
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x12
jne 0x409151
mov eax, dword [ebp - 0x24]
push eax
jmp 0x409173
push 0
call edi
mov edi, eax
call fcn.00402080
mov ecx, dword [esi]
push eax
push ecx
push 0xc0000409
push 1
call fcn.004021b0
mov edx, dword [ebp - 0x24]
add esp, 0x14
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0041427b
mov esp, ebp
pop ebp
ret
Function at 0x4091a0
Capabilities:
Enumerate gui resources
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
jne 0x4091b3
mov eax, 1
pop esi
pop ebp
ret
mov ecx, dword [esi + 4]
lea eax, [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x4091ce
cmp dword [ebp + 0xc], 0x103
jne 0x4091ab
test byte [esi + 0x14], 1
je 0x4091dd
call fcn.00409410
test eax, eax
je 0x4091ab
test byte [esi + 0x14], 2
push ebx
je 0x40921e
push esi
push 0x408fc0
call dword [sym.imp.USER32.dll_EnumWindows]
cmp dword [esi + 0x3c], 0
je 0x40921e
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 4]
mov ebx, dword [esi + 0x28]
push edx
mov edx, dword [esi]
push str.kill_process
push eax
call fcn.00410a70
add esp, 0xc
test eax, eax
je 0x40924e
mov dword [esi + 0x3c], 0
test byte [esi + 0x14], 4
je 0x409257
call fcn.00409190
test eax, eax
je 0x409257
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x24]
mov ebx, dword [esi + 0x28]
push ecx
mov ecx, dword [esi + 4]
push str.kill_process
push edx
mov edx, dword [esi]
call fcn.00410a70
add esp, 0xc
test eax, eax
jne 0x409257
pop ebx
mov eax, 1
pop esi
pop ebp
ret
test byte [esi + 0x14], 8
je 0x40926f
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop ebx
pop esi
pop ebp
ret
pop ebx
xor eax, eax
pop esi
pop ebp
ret
Function at 0x409a10
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
push str.INVGATE
push str.SYSTEMCurrentControlSetServicesEventLogApplication_s
push 0xffffffffffffffff
lea eax, [ebp - 0x204]
push 0xff
push eax
call fcn.004149b0
add esp, 0x14
push 0
test eax, eax
jns 0x409a75
push str.create_messages__
push str.eventlog_registry
push 0xc00003eb
push 1
call fcn.004021b0
add esp, 0x14
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x208]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
lea edx, [ebp - 0x204]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x409ada
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
lea eax, [ebp - 0x204]
push eax
push 0xc00003f9
push 1
call fcn.004021b0
add esp, 0x14
mov eax, 2
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
push esi
call fcn.004086d0
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x409ae5
mov edx, dword [ebp - 0x208]
sub ecx, esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sar ecx, 1
lea ecx, [ecx + ecx + 2]
push ecx
push eax
push 1
push 0
push str.EventMessageFile
push edx
call esi
mov ecx, dword [ebp - 0x208]
push 4
lea eax, [ebp - 0x20c]
push eax
push 4
push 0
push str.TypesSupported
push ecx
mov dword [ebp - 0x20c], 7
call esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0041427b
mov esp, ebp
pop ebp
ret
Function at 0x40a5d0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x424284]
xor eax, ebp
mov dword [ebp - 4], eax
push 1
lea eax, [ebp - 0x204]
mov edx, str.AppExit
call fcn.00409910
add esp, 4
test eax, eax
jns 0x40a62a
push 0
push str.create_exit_action__
push str.INVGATE_REG_EXIT
push 0xc00003eb
push 1
call fcn.004021b0
add esp, 0x14
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
push edi
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x208]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
lea edx, [ebp - 0x204]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40a696
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
lea eax, [ebp - 0x204]
push eax
push 0xc00003f9
push 1
call fcn.004021b0
add esp, 0x14
mov eax, 2
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x20c], 2
jne 0x40a6ae
cmp byte [ebp + 8], 0
jne 0x40a6ae
mov ecx, dword [ebp - 0x208]
push ecx
jmp 0x40a72b
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a6b3
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
mov eax, dword [ebp - 0x208]
push edx
push esi
push 1
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x40a724
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
push str.AppExit
push 0xc00003fb
push 1
call fcn.004021b0
mov ecx, dword [ebp - 0x208]
add esp, 0x14
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 3
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041427b
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x208]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop edi
call fcn.0041427b
mov esp, ebp
pop ebp
ret