joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404130
Capabilities:
Check if file exists
Create process on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f196
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x414084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x44c], esi
cmp dword [ebx + 0x10], edi
je 0x404357
xor eax, eax
push edi
mov word [ebp - 0x42c], ax
push ebx
or eax, 0xffffffff
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], edi
call fcn.00402ed0
mov dword [ebp - 4], edi
mov ecx, dword [ebx + 0x10]
mov edi, 8
cmp dword [ebx + 0x14], edi
jb 0x4041ad
mov eax, dword [ebx]
jmp 0x4041af
mov eax, ebx
mov edx, 0x5c
cmp dx, word [eax + ecx*2 - 2]
je 0x404208
push 0x412404
lea eax, [ebp - 0x448]
push ebx
push eax
call fcn.00403630
add esp, 0xc
mov edi, eax
lea esi, [ebp - 0x42c]
mov byte [ebp - 4], 1
call fcn.00402dc0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x434], 8
jb 0x4041fd
mov ecx, dword [ebp - 0x448]
push ecx
call fcn.00404547
add esp, 4
mov esi, dword [ebp - 0x44c]
mov edi, 8
push 9
mov eax, str.QTalk.exe
lea ecx, [ebp - 0x42c]
call fcn.00401240
mov eax, dword [ebp - 0x42c]
cmp dword [ebp - 0x418], edi
jae 0x40422e
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4042d0
cmp dword [ebx + 0x14], edi
jb 0x404246
mov ecx, dword [ebx]
jmp 0x404248
mov ecx, ebx
cmp dword [esi + 0x14], edi
jb 0x404251
mov eax, dword [esi]
jmp 0x404253
mov eax, esi
push 5
push ecx
push eax
push str.QTalk.exe
push 0x412408
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, ebx
call fcn.00401230
push eax
push str._r_nShellExecute
push 0x400
lea edx, [ebp - 0x410]
push 0x200
push edx
call fcn.00405312
mov edx, dword [0x415d78]
add esp, 0x14
test edx, edx
je 0x404340
lea eax, [ebp - 0x410]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4042a6
sub eax, esi
sar eax, 1
push edx
add eax, eax
push eax
lea ecx, [ebp - 0x410]
push 1
push ecx
call fcn.00404d57
mov edx, dword [0x415d78]
push edx
jmp 0x404338
mov eax, ebx
call fcn.00401230
push eax
push 0x412438
push 0x400
lea eax, [ebp - 0x410]
push 0x200
push eax
call fcn.00405312
mov esi, dword [0x415d78]
add esp, 0x14
test esi, esi
je 0x404340
lea eax, [ebp - 0x410]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404310
sub eax, edx
sar eax, 1
push esi
lea ecx, [eax + eax]
push ecx
lea edx, [ebp - 0x410]
push 1
push edx
call fcn.00404d57
mov eax, dword [0x415d78]
push eax
call fcn.00404a38
add esp, 0x14
cmp dword [ebp - 0x418], edi
jb 0x404357
mov ecx, dword [ebp - 0x42c]
push ecx
call fcn.00404547
add esp, 4
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.00404552
mov esp, ebp
pop ebp
ret

Function at 0x404552
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x414084]
jne 0x40455c
repz ret
jmp fcn.00405559
Function at 0x404b69
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x404b90
call fcn.004059da
mov dword [eax], esi
call fcn.004059c7
push 0x16
pop esi
mov dword [eax], esi
call fcn.00405975
mov eax, esi
jmp 0x404be5
test dword [ebp + 0xc], 0xfffffff9
jne 0x404b76
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404bbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004059ed
pop ecx
call fcn.004059c7
mov eax, dword [eax]
jmp 0x404be5
test al, 0x10
jne 0x404be3
test al, 1
je 0x404be3
test byte [ebp + 0xc], 2
je 0x404be3
call fcn.004059da
mov dword [eax], 5
call fcn.004059c7
mov dword [eax], 0xd
jmp 0x404bb4
xor eax, eax
pop esi
pop ebp
ret

Function at 0x40c29e
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x414084]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004089a8
and dword [ebp - 0x14], 0
cmp dword [0x415d50], 0
mov dword [ebp - 0x18], eax
jne 0x40c351
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40c3f9
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x40c3f9
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x415d50], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x415d54], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x415d58], eax
call edi
push eax
call esi
mov dword [0x415d60], eax
test eax, eax
je 0x40c351
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x415d5c], eax
mov eax, dword [0x415d5c]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40c3aa
cmp dword [0x415d60], ecx
je 0x40c3aa
push eax
call esi
push dword [0x415d60]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40c3aa
test ebx, ebx
je 0x40c3aa
call edi
test eax, eax
je 0x40c3a1
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40c3a1
test byte [ebp - 8], 1
jne 0x40c3aa
or dword [ebp + 0x10], 0x200000
jmp 0x40c3dd
mov eax, dword [0x415d54]
cmp eax, dword [ebp - 0x18]
je 0x40c3dd
push eax
call esi
test eax, eax
je 0x40c3dd
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40c3dd
mov eax, dword [0x415d58]
cmp eax, dword [ebp - 0x18]
je 0x40c3dd
push eax
call esi
test eax, eax
je 0x40c3dd
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x415d50]
call esi
test eax, eax
je 0x40c3f9
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40c3fb
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404552
leave
ret
Function at 0x401350
Capabilities:
Hide graphical window

Disassembly:
mov eax, dword [esp + 4]
push esi
push 0
push eax
push 0
push 0
push 0
push 0x80000000
push 0
push 0x80000000
push 0x82040000
push 0x408928
push 0x4088c0
push 0x80
mov dword [0x408924], eax
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
test esi, esi
jne 0x401391
pop esi
ret
push 0
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, 1
pop esi
ret

Function at 0x402bd0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x408ad4
push 0xf003f
push 0
push 0x4089b4
push 0x80000002
mov dword [0x408af8], 0
mov dword [0x408afc], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402c8a
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0x408290
push 0x4089b0
push 0x40828c
push eax
mov eax, dword [0x408ad4]
push str.RButtonX
push eax
call esi
test eax, eax
jne 0x402c77
mov edx, dword [0x408ad4]
mov ecx, dword [0x4089b0]
push 0x408290
push 0x4089b0
push 0x40828c
push eax
push str.RButtonY
push edx
mov dword [0x408af8], ecx
call esi
test eax, eax
jne 0x402c7c
mov ecx, dword [0x408ad4]
mov eax, dword [0x4089b0]
push ecx
mov dword [0x408afc], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
ret
call fcn.00402c90
mov ecx, dword [0x408ad4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
ret

Function at 0x403160
Capabilities:
Check os version

Disassembly:
sub esp, 0x9c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
mov dword [esp + 8], 0x9c
push eax
call esi
test eax, eax
jne 0x4031a1
lea ecx, [esp + 8]
mov dword [esp + 8], 0x94
push ecx
call esi
test eax, eax
je 0x403206
mov eax, dword [esp + 0x18]
dec eax
je 0x4031d6
dec eax
jne 0x403206
mov eax, dword [esp + 0xc]
cmp eax, 4
ja 0x4031be
mov dword [0x4089a8], 0
cmp eax, 5
jne 0x403206
pop edi
mov dword [0x4089a8], 4
pop esi
add esp, 0x9c
ret
mov eax, dword [esp + 0xc]
cmp eax, 4
ja 0x4031fc
jne 0x4031e9
mov eax, dword [esp + 0x10]
test eax, eax
ja 0x4031fc
pop edi
mov dword [0x4089a8], 1
pop esi
add esp, 0x9c
ret
mov dword [0x4089a8], 3
pop edi
pop esi
add esp, 0x9c
ret
Function at 0x404339
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x408718
cmp edx, dword [eax]
je 0x40435b
add eax, 8
inc ecx
cmp eax, 0x4087a8
jl 0x40434c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x408718]
jne 0x404489
mov eax, dword [0x408b20]
cmp eax, 1
je 0x404463
test eax, eax
jne 0x40438c
cmp dword [0x408454], 1
je 0x404463
cmp edx, 0xfc
je 0x404489
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4043c3
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004052c0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004053b0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x404406
lea eax, [ebp - 0x1a4]
push eax
call fcn.004053b0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x406564
push edi
call fcn.004057f0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004052c0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004052d0
lea eax, [ebp - 0xa0]
push 0x406544
push eax
call fcn.004052d0
push dword [esi + 0x40871c]
lea eax, [ebp - 0xa0]
push eax
call fcn.004052d0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00405765
add esp, 0x2c
pop edi
jmp 0x404489
lea eax, [ebp + 8]
lea esi, [esi + 0x40871c]
push 0
push eax
push dword [esi]
call fcn.004053b0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x4085f0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x4d1968]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp eax, 1
jne 0x408659
lea ecx, [ebp - 0x198]
push ecx
movzx edx, byte [ebp + 0xc]
and edx, 0xff
movzx eax, dl
movzx ecx, byte [ebp + 0x10]
and ecx, 0xff
movzx edx, cl
shl edx, 8
or eax, edx
push eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp - 0x19c]
push eax
mov ecx, dword [ebp + 8]
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00446530
mov esp, ebp
pop ebp
ret

Function at 0x408c40
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 4]
mov dword [ebp - 4], eax
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 8]
push ecx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0040c1b0
movzx ecx, al
test ecx, ecx
je 0x408c95
push 0
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x408cb8
push 0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
push 0x408cc0
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
push 0xffffffffffffffff
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esp, ebp
pop ebp
ret

Function at 0x408d40
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x408d81
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
call fcn.00408320
push eax
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.00409570
push 0x4bcf5c
lea ecx, [ebp - 0x10]
push ecx
call fcn.00407f60
add esp, 8
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x409760
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0xffffffff
je 0x40981f
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax]
and ecx, 3
je 0x4097b5
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx]
and eax, 8
je 0x4097b5
mov dword [ebp - 8], 0
lea ecx, [ebp - 8]
push ecx
push 0x8004667e
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax]
and ecx, 0xfffffffc
mov edx, dword [ebp + 0xc]
mov byte [edx], cl
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x409800
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
and edx, 8
je 0x409800
xor eax, eax
mov word [ebp - 0xc], ax
xor ecx, ecx
mov word [ebp - 0xa], cx
lea ecx, [ebp - 0x14]
call fcn.00407db0
lea edx, [ebp - 0x14]
push edx
push 4
lea eax, [ebp - 0xc]
push eax
push 0x80
push 0xffff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00409dc0
add esp, 0x1c
call fcn.00409750
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
push eax
call fcn.004150d0
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40983a
lea ecx, [ebp - 0x1c]
call fcn.00407db0
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
call fcn.00409750
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0x18]
push edx
push 0
push 0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
push eax
call fcn.004150d0
add esp, 8
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 0x18]
call fcn.0040e9b0
cmp eax, 0x40
jne 0x409a28
push 0x2746
mov ecx, dword [ebp + 0x18]
call fcn.004150a0
jmp 0x409a44
mov ecx, dword [ebp + 0x18]
call fcn.0040e9b0
cmp eax, 0x4d2
jne 0x409a44
push 0x274d
mov ecx, dword [ebp + 0x18]
call fcn.004150a0
cmp dword [ebp - 0xc], 0
je 0x409a4f
or eax, 0xffffffff
jmp 0x409a67
lea ecx, [ebp - 0x18]
call fcn.00407db0
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x409b90
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
call fcn.00409750
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0x18]
push edx
push 0
push 0
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_WSASend]
push eax
call fcn.004150d0
add esp, 8
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 0x18]
call fcn.0040e9b0
cmp eax, 0x40
jne 0x409bf8
push 0x2746
mov ecx, dword [ebp + 0x18]
call fcn.004150a0
jmp 0x409c14
mov ecx, dword [ebp + 0x18]
call fcn.0040e9b0
cmp eax, 0x4d2
jne 0x409c14
push 0x274d
mov ecx, dword [ebp + 0x18]
call fcn.004150a0
cmp dword [ebp - 0xc], 0
je 0x409c1f
or eax, 0xffffffff
jmp 0x409c37
lea ecx, [ebp - 0x18]
call fcn.00407db0
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x409d40
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
call fcn.00409750
mov eax, dword [ebp + 0x14]
push eax
push 1
push 0
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
push eax
call fcn.004150d0
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x409d7e
mov eax, dword [ebp - 4]
jmp 0x409db7
cmp dword [ebp + 8], 0x17
jne 0x409d9f
mov dword [ebp - 8], 0
push 4
lea ecx, [ebp - 8]
push ecx
push 0x1b
push 0x29
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [ebp - 0x10]
call fcn.00407db0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x40a030
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
cmp dword [ebp + 8], 0xffffffff
jne 0x40a054
push 0x2719
mov ecx, dword [ebp + 0xc]
call fcn.004150a0
or eax, 0xffffffff
jmp 0x40a12d
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x110], 0
jmp 0x40a079
mov eax, dword [ebp - 0x110]
add eax, 1
mov dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x110]
cmp ecx, dword [ebp - 0x108]
jae 0x40a09d
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp + edx*4 - 0x104]
cmp eax, dword [ebp + 8]
jne 0x40a09b
jmp 0x40a09d
jmp 0x40a06a
mov ecx, dword [ebp - 0x110]
cmp ecx, dword [ebp - 0x108]
jne 0x40a0d3
cmp dword [ebp - 0x108], 0x40
jae 0x40a0d3
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x104], eax
mov ecx, dword [ebp - 0x108]
add ecx, 1
mov dword [ebp - 0x108], ecx
xor edx, edx
jne 0x40a05e
call fcn.00409750
mov eax, dword [ebp + 0xc]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0x108]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_select]
push eax
call fcn.004150d0
add esp, 8
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0
jl 0x40a127
lea ecx, [ebp - 0x118]
call fcn.00407db0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10c]
mov esp, ebp
pop ebp
ret

Function at 0x40a140
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
cmp dword [ebp + 8], 0xffffffff
jne 0x40a164
push 0x2719
mov ecx, dword [ebp + 0xc]
call fcn.004150a0
or eax, 0xffffffff
jmp 0x40a23d
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x110], 0
jmp 0x40a189
mov eax, dword [ebp - 0x110]
add eax, 1
mov dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x110]
cmp ecx, dword [ebp - 0x108]
jae 0x40a1ad
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp + edx*4 - 0x104]
cmp eax, dword [ebp + 8]
jne 0x40a1ab
jmp 0x40a1ad
jmp 0x40a17a
mov ecx, dword [ebp - 0x110]
cmp ecx, dword [ebp - 0x108]
jne 0x40a1e3
cmp dword [ebp - 0x108], 0x40
jae 0x40a1e3
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x104], eax
mov ecx, dword [ebp - 0x108]
add ecx, 1
mov dword [ebp - 0x108], ecx
xor edx, edx
jne 0x40a16e
call fcn.00409750
mov eax, dword [ebp + 0xc]
push eax
push 0
push 0
lea ecx, [ebp - 0x108]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_select]
push eax
call fcn.004150d0
add esp, 8
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0
jl 0x40a237
lea ecx, [ebp - 0x118]
call fcn.00407db0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10c]
mov esp, ebp
pop ebp
ret
Function at 0x40a250
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
cmp dword [ebp + 8], 0xffffffff
jne 0x40a274
push 0x2719
mov ecx, dword [ebp + 0xc]
call fcn.004150a0
or eax, 0xffffffff
jmp 0x40a3d5
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x218], 0
jmp 0x40a299
mov eax, dword [ebp - 0x218]
add eax, 1
mov dword [ebp - 0x218], eax
mov ecx, dword [ebp - 0x218]
cmp ecx, dword [ebp - 0x210]
jae 0x40a2bd
mov edx, dword [ebp - 0x218]
mov eax, dword [ebp + edx*4 - 0x20c]
cmp eax, dword [ebp + 8]
jne 0x40a2bb
jmp 0x40a2bd
jmp 0x40a28a
mov ecx, dword [ebp - 0x218]
cmp ecx, dword [ebp - 0x210]
jne 0x40a2f3
cmp dword [ebp - 0x210], 0x40
jae 0x40a2f3
mov edx, dword [ebp - 0x218]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x20c], eax
mov ecx, dword [ebp - 0x210]
add ecx, 1
mov dword [ebp - 0x210], ecx
xor edx, edx
jne 0x40a27e
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x21c], 0
jmp 0x40a31c
mov eax, dword [ebp - 0x21c]
add eax, 1
mov dword [ebp - 0x21c], eax
mov ecx, dword [ebp - 0x21c]
cmp ecx, dword [ebp - 0x108]
jae 0x40a340
mov edx, dword [ebp - 0x21c]
mov eax, dword [ebp + edx*4 - 0x104]
cmp eax, dword [ebp + 8]
jne 0x40a33e
jmp 0x40a340
jmp 0x40a30d
mov ecx, dword [ebp - 0x21c]
cmp ecx, dword [ebp - 0x108]
jne 0x40a376
cmp dword [ebp - 0x108], 0x40
jae 0x40a376
mov edx, dword [ebp - 0x21c]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x104], eax
mov ecx, dword [ebp - 0x108]
add ecx, 1
mov dword [ebp - 0x108], ecx
xor edx, edx
jne 0x40a301
call fcn.00409750
mov eax, dword [ebp + 0xc]
push eax
push 0
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x210]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_select]
push eax
call fcn.004150d0
add esp, 8
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
jl 0x40a3cf
lea ecx, [ebp - 0x224]
call fcn.00407db0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x214]
mov esp, ebp
pop ebp
ret