joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401ba0
Capabilities:
Create directory
Get common file path

Disassembly:
sub esp, 0x20c
mov dl, byte [0x40a940]
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10d]
mov byte [esp + 0x10c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
push 0x17
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x401cb1
mov eax, dword [esp + 4]
test eax, eax
je 0x401cb1
lea ecx, [esp + 0x10c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x401cb1
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x110]
push 0x408240
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x110]
lea ecx, [esp + 0xc]
push eax
push ecx
call edi
lea edx, [esp + 0xc]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0xc]
push str.CSP
push eax
call esi
mov edx, dword [esp + 0x218]
lea ecx, [esp + 0xc]
push 0x40a940
push ecx
push edx
call fcn.00401ad0
add esp, 0xc
lea eax, [esp + 0x110]
lea ecx, [esp + 0xc]
push eax
push ecx
call edi
lea edx, [esp + 0xc]
push str.CSP_
push edx
call esi
mov ecx, dword [esp + 0x21c]
lea eax, [esp + 0xc]
push 0x40a940
push eax
push ecx
call fcn.00401ad0
add esp, 0xc
pop esi
pop edi
add esp, 0x20c
ret

Function at 0x401ce0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
push edi
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x44]
lea edx, [esp + 4]
push edx
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0x40
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x4081fc
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], 0x4081f0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
xor eax, eax
pop edi
add esp, 0x3c
ret
Function at 0x401dd0
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
lea eax, [esp]
push esi
push eax
xor esi, esi
mov dword [esp + 8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x401df8
pop esi
add esp, 0x94
ret
mov eax, dword [esp + 0x14]
cmp eax, 1
jne 0x401e44
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x401e18
mov esi, 2
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 0xa
jne 0x401e2c
mov esi, 3
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 0x5a
jne 0x401ecf
mov esi, 4
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 2
jne 0x401ecf
mov eax, dword [esp + 8]
cmp eax, 3
jne 0x401e65
mov esi, 1
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 4
jne 0x401e79
mov esi, 5
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 5
jne 0x401ebd
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x401e95
mov esi, 6
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 1
jne 0x401ea9
mov esi, 7
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 2
jne 0x401ecf
mov esi, 8
mov eax, esi
pop esi
add esp, 0x94
ret
cmp eax, 6
jne 0x401ecf
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x401ecf
mov esi, 9
mov eax, esi
pop esi
add esp, 0x94
ret
Function at 0x401000
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x570b18
push eax
push dword fs:[0]
mov dword fs:[0], esp
xor eax, eax
mov dword [eax], ecx
push eax
inc ebp
inc ebx
outsd dx, dword [esi]
insd dword es:[edi], dx
jo 0x401080
arpl word [edx + esi], si
adc ebx, dword [edi - 0x54]
xchg ebx, eax
neg dl
push cs
dec edx
bound ebx, qword ds:[0xa8498464]
or al, 0x99
mov dl, 0xf5
imul esi, dword [0xe7af52d4], 0xdfebb982
sub eax, 0x555fdd1b
in eax, dx
mov esi, 0x79bacb51
push es
into
mov ecx, 0x357c306
fcom dword [edx + 0x633e8366]
iretd
or dword [eax - 0x19729186], esp
sub dword [ebx], 0xffffffb8
movmskps edx, xmm3
mov ebp, 0x43067a23
stc
or esp, dword [ecx - 0x73]
and eax, dword [ebp - 0x5d]
lds eax, [edx]
xchg ebp, eax
dec ebp
sub dword [esi - 0x435fef1d], edx
out dx, al
push edi
cmpsb byte [esi], byte es:[edi]
clc
daa
push ds
daa
sub dword [ecx + 0x21cb2f20], edx
xor edi, dword [esp + ebx*4]
xor byte [eax], dh
mov eax, dword [0xcbc22f70]
stosd dword es:[edi], eax
add byte [ecx - 0xa], bh
invalid

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

Disassembly:
pushal
mov eax, section..reloc
nop
mov ebx, 0x408ecc
nop
mov ecx, 0x2e2424a4
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x430024
nop
mov eax, section..data
nop
nop
mov ebx, 0x42e1d0
mov ecx, 0x631c563c
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43006c
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x401000
Capabilities:
Get graphical window text
Query environment variable
Write file on windows

Disassembly:
push 0
push 0
call dword [sym.imp.USER32.dll_FindWindowW]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push 0
push 0
push 0

Function at 0x401310
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x32c
mov eax, dword [0x409030]
push ebx
push esi
push edi
mov dword [esp + 0x334], eax
mov word [esp + 0x128], 0
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x12a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push 0x104
lea eax, [esp + 0x12c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push 0
push 0
push 3
Function at 0x40262c
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4071b8
call fcn.004029b8
mov edi, 0x94
mov eax, edi
call fcn.004036c0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x409f58], ecx
mov eax, dword [esi + 4]
mov dword [0x409f64], eax
mov edx, dword [esi + 8]
mov dword [0x409f68], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x409f5c], esi
cmp ecx, 2
je 0x40268c
or esi, 0x8000
mov dword [0x409f5c], esi
shl eax, 8
add eax, edx
mov dword [0x409f60], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4026c7
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4026c7
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4026df
cmp eax, 0x20b
je 0x4026cc
mov dword [ebp - 0x1c], esi
jmp 0x4026f3
cmp dword [ecx + 0x84], 0xe
jbe 0x4026c7
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4026ed
cmp dword [ecx + 0x74], 0xe
jbe 0x4026c7
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040366a
pop ecx
test eax, eax
jne 0x40271f
cmp dword [0x409f44], 1
jne 0x40270c
call fcn.00402e1f
push 0x1c
call fcn.00402ca8
push 0xff
call fcn.00402b0d
pop ecx
pop ecx
call fcn.004035c8
mov dword [ebp - 4], esi
call fcn.0040341d
test eax, eax
jge 0x402738
push 0x1b
call fcn.00402607
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40a4d4], eax
call fcn.004032fb
mov dword [0x409f3c], eax
call fcn.00403259
test eax, eax
jge 0x40275e
push 8
call fcn.00402607
pop ecx
call fcn.00403026
test eax, eax
jge 0x40276f
push 9
call fcn.00402607
pop ecx
push 1
call fcn.00402b3d
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x402785
push eax
call fcn.00402607
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00402fc9
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4027a6
movzx eax, word [ebp - 0x40]
jmp 0x4027a9
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004020d0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4027c7
push edi
call fcn.00402c68
call fcn.00402c8a
jmp 0x4027f9
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004029f3
ret
Function at 0x402ba7
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x409f98], esi
push edi
jne 0x402bc7
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x409f94], esi
mov byte [0x409f90], al
jne 0x402c2d
mov ecx, dword [0x40a4c8]
test ecx, ecx
je 0x402c0e
mov eax, dword [0x40a4c4]
sub eax, 4
cmp eax, ecx
jmp 0x402c07
mov eax, dword [eax]
test eax, eax
je 0x402bf9
call eax
mov eax, dword [0x40a4c4]
sub eax, 4
cmp eax, dword [0x40a4c8]
mov dword [0x40a4c4], eax
jae 0x402bf1
mov eax, 0x40901c
mov esi, 0x409020
cmp eax, esi
mov edi, eax
jae 0x402c2d
mov eax, dword [edi]
test eax, eax
je 0x402c26
call eax
add edi, 4
cmp edi, esi
jb 0x402c1e
mov eax, 0x409024
mov esi, 0x409028
cmp eax, esi
mov edi, eax
jae 0x402c4c
mov eax, dword [edi]
test eax, eax
je 0x402c45
call eax
add edi, 4
cmp edi, esi
jb 0x402c3d
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x402c66
push dword [ebp + 8]
mov dword [0x409f98], 1
call fcn.00402b0d
pop ebp
ret

Function at 0x402ca8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x409030]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x409040]
je 0x402cdd
inc eax
cmp eax, 0x13
jb 0x402cce
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x409040]
jne 0x402e03
mov eax, dword [0x409f44]
cmp eax, 1
je 0x402ddb
cmp eax, edx
jne 0x402d0d
cmp dword [0x409038], 1
je 0x402ddb
cmp ecx, 0xfc
je 0x402e03
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x402d43
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00403800
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00403a30
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x402d77
mov eax, edi
push eax
call fcn.00403a30
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4071fc
push edi
call fcn.00403900
add esp, 0x10
push edi
call fcn.00403a30
push dword [esi + 0x409044]
mov ebx, eax
call fcn.00403a30
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004036c0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00403800
push edi
push ebx
call fcn.00403810
push 0x4071f8
push ebx
call fcn.00403810
push dword [esi + 0x409044]
push ebx
call fcn.00403810
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004036fd
add esp, 0x2c
jmp 0x402e03
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x409044]
push dword [esi]
call fcn.00403a30
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.004025f9
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4036fd
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40a0b4], ebx
push esi
push edi
jne 0x40377d
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4037b8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x40a0b4], eax
je 0x4037b8
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40a0b8], eax
call esi
cmp dword [0x409f58], 2
mov dword [0x40a0bc], eax
jne 0x40377d
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40a0c4], eax
je 0x40377d
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40a0c0], eax
mov eax, dword [0x40a0c0]
test eax, eax
je 0x4037c2
call eax
test eax, eax
je 0x4037a9
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40a0c4]
test eax, eax
je 0x4037a9
test byte [ebp - 8], 1
jne 0x4037c2
cmp dword [0x409f64], 4
jb 0x4037bc
or byte [ebp + 0x12], 0x20
jmp 0x4037e1
xor eax, eax
jmp 0x4037f1
or byte [ebp + 0x12], 4
jmp 0x4037e1
mov eax, dword [0x40a0b8]
test eax, eax
je 0x4037e1
call eax
mov ebx, eax
test ebx, ebx
je 0x4037e1
mov eax, dword [0x40a0bc]
test eax, eax
je 0x4037e1
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40a0b4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403baa
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x403bd8
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x403bdf
cmp ebx, dword [eax + 4]
jae 0x403bdf
xor eax, eax
jmp 0x403dcf
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x403bf0
xor eax, eax
inc eax
jmp 0x403dce
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x403c06
cmp ecx, edx
jae 0x403d4b
cmp dword [eax + 4], 0
je 0x403c0f
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x403bf7
cmp dword [ebp + 8], 0
je 0x403c31
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x403d4b
cmp eax, esi
jae 0x403d4b
mov eax, dword [0x40a0c8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x403c56
cmp dword [esi*4 + 0x40a0d0], edi
je 0x403d4f
inc esi
cmp esi, eax
jl 0x403c44
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403dcb
cmp dword [ebp - 8], 0x1000000
jne 0x403dcb
test byte [ebp - 0xc], 0xcc
je 0x403cd4
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x403dcb
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x403dcb
cmp word [eax + 0x18], 0x10b
jne 0x403dcb
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x403dcb
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x403cd4
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x403cd4
test byte [ecx + 0x27], 0x80
jne 0x403d4b
push 1
push 0x40a110
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x403be8
mov ecx, dword [0x40a0c8]
test ecx, ecx
mov edx, ecx
jle 0x403d08
lea eax, [ecx*4 + 0x40a0cc]
cmp dword [eax], edi
je 0x403d08
dec edx
sub eax, 4
test edx, edx
jg 0x403cfc
test edx, edx
jne 0x403d39
push 0xf
pop ebx
cmp ecx, ebx
jg 0x403d15
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x403d2d
lea eax, [edx*4 + 0x40a0d0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x403d1b
cmp ecx, 0x10
jge 0x403d39
inc ecx
mov dword [0x40a0c8], ecx
push 0
push 0x40a110
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x403be8
xor eax, eax
jmp 0x403dce
test esi, esi
jle 0x403be8
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40a110
call ebx
test eax, eax
jne 0x403be8
cmp dword [esi*4 + 0x40a0d0], edi
je 0x403da5
mov eax, dword [0x40a0c8]
lea esi, [eax - 1]
test esi, esi
jl 0x403d93
cmp dword [esi*4 + 0x40a0d0], edi
je 0x403d8f
dec esi
jns 0x403d83
test esi, esi
jge 0x403da3
cmp eax, 0x10
jge 0x403d9e
inc eax
mov dword [0x40a0c8], eax
lea esi, [eax - 1]
jmp 0x403da5
je 0x403dbd
xor ecx, ecx
test esi, esi
jl 0x403dbd
lea eax, [ecx*4 + 0x40a0d0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x403dab
push 0
push 0x40a110
call ebx
jmp 0x403be8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405ebc
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004036c0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x405f57
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x409f58]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x405f57
cmp eax, 1
je 0x405f78
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x405f57
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x405f24
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x405f53
xor eax, eax
inc eax
jmp 0x405f97
cmp edi, eax
jae 0x405f5b
xor eax, eax
jmp 0x405f97
cmp eax, esi
jae 0x405f62
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x409f58]
jmp 0x405f7b
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401850
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x644a10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x40], edx
test cl, 0xf
je 0x401885
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2129
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [ebx]
mov dword [ebp - 0x24], edi
mov edi, dword [ebx + 4]
mov dword [ebp - 0x20], edi
mov edi, dword [ebx + 8]
shr ecx, 4
mov dword [ebp - 0x1c], edi
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x18], edi
test ecx, ecx
jle 0x40192b
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x4018b6
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp - 0x14], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x10], edx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
xor eax, eax
nop
movzx ecx, byte [ebp + eax - 0x24]
movzx edx, byte [ebp + eax - 0x23]
xor byte [ebp + eax - 0x14], cl
xor byte [ebp + eax - 0x13], dl
movzx ecx, byte [ebp + eax - 0x22]
movzx edx, byte [ebp + eax - 0x21]
xor byte [ebp + eax - 0x12], cl
xor byte [ebp + eax - 0x11], dl
add eax, 4
cmp eax, 0x10
jb 0x4018d0
lea ebx, [ebp - 0x3c]
lea eax, [ebp - 0x14]
call fcn.00402ea0
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
add dword [ebp - 0x28], 0x10
dec dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], eax
jne 0x4018b3
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x34]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [edx + 8], ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov dword [edx + 0xc], eax
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.005b2129
mov esp, ebp
pop ebp
ret
Function at 0x401aa0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x644a10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x28], 0
cmp eax, ebx
je 0x401ada
push esi
push eax
push ebx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
mov edx, dword [edi]
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
mov dword [ebp - 0x14], edx
mov edx, dword [edi + 0xc]
mov dword [ebp - 0x10], eax
lea eax, [esi - 0x10]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 0x38], eax
cmp esi, 0x10
jbe 0x401ba7
mov dword [ebp - 0x28], 0
test eax, eax
je 0x401ba7
lea eax, [ebp - 0x23]
sub eax, ebx
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp - 0x34]
lea ebx, [ebp - 0x24]
lea eax, [ebp - 0x14]
call fcn.00402ea0
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0x28]
add eax, esi
mov edi, 4
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + eax - 1]
xor byte [eax], dl
movzx edx, byte [ecx + eax]
xor byte [eax + 1], dl
movzx edx, byte [ecx + eax + 1]
mov cl, byte [ecx + eax + 2]
xor byte [eax + 2], dl
xor byte [eax + 3], cl
add eax, 4
dec edi
jne 0x401b35
mov eax, 0xf
inc byte [ebp + eax - 0x14]
jne 0x401b94
test eax, eax
je 0x401b94
inc byte [ebp + eax - 0x15]
jne 0x401b94
lea edx, [eax - 1]
test edx, edx
je 0x401b94
inc byte [ebp + eax - 0x16]
jne 0x401b94
cmp eax, 2
je 0x401b94
inc byte [ebp + eax - 0x17]
jne 0x401b94
lea ecx, [eax - 3]
test ecx, ecx
je 0x401b94
sub eax, 4
jns 0x401b60
sub dword [ebp - 0x2c], 0x10
add esi, 0x10
mov dword [ebp - 0x28], esi
cmp esi, dword [ebp - 0x38]
jb 0x401b17
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp - 0x34]
lea ebx, [ebp - 0x24]
lea eax, [ebp - 0x14]
call fcn.00402ea0
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp + 0xc]
add eax, edx
sub esi, edx
je 0x401bd9
mov ecx, ebx
sub ecx, eax
jmp 0x401bd0
mov dl, byte [eax + ecx]
xor byte [eax], dl
inc eax
dec esi
jne 0x401bd0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005b2129
mov esp, ebp
pop ebp
ret