joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40ada0
Capabilities:
Query or enumerate registry value

Disassembly:
push esi
mov esi, ecx
call fcn.0040aac0
mov ecx, esi
pop esi
jmp fcn.0040ab80

Function at 0x40b650
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x443fb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
mov ebp, ecx
push esi
lea esi, [ebp + 0x3c]
mov ecx, esi
mov dword [esp + 0xc], esi
call fcn.004285a0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebp + 0x34]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x10], ebx
jne 0x40b6be
mov ecx, esi
mov dword [esp + 0x1c], 0xffffffff
call fcn.004285b0
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 0x10
mov eax, dword [ebp + 0x30]
push edi
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push ebx
push eax
call edi
mov esi, eax
test esi, esi
jne 0x40b701
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
call fcn.004285b0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 0x10
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebp + 0x30]
push 2
push 0
push 0
push 0
push 0
push ecx
push 0
push 0
push edx
call dword [sym.imp.USER32.dll_DrawIconEx]
mov eax, dword [ebp + 0x30]
push esi
push eax
call edi
push 0x42c
push 1
call fcn.00432e84
mov ebx, eax
mov eax, dword [esp + 0x38]
lea esi, [ebp + 0x68]
mov ecx, 0x10b
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x30]
mov dword [ebx + 4], eax
imul eax, esi
add eax, eax
add eax, eax
push eax
mov ecx, esi
neg ecx
push 0
push edi
mov dword [ebx + 8], ecx
call fcn.004326b0
mov edx, dword [ebp + 0x30]
add esp, 0x14
push 0
push ebx
push edi
mov edi, dword [esp + 0x20]
push esi
push 0
push edi
push edx
call dword [sym.imp.GDI32.dll_GetDIBits]
push ebx
mov esi, eax
call fcn.00431f74
add esp, 4
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x10]
xor eax, eax
test esi, esi
setne al
mov dword [esp + 0x20], 0xffffffff
mov esi, eax
call fcn.004285b0
mov ecx, dword [esp + 0x18]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 0x10
Function at 0x40b8c0
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
mov eax, dword [ecx + 0xc]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40b927
call dword [sym.imp.USER32.dll_EmptyClipboard]
test eax, eax
je 0x40b927
push edi
mov edi, dword [esp + 8]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40b8e2
sub eax, edx
push esi
lea ecx, [eax + eax + 1]
push ecx
push 0x2002
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x40b925
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push edi
push eax
call fcn.0040b820
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
pop esi
pop edi
call dword [sym.imp.USER32.dll_CloseClipboard]
ret 4
Function at 0x40ed20
Capabilities:
Check mutex on windows

Disassembly:
push esi
push str.WinVNC_Win32_Instance_Mutex
push 0
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [esi], eax
pop esi
jne 0x40ed3a
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov eax, ecx
ret

Function at 0x40ed70
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
js 0x40edd8
mov ecx, dword [esi + 0xc]
test ecx, ecx
push ebx
mov bl, byte [esi]
push edi
mov edi, dword [esi + 4]
mov byte [esp + 0xc], bl
je 0x40eda0
mov edx, dword [ecx]
mov eax, dword [edx + 0x214]
push 1
call eax
push 0
push edi
movzx ecx, bl
push 0
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov edx, dword [esp + 0x14]
push eax
push edx
call dword [sym.imp.USER32.dll_keybd_event]
mov eax, dword [esi]
push eax
push str.fake__d_down_n
push 9
push 0x457788
call fcn.00401860
add esp, 0x10
pop edi
mov byte [esi + 8], 1
pop ebx
pop esi
pop ecx
ret

Function at 0x40ede0
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi]
push eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jns 0x40ee4b
mov ecx, dword [esi + 0xc]
push ebx
mov bl, byte [esi]
push edi
mov edi, dword [esi + 4]
or edi, 2
test ecx, ecx
mov byte [esp + 0xc], bl
je 0x40ee13
mov edx, dword [ecx]
mov eax, dword [edx + 0x214]
push 1
call eax
push 0
push edi
movzx ecx, bl
push 0
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov edx, dword [esp + 0x14]
push eax
push edx
call dword [sym.imp.USER32.dll_keybd_event]
mov eax, dword [esi]
push eax
push str.fake__d_up_n
push 9
push 0x457788
call fcn.00401860
add esp, 0x10
pop edi
mov byte [esi + 9], 1
pop ebx
pop esi
pop ecx
ret

