joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4990d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x499158
cmp byte [esi + 0x5c], 0x77
jne 0x499158
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
mov dword [esi + 4], edi
test edi, edi
je 0x49913b
cmp dword [esi + 0x10], 0
jne 0x49911b
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x48]
push ecx
push 0x4000
push 1
push eax
mov dword [esi + 0xc], eax
call fcn.004cb4c7
add esp, 0x10
cmp eax, 0x4000
jne 0x499134
mov dword [esi + 0x10], eax
push 0
push esi
call fcn.00499d50
add esp, 8
mov dword [esi + 0x38], eax
test eax, eax
jne 0x49913b
cmp dword [esi + 4], eax
jne 0x4990f1
jmp 0x49913b
mov dword [esi + 0x38], 0xffffffff
mov edx, dword [ebp + 0xc]
mov eax, dword [esi + 0x4c]
push edi
push edx
push eax
call fcn.0049af30
add esp, 0xc
mov dword [esi + 0x4c], eax
mov eax, edi
sub eax, dword [esi + 4]
pop edi
pop esi
pop ebp
ret
mov eax, 0xfffffffe
pop esi
pop ebp
ret

Function at 0x499160
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x49920b
cmp byte [esi + 0x5c], 0x77
jne 0x49920b
mov dword [esi + 4], ebx
push edi
nop
mov edi, 0x4000
sub edi, dword [esi + 0x10]
je 0x4991ae
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x48]
push eax
push edi
push 1
push ecx
call fcn.004cb4c7
add esp, 0x10
cmp eax, edi
jne 0x499200
mov edx, dword [esi + 0x48]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0x4000
test ebx, ebx
jne 0x4991ef
mov eax, dword [ebp + 8]
push eax
push esi
call fcn.00499d50
add esp, 8
mov dword [esi + 0x38], eax
test edi, edi
jne 0x4991ce
cmp eax, 0xfffffffb
jne 0x4991ce
mov dword [esi + 0x38], edi
cmp dword [esi + 0x10], 0
jne 0x4991de
cmp dword [esi + 0x38], 1
je 0x4991de
xor ebx, ebx
jmp 0x4991e3
mov ebx, 1
mov eax, dword [esi + 0x38]
test eax, eax
je 0x499180
cmp eax, 1
je 0x499180
mov esi, dword [esi + 0x38]
lea eax, [esi - 1]
neg eax
sbb eax, eax
pop edi
and eax, esi
pop esi
pop ebx
pop ebp
ret
or eax, 0xffffffff
pop edi
mov dword [esi + 0x38], eax
pop esi
pop ebx
pop ebp
ret
pop esi
mov eax, 0xfffffffe
pop ebx
pop ebp
ret
Function at 0x49a2e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esi + 0x24]
push edi
mov eax, dword [esi + 0x64]
mov edi, dword [esi + 0x34]
mov ecx, dword [esi + 0x6c]
sub edi, eax
sub edi, ecx
jne 0x49a300
test eax, eax
jne 0x49a30c
test ecx, ecx
jne 0x49a30c
mov edi, ebx
jmp 0x49a379
cmp edi, 0xffffffff
jne 0x49a30c
mov edi, 0xfffffffe
jmp 0x49a379
mov ecx, dword [esi + 0x24]
lea edx, [ebx + ecx - 0x106]
cmp eax, edx
jb 0x49a379
mov eax, dword [esi + 0x30]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.004ca090
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x3c]
sub dword [esi + 0x68], ebx
sub dword [esi + 0x64], ebx
add esp, 0xc
sub dword [esi + 0x54], ebx
lea ecx, [eax + edx*2]
lea ecx, [ecx]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebx
jb 0x49a34f
sub eax, ebx
jmp 0x49a351
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x49a340
mov ecx, dword [esi + 0x38]
mov edx, ebx
lea ecx, [ecx + ebx*2]
nop
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebx
jb 0x49a36f
sub eax, ebx
jmp 0x49a371
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x49a360
add edi, ebx
mov eax, dword [esi]
cmp dword [eax + 4], 0
je 0x49a3d3
mov edx, dword [esi + 0x6c]
add edx, dword [esi + 0x64]
mov ecx, edi
add edx, dword [esi + 0x30]
mov edi, eax
push edx
call fcn.0049a090
add dword [esi + 0x6c], eax
mov edx, dword [esi + 0x6c]
add esp, 4
cmp edx, 3
jb 0x49a3bf
mov edi, dword [esi + 0x64]
add edi, dword [esi + 0x30]
mov ecx, dword [esi + 0x50]
movzx eax, byte [edi]
mov dword [esi + 0x40], eax
shl eax, cl
movzx ecx, byte [edi + 1]
xor eax, ecx
and eax, dword [esi + 0x4c]
mov dword [esi + 0x40], eax
cmp edx, 0x106
jae 0x49a3d3
mov edx, dword [esi]
cmp dword [edx + 4], 0
jne 0x49a2e5
pop edi
pop ebx
ret

Function at 0x49af30
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x49af3e
xor eax, eax
pop ebp
ret
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push esi
not eax
cmp edx, 8
jb 0x49b01d
mov esi, edx
shr esi, 3
push edi
jmp 0x49af60
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
movzx edi, byte [ecx + 2]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
movzx edi, byte [ecx + 3]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
movzx edi, byte [ecx + 4]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
movzx edi, byte [ecx + 5]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
movzx edi, byte [ecx + 6]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
movzx edi, byte [ecx + 7]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4febd8]
add ecx, 8
sub edx, 8
dec esi
jne 0x49af60
pop edi
test edx, edx
je 0x49b03a
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x4febd8]
inc ecx
dec edx
jne 0x49b021
not eax
pop esi
pop ebp
ret
Function at 0x49bbd0
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
movzx ecx, di
shr edi, 0x10
test esi, esi
jne 0x49bbec
pop edi
lea eax, [esi + 1]
pop esi
pop ebp
ret
push ebx
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x49bcf7
jmp 0x49bc00
mov eax, ebx
cmp ebx, 0x15b0
jb 0x49bc0f
mov eax, 0x15b0
sub ebx, eax
mov dword [ebp + 0x10], ebx
cmp eax, 0x10
jl 0x49bcbc
mov edx, eax
shr edx, 4
mov ebx, edx
neg ebx
shl ebx, 4
add eax, ebx
jmp 0x49bc30
movzx ebx, byte [esi]
add ecx, ebx
movzx ebx, byte [esi + 1]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 2]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 3]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 4]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 5]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 6]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 7]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 8]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 9]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xa]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xb]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xc]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xd]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xe]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xf]
add edi, ecx
add ecx, ebx
add edi, ecx
add esi, 0x10
dec edx
jne 0x49bc30
mov ebx, dword [ebp + 0x10]
test eax, eax
je 0x49bccb
movzx edx, byte [esi]
add ecx, edx
inc esi
add edi, ecx
dec eax
jne 0x49bcc0
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul edx, edx, 0xffff000f
add ecx, edx
mov eax, 0x80078071
mul edi
shr edx, 0xf
imul edx, edx, 0xffff000f
add edi, edx
test ebx, ebx
jne 0x49bc00
mov eax, edi
pop ebx
shl eax, 0x10
pop edi
or eax, ecx
pop esi
pop ebp
ret
Function at 0x49ea90
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x530630]
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 0x49eae0
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x49eada
shr eax, 8
cmp al, 2
jne 0x49eada
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 2
call fcn.004cab85
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4a9353
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
pop ebp
ret
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor eax, eax
pop ebp
ret

Function at 0x4a94a0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4a94bb
mov edx, dword [esi + 0xf4]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
js 0x4a94ef
cmp eax, 2
jg 0x4a94ef
mov ecx, dword [esi + 0xf0]
push ecx
push 1
lea edx, [eax + eax*2 + 0x500b18]
push 2
push edx
call fcn.004cb4c7
mov eax, dword [esi + 0xf0]
push eax
push 1
push edi
push ebx
call fcn.004cb4c7
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x130]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [ebp + 0x18]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x4a984c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x2733
jne 0x4a9821
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
pop ebp
ret
push eax
push esi
call fcn.004acfe0
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.004a9660
mov ecx, dword [esi]
mov edx, dword [ebp + 8]
mov dword [ecx + 0x858c], edx
add esp, 0x14
mov dword [ebx], 0x37
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4a9aa0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
xor eax, eax
cmp dword [edi + 0x408], eax
push 4
lea ecx, [ebp - 4]
push ecx
setne al
push 8
push 0xffff
push esi
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4a9ad9
push esi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push edi
call fcn.004a95e0
add esp, 0xc
mov esp, ebp
pop ebp
ret
Function at 0x4aa140
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x530630]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x1a4], 0
mov ebx, dword [esi]
push edi
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x110], ebx
jne 0x4aa2d7
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0x104]
push ecx
push edi
mov dword [ebp - 0x10c], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4aa1ca
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004acfe0
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004a9660
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x10c]
push edx
lea eax, [ebp - 0x84]
push eax
push edi
mov dword [ebp - 0x10c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4aa21d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004acfe0
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.004a9660
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
lea ebx, [esi + 0xcc]
lea edi, [esi + 0x9e]
lea esi, [ebp - 0x104]
call fcn.004aa100
test eax, eax
jne 0x4aa274
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x108]
mov esi, eax
push esi
push ecx
call fcn.004acfe0
mov edx, dword [ebp - 0x110]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.004a9660
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x108]
lea ebx, [eax + 0x100]
lea edi, [eax + 0xd0]
lea esi, [ebp - 0x84]
call fcn.004aa100
test eax, eax
jne 0x4aa2d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x108]
push esi
push eax
call fcn.004acfe0
mov ecx, dword [ebp - 0x110]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.004a9660
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x108]
push esi
call fcn.004aa0a0
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004cab85
mov esp, ebp
pop ebp
ret

Function at 0x4aa300
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x314]
push 4
lea ecx, [ebp - 4]
push ecx
push 1
push 6
push edx
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4aa346
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004acfe0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004a95e0
add esp, 0x14
pop esi
mov esp, ebp
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004a95e0
add esp, 8
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4aa3c0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x550]
cmp eax, 0xffffffff
je 0x4aa41b
mov ecx, dword [ecx + 0x544]
mov edx, dword [ecx]
cmp dword [edx + eax*4], 0
lea eax, [edx + eax*4]
je 0x4aa41b
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
test ecx, ecx
je 0x4aa3ed
mov dword [ecx], eax
cmp dword [eax + 0x150], 0
push esi
mov esi, dword [eax + 0x130]
jne 0x4aa410
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4aa416
or eax, 0xffffffff
pop esi
pop ebp
ret
mov eax, esi
pop esi
pop ebp
ret
or eax, 0xffffffff
pop ebp
ret
Function at 0x4aad70
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push ebx
xor ebx, ebx
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp + 8]
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
push edx
push eax
push ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x4aaf06
push edi
mov edi, dword [ebp - 0x10]
cmp edi, ebx
je 0x4aaee8
push esi
cmp dword [edi + 4], 2
jne 0x4aae6c
cmp dword [edi + 0x18], ebx
je 0x4aae6c
mov eax, dword [edi + 0x10]
cmp eax, ebx
jbe 0x4aae6c
cmp eax, 0x10
jb 0x4aae6c
push 0x20
call dword [0x53059c]
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4aae79
mov edx, dword [edi]
mov dword [esi], edx
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
mov edx, dword [edi + 0xc]
push 0x10
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0x10
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
call dword [0x53059c]
add esp, 4
mov dword [esi + 0x18], eax
cmp eax, ebx
je 0x4aae82
mov ecx, dword [edi + 0x18]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0x14]
cmp eax, ebx
je 0x4aae57
push eax
call dword [0x5305a8]
add esp, 4
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x4aae95
cmp dword [ebp - 4], ebx
jne 0x4aae5f
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x4aae69
mov dword [eax + 0x1c], esi
mov dword [ebp - 0xc], esi
mov edi, dword [edi + 0x1c]
cmp edi, ebx
jne 0x4aadb2
jmp 0x4aaeb0
mov dword [ebp - 8], 8
jmp 0x4aaeb0
push esi
mov dword [ebp - 8], 8
call dword [0x5305a0]
add esp, 4
jmp 0x4aaeb0
mov edx, dword [esi + 0x18]
push edx
mov dword [ebp - 8], 8
call dword [0x5305a0]
push esi
call dword [0x5305a0]
add esp, 8
mov eax, dword [ebp - 0x10]
pop esi
cmp eax, ebx
je 0x4aaebf
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], ebx
je 0x4aaee3
mov eax, dword [ebp - 4]
push eax
call fcn.004aad20
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
add esp, 4
mov ecx, ebx
pop edi
mov dword [ebp - 4], ebx
mov dword [edx], ecx
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 4], ebx
jne 0x4aaefa
push 0x2af9
mov dword [ebp - 8], 0x2af9
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
mov dword [edx], ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4ac5b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push 0
push 0
push eax
push ecx
push 0
push 0
call fcn.004d3d7a
add esp, 0x18
test eax, eax
je 0x4ac5d4
cmp eax, 0xffffffff
jne 0x4ac5d6
xor eax, eax
pop ebp
ret
Function at 0x4b32b0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_receive
push 0x50a7e8
push ecx
call fcn.004a95e0
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.004b2440
test eax, eax
jne 0x4b32e4
mov eax, esi
pop ebp
jmp fcn.004b28c0
pop ebp
ret
Function at 0x4b36e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x530630]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
push esi
mov esi, dword [eax + 0x3d0]
push edi
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
mov edx, dword [esi + 0x154]
mov eax, dword [esi + 0x15c]
lea ecx, [ebp - 0x84]
push ecx
mov ecx, dword [esi + 0x14]
push 0
add edx, 4
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x4b3774
mov edx, dword [ebp - 0x88]
push edx
lea eax, [ebp - 0x84]
push eax
lea ecx, [esi + 0xc8]
push ecx
call fcn.004ca090
mov edx, dword [ebp - 0x88]
add esp, 0xc
mov dword [esi + 0x148], edx
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x4b37a7
push str.Received_too_short_packet
push ebx
call fcn.004a9660
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.004cab85
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x15c]
call fcn.004b25e0
movzx eax, ax
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x4b37c4
jmp dword [eax*4 + 0x4b38f4]
cmp edx, 4
jle case.0x4b37c4.4
lea eax, [esi + 0x15c]
call fcn.004b25f0
movzx ecx, word [esi + 0x40]
inc ecx
cmp cx, ax
jne case.0x4b37c4.4
mov eax, dword [ebp - 0x8c]
add edx, 0xfffffffc
push edx
mov edx, dword [esi + 0x15c]
add edx, 4
push edx
push 1
push eax
call fcn.004a9930
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4b3831
mov ecx, 5
mov eax, esi
call fcn.004b3660
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [ebx + 0x38], eax
adc dword [ebx + 0x3c], edx
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x38]
push ecx
push edx
push ebx
call fcn.004c0db0
jmp 0x4b38b5
lea eax, [esi + 0x15c]
call fcn.004b25f0
mov ecx, dword [esi + 0x15c]
add ecx, 4
push ecx
movzx eax, ax
push 0x50a7e8
push ebx
mov dword [esi + 8], eax
call fcn.004a95e0
jmp 0x4b38b5
add edx, 0xfffffffe
push edx
mov edx, dword [esi + 0x15c]
add edx, 2
push edx
push esi
call fcn.004b2680
add esp, 0xc
test eax, eax
je case.0x4b37c4.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x50b444
push ebx
call fcn.004a9660
add esp, 0xc
mov eax, dword [ebp - 0x8c]
push eax
call fcn.004c0e70
add esp, 4
test eax, eax
je 0x4b3794
mov ecx, 5
mov eax, esi
call fcn.004b3660
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x2a
pop ebx
call fcn.004cab85
mov esp, ebp
pop ebp
ret
Function at 0x4b5460
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x530630]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4b54a8
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.004a9660
add esp, 0xc
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4b54cf
shr eax, 8
test al, al
jne 0x4b54cf
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.004a9660
mov ecx, dword [ebp - 4]
xor ecx, ebp
add esp, 8
mov eax, 2
call fcn.004cab85
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [edi + 0x130]
push ebx
push esi
mov esi, dword [edi]
push 0
push 3
lea ecx, [ebp - 4]
mov ebx, eax
mov al, byte [ebp + 8]
push ecx
push edx
mov byte [ebp - 4], 0xff
mov byte [ebp - 3], al
mov byte [ebp - 2], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4b56a5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004a9660
add esp, 0xc
mov esi, dword [ebp + 8]
mov ecx, dword [edi]
mov eax, ebx
mov ebx, str.SENT
call fcn.004b5560
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4b63e0
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]
mov eax, dword [eax]
push ebx
mov ebx, dword [eax + 0x8684]
mov dword [ebp - 4], eax
jne 0x4b652f
push esi
push edi
lea edi, [ebx + 0x1cb0]
lea esi, [ebx + 0x1eb0]
mov dword [esi], edi
cmp edi, esi
jae 0x4b6416
mov byte [edi], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4b6421
mov byte [eax], 0xfa
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4b642c
mov byte [eax], 0x1f
inc dword [esi]
movzx ecx, word [ebx + 0x1ca8]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, ax
movzx eax, word [ebx + 0x1caa]
push eax
mov dword [ebp + 0xc], edx
call dword [sym.imp.WS2_32.dll_htons]
movzx ecx, ax
mov eax, dword [esi]
cmp eax, esi
jae 0x4b645e
mov dl, byte [ebp + 0xc]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4b646b
mov dl, byte [ebp + 0xd]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4b6475
mov byte [eax], cl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4b647f
mov byte [eax], ch
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4b648a
mov byte [eax], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4b6495
mov byte [eax], 0xf0
inc dword [esi]
mov eax, dword [esi]
mov dword [ebx + 0x1eb4], eax
sub eax, edi
sub eax, 2
push eax
lea edx, [ebx + 0x1cb2]
push edx
mov dword [esi], edi
mov esi, dword [ebp - 4]
push 0x3e
call fcn.004b59d0
mov esi, dword [sym.imp.WS2_32.dll_send]
add esp, 0xc
push 0
push 3
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x130]
push eax
call esi
test eax, eax
jns 0x4b64ec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 4]
push eax
push str.Sending_data_failed___d_
push ecx
call fcn.004a9660
add esp, 0xc
lea edx, [ebx + 0x1cb3]
push 4
push edx
call fcn.004b6280
mov eax, dword [edi + 0x130]
add esp, 8
push 0
push 2
add ebx, 0x1cb7
push ebx
push eax
call esi
pop edi
pop esi
test eax, eax
jns 0x4b652f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 4]
push eax
push str.Sending_data_failed___d_
push ecx
call fcn.004a9660
add esp, 0xc
pop ebx
mov esp, ebp
pop ebp
ret