joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4053b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp - 0xc]
sub esp, 0x68
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], 0x403560
mov dword [ebp - 0x24], 0x4071ac
mov dword [ebp - 0x1c], 0x405470
mov dword [ebp - 0x18], esp
mov dword [esp], eax
call fcn.00405f00
cmp dword [0x4080d0], 0
mov dword [ebp - 0x44], 0x40e060
je 0x405450
jl 0x405490
mov dword [ebp - 0x3c], 1
mov eax, dword [0x40e050]
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x50]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x54]
sub esp, 4
test eax, eax
mov dword [ebp - 0x48], eax
je 0x405533
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x44], eax
lea esi, [esi]
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.00405fe0
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov edx, dword [0x40e090]
mov eax, 0xffffffff
test edx, edx
je 0x4054aa
mov eax, dword [0x4080d4]
test eax, eax
je 0x4054ea
xor eax, eax
test eax, eax
jne 0x4054e0
mov edi, dword [0x4080d0]
test edi, edi
js 0x4054e0
mov dword [ebp - 0x44], 0x40e060
mov ebx, dword [0x4080d0]
test ebx, ebx
je 0x405450
jmp 0x4053fe
xor esi, esi
mov dword [0x4080d0], esi
jmp 0x4054b8
mov dword [esp], 0x4080d8
mov dword [ebp - 0x3c], 1
call sub.KERNEL32.dll_InterlockedIncrement
sub esp, 4
test eax, eax
je 0x405571
mov eax, dword [0x4080d4]
test eax, eax
jne 0x4054a8
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x3c], 1
call eax
sub esp, 4
mov eax, dword [0x4080d4]
test eax, eax
je 0x40550d
jmp 0x4054a8
mov dword [esp], 8
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x48], eax
test eax, eax
je 0x405565
mov dword [esp + 4], eax
mov eax, dword [0x40e050]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
xor edx, edx
test eax, eax
je 0x40559a
test edx, edx
je 0x405585
mov dword [ebp - 0x3c], 1
call fcn.00404e10
call fcn.00405290
mov eax, 1
mov dword [0x4080d4], eax
jmp 0x4054a8
mov eax, dword [ebp - 0x48]
mov dword [eax], 0
mov dword [eax + 4], 0
jmp 0x405446
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
jmp 0x405561
Function at 0x405800
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov eax, 0x10
mov ebp, esp
push ebx
sub esp, 0x64
and esp, 0xfffffff0
call fcn.00405dc0
call fcn.00405a60
call sub.KERNEL32.dll_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
call sub.KERNEL32.dll_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x405838
jmp 0x4058d6
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
or eax, edx
test al, 1
jne 0x405837
cmp cl, 0x22
je 0x405890
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
je 0x4058b0
lea esi, [esi]
lea edi, [edi]
test cl, cl
je 0x4058b0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
jne 0x405870
jmp 0x4058b0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x22
setne al
xor edx, edx
test cl, cl
setne dl
test eax, edx
jne 0x405890
cmp cl, 0x22
je 0x405912
lea esi, [esi]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
jmp 0x4058d0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete dl
cmp cl, 9
sete al
or eax, edx
test al, 1
jne 0x4058c0
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
test byte [ebp - 0x2c], 1
mov edx, 0xa
je 0x4058f4
movzx edx, word [ebp - 0x28]
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edx
mov dword [esp], eax
call fcn.004020e0
sub esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
inc ebx
movzx ecx, byte [ebx]
jmp 0x4058b0

Function at 0x405df0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x40e0f0]
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x405e30
mov dword [ebx + 0x2c], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call fcn.00405960
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret
Function at 0x4061e0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x40e0f0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x4062bc
mov ecx, dword [eax + 0x30]
test ecx, ecx
js 0x4062d1
mov edx, dword [eax + 0x30]
test edx, edx
jne 0x406290
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea ebx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
jmp 0x406228
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
xor ecx, ecx
test eax, eax
mov edx, 5
je 0x406238
mov ecx, dword [eax + 0x18]
xor edx, edx
cmp edx, 5
je 0x406283
test edx, edx
jne 0x406276
test ecx, ecx
je 0x406220
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp], 1
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call ecx
cmp eax, 6
je 0x4062e0
cmp eax, 8
je 0x406220
mov eax, 3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
mov eax, 5
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x406212
call fcn.00405b80
mov eax, dword [0x40e0f0]
mov ecx, dword [eax + 0x30]
test ecx, ecx
jns 0x406204
call fcn.00405e50
mov eax, dword [0x40e0f0]
jmp 0x406204
mov dword [edi + 0xc], 0
mov eax, dword [ebp - 0x14]
mov edx, ebx
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.00406150
cmp eax, 7
jne 0x40627b
mov eax, dword [0x40e0f0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x406333
mov edi, dword [eax + 0x30]
test edi, edi
js 0x40635e
mov esi, dword [eax + 0x30]
test esi, esi
jne 0x40633f
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.00405b80
mov eax, dword [0x40e0f0]
jmp 0x406311
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x406322
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406322
call fcn.00405e50
mov eax, dword [0x40e0f0]
jmp 0x406318
Function at 0x4065c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [0x40e0f0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x406654
mov esi, dword [eax + 0x30]
test esi, esi
js 0x406670
mov ebx, dword [eax + 0x30]
test ebx, ebx
jne 0x406690
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x406648
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.00406150
cmp eax, 7
jne 0x40670f
mov eax, dword [0x40e0f0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x4066e6
mov edx, dword [eax + 0x30]
test edx, edx
js 0x406700
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x4066c0
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.00406370
jmp 0x406605
call fcn.00405b80
mov eax, dword [0x40e0f0]
mov esi, dword [eax + 0x30]
test esi, esi
jns 0x4065e0
lea esi, [esi]
call fcn.00405e50
mov eax, dword [0x40e0f0]
mov ebx, dword [eax + 0x30]
test ebx, ebx
je 0x4065eb
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x4065ee
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x406637
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406637
call fcn.00405b80
mov eax, dword [0x40e0f0]
mov edx, dword [eax + 0x30]
test edx, edx
jns 0x406629
nop
lea esi, [esi]
call fcn.00405e50
mov eax, dword [0x40e0f0]
jmp 0x406629
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]
Function at 0x406720
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov esi, dword [edi + 0xc]
test esi, esi
je 0x4067b2
mov eax, dword [0x40e0f0]
test eax, eax
je 0x4067a6
mov ebx, dword [eax + 0x30]
test ebx, ebx
js 0x406821
mov ecx, dword [eax + 0x30]
test ecx, ecx
jne 0x4067c7
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.00406370
cmp eax, 7
jne 0x40683f
mov eax, dword [0x40e0f0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x406812
mov edx, dword [eax + 0x30]
test edx, edx
js 0x406830
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x4067f3
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.00405b80
mov eax, dword [0x40e0f0]
jmp 0x406742
mov dword [esp], edi
call fcn.004061e0
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x406757
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x406795
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406795
call fcn.00405b80
mov eax, dword [0x40e0f0]
jmp 0x406780
call fcn.00405e50
mov eax, dword [0x40e0f0]
jmp 0x40674d
call fcn.00405e50
mov eax, dword [0x40e0f0]
jmp 0x40678b
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]
Function at 0x4011c0
Capabilities:
Enumerate processes

Disassembly:
push 0xffffffffffffffff
push 0x403d9b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x244
push ebx
push ebp
xor ebp, ebp
push esi
mov dword [esp + 0xc], 0x4045ec
mov dword [esp + 0x10], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
push ebp
push 2
mov dword [esp + 0x260], ebp
xor esi, esi
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4012c9
push edi
mov ecx, 0x49
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x128
push eax
push ebx
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x4012c1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x150]
lea edx, [esp + 0x150]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2c]
lea edi, [esp + 0x48]
mov dword [esp + 0x14c], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0xffffffffffffffff
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
lea ecx, [esi + 1]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401f70
mov eax, dword [esp + 0x14]
mov edx, esi
shl edx, 5
add edx, esi
mov ecx, 0x42
lea esi, [esp + 0x14c]
lea edi, [eax + edx*8]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x24]
push ecx
push ebx
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x40123d
mov esi, 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov edx, dword [esp + 0x264]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
mov dword [edx], eax
mov eax, dword [esp + 0x264]
push eax
push ecx
call fcn.00401190
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, ebp
mov dword [esp + 0xc], 0x4045ec
je 0x401305
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x250]
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x250
ret

Function at 0x401320
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x128
push ebp
xor ebp, ebp
push esi
push ebp
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x4013b2
push ebx
push edi
mov ecx, 0x49
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x128
push eax
push esi
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x40139e
mov edi, dword [esp + 0x13c]
mov ebx, dword [sym.imp.MSVCRT.dll__mbsicmp]
lea ecx, [esp + 0x34]
push edi
push ecx
call ebx
add esp, 8
test eax, eax
je 0x401399
lea edx, [esp + 0x10]
push edx
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x40139e
lea eax, [esp + 0x34]
push edi
push eax
call ebx
add esp, 8
test eax, eax
jne 0x40137b
mov ebp, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
mov eax, ebp
pop esi
pop ebp
add esp, 0x128
ret
mov eax, ebp
pop esi
pop ebp
add esp, 0x128
ret
Function at 0x4013c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x108
push esi
push edi
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0xd]
mov dword [esp + 8], eax
mov byte [esp + 0xc], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, dword [esp + 0x114]
lea ecx, [esp + 0xc]
push ecx
mov ecx, esi
call fcn.00403750
mov eax, esi
pop edi
pop esi
add esp, 0x108
ret

Function at 0x401500
Capabilities:
Access peb ldr_data
Persist via run registry key
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x403e18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
lea eax, [esp + 8]
push esi
push eax
call fcn.00401410
lea ecx, [esp + 0x1c]
mov dword [esp + 0x28], 0
push ecx
call fcn.00401410
mov esi, eax
lea edx, [esp + 0x1c]
mov byte [esp + 0x2c], 1
push edx
call fcn.004013c0
add esp, 0xc
push 0x40609c
push eax
lea eax, [esp + 0x18]
mov byte [esp + 0x2c], 2
push eax
call sub.MFC42.DLL_operator_1
push esi
lea ecx, [esp + 0xc]
push eax
push ecx
mov byte [esp + 0x30], 3
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x24], 5
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 4]
push edx
push 0x20006
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
pop esi
jne 0x4015e5
mov eax, dword [esp + 4]
mov ecx, dword [eax - 8]
inc ecx
push ecx
mov ecx, dword [esp + 4]
push eax
mov eax, dword [esp + 0x10]
push 1
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4015f3
push 0
push 0
push str.Failed_to_open_registry_key.
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 4]
mov byte [esp + 0x20], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x24
ret

Function at 0x403260
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push esi
push edi
mov esi, ecx
push eax
push 0x202
mov dword [esi], 0x404b14
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor edi, edi
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0xc], eax
mov dword [esi + 0x4dc74], edi
mov dword [esi + 4], edi
mov ecx, 0x13718
xor eax, eax
lea edi, [esi + 0x10]
mov dword [esi + 8], 0xffffffff
rep stosd dword es:[edi], eax
mov eax, esi
pop edi
pop esi
add esp, 0x190
ret
Function at 0x403330
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Create thread
Resolve dns

Disassembly:
sub esp, 0x10
push esi
push 6
push 1
mov esi, ecx
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x403353
xor eax, eax
pop esi
add esp, 0x10
ret 8
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x20]
push edi
push ebp
call dword [sym.imp.WS2_32.dll_gethostbyname]
push ebx
mov edi, eax
mov word [esp + 0x14], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
mov eax, dword [edi + 0xc]
push 0x10
mov ecx, dword [eax]
lea eax, [esp + 0x14]
push eax
mov edx, dword [ecx]
mov ecx, dword [esi + 8]
push ecx
mov dword [esp + 0x20], edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4033b6
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esi + 0xc]
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x40335e
push 0
push 0
push esi
push 0x4033e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop edi
pop ebp
pop ebx
mov eax, 1
pop esi
add esp, 0x10
ret 8

Function at 0x4034b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x403fe0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], esp
push 0x40
push 0x3000
push 0x4dc60
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x403500
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
push 0x404ef8
push eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0x2c
call sub.MSVCRT.dll__CxxThrowException
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 0x40352a
ret
Function at 0x4013c5
Capabilities:
Encode data using xor

Disassembly:
jmp 0x4159d0
push esi
push edi
mov edi, dword [esp + 0x10]
xor esi, esi
test edi, edi
je 0x415b7a
push ebx
mov ebx, dword [esp + 0x10]
nop word [eax + eax]
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
sub byte [esi + ebx], 0x57
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0xc0
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
xor byte [esi + ebx], 0x12
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0x57
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0x17
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
add esp, 0x44
push eax
call fcn.0040616d
add byte [esi + ebx], 0x65
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0x64
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0x1c
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0xf4
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0xd0
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0x56
add esp, 0x40
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0xfa
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
xor byte [esi + ebx], 0x2a
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0x23
push str.Halloween_Beasts
push 0x4d34b0
call fcn.00402d79
push eax
call fcn.0040616d
add byte [esi + ebx], 0xcd
add esp, 0x30
inc esi
cmp esi, edi
jb 0x4159f0
pop ebx
pop edi
pop esi
ret

Function at 0x4035f3
Capabilities:
Terminate process

Disassembly:
jmp 0x453df9
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x453e0a
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.00405948
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x40371f
Capabilities:
Query environment variable

Disassembly:
jmp 0x49c842
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49c853
pop esi
ret
push ebx
push edi
push esi
call fcn.0049c729
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403fe4
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49c87b
push ebx
push esi
push edi
call fcn.0040572c
add esp, 0xc
push 0
call fcn.004062b2
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x402a58
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004044a0
test esi, esi
jne 0x402a8e
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404590
jmp 0x402aac
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040296c
mov edi, eax
test esi, esi
je 0x402aac
cmp dword [ebx], 0
je 0x402aac
dec esi
jmp 0x402a95
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x4035a4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x4c6010]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x40363c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x40361c
xor eax, eax
push ebp
push 0x403615
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 0x403658
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 0x40361c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x4c6010]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x4c6010], ax
mov esp, ebp
pop ebp
ret

Function at 0x404324
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4c904c], 0
je 0x404385
cmp word [0x4c9220], 0xd7b2
jne 0x40434d
cmp dword [0x4c9228], 0
jbe 0x40434d
mov eax, 0x4c921c
call dword [0x4c9238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4c6058
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 0x4043ac
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4c6020], 0
jne 0x4043a1
push 0
push 0x4c6078
push 0x4c6058
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret