joyce8/EMBER2024-capa huggingface dataset:
Function at 0x415b80
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x434
mov dl, byte [ecx + 0x22]
push ebx
push ebp
xor ebp, ebp
xor ebx, ebx
push esi
mov esi, dword [esp + 0x448]
push edi
test dl, dl
mov dword [esp + 0x2c], ecx
mov ecx, 0x100
setne bl
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
xor edi, edi
cmp esi, ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebp
jle 0x415d0f
jmp 0x415bce
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x448]
cmp ebp, ecx
jge 0x415d0f
mov eax, esi
xor edx, edx
sub eax, edi
mov dword [esp + 0x18], edx
test eax, eax
mov dword [esp + 0x30], eax
jle 0x415cd9
mov eax, ecx
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x34], eax
mov eax, edi
imul eax, ecx
mov dword [esp + 0x1c], eax
jmp 0x415c11
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp edx, dword [esp + 0x34]
jge 0x415cd9
add eax, edx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x38]
mov edi, 3
lea esi, [eax + edx]
mov eax, dword [esp + 0x2c]
mov ebp, dword [eax + 0x1974]
lea eax, [ebp + esi*4]
add eax, ebx
xor edx, edx
add ecx, 4
mov dl, byte [eax]
inc eax
mov dword [ecx - 4], edx
dec edi
jne 0x415c3d
mov ecx, dword [esp + 0x20]
lea ebp, [ebp + esi*4 + 4]
mov eax, 7
add ebp, ebx
add ecx, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x38]
mov edi, ebp
mov ebx, 3
mov edx, dword [ecx]
xor eax, eax
mov al, byte [edi]
add ecx, 4
mov esi, eax
sub eax, edx
cdq
xor eax, edx
mov dword [ecx - 4], esi
sub eax, edx
mov edx, dword [esp + eax*4 + 0x44]
inc edx
inc edi
lea eax, [esp + eax*4 + 0x44]
dec ebx
mov dword [eax], edx
jne 0x415c6f
mov eax, dword [esp + 0x24]
add ebp, 4
dec eax
mov dword [esp + 0x24], eax
jne 0x415c64
mov ecx, dword [esp + 0x448]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x44c]
mov ebx, dword [esp + 0x28]
add edx, ecx
mov ecx, dword [esp + 0x30]
inc eax
cmp eax, ecx
mov ecx, dword [esp + 0x448]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jl 0x415c09
cmp ecx, esi
jle 0x415cf1
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], 0
add eax, esi
mov dword [esp + 0x10], eax
jmp 0x415d03
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], 0
add eax, ecx
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x14]
cmp edi, esi
jl 0x415bca
mov edi, dword [esp + 0x44]
mov ebx, dword [esp + 0x20]
mov eax, edi
shl eax, 5
add eax, edi
cdq
idiv ebx
cmp eax, 0x5f
jl 0x415d35
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x434
ret 8
xor eax, eax
mov ecx, 1
lea esi, [esp + 0x48]
mov edx, dword [esi]
mov ebp, edx
imul ebp, ecx
imul ebp, ecx
add eax, ebp
test edx, edx
je 0x415d26
mov ebp, dword [esi - 4]
shl ebp, 1
cmp edx, ebp
jg 0x415d26
inc ecx
add esi, 4
cmp ecx, 8
jl 0x415d40
cmp ecx, 0x100
jge 0x415d84
lea edx, [esp + ecx*4 + 0x44]
mov esi, dword [edx]
add edx, 4
imul esi, ecx
imul esi, ecx
add eax, esi
inc ecx
cmp ecx, 0x100
jl 0x415d6e
lea edx, [ebx + ebx*2]
mov ecx, edx
xor edx, edx
sub ecx, edi
pop edi
pop esi
pop ebp
div ecx
pop ebx
add esp, 0x434
ret 8
Function at 0x418da0
Capabilities:
Check mutex on windows

Disassembly:
push str.WinVNC_Win32_Instance_Mutex
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
jne 0x418db4
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov eax, ecx
ret
Function at 0x4196f0
Capabilities:
Log keystrokes

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x419702
mov eax, dword [ecx]
push 1
call dword [eax + 0x1e8]
mov ecx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 8]
push 0
mov edx, esi
push ecx
and edx, 0xff
push 0
push edx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
push eax
push esi
call dword [sym.imp.USER32.dll_keybd_event]
pop esi
ret

Function at 0x419730
Capabilities:
Log keystrokes

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
mov al, byte [esi + 8]
test al, al
je 0x419793
mov edi, dword [esi + 4]
mov ecx, dword [esi + 0xc]
mov al, byte [esi]
or edi, 2
test ecx, ecx
mov byte [esp + 8], al
je 0x419759
mov edx, dword [ecx]
push 1
call dword [edx + 0x1e8]
push 0
push edi
mov edi, dword [esp + 0x10]
push 0
mov eax, edi
and eax, 0xff
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
push eax
push edi
call dword [sym.imp.USER32.dll_keybd_event]
mov ecx, dword [esi]
push ecx
push str.fake__d_up_n
push 9
push 0x44b018
call fcn.004024a0
add esp, 0x10
pop edi
pop esi
pop ecx
ret
mov al, byte [esi + 9]
test al, al
je 0x4197eb
mov ecx, dword [esi + 0xc]
mov dl, byte [esi]
mov edi, dword [esi + 4]
mov byte [esp + 8], dl
test ecx, ecx
je 0x4197b4
mov eax, dword [ecx]
push 1
call dword [eax + 0x1e8]
push 0
push edi
mov edi, dword [esp + 0x10]
push 0
mov ecx, edi
and ecx, 0xff
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
push eax
push edi
call dword [sym.imp.USER32.dll_keybd_event]
mov edx, dword [esi]
push edx
push str.fake__d_down_n
push 9
push 0x44b018
call fcn.004024a0
add esp, 0x10
pop edi
pop esi
pop ecx
ret

Function at 0x4197f0
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
mov edi, ebx
and edi, 0xff
push edi
call ebp
mov esi, dword [esp + 0x18]
shr eax, 0xf
and eax, 1
je 0x41988e
test esi, esi
jne 0x419889
mov ecx, 0x446760
test eax, eax
mov eax, str.down
jne 0x41982c
mov eax, 0x446760
push ecx
push eax
push edi
push str.D:_vncwinvnc_vncKeymap.cpp:_tsetshiftstate__d_____s___s__n
push 9
push 0x44b018
call fcn.004024a0
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 ah, 0x80
mov eax, str.down
jne 0x419873
mov eax, 0x446760
push eax
push edi
push str.D:_vncwinvnc_vncKeymap.cpp:_tnew_state__d___s__n
push 9
push 0x44b018
call fcn.004024a0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
ret
test esi, esi
je 0x419889
mov ecx, str.down
jmp 0x41981e
Function at 0x41b820
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x10c
lea eax, [esp + 0xc]
push ebx
push ebp
push 0x100
push eax
call dword [sym.imp.WSOCK32.dll_gethostname]
test eax, eax
je 0x41b862
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
push ecx
push str.Host_name_unavailable
push edx
call fcn.00430bb0
add esp, 0xc
pop ebp
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
jne 0x41b899
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
push ecx
push str.IP_address_unavailable
push edx
call fcn.00430bb0
add esp, 0xc
pop ebp
pop ebx
add esp, 0x10c
ret
mov ebp, dword [esp + 0x118]
mov byte [ebp], 0
mov eax, dword [ebx + 0xc]
cmp dword [eax], 0
je 0x41b96d
push esi
push edi
mov dword [esp + 0x10], 0
xor esi, esi
cmp word [ebx + 0xa], si
jle 0x41b90f
mov ecx, dword [ebx + 0xc]
mov edx, dword [esp + 0x10]
mov eax, dword [edx + ecx]
xor ecx, ecx
lea edx, [esp + 0x14]
mov cl, byte [eax + esi]
push ecx
push 0x44690c
push edx
call fcn.00430e5e
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x130]
not ecx
dec ecx
sub eax, ecx
lea ecx, [esp + 0x20]
dec eax
push eax
push ecx
push ebp
call fcn.00431dd0
movsx edx, word [ebx + 0xa]
add esp, 0x18
inc esi
cmp esi, edx
jl 0x41b8c2
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + ebp - 1], al
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + eax + 4]
test edx, edx
je 0x41b953
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x124]
repne scasb al, byte es:[edi]
not ecx
dec ecx
sub edx, ecx
dec edx
push edx
push 0x446908
push ebp
call fcn.00431dd0
add esp, 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0xc]
add eax, 4
mov dword [esp + 0x10], eax
cmp dword [eax + ecx], 0
jne 0x41b8ba
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret

Function at 0x41ddb0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push esi
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 8]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push 0
mov esi, 4
push eax
push ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x41ddf1
mov eax, dword [esp + 0x18]
pop esi
add esp, 8
ret 0xc
cmp dword [esp + 4], esi
je 0x41de02
mov eax, dword [esp + 0x18]
pop esi
add esp, 8
ret 0xc
mov eax, dword [esp + 8]
cmp eax, esi
mov eax, dword [esp + 0x18]
jne 0x41de12
mov eax, dword [esp + 0x14]
pop esi
add esp, 8
ret 0xc
Function at 0x41de20
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
lea eax, [esp]
lea ecx, [esp + 8]
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 8]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push 0
push eax
push ecx
mov dword [esp + 0x1c], 3
mov dword [esp + 0x18], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x41de70
cmp dword [esp], 8
jg 0x41de70
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [eax], edx
mov dword [eax + 4], ecx
add esp, 0x10
ret 0xc

Function at 0x41e670
Capabilities:
Set registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
lea eax, [esp + 0xc]
push 4
push eax
push 4
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
ret 0xc

Function at 0x41e690
Capabilities:
Set registry value

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 4]
push 8
push eax
push 3
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
ret 0xc
Function at 0x4220b0
Capabilities:
Get session user name

Disassembly:
push ecx
mov eax, dword [0x44bd60]
push ebx
push esi
cmp eax, 2
push edi
jne 0x422196
call fcn.00422a60
test eax, eax
je 0x422191
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
test eax, eax
je 0x422222
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 4
push eax
call dword [sym.imp.USER32.dll_GetUserObjectInformationA]
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x42213f
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov edi, 0x44aff8
or ecx, 0xffffffff
xor eax, eax
mov dword [0x44bd6c], 0
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
not ecx
dec ecx
cmp ecx, eax
jae 0x422222
mov edi, 0x44aff8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
mov edx, ecx
jmp 0x4221f5
mov eax, dword [0x44bd6c]
test eax, eax
jne 0x422191
mov edi, 0x44aff8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
not ecx
dec ecx
cmp ecx, eax
jae 0x422222
mov edi, 0x44aff8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
pop ecx
ret
mov eax, dword [0x44bd60]
test eax, eax
jbe 0x422222
cmp eax, 2
ja 0x422222
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], esi
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x422201
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x4dd
jne 0x42220b
mov edi, 0x44aff8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, esi
jae 0x422222
mov edi, 0x44aff8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov eax, 1
pop ebx
pop ecx
ret
call edi
push eax
push str.D:_vncwinvnc_vncService.cpp:_tGetUserName___failed__error_d_n
push 0
push 0x44b018
call fcn.004024a0
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x4227c0
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x200
push ebx
mov ebx, dword [esp + 0x208]
push ebp
push esi
push edi
push 0xff
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.00430bb0
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
xor esi, esi
mov byte [esp + 0x10f], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x42281f
movsx ecx, byte [esp + esi + 0x10]
push ecx
call fcn.00430fd2
mov byte [esp + esi + 0x14], al
add esp, 4
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
inc esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, ecx
jb 0x4227fc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
test esi, esi
je 0x4228cd
mov ebp, dword [sym.imp.USER32.dll_GetWindowTextA]
lea edx, [esp + 0x110]
push 0x100
push edx
push esi
call ebp
mov ebx, eax
xor edi, edi
test ebx, ebx
jle 0x42286a
movsx eax, byte [esp + edi + 0x110]
push eax
call fcn.00430fd2
add esp, 4
mov byte [esp + edi + 0x110], al
inc edi
cmp edi, ebx
jl 0x42284d
push 0xfffffffffffffff0
push esi
call dword [sym.imp.USER32.dll_GetWindowLongA]
test eax, 0x10000000
je 0x422893
lea ecx, [esp + 0x10]
lea edx, [esp + 0x110]
push ecx
push edx
call fcn.00431f00
add esp, 8
test eax, eax
jne 0x4228a4
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x422835
jmp 0x4228cd
push esi
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x4228c2
push 0
push 0xf120
push 0x112
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
test esi, esi
jne 0x4228e2
mov eax, dword [0x44890c]
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, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret
Function at 0x423620
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 [0x44bd70], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
mov eax, dword [0x44bd70]
push eax
push str.winvnc
lea ecx, [esp + 0x14]
push str._.200s_error:__d
push ecx
call fcn.00430e5e
mov eax, dword [esp + 0x120]
add esp, 0x10
lea edx, [esp + 0xc]
mov dword [esp + 8], eax
test esi, esi
mov dword [esp + 4], edx
je 0x42369e
push 0
call dword [sym.imp.USER32.dll_MessageBeep]
lea ecx, [esp + 4]
push 0
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 0x423a60
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push esi
push eax
mov esi, ecx
push 2
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x423a8a
mov dword [esi], 0
mov eax, esi
pop esi
add esp, 0x190
ret
mov cx, word [esp + 4]
mov eax, esi
mov word [0x44bd86], cx
mov dword [esi], 0xffffffff
pop esi
add esp, 0x190
ret

Function at 0x423b60
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
mov dword [esp + 8], 1
mov eax, dword [esi + 4]
test eax, eax
jl 0x423b79
call fcn.00423bd0
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
test eax, eax
mov dword [esi + 4], eax
jge 0x423b92
pop edi
xor eax, eax
pop esi
pop ecx
ret
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [esp + 8]
push 4
push ecx
push 4
push 0xffff
push eax
call edi
test eax, eax
je 0x423bb3
pop edi
xor eax, eax
pop esi
pop ecx
ret
mov eax, dword [esi + 4]
lea edx, [esp + 8]
push 4
push edx
push 1
push 6
push eax
call edi
neg eax
sbb eax, eax
pop edi
neg eax
dec eax
pop esi
pop ecx
ret
Function at 0x423dd0
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x10
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
test eax, eax
jge 0x423de8
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 8
mov esi, dword [esp + 0x1c]
xor eax, eax
mov dword [esp + 8], eax
push esi
mov dword [esp + 0x10], eax
mov word [esp + 0xc], 2
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x423e37
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x423dde
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
test eax, eax
jne 0x423e31
pop edi
pop esi
add esp, 0x10
ret 8
mov edx, dword [eax]
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov edx, dword [edi + 4]
lea ecx, [esp + 8]
push 0x10
push ecx
push edx
mov word [esp + 0x16], ax
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x423e66
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 8
mov ecx, dword [edi + 4]
lea eax, [esp + 0x1c]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x28], 1
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
neg eax
sbb eax, eax
pop edi
neg eax
dec eax
pop esi
add esp, 0x10
ret 8

Function at 0x423ec0
Capabilities:
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x43affb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov eax, dword [ecx + 4]
push esi
test eax, eax
push edi
mov dword [esp + 8], 1
jl 0x423f97
push 0
push 0
push eax
call dword [sym.imp.WSOCK32.dll_accept]
mov edi, eax
test edi, edi
jl 0x423f97
push 0x28
call fcn.004305ac
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x1c], 0
je 0x423f27
mov ecx, eax
call fcn.00423ac0
mov esi, eax
jmp 0x423f29
xor esi, esi
test esi, esi
mov dword [esp + 0x1c], 0xffffffff
je 0x423f87
lea eax, [esp + 8]
push 4
push eax
push 1
push 6
push edi
mov dword [esi + 4], edi
call dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 1
mov edx, dword [esi + 4]
push ecx
push 0x8004667e
push edx
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
test eax, eax
je 0x423f74
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
xor esi, esi
mov eax, esi
pop edi
pop esi
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 edi
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x423fb0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
push edi
mov edi, ecx
mov ecx, dword [edi + 4]
test ecx, ecx
jge 0x423fcc
xor eax, eax
pop edi
add esp, 0x10c
ret 8
push esi
mov esi, dword [esp + 0x11c]
mov eax, 0x10624dd3
mov dword [esp + 0x14], ecx
imul esi
sar edx, 6
mov eax, edx
mov dword [esp + 0x10], 1
shr eax, 0x1f
add edx, eax
mov eax, esi
mov dword [esp + 8], edx
mov esi, 0x3e8
cdq
idiv esi
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
lea eax, [esp + 8]
shl edx, 3
mov dword [esp + 0xc], edx
push eax
push 0
lea edx, [esp + 0x18]
push 0
inc ecx
push edx
push ecx
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
pop esi
jne 0x424044
mov eax, dword [esp + 0x114]
pop edi
mov dword [eax], 0
or eax, 0xffffffff
add esp, 0x10c
ret 8
cmp eax, 1
je 0x424055
xor eax, eax
pop edi
add esp, 0x10c
ret 8
mov ecx, edi
call fcn.00423ec0
test eax, eax
jne 0x42406a
pop edi
add esp, 0x10c
ret 8
mov ecx, dword [esp + 0x114]
pop edi
mov dword [ecx], eax
or eax, 0xffffffff
add esp, 0x10c
ret 8

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

Disassembly:
sub esp, 0x14
lea eax, [esp]
lea edx, [esp + 4]
push eax
mov eax, dword [ecx + 4]
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 0x4240f3
mov eax, str._unavailable_
add esp, 0x14
ret

Function at 0x424100
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 0x42412b
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x424129
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x424129
mov eax, dword [eax]
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x424130
Capabilities:
Set socket configuration

Disassembly:
mov al, byte [0x44bd86]
push esi
cmp al, 2
push edi
mov esi, ecx
jae 0x424144
pop edi
xor eax, eax
pop esi
ret 4
mov edx, dword [esi + 4]
mov eax, dword [esp + 0xc]
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [esp + 0xc]
push 4
push ecx
push 0x1006
push 0xffff
push edx
mov dword [esp + 0x20], eax
call edi
cmp eax, 0xffffffff
jne 0x424175
pop edi
xor eax, eax
pop esi
ret 4
mov ecx, dword [esi + 4]
lea eax, [esp + 0xc]
push 4
push eax
push 0x1005
push 0xffff
push ecx
call edi
inc eax
pop edi
neg eax
sbb eax, eax
pop esi
ret 4

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

Disassembly:
push esi
mov esi, ecx
call fcn.00431ff3
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_send]
mov esi, eax
test esi, esi
jge 0x4241e2
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4241e2
call fcn.00431ff3
mov dword [eax], 0x2733
mov eax, esi
pop esi
ret 8
Function at 0x4241f0
Capabilities:
Get socket status

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x10c
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x11c]
push edi
push eax
push ecx
mov ecx, esi
call fcn.004242b0
mov eax, dword [esi + 0xc]
xor ebp, ebp
cmp eax, ebp
je 0x424273
mov ebx, dword [sym.imp.WSOCK32.dll_select]
mov edi, 1
mov eax, dword [esi + 4]
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], eax
push ebp
push ecx
inc eax
push ebp
push eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebp
call ebx
cmp eax, ebp
je 0x424224
jl 0x424283
cmp eax, edi
jg 0x424283
mov eax, dword [esi + 4]
lea edx, [esp + 0x18]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x42426e
mov ecx, esi
call fcn.004243e0
test eax, eax
je 0x424297
cmp dword [esi + 0xc], ebp
jne 0x424224
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x10c
ret 8
push str.D:_vncwinvncVSocket.cpp:_tsocket_error_in_select___n
push 4
push 0x44b018
call fcn.004024a0
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 8

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

Disassembly:
push esi
mov esi, ecx
call fcn.00431ff3
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 0x424542
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x424542
call fcn.00431ff3
mov dword [eax], 0x2733
mov eax, esi
pop esi
ret 8