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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 4]
push edi
push eax
push esi
mov ebx, ecx
mov dword [ebp - 4], 0
call fcn.00459a50
mov edi, eax
add esp, 8
test edi, edi
jne 0x4a3a54
push eax
push 0x80
push 3
push eax
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4a3a49
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
test eax, eax
je 0x4a3a49
push eax
mov dword [ebp + 8], edi
call fcn.004dfe18
add esp, 4
mov edi, eax
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp - 4]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
cmp dword [ebp + 8], eax
je 0x4a3a45
push edi
call fcn.004e74bb
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test edi, edi
jne 0x4a3a57
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 4]
push eax
push edi
mov ecx, ebx
call fcn.004a3a80
push edi
mov esi, eax
call fcn.004e74bb
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4a4400
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x568910]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4a4455
mov eax, dword [esp]
cmp al, 2
jne 0x4a444f
shr eax, 8
cmp al, 2
jne 0x4a444f
call fcn.004a9a80
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004e0876
add esp, 0x194
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
mov eax, 2
xor ecx, esp
call fcn.004e0876
add esp, 0x194
ret

Function at 0x4aa4d0
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x4aa4ec
cmp dword [esi + 0x6c], 0
je 0x4aa4ec
push 2
push 3
push esi
call fcn.004c01f0
add esp, 0xc
push dword [esp + 0xc]
call fcn.004b9490
add esp, 4
test esi, esi
je 0x4aa50d
cmp dword [esi + 0x6c], 0
je 0x4aa50d
push 3
push esi
call fcn.004c0230
add esp, 8
pop esi
ret

Function at 0x4aac50
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x3c0], 2
je fcn.004aac00
mov al, 1
ret
Function at 0x4b3f10
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x108
mov eax, dword [0x568910]
xor eax, esp
mov dword [esp + 0x104], eax
push esi
push edi
mov edi, dword [esp + 0x114]
lea eax, [esp + 0x11c]
push eax
push dword [esp + 0x11c]
lea eax, [esp + 0x10]
push 0x100
push eax
call fcn.004b6490
lea esi, [esp + 0x18]
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4b3f55
sub esi, ecx
mov ecx, dword [edi + 0x140]
test ecx, ecx
je 0x4b3f89
cmp byte [edi + 0x46b0], al
jne 0x4b3f89
lea edx, [esp + 8]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x4b3f74
mov byte [edi + 0x46b0], 1
cmp byte [edi + 0x370], 0
je 0x4b3fc3
mov byte [esp + esi + 8], 0xa
inc esi
cmp esi, 0x102
jae 0x4b401b
mov eax, dword [edi + 0x1b0]
mov byte [esp + esi + 8], 0
test eax, eax
je 0x4b3fda
push dword [edi + 0x13c]
lea ecx, [esp + 0xc]
push esi
push ecx
push 0
push edi
call eax
add esp, 0x14
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004e0876
add esp, 0x108
ret
push dword [edi + 0x138]
push 1
push 2
push 0x53114c
call fcn.004e8591
push dword [edi + 0x138]
lea eax, [esp + 0x1c]
push 1
push esi
push eax
call fcn.004e8591
mov ecx, dword [esp + 0x12c]
add esp, 0x20
pop edi
pop esi
xor ecx, esp
call fcn.004e0876
add esp, 0x108
ret
call fcn.004e93bf
int3

Function at 0x4b4030
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x808
mov eax, dword [0x568910]
xor eax, esp
mov dword [esp + 0x804], eax
push edi
mov edi, dword [esp + 0x810]
test edi, edi
je 0x4b40f9
cmp byte [edi + 0x370], 0
je 0x4b40f9
push esi
lea eax, [esp + 0x81c]
push eax
push dword [esp + 0x81c]
lea eax, [esp + 0x10]
push 0x801
push eax
call fcn.004b6490
lea esi, [esp + 0x18]
add esp, 0x10
lea ecx, [esi + 1]
lea ebx, [ebx]
mov al, byte [esi]
inc esi
test al, al
jne 0x4b4090
mov eax, dword [edi + 0x1b0]
sub esi, ecx
test eax, eax
je 0x4b40ce
push dword [edi + 0x13c]
lea ecx, [esp + 0xc]
push esi
push ecx
push 0
push edi
call eax
add esp, 0x14
pop esi
pop edi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.004e0876
add esp, 0x808
ret
push dword [edi + 0x138]
push 1
push 2
push 0x53114c
call fcn.004e8591
push dword [edi + 0x138]
lea eax, [esp + 0x1c]
push 1
push esi
push eax
call fcn.004e8591
add esp, 0x20
pop esi
mov ecx, dword [esp + 0x808]
pop edi
xor ecx, esp
call fcn.004e0876
add esp, 0x808
ret
Function at 0x4b4360
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push eax
push edi
mov esi, dword [edi + eax*4 + 0x198]
call fcn.004b4790
add esp, 8
push 0
push dword [esp + 0x24]
push dword [esp + 0x24]
push esi
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [esp + 0x24]
mov ebx, eax
mov dword [ebp], 0
cmp ebx, 0xffffffff
jne 0x4b43e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x4b43be
pop edi
pop esi
mov dword [ebp], 0x51
xor eax, eax
pop ebp
pop ebx
ret
push esi
push edi
call fcn.004a4b20
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.004b3f10
mov eax, dword [edi]
add esp, 0x14
mov dword [eax + 0x46b4], esi
mov eax, ebx
mov dword [ebp], 0x37
pop edi
pop esi
pop ebp
pop ebx
ret

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

Disassembly:
mov ecx, dword [esp + 8]
mov eax, ecx
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
shl eax, 4
mov ebp, dword [ebx + ecx*4 + 0x198]
lea esi, [ebx + 0x1bc]
add esi, eax
mov eax, dword [ebx + 0x3b8]
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x3c], 3
je 0x4b4848
cmp dword [ebx + ecx*4 + 0x1ac], 0x4b42c0
jne 0x4b4848
cmp dword [esi], 0
je 0x4b47dc
test edi, edi
je 0x4b4848
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.004b3860
add esp, 0x14
cmp eax, 0xffffffff
je 0x4b4848
test al, 1
je 0x4b4848
cmp dword [esi], 0
jne 0x4b4831
mov eax, dword [ebx]
mov eax, dword [eax + 0x32c]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x568300]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test eax, eax
jne 0x4b4831
pop edi
mov dword [esi + 4], eax
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4b4848
add dword [esi + 8], eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4b4850
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x4b4879
push dword [esi + 0x13c]
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x18]
push esi
call eax
add esp, 0x14
pop esi
ret
mov eax, dword [esp + 0xc]
cmp eax, 2
ja 0x4b48b2
push dword [esi + 0x138]
lea eax, [eax + eax*2]
push 1
add eax, 0x53114c
push 2
push eax
call fcn.004e8591
push dword [esi + 0x138]
push 1
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call fcn.004e8591
add esp, 0x20
xor eax, eax
pop esi
ret

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

Disassembly:
mov eax, dword [esp + 4]
cmp byte [eax + 0x1dc], 0
je 0x4b49ad
push eax
call fcn.00512700
add esp, 4
test eax, eax
jne 0x4b49cf
xor al, al
ret
mov eax, dword [eax + 0x198]
cmp eax, 0xffffffff
je 0x4b49aa
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4b49cf
xor al, al
ret
mov al, 1
ret
Function at 0x4b5300
Capabilities:
Set socket configuration

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
lea eax, [esp + 0xc]
push 4
push eax
push 1
mov esi, dword [edi]
push 6
push dword [esp + 0x20]
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b5348
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004a4b20
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004b4030
add esp, 0x14
pop edi
pop esi
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004b4030
add esp, 8
pop edi
pop esi
ret
Function at 0x4b5440
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x108
mov eax, dword [0x568910]
xor eax, esp
mov dword [esp + 0x104], eax
push ebx
push edi
mov edi, dword [esp + 0x114]
cmp dword [edi + 0x94], 2
mov ebx, dword [edi]
je 0x4b563a
cmp byte [edi + 0x37e], 0
push esi
jne 0x4b5630
cmp byte [edi + 0x39a], 0
jne 0x4b5630
mov esi, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x94]
mov dword [esp + 0x10], 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4b54e5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push edi
call fcn.004a4b20
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004b3f10
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004e0876
add esp, 0x108
ret
push 0x80
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x80
push 0
push eax
call fcn.004eb650
add esp, 0xc
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b554d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push edi
call fcn.004a4b20
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.004b3f10
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004e0876
add esp, 0x108
ret
lea eax, [edi + 0x138]
push eax
lea esi, [edi + 0x10a]
lea eax, [esp + 0x94]
push esi
push eax
call fcn.004b5b30
add esp, 0xc
test al, al
jne 0x4b55a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.004a4b20
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.004b3f10
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004e0876
add esp, 0x108
ret
movdqu xmm0, xmmword [esi]
mov eax, dword [esi + 0x28]
movdqu xmmword [edi + 0x60], xmm0
movdqu xmm0, xmmword [esi + 0x10]
movdqu xmmword [edi + 0x70], xmm0
movq xmm0, qword [esi + 0x20]
movq qword [edi + 0x80], xmm0
mov dword [edi + 0x88], eax
mov ax, word [esi + 0x2c]
mov word [edi + 0x8c], ax
lea eax, [edi + 0x16c]
push eax
lea eax, [edi + 0x13c]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.004b5b30
add esp, 0xc
test al, al
jne 0x4b5630
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.004a4b20
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.004b3f10
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004e0876
add esp, 0x108
ret
push edi
call fcn.004b5090
add esp, 4
pop esi
mov ecx, dword [esp + 0x10c]
pop edi
pop ebx
xor ecx, esp
call fcn.004e0876
add esp, 0x108
ret
Function at 0x4b5ec0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
mov eax, dword [0x568910]
xor eax, esp
mov dword [esp + 0x14], eax
push esi
mov esi, dword [esp + 0x20]
xor eax, eax
push edi
mov edi, dword [esp + 0x28]
push 4
cmp byte [esi + 0x4bc], al
setne al
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b5f20
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.004b4030
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004e0876
add esp, 0x18
ret
push dword [esi + 0x4c0]
mov dword [esp + 0x14], 1
call fcn.004bf200
push dword [esi + 0x4c4]
imul eax, eax, 0x3e8
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
call fcn.004bf200
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x28]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4b5f97
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.004b4030
add esp, 0x10
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
xor ecx, esp
call fcn.004e0876
add esp, 0x18
ret
Function at 0x4c0570
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push 0x532ee8
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x4c058a
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push str.LoadLibraryExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x532f04
push esi
call fcn.004edb40
add esp, 8
test eax, eax
je 0x4c05d2
test ebp, ebp
je 0x4c05c3
push 8
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x4c05f8
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4c05f8
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x4c06af
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4c0615
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [0x568300]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4c06a5
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4c06a5
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4c0647
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4c0660
sub ecx, edx
add ecx, ebx
sub ecx, esi
lea ecx, [ecx]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4c0670
test ebp, ebp
je 0x4c069c
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x568304]
add esp, 4
mov eax, edi
pop esi
pop ebp
pop edi
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x568304]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x4c0880
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [eax], ebx
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x4c0a12
push ebp
push edi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4c09fc
push esi
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x4c08cf
lea ebp, [eax + 0xe]
jmp 0x4c08db
cmp eax, 0x17
jne 0x4c0989
lea ebp, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x4c0989
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4c0989
cmp eax, ebp
jb 0x4c0989
push 0x20
call dword [0x568300]
mov esi, eax
add esp, 4
test esi, esi
je 0x4c09f1
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 8]
mov dword [esi + 8], eax
mov eax, dword [edi + 0xc]
push ebp
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebp
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
call dword [0x568300]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x4c09e0
push ebp
push dword [edi + 0x18]
push eax
call fcn.004eb000
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x4c0975
push eax
call dword [0x56830c]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x4c09c6
mov eax, dword [esp + 0x10]
test ebx, ebx
cmove ebx, esi
test eax, eax
je 0x4c0985
mov dword [eax + 0x1c], esi
mov dword [esp + 0x10], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x4c08c2
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop esi
test eax, eax
je 0x4c09a8
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebp, ebp
je 0x4c09f8
push ebx
call fcn.004c0840
mov eax, dword [esp + 0x2c]
add esp, 4
xor ebx, ebx
mov dword [eax], ebx
mov eax, ebp
pop edi
pop ebp
pop ebx
add esp, 0xc
ret
push dword [esi + 0x18]
mov ebp, 8
call dword [0x568304]
push esi
call dword [0x568304]
add esp, 8
jmp 0x4c0998
push esi
mov ebp, 8
call dword [0x568304]
add esp, 4
jmp 0x4c0998
mov ebp, 8
jmp 0x4c0998
test ebx, ebx
jne 0x4c0a08
mov ebp, 0x2af9
push ebp
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x4c1190
Capabilities:
Generate random numbers via winapi

Disassembly:
push ecx
push 0xf0000040
push 1
push 0
push 0
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x4c11d5
push dword [esp + 8]
push dword [esp + 0x10]
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 4]
test eax, eax
jne 0x4c11dc
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
pop ecx
ret
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
pop ecx
ret
Function at 0x4c4b10
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x568910]
xor eax, esp
mov dword [esp + 0x190], eax
push esi
mov esi, dword [esp + 0x19c]
lea eax, [esp + 4]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4c4b4e
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.004b3f10
add esp, 0xc
jmp 0x4c4b89
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp + 4]
cmp al, 2
jne 0x4c4b7b
shr eax, 8
test al, al
jne 0x4c4b7b
xor eax, eax
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004e0876
add esp, 0x194
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.004b3f10
add esp, 8
mov ecx, dword [esp + 0x194]
mov eax, 2
pop esi
xor ecx, esp
call fcn.004e0876
add esp, 0x194
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
mov byte [esp + 0x16], al
lea eax, [esp + 0x14]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x198]
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4c546c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.004b3f10
add esp, 0xc
push dword [esp + 0x18]
push ebx
push str.SENT
push dword [esi]
call fcn.004c4d30
add esp, 0x10
pop edi
pop esi
pop ebx
ret
Function at 0x4c55a0
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
mov eax, dword [esp + 8]
push ebx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov ebx, dword [eax + 0x130]
jne 0x4c56eb
push ebp
push edi
lea ebp, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], ebp
cmp ebp, edi
jae 0x4c55d7
mov byte [ebp], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c55e2
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c55ed
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 [esp + 0x1c], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [esp + 0x1c]
movzx edx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x4c5620
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c562a
mov byte [eax], ch
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c5634
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c563e
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c5649
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c5654
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
mov esi, dword [esp + 0x10]
mov dword [ebx + 0x1eb4], eax
sub eax, ebp
sub eax, 2
mov dword [edi], ebp
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push esi
call fcn.004c4e40
mov edi, dword [esp + 0x28]
add esp, 0x10
push 0
push 3
push ebp
push dword [edi + 0x198]
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x4c56aa
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004b3f10
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push edi
call fcn.004c5490
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [edi + 0x198]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4c56e8
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004b3f10
add esp, 0xc
pop esi
pop edi
pop ebp
pop ebx
pop ecx
ret
Function at 0x4c6610
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x568910]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
mov ebp, dword [esp + 0x94]
lea eax, [esp + 8]
push esi
push edi
push eax
mov esi, dword [ebp + 0x600]
lea eax, [esp + 0x18]
mov edi, dword [ebp]
push eax
mov dword [esp + 0x18], 0x80
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [esi + 0x15c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x4c6696
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.004eb000
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [esi + 0x148], eax
mov ebx, dword [esi + 0x14c]
cmp ebx, 4
jge 0x4c66d1
push str.Received_too_short_packet
push edi
call fcn.004b3f10
add esp, 8
mov dword [esi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004e0876
add esp, 0x88
ret
mov ecx, dword [esi + 0x15c]
movzx eax, byte [ecx]
shl ax, 8
movzx edx, ax
movzx eax, byte [ecx + 1]
or edx, eax
mov dword [esi + 0xc], edx
add edx, 0xfffffffd
cmp edx, 3
ja case.default.0x4c66f6
jmp dword [edx*4 + 0x4c67f8]
cmp ebx, 4
jle case.0x4c66f6.4
movzx eax, byte [ecx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [ecx + 3]
or edx, eax
movzx eax, word [esi + 0x40]
inc eax
and eax, 0xffff
cmp eax, edx
jne case.0x4c66f6.4
lea eax, [ebx - 4]
push eax
lea eax, [ecx + 4]
push eax
push 1
push ebp
call fcn.004b3df0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x4c6754
push 5
push esi
call fcn.004c6f50
add esp, 8
mov eax, ebx
jmp 0x4c66b8
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x90], eax
adc dword [edi + 0x94], edx
push dword [edi + 0x94]
push dword [edi + 0x90]
push edi
call fcn.004be2b0
jmp 0x4c67cf
mov edx, ecx
movzx eax, byte [edx + 2]
shl ax, 8
movzx ecx, ax
movzx eax, byte [edx + 3]
or ecx, eax
lea eax, [edx + 4]
push eax
push 0x530460
push edi
mov dword [esi + 8], ecx
call fcn.004b4030
jmp 0x4c67cf
lea eax, [ebx - 2]
push eax
lea eax, [ecx + 2]
push eax
push esi
call fcn.004c63a0
add esp, 0xc
test eax, eax
je case.0x4c66f6.4
jmp 0x4c66b8
push str.Internal_error:_Unexpected_packet
push 0x534694
push edi
call fcn.004b3f10
add esp, 0xc
push ebp
call fcn.004be620
add esp, 4
test eax, eax
je 0x4c66b6
push 5
push esi
call fcn.004c6f50
add esp, 8
mov eax, 0x2a
jmp 0x4c66b8