joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405f10
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push str.IncomingTCP
mov dword [ebp - 4], 0
call fcn.00409ef0
add esp, 4
test eax, eax
mov dword [ebp - 0x10], eax
je 0x406061
push ebx
push edi
lea ecx, [ebp - 4]
push ecx
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
mov dword [ebp - 8], eax
je 0x406053
push esi
mov esi, dword [ebp - 8]
push 0xa
lea edx, [ebp - 0xc]
push edx
push esi
call fcn.00413d2e
mov ebx, eax
mov eax, dword [ebp - 0xc]
add esp, 0xc
test eax, eax
je 0x4060f5
cmp byte [eax], 0
jne 0x4060f5
cmp ebx, 1
jb 0x4060f5
cmp ebx, 0xffff
ja 0x4060f5
mov eax, dword [ebp - 4]
push 0x3a
push eax
call fcn.00413d60
mov esi, eax
add esp, 8
test esi, esi
je 0x406065
push 0xa
lea ecx, [ebp - 0xc]
push ecx
lea edx, [esi + 1]
push edx
call fcn.00413d2e
mov edi, eax
mov eax, dword [ebp - 0xc]
add esp, 0xc
test eax, eax
je 0x4060db
cmp byte [eax], 0
jne 0x4060db
cmp edi, 1
jb 0x4060db
cmp edi, 0xffff
ja 0x4060db
mov byte [esi], 0
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, eax
cmp esi, 0xffffffff
je 0x406082
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [0x41ff58]
movzx ecx, ax
push ecx
push 0xffffffffffffffff
push 0
push edx
push edi
call dword [sym.imp.WS2_32.dll_htons]
push eax
push esi
call fcn.0040b8c0
add esp, 0x18
test eax, eax
je 0x40609c
mov eax, dword [ebp - 8]
push eax
call fcn.00402836
mov ecx, dword [ebp - 4]
push ecx
call fcn.00402836
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
push edx
push eax
call fcn.00409fe0
add esp, 0x10
test eax, eax
mov dword [ebp - 8], eax
jne 0x405f50
pop esi
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409fb0
add esp, 4
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push ecx
push str._s_is_not_valid_TCP_destination_address_in_form_a.b.c.d:port_n
push 0x41f3d0
call fcn.00413a68
mov esi, 0x6c
jmp 0x40610a
mov edx, dword [ebp - 4]
push edx
push str._s_is_not_valid_TCP_destination_address_n
push 0x41f3d0
call fcn.00413a68
mov esi, 0x6a
jmp 0x40610a
push esi
call dword [sym.imp.WS2_32.dll_ntohl]
push edi
mov ecx, eax
and ecx, 0xff
push ecx
mov ecx, eax
movzx edx, ah
push edx
shr ecx, 0x10
movzx ecx, cl
push ecx
mov dword [ebp - 0x14], eax
shr eax, 0x18
push eax
push ebx
push str.Cannot_create_TCP_forwarding_entry_for__lu____u._u._u._u:_lu_n
push 0x41f3d0
call fcn.00413a68
add esp, 0x20
mov esi, 0x69
jmp 0x40610d
mov edx, dword [ebp - 4]
push edx
push str._s_does_not_contain_valid_TCP_port_number_n
push 0x41f3d0
call fcn.00413a68
mov esi, 0x6b
jmp 0x40610a
push esi
push str._s_is_not_valid_TCP_port_number_n
push 0x41f3d0
call fcn.00413a68
mov esi, 0x6d
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409fb0
mov eax, dword [0x41ff50]
add esp, 4
test eax, eax
je 0x406135
push eax
call fcn.00417bca
add esp, 4
mov dword [0x41ff50], 0
call fcn.004077a0
call fcn.00408ce0
mov ecx, dword [ebp - 8]
push ecx
call fcn.00402836
mov edx, dword [ebp - 4]
push edx
call fcn.00402836
add esp, 8
push esi
call fcn.0040135c
int3
Function at 0x406160
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
push ebx
push eax
mov dword [ebp - 4], 0
call fcn.00409ef0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x406227
cmp byte [edi], 0x40
jae 0x406204
push esi
lea ebx, [ebx]
lea ecx, [ebp - 4]
push ecx
push ebx
call fcn.00409fe0
mov esi, eax
add esp, 8
test esi, esi
je 0x406203
push str.port
push esi
call fcn.00413a25
add esp, 8
test eax, eax
jne 0x4061eb
mov eax, dword [ebp - 4]
push 0xa
lea edx, [ebp - 8]
push edx
push eax
call fcn.00413d2e
mov ecx, dword [ebp - 8]
add esp, 0xc
test ecx, ecx
je 0x40622c
cmp byte [ecx], 0
jne 0x40622c
cmp eax, 1
jb 0x40622c
cmp eax, 0xffff
ja 0x40622c
movzx ecx, byte [edi]
mov edx, dword [ebp + 0xc]
mov word [edx + ecx*2], ax
inc byte [edi]
push esi
call fcn.00402836
mov eax, dword [ebp - 4]
push eax
call fcn.00402836
mov al, byte [edi]
add esp, 8
cmp al, 0x40
jb 0x406190
pop esi
push ebx
call fcn.00409fb0
mov ecx, dword [ebp + 8]
push 0
push str.autodetect
push ecx
call fcn.0040a630
add esp, 0x10
test eax, eax
mov eax, dword [ebp + 0x10]
setne dl
mov byte [eax], dl
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
push ecx
push edx
push str.The_specified_port:__s_in_section__s_is_not_a_valid_port_number_n
push 0x41f3d0
call fcn.00413a68
push esi
call fcn.00402836
mov eax, dword [ebp - 4]
push eax
call fcn.00402836
push ebx
call fcn.00409fb0
mov eax, dword [0x41ff50]
add esp, 0x1c
test eax, eax
je 0x406277
push eax
call fcn.00417bca
add esp, 4
mov dword [0x41ff50], 0
call fcn.004077a0
call fcn.00408ce0
push 0x83
call fcn.0040135c
int3

Function at 0x406570
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
mov ecx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
push ecx
lea edx, [ebp - 0x400]
push 0x400
push edx
call fcn.00417a30
lea eax, [ebp - 0x400]
push eax
push str.VMware_NAT_Panic:__s_n
push 1
call fcn.00404f40
add esp, 0x1c
push 0xff
call fcn.0040135c
int3
Function at 0x408f20
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push eax
mov word [ebp - 0x10], 2
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [ebp + 8]
push ecx
mov dword [ebp - 0xc], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esi + 0x74]
push 0x10
lea edx, [ebp - 0x10]
push edx
mov edx, dword [esi + 0x20]
push 0
mov word [ebp - 0xe], ax
mov eax, dword [esi + 0x78]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x408f8d
mov eax, dword [esi + 0x4c]
push 0x2750
push eax
call fcn.0040fdb0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x4c]
push eax
push ecx
call fcn.0040fdb0
add esp, 8
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x409140
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
mov edi, eax
mov eax, 0xff
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 8]
push eax
push 1
xor esi, esi
push esi
push str.SYSTEMCurrentControlSetServicesTcpipParametersTransient
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x4091ba
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x114]
push edx
push eax
push eax
mov eax, dword [ebp - 8]
push str.NameServer
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4091ba
mov eax, dword [ebp - 0x14]
cmp eax, 7
jbe 0x4091ba
mov edx, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x114]
push ecx
push edi
push edx
call fcn.00408d70
add esp, 0x10
mov esi, eax
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 4]
push ecx
push 1
push 0
push str.SYSTEMCurrentControlSetServicesTcpipParameters
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x409254
mov ecx, dword [ebp - 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x114]
push eax
push 0
push 0
push str.NameServer
push ecx
call ebx
test eax, eax
jne 0x409208
mov eax, dword [ebp - 0xc]
cmp eax, 7
ja 0x40922e
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x114]
push eax
push 0
push 0
push str.DhcpNameServer
push ecx
call ebx
test eax, eax
jne 0x40924a
mov eax, dword [ebp - 0x10]
cmp eax, 7
jbe 0x40924a
push eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x114]
push edx
sub edi, esi
lea ecx, [eax + esi*4]
push edi
push ecx
call fcn.00408d70
add esp, 0x10
add esi, eax
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409630
Capabilities:
Create raw socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x42019c]
test eax, eax
jne 0x409668
mov eax, 0x18
mov ecx, 0x420184
call fcn.00409260
test eax, eax
jl 0x409659
je 0x409659
mov dword [0x42019c], eax
test eax, eax
mov byte [0x4201b0], 0
jle 0x4097e4
push ebx
push 0x7c
call fcn.004028e0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4097e3
push esi
push edi
push fcn.004090e0
xor eax, eax
push 0x408fa0
mov ecx, 0x1f
mov edi, ebx
push ebx
rep stosd dword es:[edi], eax
call fcn.004075d0
mov esi, dword [ebp + 8]
mov dword [ebx + 0x38], ebx
mov ecx, dword [0x41f2ec]
lea eax, [ebx + 0x30]
mov dword [eax + 4], ecx
mov dword [eax], 0x41f2e8
mov edx, dword [0x41f2ec]
mov dword [edx], eax
mov dword [0x41f2ec], eax
mov edx, dword [esi + 0x2c]
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
push edx
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
call fcn.004028e0
add esp, 0x10
test eax, eax
mov dword [ebx + 0x74], eax
je 0x4097a3
mov ecx, dword [esi + 0x2c]
mov esi, dword [esi + 0x44]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 0x2c]
mov dword [ebx + 0x78], ecx
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
mov dword [ebx + 0x3c], edx
mov edx, dword [ebp - 8]
movzx esi, word [edx]
mov dword [ebx + 0x40], esi
mov ecx, dword [ecx + 0x10]
mov dword [ebx + 0x44], ecx
movzx edx, word [edx + 2]
mov dword [ebx + 0x48], edx
mov ecx, dword [eax + 0x3c]
push ebx
inc ecx
lea edi, [ebx + 0x58]
push 0x409420
mov dword [eax + 0x3c], ecx
push edi
mov dword [ebx + 0x4c], eax
call fcn.004097f0
add esp, 0xc
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebx + 0x20], eax
je 0x4097a3
push eax
mov byte [ebx + 0x1c], 1
call fcn.00405650
mov eax, dword [0x41ff58]
add esp, 4
push 0
mov word [ebp - 0x18], 2
mov dword [ebp - 0x14], eax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x10
lea ecx, [ebp - 0x18]
mov word [ebp - 0x16], ax
mov edx, dword [ebx + 0x20]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x4097a3
mov eax, ebx
call fcn.00409310
test eax, eax
jl 0x4097a3
push ebx
call fcn.004072c0
add esp, 4
test eax, eax
je 0x4097b3
push ebx
call fcn.004090e0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x21
mov esi, ebx
call fcn.0040a690
mov edx, dword [0x4201a8]
imul edx, edx, 0x3e8
lea ecx, [ebx + 0x64]
mov eax, 0x420b58
call fcn.00408ca0
push edi
call fcn.00409810
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409b00
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
push edi
mov byte [ebp - 0x104], 0
xor eax, eax
mov ecx, 0x40
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.shfolder.dll
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x409b4c
push str.SHGetFolderPathA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x409b54
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x104]
push ecx
push 0
push 0
push 0x8023
push 0
call eax
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
jne 0x409b4c
lea eax, [ebp - 0x104]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409b80
sub eax, edx
mov edx, 0x103
sub edx, eax
push edx
push str.VMware
lea eax, [ebp - 0x104]
push 0x104
push eax
call fcn.00417ad0
lea ecx, [ebp - 0x104]
push 0
push ecx
call fcn.0041805f
add esp, 0x18
test eax, eax
je 0x409bd3
push 0
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x409b4c
lea ecx, [ebp - 0x104]
call fcn.00409ac0
test al, al
je 0x409b4c
lea eax, [ebp - 0x104]
push eax
call fcn.00417bcf
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x409c00
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push edi
xor eax, eax
mov byte [ebp - 0x10c], 0
mov ecx, 0x40
lea edi, [ebp - 0x10b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServicesVMware_NAT_ServiceParameters
push reloc.WS2_32.dll_bind
mov dword [ebp - 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
pop edi
je 0x409c53
call fcn.00409b00
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
push esi
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x10c]
push edx
push 0
push 0
push str.ConfigPath
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x409cb4
call fcn.00409b00
mov esi, eax
test esi, esi
je 0x409cc5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409c84
mov ecx, dword [ebp - 4]
sub eax, edx
inc eax
push eax
push esi
push 1
push 0
push str.ConfigPath
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x10c]
push edx
call fcn.00417bcf
add esp, 4
mov esi, eax
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40b050
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push 0x80
call fcn.004028e0
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
jne 0x40b078
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push fcn.0040ad60
push 0x40abf0
push esi
call fcn.004075d0
mov cx, word [ebp + 0xc]
lea eax, [esi + 0x48]
mov dword [eax], eax
mov dword [esi + 0x4c], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x54], eax
mov dword [esi + 0x38], esi
mov dword [esi + 0x44], esi
mov word [esi + 0x58], cx
mov word [esi + 0x6c], bx
mov word [esi + 0x70], bx
mov word [esi + 0x6e], bx
mov dword [esi + 0x74], 0xffffffff
mov edx, dword [0x420b58]
mov dword [esi + 0x78], edx
mov byte [esi + 0x7c], bl
mov ecx, dword [0x41f314]
add esp, 0xc
lea eax, [esi + 0x30]
mov dword [eax + 4], ecx
mov dword [eax], 0x41f310
mov edx, dword [0x41f314]
push 0x11
mov edi, 2
push edi
mov dword [edx], eax
push edi
mov dword [0x41f314], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x20], eax
je 0x40b15b
push 4
push 0x41c630
push 0x20
push 0xffff
push eax
mov byte [esi + 0x1c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp + 0x10]
mov cx, word [ebp + 0x14]
push 0x10
lea edx, [ebp - 0x10]
mov word [ebp - 0x10], di
mov dword [ebp - 0xc], eax
mov word [ebp - 0xe], cx
mov eax, dword [esi + 0x20]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x40b15b
mov edx, dword [esi + 0x20]
lea ecx, [esi + 0x5c]
push ecx
push edx
call fcn.00405600
push esi
call fcn.004072c0
add esp, 0xc
test eax, eax
je 0x40b16d
mov edi, 1
push esi
call fcn.0040ad60
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x21
call fcn.0040a690
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
mov dx, word [edx + 4]
mov word [eax + 0x6c], dx
mov dx, word [ecx + 4]
mov word [eax + 0x70], dx
mov cx, word [ecx + 6]
mov edx, dword [eax + 0x74]
mov word [eax + 0x6e], cx
mov ecx, dword [esi + 0x28]
cmp edx, ecx
je 0x40b231
mov dword [eax + 0x74], ecx
mov edx, dword [ebp + 8]
mov cx, word [ebp + 0xc]
mov eax, dword [eax + 0x20]
push 0x10
mov dword [ebp - 0xc], edx
lea edx, [ebp - 0x10]
push edx
mov edx, dword [esi + 0x44]
push 0
mov word [ebp - 0xe], cx
mov ecx, dword [esi + 0x2c]
push ecx
push edx
push eax
mov word [ebp - 0x10], 2
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x40b273
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
call fcn.0040fdb0
add esp, 8
mov esp, ebp
pop ebp
ret
Function at 0x40b8c0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push 0x58
call fcn.004028e0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40b8dc
pop esi
mov esp, ebp
pop ebp
ret
push edi
push 0x40b7f0
push 0x40b820
push esi
call fcn.004075d0
mov eax, dword [ebp + 8]
mov cx, word [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [esi + 0x3c], eax
mov ax, word [ebp + 0x14]
mov word [esi + 0x40], cx
mov ecx, dword [ebp + 0x18]
mov dword [esi + 0x54], 0x40c860
mov dword [esi + 0x50], 0
mov dword [esi + 0x44], edx
mov word [esi + 0x48], ax
mov dword [esi + 0x4c], ecx
mov dword [esi + 0x38], esi
mov edx, dword [0x41f328]
add esp, 0xc
lea edi, [esi + 0x30]
mov dword [edi + 4], edx
mov dword [edi], 0x41f324
mov eax, dword [0x41f328]
push 6
push 1
mov dword [eax], edi
push 2
mov dword [0x41f328], edi
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x20], eax
je 0x40b9c3
push eax
mov byte [esi + 0x1c], 1
call fcn.00405650
mov ecx, dword [esi + 0x20]
add esp, 4
push 4
push 0x41c6b4
push 4
push 0xffff
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [0x41ff58]
mov ax, word [ebp + 0x1c]
push 0x10
lea ecx, [ebp - 0x10]
mov word [ebp - 0x10], 2
mov dword [ebp - 0xc], edx
mov word [ebp - 0xe], ax
mov edx, dword [esi + 0x20]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x40b9c3
mov eax, dword [esi + 0x20]
push 0x14
push eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x40b9c3
push esi
call fcn.004072c0
add esp, 4
test eax, eax
je 0x40b9e2
mov eax, dword [edi + 4]
mov edi, dword [edi]
mov dword [edi + 4], eax
push esi
mov dword [eax], edi
call dword [esi + 0x54]
push esi
call fcn.00402836
add esp, 8
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 0x28
call fcn.0040a690
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40d510
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, eax
push edi
mov eax, 0x32
mov dword [esi + 0xd4], 0x1003
call fcn.0040a690
mov eax, dword [esi + 0x44]
cmp eax, dword [0x420c88]
mov word [ebp - 0x14], 2
mov dword [ebp - 0x10], eax
jne 0x40d54a
mov eax, dword [0x420c80]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x20]
mov cx, word [esi + 0x48]
push 0x10
lea edx, [ebp - 0x14]
push edx
push eax
mov word [ebp - 0x12], cx
call dword [sym.imp.WS2_32.dll_connect]
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x14]
mov edi, eax
mov eax, dword [esi + 0x20]
push edx
push eax
mov dword [ebp - 4], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test edi, edi
mov ecx, dword [ebp - 0x10]
mov dx, word [ebp - 0x12]
mov dword [esi + 0x4c], ecx
mov word [esi + 0x50], dx
jne 0x40d5c2
push ebx
mov eax, 0x21
mov dword [esi + 0xd4], 3
call fcn.0040a690
lea eax, [esi + 0x104]
call fcn.0040c440
push 1
mov ebx, esi
call fcn.0040d090
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x2733
je 0x40d5df
call edi
cmp eax, 0x2748
je 0x40d5df
call fcn.0040cc70
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40e710
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
mov esi, ecx
test byte [eax + 4], 0x12
push edi
je 0x40e724
mov eax, 0x12
call fcn.0040ba00
mov ecx, dword [esi + 0x5c]
mov eax, dword [esi + 0x50]
cmp ecx, eax
jae 0x40e774
mov edx, dword [esi + 0x4c]
push 0
sub eax, ecx
push eax
mov eax, dword [esi + 0x20]
add edx, ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x40e771
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x2733
je 0x40e765
call edi
cmp eax, 0x2733
je 0x40e765
pop edi
or eax, 0xffffffff
pop esi
ret
mov edx, 0x12
call fcn.0040ba80
jmp 0x40e774
add dword [esi + 0x5c], eax
mov ecx, dword [esi + 0x5c]
cmp ecx, dword [esi + 0x50]
jb 0x40e7ae
lea edx, [esi + 0x4c]
push edx
call fcn.004109d0
mov eax, dword [esi + 0x60]
add esp, 4
test eax, eax
mov dword [esi + 0x5c], 0
je 0x40e7a4
push esi
call fcn.00407600
add esp, 4
pop edi
xor eax, eax
pop esi
ret
mov edx, 0x21
call fcn.0040ba80
pop edi
xor eax, eax
pop esi
ret

Function at 0x40ea80
Capabilities:
Create tcp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push 0
push str.configport
push str.host
call fcn.0040a630
mov ebx, eax
add esp, 0xc
cmp ebx, 1
jb 0x40eb81
cmp ebx, 0xffff
ja 0x40eb81
push esi
push 0x34
call fcn.004028e0
mov esi, eax
add esp, 4
test esi, esi
je 0x40eb80
push edi
push fcn.0040ea40
xor eax, eax
push 0x40e970
mov ecx, 0xd
mov edi, esi
push esi
rep stosd dword es:[edi], eax
call fcn.004075d0
add esp, 0xc
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x20], eax
pop edi
je 0x40eb67
push eax
mov byte [esi + 0x1c], 1
call fcn.00405650
mov eax, dword [esi + 0x20]
add esp, 4
push 4
push 0x41c830
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [0x41ff58]
push ebx
mov word [ebp - 0x10], 2
mov dword [ebp - 0xc], ecx
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [ebp - 0x10]
mov word [ebp - 0xe], ax
mov eax, dword [esi + 0x20]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x40eb67
mov ecx, dword [esi + 0x20]
push 0xa
push ecx
call dword [sym.imp.WS2_32.dll_listen]
push esi
call fcn.004072c0
add esp, 4
test eax, eax
jge 0x40eb76
push esi
call fcn.0040ea40
add esp, 4
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, 0x28
call fcn.0040ba80
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ec20
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov al, byte [esi + 0x60]
test al, al
je 0x40ec3b
mov ecx, dword [0x4209f8]
test ecx, ecx
jle 0x40ecbd
test al, al
push edi
je 0x40ec5c
mov eax, dword [0x4209fc]
mov edi, dword [eax*4 + 0x4209e8]
push 0x89
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
jmp 0x40ec63
mov edi, dword [esi + 0x54]
movzx eax, word [esi + 0x58]
push 0x10
mov word [ebp - 0xe], ax
mov eax, dword [esi + 0x64]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [esi + 0x20]
mov word [ebp - 0x10], 2
mov dword [ebp - 0xc], edi
mov edx, dword [eax + 0x2c]
mov eax, dword [eax + 0x44]
push 0
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
pop edi
jge 0x40ecbd
mov edx, dword [esi + 0x64]
push 0x2750
push edx
call fcn.0040fdb0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi + 0x64]
push eax
call fcn.0040fdb0
add esp, 8
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret