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

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
mov dword [edi], 0
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100166b1
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x1001668d
cmp eax, 2
jne 0x1001669f
mov eax, dword [ebp + 0x10]
test esi, esi
je 0x100166ad
test eax, eax
je 0x100166aa
cmp byte [eax + esi - 1], 0
je 0x100166ad
pop edi
mov eax, 0xd
pop esi
pop ebp
ret 0xc
mov byte [esi], 0
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x100169f0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1009d350]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x10]
push eax
mov edi, ecx
xor esi, esi
mov dword [ebp - 0xd], 0x642e6c6c
mov word [ebp - 0xf], 0x6474
mov word [ebp - 8], 0x6c
mov byte [ebp - 0x10], 0x6e
mov byte [ebp - 9], 0x6c
mov dword [ebp - 0x24], 0x6554744e
mov dword [ebp - 0x1b], 0x72506574
mov dword [ebp - 0x15], 0x737365
mov dword [ebp - 0x20], 0x6e696d72
mov byte [ebp - 0x1c], 0x61
mov word [ebp - 0x17], 0x636f
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x10016a77
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100a0730], eax
test eax, eax
je 0x10016a77
push esi
push edi
call eax
mov ecx, 1
test eax, eax
cmove esi, ecx
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.1004bbda
mov esp, ebp
pop ebp
ret
Function at 0x10016e70
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006cea8
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x1009d350]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x1b], 0x6c6c64
mov dword [ebp - 0x1f], 0x2e32336c
mov dword [ebp - 0x23], 0x656e7265
mov byte [ebp - 0x24], 0x4b
mov dword [ebp - 0x2a], 0x747865
mov word [ebp - 0x2d], 0x3233
mov dword [ebp - 0x32], 0x7365636f
mov byte [ebp - 0x2e], 0x73
mov byte [ebp - 0x2b], 0x4e
mov word [ebp - 0x34], 0x7250
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x10016f08
lea eax, [ebp - 0x34]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
jne 0x10016f33
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10016f2c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x10016fd9
push 0
push 2
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x15c], 0x128
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x10016fa8
lea eax, [ebp - 0x15c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32First]
cmp eax, 1
jne 0x10016fa1
jmp 0x10016f70
lea eax, [ebp - 0x138]
push eax
push dword [ebp + 8]
call fcn.1004bcaa
add esp, 8
test eax, eax
je 0x10016f97
lea eax, [ebp - 0x15c]
push eax
push esi
call edi
cmp eax, 1
je 0x10016f70
jmp 0x10016fa1
mov dword [ebp - 0x160], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10016fd3
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x160]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1004bbda
mov esp, ebp
pop ebp
ret
Function at 0x1001898c
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x1009d350]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x100189d3
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x100189cd
shr eax, 8
cmp al, 2
jne 0x100189cd
call fcn.1001c767
jmp 0x100189d6
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1004bbda
leave
ret

Function at 0x1001cf96
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x1001cfb4
cmp dword [esi + 0x6c], 0
je 0x1001cfb4
push 2
push 3
push esi
call fcn.1002fabb
add esp, 0xc
push dword [ebp + 0xc]
call fcn.1002970c
pop ecx
test esi, esi
je 0x1001cfd1
cmp dword [esi + 0x6c], 0
je 0x1001cfd1
push 3
push esi
call fcn.1002faf3
pop ecx
pop ecx
pop esi
pop ebp
ret
Function at 0x10025643
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push eax
mov esi, dword [edi + eax*4 + 0x1a8]
push edi
call fcn.10025937
pop ecx
pop ecx
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [ebp + 0x18]
mov esi, eax
and dword [ebx], 0
cmp esi, 0xffffffff
jne 0x100256bd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x2733
jne 0x10025695
xor esi, esi
mov dword [ebx], 0x51
jmp 0x100256bd
push eax
push edi
call fcn.10031aa6
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.10025321
mov eax, dword [edi]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x47e4], ecx
add esp, 0x14
mov dword [ebx], 0x37
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov eax, dword [ebx + 0x470]
mov edx, dword [ebx + ecx*4 + 0x1a8]
lea esi, [ecx + 0x1d]
shl esi, 4
add esi, ebx
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
mov dword [ebp + 8], edx
je 0x100259df
cmp dword [ebx + ecx*4 + 0x1c0], 0x100255b2
jne 0x100259df
xor eax, eax
cmp dword [esi], eax
je 0x1002597e
test edi, edi
je 0x100259df
push eax
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call fcn.10024d46
add esp, 0x14
cmp eax, 0xffffffff
je 0x100259df
test al, 1
je 0x100259df
xor ecx, ecx
cmp dword [esi], ecx
jne 0x100259c7
mov eax, dword [ebx]
mov eax, dword [eax + 0x388]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [section..data]
mov edi, dword [esi + 4]
pop ecx
xor ecx, ecx
mov dword [esi], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
test eax, eax
jne 0x100259c7
mov dword [esi + 4], ecx
jmp 0x100259df
mov eax, dword [esi]
add eax, dword [esi + 8]
push ecx
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x100259df
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x100259e4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x1e0]
xor edi, edi
test eax, eax
je 0x10025a11
push dword [esi + 0x16c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call eax
add esp, 0x14
mov edi, eax
jmp 0x10025a47
mov eax, dword [ebp + 0xc]
cmp eax, 2
ja 0x10025a47
push dword [esi + 0x168]
imul eax, eax, 3
push 1
add eax, 0x10082600
push 2
push eax
call fcn.1005210a
push dword [esi + 0x168]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.1005210a
add esp, 0x20
mov eax, edi
pop edi
pop esi
pop ebp
ret
Function at 0x10025af4
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1f0], 0
je 0x10025b12
push eax
call fcn.10005db3
pop ecx
test eax, eax
jne 0x10025b2e
xor eax, eax
pop ebp
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x10025b0e
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
jmp 0x10025b0a
xor eax, eax
inc eax
pop ebp
ret

Function at 0x100260c5
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1009eba4]
and dword [ebp - 4], 0
push esi
push 2
mov dword [ebp - 8], 0x4020
mov dword [ebp - 0xc], 4
pop esi
test eax, eax
jne 0x1002610c
push 3
push esi
push eax
push 6
call fcn.10030f80
add esp, 0x10
test eax, eax
je 0x10026104
mov dword [0x1009eba4], esi
jmp 0x1002614c
xor eax, eax
inc eax
mov dword [0x1009eba4], eax
cmp eax, esi
je 0x1002614c
push ebx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
mov esi, 0x1001
push esi
mov ebx, 0xffff
push ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1002613a
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x1002614b
push 4
lea eax, [ebp - 8]
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
pop ebx
pop esi
leave
ret

Function at 0x10026209
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
push 4
mov esi, dword [edi]
xor ecx, ecx
lea eax, [ebp + 8]
push eax
inc ecx
push ecx
push 6
push dword [ebp + 0xc]
mov dword [ebp + 8], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1002624d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.10031aa6
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.100253dd
add esp, 0x14
jmp 0x1002625a
push str.TCP_NODELAY_set_n
push esi
call fcn.100253dd
pop ecx
pop ecx
pop edi
pop esi
pop ebp
ret
Function at 0x10026359
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x1009d350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
cmp dword [ebx + 0x94], 2
mov edi, dword [ebx]
mov dword [ebp - 0x10c], edi
je 0x100264d3
push esi
xor esi, esi
cmp dword [ebx + 0x3c8], esi
jne 0x100264cb
cmp dword [ebx + 0x438], esi
jne 0x100264cb
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x108], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x100263de
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.10031aa6
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
jmp 0x1002642b
mov eax, 0x80
push eax
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x84]
push esi
push eax
call fcn.1004e5f0
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10026431
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.10031aa6
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
jmp 0x100264c1
lea eax, [ebx + 0x138]
push eax
lea esi, [ebx + 0x10a]
lea eax, [ebp - 0x104]
push esi
push eax
call fcn.100268d0
add esp, 0xc
test eax, eax
jne 0x10026472
call fcn.10051619
mov esi, eax
call fcn.10051619
push dword [esi]
mov edi, eax
push ebx
call fcn.10031aa6
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x100264bb
push 0xb
pop ecx
lea edi, [ebx + 0x60]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x16c]
push eax
lea eax, [ebx + 0x13c]
push eax
lea eax, [ebp - 0x84]
push eax
movsw word es:[edi], word [esi]
call fcn.100268d0
add esp, 0xc
test eax, eax
jne 0x100264cb
call fcn.10051619
mov esi, eax
call fcn.10051619
push dword [esi]
mov edi, eax
push ebx
call fcn.10031aa6
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x10c]
call fcn.10025321
add esp, 0x18
jmp 0x100264d2
push ebx
call fcn.10026052
pop ecx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.1004bbda
leave
ret
Function at 0x10026bfe
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1009d350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
xor ebx, ebx
cmp dword [esi + 0x574], ebx
push 4
setne al
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x10026c50
push dword [ebp + 0xc]
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.100253dd
add esp, 0xc
jmp 0x10026cbf
push dword [esi + 0x578]
mov dword [ebp - 0x10], 1
call fcn.1002ed1b
imul eax, eax, 0x3e8
push dword [esi + 0x57c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.1002ed1b
imul eax, eax, 0x3e8
pop ecx
pop ecx
push ebx
push ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x10026cbf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 0xc]
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.100253dd
add esp, 0x10
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.1004bbda
leave
ret
Function at 0x10030e68
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push 0x10084698
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 4], eax
test eax, eax
je 0x10030f7d
push ebx
push edi
push str.LoadLibraryExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [ebp + 8]
mov ebx, eax
push 0x100846b4
push edi
mov dword [ebp - 8], ebx
call fcn.10052190
pop ecx
pop ecx
test eax, eax
je 0x10030ebe
test ebx, ebx
je 0x10030eb5
push 8
jmp 0x10030ed9
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x10030edd
test ebx, ebx
je 0x10030ee4
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10030ee4
push 0x800
push esi
push edi
call ebx
mov esi, eax
jmp 0x10030f79
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x10030f79
mov ecx, edi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030efe
sub ecx, ebx
lea eax, [ecx + 1]
add eax, edx
push eax
call dword [section..data]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10030f71
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10030f71
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030f2d
sub ecx, edx
push 0x5c
pop eax
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030f42
sub ecx, edx
add ecx, ebx
sub ecx, edi
mov al, byte [edi]
mov byte [ecx + edi], al
inc edi
test al, al
jne 0x10030f4f
mov eax, dword [ebp - 8]
test eax, eax
je 0x10030f68
push 8
push esi
push ebx
call eax
jmp 0x10030f6f
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push ebx
call dword [0x1009d004]
pop ecx
pop edi
mov eax, esi
pop ebx
pop esi
leave
ret
Function at 0x1003110f
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push edi
xor edi, edi
and dword [eax], edi
and dword [ebp - 0xc], edi
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 4], edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10031279
push esi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x10], esi
test esi, esi
je 0x10031265
push ebx
cmp dword [esi + 4], 2
jne 0x10031204
cmp dword [esi + 0x18], 0
je 0x10031204
cmp dword [esi + 0x10], 0
jbe 0x10031204
cmp dword [esi + 0x10], 0x10
jb 0x10031204
push 0x20
call dword [section..data]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10031259
mov ecx, dword [esi]
mov dword [ebx], ecx
mov ecx, dword [esi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [esi + 0xc]
and dword [ebx + 0x18], 0
and dword [ebx + 0x14], 0
and dword [ebx + 0x1c], 0
push 0x10
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 0x10
call dword [section..data]
pop ecx
mov dword [ebx + 0x18], eax
test eax, eax
je 0x1003124d
mov esi, dword [esi + 0x18]
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x10]
cmp dword [esi + 0x14], 0
je 0x100311ec
push dword [esi + 0x14]
call dword [0x1009d00c]
pop ecx
mov dword [ebx + 0x14], eax
test eax, eax
je 0x10031236
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
test edi, edi
cmove edi, ebx
mov dword [ebp - 4], edi
test eax, eax
je 0x10031201
mov dword [eax + 0x1c], ebx
mov dword [ebp - 0xc], ebx
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x10], esi
test esi, esi
jne 0x10031151
mov esi, dword [ebp - 0x14]
cmp dword [ebp - 8], 0
pop ebx
je 0x10031225
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x1003125e
push dword [ebp - 4]
call fcn.100310da
pop ecx
xor edi, edi
jmp 0x10031271
push 8
pop esi
push dword [ebx + 0x18]
call dword [0x1009d004]
push ebx
call dword [0x1009d004]
pop ecx
pop ecx
jmp 0x10031215
push 8
pop esi
push ebx
call dword [0x1009d004]
jmp 0x1003124a
push 8
pop esi
jmp 0x10031215
mov edi, dword [ebp - 4]
test edi, edi
jne 0x10031271
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
leave
ret

Function at 0x10032320
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
xor eax, eax
push eax
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
push eax
call fcn.1004e004
add esp, 0x18
test eax, eax
je 0x10032340
cmp eax, 0xffffffff
jne 0x10032342
xor eax, eax
pop ebp
ret
Function at 0x100324e5
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
push 0xf0000040
push 1
xor edi, edi
push edi
push edi
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1003250b
push 2
pop eax
jmp 0x10032533
push esi
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x10032524
push 2
pop esi
jmp 0x10032526
mov esi, edi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
pop esi
pop edi
leave
ret

Function at 0x10034f40
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x1009d350]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10034f7b
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.10025321
add esp, 0xc
jmp 0x10034fa3
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x10034f96
shr eax, 8
test al, al
jne 0x10034f96
xor eax, eax
jmp 0x10034fa6
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.10025321
pop ecx
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1004bbda
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi]
push 0
mov byte [ebp + 0xa], al
push 3
lea eax, [ebp + 8]
push eax
push dword [esi + 0x1a8]
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x10035700
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10025321
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.1003506c
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x1003580e
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0x1f
mov eax, dword [ebp + 8]
push ebx
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov ebx, dword [eax + 0x164]
jne 0x1003595a
push edi
lea eax, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], eax
cmp eax, edi
jae 0x10035843
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1003584e
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10035859
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [ebp + 0xc], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [ebp + 0xc]
movzx edx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x1003588a
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10035894
mov byte [eax], ch
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1003589e
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x100358a8
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x100358b3
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x100358be
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
mov dword [ebx + 0x1eb4], eax
lea esi, [ebx + 0x1cb0]
sub eax, esi
sub eax, 2
push eax
lea eax, [ebx + 0x1cb2]
push eax
mov dword [edi], esi
mov edi, dword [ebp - 4]
push 0x3e
push edi
call fcn.10035155
add esp, 0x10
push 0
push 3
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x10035916
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10025321
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push esi
call fcn.10035718
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
pop esi
test eax, eax
jns 0x10035959
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10025321
add esp, 0xc
pop edi
pop ebx
leave
ret