joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c1e0
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 0x40c3f7
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 0x40c3ea
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x300]
push edx
push 0x410548
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 0x40c3dd
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 0x40c3d0
cmp dword [ebp + 0xc], 0
je 0x40c3c6
mov dword [ebp - 0x350], 0
mov edx, 1
test edx, edx
je 0x40c3b9
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 0x40c35b
cmp dword [ebp - 0x754], 0
jne 0x40c35d
jmp 0x40c3b9
mov eax, dword [ebp - 0x350]
add eax, dword [ebp - 0x754]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.00408960
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 0x40c321
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x350]
mov dword [eax], ecx
jmp 0x40c3d0
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 0x40c410
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 0x40c43b
mov eax, dword [ebp - 0x408]
add eax, 1
mov dword [ebp - 0x408], eax
cmp dword [ebp - 0x408], 2
jge 0x40c4f4
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 0x40c476
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40c42c
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 0x40c4ef
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 0x40c4ef
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.0040b210
add esp, 8
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
jmp 0x40c42c
mov al, byte [ebp - 0x401]
mov esp, ebp
pop ebp
ret
Function at 0x40c500
Capabilities:
Create udp socket
Send data
Send data on socket
Send http request
Send http request with host header
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 0x40c661
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.00409340
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 0x40c655
mov dword [ebp - 0x3c], 0
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040c410
add esp, 8
movzx ecx, al
test ecx, ecx
jne 0x40c624
jmp 0x40c655
mov edx, dword [ebp - 4]
lea eax, [edx*4 + 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00408960
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 0x40c5fb
mov eax, dword [ebp - 0xc]
push eax
call fcn.00409400
add esp, 4
cmp dword [ebp - 8], 0
je 0x40c66f
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 0x40cce0
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 0x40cf11
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 0x40cf04
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 0x40cef7
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 0x40ceea
mov dword [ebp - 0x354], 0
mov edx, 1
test edx, edx
je 0x40cedf
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 0x40ce81
cmp dword [ebp - 0x75c], 0
jne 0x40ce83
jmp 0x40cedf
mov eax, dword [ebp - 0x354]
add eax, dword [ebp - 0x75c]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.00408960
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 0x40ce47
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 0x40d070
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0xa
lea eax, [ebp - 0xc]
push eax
push 7
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x10], 0x410358
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
mov al, byte [edx]
mov byte [ebp - 0x15], al
mov ecx, dword [ebp - 0x10]
cmp al, byte [ecx]
jne 0x40d0d3
cmp byte [ebp - 0x15], 0
je 0x40d0ca
mov edx, dword [ebp - 0x14]
mov al, byte [edx + 1]
mov byte [ebp - 0x16], al
mov ecx, dword [ebp - 0x10]
cmp al, byte [ecx + 1]
jne 0x40d0d3
add dword [ebp - 0x14], 2
add dword [ebp - 0x10], 2
cmp byte [ebp - 0x16], 0
jne 0x40d096
mov dword [ebp - 0x1c], 0
jmp 0x40d0db
sbb edx, edx
sbb edx, 0xffffffff
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40d0eb
mov al, 1
jmp 0x40d0ed
xor al, al
mov esp, ebp
pop ebp
ret

Function at 0x40d100
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
push 0
push 0
push 3
push 0
push 1
push connect
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x40d148
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x40d150
Capabilities:
Get file size
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
push edi
mov byte [ebp - 0x11], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
push 0
push 0
push 3
push 0
push 0
push connect
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x40d2a3
push 0
push 0
push 0
push 2
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40d299
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40d28f
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x100
jbe 0x40d285
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.0040afe0
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40d285
mov edx, dword [ebp - 8]
sub edx, 0x100
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x18], edx
jne 0x40d285
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x100
push ecx
push 0x10
mov edx, dword [ebp - 0x10]
add edx, 8
push edx
call fcn.0040a980
add esp, 0x10
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40d285
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.004092c0
add esp, 0xc
mov ecx, 4
lea edi, [ebp - 0x2c]
mov esi, dword [ebp - 0x10]
add esi, 8
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40d285
mov ecx, dword [ebp - 4]
push ecx
call fcn.00408a70
add esp, 4
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
je 0x40d2fd
push 0
push 0
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x40d2f1
mov byte [ebp - 0x11], 1
push 0
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 4]
push edx
call fcn.00408a70
add esp, 4
mov al, byte [ebp - 0x11]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40d310
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 0x40d37f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x40d3b6
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 0x40d3b4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x40d3b6
xor al, al
mov esp, ebp
pop ebp
ret

Function at 0x40d3c0
Capabilities:
Create http request
Get http content length
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov byte [ebp - 5], 0
push 0
push 0
push 0
push 1
push 0x410368
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40d458
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40d44e
mov dword [ebp - 0x14], 4
push 0
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x10]
push eax
push 0x20000005
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp dword [ebp - 0x10], 0x1388
jbe 0x40d444
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
cmp eax, dword [edx]
je 0x40d444
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
mov dword [ecx], edx
mov byte [ebp - 5], 1
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [ebp - 5]
mov esp, ebp
pop ebp
ret
Function at 0x40d820
Capabilities:
Create tcp socket
Create thread
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x14
xor eax, eax
test si, si
je 0x40d911
test edi, edi
je 0x40d911
push ebx
push 0x24
call fcn.00408900
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 0x40d87c
call fcn.0040dc80
xor ebx, ebx
test ebx, ebx
je 0x40d90e
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 0x40d8f4
call fcn.0040dc80
xor eax, eax
pop ebx
add esp, 0x14
ret
push 0
push 0
push ebx
push 0x40da50
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 0x40db50
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 0x40dc6a
cmp dword [ecx], 0x756470
jne 0x40dc6a
cmp dword [ebp + 0xc], 0
je 0x40dc6a
test esi, esi
je 0x40dc6a
lea edi, [esi + 4]
push edi
call fcn.00408920
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 0x40dc40
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 0x40dc38
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 0x40dbe6
mov ebx, dword [esp + 0x14]
push ebx
mov byte [esp + 0x17], 1
call fcn.00408a70
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x40dc59
mov ebx, dword [esp + 0x14]
push ebx
mov byte [esp + 0x17], 1
call fcn.00408a70
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.00408a70
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
sub esp, 0x10
push ebx
push 0x24
call fcn.00408900
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 0x40dd39
call fcn.0040dc80
xor ebx, ebx
test ebx, ebx
je 0x40dd9a
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 0x40dd7c
call fcn.0040dc80
xor eax, eax
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x18]
push 0
push 0
push ebx
push 0x40da50
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 0x40e540
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 0x40e5b0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40e5b0
cmp eax, 0x2733
jne 0x40e5b6
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 0x40e572
pop edi
pop ebp
mov al, 1
pop ebx
ret
pop edi
pop ebp
xor al, al
pop ebx
ret

Function at 0x40e6b0
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 0x40e732
mov edi, edi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40e732
cmp eax, 0x2733
jne 0x40e73b
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 0x40e6f0
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