joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40b710
Capabilities:
Connect to http server
Create http request
Parse url
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x754
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x344], 0
push 0x38
push 0
lea eax, [ebp - 0x340]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 0x344], 0x3c
lea ecx, [ebp - 0x100]
mov dword [ebp - 0x334], ecx
mov dword [ebp - 0x330], 0x100
lea edx, [ebp - 0x300]
mov dword [ebp - 0x318], edx
mov dword [ebp - 0x314], 0x200
lea eax, [ebp - 0x344]
push eax
push 0x10000000
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
push 0
push 0
push 0
push 1
push 0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0
je 0x40b927
push 0
push 0
push 3
push 0
push 0
movzx edx, word [ebp - 0x32c]
push edx
lea eax, [ebp - 0x100]
push eax
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x348], eax
cmp dword [ebp - 0x348], 0
je 0x40b91a
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x300]
push edx
push 0x40f4cc
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
je 0x40b90d
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x34c]
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40b900
cmp dword [ebp + 0xc], 0
je 0x40b8f6
mov dword [ebp - 0x350], 0
mov edx, 1
test edx, edx
je 0x40b8e9
lea eax, [ebp - 0x754]
push eax
push 0x400
lea ecx, [ebp - 0x750]
push ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40b88b
cmp dword [ebp - 0x754], 0
jne 0x40b88d
jmp 0x40b8e9
mov eax, dword [ebp - 0x350]
add eax, dword [ebp - 0x754]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.00408570
add esp, 8
mov dword [ebp - 0x304], eax
mov edx, dword [ebp - 0x754]
push edx
lea eax, [ebp - 0x750]
push eax
mov ecx, dword [ebp - 0x304]
add ecx, dword [ebp - 0x350]
push ecx
call sub.ntdll.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x350]
add edx, dword [ebp - 0x754]
mov dword [ebp - 0x350], edx
jmp 0x40b851
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x350]
mov dword [eax], ecx
jmp 0x40b900
mov dword [ebp - 0x304], 1
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x304]
mov esp, ebp
pop ebp
ret
Function at 0x40b940
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov byte [ebp - 0x401], 0
mov dword [ebp - 0x408], 0
jmp 0x40b96b
mov eax, dword [ebp - 0x408]
add eax, 1
mov dword [ebp - 0x408], eax
cmp dword [ebp - 0x408], 2
jge 0x40ba24
push 0
push 0
push 0
push 0x400
lea ecx, [ebp - 0x400]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x40b9a6
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40b95c
mov byte [ebp - 0x401], 1
push 0xf
push str.HTTP_1.1_200_OK
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x40ba1f
push str.LOCATION:
lea ecx, [ebp - 0x400]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0
je 0x40ba1f
mov edx, dword [ebp - 0x40c]
add edx, 0xa
mov dword [ebp - 0x410], edx
push 0xd
mov eax, dword [ebp - 0x410]
push eax
call dword [sym.imp.SHLWAPI.dll_StrChrA]
sub eax, dword [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x410]
push ecx
call fcn.0040a740
add esp, 8
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
jmp 0x40b95c
mov al, byte [ebp - 0x401]
mov esp, ebp
pop ebp
ret
Function at 0x40ba30
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x40bb91
xor eax, eax
mov word [ebp - 0x38], ax
xor ecx, ecx
mov dword [ebp - 0x36], ecx
mov dword [ebp - 0x32], ecx
mov dword [ebp - 0x2e], ecx
mov word [ebp - 0x2a], cx
mov edx, 2
mov word [ebp - 0x38], dx
push 0x76c
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x36], ax
push str.239.255.255.250
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x15], 1
push 1
lea eax, [ebp - 0x15]
push eax
push 0x20
push 0xffff
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
xor edx, edx
mov word [ebp - 0x28], dx
xor eax, eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov word [ebp - 0x1a], ax
mov ecx, 2
mov word [ebp - 0x28], cx
call fcn.00408a10
mov dword [ebp - 0x24], eax
push 0x10
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_bind]
mov dword [ebp - 0x14], str.M_SEARCH__HTTP_1.1_r_nST:urn:schemas_upnp_org:device:InternetGatewayDevice:1_r_nMX:_3_r_nMan:_ssdp:discover__r_nHOST:_239.255.255.250:1900_r_n_r_n
push 0x10
lea ecx, [ebp - 0x38]
push ecx
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0x10], 1
lea edx, [ebp - 0x10]
push edx
push 0x8004667e
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, 1
test ecx, ecx
je 0x40bb85
mov dword [ebp - 0x3c], 0
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040b940
add esp, 8
movzx ecx, al
test ecx, ecx
jne 0x40bb54
jmp 0x40bb85
mov edx, dword [ebp - 4]
lea eax, [edx*4 + 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00408570
add esp, 8
mov dword [ebp - 8], eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x3c]
mov dword [eax + edx*4], ecx
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
jmp 0x40bb2b
mov eax, dword [ebp - 0xc]
push eax
call fcn.00408ad0
add esp, 4
cmp dword [ebp - 8], 0
je 0x40bb9f
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov dword [ecx], edx
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x40c210
Capabilities:
Connect to http server
Create http request
Parse url
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x75c
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x344], 0
push 0x38
push 0
lea eax, [ebp - 0x340]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 0x344], 0x3c
lea ecx, [ebp - 0x100]
mov dword [ebp - 0x334], ecx
mov dword [ebp - 0x330], 0x100
lea edx, [ebp - 0x300]
mov dword [ebp - 0x318], edx
mov dword [ebp - 0x314], 0x200
lea eax, [ebp - 0x344]
push eax
push 0x10000000
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
push 0
push 0
push 0
push 1
push str.Mozilla_4.0__compatible__UPnP_1.0__Windows_9x_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0
je 0x40c441
push 0
push 0
push 3
push 0
push 0
movzx edx, word [ebp - 0x32c]
push edx
lea eax, [ebp - 0x100]
push eax
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x348], eax
cmp dword [ebp - 0x348], 0
je 0x40c434
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x300]
push edx
push str.POST
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
je 0x40c427
push 0xa0000000
push 0xffffffffffffffff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov dword [ebp - 0x350], str.Content_Type:_text_xml__charset_utf_8__r_nConnection:_Close_r_nCache_Control:_no_cache_r_nPragma:_no_cache_r_n
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x350]
push eax
mov ecx, dword [ebp - 0x34c]
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40c41a
mov dword [ebp - 0x354], 0
mov edx, 1
test edx, edx
je 0x40c40f
lea eax, [ebp - 0x75c]
push eax
push 0x400
lea ecx, [ebp - 0x758]
push ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40c3b1
cmp dword [ebp - 0x75c], 0
jne 0x40c3b3
jmp 0x40c40f
mov eax, dword [ebp - 0x354]
add eax, dword [ebp - 0x75c]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.00408570
add esp, 8
mov dword [ebp - 0x304], eax
mov edx, dword [ebp - 0x75c]
push edx
lea eax, [ebp - 0x758]
push eax
mov ecx, dword [ebp - 0x304]
add ecx, dword [ebp - 0x354]
push ecx
call sub.ntdll.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x354]
add edx, dword [ebp - 0x75c]
mov dword [ebp - 0x354], edx
jmp 0x40c377
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x354]
mov dword [eax], ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x304]
mov esp, ebp
pop ebp
ret
Function at 0x40c5a0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov word [ebp - 4], ax
push 0xa
lea ecx, [ebp - 0xc]
push ecx
push 7
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x10], 0x40f348
lea edx, [ebp - 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
mov cl, byte [eax]
mov byte [ebp - 0x15], cl
mov edx, dword [ebp - 0x10]
cmp cl, byte [edx]
jne 0x40c60f
cmp byte [ebp - 0x15], 0
je 0x40c606
mov eax, dword [ebp - 0x14]
mov cl, byte [eax + 1]
mov byte [ebp - 0x16], cl
mov edx, dword [ebp - 0x10]
cmp cl, byte [edx + 1]
jne 0x40c60f
add dword [ebp - 0x14], 2
add dword [ebp - 0x10], 2
cmp byte [ebp - 0x16], 0
jne 0x40c5d2
mov dword [ebp - 0x1c], 0
jmp 0x40c617
sbb eax, eax
sbb eax, 0xffffffff
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
jne 0x40c627
mov al, 1
jmp 0x40c629
xor al, al
mov esp, ebp
pop ebp
ret

Function at 0x40c630
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push 0x44
push 0
lea eax, [ebp - 0x60]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x60], 0x44
mov dword [ebp - 0x34], 1
mov edx, 5
mov word [ebp - 0x30], dx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x60]
push ecx
push 0
push 0
push 0x20
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp eax, 1
jne 0x40c69f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x40c6d6
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 0x20
jle 0x40c6d4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x40c6d6
xor al, al
mov esp, ebp
pop ebp
ret
Function at 0x40c9e0
Capabilities:
Create tcp socket
Create thread
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x14
xor eax, eax
test si, si
je 0x40cad1
test edi, edi
je 0x40cad1
push ebx
push 0x24
call fcn.00408510
add esp, 4
push 0
push 0
mov ebx, eax
push 1
push 0
mov dword [ebx], 0x756470
mov dword [ebx + 4], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x11
push 2
push 2
mov dword [ebx + 0x10], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 8], eax
cmp eax, 0xffffffff
jne 0x40ca3c
call fcn.0040ce40
xor ebx, ebx
test ebx, ebx
je 0x40cace
xor eax, eax
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov dword [esp + 0x12], eax
mov word [esp + 0x16], ax
mov eax, dword [esp + 0x1c]
mov ecx, 2
push esi
mov dword [esp + 0x10], eax
mov word [esp + 0xc], cx
call dword [sym.imp.WS2_32.dll_htons]
push 1
lea edx, [esp + 0xb]
push edx
push 4
mov word [esp + 0x16], ax
mov byte [esp + 0x13], 1
mov eax, dword [ebx + 8]
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [ebx + 8]
push 0x10
lea ecx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40cab4
call fcn.0040ce40
xor eax, eax
pop ebx
add esp, 0x14
ret
push 0
push 0
push ebx
push 0x40cc10
push 0
push 0
mov dword [ebx + 0xc], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0x14], eax
mov eax, ebx
pop ebx
add esp, 0x14
ret
Function at 0x40cd10
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, eax
xor al, al
push edi
mov byte [esp + 0x13], al
test ecx, ecx
je 0x40ce2a
cmp dword [ecx], 0x756470
jne 0x40ce2a
cmp dword [ebp + 0xc], 0
je 0x40ce2a
test esi, esi
je 0x40ce2a
lea edi, [esi + 4]
push edi
call fcn.00408530
mov ebx, eax
mov eax, dword [ebp + 0xc]
push esi
push eax
lea ecx, [ebx + 4]
push ecx
mov dword [esp + 0x24], ebx
mov dword [ebx], esi
call sub.ntdll.dll_memcpy
xor eax, eax
mov dword [esp + 0x2a], eax
mov dword [esp + 0x2e], eax
mov dword [esp + 0x32], eax
mov word [esp + 0x36], ax
mov eax, dword [ebp + 0x14]
add esp, 0x10
mov edx, 2
push eax
mov word [esp + 0x1c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp + 0x10]
mov word [esp + 0x1a], ax
mov dword [esp + 0x1c], ecx
test edi, edi
je 0x40ce00
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push 0x10
lea edx, [esp + 0x1c]
push edx
push 0
push edi
push ebx
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
mov esi, eax
cmp esi, 0xffffffff
je 0x40cdf8
mov edx, dword [ebp + 8]
push esi
add edx, 0x1c
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
sub edi, esi
add ebx, esi
test edi, edi
jne 0x40cda6
mov ebx, dword [esp + 0x14]
push ebx
mov byte [esp + 0x17], 1
call fcn.00408680
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x40ce19
mov ebx, dword [esp + 0x14]
push ebx
mov byte [esp + 0x17], 1
call fcn.00408680
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x14]
push ebx
call fcn.00408680
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40ceb0
Capabilities:
Create tcp socket
Create thread
Create udp socket

Disassembly:
sub esp, 0x10
push ebx
push 0x24
call fcn.00408510
add esp, 4
push 0
push 0
mov ebx, eax
push 1
push 0
mov dword [ebx], 0x756470
mov dword [ebx + 4], 1
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x11
push 2
push 2
mov dword [ebx + 0x10], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 8], eax
cmp eax, 0xffffffff
jne 0x40cef9
call fcn.0040ce40
xor ebx, ebx
test ebx, ebx
je 0x40cf5a
xor eax, eax
mov dword [esp + 6], eax
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov word [esp + 0x12], ax
mov eax, 2
push 0x10
lea ecx, [esp + 8]
mov word [esp + 8], ax
mov edx, dword [ebx + 8]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40cf3c
call fcn.0040ce40
xor eax, eax
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x18]
push 0
push 0
push ebx
push 0x40cc10
push 0
push 0
mov dword [ebx + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0x14], eax
mov eax, ebx
pop ebx
add esp, 0x10
ret
Function at 0x40d700
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_WSASend]
push ebp
mov ebp, dword [esp + 0xc]
mov ecx, dword [ebp + 0x260]
push edi
push 0
push esi
push 0
lea eax, [esp + 0x1c]
push eax
push 1
lea edi, [esi + 0x1c]
push edi
push ecx
mov dword [esp + 0x2c], 0
call ebx
test eax, eax
je 0x40d770
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40d770
cmp eax, 0x2733
jne 0x40d776
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0x260]
push 0
push esi
push 0
lea edx, [esp + 0x1c]
push edx
push 1
push edi
push eax
mov dword [esp + 0x2c], 0
call ebx
test eax, eax
jne 0x40d732
pop edi
pop ebp
mov al, 1
pop ebx
ret
pop edi
pop ebp
xor al, al
pop ebx
ret

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

Disassembly:
sub esp, 8
mov edx, dword [esi + 0x260]
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_WSARecv]
push ebp
push edi
xor eax, eax
push eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
lea edi, [esi + 0x208]
push edi
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 1
lea ebp, [esi + 0x224]
push ebp
push edx
call ebx
test eax, eax
je 0x40d8f2
mov edi, edi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40d8f2
cmp eax, 0x2733
jne 0x40d8fb
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esi + 0x260]
xor eax, eax
push eax
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 1
push ebp
push edx
call ebx
test eax, eax
jne 0x40d8b0
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 8
ret
pop edi
pop ebp
xor al, al
pop ebx
add esp, 8
ret
Function at 0x40d980
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x1c
cmp dword [esp + 0x20], 0
push esi
push edi
mov esi, eax
mov edi, ecx
jne 0x40db12
test ebx, ebx
je 0x40db12
call fcn.0040b310
push eax
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esi + 0x18]
sub eax, 0
je 0x40da6e
sub eax, 1
jne 0x40db69
cmp byte [edi + 0x275], al
je 0x40d9dc
add edi, 0x21c
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
add esp, 0x1c
ret
lea ecx, [edi + 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov edx, dword [edi + 0x27c]
push ebx
add edx, 0x44
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, dword [edi + 0x264]
mov ecx, dword [edi + 0x268]
mov edx, dword [edi + 0x26c]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x270]
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x278]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x27c]
lea eax, [esp + 8]
lea edx, [edi + 8]
push eax
mov dword [esp + 0x20], edx
push ecx
mov ecx, 3
mov edx, edi
mov dword [esp + 0x28], ebx
call fcn.0040d360
add esp, 8
mov eax, edi
call fcn.0040d910
test al, al
jne 0x40db69
mov byte [edi + 0x275], 1
pop edi
pop esi
add esp, 0x1c
ret
cmp byte [edi + 0x275], 0
je 0x40da87
add esi, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
add esp, 0x1c
ret
add dword [esi + 0x28], ebx
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x24]
jae 0x40daa7
add dword [esi + 0x20], ebx
sub dword [esi + 0x1c], ebx
push edi
call fcn.0040d700
add esp, 4
pop edi
pop esi
add esp, 0x1c
ret
lea edx, [esi + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, dword [edi + 0x268]
mov edx, dword [edi + 0x26c]
mov eax, dword [edi + 0x264]
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x278]
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0x30]
mov dword [esp + 0x18], ecx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x270]
mov dword [esp + 0x1c], edx
mov edx, dword [edi + 0x27c]
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x28]
push edx
mov ecx, 2
mov edx, edi
mov dword [esp + 0x28], eax
call fcn.0040d360
add esp, 8
pop edi
pop esi
add esp, 0x1c
ret
add esi, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 4
lea edx, [esp + 0x2c]
push edx
mov eax, 1
push 0x80
mov word [esp + 0x34], ax
mov eax, dword [edi + 0x260]
push 0xffff
xor ecx, ecx
push eax
mov byte [edi + 0x275], 1
mov word [esp + 0x3e], cx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [edi + 0x260]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x260], 0xffffffff
pop edi
pop esi
add esp, 0x1c
ret
Function at 0x40dc40
Capabilities:
Create tcp socket
Create udp socket
Get system information on windows
Set socket configuration

Disassembly:
sub esp, 0x38
push edi
push 0x4c
call fcn.00408510
mov edi, eax
add esp, 4
test edi, edi
je 0x40ddc6
lea eax, [esp + 0x18]
push eax
mov dword [edi], 0x494f4350
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 0x2c]
lea eax, [edi + 0x20]
lea edx, [ecx + ecx]
push eax
mov dword [edi + 4], edx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [edi + 0x10], eax
test eax, eax
je 0x40ddbf
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [edi + 8], eax
test eax, eax
je 0x40ddbf
call fcn.0040afa0
mov dword [edi + 0xc], eax
test eax, eax
je 0x40ddbf
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
je 0x40ddbf
push 1
lea ecx, [esp + 0xb]
push ecx
push 4
push 0xffff
push eax
mov byte [esp + 0x1b], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esp + 0x44]
xor eax, eax
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov dword [esp + 0x12], eax
mov word [esp + 0x16], ax
mov eax, dword [esp + 0x40]
mov edx, 2
push ecx
mov word [esp + 0xc], dx
mov dword [esp + 0x10], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [esp + 0xc]
mov word [esp + 0xe], ax
mov eax, dword [edi + 0x14]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x40ddbf
mov ecx, dword [edi + 0x14]
push bind
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x40ddbf
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [edi + 0x18], eax
test eax, eax
je 0x40ddbf
mov edx, dword [edi + 0x14]
push 8
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x40ddbf
push esi
xor esi, esi
cmp dword [edi + 4], esi
jbe 0x40dd9f
mov eax, dword [edi + 0xc]
push 0
push 0
push edi
push 0x40db70
push 0
push eax
call fcn.0040b050
inc esi
add esp, 0x18
cmp esi, dword [edi + 4]
jb 0x40dd81
mov ecx, dword [edi + 0xc]
push 0
push 0
push edi
push 0x40d540
push 0
push ecx
call fcn.0040b050
add esp, 0x18
pop esi
mov eax, edi
pop edi
add esp, 0x38
ret
call fcn.0040d220
xor eax, eax
pop edi
add esp, 0x38
ret