Function at 0x40ee50
Capabilities:
Log keystrokes

Disassembly:
push ecx
push ebx
push esi
mov esi, ecx
cmp byte [esi + 8], 0
push edi
je 0x40eeb2
mov edi, dword [esi + 4]
mov ecx, dword [esi + 0xc]
mov bl, byte [esi]
or edi, 2
test ecx, ecx
mov byte [esp + 0xc], bl
je 0x40ee7b
mov eax, dword [ecx]
mov edx, dword [eax + 0x214]
push 1
call edx
push 0
push edi
movzx eax, bl
push 0
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USER32.dll_keybd_event]
mov edx, dword [esi]
push edx
push str.fake__d_up_n
push 9
push 0x457788
call fcn.00401860
add esp, 0x10
pop edi
pop esi
pop ebx
pop ecx
ret
cmp byte [esi + 9], 0
je 0x40ef06
mov ecx, dword [esi + 0xc]
test ecx, ecx
mov bl, byte [esi]
mov edi, dword [esi + 4]
mov byte [esp + 0xc], bl
je 0x40eed4
mov eax, dword [ecx]
mov edx, dword [eax + 0x214]
push 1
call edx
push 0
push edi
movzx eax, bl
push 0
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USER32.dll_keybd_event]
mov edx, dword [esi]
push edx
push str.fake__d_down_n
push 9
push 0x457788
call fcn.00401860
add esp, 0x10
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x40ef10
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push esi
push edi
movzx edi, bl
push edi
call ebp
mov esi, dword [esp + 0x18]
shr eax, 0xf
and eax, 1
je 0x40ef40
test esi, esi
jne 0x40efad
mov ecx, 0x449150
mov eax, str.down
jmp 0x40ef4e
test esi, esi
je 0x40efad
mov ecx, str.down
mov eax, 0x449150
push ecx
push eax
push edi
push str.._vncKeymap.cpp:_tsetshiftstate__d_____s___s__n
push 9
push 0x457788
call fcn.00401860
add esp, 0x18
neg esi
sbb esi, esi
push 0
and esi, 0xfffffffe
add esi, 2
push esi
push 0
push edi
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
push eax
push ebx
call dword [sym.imp.USER32.dll_keybd_event]
push edi
call ebp
test eax, 0x8000
mov eax, str.down
jne 0x40ef97
mov eax, 0x449150
push eax
push edi
push str.._vncKeymap.cpp:_tnew_state__d___s__n
push 9
push 0x457788
call fcn.00401860
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x410750
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x10c
push 0x100
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.WSOCK32.dll_gethostname]
test eax, eax
je 0x41078e
mov ecx, dword [esp + 0x114]
mov edx, dword [esp + 0x110]
push ecx
push str.Host_name_unavailable
push edx
call fcn.00431e50
add esp, 0xc
add esp, 0x10c
ret
push ebp
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ebp, eax
test ebp, ebp
jne 0x4107c5
mov ecx, dword [esp + 0x118]
mov edx, dword [esp + 0x114]
push ecx
push str.IP_address_unavailable
push edx
call fcn.00431e50
add esp, 0xc
pop ebp
add esp, 0x10c
ret
push edi
mov edi, dword [esp + 0x118]
mov byte [edi], 0
mov eax, dword [ebp + 0xc]
cmp dword [eax], 0
mov dword [esp + 8], 0
je 0x4108ad
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp word [ebp + 0xa], si
jle 0x410843
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebx + ecx]
movzx eax, byte [edx + esi]
push eax
lea ecx, [esp + 0x18]
push 0x449278
push ecx
call fcn.004324fb
mov eax, edi
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x410812
sub eax, edx
mov edx, dword [esp + 0x124]
sub edx, eax
sub edx, 1
push edx
lea eax, [esp + 0x18]
push eax
push edi
call fcn.00434c20
movsx ecx, word [ebp + 0xa]
add esi, 1
add esp, 0xc
cmp esi, ecx
jl 0x4107f0
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x410848
sub eax, edx
mov byte [edi + eax - 1], cl
mov edx, dword [ebp + 0xc]
cmp dword [ebx + edx + 4], 0
je 0x41088c
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x410866
mov ecx, dword [esp + 0x124]
sub eax, edx
sub ecx, eax
sub ecx, 1
push ecx
push 0x449274
push edi
call fcn.00434c20
add esp, 0xc
mov eax, dword [esp + 0x10]
mov edx, dword [ebp + 0xc]
add eax, 1
lea ebx, [eax*4]
cmp dword [ebx + edx], 0
mov dword [esp + 0x10], eax
jne 0x4107e8
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x10c
ret
Function at 0x415e10
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x200
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x214]
push 0xff
lea eax, [esp + 0x14]
push edi
push eax
call fcn.00431e50
mov eax, edi
add esp, 0xc
mov byte [esp + 0x10f], 0
xor esi, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x415e43
sub eax, edx
test eax, eax
jle 0x415e7f
movsx ecx, byte [esp + esi + 0x10]
push ecx
call fcn.00432d3f
mov byte [esp + esi + 0x14], al
mov eax, edi
add esp, 4
add esi, 1
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x415e70
sub eax, edx
cmp esi, eax
jl 0x415e52
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
test edi, edi
je 0x415f42
mov ebp, dword [sym.imp.USER32.dll_GetWindowTextA]
jmp 0x415ea0
push 0x100
lea edx, [esp + 0x114]
push edx
push edi
call ebp
mov ebx, eax
xor esi, esi
test ebx, ebx
jle 0x415edf
jmp 0x415ec0
movsx eax, byte [esp + esi + 0x110]
push eax
call fcn.00432d3f
mov byte [esp + esi + 0x114], al
add esi, 1
add esp, 4
cmp esi, ebx
jl 0x415ec0
push 0xfffffffffffffff0
push edi
call dword [sym.imp.USER32.dll_GetWindowLongA]
test eax, 0x10000000
je 0x415f08
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x114]
push edx
call fcn.00434d60
add esp, 8
test eax, eax
jne 0x415f19
push 2
push edi
call dword [sym.imp.USER32.dll_GetWindow]
mov edi, eax
test edi, edi
jne 0x415ea0
jmp 0x415f42
push edi
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x415f37
push 0
push 0xf120
push 0x112
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
push edi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
test edi, edi
jne 0x415f57
mov eax, dword [str.WinVNC]
push 0x30
push eax
push str.Unable_to_find_a_window_with_the_specified_title.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret
Function at 0x416bd0
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x108
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.winvnc
push 0
mov dword [0x457c94], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
mov eax, dword [0x457c94]
push eax
push str.winvnc
lea ecx, [esp + 0x14]
push str._.200s_error:__d
push ecx
call fcn.004324fb
mov eax, dword [esp + 0x120]
add esp, 0x10
test esi, esi
lea edx, [esp + 0xc]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
je 0x416c4e
push 0
call dword [sym.imp.USER32.dll_MessageBeep]
push 0
lea ecx, [esp + 8]
push ecx
push 0
push 2
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
add esp, 0x108
ret

Function at 0x416c60
Capabilities:
Get session user name

Disassembly:
push ecx
cmp dword [0x457c84], 2
jne 0x416cf6
call fcn.00416190
test eax, eax
je 0x416cf6
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
test eax, eax
jne 0x416c85
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push ecx
push 0
push 0
push 4
push eax
call dword [sym.imp.USER32.dll_GetUserObjectInformationA]
cmp dword [esp], 0
jne 0x416cd8
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov edx, dword [0x457c90]
push edx
mov dword [0x457c8c], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0xc], 0
mov dword [0x457c90], 0
jbe 0x416c81
mov eax, dword [esp + 8]
mov byte [eax], 0
mov eax, 1
pop ecx
ret
cmp dword [0x457c8c], 0
jne 0x416cf6
cmp dword [esp + 0xc], 0
jbe 0x416c81
mov ecx, dword [esp + 8]
mov byte [ecx], 0
mov eax, 1
pop ecx
ret
mov edx, dword [0x457c84]
add edx, 0xffffffff
cmp edx, 1
ja 0x416c81
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
lea eax, [esp + 8]
push eax
push edi
mov dword [esp + 0x10], esi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x416d65
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
cmp eax, 0x4dd
jne 0x416d47
test esi, esi
jbe 0x416d5e
pop ebp
mov byte [edi], 0
pop edi
mov eax, 1
pop esi
pop ecx
ret
call ebp
push eax
push str.._vncService.cpp:_tGetUserName___failed__error_d_n
push 0
push 0x457788
call fcn.00401860
add esp, 0x10
pop ebp
pop edi
xor eax, eax
pop esi
pop ecx
ret
pop edi
mov eax, 1
pop esi
pop ecx
ret

Function at 0x417280
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
push esi
lea eax, [esp + 4]
push eax
push 2
mov esi, ecx
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
mov eax, esi
je 0x4172aa
mov dword [esi], 0
pop esi
add esp, 0x190
ret
mov cx, word [esp + 4]
mov dword [esi], 0xffffffff
mov word [0x457ca4], cx
pop esi
add esp, 0x190
ret
Function at 0x417380
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x10
push edi
mov edi, ecx
xor eax, eax
cmp dword [edi + 4], eax
jl 0x41742d
push esi
mov esi, dword [esp + 0x1c]
mov dword [esp + 8], eax
push esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x4173d8
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x4173fd
mov eax, dword [eax + 0xc]
cmp dword [eax], 0
je 0x4173fd
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.WSOCK32.dll_htons]
mov ecx, dword [edi + 4]
mov word [esp + 0xa], ax
push 0x10
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x417407
pop esi
xor eax, eax
pop edi
add esp, 0x10
ret 8
mov eax, dword [edi + 4]
lea edx, [esp + 0x1c]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x28], 1
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
neg eax
sbb eax, eax
neg eax
sub eax, 1
pop esi
pop edi
add esp, 0x10
ret 8

Function at 0x417460
Capabilities:
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x44461b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov eax, dword [ecx + 4]
test eax, eax
mov dword [esp], 1
jge 0x417497
xor eax, eax
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
push edi
push 0
push 0
push eax
call dword [sym.imp.WSOCK32.dll_accept]
mov edi, eax
test edi, edi
jge 0x4174bb
xor eax, eax
pop edi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
push esi
push 0x28
call fcn.00431802
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x1c], 0
je 0x4174e1
mov ecx, eax
call fcn.004172e0
mov esi, eax
jmp 0x4174e3
xor esi, esi
test esi, esi
mov dword [esp + 0x1c], 0xffffffff
je 0x417543
push 4
lea eax, [esp + 0xc]
push eax
push 1
push 6
push edi
mov dword [esi + 4], edi
call dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0x10], 1
mov edx, dword [esi + 4]
push 0x8004667e
push edx
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
test eax, eax
je 0x417530
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
xor esi, esi
mov eax, esi
pop esi
pop edi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
push 2
push edi
call dword [sym.imp.WSOCK32.dll_shutdown]
push edi
call dword [sym.imp.WSOCK32.dll_closesocket]
mov ecx, dword [esp + 0x14]
pop esi
xor eax, eax
pop edi
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x417570
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 4]
test esi, esi
jge 0x41758e
pop edi
xor eax, eax
pop esi
add esp, 0x10c
ret 8
mov ecx, dword [esp + 0x11c]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 8], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
lea eax, [esp + 8]
push eax
push 0
mov dword [esp + 0x14], ecx
push 0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], esi
push ecx
add esi, 1
push esi
mov dword [esp + 0x24], 1
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
jne 0x4175fb
mov edx, dword [esp + 0x118]
pop edi
mov dword [edx], eax
or eax, 0xffffffff
pop esi
add esp, 0x10c
ret 8
cmp eax, 1
jne 0x417581
mov ecx, edi
call fcn.00417460
test eax, eax
je 0x417581
mov ecx, dword [esp + 0x118]
pop edi
mov dword [ecx], eax
or eax, 0xffffffff
pop esi
add esp, 0x10c
ret 8

Function at 0x417670
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
mov eax, dword [ecx + 4]
lea edx, [esp + 8]
push edx
push eax
mov dword [esp + 0xc], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
test eax, eax
jne 0x4176a2
mov eax, str._unavailable_
add esp, 0x14
ret

Function at 0x4176b0
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x4176dc
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x4176da
mov eax, dword [eax + 0xc]
cmp dword [eax], 0
je 0x4176da
mov eax, dword [eax]
mov eax, dword [eax]
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x4176e0
Capabilities:
Set socket configuration

Disassembly:
cmp byte [0x457ca4], 2
push esi
mov esi, ecx
jae 0x4176f2
xor eax, eax
pop esi
ret 4
mov edx, dword [esi + 4]
mov eax, dword [esp + 8]
push edi
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
push 4
lea ecx, [esp + 0x10]
push ecx
push 0x1006
push 0xffff
push edx
mov dword [esp + 0x20], eax
call edi
cmp eax, 0xffffffff
jne 0x417724
pop edi
xor eax, eax
pop esi
ret 4
mov ecx, dword [esi + 4]
push 4
lea eax, [esp + 0x10]
push eax
push 0x1005
push 0xffff
push ecx
call edi
sub eax, 0xffffffff
neg eax
pop edi
sbb eax, eax
pop esi
ret 4

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

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
call fcn.00434e21
mov ebp, dword [esp + 0x14]
push 0
mov dword [eax], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 4]
push ebp
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_send]
mov ebx, eax
test ebx, ebx
jge 0x4177ba
push edi
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edx, dword [esp + 0x14]
mov edi, eax
mov eax, dword [esi + 4]
push edi
push ebp
push edx
push eax
push str..VSocket.cpp:_tsend_0x_x__0x_x___d__0_:_wsa_error___d_n
push 4
push 0x457788
call fcn.00401860
add esp, 0x1c
cmp edi, 0x2733
pop edi
jne 0x4177b8
call fcn.00434e21
mov dword [eax], 0x2733
mov eax, ebx
pop esi
pop ebp
pop ebx
ret 8
Function at 0x4179c0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push esi
mov esi, ecx
call fcn.00434e21
mov ecx, dword [esp + 8]
mov dword [eax], 0
mov eax, dword [esp + 0xc]
mov edx, dword [esi + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
mov esi, eax
test esi, esi
jge 0x417a04
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x417a02
call fcn.00434e21
mov dword [eax], 0x2733
mov eax, esi
pop esi
ret 8

Function at 0x417a10
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor ebx, ebx
cmp eax, ebx
mov esi, eax
push edi
mov edi, ecx
mov dword [esp + 0xc], esi
jbe 0x417b03
cmp dword [edi + 0xc], ebx
mov eax, dword [edi + 4]
mov ecx, 1
mov dword [esp + 0x124], eax
mov dword [esp + 0x120], ecx
mov dword [esp + 0x18], ebx
je 0x417a5b
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x10]
push ecx
push ebx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x12c]
push ecx
add eax, 1
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], 0x32
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, ebx
je 0x417a34
jl 0x417b1d
cmp eax, 2
jg 0x417b1d
mov eax, dword [edi + 4]
lea edx, [esp + 0x18]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x417ab4
mov ecx, edi
call fcn.004178a0
test eax, eax
je 0x417b31
mov edx, dword [edi + 4]
lea ecx, [esp + 0x120]
push ecx
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x417af7
mov eax, dword [ebp + 8]
push esi
push eax
mov ecx, edi
call fcn.004179c0
mov esi, eax
cmp esi, ebx
jle 0x417ae4
add dword [ebp + 8], esi
sub dword [esp + 0xc], esi
jmp 0x417af7
jge 0x417af3
call fcn.00434e21
cmp dword [eax], 0x2733
jne 0x417b0f
cmp esi, ebx
je 0x417b16
mov esi, dword [esp + 0xc]
cmp esi, ebx
ja 0x417a34
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push str..VSocket.cpp:_tsocket_error_n
jmp 0x417b22
push str..VSocket.cpp:_tzero_bytes_read_n
jmp 0x417b22
push str..VSocket.cpp:_tsocket_error_in_select___n
push 4
push 0x457788
call fcn.00401860
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8