joyce8/EMBER2024-capa huggingface dataset:
Function at 0x524bf0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, edx
mov ecx, 0x20
lea edi, [ebp - 0x104]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], ecx
mov dword [eax + 0x28], ecx
mov dword [eax + 0x2c], ecx
mov dword [eax + 0x30], ecx
mov dword [eax + 0x34], ecx
mov dword [eax + 0x38], ecx
mov dword [eax + 0x3c], ecx
mov dword [eax + 0x40], ecx
mov dword [eax + 0x44], ecx
mov dword [eax + 0x48], ecx
mov dword [eax + 0x4c], ecx
mov dword [eax + 0x50], ecx
mov dword [eax + 0x54], ecx
mov dword [eax + 0x58], ecx
mov dword [eax + 0x5c], ecx
mov dword [eax + 0x60], ecx
mov dword [eax + 0x64], ecx
mov dword [eax + 0x68], ecx
mov dword [eax + 0x6c], ecx
mov dword [eax + 0x70], ecx
mov dword [eax + 0x74], ecx
mov dword [eax + 0x78], ecx
mov dword [eax + 0x7c], ecx
mov ecx, dword [eax]
mov edx, dword [eax + 0x7c]
add ecx, 0x1da
add edx, 0xfe
mov dword [ebp - 0x84], ecx
mov dword [ebp - 8], edx
mov ecx, 1
jmp 0x524ca0
mov edx, dword [eax + ecx*4]
add edx, 0x1fe
mov dword [ebp + ecx*4 - 0x84], edx
inc ecx
cmp ecx, 0x1f
jl 0x524ca0
lea edx, [ebp - 0x84]
sub edx, eax
mov dword [ebp - 0x10c], edx
lea edx, [ebp - 0x80]
sub edx, eax
lea esi, [ebp - 0x104]
lea edi, [ebp - 0x100]
sub esi, eax
sub edi, eax
mov dword [ebp - 0x108], edx
lea ecx, [eax + 8]
xor edx, edx
push ebx
jmp 0x524cf0
mov ebx, dword [ebp + edx - 0x84]
sub ebx, dword [ebp + edx - 0x104]
add edx, 0x10
mov dword [ecx - 8], ebx
mov ebx, dword [ebp + edx - 0x90]
sub ebx, dword [ebp + edx - 0x110]
add ecx, 0x10
mov dword [ecx - 0x14], ebx
mov ebx, dword [ebp - 0x10c]
mov ebx, dword [ebx + ecx - 0x10]
sub ebx, dword [esi + ecx - 0x10]
mov dword [ecx - 0x10], ebx
mov ebx, dword [ebp - 0x108]
mov ebx, dword [ebx + ecx - 0x10]
sub ebx, dword [edi + ecx - 0x10]
mov dword [ecx - 0xc], ebx
cmp edx, 0x80
jl 0x524cf0
mov esi, 4
pop ebx
mov edx, dword [eax + 0x7c]
mov ecx, edx
shr ecx, 7
imul ecx, ecx, 0x13
add dword [eax], ecx
and edx, 0x7f
mov dword [eax + 0x7c], edx
xor ecx, ecx
lea ecx, [ecx]
mov edx, dword [eax + ecx*4]
mov edi, edx
movzx edx, dl
shr edi, 8
add dword [eax + ecx*4 + 4], edi
mov dword [eax + ecx*4], edx
inc ecx
cmp ecx, 0x1f
jl 0x524d60
dec esi
jne 0x524d48
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0059af98
mov esp, ebp
pop ebp
ret
Function at 0x525d00
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c4
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
test eax, eax
je 0x525d91
test ebx, ebx
je 0x525d91
test edi, edi
je 0x525d91
push esi
mov esi, eax
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x44]
push ecx
push 0x20
push eax
call fcn.00502f10
mov dl, byte [ebp - 0x25]
and byte [ebp - 0x44], 0xf8
and dl, 0x3f
lea eax, [ebp - 0xc4]
or dl, 0x40
push eax
lea ecx, [ebp - 0x44]
mov byte [ebp - 0x25], dl
call fcn.00523da0
add esp, 0x10
lea edx, [ebp - 0xc4]
lea ecx, [ebp - 0x2c4]
call fcn.00525a60
lea ecx, [ebp - 0x2c4]
call fcn.00523be0
pop esi
pop edi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
xor al, al
pop ebx
call fcn.0059af98
mov esp, ebp
pop ebp
ret
Function at 0x541780
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x6736f0], 0
jne 0x5417ac
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret
push edi
push 0x190
lea eax, [ebp - 0x218]
push 0
push eax
mov dword [ebp - 0x220], 1
call sub.MSVCR100.dll_memset
mov edi, dword [sym.imp.WS2_32.dll_WSAStartup]
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
push 0x909
call edi
mov dword [ebp - 0x220], eax
cmp eax, 0x276c
jne 0x5418bd
mov ecx, 5
push esi
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x21c], 2
jmp 0x541816
mov ecx, dword [ebp - 0x224]
cmp ecx, 1
jl 0x541879
dec dword [ebp - 0x21c]
jns 0x541834
dec ecx
mov dword [ebp - 0x21c], 9
mov dword [ebp - 0x224], ecx
test ecx, ecx
je 0x541879
movzx edx, byte [ebp - 0x21c]
movzx eax, cl
push 0x190
shl dx, 8
lea ecx, [ebp - 0x218]
or dx, ax
push 0
push ecx
movzx esi, dx
call sub.MSVCR100.dll_memset
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push esi
call edi
mov dword [ebp - 0x220], eax
cmp eax, 0x276c
je 0x541810
pop esi
test eax, eax
jne 0x5418c5
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x224]
push ecx
push str.Using_ws2_32.dll_version__d__d
lea edx, [ebp - 0x88]
push 0x50
push edx
call fcn.00441f30
mov eax, dword [ebx]
mov edx, dword [eax + 0x2c]
add esp, 0x14
lea ecx, [ebp - 0x88]
push ecx
push str.ws2_32_DLL_Version
mov ecx, ebx
call edx
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x54194b
cmp eax, 0x276b
jne 0x5418d8
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.The_underlying_network_subsystem_is_not_ready_for_network_communication.
jmp 0x541947
cmp eax, 0x276c
jne 0x5418eb
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.The_version_of_Windows_Sockets_support_requested_is_not_provided_by_this_particular_Windows_Sockets_implementation.
jmp 0x541947
cmp eax, 0x2734
jne 0x5418fe
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.A_blocking_Windows_Sockets_1.1_operation_is_in_progress.
jmp 0x541947
cmp eax, 0x2753
jne 0x541911
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.Limit_on_the_number_of_tasks_supported_by_the_Windows_Sockets_implementation_has_been_reached.
jmp 0x541947
cmp eax, 0x271e
jne 0x541924
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.The_lpWSAData_is_not_a_valid_pointer.
jmp 0x541947
lea eax, [ebp - 0x220]
push eax
push str.WSAStartup_error:_0x_x
lea ecx, [ebp - 0x38]
push 0x32
push ecx
call fcn.00441f10
mov edx, dword [ebx]
mov edx, dword [edx + 0x14]
add esp, 0x10
lea eax, [ebp - 0x38]
push eax
mov ecx, ebx
call edx
mov edi, ebx
mov byte [0x6736f0], 0
call fcn.00541690
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebp - 0x220], eax
pop edi
sete al
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret
Function at 0x541d10
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
cmp dword [ebx + 0xd0], 0x4901fb2a
je 0x541d40
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
push str.Internal_error:_Socket_object_already_deleted.
call edx
push 0
call fcn.00464950
add esp, 4
pop ebx
pop ebp
ret 8
mov eax, dword [ebp + 8]
cmp dword [ebx + 0xd8], eax
push esi
lea esi, [ebx + 0xd8]
je 0x541dbe
test eax, eax
je 0x541dbe
cmp eax, 0x1000
jb 0x541dbe
cmp eax, 0x800000
jbe 0x541d69
mov eax, 0x800000
and eax, 0xfffff000
cmp dword [ebx + 0x294], 0xffffffff
mov dword [esi], eax
je 0x541dbe
push edi
mov edi, dword [ebp + 0xc]
cmp byte [edi + 0x125], 0
je 0x541da3
mov eax, dword [edi]
mov edx, dword [eax + 0x18]
push str.Setting_SO_SNDBUF_size
mov ecx, edi
call edx
mov eax, dword [esi]
push eax
push str.sendBufSize
mov ecx, edi
call fcn.0044e8c0
mov ecx, dword [ebx + 0x294]
push 4
push esi
push 0x1001
push 0xffff
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x541e60
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
cmp dword [esi + 0x294], 0xffffffff
je 0x541ee8
cmp byte [ebp + 8], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 1
mov dword [ebp - 8], 0
je 0x541ebc
cmp byte [ecx + 0x125], 0
je 0x541e9e
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
push str.Turning_on_TCP_NODELAY.
call edx
mov ecx, dword [esi + 0x294]
push 4
lea eax, [ebp - 4]
push eax
push 1
push 6
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov esp, ebp
pop ebp
ret 8
cmp byte [ecx + 0x125], 0
je 0x541ed1
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
push str.Turning_off_TCP_NODELAY.
call eax
mov edx, dword [esi + 0x294]
push 4
lea ecx, [ebp - 8]
push ecx
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x541ef0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 0x294]
cmp eax, 0xffffffff
jne 0x541f21
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret 8
xor ecx, ecx
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x18], ecx
cmp byte [ebp + 8], cl
je 0x541f72
push ecx
push ecx
lea edx, [ebp - 0x1c]
push edx
push ecx
push ecx
push 0xc
mov dword [ebp - 0x1c], ecx
lea ecx, [ebp - 0x10]
push ecx
push 0x98000004
push eax
mov dword [ebp - 0x10], 1
mov dword [ebp - 8], 0x7148
mov dword [ebp - 0xc], 0x1d0d8
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov eax, dword [esi + 0x294]
push 4
lea edx, [ebp - 0x14]
push edx
jmp 0x541f78
push 4
lea ecx, [ebp - 0x18]
push ecx
push 8
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov al, 1
pop esi
call fcn.0059af98
mov esp, ebp
pop ebp
ret 8
Function at 0x543e20
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b1688
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
push str.ck_getsockname_ipv4
mov dword [ebp - 0x28], ecx
push esi
lea ecx, [ebp - 0x34]
call fcn.0044ec60
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.00443a10
mov eax, dword [ebp - 0x28]
mov dword [ebx], 0
mov eax, dword [eax + 0x294]
cmp eax, 0xffffffff
je 0x543efc
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 0x24], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x543eda
test eax, eax
js 0x543eda
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
mov ecx, edi
call fcn.00445fe0
mov ecx, dword [ebp - 0x1e]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
lea ecx, [ebp - 0x34]
mov dword [ebx], edx
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
mov al, 1
jmp 0x543f1b
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_getsockname
mov ecx, esi
call edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
push 0
push eax
call fcn.00542080
add esp, 0xc
jmp 0x543f0a
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Cannot_get_socket_name:_INVALID_SOCKET.
mov ecx, esi
call edx
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret 0xc
Function at 0x543f50
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b16b8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
push str.ck_getsockname_ipv6
mov dword [ebp - 0x34], ecx
push esi
lea ecx, [ebp - 0x40]
call fcn.0044ec60
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.00443a10
mov eax, dword [ebp - 0x34]
mov dword [ebx], 0
mov eax, dword [eax + 0x294]
cmp eax, 0xffffffff
je 0x54402b
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x2c]
push edx
push eax
mov dword [ebp - 0x30], 0x1c
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x544009
test eax, eax
js 0x544009
mov ecx, edi
call fcn.00443a10
mov edx, edi
lea ecx, [ebp - 0x24]
call fcn.005410d0
mov eax, dword [ebp - 0x2a]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [ebx], ecx
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
mov al, 1
jmp 0x54404a
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_getsockname_ipv6
mov ecx, esi
call eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
push 0
push eax
call fcn.00542080
add esp, 0xc
jmp 0x544039
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Cannot_get_socket_name:_INVALID_SOCKET.
mov ecx, esi
call eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret 0xc
Function at 0x544cb0
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b17cb
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, ecx
cmp dword [edi + 0x294], 0xffffffff
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x15c], ecx
je 0x544dc4
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x544d08
cmp ecx, 0x7530
jbe 0x544d0f
mov dword [ebp + 8], 0x7530
push eax
lea ecx, [ebp - 0x158]
call fcn.004aecb0
mov dword [ebp - 4], 0
call sub.KERNEL32.dll_GetTickCount
mov ebx, dword [sym.imp.WS2_32.dll_recv]
push 0
push 0x20
lea edx, [ebp - 0x30]
mov esi, eax
mov eax, dword [edi + 0x294]
push edx
push eax
call ebx
test eax, eax
je 0x544d81
cmp eax, 0xffffffff
je 0x544d4d
test eax, eax
jns 0x544d5a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x544db2
call sub.KERNEL32.dll_GetTickCount
cmp eax, esi
jae 0x544d65
mov esi, eax
sub eax, esi
cmp eax, dword [ebp + 8]
jae 0x544db2
mov edx, dword [edi + 0x294]
push 0
push 0x20
lea ecx, [ebp - 0x30]
push ecx
push edx
call ebx
test eax, eax
jne 0x544d44
mov ecx, dword [ebp - 0x15c]
cmp byte [ecx + 0x125], 0
je 0x544d9c
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
push str.TCP_connection_cleanly_closed_by_peer.
call edx
lea ecx, [ebp - 0x158]
mov dword [ebp - 4], 0xffffffff
call fcn.004aed70
mov al, 1
jmp 0x544dc6
lea ecx, [ebp - 0x158]
mov dword [ebp - 4], 0xffffffff
call fcn.004aed70
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret 0xc
Function at 0x545e70
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
cmp dword [ecx + 0x298], 2
jne 0x545e82
pop ebp
jmp fcn.00543e20
pop ebp
jmp fcn.00543f50
Function at 0x546910
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b1958
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, ecx
mov eax, dword [esi + 0x294]
cmp eax, 0xffffffff
jne 0x546951
mov byte [esi + 0x290], 0
cmp byte [esi + 0x290], 0
je 0x546999
cmp byte [esi + 0xd6], 0
jne 0x546999
cmp byte [esi + 0xd5], 0
jne 0x5469e6
cmp byte [esi + 0xd4], 0
jne 0x5469e6
cmp byte [edi + 0x130], 0
jne 0x5469e6
push 2
push 1
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x54699d
push edi
mov ecx, esi
call fcn.00544980
xor al, al
jmp 0x5469e8
cmp eax, 0xffffffff
je 0x5469a6
test eax, eax
jns 0x5469e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x5469e6
push str.isConnected_recv_peek
push edi
lea ecx, [ebp - 0x24]
call fcn.0044ec60
push edi
push 0
mov dword [ebp - 4], 0
call fcn.00543df0
add esp, 8
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
xor al, al
jmp 0x5469e8
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret 4
Function at 0x546a10
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b1990
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x676664]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 0x14]
push str.terminateConnection
push edi
lea ecx, [ebp - 0x20]
call fcn.0044ec60
xor ebx, ebx
or ecx, 0xffffffff
mov dword [ebp - 4], ebx
cmp dword [esi + 0x294], ecx
jne 0x546a7c
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x20]
call fcn.0044ecf0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp byte [esi + 0xd6], bl
lea eax, [esi + 0xd6]
jne 0x546a5b
push eax
lea ecx, [ebp - 0x14]
call fcn.00442240
mov byte [ebp - 4], 1
cmp byte [ebp + 8], bl
jne 0x546aa6
push 1
call fcn.00441780
add esp, 4
mov byte [ebp + 0x17], 1
cmp byte [esi + 0x291], bl
jne 0x546b59
cmp byte [ebp + 8], bl
jne 0x546b59
cmp byte [esi + 0x292], bl
jne 0x546b59
mov eax, dword [esi + 0x294]
push 1
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov byte [esi + 0x292], 1
cmp eax, ebx
je 0x546b46
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.error_on_socket_shutdown.
mov ecx, edi
call eax
push edi
push ebx
call fcn.00543df0
mov ecx, dword [esi + 0x294]
add esp, 8
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
or edi, 0xffffffff
lea ecx, [ebp - 0x14]
mov dword [esi + 0x294], edi
mov word [esi + 0x290], bx
mov byte [ebp - 4], bl
call fcn.00442260
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], edi
call fcn.0044ecf0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push edi
push edx
push eax
mov ecx, esi
call fcn.00544cb0
mov byte [ebp + 0x17], al
push str.AbortiveClose
lea ecx, [edi + 0x90]
call fcn.00446450
test al, al
je 0x546b91
mov ecx, dword [esi + 0x294]
push 4
lea eax, [ebp + 8]
push eax
push 0x80
push 0xffff
push ecx
mov dword [ebp + 8], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [esi + 0x294]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
cmp eax, ebx
je 0x546bc4
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.error_on_closesocket.
mov ecx, edi
call edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push edi
push ebx
push eax
call fcn.00542080
add esp, 0xc
mov byte [ebp + 0x17], bl
mov dword [esi + 0x294], 0xffffffff
cmp byte [edi + 0x125], bl
je 0x546bff
cmp byte [esi + 0x291], bl
je 0x546be5
push str.Closed_listen_socket.
jmp 0x546bf6
cmp byte [ebp + 0x17], bl
je 0x546bf1
push str.Cleanly_terminated_TCP_connection.
jmp 0x546bf6
push str.Terminated_TCP_connection.
mov eax, dword [edi]
mov edx, dword [eax + 0x18]
mov ecx, edi
call edx
lea ecx, [ebp - 0x14]
mov word [esi + 0x290], bx
mov byte [ebp - 4], bl
call fcn.00442260
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
mov al, byte [ebp + 0x17]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x549f30
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
mov ecx, dword [0x673940]
push esi
movzx esi, byte [ecx + 3]
shl esi, 8
push edi
movzx edi, byte [ecx + 2]
or esi, edi
movzx edi, byte [ecx + 1]
shl esi, 8
or esi, edi
movzx edi, byte [ecx]
shl esi, 8
or esi, edi
mov dword [edx], esi
movzx esi, byte [ecx + 7]
movzx edi, byte [ecx + 6]
shl esi, 8
or esi, edi
movzx edi, byte [ecx + 5]
shl esi, 8
or esi, edi
movzx edi, byte [ecx + 4]
shl esi, 8
or esi, edi
mov dword [edx + 4], esi
movzx esi, byte [ecx + 0xb]
movzx edi, byte [ecx + 0xa]
shl esi, 8
or esi, edi
movzx edi, byte [ecx + 9]
shl esi, 8
or esi, edi
movzx edi, byte [ecx + 8]
shl esi, 8
or esi, edi
mov dword [edx + 8], esi
movzx esi, byte [ecx + 0xf]
movzx edi, byte [ecx + 0xe]
shl esi, 8
or esi, edi
movzx edi, byte [ecx + 0xd]
movzx ecx, byte [ecx + 0xc]
shl esi, 8
or esi, edi
shl esi, 8
or esi, ecx
mov dword [edx + 0xc], esi
movzx ecx, byte [eax + 3]
movzx esi, byte [eax + 2]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 1]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax]
shl ecx, 8
or ecx, esi
mov dword [edx + 0x10], ecx
movzx ecx, byte [eax + 7]
movzx esi, byte [eax + 6]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 5]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 4]
shl ecx, 8
or ecx, esi
mov dword [edx + 0x14], ecx
movzx ecx, byte [eax + 0xb]
movzx esi, byte [eax + 0xa]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 9]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 8]
shl ecx, 8
or ecx, esi
mov dword [edx + 0x18], ecx
movzx ecx, byte [eax + 0xf]
movzx esi, byte [eax + 0xe]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0xd]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0xc]
shl ecx, 8
or ecx, esi
mov dword [edx + 0x1c], ecx
movzx ecx, byte [eax + 0x13]
movzx esi, byte [eax + 0x12]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0x11]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0x10]
shl ecx, 8
or ecx, esi
mov dword [edx + 0x20], ecx
movzx ecx, byte [eax + 0x17]
movzx esi, byte [eax + 0x16]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0x15]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0x14]
shl ecx, 8
or ecx, esi
mov dword [edx + 0x24], ecx
movzx ecx, byte [eax + 0x1b]
movzx esi, byte [eax + 0x1a]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0x19]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0x18]
shl ecx, 8
or ecx, esi
mov dword [edx + 0x28], ecx
movzx ecx, byte [eax + 0x1f]
movzx esi, byte [eax + 0x1e]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0x1d]
movzx eax, byte [eax + 0x1c]
shl ecx, 8
or ecx, esi
shl ecx, 8
or ecx, eax
pop edi
mov dword [edx + 0x2c], ecx
mov dword [edx + 0x40], 0x40
pop esi
ret
Function at 0x54ff70
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x10], 0
je 0x54ffc2
cmp dword [esi + 4], 0
jne 0x54ff8b
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 4], eax
cmp dword [esi + 0x10], 0x3e8
jae 0x54ff9b
mov dword [esi + 0x10], 0x7530
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 4]
cmp eax, ecx
jbe 0x54ffc2
sub eax, ecx
cmp eax, dword [esi + 0x10]
jbe 0x54ffc2
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.004aef00
mov al, 1
mov byte [esi + 0x14], al
pop esi
pop ebp
ret 0xc
xor al, al
pop esi
pop ebp
ret 0xc