joyce8/EMBER2024-capa huggingface dataset:
Function at 0x500e80
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ecx + eax*4 + 0x154]
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [ebp + 0x18]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x500efe
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x500ece
pop esi
pop edi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
pop ebp
ret
push esi
push dword [ebp + 8]
call fcn.0050ce50
push eax
mov eax, dword [ebp + 8]
push str.Send_failure:__s
push dword [eax]
call fcn.00500b70
mov eax, dword [ebp + 8]
add esp, 0x14
mov eax, dword [eax]
mov dword [eax + 0x8574], esi
mov eax, edi
mov dword [ebx], 0x37
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x5010e0
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 0x501109
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 eax, dword [ebp + 0xc]
cmp eax, 2
ja 0x50113f
push dword [esi + 0x118]
lea eax, [eax + eax*2]
push 1
add eax, 0x702e18
push 2
push eax
call fcn.00687a59
push dword [esi + 0x118]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.00687a59
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x538]
test esi, esi
je 0x5012f4
mov eax, dword [edi + 0x44]
test eax, eax
jne 0x5012c1
cmp dword [edi + 0x40], eax
je 0x5012f4
mov dword [ebp - 8], esi
mov byte [ebp - 4], 0
test eax, eax
jne 0x5012cf
mov eax, dword [edi + 0x40]
mov eax, dword [eax + 0x34]
lea ecx, [ebp - 8]
push 0x5020c0
push ecx
push eax
call fcn.0050b580
add esp, 0xc
cmp byte [ebp - 4], 0
jne 0x5012fd
mov dword [edi + 0x538], 0
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x501306
mov dword [eax], esi
cmp byte [esi + 0x178], 0
mov edi, dword [esi + 0x154]
je 0x50132b
push esi
call fcn.004f8ee0
add esp, 4
test eax, eax
jne 0x50133e
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x5012f4
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x501770
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [0x7b2214]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x7c5c50]
mov dword [ebp - 0xa4], 0x4020
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xac], 4
test eax, eax
jne 0x50181a
push 0x9c
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.00668940
add esp, 0xc
mov dword [ebp - 0xa0], 0x9c
mov dword [ebp - 0x9c], 6
push 3
push 2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
push 2
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x50180e
mov dword [0x7c5c50], 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
mov dword [0x7c5c50], 1
jmp 0x50181f
cmp eax, 2
je 0x50186e
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xa8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x501852
mov eax, dword [ebp - 0xa8]
cmp eax, dword [ebp - 0xa4]
jg 0x50186e
push 4
lea eax, [ebp - 0xa4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
Function at 0x501a00
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x7b2214]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, dword [ebp + 8]
cmp dword [edi + 0x8c], 2
mov ebx, dword [edi]
je 0x501bd1
cmp byte [edi + 0x1e1], 0
push esi
jne 0x501bc7
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x104]
mov dword [ebp - 0x108], 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x501a8b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push edi
call fcn.0050ce50
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.00500b70
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x84]
mov dword [ebp - 0x108], 0x80
push 0
push eax
call fcn.00668940
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x501af4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push edi
call fcn.0050ce50
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.00500b70
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0xe8]
push eax
lea esi, [edi + 0xb8]
lea eax, [ebp - 0x104]
push esi
push eax
call fcn.005020e0
add esp, 0xc
test al, al
jne 0x501b45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.0050ce50
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00500b70
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
movdqu xmm0, xmmword [esi]
mov eax, dword [esi + 0x28]
movdqu xmmword [edi + 0x58], xmm0
movdqu xmm0, xmmword [esi + 0x10]
movdqu xmmword [edi + 0x68], xmm0
movq xmm0, qword [esi + 0x20]
movq qword [edi + 0x78], xmm0
mov dword [edi + 0x80], eax
mov ax, word [esi + 0x2c]
mov word [edi + 0x84], ax
lea eax, [edi + 0x11c]
push eax
lea eax, [edi + 0xec]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.005020e0
add esp, 0xc
test al, al
jne 0x501bc7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.0050ce50
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00500b70
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
push edi
call fcn.005016b0
add esp, 4
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
Function at 0x502460
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x7b2214]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
push 4
cmp byte [esi + 0x3dc], al
setne al
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x5024bd
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00500c10
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
push dword [esi + 0x3e0]
mov dword [ebp - 0x10], 1
call fcn.00503df0
push dword [esi + 0x3e4]
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.00503df0
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x50252d
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.00500c10
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00629f1d
mov esp, ebp
pop ebp
ret

Function at 0x502540
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
push 4
mov esi, dword [edi]
movzx eax, byte [esi + 0x2e6]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 1
push 6
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x50258b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0050ce50
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00500c10
add esp, 0x14
pop edi
pop esi
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.00500c10
add esp, 8
pop edi
pop esi
pop ebp
ret

Function at 0x503da0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x10]
call fcn.00503ea0
add esp, 4
mov dword [ebp + 0x10], eax
pop ebp
jmp fcn.00671508
Function at 0x50c820
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov cl, byte [ebp + 8]
movsx eax, cl
add eax, 0xffffff9f
cmp eax, 0x19
ja case.default.0x50c831
jmp dword [eax*4 + 0x50c8a4]
mov al, 0x41
pop ebp
ret
mov al, 0x42
pop ebp
ret
mov al, 0x43
pop ebp
ret
mov al, 0x44
pop ebp
ret
mov al, 0x45
pop ebp
ret
mov al, 0x46
pop ebp
ret
mov al, 0x47
pop ebp
ret
mov al, 0x48
pop ebp
ret
mov al, 0x49
pop ebp
ret
mov al, 0x4a
pop ebp
ret
mov al, 0x4b
pop ebp
ret
mov al, 0x4c
pop ebp
ret
mov al, 0x4d
pop ebp
ret
mov al, 0x4e
pop ebp
ret
mov al, 0x4f
pop ebp
ret
mov al, 0x50
pop ebp
ret
mov al, 0x51
pop ebp
ret
mov al, 0x52
pop ebp
ret
mov al, 0x53
pop ebp
ret
mov al, 0x54
pop ebp
ret
mov al, 0x55
pop ebp
ret
mov al, 0x56
pop ebp
ret
mov al, 0x57
pop ebp
ret
mov al, 0x58
pop ebp
ret
mov al, 0x59
pop ebp
ret
mov al, 0x5a
pop ebp
ret
mov al, cl
pop ebp
ret

Function at 0x50caa0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x14]
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [eax], ebx
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x50cc1d
push edi
mov edi, dword [ebp - 8]
test edi, edi
je 0x50cc09
push esi
lea esp, [esp]
cmp dword [edi + 4], 2
jne 0x50cb9a
cmp dword [edi + 0x18], 0
je 0x50cb9a
mov eax, dword [edi + 0x10]
test eax, eax
je 0x50cb9a
cmp eax, 0x10
jb 0x50cb9a
push 0x20
call dword [0x7ae4c8]
mov esi, eax
add esp, 4
test esi, esi
je 0x50cbfe
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 0x10
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 0x10
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
call dword [0x7ae4c8]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x50cbed
mov ecx, dword [edi + 0x18]
movdqu xmm0, xmmword [ecx]
movdqu xmmword [eax], xmm0
mov eax, dword [edi + 0x14]
test eax, eax
je 0x50cb88
push eax
call dword [0x7ae4d4]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x50cbd3
mov eax, dword [ebp - 4]
test ebx, ebx
cmove ebx, esi
test eax, eax
je 0x50cb97
mov dword [eax + 0x1c], esi
mov dword [ebp - 4], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x50cae0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
pop esi
test eax, eax
je 0x50cbb7
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test edi, edi
je 0x50cc05
push ebx
call fcn.0050ca60
mov eax, dword [ebp + 0x14]
add esp, 4
xor ebx, ebx
mov dword [eax], ebx
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi + 0x18]
mov edi, 8
call dword [0x7ae4cc]
push esi
call dword [0x7ae4cc]
add esp, 8
jmp 0x50cba8
push esi
mov edi, 8
call dword [0x7ae4cc]
add esp, 4
jmp 0x50cba8
mov edi, 8
jmp 0x50cba8
test ebx, ebx
jne 0x50cc15
mov edi, 0x2af9
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x50d760
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call fcn.006a1c23
add esp, 0x18
test eax, eax
je 0x50d782
cmp eax, 0xffffffff
jne 0x50d784
xor eax, eax
pop ebp
ret

Function at 0x511d90
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x7b2214]
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 0x511ddd
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.00500b70
add esp, 0xc
mov eax, 2
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x511e05
shr eax, 8
test al, al
jne 0x511e05
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.00500b70
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 2
pop esi
call fcn.00629f1d
mov esp, ebp
pop ebp
ret

Function at 0x512620
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 + 0x154]
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x512668
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.00500b70
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.00511f20
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x512740
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 0x51288c
push edi
lea eax, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], eax
cmp eax, edi
jae 0x512775
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x512780
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x51278b
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [ebp + 0xc], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [ebp + 0xc]
movzx edx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x5127bc
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x5127c6
mov byte [eax], ch
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x5127d0
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x5127da
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x5127e5
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x5127f0
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
lea esi, [ebx + 0x1cb0]
mov dword [ebx + 0x1eb4], eax
sub eax, esi
sub eax, 2
mov dword [edi], esi
mov edi, dword [ebp - 4]
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push edi
call fcn.00512020
add esp, 0x10
push 0
push 3
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x154]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x512848
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.00500b70
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push esi
call fcn.00512680
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [esi + 0x154]
call dword [sym.imp.WS2_32.dll_send]
pop esi
test eax, eax
jns 0x51288b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.00500b70
add esp, 0xc
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x5129e0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90c
mov eax, dword [0x7b2214]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x103]
push 0x7f
push 0
push eax
mov dword [ebp - 0x90c], edi
mov byte [ebp - 0x104], 0
call fcn.00668940
push 0x7f
lea eax, [ebp - 0x83]
mov byte [ebp - 0x84], 0
push 0
push eax
call fcn.00668940
mov ebx, dword [edi]
mov dword [ebp - 0x908], ebx
mov esi, dword [ebx + 0x114]
mov eax, dword [esi + 0x1eb4]
sub eax, dword [esi + 0x1eb0]
add eax, 2
push eax
lea eax, [esi + 0x1cb0]
push eax
push 0x3c
push ebx
call fcn.00512020
mov eax, dword [esi + 0x1eb0]
add esp, 0x28
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x1eb0], eax
cmp ecx, 0x18
je 0x512bd0
cmp ecx, 0x23
je 0x512bad
cmp ecx, 0x27
jne 0x512c63
push 0
push ecx
push 0xfa
push 0xff
push 0x706dbc
lea eax, [ebp - 0x904]
push 0x800
push eax
call fcn.005028e0
mov esi, dword [esi + 0x1cac]
add esp, 0x1c
mov edi, 4
mov eax, 0x800
test esi, esi
je 0x512b4a
mov edx, dword [esi]
mov ecx, edx
lea ebx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x512ad0
sub ecx, ebx
lea ebx, [edi + 1]
add ebx, ecx
cmp ebx, 0x7fa
jae 0x512b38
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x104]
push eax
push str._127_____127s
push edx
call fcn.0062cd14
add esp, 0x10
test eax, eax
je 0x512b38
lea eax, [ebp - 0x84]
push eax
push 1
lea eax, [ebp - 0x104]
push eax
push 0
mov eax, 0x800
sub eax, edi
push str._c_s_c_s
push eax
lea eax, [ebp - 0x904]
add eax, edi
push eax
call fcn.005028e0
add esp, 0x1c
mov edi, ebx
mov esi, dword [esi + 4]
test esi, esi
jne 0x512ac6
mov ebx, dword [ebp - 0x908]
mov eax, 0x800
push 0xf0
push 0xff
sub eax, edi
push str._c_c
push eax
lea eax, [ebp - 0x904]
add eax, edi
push eax
call fcn.005028e0
add esp, 0x14
lea eax, [ebp - 0x904]
add edi, 2
push 0
push edi
push eax
mov eax, dword [ebp - 0x90c]
push dword [eax + 0x154]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x512ba5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.00500b70
add esp, 0xc
lea eax, [edi - 2]
jmp 0x512c50
lea edx, [esi + 0x1c28]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x512bb8
push 0xf0
push 0xff
push edx
push 0
push 0x23
jmp 0x512bf6
lea edx, [esi + 0x1c08]
mov ecx, edx
lea esi, [ecx + 1]
jmp 0x512be0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x512be0
push 0xf0
push 0xff
push edx
push 0
push 0x18
push 0xfa
push 0xff
push str._c_c_c_c_s_c_c
sub ecx, esi
lea eax, [ebp - 0x904]
push 0x800
push eax
lea esi, [ecx + 6]
call fcn.005028e0
add esp, 0x28
lea eax, [ebp - 0x904]
push 0
push esi
push eax
push dword [edi + 0x154]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x512c4d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.00500b70
add esp, 0xc
lea eax, [esi - 2]
push eax
lea eax, [ebp - 0x902]
push eax
push 0x3e
push ebx
call fcn.00512020
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
Function at 0x5138b0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x7b2214]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax + 0x3c8]
mov edi, dword [eax]
lea ebx, [esi + 0x15c]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [ebx]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x513943
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.00667e40
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x513976
push str.Received_too_short_packet
push edi
call fcn.00500b70
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.00629f1d
mov esp, ebp
pop ebp
ret
push ebx
call fcn.005134b0
movzx eax, ax
add esp, 4
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x513991
jmp dword [eax*4 + 0x513aa8]
cmp edx, 4
jle case.0x513991.4
push ebx
call fcn.00513490
movzx ecx, word [esi + 0x40]
add esp, 4
inc ecx
cmp cx, ax
jne case.0x513991.4
lea eax, [edx - 4]
push eax
mov eax, dword [ebx]
add eax, 4
push eax
push 1
push dword [ebp - 0x8c]
call fcn.00500a60
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x5139f6
push 5
push esi
call fcn.005141c0
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x70], eax
adc dword [edi + 0x74], edx
push dword [edi + 0x74]
push dword [edi + 0x70]
push edi
call fcn.0050a510
jmp 0x513a6e
push ebx
call fcn.00513490
movzx eax, ax
mov dword [esi + 8], eax
mov eax, dword [ebx]
add eax, 4
push eax
push 0x7024cc
push edi
call fcn.00500c10
add esp, 0x10
jmp case.0x513991.4
lea eax, [edx - 2]
push eax
mov eax, dword [ebx]
add eax, 2
push eax
push esi
call fcn.00513660
add esp, 0xc
test eax, eax
je case.0x513991.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00629f1d
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x702e30
push edi
call fcn.00500b70
add esp, 0xc
push dword [ebp - 0x8c]
call fcn.0050a770
add esp, 4
test eax, eax
je 0x513963
push 5
push esi
call fcn.005141c0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.00629f1d
mov esp, ebp
pop ebp
ret