joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4017f0
Capabilities:
Print debug messages
Write file on windows

Disassembly:
sub esp, 0x404
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call dword [sym.imp.MSVCRT.dll_time]
mov edx, dword [esi + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteConsoleA]
lea ecx, [esi + 0x18]
add esp, 4
cmp eax, edx
je 0x401884
push ecx
mov dword [ecx], eax
call dword [sym.imp.MSVCRT.dll_ctime]
mov ebx, eax
mov al, byte [esi + 5]
add esp, 4
test al, al
je 0x401833
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, byte [esi + 6]
test al, al
je 0x40185a
lea eax, [esp + 0x10]
push 0
push eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call ebp
mov al, byte [esi + 4]
test al, al
je 0x401884
mov edx, dword [esi + 0xc]
test edx, edx
je 0x401884
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x41c]
mov eax, dword [esp + 0x418]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_vsprintf]
mov al, byte [esi + 5]
add esp, 0xc
test al, al
je 0x4018b4
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, byte [esi + 6]
test al, al
je 0x4018e1
lea eax, [esp + 0x10]
push 0
push eax
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x20]
push ecx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call ebp
mov al, byte [esi + 4]
test al, al
je 0x401911
mov esi, dword [esi + 0xc]
test esi, esi
je 0x401911
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
lea eax, [esp + 0x1c]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x404
ret 8

Function at 0x404990
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x100
lea eax, [esp]
push esi
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov esi, dword [esp + 0x108]
mov ecx, esi
and ecx, 0xff
test byte [esp + ecx + 4], 1
je 0x4049d2
push edi
mov edi, dword [sym.imp.USER32.dll_keybd_event]
push 0
push 1
push 0
push esi
call edi
push 0
push 3
push 0
push esi
call edi
pop edi
pop esi
add esp, 0x100
ret
Function at 0x4085c0
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
mov eax, dword [ecx + 0xc]
push ebx
push esi
push edi
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x408634
call dword [sym.imp.USER32.dll_EmptyClipboard]
test eax, eax
je 0x408634
mov esi, dword [esp + 0x10]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x2002
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x408634
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
pop esi
pop ebx
ret 4

Function at 0x40c2e0
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 0x40c2f4
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov eax, ecx
ret

Function at 0x40c350
Capabilities:
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 0x40c3e1
test esi, esi
jne 0x40c3dc
mov ecx, 0x41b820
test eax, eax
mov eax, str.down
jne 0x40c38c
mov eax, 0x41b820
push ecx
push eax
push edi
push str.D:ORL_vsswinvnc_vncKeymap.cpp_:_setshiftstate__d_____s___s__n
push 9
push 0x41d518
call fcn.00401950
neg esi
sbb esi, esi
and esi, 0xfffffffe
add esi, 2
push esi
push ebx
call fcn.0040c320
add esp, 0x20
push edi
call ebp
test ah, 0x80
mov eax, str.down
jne 0x40c3c6
mov eax, 0x41b820
push eax
push edi
push str.D:ORL_vsswinvnc_vncKeymap.cpp_:_new_state__d___s__n
push 9
push 0x41d518
call fcn.00401950
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
ret
test esi, esi
je 0x40c3dc
mov ecx, str.down
jmp 0x40c37e
Function at 0x40c910
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4143d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
lea edi, [esi + 4]
mov ecx, edi
call fcn.0040d520
xor ebx, ebx
lea ecx, [esi + 0x64]
mov dword [esp + 0x4c], ebx
call fcn.00403150
mov ebp, dword [esp + 0x54]
lea eax, [esi + 0xc8]
push 0x101
push eax
mov byte [esp + 0x54], 1
mov dword [esi], ebp
call fcn.00411a90
mov ecx, dword [0x41e1e8]
add esp, 8
mov dword [esp + 0x14], 0x30
mov dword [esp + 0x18], ebx
push 0x7f00
push ebx
mov dword [esp + 0x24], 0x40cea0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ecx
call dword [sym.imp.USER32.dll_LoadIconA]
push 0x7f00
push ebx
mov dword [esp + 0x34], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push ebx
mov dword [esp + 0x34], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov edx, dword [str.WinVNC_Tray_Icon]
push 0x7f00
push ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], edx
call dword [sym.imp.USER32.dll_LoadIconA]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExA]
mov ecx, dword [0x41e1e8]
mov eax, dword [str.WinVNC_Tray_Icon]
push ebx
push ecx
push ebx
push ebx
push 0xc8
push 0xc8
push closesocket
push closesocket
push 0xcf0000
push eax
push eax
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, ebx
mov dword [esi + 0x68], eax
push ebx
jne 0x40ca27
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x40caa8
push 0x1388
push 1
push eax
call dword [sym.imp.USER32.dll_SetTimer]
mov edx, dword [esi + 0x68]
push esi
push 0xffffffffffffffeb
push edx
call dword [sym.imp.USER32.dll_SetWindowLongA]
mov ecx, dword [esi + 0x68]
mov eax, dword [ebp]
push ecx
mov ecx, ebp
call dword [eax + 0x58]
mov edx, dword [esi]
mov ecx, edi
push edx
call fcn.0040d540
test eax, eax
jne 0x40ca65
push ebx
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x40caa8
mov eax, dword [0x41e1e8]
mov edi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x66
push eax
call edi
mov dword [esi + 0x1cc], eax
mov ecx, dword [0x41e1e8]
push 0x86
push ecx
call edi
mov dword [esi + 0x1d0], eax
mov edx, dword [0x41e1e8]
push 0x68
push edx
call dword [sym.imp.USER32.dll_LoadMenuA]
mov ecx, esi
mov dword [esi + 0x6c], eax
call fcn.0040cb40
mov ecx, dword [esp + 0x44]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x40
ret 4
Function at 0x40cbb0
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 0x40cbf3
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
push ecx
push str.Host_name_unavailable
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
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 0x40cc2b
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
push ecx
push str.IP_address_unavailable
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
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 0x40cd02
push esi
push edi
mov dword [esp + 0x10], 0
xor esi, esi
cmp word [ebx + 0xa], si
jle 0x40cca3
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 0x41b970
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
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 dword [sym.imp.MSVCRT.dll_strncat]
movsx edx, word [ebx + 0xa]
add esp, 0x18
inc esi
cmp esi, edx
jl 0x40cc54
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 0x40cce8
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 0x41b96c
push ebp
call dword [sym.imp.MSVCRT.dll_strncat]
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 0x40cc4c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret

Function at 0x40e260
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 0x40e2a1
mov eax, dword [esp + 0x18]
pop esi
add esp, 8
ret 0xc
cmp dword [esp + 4], esi
je 0x40e2b2
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 0x40e2c2
mov eax, dword [esp + 0x14]
pop esi
add esp, 8
ret 0xc
Function at 0x40e2d0
Capabilities:
Query or enumerate registry value

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

Function at 0x40e330
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push esi
lea eax, [esp + 0x10]
push edi
mov edi, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
push 0
push ecx
push 0
mov esi, 1
push edi
push ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], 0
call ebp
test eax, eax
je 0x40e378
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8
cmp dword [esp + 0x10], esi
je 0x40e38a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8
mov edx, dword [esp + 0x14]
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
jne 0x40e3a7
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push esi
push ecx
push 0
push edi
push ebx
call ebp
test eax, eax
je 0x40e3d1
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
cmp dword [esp + 0x10], 1
je 0x40e3ed
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8

Function at 0x40eb20
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 0x40f0b0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4144db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
mov al, byte [esp + 3]
push ebx
push ebp
push esi
mov esi, ecx
push edi
push 0xc
mov dword [esp + 0x18], esi
mov byte [esi + 0x70], al
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
xor ebp, ebp
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x74], eax
mov dword [esi + 0x78], ebp
mov cl, byte [esp + 0x17]
push 0xc
mov dword [esp + 0x30], ebp
mov byte [esi + 0x7c], cl
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [eax], eax
mov dword [eax + 4], eax
add esp, 8
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], ebp
mov ebx, 1
lea ecx, [esi + 0x28c]
mov byte [esp + 0x28], bl
call sub.omnithread_rt.dll_public:_void___thiscall_omni_mutex::constructor_void_
lea ecx, [esi + 0x2a4]
mov byte [esp + 0x28], 2
call sub.omnithread_rt.dll_public:_void___thiscall_omni_mutex::constructor_void_
mov dl, byte [esp + 0x13]
push 0xc
mov byte [esp + 0x2c], 3
mov byte [esi + 0x2c0], dl
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x2c4], eax
mov dword [esi + 0x2c8], ebp
push str.D:ORL_vsswinvnc_vncPasswd.h_:_PASSWD_:_FromClear_called_n
push 9
push 0x41d518
mov byte [esp + 0x38], 4
mov dword [esi], 0x415e70
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov dword [esi + 0x10], ebp
mov dword [esi + 0x68], ebp
mov dword [esi + 0x14], 0x170c
mov dword [esi + 0x18], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x30], ebp
mov dword [esi + 0x6c], ebp
call fcn.00401950
lea eax, [esp + 0x28]
push eax
push 0x41dd88
call fcn.004034f0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x20], edx
mov dword [esi + 0x44], 2
mov dword [esi + 0x48], 0xa
mov dword [esi + 0x54], ebp
mov dword [esi + 0x58], ebp
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x60], ebp
mov dword [esi + 0x64], ebx
mov dword [esi + 0x2c], ebp
mov dword [esi + 0x28], ebp
mov dword [esi + 0x3c], ebp
mov dword [esi + 0x40], ebp
lea edi, [esi + 0x88]
mov ecx, 0x80
xor eax, eax
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebp
push 0x24
rep stosd dword es:[edi], eax
mov word [esi + 0x288], bp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 0x1c
mov dword [esp + 0x18], eax
cmp eax, ebp
mov byte [esp + 0x28], 5
je 0x40f23e
lea ecx, [esi + 0x28c]
push ecx
mov ecx, eax
call sub.omnithread_rt.dll_public:_void___thiscall_omni_condition::constructor_class_omni_mutex__
mov dword [esi + 0x2bc], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x2bc], ebp
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x411a90
Capabilities:
Get session user name

Disassembly:
push ecx
mov eax, dword [0x41e1c0]
push ebx
push esi
cmp eax, 2
push edi
jne 0x411b76
call fcn.004120c0
test eax, eax
je 0x411b71
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
test eax, eax
je 0x411c02
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 0x411b1f
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov edi, 0x41dd88
or ecx, 0xffffffff
xor eax, eax
mov dword [0x41e1cc], 0
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
not ecx
dec ecx
cmp ecx, eax
jae 0x411c02
mov edi, 0x41dd88
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 0x411bd5
mov eax, dword [0x41e1cc]
test eax, eax
jne 0x411b71
mov edi, 0x41dd88
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 0x411c02
mov edi, 0x41dd88
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 [0x41e1c0]
test eax, eax
jbe 0x411c02
cmp eax, 2
ja 0x411c02
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 0x411be1
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x4dd
jne 0x411beb
mov edi, 0x41dd88
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, esi
jae 0x411c02
mov edi, 0x41dd88
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:ORL_vsswinvnc_vncService.cpp_:_getusername_error__d_n
push 0
push 0x41d518
call fcn.00401950
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x4122c0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41e1c0]
sub esp, 0x10
dec eax
mov dword [0x41e1d8], 1
push esi
push edi
je 0x41231e
dec eax
jne 0x412341
lea eax, [esp + 8]
mov dword [esp + 8], str.winvnc
push eax
mov dword [esp + 0x10], 0x412370
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
test eax, eax
jne 0x412341
push str.StartServiceCtrlDispatcher_failed.
call fcn.00412ab0
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x10
ret
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x412341
push str.RegisterServiceProcess
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
jne 0x412349
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret
push 1
push 0
call esi
call fcn.004138f0
push 0
push 0
call esi
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x412ab0
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 [0x41e1d0], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
mov eax, dword [0x41e1d0]
push eax
push str.winvnc
lea ecx, [esp + 0x14]
push str._s_error:__d
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
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 0x412b2f
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 0x412f30
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 0x412f5a
mov dword [esi], 0
mov eax, esi
pop esi
add esp, 0x190
ret
mov cx, word [esp + 4]
mov eax, esi
mov word [0x41e1e4], cx
mov dword [esi], 0xffffffff
pop esi
add esp, 0x190
ret

Function at 0x412fd0
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 0x412fe9
call fcn.00413040
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
test eax, eax
mov dword [esi + 4], eax
jge 0x413002
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 0x413023
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 0x4131d0
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 0x4131e8
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 0x413237
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x4131de
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
test eax, eax
jne 0x413231
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]
neg eax
sbb eax, eax
pop edi
neg eax
dec eax
pop esi
add esp, 0x10
ret 8
Function at 0x413290
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov eax, dword [ecx + 4]
push edi
test eax, eax
mov dword [esp + 4], 1
jge 0x4132a6
xor eax, eax
pop edi
pop ecx
ret
push 0
push 0
push eax
call dword [sym.imp.WSOCK32.dll_accept]
mov edi, eax
test edi, edi
jge 0x4132bc
xor eax, eax
pop edi
pop ecx
ret
push esi
push 8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x4132dd
mov ecx, eax
call fcn.00412f90
mov esi, eax
test esi, esi
je 0x4132df
mov dword [esi + 4], edi
jmp 0x4132ef
xor esi, esi
push 2
push edi
call dword [sym.imp.WSOCK32.dll_shutdown]
push edi
call dword [sym.imp.WSOCK32.dll_closesocket]
mov ecx, dword [esi + 4]
lea eax, [esp + 8]
push 4
push eax
push 1
push 6
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
mov eax, esi
pop esi
pop edi
pop ecx
ret

Function at 0x413350
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 0x413383
mov eax, str._unavailable_
add esp, 0x14
ret

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

Function at 0x4133c0
Capabilities:
Set socket configuration

Disassembly:
mov al, byte [0x41e1e4]
push esi
cmp al, 2
push edi
mov esi, ecx
jae 0x4133d4
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 0x413405
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