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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x4e143b
cmp dword [ebp - 8], 0
jne 0x4e1445
xor eax, eax
mov dword [ebp - 0x10], eax
jmp 0x4e15a7
xor dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xc], 8
jb 0x4e156c
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 1]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 2]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 3]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 4]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 5]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 6]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 7]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
add dword [ebp - 8], 8
sub dword [ebp - 0xc], 8
cmp dword [ebp - 0xc], 8
jae 0x4e1453
cmp dword [ebp - 0xc], 0
jbe 0x4e159e
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
xor eax, dword [ebp - 4]
and eax, 0xff
mov eax, dword [eax*4 + 0x5bea58]
mov edx, dword [ebp - 4]
shr edx, 8
xor eax, edx
mov dword [ebp - 4], eax
inc dword [ebp - 8]
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
ja 0x4e1572
mov eax, dword [ebp - 4]
xor eax, 0xffffffff
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret

Function at 0x4f3ca4
Capabilities:
Check for vm using instruction vpcext

Disassembly:
sti
mov edi, 0x81efc09e
dec esp
sti
invalid
Function at 0x6597ad
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x661418
cmp edx, dword [eax]
je 0x6597cf
add eax, 8
inc ecx
cmp eax, 0x6614a8
jl 0x6597c0
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x661418]
jne 0x6598fd
mov eax, dword [0xa5bf78]
cmp eax, 1
je 0x6598d7
test eax, eax
jne 0x659800
cmp dword [0x661344], 1
je 0x6598d7
cmp edx, 0xfc
je 0x6598fd
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x659837
lea eax, [ebp - 0x1a4]
push 0x65e978
push eax
call fcn.0065a190
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0065a620
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x65987a
lea eax, [ebp - 0x1a4]
push eax
call fcn.0065a620
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x65e974
push edi
call fcn.0065c4f0
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x65e958
push eax
call fcn.0065a190
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0065a1a0
lea eax, [ebp - 0xa0]
push 0x65e954
push eax
call fcn.0065a1a0
push dword [esi + 0x66141c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0065a1a0
push 0x12010
lea eax, [ebp - 0xa0]
push 0x65e92c
push eax
call fcn.0065c464
add esp, 0x2c
pop edi
jmp 0x6598fd
lea eax, [ebp + 8]
lea esi, [esi + 0x66141c]
push 0
push eax
push dword [esi]
call fcn.0065a620
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]
pop esi
leave
ret

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

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..reloc
nop
nop
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x433072
mov ebx, 0x40de38
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x78773c37
nop
nop
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x433060
nop
nop
mov eax, section..text
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x4330d2
nop
mov ebx, 0x4304d8
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x3c077bfe
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x4330c0
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x473d1e
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x50000
call fcn.00441f50
push ebx
push edi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20004]
push eax
push 0x7fff
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetFullPathNameW]
test eax, eax
je 0x473dd4
lea eax, [ebp - 0x20004]
push eax
lea eax, [ebp - 0x10004]
push 0x4c6e30
push eax
call fcn.0041fb21
lea eax, [ebp - 0x10004]
push eax
call fcn.00424963
mov ebx, eax
add esp, 0x10
cmp word [ebp + ebx*2 - 0x10006], 0x5c
jne 0x473d97
cmp word [ebp + ebx*2 - 0x10008], 0x3a
je 0x473d97
xor eax, eax
mov word [ebp + ebx*2 - 0x10006], ax
xor edi, edi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x473dac
cmp byte [ebp + 0x10], al
je 0x473dd4
push edi
push 0x2200000
push 3
push edi
push edi
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x473ddc
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
xor eax, eax
pop edi
pop ebx
leave
ret 0xc
push 0x2fffa
lea eax, [ebp - 0x50000]
push 0
push eax
call fcn.00422340
lea eax, [ebx + ebx]
mov dword [ebp - 0x50000], 0xa0000003
mov word [ebp - 0x4fff6], ax
add eax, 2
mov word [ebp - 0x4fff4], ax
lea eax, [ebp - 0x10004]
push 0x7fff
push eax
lea eax, [ebp - 0x4fff0]
push eax
call fcn.0042d2eb
mov eax, dword [ebp - 0x4fff6]
lea ecx, [ebp + 8]
add esp, 0x18
xor edx, edx
add eax, 0xc
mov word [ebp - 0x4fffc], ax
movzx eax, ax
push edx
push ecx
push edx
push edx
add eax, 8
push eax
lea eax, [ebp - 0x50000]
push eax
push 0x900a4
push edi
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
push edi
test eax, eax
jne 0x473e6b
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x473dcb
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
inc eax
jmp 0x473dd6
Function at 0x403270
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x45fbec]
mov ecx, dword [0x45f67c]
push ebx
shr eax, 3
push esi
push edi
test eax, eax
jbe 0x4032e9
mov edi, dword [sym.imp.KERNEL32.dll_GetDevicePowerState]
mov ebx, dword [sym.imp.KERNEL32.dll_GetCalendarInfoW]
mov esi, ecx
mov dword [ebp - 4], eax
cmp dword [0x45fbec], 0x959
jne 0x4032da
push 0
push 0
call edi
push 0
push 0
push 0
push 0
push 0
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoW]
push esi
call fcn.00403030
add esi, 8
sub dword [ebp - 4], 1
jne 0x40329a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403300
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Execute shellcode via windows callback function
Get disk information
Get disk size
Get file attributes
Get hostname
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4558e8
push eax
mov eax, 0x1034
mov dword fs:[0], esp
call fcn.0040f200
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
xor esi, esi
nop
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call edi
cmp esi, 0xb7e4ee2
jg 0x40334a
inc esi
cmp esi, 0x73f04bd
jl 0x403330
cmp dword [0x45fbec], 0x400
jne 0x4033f4
push ebx
lea eax, [ebp - 0x840]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextVolumeMountPointW]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumTimeFormatsA]
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x10]
push ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_BackupWrite]
xor edx, edx
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], ebx
mov word [ebp - 0x3c], dx
push ebx
push ebx
mov dword [ebp - 4], ebx
call fcn.00403ac4
push ebx
call fcn.00403e88
add esp, 0xc
push ebx
push ebx
push ebx
call fcn.00404151
add esp, 0xc
push ebx
call fcn.00404059
add esp, 4
push ebx
call fcn.0040424d
push ecx
mov eax, esp
mov dword [eax], ebx
mov dword [eax + 4], ebx
sub esp, 8
mov eax, esp
mov dword [eax], ebx
mov dword [eax + 4], ebx
call fcn.00403ab0
fstp st(0)
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x28], 8
jb 0x4033f4
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00403d45
add esp, 4
cmp dword [0x45fbec], 0x93
jne 0x403469
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
xor eax, eax
btr dword [eax], 0
push ebx
call dword [sym.imp.ADVAPI32.dll_ReadEventLogW]
call dword [sym.imp.ole32.dll_CoSuspendClassObjects]
call dword [sym.imp.WINHTTP.dll_WinHttpCheckPlatform]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateJobSet]
push ebx
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push ebx
push ebx
call fcn.00403c29
call fcn.00403aa7
push ebx
call fcn.00403c08
add esp, 0xc
push ebx
call fcn.00403c1e
add esp, 4
push ebx
push ebx
call fcn.00403e67
add esp, 8
call fcn.004032f0
push ebx
call fcn.004042c9
add esp, 4
mov eax, dword [0x45fbec]
mov edx, dword [0x45ad34]
push 0x40
add eax, 0x1134b
push 0x1000
push eax
push ebx
mov dword [0x460a28], edx
mov dword [0x45fbec], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x45f67c], eax
mov esi, 0x1692e
lea ecx, [ecx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub esi, 1
jne 0x4034a0
cmp dword [0x45fbec], ebx
jbe 0x403543
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
Function at 0x4075f0
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4575a8]
jne 0x4075fa
repz ret
jmp fcn.0040bfc3

Function at 0x40bc7e
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004083d2
and dword [ebp - 4], 0
cmp dword [0x45d628], 0
mov ebx, eax
jne 0x40bd2f
push 0x401b70
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40bde0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x401b64
push edi
call esi
test eax, eax
je 0x40bde0
push eax
call fcn.00408360
mov dword [esp], 0x401b54
push edi
mov dword [0x45d628], eax
call esi
push eax
call fcn.00408360
mov dword [esp], 0x401b40
push edi
mov dword [0x45d62c], eax
call esi
push eax
call fcn.00408360
mov dword [esp], 0x401b24
push edi
mov dword [0x45d630], eax
call esi
push eax
call fcn.00408360
pop ecx
mov dword [0x45d638], eax
test eax, eax
je 0x40bd2f
push 0x401b0c
push edi
call esi
push eax
call fcn.00408360
pop ecx
mov dword [0x45d634], eax
mov eax, dword [0x45d634]
cmp eax, ebx
je 0x40bd87
cmp dword [0x45d638], ebx
je 0x40bd87
push eax
call fcn.004083db
push dword [0x45d638]
mov esi, eax
call fcn.004083db
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40bd87
test edi, edi
je 0x40bd87
call esi
test eax, eax
je 0x40bd7e
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40bd7e
test byte [ebp - 0xc], 1
jne 0x40bd87
or dword [ebp + 0x10], 0x200000
jmp 0x40bdc0
mov eax, dword [0x45d62c]
cmp eax, ebx
je 0x40bdc0
push eax
call fcn.004083db
pop ecx
test eax, eax
je 0x40bdc0
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40bdc0
mov eax, dword [0x45d630]
cmp eax, ebx
je 0x40bdc0
push eax
call fcn.004083db
pop ecx
test eax, eax
je 0x40bdc0
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x45d628]
call fcn.004083db
pop ecx
test eax, eax
je 0x40bde0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40bde2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4016e6
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push esi
lea eax, [ebp - 0x210]
push edi
push 0x105
push eax
push dword [0x40a10c]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x108]
push ecx
push 0xe4
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x401726
cmp eax, 0xe4
jbe 0x401770
push 0
lea eax, [ebp - 0x108]
push 0
lea ecx, [ebp - 0x210]
push 0
push eax
push ecx
call fcn.00405bf2
add esp, 0x14
lea ecx, [ebp - 0x108]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
push 0
push ecx
call esi
lea ecx, [ebp + eax - 0x108]
lea eax, [ebp - 0x210]
push ecx
push 0
push eax
call fcn.00405bf2
add esp, 0x14
jmp 0x401776
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x108]
push eax
call esi
cmp byte [ebp + eax - 0x109], 0x5c
je 0x40179f
push 0x415078
lea eax, [ebp - 0x108]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call esi
jmp 0x4017a5
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x40a210
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x401854
push 0x58
push 0
push 0x40a1b0
call fcn.00405bb0
add esp, 0xc
mov edi, 0x2f
push 0x41507c
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40184b
mov ecx, dword [0x40a10c]
mov edx, dword [0x415004]
lea edi, [ebp - 0x210]
mov dword [0x40a1b0], ecx
mov dword [0x40a1b4], edx
mov dword [0x40a1b8], edi
mov dword [0x40a1c0], 0x401861
push 0x40a1b0
mov dword [0x40a1bc], edi
mov dword [0x40a1c4], 0x40193d
mov dword [0x40a1c8], 0x4028d3
mov dword [0x40a1ec], 0x40412a
call eax
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x401859
mov edi, 9
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x402070
Capabilities:
Read file on windows

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor esi, esi
push ebp
xor edi, edi
cmp dword [esp + 0x18], esi
je 0x4020df
push edi
mov eax, dword [0x412b4c]
push edi
push eax
push dword [0x412b64]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40209f
mov edi, 1
call fcn.00401f0c
test eax, eax
je 0x4020f6
call fcn.00401fa0
test eax, eax
je 0x4020f6
mov dword [0x413024], 0
mov byte [0x40a7a0], 0
push 0x24
push 0
push 0x412ff0
call fcn.00405bb0
mov dword [0x40a8b0], 0
add esp, 0xc
jmp 0x4020fb
push 0
mov eax, dword [0x412b64]
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4020fb
mov edi, 1
test edi, edi
jne 0x4022ac
cmp dword [0x413154], 0
je 0x4022ac
cmp dword [0x40a8ac], 0
je 0x4022ac
test edi, edi
jne 0x4022ac
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, word [0x412b46]
cmp eax, dword [0x40a8b0]
jle 0x4022ac
lea eax, [esp + 0x10]
push 0
push eax
push 0x2e
push 0x40a760
push dword [0x412b64]
call ebx
mov ecx, dword [0x412ecc]
cmp eax, 1
jne 0x40229f
cmp dword [esp + 0x10], 0x2e
jne 0x40229f
cmp dword [0x40a760], 0x2014b50
jne 0x40227f
movsx edx, word [0x40a77c]
movsx eax, word [0x40a77e]
add edx, eax
push 2
movsx eax, word [0x40a780]
lea ebp, [edx + eax]
mov eax, dword [0x413154]
lea ecx, [ebp + ecx + 0x2e]
push ecx
mov dword [0x412ecc], ecx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
test eax, eax
je 0x402278
push eax
mov dword [0x413154], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [0x413028], eax
test eax, eax
je 0x402271
mov eax, dword [0x40a8b0]
push eax
push dword [0x40a8ac]
call fcn.00401c13
add esp, 8
mov ecx, dword [0x413028]
add ecx, eax
push 0x2e
push 0x40a760
mov dword [0x413028], ecx
push ecx
call fcn.00405f44
lea ecx, [esp + 0x1c]
add esp, 0xc
mov eax, dword [0x413028]
push 0
add eax, 0x2e
push ecx
push ebp
mov dword [0x413028], eax
push eax
push dword [0x412b64]
call ebx
test eax, eax
je 0x40224f
cmp ebp, dword [esp + 0x10]
jne 0x40224f
inc esi
mov eax, dword [0x412ecc]
push eax
inc dword [0x40a8b0]
push dword [0x40a8b0]
push dword [0x40a8ac]
call fcn.00401c3d
add esp, 0xc
jmp 0x402259
mov esi, 0xffffffff
mov edi, 1
mov eax, dword [0x413154]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [0x413028], 0
jmp 0x4022a4
mov esi, 0xffffffff
jmp 0x40229f
mov esi, 0xffffffff
jmp 0x40229f
cmp dword [0x40a760], 0x4034b50
jne 0x40229f
cmp word [0x412b46], 0x7fff
jne 0x40229f
mov word [0x412b46], 0
mov edi, 1
test edi, edi
je 0x40212b
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x402579
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
xor ebx, ebx
push 0x415218
call fcn.00404413
mov esi, dword [esp + 0x14]
add esp, 4
movzx edi, byte [esi + ebx]
inc ebx
call fcn.00404391
xor edi, eax
push edi
call fcn.004043aa
add esp, 4
cmp ebx, 0xc
jl 0x40258f
test byte [0x412c86], 8
je 0x4025c1
mov ax, word [0x412c8a]
shr ax, 8
movzx eax, ax
jmp 0x4025cc
mov eax, dword [0x40a770]
shr eax, 0x10
movzx eax, ah
movzx ecx, di
cmp ecx, eax
je 0x4025da
mov eax, 0xffffffff
jmp 0x402623
mov eax, dword [0x412b3c]
cmp dword [0x40a904], eax
jge 0x4025ef
mov esi, dword [0x40a904]
jmp 0x4025f5
mov esi, dword [0x412b3c]
mov edi, dword [0x412ed0]
mov eax, esi
dec esi
test eax, eax
je 0x402621
call fcn.00404391
mov ebx, eax
movzx eax, byte [edi]
xor ebx, eax
push ebx
call fcn.004043aa
add esp, 4
mov eax, esi
dec esi
mov byte [edi], bl
inc edi
test eax, eax
jne 0x402602
xor eax, eax
pop edi
pop esi
pop ebx
ret

Function at 0x402681
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov eax, dword [0x412c92]
mov ebp, esp
mov dword [0x40a904], eax
sub esp, 4
mov eax, dword [0x412c96]
mov dword [0x415284], 0
push esi
mov dword [0x40a8b8], eax
test byte [0x412c86], 8
push edi
je 0x4026de
mov eax, dword [0x40a770]
mov ecx, dword [0x40a774]
mov edx, dword [0x40a778]
mov dword [0x412c8e], eax
mov dword [0x412c92], ecx
mov dword [0x412c96], edx
mov dword [0x40a904], ecx
mov dword [0x40a8b8], edx
movsx ecx, word [0x412c9a]
movsx eax, word [0x412c9c]
add ecx, eax
mov edx, dword [0x40a78a]
lea edi, [ecx + edx + 0x1e]
mov ecx, 0x2800
mov eax, edi
cdq
idiv ecx
mov esi, edx
mov eax, edi
sub eax, esi
test edi, edi
jl 0x40282f
push 0
push 0
push eax
push dword [0x412b68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 4]
push ecx
mov dword [0x413030], eax
push 0x2800
mov eax, dword [0x412b38]
push eax
push dword [0x412b68]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402825
cmp dword [ebp - 4], 0
je 0x402825
mov eax, dword [0x412b38]
add eax, esi
mov dword [0x412ed0], eax
mov eax, dword [ebp - 4]
and eax, 0xffff
sub eax, esi
test byte [0x40a786], 8
mov dword [0x412b3c], eax
je 0x402783
mov eax, 0x2e
jmp 0x402834
cmp dword [0x415214], 0
je 0x402799
call fcn.00402627
test eax, eax
jne 0x402834
mov ecx, dword [0x4150f8]
test ecx, ecx
jne 0x4027c1
cmp dword [0x4150b0], 0
jne 0x4027c1
push dword [ebp + 8]
call fcn.0040444f
add esp, 4
mov esi, eax
mov ecx, dword [0x4150f8]
jmp 0x4027cd
mov dword [0x412ca8], 0xffffffff
xor esi, esi
test esi, esi
jne 0x4027eb
call fcn.0040416a
mov esi, eax
mov ecx, dword [0x4150f8]
test esi, esi
jne 0x4027eb
cmp dword [0x41508c], 0
je 0x402821
cmp dword [0x412ca8], 0xffffffff
je 0x402806
mov eax, dword [0x412ca8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x4150f8]
test ecx, ecx
jne 0x402821
cmp dword [0x4150b0], 0
jne 0x402821
cmp esi, 0x32
jne 0x402821
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, esi
jmp 0x402834
mov dword [0x412b3c], 0
mov eax, 3
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x403952
Capabilities:
Read file on windows

Disassembly:
sub esp, 4
cmp dword [0x412b54], 0
push esi
je 0x403966
xor eax, eax
jmp 0x403aa3
push dword [esp + 0xc]
mov esi, 0xffffffff
mov dword [0x412ec8], esi
call fcn.00401996
add esp, 4
cmp eax, 0xfffffffd
jne 0x4039c4
mov word [0x412b40], si
xor eax, eax
mov word [0x412b42], ax
mov dword [0x412b48], eax
mov word [0x412b44], ax
mov dword [0x412b4c], eax
mov dword [0x412b54], 1
mov word [0x412b46], 0x7fff
mov word [0x412b50], ax
call fcn.00401e19
jmp 0x403aa3
cmp eax, 0xfffffffc
jne 0x4039d5
mov ecx, 2
mov esi, 5
jmp 0x4039ed
cmp eax, 0xffffffff
jne 0x4039e6
mov ecx, 2
mov esi, 3
jmp 0x4039ed
mov ecx, 1
xor esi, esi
cmp ecx, 1
jne 0x403a0a
mov ecx, 2
cmp eax, 0xffffffff
jne 0x403a03
mov esi, 3
jmp 0x403a05
xor esi, esi
cmp ecx, 1
je 0x4039f2
test esi, esi
jne 0x403aa1
push 0
mov dword [0x412ec8], eax
push 0
add eax, 4
push eax
push dword [0x412b64]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 4]
push 0
push ecx
push 0x12
push 0x412b40
push dword [0x412b64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403a92
cmp dword [esp + 4], 0
je 0x403a92
mov dword [0x412b54], 1
cmp word [0x412b40], 0
jne 0x403a9c
mov ax, word [0x412b40]
cmp word [0x412b42], ax
je 0x403aa1
mov ax, word [0x412b46]
cmp word [0x412b44], ax
jne 0x403aa1
xor eax, eax
mov word [0x412b40], ax
mov word [0x412b42], ax
jmp 0x403aa1
mov dword [0x412ec8], 0xffffffff
mov esi, 3
mov eax, esi
pop esi
add esp, 4
ret

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

Disassembly:
mov ecx, dword [0x40a750]
xor ecx, dword [esp + 4]
and ecx, 0xff
mov eax, dword [ecx*4 + 0x4155c8]
mov ecx, dword [0x40a750]
shr ecx, 8
xor eax, ecx
mov dword [0x40a750], eax
and eax, 0xff
add dword [0x40a754], eax
mov eax, dword [0x40a754]
imul eax, eax, 0x8088405
inc eax
mov ecx, dword [0x40a758]
shr ecx, 8
mov dword [0x40a754], eax
shr eax, 0x18
xor eax, dword [0x40a758]
and eax, 0xff
mov eax, dword [eax*4 + 0x4155c8]
xor eax, ecx
mov dword [0x40a758], eax
ret

Function at 0x40444f
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp dword [0x415090], 0
push esi
mov esi, dword [esp + 8]
je 0x404490
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404490
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x404489
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404490
mov eax, 0x1c
jmp 0x4044b7
mov eax, 0x1c
jmp 0x4044b7
push 0
push 0x8000020
push 2
push 0
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x412ca8], eax
inc eax
cmp eax, 1
sbb eax, eax
and eax, 0x1c
pop esi
ret