joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403140
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
lea edx, [esp]
push eax
lea eax, [esp + 0x10]
push edx
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [ecx + 4]
push 0
push edx
push eax
mov dword [esp + 0x1c], 4
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403181
mov ecx, dword [esp + 0x10]
mov edx, dword [esp]
mov dword [ecx], edx
add esp, 8
ret 8

Function at 0x403340
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x120
lea ecx, [esp + 8]
push ebx
push ebp
push esi
push edi
call fcn.00402fb0
mov edi, dword [esp + 0x13c]
mov esi, 0x10008
test edi, edi
je 0x403368
mov esi, 0x10108
mov ebx, dword [esp + 0x138]
test ebx, ebx
jne 0x40338c
lea ecx, [esp + 0x18]
call fcn.00402fc0
pop edi
pop esi
pop ebp
mov eax, 0x3f2
pop ebx
add esp, 0x120
ret
mov ebp, dword [esp + 0x134]
push edi
push ebx
push ebp
call fcn.00403470
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push esi
push 0
push ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x40344f
mov eax, dword [esp + 0x10]
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push 0
lea edx, [esp + 0x40]
push ecx
push edx
push 0
push eax
mov dword [esp + 0x34], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov esi, eax
cmp esi, 0x103
je 0x403408
test esi, esi
jne 0x403444
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x30]
push edi
push ecx
push edx
call fcn.00403340
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4033b8
jmp 0x403444
lea ecx, [esp + 0x24]
call fcn.00402fb0
push edi
push ebx
push ebp
call fcn.00403470
add esp, 0xc
test edi, edi
je 0x403431
push edi
push ebx
push ebp
call fcn.004032d0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40343b
push ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
lea ecx, [esp + 0x24]
call fcn.00402fc0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
call fcn.00402fc0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
Function at 0x403dc0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x15c
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov eax, 0x408798
mov ecx, 0x40
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
xor eax, eax
lea edi, [esp + 0x5d]
mov dword [esp + 8], eax
push 0x104
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], 0x44
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov byte [esp + 0x60], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x60]
push ecx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0x103
lea edx, [esp + 0x60]
push 0x4088a8
push edx
call dword [sym.imp.MSVCRT.dll_strncat]
add esp, 0xc
mov byte [esp + 0x15f], 0
mov dword [esp + 4], 0
call fcn.004019d0
test eax, eax
pop edi
je 0x403e5c
lea eax, [esp]
push eax
call fcn.00401a60
add esp, 4
lea ecx, [esp + 4]
push esi
lea edx, [esp + 0x18]
push ecx
push edx
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x78]
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
call fcn.004019d0
test eax, eax
je 0x403e98
mov ecx, dword [esp + 4]
push ecx
call fcn.00401a90
add esp, 4
test esi, esi
pop esi
jne 0x403eac
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
add esp, 0x15c
ret
mov eax, 1
add esp, 0x15c
ret
Function at 0x403ec7
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x160
push ebx
push esi
mov esi, ecx
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x24]
xor ebx, ebx
rep stosd dword es:[edi], eax
lea eax, [esi + 8]
mov dword [esp + 0x24], 0x44
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x108]
cmp eax, ebx
je 0x403f10
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 0x110]
push edi
push 0x4088b8
call fcn.00401ac0
mov ecx, dword [edi]
add esp, 8
push ecx
push str.Shell_Create_Shell_In_Prev_Desk:_d
push 4
call fcn.004017c0
add esp, 0xc
lea edx, [esp + 0x10]
mov dword [esp + 0x10], ebx
push edx
push 0x3e8
push ebx
push ebx
push ebx
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x69]
mov byte [esp + 0x68], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x68]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0x103
lea ecx, [esp + 0x6c]
push 0x4088ec
push ecx
call dword [sym.imp.MSVCRT.dll_strncat]
add esp, 0xc
mov byte [esp + 0x16b], bl
mov dword [esp + 0xc], ebx
call fcn.004019d0
test eax, eax
je 0x403fb1
lea edx, [esp + 0xc]
push edx
call fcn.00401a60
add esp, 4
lea eax, [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x84]
push ebx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov edi, eax
call fcn.004019d0
test eax, eax
je 0x403fe8
mov eax, dword [esp + 0xc]
push eax
call fcn.00401a90
add esp, 4
cmp edi, ebx
jne 0x403ffe
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x160
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
xor edx, edx
cmp eax, ebx
mov dword [esi + 0x108], eax
mov dword [esi + 0x10c], ecx
setne dl
pop edi
pop esi
mov eax, edx
pop ebx
add esp, 0x160
ret

Function at 0x404070
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push esi
test eax, eax
mov esi, ecx
je 0x40408e
mov eax, dword [esi + 0x10c]
test eax, eax
je 0x40408e
push eax
call fcn.00402c80
add esp, 4
mov eax, dword [esi + 0x108]
test eax, eax
je 0x4040c2
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esi + 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x108], 0
mov dword [esi + 0x10c], 0
mov eax, 1
pop esi
ret 4
Function at 0x404780
Capabilities:
Copy file
Persist via application shimming

Disassembly:
sub esp, 0x214
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x218]
push esi
call ebx
add esp, 4
test eax, eax
jbe 0x404862
lea ecx, [esp + 0xc]
call fcn.00402fb0
push 0
push 0
push 0x408a8c
push 0x80000002
lea ecx, [esp + 0x1c]
call fcn.00403000
test eax, eax
jne 0x404816
mov eax, dword [edi + 0x420]
lea ecx, [esp + 0xc]
push eax
push 0x408aa0
call fcn.00403070
mov ecx, dword [edi + 0x424]
push ecx
push 0x408aac
lea ecx, [esp + 0x14]
call fcn.00403070
push esi
call ebx
add esp, 4
lea edx, [eax + eax + 2]
lea ecx, [esp + 0xc]
push edx
push esi
push 0x408abc
call fcn.00403120
lea ecx, [esp + 0xc]
call fcn.00403050
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x18]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
lea ecx, [esp + 0x20]
push 0x408ac8
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 0x10
lea edx, [esp + 0x18]
push 0
push edx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0xc]
call fcn.00402fc0
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x214
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x407060], 1
mov dword [0x40705c], 1
mov dword [0x407058], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x407014], eax
mov eax, dword [0x40706c]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x407080]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x407068]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x404018], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056

Function at 0x401870
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]
Function at 0x4018d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x407074]
test esi, esi
jle 0x4019f0
mov eax, dword [0x407078]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401904
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401987
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x4018f0
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401a17
mov eax, dword [0x407078]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x407078]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4019f7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401980
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401990
add dword [0x407074], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x407078]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401980
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40190e
mov eax, dword [0x407078]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop

Function at 0x401f30
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x407090
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x407088]
sub esp, 4
test ebx, ebx
je 0x401f85
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x401f7e
test esi, esi
je 0x401f7e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401f60
mov dword [esp], 0x407090
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4022c0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x4022e5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x4022f0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x4022e5
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x402338
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40232e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40233a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402320
xor eax, eax
pop ebx
pop esi
ret
Function at 0x401029
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x10], 0
and dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret

Function at 0x401a4f
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push esi
xor esi, esi
push esi
push esi
push 3
push esi
push 7
push esi
push str..PhysicalDrive0
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x401b45
push ebx
push edi
xor eax, eax
lea edi, [ebp - 0x14]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
stosd dword es:[edi], eax
lea esi, [ebp - 0x41c]
mov dword [ebp - 4], 0x400
mov ebx, dword [ebp - 4]
xor edi, edi
lea eax, [ebp - 4]
push edi
push eax
push ebx
push esi
lea eax, [ebp - 0x1c]
push 0xc
push eax
push 0x2d1400
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, edi
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edi
je 0x401af3
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], esi
cmp eax, ebx
jbe 0x401ad4
mov dword [ebp - 4], eax
mov dword [ebp - 8], edi
jmp 0x401af3
mov eax, dword [esi + 0x18]
cmp eax, edi
je 0x401af3
lea edi, [eax + esi]
push edi
call fcn.00403120
push eax
push edi
push dword [ebp + 8]
call fcn.004018cc
add esp, 0x10
xor edi, edi
lea eax, [ebp - 0x41c]
cmp esi, eax
je 0x401b04
push esi
call fcn.00403106
pop ecx
cmp dword [ebp - 8], edi
jne 0x401b3a
cmp dword [ebp - 0xc], edi
jne 0x401b27
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401b3a
cmp dword [ebp - 4], ebx
ja 0x401b27
or bx, 0xfff
inc ebx
mov dword [ebp - 4], ebx
push dword [ebp - 4]
call fcn.004030f8
mov esi, eax
pop ecx
cmp esi, edi
jne 0x401a98
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
mov eax, dword [ebp - 8]
pop esi
leave
ret

Function at 0x401f27
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
xor esi, esi
push 0x10
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.004030a0
lea eax, [ebp - 0x10]
push eax
call fcn.00401a1d
add esp, 0x10
xor eax, eax
movzx ecx, byte [ebp + eax - 0x10]
lea esi, [ecx + esi*2]
xor esi, dword [ebp - 0x10]
inc eax
cmp eax, 0x10
jb 0x401f4a
mov eax, esi
pop esi
leave
ret
Function at 0x401f64
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
movzx eax, word [ebp + 8]
push ebx
push esi
push edi
push 0xa
push eax
push dword [0x40c0c0]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x401f9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push dword [0x40c0c0]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
ja 0x401fa6
xor eax, eax
jmp 0x402096
push edi
push dword [0x40c0c0]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0x40
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push esi
push ebx
push edi
mov dword [ebp - 8], edi
call fcn.00402d60
sub esi, 0x20
push 0x20
mov dword [ebp - 0xc], esi
lea eax, [edi + esi]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00402d60
add esp, 0x18
xor eax, eax
xor ebx, ebx
movzx ecx, byte [ebp + eax - 0x2c]
add ebx, ecx
inc eax
cmp eax, 0x20
jb 0x401fee
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp ebx, eax
jne 0x402032
test ebx, ebx
je 0x402053
xor edx, edx
xor ecx, ecx
test esi, esi
jbe 0x402053
mov al, dl
and al, 0x23
xor al, byte [edx + edi]
or al, byte [ebp + ecx - 0x2c]
inc ecx
cmp ecx, 0x10
mov byte [edx + edi], al
jne 0x402027
xor ecx, ecx
inc edx
cmp edx, esi
jb 0x402011
test ecx, ecx
jne 0x402009
jmp 0x402053
xor edx, edx
xor ecx, ecx
test esi, esi
jbe 0x402053
mov al, byte [ebp + ecx - 0x2c]
xor al, byte [edx + edi]
xor al, dl
inc ecx
cmp ecx, 0x10
mov byte [edx + edi], al
jne 0x40204e
xor ecx, ecx
inc edx
cmp edx, esi
jb 0x40203a
mov edi, dword [edi]
mov dword [ebp + 8], edi
add edi, 0x100
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
sub eax, 4
push eax
mov eax, dword [ebp - 8]
add eax, 4
push eax
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.00401c26
add esp, 0x10
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40212f
Capabilities:
Link function at runtime on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0x40909c
jmp loc.0040de13

Function at 0x4024d3
Capabilities:
Copy file
Create directory
Create service
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
push 0x409138
jmp loc.0040d668

Function at 0x402907
Capabilities:
Accept command line arguments
Check for time delay via gettickcount
Create process on windows
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
push ebx
push esi
push edi
push 0x4091d0
jmp loc.0040d2f9
Function at 0x40716c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00409bf4
test esi, esi
jne 0x4071a2
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00409d7c
jmp 0x4071c0
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004070b0
mov edi, eax
test esi, esi
je 0x4071c0
cmp dword [ebx], 0
je 0x4071c0
dec esi
jmp 0x4071a9
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x4071f4
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x40880c
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00408c98
mov byte [esp], al
cmp byte [esp], 0
jne 0x408995
test edi, edi
je 0x408995
mov byte [esp + 1], 0
test ebp, ebp
jle 0x4088d5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x4088b0
cmp edi, 0xffffffff
je 0x408871
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408871
mov byte [esp], 0
jmp 0x408995
cmp dword [esi], 1
jg 0x4088b0
cmp dword [esi], 0
jne 0x4088a2
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x4088a2
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x408995
lea eax, [esp + 0xc]
call fcn.004084c8
dec ebp
test ebp, ebp
jg 0x408856
cmp edi, 0xffffffff
je 0x4088d5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4088d3
mov byte [esp], 0
jmp 0x408995
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x40881a
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x4088d5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00408a04
mov edx, eax
mov ebx, dword [0x5358f8]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x408939
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x408937
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x408939
xor edi, edi
cmp byte [esp], 0
je 0x40895f
mov ebx, dword [esi]
test bl, 1
jne 0x408975
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40893f
mov byte [esp + 1], 1
jmp 0x408975
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40895f
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x4088ec
cmp byte [esp], 0
je 0x408995
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4095d8
Capabilities:
Terminate process

Disassembly:
push ecx
push ebx
push esi
push edi
mov ebx, 0x537b98
cmp dword [ebp + 0xc], 2
jl 0x4095ec
mov ebx, 0x537bc8
mov esi, ebx
lea edi, [ebp - 0x40]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
pop dword [ebx + 0x20]
pop dword [ebx + 0x1c]
pop dword [ebx + 0x18]
mov dword [ebx + 0x14], ebp
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], edx
lea ecx, [ebp - 0x40]
mov dword [ebx], ecx
call sub.kernel32.dll_GetCurrentThreadId
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 8]
xor ecx, ecx
cmp dword [ebp + 0xc], 0
jne 0x409624
mov ecx, dword [eax]
mov dword [ebx + 0xc], ecx
mov eax, 0x4050cc
mov dword [0x53501c], eax
mov eax, 0x4050d4
mov dword [0x535020], eax
mov eax, ebx
call fcn.004094bc
mov eax, dword [ebp + 0xc]
inc eax
mov byte [ebx + 0x28], al
dec eax
pop ecx
mov edx, dword [ecx]
mov dword [ebx + 0x24], edx
je 0x409659
cmp al, 3
jge 0x409659
call dword [ecx + eax*4]
push ecx
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x40966a
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
call ecx
pop ecx
mov eax, dword [ebp + 0xc]
cmp al, 3
jl 0x409675
call dword [ecx + eax*4]
cmp dword [0x535040], 0
jne 0x40968b
mov byte [0x535048], 1
fnstcw word [0x52d028]
mov eax, dword [ebp + 0xc]
dec eax
jne fcn.00409924
call fcn.0040956c
ret 4

Function at 0x40988c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x535058], 0
je 0x4098f3
cmp word [0x535344], 0xd7b2
jne 0x4098b5
cmp dword [0x53534c], 0
jbe 0x4098b5
mov eax, 0x535340
call dword [0x53535c]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
mov eax, 0x409920
call fcn.0040a49c
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x52d032], 0
jne 0x40990f
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x409ab4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x52d034], 0
je 0x409adf
mov edx, edi
mov eax, esi
call dword [0x52d034]
mov ebx, eax
jmp 0x409af0
mov eax, 8
call fcn.00406e0c
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x535059], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x409a7c
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x409b20
mov eax, ebx
call fcn.00406e28
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc