joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100015be
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
lea ebp, [esp - 0xb8]
sub esp, 0x134
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp + 0xb4], eax
push esi
mov esi, dword [sym.imp.ws2_32.dll_select]
xor ecx, ecx
lea edx, [ebp - 0x7c]
push edx
push ecx
push ecx
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x78], ecx
lea ecx, [ebp - 0x6c]
lea eax, [edi + 1]
push ecx
push eax
mov byte [ebp - 0x6d], 0
mov dword [ebp - 0x74], 0x1c
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x6c], 1
call esi
test eax, eax
jle 0x10001671
push ebx
mov ebx, dword [sym.imp.ws2_32.dll_recvfrom]
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x98]
push eax
push 2
push 1
lea eax, [ebp - 0x6e]
push eax
push edi
call ebx
cmp eax, 0xffffffff
jne 0x10001670
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2746
jne 0x10001670
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x98]
push eax
push 0
push 1
lea eax, [ebp - 0x6e]
push eax
push edi
call ebx
lea eax, [ebp - 0x7c]
push eax
push 0
push 0
lea eax, [ebp - 0x6c]
push eax
lea eax, [edi + 1]
push eax
mov byte [ebp - 0x6d], 1
call esi
test eax, eax
jg 0x10001618
pop ebx
mov ecx, dword [ebp + 0xb4]
mov al, byte [ebp - 0x6d]
xor ecx, ebp
pop esi
call fcn.1000c212
add ebp, 0xb8
leave
ret

Function at 0x100016d6
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
xor edi, edi
push edi
push 2
push 0x17
mov dword [ebp - 8], edi
mov dword [ebp - 4], 1
call dword [sym.imp.ws2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10001715
push str.Socket_creation_failed
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 8]
call fcn.10005423
or eax, 0xffffffff
jmp 0x10001788
push 4
lea eax, [ebp - 8]
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.ws2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x10001748
push str.Socket_creation_failed
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 8]
call fcn.10005423
push esi
call dword [sym.imp.ws2_32.dll_closesocket]
jmp 0x10001710
push edi
push 1
push esi
call dword [sym.imp.kernel32.dll_SetHandleInformation]
push 4
lea eax, [ebp - 4]
push eax
push 0x20
push 0xffff
push esi
call fcn.10005423
push edi
push edi
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 4]
push eax
push 0x9800000c
push esi
mov dword [ebp - 4], edi
call dword [sym.imp.ws2_32.dll_WSAIoctl]
mov eax, esi
pop edi
pop esi
leave
ret 0xc
Function at 0x10001814
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
xor ecx, ecx
inc ecx
push ecx
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp + 0x18]
mov dword [ebp - 0x24], 0x1c
push eax
push esi
call fcn.10005423
test eax, eax
jne 0x1000189a
push dword [ebp - 0x24]
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10001878
push str.connect
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10005423
jmp 0x1000189a
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
push 4
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 0x28]
push eax
push 0x9800000c
push dword [ebp + 0x10]
call dword [sym.imp.ws2_32.dll_WSAIoctl]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1000c212
leave
ret 0x14

Function at 0x100018a9
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x24], 0
push 0x1c
lea eax, [ebp - 0x20]
push 0
push eax
call sub.msvcr100.dll_memset
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ws2_32.dll_connect]
push 0
push 0
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 0x2c]
push eax
push 4
lea eax, [ebp - 0x24]
push eax
push 0x9800000c
push dword [ebp + 0x10]
call dword [sym.imp.ws2_32.dll_WSAIoctl]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000c212
leave
ret 0xc

Function at 0x1000190c
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 0x24], 0x1c
call dword [sym.imp.ws2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x10001954
push str.JVM_GetSockName
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10005423
or eax, 0xffffffff
jmp 0x10001962
movzx eax, word [ebp - 0x1e]
push eax
call dword [sym.imp.ws2_32.dll_ntohs]
movzx eax, ax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1000c212
leave
ret 0xc

Function at 0x10001971
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 0x24], 0x1c
call dword [sym.imp.ws2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x100019b8
push str.Error_getting_socket_name
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10005423
xor eax, eax
jmp 0x100019c6
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.10005423
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1000c212
leave
ret 0xc
Function at 0x10001ced
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x7ac]
sub esp, 0x82c
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp + 0x7a8], eax
cmp byte [ebp + 0x7d4], 0
mov eax, dword [ebp + 0x7c0]
push esi
mov esi, dword [ebp + 0x7b4]
lea ecx, [ebp - 0x74]
push edi
mov edi, dword [ebp + 0x7c8]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0x7cc]
mov dword [ebp - 0x78], 0x1c
mov dword [ebp - 0x7c], ecx
je 0x10001d45
and dword [ebp - 0x7c], 0
and dword [ebp - 0x78], 0
jmp 0x10001d64
push 1
lea ecx, [ebp - 0x78]
push ecx
lea ecx, [ebp - 0x74]
push ecx
push dword [ebp + 0x7d0]
push eax
push esi
call fcn.10005423
test eax, eax
jne 0x10001de8
push ebx
cmp edi, 0x800
jle 0x10001d93
mov eax, 0x10000
cmp edi, eax
jle 0x10001d78
mov edi, eax
push edi
call dword [sym.imp.msvcr100.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x10001d96
push str.Native_heap_allocation_failed
push esi
call sub.java.dll__JNU_ThrowOutOfMemoryError_8
jmp 0x10001de7
lea ebx, [ebp - 0x58]
mov eax, dword [esi]
push ebx
push edi
push dword [ebp + 0x7c4]
push dword [ebp - 0x80]
push esi
call dword [eax + 0x320]
push dword [ebp - 0x78]
push dword [ebp - 0x7c]
push 0
push edi
push ebx
push dword [ebp + 0x7bc]
call dword [sym.imp.ws2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x10001dd7
push str.Datagram_send_failed
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10005423
cmp edi, 0x800
jle 0x10001de7
push ebx
call dword [sym.imp.msvcr100.dll_free]
pop ecx
pop ebx
mov ecx, dword [ebp + 0x7a8]
pop edi
xor ecx, ebp
pop esi
call fcn.1000c212
add ebp, 0x7ac
leave
ret 0x24

Function at 0x10001f9e
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
xor eax, eax
cmp byte [ebp + 0x10], al
push esi
sete al
push 0
inc eax
push eax
push 0x17
call fcn.1000b86d
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
jne 0x10001fdc
push str.create
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 8]
call fcn.10005423
or eax, esi
jmp 0x10002013
push 4
lea eax, [ebp - 4]
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.ws2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x10002006
push str.create
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 8]
call fcn.10005423
push 0
push 1
push esi
call dword [sym.imp.kernel32.dll_SetHandleInformation]
mov eax, esi
pop esi
leave
ret 0x10
Function at 0x10002086
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push 1
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp + 0x18]
mov dword [ebp - 0x24], 0x1c
push eax
push esi
call fcn.10005423
test eax, eax
jne 0x10002108
push dword [ebp - 0x24]
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000210b
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x100020e3
push 0xfffffffffffffffe
pop eax
jmp 0x1000210b
cmp eax, 0x2741
jne 0x100020fc
push str.connect:_Address_is_invalid_on_local_machine__or_port_is_not_valid_on_remote_machine
push str.java_net_ConnectException
push esi
call sub.java.dll__JNU_ThrowByName_12
jmp 0x10002108
push str.connect
push eax
push esi
call fcn.10005423
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1000c212
leave
ret 0x14

Function at 0x1000211a
Capabilities:
Get socket status

Disassembly:
push ebp
lea ebp, [esp - 0x19c]
sub esp, 0x21c
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp + 0x198], eax
xor eax, eax
inc eax
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x94], eax
mov eax, dword [ebp + 0x1b0]
cdq
mov ecx, 0x3e8
idiv ecx
push ebx
push esi
mov esi, dword [ebp + 0x1ac]
push edi
mov edi, dword [ebp + 0x1a4]
xor ebx, ebx
mov dword [ebp - 0x78], 4
mov dword [ebp - 0x6c], esi
mov dword [ebp + 0x98], esi
mov dword [ebp - 0x80], eax
imul edx, edx, 0x3e8
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp + 0x94]
push eax
lea eax, [ebp - 0x70]
push eax
push ebx
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x7c], edx
call dword [sym.imp.ws2_32.dll_select]
mov dword [ebp - 0x74], eax
cmp eax, ebx
jne 0x100021b8
push str.connect_timed_out
push str.java_net_SocketTimeoutException
push edi
call sub.java.dll__JNU_ThrowByName_12
push 2
push esi
call dword [sym.imp.ws2_32.dll_shutdown]
jmp 0x1000221b
lea eax, [ebp + 0x94]
push eax
push esi
call sub.ws2_32.dll___WSAFDIsSet
test eax, eax
je 0x1000221b
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x74]
push eax
push 0x1007
push 0xffff
push esi
call fcn.10005423
cmp dword [ebp - 0x74], 0
jne 0x1000220d
push 0
call dword [sym.imp.kernel32.dll_Sleep]
inc ebx
cmp ebx, 3
jl 0x100021c9
cmp dword [ebp - 0x74], 0
jne 0x1000220d
push str.Unable_to_establish_connection
push str.java_net_SocketException
push edi
call sub.java.dll__JNU_ThrowByName_12
jmp 0x1000221b
push str.connect
push dword [ebp - 0x74]
push edi
call fcn.10005423
mov ecx, dword [ebp + 0x198]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000c212
add ebp, 0x19c
leave
ret 0x10
Function at 0x10002235
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 0x24], 0x1c
call dword [sym.imp.ws2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x1000229c
push esi
mov esi, dword [sym.imp.ws2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2736
jne 0x10002288
push str.Socket_closed
push str.java_net_SocketException
push edi
call sub.java.dll__JNU_ThrowByName_12
jmp 0x10002296
push str.getsockname_failed
call esi
push eax
push edi
call fcn.10005423
or eax, 0xffffffff
pop esi
jmp 0x100022aa
movzx eax, word [ebp - 0x1e]
push eax
call dword [sym.imp.ws2_32.dll_ntohs]
movzx eax, ax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.1000c212
leave
ret 0xc

Function at 0x100022b9
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 0x24], 0x1c
call dword [sym.imp.ws2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x10002302
push str.Error_getting_socket_name
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10005423
jmp 0x10002343
push ebx
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.10005423
mov ebx, eax
test ebx, ebx
je 0x10002342
mov eax, dword [esi]
push edi
push esi
call dword [eax + 0x7c]
mov ecx, dword [esi]
push str.Ljava_net_InetAddress_
push str.addr
push eax
push esi
call dword [ecx + 0x178]
test eax, eax
je 0x10002342
mov ecx, dword [esi]
push ebx
push eax
push edi
push esi
call dword [ecx + 0x1a0]
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1000c212
leave
ret 0x10

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

Disassembly:
push 1
push 1
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x18]
call dword [sym.imp.ws2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1000266b
push str.send
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push dword [esp + 0xc]
call fcn.10005423
jmp 0x10002680
cmp eax, 0xfffffffe
jne 0x10002680
push 0
push str.java_io_InterruptedIOException
push dword [esp + 0xc]
call sub.java.dll__JNU_ThrowByName_12
ret 0x10

Function at 0x100027a3
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push pe_nt_image_headers32
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.ws2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x100027e4
lea eax, [ebp - 0x104]
push str.localhost
push eax
call sub.msvcr100.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push eax
push esi
call sub.java.dll__JNU_NewStringPlatform_8
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1000c212
leave
ret 8
Function at 0x10005423
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
pushal
call 0x10005432
pop dword [ebp - 0x10]
mov eax, 0x89405079
sub eax, 0x793ffc47
sub dword [ebp - 0x10], eax
mov dword [ebp - 0x20], 0x4efdd0ec
sub dword [ebp - 0x20], 0xab8ba1
mov dword [ebp - 0x1c], 0x6a174893
sub dword [ebp - 0x1c], 0x37e3fc4e
mov dword [ebp - 0x18], 0x3700cad4
add dword [ebp - 0x18], 0x154b795a
mov dword [ebp - 0x14], 0x5e92b40a
sub dword [ebp - 0x14], 0x5e92b40a
lea eax, [ebp - 0x20]
push eax
mov eax, 0x82d34d61
add eax, 0x8d2d82db
add eax, dword [ebp - 0x10]
call dword [eax]
mov dword [ebp - 0x20], 0x61571319
sub dword [ebp - 0x20], 0xece4a9c3
mov dword [ebp - 0x1c], 0x231de899
add dword [ebp - 0x1c], 0x1e4e78dc
mov dword [ebp - 0x18], 0xb90cae66
add dword [ebp - 0x18], 0xaa62be06
mov dword [ebp - 0x14], 0xe144347b
add dword [ebp - 0x14], 0x1ebbcb85
lea ebx, [ebp - 0x20]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x10]
call dword [eax]
push 0x40
push 0x1000
push 0x35aa7
push 0
call eax
mov ecx, 0x4ce40842
add ecx, 0xb31c38d4
mov edi, eax
mov edx, 0x10015200
add edx, dword [ebp - 0x10]
mov esi, 0xfee86ce8
sub esi, 0x1abb0fe2
sub dword [ebp - 8], 0x6ae61f0
mov ebx, dword [edx]
sub dword [ebp - 8], edx
xor ebx, esi
mov dword [ebp - 0xc], 0xaa0e5fd
mov dword [edi], ebx
add dword [ebp - 4], 0x3e5f8b1e
add edi, 0x251a702b
add edi, 0xdae58fd9
add edx, 0xe17ae80a
add edx, 0x1e8517fa
loop 0x10005549
add eax, 0xef4227c5
sub eax, 0xef41309a
xor ebx, ebx
add ebx, eax
add eax, 0x9b76ab
sub eax, 0x9b76a6
mov ecx, 0x314e98aa
sub ecx, 0x214e98aa
add ecx, dword [ebp - 0x10]
call ebx
leave
ret
Function at 0x10006614
Capabilities:
Check os version
Get hostname
Resolve dns

Disassembly:
push ebp
lea ebp, [esp - 0x124]
sub esp, 0x1a4
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp + 0x120], eax
cmp byte [0x1001218f], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 0x12c]
mov dword [ebp - 0x7c], edi
jne 0x10006773
mov esi, 0x100121b8
push esi
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
cmp byte [0x1001218f], 0
jne 0x1000676c
lea eax, [ebp - 0x74]
push eax
mov dword [ebp - 0x74], 0x94
call dword [sym.imp.kernel32.dll_GetVersionExA]
cmp dword [ebp - 0x64], 1
mov byte [0x1001218e], 0
jne 0x10006698
cmp dword [ebp - 0x70], 4
jne 0x10006698
cmp dword [ebp - 0x6c], 0
je 0x10006691
cmp dword [ebp - 0x6c], 0xa
jne 0x10006698
mov byte [0x1001218e], 1
lea eax, [ebp - 0x80]
push eax
push 0x100121ac
push 0x2003
push 0xffff
push dword [ebp + 0x130]
mov dword [ebp - 0x80], 4
call fcn.10005423
test eax, eax
jns 0x100066cb
mov dword [0x100121ac], 0xfff7
cmp byte [0x1001218e], 0
je 0x10006765
push 0xff
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.ws2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x1000670a
push esi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push str.Unable_to_obtain_hostname
push str.java_net_SocketException
push edi
call sub.java.dll__JNU_ThrowByName_12
mov al, 1
jmp 0x100067f8
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.ws2_32.dll_gethostbyname]
test eax, eax
je 0x10006765
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
mov dword [ebp - 0x78], eax
test edi, edi
je 0x10006765
mov esi, dword [0x100121d0]
push 8
call dword [sym.imp.msvcr100.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x100067af
push dword [edi]
call dword [sym.imp.ws2_32.dll_htonl]
add dword [ebp - 0x78], 4
mov dword [ebx], eax
mov eax, dword [0x100121d0]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x78]
mov edi, dword [eax]
mov esi, ebx
mov dword [0x100121d0], esi
test edi, edi
jne 0x1000672a
mov esi, 0x100121b8
mov byte [0x1001218f], 1
push esi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 0x138]
cmp eax, dword [0x100121ac]
jg 0x10006703
cmp byte [0x1001218e], 0
je 0x100067f6
cmp eax, 0x2ff8
jle 0x100067f6
mov ecx, dword [ebp + 0x134]
mov eax, 0x7f000000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x10006703
mov eax, dword [0x100121d0]
jmp 0x100067f2
test esi, esi
je 0x100067ca
mov edi, dword [esi + 4]
push esi
call dword [sym.imp.msvcr100.dll_free]
pop ecx
mov esi, edi
test edi, edi
jne 0x100067b3
mov dword [0x100121d0], esi
push 0x100121b8
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push str.Native_heap_allocation_failed
push dword [ebp - 0x7c]
call sub.java.dll__JNU_ThrowOutOfMemoryError_8
jmp 0x10006703
cmp dword [eax], ecx
je 0x10006703
mov eax, dword [eax + 4]
test eax, eax
jne 0x100067e7
xor al, al
mov ecx, dword [ebp + 0x120]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000c212
add ebp, 0x124
leave
ret
Function at 0x1000687b
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
lea ebp, [esp - 0xb8]
sub esp, 0x134
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp + 0xb4], eax
push esi
push 0x1c
pop eax
push eax
xor esi, esi
mov dword [ebp - 0x74], eax
lea eax, [ebp + 0x98]
push esi
push eax
mov byte [ebp - 0x6d], 0
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x78], esi
call sub.msvcr100.dll_memset
add esp, 0xc
call fcn.10005423
test al, al
je 0x1000694e
lea ecx, [ebp - 0x7c]
push ecx
push esi
push esi
mov esi, dword [sym.imp.ws2_32.dll_select]
lea ecx, [ebp - 0x6c]
lea eax, [ebx + 1]
push ecx
push eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], 1
call esi
test eax, eax
jle 0x1000694b
push edi
mov edi, dword [sym.imp.ws2_32.dll_recvfrom]
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x98]
push eax
push 2
push 1
lea eax, [ebp - 0x6e]
push eax
push ebx
call edi
cmp eax, 0xffffffff
jne 0x1000694a
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2746
jne 0x1000694a
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x98]
push eax
push 0
push 1
lea eax, [ebp - 0x6e]
push eax
push ebx
call edi
lea eax, [ebp - 0x7c]
push eax
push 0
push 0
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebx + 1]
push eax
mov byte [ebp - 0x6d], 1
call esi
test eax, eax
jg 0x100068f2
pop edi
mov al, byte [ebp - 0x6d]
mov ecx, dword [ebp + 0xb4]
xor ecx, ebp
pop esi
call fcn.1000c212
add ebp, 0xb8
leave
ret
Function at 0x10006ddb
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push dword [0x100125a0]
mov edi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x24], eax
mov eax, dword [esi]
push esi
call dword [eax + 0x17c]
push dword [0x100125ac]
mov ebx, eax
mov eax, dword [esi]
push edi
push esi
call dword [eax + 0x17c]
or dword [ebp - 0x2c], 0xffffffff
or dword [ebp - 0x28], 0xffffffff
mov edi, eax
call sym.net.dll__ipv6_available_0
mov dword [ebp - 0x30], eax
test ebx, ebx
jne 0x10006e4b
test edi, edi
jne 0x10006e62
push str.Socket_closed
push str.java_net_SocketException
push esi
call sub.java.dll__JNU_ThrowByName_12
jmp 0x10006f48
push dword [0x100121e0]
mov eax, dword [esi]
push ebx
push esi
call dword [eax + 0x190]
mov dword [ebp - 0x2c], eax
test edi, edi
je 0x10006e75
push dword [0x100121e0]
mov eax, dword [esi]
push edi
push esi
call dword [eax + 0x190]
mov dword [ebp - 0x28], eax
xor ebx, ebx
cmp dword [ebp - 0x24], ebx
jne 0x10006e8c
push str.address
push esi
call sub.java.dll__JNU_ThrowNullPointerException_8
jmp 0x10006f48
push dword [ebp - 0x24]
push esi
call fcn.1000ab66
mov eax, dword [esi]
pop ecx
pop ecx
push esi
call dword [eax + 0x390]
test al, al
jne 0x10006f48
push dword [ebp - 0x24]
push esi
call fcn.1000aba4
pop ecx
pop ecx
mov edi, eax
mov eax, dword [esi]
push esi
call dword [eax + 0x390]
test al, al
jne 0x10006f48
xor eax, eax
inc eax
cmp edi, 2
jne 0x10006edd
cmp dword [ebp - 0x30], ebx
jne 0x10006ee4
push str.Protocol_family_not_supported
jmp 0x10006e3b
cmp edi, eax
mov edi, dword [ebp - 0x2c]
je 0x10006ee7
mov edi, dword [ebp - 0x28]
cmp dword [0x10012208], ebx
je 0x10006f10
push ebx
push ebx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 0x2c]
push eax
push 4
lea eax, [ebp - 0x30]
push eax
push 0x9800000c
push edi
call dword [sym.imp.ws2_32.dll_WSAIoctl]
push ebx
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x14]
push dword [ebp - 0x24]
push esi
call fcn.10005423
test eax, eax
jne 0x10006f48
push 0x1c
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10006f48
push str.connect
push esi
call fcn.1000afaa
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000c212
leave
ret 0x10
Function at 0x10008ba1
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x100120b4]
xor eax, ebp
mov dword [ebp - 4], eax
or dword [ebp - 0x2c], 0xffffffff
and dword [ebp - 0x28], 0
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
call sym.net.dll__ipv6_available_0
push edi
mov ebx, eax
call fcn.100065bc
pop ecx
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x10008be0
push edi
call fcn.100065e8
pop ecx
jmp 0x10008be3
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x24], 0
jge 0x10008c01
test eax, eax
jns 0x10008c01
push str.Socket_closed
push str.java_net_SocketException
push esi
call sub.java.dll__JNU_ThrowByName_12
xor eax, eax
jmp 0x10008c63
cmp dword [ebp + 0x10], 2
mov dword [ebp - 0x28], 0x10
je 0x10008c1a
cmp dword [ebp + 0x10], 0xffffffff
jne 0x10008c24
cmp dword [ebp - 0x24], 0xffffffff
jne 0x10008c2a
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0x1c
cmp dword [ebp - 0x24], 0xffffffff
je 0x10008bed
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ws2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x10008c55
push str.Error_getting_socket_name
push str.java_net_SocketException
push esi
call fcn.1000affe
add esp, 0xc
jmp 0x10008bfd
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.10005423
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000c212
leave
ret 0xc