joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405f89
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push edx
pop edx
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor edi, edi
mov dword [ebp - 0x24], ecx
push edi
push 0x401324
lea eax, [ebp - 0x18]
mov dword [ebp - 0x1c], edi
sub esi, esi
push 0x14
push eax
inc esi
call fcn.004014a4
jmp 0x406019
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
or edi, edi
je 0x406039
lea edx, [edi + 8]
push edx
pop ecx
lea eax, [ecx + 1]
mov dword [ebp - 0x20], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405fdb
sub ecx, dword [ebp - 0x20]
lea eax, [edx + 1]
add eax, ecx
push eax
push edx
push dword [edi + 4]
push dword [edi]
call dword [ebp - 0x24]
push edi
or eax, eax
je 0x40602f
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp - 0x1c]
inc eax
push eax
push 0x401324
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x18]
push 0x14
push eax
call fcn.004014a4
sub edi, edi
add esp, 0x10
lea eax, [ebp - 0x18]
push 0xa
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x405fbb
jmp 0x406045
xor esi, esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x406045
mov dword [0x409a88], 0x80070714
xor esi, esi
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.004069ed
mov esp, ebp
pop ebp
ret

Function at 0x406172
Capabilities:
Check if file exists
Get file attributes

Disassembly:
pushfd
popfd
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push ecx
push 0x409224
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040150c
mov edi, 0x401128
lea ecx, [ebp - 0x108]
push edi
mov edx, 0x104
call fcn.004062ff
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4061de
test al, 0x10
jne 0x4061de
push 8
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
jmp 0x4061e5
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.004069ed
mov esp, ebp
pop ebp
ret

Function at 0x4062e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4062f1
sub eax, eax
ret
shr eax, 4
not eax
and eax, 1
ret
Function at 0x406534
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
pushal
popal
push ebp
push esp
pop ebp
sub esp, 0xb4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [0x408200]
xor esi, esi
mov dword [ebp - 0xb0], 0xc
mov dword [ebp - 0xa8], esi
cmp edi, 0xfffffffe
jne 0x40665c
lea eax, [ebp - 0xa4]
mov dword [0x408200], esi
push eax
mov dword [ebp - 0xa4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x406656
sub edi, edi
inc edi
cmp dword [ebp - 0x94], edi
jne 0x406656
cmp dword [ebp - 0xa0], 4
jne 0x406656
cmp dword [ebp - 0x9c], 0xa
jae 0x406656
push 0x4a
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x406656
lea eax, [ebp - 0xac]
push eax
push 0x20019
push esi
push 0x401330
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
or eax, eax
jne 0x406656
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xb4]
push eax
push esi
push 0x401091
push dword [ebp - 0xac]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xac]
push eax
pop esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x406628
mov eax, dword [0x408200]
jmp 0x40665e
lea edx, [ebp - 0xa8]
lea ecx, [ebp - 0x10]
call fcn.00406402
test eax, eax
je 0x406656
mov eax, dword [ebp - 0xa8]
and eax, 0x3ff
cmp eax, edi
je 0x40664e
cmp eax, 0xd
jne 0x406656
mov dword [0x408200], edi
jmp 0x40665c
mov edi, dword [0x408200]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004069ed
push ebp
pop esp
pop ebp
ret

Function at 0x406673
Capabilities:
Get disk size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
sub esi, esi
cmp byte [ecx], 0
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
je 0x4066c2
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
or eax, eax
je 0x4066c2
mov eax, dword [ebp - 4]
imul eax, dword [ebp - 8]
push 0x400
push dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
push esi
pop eax
pop esi
push ebp
pop esp
pop ebp
ret
Function at 0x4067cc
Capabilities:
Terminate process

Disassembly:
call fcn.004072d8
jmp 0x4067db
push 0x58
push 0x407568
call fcn.004073a4
sub ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov edi, dword [eax + 4]
mov esi, ebx
mov edx, 0x4088ec
push edi
pop ecx
sub eax, eax
lock cmpxchg dword [edx], ecx
or eax, eax
je 0x40682a
cmp eax, edi
jne 0x40683d
xor esi, esi
inc esi
cmp dword [0x4088f0], 1
jne 0x40684a
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x406880
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406812
cmp dword [0x4088f0], ebx
jne 0x406876
mov dword [0x4088f0], 1
push 0x40101c
push 0x401010
call fcn.004069c4
pop ecx
pop ecx
or eax, eax
je 0x406880
jmp 0x4069ad
mov dword [0x408224], 1
cmp dword [0x4088f0], 1
jne 0x4068a4
push 0x40100c
push 0x401004
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x4088f0], 2
or esi, esi
jne 0x4068b1
xor eax, eax
mov ecx, 0x4088ec
xchg dword [ecx], eax
cmp dword [0x4088f8], 0
je 0x4068d3
push 0x4088f8
call fcn.004071d0
pop ecx
test eax, eax
je 0x4068d3
push ebx
push 2
push ebx
call dword [0x4088f8]
mov eax, dword [sym.imp.msvcrt.dll__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x1c], esi
mov edi, dword [ebp - 0x20]
mov cl, byte [esi]
cmp cl, 0x20
ja 0x406930
test cl, cl
je 0x4068ef
test edi, edi
jne 0x406930
mov al, byte [esi]
test al, al
je 0x4068ff
cmp al, 0x20
ja 0x4068ff
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x4068ef
test byte [ebp - 0x3c], 1
je 0x40690b
movzx eax, word [ebp - 0x38]
jmp 0x40690e
push 0xa
pop eax
push eax
push esi
push ebx
push 0x400000
call main
mov dword [0x408220], eax
cmp dword [0x408238], 0
jne 0x406989
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp cl, 0x22
jne 0x406941
sub eax, eax
test edi, edi
sete al
push eax
pop edi
mov dword [ebp - 0x20], edi
movzx eax, cl
push eax
call dword [sym.imp.msvcrt.dll__ismbblead]
pop ecx
or eax, eax
je 0x406954
inc esi
mov dword [ebp - 0x1c], esi
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x4068e0
cmp dword [0x408224], 0
jne 0x40699d
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x408220]
mov dword [ebp - 4], 0xfffffffe
jmp 0x4069b9
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.004073e9
ret

Function at 0x4070bf
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x407590
call fcn.004073a4
sub ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x40711f
cmp eax, 0xffffffff
je 0x40711f
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x407118
mov edx, dword [eax + 0x3c]
or edx, edx
js 0x407118
cmp edx, 0x10000000
jae 0x407118
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 0x407115
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
push ecx
pop eax
call fcn.004073e9
ret 4
Function at 0x407180
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
push esp
pop ebp
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
or ebx, ebx
je 0x4071be
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x4071b6
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x4071c0
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x4071a6
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4072a0
Capabilities:
Parse pe header

Disassembly:
pushfd
popfd
push ebp
push esp
pop ebp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x4072b6
sub eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
sub eax, eax
cmp dword [ecx], 0x4550
jne 0x4072d1
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
Function at 0x401950
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
push esi
push 0x40917c
mov dword [esp + 0xc], ecx
push eax
xor bl, bl
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4019de
push ebp
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push esi
call edi
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push esi
mov ebp, eax
call edi
lea eax, [ebp + 1]
add esp, 0x1c
test eax, eax
jge 0x40199d
xor eax, eax
push eax
call sub.MFC42.DLL_operatornew
push esi
mov edi, eax
push 1
push ebp
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x14
cmp eax, 1
jne 0x4019c8
mov ecx, dword [esp + 0x10]
push edi
mov byte [edi + ebp], 0
call fcn.004016e0
mov bl, al
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
push edi
call sub.MFC42.DLL_operatordelete
add esp, 8
test bl, bl
pop edi
pop ebp
jne 0x4019e9
mov ecx, dword [esp + 8]
push 0
call fcn.004016e0
mov al, bl
pop esi
pop ebx
pop ecx
ret 4

Function at 0x401a00
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push edi
push 0x409180
mov esi, ecx
push eax
xor bl, bl
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x401a53
mov eax, dword [esi + 0xc]
test eax, eax
je 0x401a47
mov esi, dword [esi + 8]
test esi, esi
jne 0x401a34
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push edi
push 1
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x401a49
mov bl, 1
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
mov al, bl
pop esi
pop ebx
ret 4
Function at 0x405550
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4062a5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
lea ecx, [esp]
mov dword [esp + 0xc], 0
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp]
mov dword [esp + 0x11c], 1
mov dword [esp + 8], 0x104
call sub.MFC42.DLL_CString::Empty
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push str.SOFTWARETENCENTRTXC
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405603
push edi
mov ecx, 0x41
lea edi, [esp + 0x14]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x18]
push str.INSTDIR
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x14]
lea edx, [esp + 4]
push ecx
push 0x40930c
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x14]
add esp, 0xc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov ecx, dword [esp]
mov eax, dword [ecx - 8]
test eax, eax
jne 0x40561c
push str.C:Program_FilesTencentRTXC_
lea ecx, [esp + 4]
call sub.MFC42.DLL_CString::operator_1
push esi
mov esi, dword [esp + 0x128]
lea edx, [esp + 4]
mov ecx, esi
push edx
call sub.MFC42.DLL_CString::CString
mov dword [esp + 0x10], 1
lea ecx, [esp + 4]
mov byte [esp + 0x120], 0
call fcn.00405cea
mov ecx, dword [esp + 0x118]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x120
ret
Function at 0x4015df
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
cmp byte [esi + 0x12828], 0
push edi
jne 0x40161a
push dword [esi + 4]
lea eax, [esi + 0xc]
push 1
push 4
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jae 0x401659
push str.Read_Error
mov ecx, esi
call fcn.00401172
jmp 0x401659
cmp dword [esi + 0x12844], 4
jae 0x40162f
push str.Read_Error
mov ecx, esi
call fcn.00401172
mov eax, dword [esi + 0x12840]
add eax, dword [esi + 0x12848]
push 4
push eax
lea edi, [esi + 0xc]
push edi
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi]
add esp, 0xc
add dword [esi + 0x12848], 4
mov dword [esi + 0x1283c], eax
xor ebx, ebx
cmp dword [esi + 0xc], ebx
je 0x40177b
mov ecx, esi
call fcn.00401381
mov ecx, esi
call fcn.004011fd
lea edi, [esi + 0x18]
mov ecx, 0x3f1
mov eax, 0x20202020
rep stosd dword es:[edi], eax
cmp dword [esi + 0xc], ebx
mov edi, 0xfc4
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], ebx
jbe 0x40177b
mov ebx, 0xfff
jmp 0x40169f
mov edi, dword [ebp - 0x10]
mov ecx, esi
call fcn.004013a4
cmp eax, 0x100
mov dword [ebp - 0xc], eax
jge 0x4016eb
cmp byte [esi + 0x12828], 0
jne 0x4016c7
push dword [esi + 8]
push eax
call dword [sym.imp.MSVCRT.dll_putc]
pop ecx
pop ecx
jmp 0x4016d9
mov byte [ebp - 1], al
lea eax, [ebp - 1]
push eax
lea ecx, [esi + 0x1282c]
call fcn.0040276d
mov al, byte [ebp - 0xc]
mov byte [esi + edi + 0x18], al
inc edi
and edi, ebx
inc dword [ebp - 8]
mov dword [ebp - 0x10], edi
jmp 0x401760
mov ecx, esi
call fcn.004014c9
and dword [ebp - 0x14], 0
sub edi, eax
mov eax, dword [ebp - 0xc]
dec edi
add eax, 0xffffff03
and edi, ebx
test eax, eax
mov dword [ebp - 0x18], eax
jle 0x401760
add dword [ebp - 8], eax
mov eax, dword [ebp - 0x14]
add eax, edi
and eax, ebx
cmp byte [esi + 0x12828], 0
movzx eax, byte [eax + esi + 0x18]
mov dword [ebp - 0xc], eax
jne 0x401733
push dword [esi + 8]
push eax
call dword [sym.imp.MSVCRT.dll_putc]
pop ecx
pop ecx
jmp 0x401745
mov byte [ebp - 1], al
lea eax, [ebp - 1]
push eax
lea ecx, [esi + 0x1282c]
call fcn.0040276d
mov eax, dword [ebp - 0x10]
mov cl, byte [ebp - 0xc]
mov byte [esi + eax + 0x18], cl
inc eax
and eax, ebx
inc dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jl 0x40170d
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 8]
cmp ecx, eax
jbe 0x401772
add eax, 0x400
mov dword [esi + 0x14], eax
cmp ecx, dword [esi + 0xc]
jb 0x40169c
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401d2f
Capabilities:
Create service
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
push ebx
push edi
push 2
pop ebx
push ebx
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x401d56
xor al, al
jmp 0x401e6f
push edi
push edi
push edi
push edi
push edi
push dword [ebp + 8]
push 1
push ebx
push 0x110
push 0xf01ff
push dword [ebp + 0xc]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, edi
jne 0x401de1
lea eax, [ebp - 0x804]
push str.SYSTEMCurrentControlSetServices_
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp + 0xc]
lea eax, [ebp - 0x804]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x804]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401d4f
push 4
lea eax, [ebp + 0xc]
push eax
push 4
push edi
push str.Start
push dword [ebp + 0x10]
mov dword [ebp + 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401d4f
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x804]
push str.SYSTEMCurrentControlSetServices_
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp + 0xc]
lea eax, [ebp - 0x804]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x804]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401e6c
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
push dword [ebp + 0x10]
push 1
push edi
push str.Description
push dword [ebp + 8]
call esi
push 4
lea eax, [ebp + 0xc]
push eax
push 4
push edi
push str.Start
push dword [ebp + 8]
mov dword [ebp + 0xc], ebx
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop esi
pop edi
pop ebx
leave
ret 0xc
Function at 0x401e75
Capabilities:
Persist via windows service
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
push ebx
push edi
push 2
push str.ServicesActive
xor edi, edi
push edi
mov dword [ebp - 8], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, edi
mov dword [ebp - 0x10], eax
je 0x401f42
push 0xf01ff
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
cmp ebx, edi
je 0x401f45
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
push edi
push ebx
call esi
test eax, eax
jne 0x401f36
lea eax, [ebp - 0x810]
push str.SYSTEMCurrentControlSetServices_
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x810]
push 0x404c74
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x810]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401f31
push 4
lea eax, [ebp - 0xc]
push eax
push 4
push edi
push str.Start
push dword [ebp - 4]
mov dword [ebp - 0xc], 2
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push edi
push ebx
call esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
jmp 0x401f45
mov dword [ebp - 8], edi
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 8]
pop edi
pop ebx
leave
ret
Function at 0x40255d
Capabilities:
Create process on windows
Get comspec environment variable
Query environment variable
Self delete

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
push esi
push edi
mov esi, 0x104
push esi
lea eax, [ebp - 0x140]
push eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402670
push esi
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x402670
push esi
lea eax, [ebp - 0x348]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x402670
push str._c_del
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x244]
push eax
call esi
push str.___nul
lea eax, [ebp - 0x244]
push eax
call esi
lea eax, [ebp - 0x348]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x244]
push 0x40
mov dword [ebp - 0x28], eax
pop esi
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], str.Open
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x38], esi
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x402670
push esi
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
call esi
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push edi
lea eax, [ebp - 0x140]
push eax
push 1
push 4
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov al, 1
jmp 0x402672
xor al, al
pop edi
pop esi
leave
ret
Function at 0x402676
Capabilities:
Delete file
Extract resource via kernel32 functions
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1285c
call fcn.00402c10
movzx eax, word [ebp + 8]
push ebx
push esi
push edi
push 0x404780
push eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, edi
je 0x4026c7
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, edi
mov dword [ebp + 8], eax
je 0x4026c7
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
je 0x4026c7
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
cmp ebx, edi
jne 0x4026cb
xor eax, eax
jmp 0x402746
push 0x4040a8
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
cmp esi, edi
pop ecx
pop ecx
je 0x402701
push esi
push dword [ebp + 8]
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp dword [ebp + 8], eax
jne 0x4026f9
push 1
pop edi
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
push 0x50
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x1285c]
call fcn.004010a7
push dword [ebp + 0x10]
lea ecx, [ebp - 0x1285c]
push dword [ebp + 0xc]
call fcn.00401780
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 7
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [ebp - 0x1285c]
call fcn.00401157
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x401058
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0x82
call fcn.0040afc2
xor edx, edx
pop ecx
cmp dword [ebp + 0xc], edx
jle 0x40109d
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, 0x426ff8
mov edi, eax
sub esi, ecx
sub edi, ecx
mov cx, word [esi + edx*2 + 0x426ff8]
xor cx, word [edx*2 + 0x426ff8]
inc edx
mov word [edi + edx*2 + 0x426ff6], cx
cmp edx, dword [ebp + 0xc]
jl 0x40107d
pop edi
pop esi
xor ecx, ecx
mov word [eax + edx*2], cx
pop ebp
ret 8

Function at 0x4020d4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0x66
call fcn.0040afc2
xor edx, edx
pop ecx
cmp dword [ebp + 0xc], edx
jle 0x402116
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, 0x426b98
mov edi, eax
sub esi, ecx
sub edi, ecx
mov cx, word [esi + edx*2 + 0x426b98]
xor cx, word [edx*2 + 0x426b98]
inc edx
mov word [edi + edx*2 + 0x426b96], cx
cmp edx, dword [ebp + 0xc]
jl 0x4020f6
pop edi
pop esi
xor ecx, ecx
mov word [eax + edx*2], cx
pop ebp
ret 8