joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402520
Capabilities:
Create process on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
push 0x20a
push 8
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
push 0x104
push eax
push 0
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x26a
push 8
call ebx
push eax
call esi
push dword [ebp - 4]
mov edi, eax
push str._c___s_
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteW]
add esp, 0xc
push 0
push 0
push edi
push str.cmd.exe
push str.runas
push 0
call esi
cmp eax, 0x20
jl 0x402576
push dword [ebp - 4]
push 0
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
push edi
push 0
call ebx
push eax
call esi
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4025b0
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
push 0x4000000
xor edi, edi
mov dword [ebp - 0x814], edx
push edi
push edi
push edi
push edi
mov esi, ecx
mov dword [ebp - 0x818], eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x81c], eax
test eax, eax
je 0x4026f9
push edi
push edi
push edi
push edi
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x810], eax
test eax, eax
je 0x4026ed
xor esi, esi
mov dword [ebp - 0x808], 0xffffffff
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x80c], esi
nop dword [eax + eax]
lea ecx, [ebp - 0x808]
push ecx
push 0x800
lea ecx, [ebp - 0x804]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
add edi, dword [ebp - 0x808]
lea eax, [edi + 1]
push eax
test esi, esi
jne 0x402665
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x402671
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
push dword [ebp - 0x808]
mov esi, eax
lea eax, [ebp - 0x804]
push eax
mov eax, dword [ebp - 0x80c]
add eax, esi
push eax
call fcn.00409c70
mov eax, dword [ebp - 0x808]
add esp, 0xc
add dword [ebp - 0x80c], eax
test eax, eax
mov eax, dword [ebp - 0x810]
jne 0x402630
push edi
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x814]
push edi
push esi
mov dword [ecx], eax
mov eax, dword [ebp - 0x818]
mov dword [eax], edi
push dword [ecx]
call fcn.00409c70
add esp, 0xc
mov edi, 1
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x810]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop ebx
push dword [ebp - 0x81c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.00406f60
mov esp, ebp
pop ebp
ret
Function at 0x402710
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [ebp + 8]
lea edx, [esp - 0x20]
sub esp, 0x20
call section..text
test eax, eax
je 0x402785
push dword [esp + 0x10]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40277d
cmp dword [esp + 0x14], 0
je 0x402754
call fcn.004024b0
test eax, eax
je 0x40278b
push dword [esp + 0xc]
movzx edx, word [esp + 4]
push dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
call fcn.00401420
add esp, 8
cmp dword [esp + 0x18], 0
je 0x40277d
mov ecx, dword [esp + 0x1c]
call fcn.00401860
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov esp, ebp
pop ebp
ret 0x10
call fcn.00402520
int3
Function at 0x404580
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x40458b
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x404647
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
sub edi, 1
jne 0x4045a0
pop edi
test esi, esi
je 0x40466a
nop dword [eax + eax]
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
sub esi, 1
jne 0x404650
not ecx
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x404f30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edx
mov ebx, esi
mov dword [ebp - 0xc], esi
imul ebx, dword [ebp + 8]
mov eax, ecx
mov dword [ebp - 8], eax
cmp byte [edi], 0
je 0x404f8c
push 0
lea ecx, [ebp - 8]
push ecx
push ebx
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404f74
mov byte [edi + 8], 1
mov eax, dword [ebp - 8]
xor edx, edx
pop edi
div esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406f60
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x1c]
mov esi, dword [edi + 0x18]
mov ecx, dword [edi + 0x14]
sub esi, edx
lea eax, [edx + ebx]
cmp eax, dword [edi + 0x18]
cmovbe esi, ebx
add ecx, edx
push esi
push ecx
push dword [ebp - 8]
call fcn.00409c70
add dword [edi + 0x1c], esi
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, esi
xor edx, edx
xor ecx, ebp
div dword [ebp - 0xc]
pop edi
pop esi
pop ebx
call fcn.00406f60
mov esp, ebp
pop ebp
ret
Function at 0x404fd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [ebp - 0xc], ebx
mov edi, 1
cmp byte [esi], 0
je 0x405015
push 0
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 5]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405010
mov byte [esi + 8], 1
mov edi, dword [ebp - 0xc]
jmp 0x405042
mov ebx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea eax, [ebx + 1]
cmp eax, ecx
jbe 0x405026
mov edi, ecx
sub edi, ebx
mov eax, dword [esi + 0x14]
add eax, ebx
push edi
push eax
lea eax, [ebp - 5]
push eax
call fcn.00409c70
lea eax, [ebx + edi]
add esp, 0xc
mov ebx, dword [ebp - 0xc]
mov dword [esi + 0x1c], eax
cmp edi, 1
jne 0x405060
movzx eax, byte [ebp - 5]
mov dword [ebx], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406f60
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0
je 0x40504d
cmp byte [esi + 8], 0
je 0x40504d
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406f60
mov esp, ebp
pop ebp
ret
Function at 0x405180
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push esi
mov esi, ecx
push edi
cmp byte [esi], 0
lea ecx, [esi + 1]
mov dword [ebp - 0x1c], ecx
je 0x4051c1
cmp byte [ecx], 0
je 0x405212
push 2
push 0
push 0
push dword [esi + 4]
call edx
mov edx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esi + 1]
jmp 0x4051ca
mov eax, dword [esi + 0x18]
mov dword [esi + 0x1c], eax
mov dword [ebp - 0x1c], ecx
cmp byte [esi], 0
je 0x4051ea
cmp byte [ecx], 0
je 0x4051e6
push 1
push 0
push 0
push dword [esi + 4]
call edx
mov edi, eax
sub edi, dword [esi + 0xc]
jmp 0x4051ed
xor edi, edi
jmp 0x4051f9
mov edi, dword [esi + 0x1c]
mov eax, 0xffff
mov dword [ebp - 0x14], eax
cmp edi, eax
jae 0x4051fc
mov dword [ebp - 0x14], edi
push 0x404
call fcn.0040c546
mov ebx, eax
add esp, 4
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x405226
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406f60
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
mov eax, 4
mov dword [ebp - 0xc], 0xffffffff
cmp ecx, eax
jbe 0x405339
nop dword [eax]
add eax, 0x400
mov dword [ebp - 0x18], edi
cmp eax, ecx
mov edx, eax
mov eax, 0x404
cmova edx, ecx
mov ecx, edi
sub ecx, edx
mov dword [ebp - 0x24], edx
cmp edx, 0x404
mov dword [ebp - 0x20], ecx
mov edi, edx
cmova edi, eax
cmp byte [esi], 0
je 0x40528f
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0
je 0x405339
mov eax, dword [esi + 0xc]
push 0
push 0
add eax, ecx
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x405298
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x1c], ecx
mov dword [ebp - 0x18], eax
cmp byte [esi], 0
mov ebx, edi
je 0x4052c0
mov ebx, dword [ebp - 0x10]
lea eax, [ebp - 8]
push 0
push eax
push edi
push ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4052bb
mov byte [esi + 8], 1
mov eax, dword [ebp - 8]
jmp 0x4052eb
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea eax, [edx + edi]
cmp eax, ecx
jbe 0x4052d1
mov ebx, ecx
sub ebx, edx
mov ecx, dword [esi + 0x14]
push ebx
add ecx, edx
push ecx
push dword [ebp - 0x10]
call fcn.00409c70
add esp, 0xc
mov eax, ebx
add dword [esi + 0x1c], ebx
mov ebx, dword [ebp - 0x10]
xor edx, edx
div edi
cmp eax, 1
jne 0x405339
lea ecx, [edi - 3]
test ecx, ecx
js 0x405321
lea eax, [ebx + 3]
add eax, ecx
mov edx, ecx
lea eax, [eax - 1]
dec ecx
cmp byte [eax - 3], 0x50
jne 0x40531d
cmp byte [edx + ebx], 0x4b
jne 0x40531d
cmp byte [eax - 1], 5
jne 0x40531d
cmp byte [eax], 6
je 0x405356
test ecx, ecx
jns 0x405300
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x405339
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
cmp eax, ecx
jb 0x405240
push ebx
call fcn.0040c52b
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0xc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00406f60
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
add eax, ecx
mov dword [ebp - 0xc], eax
jmp 0x405324
Function at 0x405b70
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, ecx
mov ebx, edx
test edi, edi
je 0x405d2a
cmp dword [edi + 0x18], 0
je 0x405d2a
cmp dword [edi + 0x7c], 0
je 0x405b99
call fcn.004060b0
lea eax, [ebp - 8]
mov ecx, edi
push eax
lea eax, [ebp - 4]
push eax
lea edx, [ebp - 0xc]
call fcn.00405910
add esp, 8
test eax, eax
je 0x405bbd
pop edi
mov eax, 0xffffff99
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0x84
call fcn.0040c546
mov esi, eax
add esp, 4
test esi, esi
je 0x405c00
push 0x4000
call fcn.0040c546
mov ecx, dword [ebp - 4]
add esp, 4
mov dword [esi + 0x44], ecx
mov ecx, dword [ebp - 8]
mov dword [esi], eax
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], 0
test eax, eax
jne 0x405c0c
push esi
call fcn.0040c52b
add esp, 4
pop esi
pop edi
mov eax, 0xffffff98
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x3c]
mov ecx, dword [edi + 0x34]
mov dword [esi + 0x54], eax
mov eax, dword [edi]
mov dword [esi + 0x60], eax
mov eax, dword [edi + 0xc]
mov dword [esi + 0x40], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0x64], ecx
mov dword [esi + 0x68], eax
mov dword [esi + 0x18], 0
test ecx, ecx
je 0x405c64
lea ecx, [esi + 4]
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
call fcn.004048b0
test eax, eax
jne 0x405c64
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov cl, byte [edi + 0x30]
mov dword [esi + 0x58], eax
and cl, 1
mov eax, dword [edi + 0x44]
mov dword [esi + 0x5c], eax
mov eax, dword [edi + 0x30]
shr eax, 3
mov byte [esi + 0x6c], cl
test al, 1
je 0x405c88
mov al, byte [edi + 0x39]
jmp 0x405c8b
mov al, byte [edi + 0x3f]
mov byte [esi + 0x80], al
mov edx, 0xc
xor eax, eax
mov dword [esi + 0x70], 0x12345678
test cl, cl
mov dword [esi + 0x74], 0x23456789
mov dword [esi + 0x78], 0x34567890
cmovne eax, edx
mov dword [esi + 0x7c], eax
test ebx, ebx
je 0x405d0b
nop dword [eax]
mov al, byte [ebx]
test al, al
je 0x405d0b
mov ecx, dword [esi + 0x70]
movsx eax, al
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
movzx eax, cl
add eax, dword [esi + 0x74]
imul eax, eax, 0x8088405
mov dword [esi + 0x70], ecx
mov ecx, dword [esi + 0x78]
inc eax
mov dword [esi + 0x74], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x41ecd0]
mov dword [esi + 0x78], ecx
add ebx, 1
jne 0x405cc0
mov eax, dword [ebp - 0xc]
add eax, 0x1e
mov dword [edi + 0x7c], esi
add eax, dword [edi + 0x78]
mov dword [esi + 0x3c], eax
xor eax, eax
mov dword [esi + 8], 0
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 0xffffff9a
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406830
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x61c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push edi
mov edi, edx
test ebx, ebx
je 0x4068d1
push 0x104
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.0040a23b
lea ecx, [ebp - 0x414]
add esp, 0xc
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406870
sub ecx, edx
sar ecx, 1
je 0x4068b0
movzx eax, word [ebp + ecx*2 - 0x416]
cmp eax, 0x2f
je 0x406893
cmp eax, 0x5c
jne 0x4068b0
lea ecx, [ecx*2 - 2]
cmp ecx, 0x208
jae 0x4069d1
xor eax, eax
mov word [ebp + ecx - 0x414], ax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4068d1
push 0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [edi]
test ax, ax
je 0x4069c1
push esi
mov esi, edi
mov ecx, edi
mov edx, eax
cmp dx, 0x2f
je 0x4068f0
cmp dx, 0x5c
jne 0x4068f2
mov esi, ecx
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x4068e4
cmp esi, edi
je 0x40693d
sub esi, edi
lea eax, [ebp - 0x61c]
and esi, 0xfffffffe
push esi
push edi
push eax
call fcn.00409c70
add esp, 0xc
cmp esi, 0x208
jae 0x4069d1
xor eax, eax
lea edx, [ebp - 0x61c]
mov ecx, ebx
mov word [ebp + esi - 0x61c], ax
call fcn.00406830
xor eax, eax
mov word [ebp - 0x20c], ax
pop esi
test ebx, ebx
je 0x406960
push 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0040a23b
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x20c]
mov word [ebp - 6], ax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406970
sub ecx, edx
mov eax, 0x104
sar ecx, 1
sub eax, ecx
push eax
lea eax, [ebp - 0x20c]
lea eax, [eax + ecx*2]
push edi
push eax
call fcn.0040a23b
xor eax, eax
add esp, 0xc
mov word [ebp - 6], ax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4069c1
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00406f60
mov esp, ebp
pop ebp
ret
call fcn.00407097
int3
Function at 0x406dd0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4185a7
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x10], ecx
push 0x44c
call fcn.00407172
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
push 0x44c
push 0
push edi
call fcn.00408800
add esp, 0xc
mov dword [edi], 0
lea esi, [edi + 0x244]
mov dword [edi + 4], 0xffffffff
mov dword [edi + 0x238], 0xffffffff
mov dword [edi + 0x23c], 0
push esi
push 0x103
mov dword [edi + 0x240], 0
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x406e66
sub esi, ecx
sar esi, 1
movzx eax, word [edi + esi*2 + 0x242]
mov ecx, eax
cmp eax, 0x5c
je 0x406e94
cmp ecx, 0x2f
je 0x406e94
mov dword [edi + esi*2 + 0x244], 0x2f
push 0x20
call fcn.00407172
mov ecx, dword [ebp - 0x10]
add esp, 4
mov dword [eax + 0x14], ecx
mov ecx, eax
mov word [eax], pe_nt_image_headers32
mov byte [eax + 0x10], 0
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], 0
mov dword [eax + 0xc], 0
call fcn.00405360
mov dword [edi], eax
test eax, eax
jne 0x406f31
mov eax, dword [edi + 0x23c]
mov dword [0x423480], 0x200
test eax, eax
je 0x406ee8
push eax
call fcn.00406f6e
add esp, 4
mov eax, dword [edi + 0x240]
mov dword [edi + 0x23c], 0
test eax, eax
je 0x406f05
push eax
call fcn.00406f6e
add esp, 4
push 0x44c
push edi
mov dword [edi + 0x240], 0
call fcn.004071a2
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 8
mov dword [0x423480], 0
call fcn.00407172
add esp, 4
mov dword [eax], 1
mov dword [eax + 4], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4079cf
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407a0e
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407a0e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407a0e
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407a0e
cmp dword [ecx + 0x74], 0xe
jbe 0x407a0e
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x40f9b9
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x40fa04
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0040fbd6
test al, al
jne 0x40f9fe
sub edx, 2
cmp edx, edi
jne 0x40f9e4
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x40fa26
lea eax, [edi + 2]
cmp edx, eax
je 0x40fa26
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0040f905
add esp, 0x10
jmp 0x40fb20
push esi
lea ecx, [ebp - 0x255]
call fcn.0040fbd6
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40fa69
push dword [ebp - 0x25c]
jmp 0x40fa16
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x40faa6
cmp word [ebp - 0x226], 0
je 0x40fac7
cmp word [ebp - 0x226], ax
jne 0x40faa6
cmp word [ebp - 0x224], 0
je 0x40fac7
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0040f905
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x40fb13
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x40fa80
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x40fafb
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40fb20
push 0x40f735
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004140a0
add esp, 0x10
jmp 0x40faf0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406f60
leave
ret

Function at 0x411373
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41b234
push 0x41b22c
push str.FlsAlloc
push 0x1f
call fcn.004112ae
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4113a7
push dword [ebp + 8]
mov ecx, esi
call dword [0x41919c]
call esi
jmp 0x4113ad
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4113f1
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41b244
push 0x41b23c
push str.FlsGetValue
push 0x21
call fcn.004112ae
mov esi, eax
add esp, 0x10
test esi, esi
je 0x411428
push dword [ebp + 8]
mov ecx, esi
call dword [0x41919c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x411430
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41b24c
push 0x41b244
push str.FlsSetValue
push 0x22
call fcn.004112ae
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41146a
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41919c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x417f50
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x417f7d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x417f7d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x403660
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40369f
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40369f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40369f
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40369f
cmp dword [ecx + 0x74], 0xe
jbe 0x40369f
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0xcbe008], 0x8088405
inc edx
mov dword [ebx + 0xcbe008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41cf00
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cf31
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cf19
add dl, dl
jne 0x41cf3c
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cf8d
xor eax, eax
add dl, dl
jne 0x41cf49
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d02a
add dl, dl
jne 0x41cf58
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf63
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf6e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf79
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cf83
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cf28
mov eax, 1
add dl, dl
jne 0x41cf9b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cfa6
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cf92
sub eax, ebx
mov ebx, 1
jne 0x41cfd9
mov ecx, 1
add dl, dl
jne 0x41cfbf
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cfca
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cfb6
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cf28
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41cff0
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cffb
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cfe7
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cf28
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41d04b
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cf28
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret