joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10004af0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10166260
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x101d6480]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x10], eax
push 8
mov dword [eax], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.1013822a
mov esi, eax
xorps xmm0, xmm0
movq qword [esi], xmm0
push 1
mov dword [ebp - 4], 0
call fcn.101373e8
mov dword [esi + 4], eax
add esp, 8
mov eax, dword [ebp - 0x10]
lea edi, [eax + 0x14]
lea ecx, [eax + 0x18]
lea edx, [eax + 0x24]
mov dword [eax + 0x34], esi
lea ebx, [eax + 4]
mov dword [eax + 0xc], ebx
lea esi, [eax + 8]
mov dword [eax + 0x10], esi
mov dword [eax + 0x1c], edi
mov dword [eax + 0x20], ecx
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebx + 0x30], eax
mov ebx, dword [ebp - 0x14]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
mov eax, dword [ebp - 0x10]
mov dword [ebx], 0
mov dword [edi], 0
mov dword [edx], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100076d0
Capabilities:
Hash data using sha1
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1064
call fcn.10138dd0
mov eax, dword [0x101d6480]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
mov edi, ecx
test edi, edi
jne 0x10007723
test esi, esi
je 0x10007884
push str.FileNameInPut_Is_NULL
push 0x101c3ca0
push esi
call fcn.10006380
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push 0x101c3ca4
lea eax, [ebp - 0x1064]
push edi
push eax
call fcn.101426b7
mov eax, dword [ebp - 0x1064]
add esp, 0xc
test eax, eax
jne 0x1000776c
test esi, esi
je 0x10007884
push edi
push 0x101c3ca8
push esi
call fcn.10006380
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push eax
push 0x1000
lea eax, [ebp - 0x1004]
mov dword [ebp - 0x1060], 0x67452301
push 1
push eax
mov dword [ebp - 0x105c], 0xefcdab89
mov dword [ebp - 0x1058], 0x98badcfe
mov dword [ebp - 0x1054], 0x10325476
mov dword [ebp - 0x1050], 0xc3d2e1f0
mov dword [ebp - 0x104c], 0
mov dword [ebp - 0x1008], 0
call fcn.1013f197
add esp, 0x10
test eax, eax
je 0x10007802
nop dword [eax]
push eax
lea edx, [ebp - 0x1004]
lea ecx, [ebp - 0x1060]
call fcn.10007440
push dword [ebp - 0x1064]
lea eax, [ebp - 0x1004]
push 0x1000
push 1
push eax
call fcn.1013f197
add esp, 0x14
test eax, eax
jne 0x100077d0
push dword [ebp - 0x1064]
call fcn.1013f8e1
add esp, 4
test eax, eax
je 0x1000783a
test esi, esi
je 0x10007884
push edi
push 0x101c3cbc
push esi
call fcn.10006380
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x1060]
call fcn.10007520
push dword [ebp - 0x1064]
call fcn.1013e587
add esp, 4
mov edi, ebx
xor esi, esi
nop word [eax + eax]
movzx eax, byte [ebp + esi - 0x1048]
push eax
push 0x101c3cd0
push edi
call fcn.10006380
inc esi
add esp, 0xc
add edi, 2
cmp esi, 0x14
jl 0x10007860
mov byte [ebx + esi*2], 0
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10138217
mov esp, ebp
pop ebp
ret
Function at 0x10008950
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1016659e
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x101d6480]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], edi
xorps xmm0, xmm0
mov dword [ebp - 0x18], 1
movq qword [edi], xmm0
mov dword [edi + 8], 0
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [ebp - 4], 0
mov ecx, esi
mov dword [ebp - 0x18], 1
call fcn.10008160
mov ebx, eax
or eax, edx
je 0x10008a41
cmp dword [esi + 0x14], 8
jb 0x100089ce
mov esi, dword [esi]
push 0x101c4abc
push esi
call fcn.10142689
mov esi, eax
add esp, 8
mov dword [ebp - 0x14], esi
test esi, esi
je 0x10008a41
mov eax, dword [edi + 4]
mov ecx, eax
mov edx, dword [edi]
sub ecx, edx
mov dword [ebp - 0x10], eax
cmp ebx, ecx
jae 0x100089fa
lea eax, [edx + ebx]
jmp 0x10008a2a
jbe 0x10008a2d
mov eax, dword [edi + 8]
sub eax, edx
cmp ebx, eax
jbe 0x10008a10
push ecx
push ebx
mov ecx, edi
call fcn.10008a60
jmp 0x10008a2d
mov esi, ebx
sub esi, ecx
push esi
push 0
push dword [ebp - 0x10]
call fcn.1013a6c0
mov eax, dword [ebp - 0x10]
add esp, 0xc
add eax, esi
mov esi, dword [ebp - 0x14]
mov dword [edi + 4], eax
push esi
push 1
push ebx
push dword [edi]
call fcn.1013f197
push esi
call fcn.1013e587
add esp, 0x14
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10013560
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
xor edx, edx
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, 0x1505
add eax, esi
mov ecx, eax
sub ecx, esi
push edi
xor edi, edi
cmp esi, eax
cmova ecx, edx
mov dword [ebp + 8], ecx
test ecx, ecx
je 0x100135a9
mov al, byte [esi]
push eax
call fcn.100209f0
movsx ecx, al
lea esi, [esi + 1]
mov eax, ebx
inc edi
shl eax, 5
add esp, 4
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp edi, dword [ebp + 8]
jb 0x10013587
pop edi
pop esi
movzx eax, bl
pop ebx
pop ebp
ret

Function at 0x10014870
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2f0], 2
jne 0x10014885
pop ebp
jmp fcn.10014820
mov al, 1
pop ebp
ret
Function at 0x1001d890
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x101d6480]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ecx + eax*4 + 0x1c0]
push edi
mov edi, dword [ebp + 0x10]
push eax
push ecx
mov dword [ebp - 0x88], ecx
call fcn.1001ddf0
add esp, 8
push 0
push dword [ebp + 0x14]
push edi
push esi
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
mov dword [ebx], 0
cmp esi, 0xffffffff
jne 0x1001d94a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0x2733
jne 0x1001d90c
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x84]
push eax
push edi
call fcn.1000ed30
push eax
mov eax, dword [ebp - 0x88]
push str.Send_failure:__s
push dword [eax]
call fcn.1001d510
mov eax, dword [ebp - 0x88]
add esp, 0x18
mov eax, dword [eax]
mov dword [eax + 0xcfc], edi
mov eax, esi
mov dword [ebx], 0x37
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10138217
mov esp, ebp
pop ebp
ret

Function at 0x1001ddf0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov eax, ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
shl eax, 4
push edi
lea esi, [ebx + 0x1e4]
add esi, eax
mov eax, dword [ebx + 0x2e8]
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x1001deb8
cmp dword [ebx + ecx*4 + 0x1d4], 0x1001d7a0
jne 0x1001deb8
cmp dword [esi], 0
je 0x1001de39
test edi, edi
je 0x1001deb8
mov eax, dword [ebx + ecx*4 + 0x1c0]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
mov dword [ebp + 0xc], eax
call fcn.100205d0
add esp, 0x14
cmp eax, 0xffffffff
je 0x1001deb8
test al, 1
je 0x1001deb8
mov ecx, dword [esi]
test ecx, ecx
jne 0x1001de93
mov eax, dword [ebx]
mov eax, dword [eax + 0x8f4]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [section..data]
mov edi, dword [esi + 4]
mov ecx, eax
add esp, 4
mov dword [esi], ecx
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test ecx, ecx
je 0x1001deb1
mov eax, dword [esi + 8]
push 0
push edi
add eax, ecx
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x1001deb8
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
pop ebp
ret
mov dword [esi + 4], 0
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x1001e040
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp byte [eax + 0x210], 0
je 0x1001e060
push eax
call fcn.10017710
add esp, 4
test eax, eax
jne 0x1001e07e
xor al, al
pop ebp
ret
mov eax, dword [eax + 0x1c0]
cmp eax, 0xffffffff
je 0x1001e05c
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1001e05c
mov al, 1
pop ebp
ret
Function at 0x1001e840
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x101dc4fc]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x1001e891
push 3
push 2
push eax
push 6
call fcn.1001fe70
add esp, 0x10
test al, al
je 0x1001e885
mov dword [0x101dc4fc], 2
mov esp, ebp
pop ebp
ret
mov dword [0x101dc4fc], 1
jmp 0x1001e896
cmp eax, 2
je 0x1001e8d6
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1001e8bd
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x1001e8d6
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esp, ebp
pop ebp
ret
Function at 0x1001eb30
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
mov eax, dword [0x101d6480]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x90], 3
jne 0x1001ed51
cmp byte [esi + 0x2a5], 0
push ebx
push edi
jne 0x1001ed46
cmp byte [esi + 0x2c0], 0
jne 0x1001ed46
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x188]
mov ebx, dword [esi]
push eax
lea eax, [ebp - 0x184]
mov dword [ebp - 0x188], 0x80
push eax
push edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x1001ebd3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.1000ed30
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.1001d510
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x104]
mov dword [ebp - 0x18c], 0x80
push 0
push eax
call fcn.1013a6c0
add esp, 0xc
lea eax, [ebp - 0x18c]
push eax
lea eax, [ebp - 0x104]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1001ec47
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.1000ed30
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.1001d510
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x138]
push eax
lea edi, [esi + 0x10a]
push edi
push dword [ebp - 0x188]
lea eax, [ebp - 0x184]
push eax
call fcn.1001dec0
add esp, 0x10
test al, al
jne 0x1001ecb0
call fcn.10144b87
mov esi, dword [eax]
call fcn.10144b87
mov edi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.1000ed30
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1001d510
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
movups xmm0, xmmword [edi]
mov eax, dword [edi + 0x28]
movups xmmword [esi + 0x5c], xmm0
movups xmm0, xmmword [edi + 0x10]
movups xmmword [esi + 0x6c], xmm0
movq xmm0, qword [edi + 0x20]
movq qword [esi + 0x7c], xmm0
mov dword [esi + 0x84], eax
mov ax, word [edi + 0x2c]
mov word [esi + 0x88], ax
lea eax, [esi + 0x16c]
push eax
lea eax, [esi + 0x13c]
push eax
push dword [ebp - 0x18c]
lea eax, [ebp - 0x104]
push eax
call fcn.1001dec0
add esp, 0x10
test al, al
jne 0x1001ed46
call fcn.10144b87
mov esi, dword [eax]
call fcn.10144b87
mov edi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.1000ed30
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1001d510
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push esi
call fcn.1001e760
add esp, 4
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.10138217
mov esp, ebp
pop ebp
ret
Function at 0x1001f7c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x101d6480]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
push 4
cmp byte [esi + 0xad3], al
setne al
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1001f81d
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.1001d5f0
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push dword [esi + 0xa6c]
mov dword [ebp - 0x10], 1
call fcn.1001fa90
push dword [esi + 0xa70]
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.1001fa90
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x1001f88d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.1001d5f0
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.10138217
mov esp, ebp
pop ebp
ret

Function at 0x1001f8a0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x101d6480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push 4
mov dword [ebp - 0x88], 1
mov esi, dword [eax]
lea eax, [ebp - 0x88]
push eax
push 1
push 6
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1001f913
push 0x80
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1000ed30
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.1001d5f0
add esp, 0x18
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.1001d5f0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop esi
call fcn.10138217
mov esp, ebp
pop ebp
ret
Function at 0x1001fd00
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
push str.kernel32
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x1001fd20
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push esi
push 0x1016cc80
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [ebp + 8]
mov ebx, eax
push 0x1016cc90
push esi
mov dword [ebp - 8], ebx
call fcn.1014b067
add esp, 8
test eax, eax
je 0x1001fd6c
test ebx, ebx
je 0x1001fd5c
push 8
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x1001fd95
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1001fd95
push 0x800
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x1001fe58
mov ecx, esi
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001fdb1
sub ecx, ebx
sar ecx, 1
lea eax, [ecx + edx]
lea eax, [eax*2 + 2]
push eax
call dword [section..data]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x1001fe4e
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1001fe4e
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001fdf0
sub ecx, edx
sar ecx, 1
mov dword [ebx + ecx*2], 0x5c
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001fe10
sub ecx, edx
sar ecx, 1
add ecx, ecx
sub ecx, esi
add ecx, ebx
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x1001fe25
mov eax, dword [ebp - 8]
test eax, eax
je 0x1001fe45
push 8
push 0
push ebx
call eax
jmp 0x1001fe4c
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
push ebx
call dword [0x101d1004]
add esp, 4
pop esi
pop ebx
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x1001ffd0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x101d6480]
xor eax, ebp
mov dword [ebp - 4], eax
test byte [ebp + 8], 2
je 0x10020029
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x10020016
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x10020010
shr eax, 8
cmp al, 2
je 0x10020029
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
push str.iphlpapi.dll
call fcn.1001fd00
add esp, 4
mov dword [0x101dc504], eax
test eax, eax
je 0x1002005c
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [0x101dc500]
test eax, eax
cmovne ecx, eax
mov dword [0x101dc500], ecx
push 3
push 2
push 0
push 6
call fcn.1001fe70
add esp, 0x10
test al, al
je 0x10020092
push 0x101dfed0
mov byte [0x101dfecc], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
mov byte [0x101dfecc], 0
call fcn.10138217
mov esp, ebp
pop ebp
ret
Function at 0x10022fb0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x10022fd1
cmp dword [esi + 0x80], 0
je 0x10022fd1
push 2
push 3
push esi
call fcn.10020f90
add esp, 0xc
push dword [ebp + 0xc]
call fcn.100229f0
add esp, 4
test esi, esi
je 0x10022ff4
cmp dword [esi + 0x80], 0
je 0x10022ff4
push 3
push esi
call fcn.10020fd0
add esp, 8
pop esi
pop ebp
ret
Function at 0x1002d000
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
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x101d6480]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [sym.imp.WS2_32.dll_socket]
push edi
push 6
push 1
push 2
mov dword [ebp - 0x34], 0x10
mov dword [ebp - 0x30], 1
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x1002d1d1
xorps xmm0, xmm0
mov eax, 2
push 0x7f000001
movlpd qword [ebp - 0x24], xmm0
mov word [ebp - 0x2c], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x28], eax
xor eax, eax
push 4
mov word [ebp - 0x2a], ax
lea eax, [ebp - 0x30]
push eax
push 4
push 0xffff
push edi
mov dword [ebx + 4], 0xffffffff
mov dword [ebx], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1002d1bf
push 0x10
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x1002d1bf
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1002d1bf
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x1002d1bf
push 0
push 1
push 2
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x1002d1bf
push 0x10
lea ecx, [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1002d1bf
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
je 0x1002d1bf
push ebx
push 0x1016ec8c
lea eax, [ebp - 0x1c]
push 0xc
push eax
call fcn.10021180
lea esi, [ebp - 0x1c]
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1002d126
push 0
sub esi, ecx
lea eax, [ebp - 0x1c]
push esi
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x1002d1bf
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jne 0x1002d1bf
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x10]
sub esi, 4
jb 0x1002d173
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1002d178
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1002d162
cmp esi, 0xfffffffc
je 0x1002d1a5
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1002d1bf
cmp esi, 0xfffffffd
je 0x1002d1a5
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1002d1bf
cmp esi, 0xfffffffe
je 0x1002d1a5
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1002d1bf
cmp esi, 0xffffffff
je 0x1002d1a5
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x1002d1bf
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10138217
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
push edi
call esi
push dword [ebx]
call esi
push dword [ebx + 4]
call esi
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10138217
mov esp, ebp
pop ebp
ret