joyce8/EMBER2024-capa huggingface dataset:
Function at 0x421aa0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
sub esp, 0x54
mov eax, dword [0x459020]
xor eax, esp
mov dword [esp + 0x4c], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebp
push esi
push edi
call ebx
push 0xf003f
push 0
push 0
mov dword [esp + 0x20], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x421c52
mov edx, 9
lea ecx, [esp + 0x1c]
call fcn.00411db0
cmp dword [eax + 0x14], 0x10
jb 0x421af1
mov eax, dword [eax]
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edx, dword [esp + 0x30]
mov esi, eax
cmp edx, 0x10
jb 0x421b36
mov ecx, dword [esp + 0x1c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x421b2c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x421c67
push edx
push ecx
call fcn.00423b44
add esp, 8
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0xf
mov byte [esp + 0x1c], 0
test esi, esi
jne 0x421b6b
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.00423b13
add esp, 0x54
ret
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x421c46
lea eax, [esp + 0x34]
push eax
push 0x24
lea eax, [esp + 0x40]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x421c46
cmp dword [esp + 0x3c], 2
mov edi, dword [esp + 0x4c]
jne 0x421c1e
mov ebp, dword [esp + 0x14]
mov ecx, 0x2710
nop
mov eax, 0xcccccccd
mul dword [esp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x421bcb
mov edx, 0x3e8
jmp 0x421bd4
cmp edx, 0x2710
cmova edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x34]
push eax
push 0x24
lea eax, [esp + 0x40]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x421c1a
cmp dword [esp + 0x4c], edi
jbe 0x421c04
call ebx
mov edi, dword [esp + 0x4c]
mov ebp, eax
jmp 0x421c0e
call ebx
sub eax, ebp
cmp eax, dword [esp + 0x50]
ja 0x421c1a
cmp dword [esp + 0x3c], 2
mov ecx, 0x2710
je 0x421bb0
mov ebp, dword [esp + 0x18]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
cmp dword [esp + 0x3c], 4
jne 0x421c52
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.00423b13
add esp, 0x54
ret
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
mov ecx, dword [esp + 0x5c]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00423b13
add esp, 0x54
ret
call fcn.0042823f
int3
Function at 0x401c60
Capabilities:
Check for sandbox and av modules

Disassembly:
push ebx
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov bl, 1
test eax, eax
je 0x401c71
mov eax, ebx
pop ebx
ret
push str.sbiedll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.sbieDll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vboxhook.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.VBoxHook.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vmcheck.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vmsrvc.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vmtools.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vgauth.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vmhgfs.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vmguestlib.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x401c6d
push str.vmhgfs.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
setne bl
mov eax, ebx
pop ebx
ret
Function at 0x403ff0
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x10
push str.try_run_service
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
movups xmm0, xmmword [0x43a594]
movups xmmword [esp], xmm0
mov eax, esp
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
mov ecx, eax
mov eax, 1
test ecx, ecx
je 0x404021
add esp, 0x10
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
xor eax, eax
cmp ecx, 0x427
je 0x40401d
push str.try_run_service.StartServiceCtrlDispatcher
call fcn.00404100
xor eax, eax
add esp, 4
add esp, 0x10
ret

Function at 0x404100
Capabilities:
Print debug messages

Disassembly:
push edi
push esi
sub esp, 0x804
mov edi, dword [esp + 0x810]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, esp
push 0
push 0
push eax
push 0
push esi
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x40416a
mov eax, dword [esp]
sub esp, 0x1c
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
lea eax, [esp + 0x20]
mov dword [esp], eax
mov dword [esp + 8], str.windows_service:_ERROR:__ls:_0x_x__d__ls_n
call fcn.00404730
add esp, 0x1c
push dword [esp]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4041b4
sub esp, 0x18
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
lea esi, [esp + 0x1c]
mov dword [esp], esi
mov dword [esp + 8], str.windows_service:_ERROR:__ls:_0x_x__d_n
call fcn.00404730
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp], esi
mov dword [esp + 8], str.windows_service:_FormatMessage_failed_with_0x_x__d_n
call fcn.00404730
add esp, 0x14
lea esi, [esp + 4]
push esi
call fcn.00404670
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 0x804
pop esi
pop edi
ret
Function at 0x4041e0
Capabilities:
Create service
Modify service

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x10034
call fcn.0040a96c
push 3
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
je 0x404336
mov esi, eax
mov ebp, dword [esp + 0x10048]
lea ebx, [esp + 0x36]
push 0xfffe
push 0
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x7fff
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
push ebp
call sub.msvcrt.dll_strlen
add esp, 4
test ebp, ebp
je 0x404280
mov edi, eax
test eax, eax
je 0x404280
push 0x43a654
push ebx
call sub.msvcrt.dll_wcscat
add esp, 8
push ebx
call sub.msvcrt.dll_wcslen
add esp, 4
lea eax, [esp + eax*2]
add eax, 0x36
push edi
push ebp
push eax
call sub.msvcrt.dll_mbstowcs
add esp, 0xc
push 0x43a65a
push ebx
call sub.msvcrt.dll_wcscat
add esp, 8
sub esp, 0x34
xorps xmm0, xmm0
movups xmmword [esp + 0x20], xmm0
mov dword [esp + 0x1c], ebx
movaps xmm0, xmmword [0x43a530]
movups xmmword [esp + 0xc], xmm0
mov dword [esp], esi
mov dword [esp + 0x30], 0
mov dword [esp + 8], str.wsclient
mov dword [esp + 4], str.wsclient
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
je 0x40433d
mov dword [esp + 4], str.wsclient_service
lea ecx, [esp + 4]
mov edi, dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push ecx
push 1
push eax
mov ebx, eax
call edi
mov dword [esp], 1
mov eax, esp
push eax
push 4
push ebx
call edi
movaps xmm0, xmmword [0x43a540]
movups xmmword [esp + 0x20], xmm0
movaps xmm0, xmmword [0x43a550]
movups xmmword [esp + 8], xmm0
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0x3a98
lea eax, [esp + 8]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x20]
push eax
push 2
push ebx
call edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call edi
push esi
call edi
mov eax, 1
jmp 0x404353
push str.install_service.OpenSCManager
jmp 0x404349
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push str.install_service.CreateService
call fcn.00404100
add esp, 4
xor eax, eax
add esp, 0x10034
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4046a0
Capabilities:
Delete service

Disassembly:
push ebp
push ebx
push edi
push esi
push 5
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
je 0x4046fd
mov esi, eax
push 0x10000
push str.wsclient
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x404704
mov edi, eax
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, 1
test eax, eax
jne 0x4046ef
push str.delete_service.DeleteService
call fcn.00404100
add esp, 4
xor ebx, ebx
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call ebp
push esi
call ebp
jmp 0x40471a
push str.delete_service.OpenSCManager
jmp 0x404710
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push str.delete_service.OpenService
call fcn.00404100
add esp, 4
xor ebx, ebx
mov eax, ebx
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x405a40
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 8]
lock inc dword [0x444498]
test eax, eax
je 0x405a5b
lock inc dword [0x44449c]
push esi
push eax
call sub.msvcrt.dll_realloc
add esp, 8
test eax, eax
je 0x405a87
mov ecx, dword [esp + 0x10]
sub esi, ecx
jbe 0x405a85
mov edx, eax
add edx, ecx
push esi
push 0
push edx
mov esi, eax
call sub.msvcrt.dll_memset
mov eax, esi
add esp, 0xc
pop esi
ret
push 2
call dword [0x44101c]
add esp, 4
push eax
push 1
push 0x10
push str.realloc_failed__n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 0xffffffffffffffff
call sub.msvcrt.dll_exit
int3

Function at 0x405ab0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
lock inc dword [0x444498]
push eax
push 1
call sub.msvcrt.dll_calloc
add esp, 8
test eax, eax
je 0x405acb
ret
push 2
call dword [0x44101c]
add esp, 4
push eax
push 1
push 0xf
push 0x43adc0
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 0xffffffffffffffff
call sub.msvcrt.dll_exit
int3

Function at 0x405bc0
Capabilities:
Convert ip address from string
Initialize winsock library
Resolve dns

Disassembly:
push edi
push esi
sub esp, 0x190
mov esi, dword [esp + 0x1a0]
mov edi, dword [esp + 0x19c]
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x4444a0], cl
jne 0x405bf2
mov eax, esp
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
lea eax, [esi + 4]
push eax
push edi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x405c14
mov word [esi], 2
xor eax, eax
add esp, 0x190
pop esi
pop edi
ret
lea eax, [esi + 8]
push eax
push edi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x405c2b
mov word [esi], 0x17
mov dword [esp], 0
mov eax, esp
push eax
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x405c0b
mov edi, dword [esp]
test edi, edi
je 0x405c0b
xor eax, eax
cmp dword [edi + 0x18], 0
je 0x405c0b
cmp dword [edi + 0x10], 0
je 0x405c0b
mov eax, edi
nop dword [eax + eax]
cmp dword [eax + 4], 2
je 0x405c6f
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x405c60
mov eax, edi
push dword [eax + 0x10]
push dword [eax + 0x18]
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x405c09
Function at 0x405d50
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Initialize winsock library
Start tcp server

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x194
cmp dword [esp + 0x1a8], 2
mov eax, 0xffffffff
jne 0x405ef9
cmp dword [esp + 0x1ac], 1
jne 0x405ef9
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x4444a0], cl
lea ebx, [esp + 4]
jne 0x405d99
push ebx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [esp], 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov word [esp + 4], 2
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 8], eax
mov word [esp + 6], 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test eax, eax
js 0x405e68
push 0x10
push ebx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x405e82
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x405e89
mov ebp, esp
push ebp
push ebx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x405e90
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
test eax, eax
js 0x405ea1
push dword [esp]
push ebx
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x405ec2
push ebp
push ebx
push esi
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
test eax, eax
js 0x405ece
mov ebp, dword [esp + 0x1b4]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp], edi
mov dword [ebp + 4], ebx
xor eax, eax
jmp 0x405ef9
push 0x43ade1
call sub.msvcrt.dll_perror
add esp, 4
mov eax, 0xffffffff
cmp esi, 0xffffffff
je 0x405ef9
push esi
jmp 0x405eee
mov eax, 0x43ade8
jmp 0x405e95
mov eax, 0x43aded
jmp 0x405e95
mov eax, 0x43adf4
push eax
call sub.msvcrt.dll_perror
add esp, 4
push esi
jmp 0x405eee
push 0x43ade1
call sub.msvcrt.dll_perror
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
cmp edi, 0xffffffff
je 0x405ef9
push edi
jmp 0x405eee
mov eax, 0x43ae00
mov ebx, 0xffffffff
jmp 0x405ed3
mov eax, 0x43ae08
push eax
call sub.msvcrt.dll_perror
add esp, 4
mov ebp, dword [sym.imp.WS2_32.dll_closesocket]
push esi
call ebp
push edi
call ebp
cmp ebx, 0xffffffff
je 0x405ef4
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
add esp, 0x194
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x406150
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push edi
push esi
sub esp, 8
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 0x24]
test cl, 8
jne 0x4062ca
and ecx, 0xffffc007
or ecx, 8
mov dword [esi + 0x24], ecx
mov eax, dword [0x444438]
inc eax
mov dword [0x444438], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x28], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], 0
mov edi, dword [esi]
movd xmm0, dword [edi + 0x24]
movd xmm1, dword [edi + 0x20]
punpckldq xmm1, xmm0
pshufd xmm0, xmm1, 0x44
movdqu xmmword [esi + 0x48], xmm0
and ecx, 0xffff800f
mov dword [esi + 0x24], ecx
mov edx, dword [edi + 0xc0]
test edx, edx
je 0x4061d0
mov eax, dword [edi + 0xbc]
jmp 0x4061f6
mov dword [edi + 0xc0], 0x2000
push 0x2000
call fcn.00405ab0
add esp, 4
mov dword [edi + 0xbc], eax
mov edx, dword [edi + 0xc0]
mov ecx, dword [esi + 0x24]
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], edx
pxor xmm0, xmm0
movdqu xmmword [esi + 0x60], xmm0
mov dword [esi + 0x70], 0x2000000
mov dword [esi + 0x74], 0
mov dword [esi + 0xa0], 0
mov dword [esi + 0xa4], 0x2000000
and ecx, 0xffff7fff
movdqu xmmword [esi + 0xa8], xmm0
movdqu xmmword [esi + 0xb8], xmm0
movdqu xmmword [esi + 0xc8], xmm0
movdqu xmmword [esi + 0xd8], xmm0
movdqu xmmword [esi + 0xe8], xmm0
pxor xmm0, xmm0
movq qword [esi + 0xf8], xmm0
mov dword [esi + 0x24], ecx
mov dword [esi + 0x100], 0
mov dword [esi + 0x104], 0
mov dword [esp], 0
mov dword [esp + 4], 4
lea eax, [esp + 4]
mov edi, esp
push eax
push edi
push 0x1008
push 0xffff
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x4062d0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2736
jne 0x4062e9
mov ecx, dword [esi + 0x30]
mov eax, 0x10
cmp ecx, 2
ja 0x4062c7
mov eax, dword [ecx*4 + 0x43ae58]
mov dword [esi + 0x28], eax
add esp, 8
pop esi
pop edi
ret
mov eax, dword [esp]
cmp eax, 1
je 0x4062e9
cmp eax, 2
je 0x4062fc
cmp eax, 3
jne 0x406303
mov eax, 0x100
jmp 0x406308
mov dword [esi + 0x28], 0x100000
mov eax, dword [esi + 0x30]
mov dword [esp], 1
jmp 0x406315
mov eax, 0x1000
jmp 0x406308
mov eax, 0xfffff00
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x30]
mov dword [esp], 0
push edi
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esi + 0x40]
test eax, eax
je 0x40636a
cmp dword [esi + 0x44], 0
je 0x40637d
mov dword [esp], 0x1c
push edi
push eax
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getsockname]
movzx eax, word [esi + 0x2a]
test eax, 0xff0
je 0x4062ca
mov dword [esp], 0x1c
push edi
push dword [esi + 0x44]
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getpeername]
add esp, 8
pop esi
pop edi
ret
push 0x1c
call fcn.00405ab0
add esp, 4
mov dword [esi + 0x40], eax
cmp dword [esi + 0x44], 0
jne 0x40632f
push 0x1c
call fcn.00405ab0
add esp, 4
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x40]
jmp 0x40632f
Function at 0x4071d0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
cmp dword [ebx], 0
je 0x40728f
cmp dword [ebx + 4], 0
je 0x40729b
mov eax, dword [ebx + 8]
or eax, dword [ebx + 0xc]
je 0x4072ae
lea ebp, [edi + 0xe0]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0xcc]
cmp eax, 0xffffffff
je 0x4072be
push 0
push 1
push 0x43ae64
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x4073cb
mov ecx, dword [edi + 0xd8]
test ecx, ecx
je 0x407314
mov esi, dword [edi + 0xd4]
cmp esi, ecx
jne 0x407359
mov eax, ecx
add eax, ecx
mov esi, 0x10
cmovne esi, eax
lea eax, [esi*8]
lea eax, [eax + eax*4]
shl ecx, 3
lea ecx, [ecx + ecx*4]
push ecx
push eax
push dword [edi + 0xd0]
call fcn.00405a40
add esp, 0xc
mov dword [edi + 0xd0], eax
mov dword [edi + 0xd8], esi
mov edx, dword [edi + 0xdc]
jmp 0x40739b
mov dword [ebx], edi
cmp dword [ebx + 4], 0
jne 0x4071f0
mov dword [ebx + 4], 0x400
mov eax, dword [ebx + 8]
or eax, dword [ebx + 0xc]
jne 0x4071fc
call fcn.00406110
mov dword [ebx + 0xc], edx
mov dword [ebx + 8], eax
jmp 0x4071fc
lea eax, [edi + 0xc8]
push eax
push 0
push 1
push 2
call fcn.00405d50
add esp, 0x10
test eax, eax
jne 0x4073cb
push dword [edi + 0xc8]
push edi
call fcn.00408090
add esp, 8
mov esi, eax
mov dword [eax + 0xa8], 0x4086a0
push eax
call fcn.00408ff0
add esp, 4
mov dword [esi + 0x20], 3
inc dword [edi + 0x3c]
mov eax, dword [edi + 0xcc]
jmp 0x407218
mov dword [edi + 0xdc], 0
mov dword [edi + 0xd4], 0
mov dword [edi + 0xd8], 0x10
push 0x280
call fcn.00405ab0
add esp, 4
mov dword [edi + 0xd0], eax
mov ecx, dword [edi + 0xd8]
mov esi, dword [edi + 0xd4]
cmp esi, ecx
je 0x40724c
mov dword [esp], ebp
mov eax, dword [edi + 0xd0]
mov edx, dword [edi + 0xdc]
lea ebp, [edx + esi]
cmp ebp, ecx
jne 0x407398
lea ecx, [edx + edx*4]
lea ecx, [eax + ecx*8]
shl esi, 3
lea edx, [esi + esi*4]
push edx
push ecx
push eax
call sub.msvcrt.dll_memmove
add esp, 0xc
mov dword [edi + 0xdc], 0
mov eax, dword [edi + 0xd0]
xor edx, edx
mov ebp, dword [esp]
mov ecx, dword [edi + 0xd4]
lea edx, [edx + edx*4]
lea eax, [eax + edx*8]
lea ecx, [ecx + ecx*4]
movsd xmm0, qword [ebx + 0x20]
movsd qword [eax + ecx*8 + 0x20], xmm0
movups xmm0, xmmword [ebx]
movups xmm1, xmmword [ebx + 0x10]
movups xmmword [eax + ecx*8 + 0x10], xmm1
movups xmmword [eax + ecx*8], xmm0
inc dword [edi + 0xd4]
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x408310
Capabilities:
Set socket configuration

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ebx, dword [esp + 0x40]
mov edi, 1
test ebx, 0xff00000
jne 0x408346
mov edi, 2
test ebx, 0xff000
jne 0x408346
mov edi, 3
test ebx, 0xf00
je 0x40843f
mov eax, dword [esp + 0x3c]
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp + 4], xmm0
xor esi, esi
test eax, eax
js 0x408441
lea ebp, [esp + 4]
push eax
push dword [esp + 0x3c]
push ebp
call fcn.00405cd0
add esp, 0xc
test eax, eax
jne 0x408441
movzx eax, word [esp + 4]
push 0
push edi
push eax
call dword [sym.imp.WS2_32.dll_socket]
test eax, eax
js 0x40844b
mov edi, eax
cmp dword [esp + 0x44], 0
je 0x4083c3
push edi
push dword [esp + 0x38]
call fcn.00408090
add esp, 8
mov esi, eax
mov dword [eax + 0x28], ebx
push ebp
call fcn.00405d30
add esp, 4
push eax
push ebp
push esi
call fcn.004069e0
add esp, 0xc
jmp 0x408441
cmp word [esp + 4], 0x17
jne 0x4083e2
mov dword [esp], 0
mov eax, esp
push 4
push eax
push 0x1b
push 0x29
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push ebp
call fcn.00405d30
add esp, 4
push eax
push ebp
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x40845a
test ebx, 0xff00000
je 0x408410
push 0x7fffffff
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x408461
push edi
push dword [esp + 0x38]
call fcn.00408090
add esp, 8
mov esi, eax
mov dword [eax + 0x28], ebx
push ebp
call fcn.00405d30
add esp, 4
push eax
push ebp
push esi
call fcn.004069a0
add esp, 0xc
mov dword [esi + 0x20], 3
jmp 0x408441
xor esi, esi
mov eax, esi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x43ae66
call sub.msvcrt.dll_perror
add esp, 4
jmp 0x408441
push 0x43ae6d
jmp 0x408466
push 0x43ae72
call sub.msvcrt.dll_perror
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x408441

Function at 0x408480
Capabilities:
Create udp socket

Disassembly:
push edi
push esi
sub esp, 0x1c
mov eax, dword [esp + 0x30]
xorps xmm0, xmm0
movups xmmword [esp + 0xc], xmm0
movups xmmword [esp], xmm0
xor esi, esi
test eax, eax
js 0x4084ec
mov edi, esp
push eax
push dword [esp + 0x30]
push edi
call fcn.00405cd0
add esp, 0xc
test eax, eax
jne 0x4084ec
movzx eax, word [esp]
push 0
push 2
push eax
call dword [sym.imp.WS2_32.dll_socket]
test eax, eax
js 0x4084f4
push eax
push dword [esp + 0x2c]
call fcn.00408090
add esp, 8
mov esi, eax
mov dword [eax + 0x28], 0x1000
push edi
call fcn.00405d30
add esp, 4
push eax
push edi
push esi
call fcn.004069e0
add esp, 0xc
mov eax, esi
add esp, 0x1c
pop esi
pop edi
ret
push 0x43ae66
call sub.msvcrt.dll_perror
add esp, 4
jmp 0x4084ec
Function at 0x408ef0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x30
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0x30]
mov ebx, dword [esi + 0x44]
push ebx
call fcn.00405d30
add esp, 4
push eax
push ebx
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x408f56
jne 0x408f65
xorps xmm0, xmm0
movaps xmmword [esp + 0x10], xmm0
xorps xmm1, xmm1
movsd qword [esp + 0x20], xmm1
movaps xmmword [esp], xmm0
mov dword [esp + 0x10], 0x409740
mov dword [esp + 0x14], esi
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x18], eax
mov eax, esp
push eax
push dword [esi]
call fcn.004071d0
add esp, 8
xor eax, eax
jmp 0x408fa4
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x408fac
mov eax, dword [esi + 0xbc]
test eax, eax
mov ecx, 0x2710
cmovne ecx, eax
push 1
push ecx
push 0x408fd0
push dword [esi]
call fcn.004079f0
add esp, 0x10
mov dword [esi + 0xd8], eax
mov dword [eax + 0x18], esi
or byte [esi + 0x24], 0x80
push 4
push 0x4087c0
push esi
call fcn.004081b0
add esp, 0xc
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x43ae79
call sub.msvcrt.dll_perror
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 0x34], eax
push esi
call fcn.004082a0
add esp, 4
mov eax, edi
jmp 0x408fa4

Function at 0x4092d0
Capabilities:
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov edi, edx
mov esi, ecx
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x28]
cmp eax, 0x1fff
jle 0x40930b
cmp eax, 0x2000
je 0x409319
cmp eax, 0x100000
je 0x40935f
cmp eax, 0x1000000
jne 0x409371
push ecx
push edi
push dword [esi + 0xf8]
call fcn.0040f750
jmp 0x40937b
cmp eax, 0x100
je 0x409319
cmp eax, 0x1000
jne 0x409371
mov ebp, dword [esi + 0x30]
mov ebx, dword [esi + 0x44]
push ebx
call fcn.00405d30
add esp, 4
push eax
push ebx
push 0
push dword [esp + 0x24]
push edi
push ebp
call dword [sym.imp.WS2_32.dll_sendto]
mov ecx, dword [esi + 0x40]
cmp word [ecx + 2], 0
jne 0x40936c
mov dword [esp], 0x1c
mov edx, esp
push edx
push ecx
push dword [esi + 0x30]
mov esi, eax
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, esi
add esp, 4
jmp 0x40937e
push 0
push ecx
push edi
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_send]
add esp, 4
jmp 0x40937e
push ecx
push edi
push dword [esi + 0x30]
call sub.msvcrt.dll__write
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret