joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002040
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x104
push ebx
mov ebx, dword [esp + 0x10c]
push ebp
push esi
mov eax, dword [ebx + 0x8c]
mov ebp, dword [ebx]
cmp eax, 2
push edi
je 0x100021ca
mov eax, dword [ebx + 0x270]
test eax, eax
jne 0x100021c1
mov eax, dword [ebx + 0x2e0]
test eax, eax
jne 0x100021c1
mov esi, dword [esp + 0x11c]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x94]
push eax
mov edi, 0x80
push ecx
push esi
mov dword [esp + 0x1c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x100020d0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.10029320
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebp
call fcn.10024430
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
mov dword [esp + 0x10], edi
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10002120
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.10029320
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebp
call fcn.10024430
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
lea ecx, [ebx + 0x130]
lea esi, [ebx + 0x102]
push ecx
lea edx, [esp + 0x98]
push esi
push edx
call fcn.100021e0
add esp, 0xc
test eax, eax
jne 0x1000216c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
call fcn.10029320
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.10024430
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
lea edi, [ebx + 0x58]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x164]
lea ecx, [ebx + 0x134]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
movsw word es:[edi], word [esi]
call fcn.100021e0
add esp, 0xc
test eax, eax
jne 0x100021c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
call fcn.10029320
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.10024430
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
push ebx
call fcn.10001fc0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret

Function at 0x100026f0
Capabilities:
Set socket configuration

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
mov edi, dword [esp + 0xc]
lea eax, [esp + 0xc]
push 4
mov esi, dword [edi]
push eax
push 1
push 6
push ecx
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x10002739
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.10029320
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.100243c0
add esp, 0x14
pop edi
pop esi
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.100243c0
add esp, 8
pop edi
pop esi
ret
Function at 0x10002750
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
mov eax, dword [0x100437b0]
push esi
test eax, eax
mov dword [esp + 8], 0x4020
mov dword [esp + 4], 0
mov dword [esp + 0xc], 4
jne 0x100027a3
push 3
push 2
push eax
push 6
call fcn.100299f0
add esp, 0x10
test eax, eax
je 0x10002797
mov dword [0x100437b0], 2
pop esi
add esp, 0xc
ret
mov dword [0x100437b0], 1
jmp 0x100027a8
cmp eax, 2
je 0x100027ef
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
lea ecx, [esp + 4]
push eax
push ecx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x100027d7
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, eax
jg 0x100027ef
lea eax, [esp + 8]
push 4
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x10002ad0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
xor eax, eax
push edi
mov ecx, dword [esi + 0x520]
mov edi, dword [esp + 0x1c]
test ecx, ecx
lea ecx, [esp + 0x18]
push 4
push ecx
push 8
setne al
push 0xffff
push edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x10002b1c
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.100243c0
add esp, 0xc
pop edi
pop esi
add esp, 0xc
ret
mov edx, dword [esi + 0x524]
mov dword [esp + 8], 1
push edx
call fcn.10036bc0
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x528]
push eax
call fcn.10036bc0
add esp, 8
lea eax, [eax + eax*4]
lea ecx, [esp + 0x1c]
lea edx, [esp + 8]
push 0
push 0
lea eax, [eax + eax*4]
push ecx
push 0
push 0
lea eax, [eax + eax*4]
push 0xc
push edx
push 0x98000004
shl eax, 3
push edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x10002ba1
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.100243c0
add esp, 0x10
pop edi
pop esi
add esp, 0xc
ret
Function at 0x10003160
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x1d8]
test ecx, ecx
je 0x10003171
xor eax, eax
ret
mov eax, dword [eax + 0x190]
cmp eax, 0xffffffff
jne 0x1000317f
xor eax, eax
ret
push 2
lea ecx, [esp + 8]
push 1
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
neg eax
sbb eax, eax
neg eax
ret
Function at 0x10006cc0
Capabilities:
Get hostname

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push esi
mov byte [esi], 0
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
mov byte [esi + edi - 1], 0
jne 0x10006cf3
push 0x2e
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x10006cf1
mov byte [eax], 0
xor eax, eax
pop edi
pop esi
ret

Function at 0x10006d60
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 0x20
push 0xf0000000
push 1
push 0
lea eax, [esp + 0xc]
push 0
push eax
mov dword [esp + 0x18], 8
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x10006d89
add esp, 0x20
ret
mov eax, dword [esp + 0x2c]
xor ecx, ecx
mov dword [esp + 0xc], ecx
lea edx, [esp + 0x18]
mov dword [esp + 0x10], ecx
push edx
mov dword [esp + 0x18], ecx
push eax
mov dword [esp + 0x20], ecx
mov byte [esp + 0x14], 8
mov dword [esp + 0x24], ecx
mov byte [esp + 0x15], 2
mov dword [esp + 0x18], 0x6601
mov dword [esp + 0x1c], 8
call fcn.10006e60
lea ecx, [esp + 0x20]
push 8
push ecx
call fcn.10005c60
mov ecx, dword [esp + 0x10]
add esp, 0x10
lea edx, [esp + 8]
lea eax, [esp + 0xc]
push edx
push 0
push 0
push 0x14
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x10006e08
mov edx, dword [esp]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
add esp, 0x20
ret
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov edx, dword [ecx]
mov dword [eax], edx
mov ecx, dword [ecx + 4]
mov edx, dword [esp + 4]
mov dword [eax + 4], ecx
lea ecx, [esp + 4]
push edx
mov edx, dword [esp + 0xc]
push ecx
push eax
push 0
push 0
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [esp]
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 1
add esp, 0x20
ret
Function at 0x10006f70
Capabilities:
Hash data using md4
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
lea ebx, [edi + edi]
push ebx
call dword [0x1003c8c8]
mov esi, eax
add esp, 4
test esi, esi
jne 0x10006fa5
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
pop ecx
ret
push edi
push ebp
push esi
call fcn.10007050
add esp, 0xc
lea eax, [esp + 0x10]
push 0xf0000000
push 1
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov edi, dword [esp + 0x20]
test eax, eax
je 0x1000702f
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
push 0x8002
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x10007022
mov eax, dword [esp + 0x1c]
push 0
push ebx
push esi
push eax
mov dword [esp + 0x30], 0x10
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push 0
push ecx
push edi
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [esp + 0x10]
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
add edi, 0x10
xor edx, edx
push esi
mov dword [edi], edx
mov byte [edi + 4], dl
call dword [0x1003c8cc]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x10007e70
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push 0
push 0
push eax
push ecx
push 0
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x10007e94
cmp eax, 0xffffffff
jne 0x10007e96
xor eax, eax
ret

Function at 0x10008630
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1000866a
mov ax, word [esp]
cmp al, 2
jne 0x10008664
xor ecx, ecx
mov cl, ah
cmp cl, al
jne 0x10008664
xor eax, eax
add esp, 0x190
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
add esp, 0x190
ret
Function at 0x1000b060
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov ecx, dword [esi]
cmp dword [ecx + 4], 3
jne 0x1000b08c
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x1000b078
pop edi
pop esi
ret
mov ecx, dword [ecx + 8]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push 1
push ecx
call eax
jmp 0x1000b0c8
mov eax, dword [esi + 8]
test eax, eax
jne 0x1000b0b2
mov edx, dword [ecx + 8]
push 0x1003cb10
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esi + 8], eax
test eax, eax
jne 0x1000b0b2
pop edi
or eax, 0xffffffff
pop esi
ret
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push eax
push ecx
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1000b0eb
mov eax, dword [esi + 8]
test eax, eax
je 0x1000b0e5
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [esi + 8], edi
mov eax, dword [esi]
mov ecx, dword [eax]
mov dword [esi], ecx
mov eax, edi
pop edi
pop esi
ret
Function at 0x1000d650
Capabilities:
Check http status code

Disassembly:
mov ecx, dword [esp + 8]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
xor esi, esi
shr eax, 0x1f
mov ebx, dword [edi]
add edx, eax
cmp edx, 2
je 0x1000d68c
push str.Couldnt_set_desired_mode
push ebx
call fcn.10024430
add esp, 8
mov eax, 0x11
pop edi
pop esi
pop ebx
ret
cmp ecx, 0xc8
je 0x1000d6a3
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ebx
call fcn.100243c0
add esp, 0xc
mov eax, dword [esp + 0x18]
cmp eax, 0x13
jne 0x1000d6bb
push edi
call fcn.1000c0f0
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x14
jne 0x1000d6cf
push edi
call fcn.1000d700
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x15
jne 0x1000d6e3
push edi
call fcn.1000d820
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x16
jne 0x1000d6f3
push edi
call fcn.1000d840
add esp, 4
mov esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
ret

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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x20]
push edi
mov ebp, dword [esi + 0x194]
mov ebx, dword [esi]
lea ecx, [esp + 0x10]
push eax
push ecx
push ebp
or edi, 0xffffffff
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1000de4e
lea edx, [esp + 0x24]
lea eax, [esp + 0x10]
push edx
push eax
push ebp
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push ebp
push esi
call fcn.100031a0
add esp, 8
cmp edi, 0xffffffff
jne 0x1000de78
push str.Error_accept__ing_server_connect
push ebx
call fcn.10024430
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.100243c0
push 1
push edi
mov dword [esi + 0x298], 0
mov dword [esi + 0x194], edi
call fcn.1001f800
mov dword [esi + 0x1a4], 1
mov eax, dword [ebx + 0x1a8]
add esp, 0x10
test eax, eax
je 0x1000dedb
mov ecx, dword [ebx + 0x1ac]
push 1
push edi
push ecx
call eax
add esp, 0xc
test eax, eax
je 0x1000dedb
push esi
call fcn.1000c9d0
add esp, 4
mov eax, 0x2a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret

Function at 0x10010f30
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
mov eax, dword [esp + 0x108]
push eax
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x10010f7e
lea ecx, [esp]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov al, byte [esp]
test al, al
je 0x10010f7e
lea edx, [esp]
push edx
call dword [0x1003c8d4]
add esp, 4
add esp, 0x104
ret
xor eax, eax
add esp, 0x104
ret
Function at 0x10011e10
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
lea eax, [ecx + eax*2 + 0xc]
push eax
call dword [0x1003c8c8]
mov edi, eax
add esp, 4
test edi, edi
jne 0x10011e33
pop edi
pop esi
ret
lea eax, [edi + 0xc]
push ebx
mov dword [edi], esi
mov dword [edi + 4], eax
mov ebx, dword [esi + 0xc]
mov edx, eax
add edx, ebx
mov ebx, dword [esp + 0x18]
mov dword [edi + 8], edx
mov ecx, dword [esi + 0x10]
cmp ebx, ecx
push ebp
jbe 0x10011e7e
push eax
call dword [esi]
mov eax, dword [esp + 0x1c]
mov ecx, dword [edi + 4]
push ebx
push eax
push ecx
call dword [esi + 4]
mov ebx, dword [edi + 8]
mov eax, dword [esi + 0xc]
mov edx, dword [edi + 4]
add ebx, eax
push edx
push ebx
call dword [esi + 8]
mov eax, dword [esi + 0x14]
add esp, 0x18
mov dword [esp + 0x1c], eax
jmp 0x10011e82
mov ebx, dword [esp + 0x18]
mov ecx, dword [edi + 4]
push ecx
call dword [esi]
mov edx, dword [edi + 8]
push edx
call dword [esi]
mov eax, dword [esp + 0x24]
add esp, 8
xor ebp, ebp
test eax, eax
jbe 0x10011ee8
mov dword [esp + 0x1c], eax
mov ebp, eax
mov al, byte [ebx]
mov cl, byte [0x1003a52c]
xor al, cl
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], al
mov edx, dword [edi + 4]
push 1
push ecx
push edx
call dword [esi + 4]
mov al, byte [ebx]
mov dl, byte [0x1003a52d]
xor al, dl
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], al
mov edx, dword [edi + 8]
push 1
push ecx
push edx
inc ebx
call dword [esi + 4]
mov eax, dword [esp + 0x34]
add esp, 0x18
dec eax
mov dword [esp + 0x1c], eax
jne 0x10011ea1
cmp ebp, dword [esi + 0x10]
jae 0x10011f14
mov eax, dword [edi + 4]
push 1
push 0x1003a52c
push eax
call dword [esi + 4]
mov ecx, dword [edi + 8]
push 1
push 0x1003a52d
push ecx
call dword [esi + 4]
mov eax, dword [esi + 0x10]
add esp, 0x18
inc ebp
cmp ebp, eax
jb 0x10011eed
pop ebp
mov eax, edi
pop ebx
pop edi
pop esi
ret
Function at 0x1001aec0
Capabilities:
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push esi
mov esi, dword [esp + 8]
push 0xf0000000
push 1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x1001aef1
mov ecx, dword [esi]
lea eax, [esi + 4]
push eax
push 0
push 0
push 0x8003
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
pop esi
ret

Function at 0x1001af00
Capabilities:
Hash data via wincrypt

Disassembly:
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 4]
mov ecx, dword [esp + 8]
push 0
push eax
mov eax, dword [edx + 4]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
ret
Function at 0x10024620
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
push eax
push esi
mov edi, dword [esi + eax*4 + 0x190]
call fcn.100246b0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
add esp, 8
push 0
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x24]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x100246a4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x1002467e
pop edi
pop esi
mov dword [ebx], 0x51
pop ebp
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.10029320
mov edx, dword [esi]
push eax
push str.Send_failure:__s
push edx
call fcn.10024430
mov eax, dword [esi]
add esp, 0x14
mov dword [eax + 0x4724], ebp
mov dword [ebx], 0x37
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret

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

Disassembly:
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
mov edx, ecx
push ebx
shl edx, 4
push esi
push edi
mov edi, dword [edx + eax + 0x1bc]
lea esi, [edx + eax + 0x1b8]
mov ebx, dword [eax + ecx*4 + 0x190]
mov edx, dword [esi + 8]
sub edi, edx
mov edx, dword [eax + 0x308]
test byte [edx + 0x3c], 3
je 0x10024772
cmp dword [eax + ecx*4 + 0x1a8], 0x100247c0
jne 0x10024772
cmp dword [esi], 0
je 0x10024700
test edi, edi
je 0x10024772
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.10023cc0
add esp, 0x10
cmp eax, 0xffffffff
je 0x10024772
test al, 1
je 0x10024772
cmp dword [esi], 0
jne 0x10024745
push 0x8000
mov dword [esi + 4], 0x8000
call dword [0x1003c8c8]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov eax, dword [esi]
test eax, eax
je 0x1002476b
mov ecx, dword [esi + 8]
push 0
add eax, ecx
push edi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x10024772
mov ecx, dword [esi + 8]
pop edi
add ecx, eax
mov dword [esi + 8], ecx
pop esi
pop ebx
ret
mov dword [esi + 4], 0
pop edi
pop esi
pop ebx
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x10024bd1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and al, 0xe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret
Function at 0x10024e20
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x1a0]
test eax, eax
je 0x10024e4d
mov ecx, dword [esi + 0x12c]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
push ecx
push edx
push esi
call eax
add esp, 0x14
pop esi
ret
mov eax, dword [esp + 0xc]
test eax, eax
jl 0x10024e8f
cmp eax, 2
jg 0x10024e8f
mov ecx, dword [esi + 0x128]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
push ecx
push 1
lea edx, [eax + eax*2 + 0x1003ac44]
push 2
push edx
call edi
mov eax, dword [esi + 0x128]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push eax
push 1
push ecx
push edx
call edi
add esp, 0x20
pop edi
xor eax, eax
pop esi
ret

Function at 0x10029b50
Capabilities:
Get common file path

Disassembly:
push ecx
push edi
push str.kernel32
mov dword [esp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x10029b6e
pop edi
pop ecx
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebp
push esi
push str.LoadLibraryExA
push edi
call ebx
mov esi, dword [esp + 0x18]
push 0x100417b4
push esi
mov ebp, eax
call dword [sym.imp.MSVCRT.dll_strpbrk]
add esp, 8
test eax, eax
je 0x10029bbe
test ebp, ebp
je 0x10029bad
push 8
push 0
push esi
call ebp
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
test ebp, ebp
je 0x10029be2
push str.AddDllDirectory
push edi
call ebx
test eax, eax
je 0x10029be2
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
test edx, edx
mov dword [esp + 0x18], edx
je 0x10029c8e
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + edx + 1]
push eax
call dword [0x1003c8c8]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10029c84
mov ecx, dword [esp + 0x18]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10029c84
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov dx, word [0x1003f140]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
mov word [ecx + ebx], dx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
or ecx, 0xffffffff
add edx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test ebp, ebp
rep movsb byte es:[edi], byte [esi]
je 0x10029c79
push 8
push 0
push ebx
call ebp
jmp 0x10029c80
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x10], eax
push ebx
call dword [0x1003c8cc]
add esp, 4
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
pop ecx
ret
Function at 0x1002a210
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1002a249
mov ecx, dword [esp + 0x194]
push eax
push str.WSAStartup_failed___d_
push ecx
call fcn.10024430
add esp, 0xc
mov eax, 2
add esp, 0x190
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ax, word [esp]
cmp al, 2
jne 0x1002a269
xor edx, edx
mov dl, ah
test dl, dl
jne 0x1002a269
xor eax, eax
add esp, 0x190
ret
mov eax, dword [esp + 0x194]
push str.insufficient_winsock_version_to_support_telnet
push eax
call fcn.10024430
add esp, 8
mov eax, 2
add esp, 0x190
ret

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

Disassembly:
mov al, byte [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
lea ecx, [esp + 0x14]
mov edx, dword [esi + 0x190]
mov edi, dword [esi]
push 3
push ecx
push edx
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], al
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x1002a43d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10024430
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
push eax
push ebx
push str.SENT
push ecx
call fcn.1002a460
add esp, 0x10
pop edi
pop esi
pop ebx
ret