joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a790
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov dword [esp + 0xc], ecx
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
lea eax, [edi + edi + 1]
push eax
call fcn.0041fd7b
mov ebx, eax
add esp, 4
xor esi, esi
xor eax, eax
test edi, edi
jle 0x40a7d9
cmp byte [eax + ebp], 0xa
jne 0x40a7cd
mov byte [esi + ebx], 0xd
inc esi
mov cl, byte [eax + ebp]
mov byte [esi + ebx], cl
inc esi
inc eax
cmp eax, edi
jl 0x40a7c2
mov edx, dword [esp + 0x10]
mov byte [esi + ebx], 0
mov eax, dword [edx + 0x3c]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40a844
call dword [sym.imp.USER32.dll_EmptyClipboard]
test eax, eax
je 0x40a844
inc esi
push esi
push 0x2002
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
je 0x40a844
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
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 ebp
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
push ebx
call fcn.0041fd70
add esp, 4
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4

Function at 0x411190
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 0x4111a4
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov eax, ecx
ret
Function at 0x411c40
Capabilities:
Log keystrokes

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
mov al, byte [esi + 8]
test al, al
je 0x411c92
mov cl, byte [esi]
mov eax, dword [esi + 4]
mov byte [esp + 8], cl
or al, 2
mov edi, dword [esp + 8]
push 0
mov edx, edi
push eax
and edx, 0xff
push 0
push edx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
push eax
push edi
call dword [sym.imp.USER32.dll_keybd_event]
mov eax, dword [esi]
push eax
push str.fake__d_up_n
push 9
push 0x43b3b0
call fcn.00402c70
add esp, 0x10
pop edi
pop esi
pop ecx
ret
mov al, byte [esi + 9]
test al, al
je 0x411cd9
mov cl, byte [esi]
mov eax, dword [esi + 4]
mov byte [esp + 8], cl
push 0
mov edi, dword [esp + 0xc]
push eax
mov edx, edi
push 0
and edx, 0xff
push edx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
push eax
push edi
call dword [sym.imp.USER32.dll_keybd_event]
mov eax, dword [esi]
push eax
push str.fake__d_down_n
push 9
push 0x43b3b0
call fcn.00402c70
add esp, 0x10
pop edi
pop esi
pop ecx
ret

Function at 0x411ce0
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 0x411d7e
test esi, esi
jne 0x411d79
mov ecx, 0x4354ec
test eax, eax
mov eax, str.down
jne 0x411d1c
mov eax, 0x4354ec
push ecx
push eax
push edi
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vnckeymap.cpp_:_setshiftstate__d_____s___s__n
push 9
push 0x43b3b0
call fcn.00402c70
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 0x411d63
mov eax, 0x4354ec
push eax
push edi
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vnckeymap.cpp_:_new_state__d___s__n
push 9
push 0x43b3b0
call fcn.00402c70
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
ret
test esi, esi
je 0x411d79
mov ecx, str.down
jmp 0x411d0e
Function at 0x4138b0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, ecx
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x4138d5
push str.Error_opening_log_file_n
push edi
push ebp
mov byte [ebp + 5], 1
mov byte [ebp + 4], 0
call fcn.00402c70
add esp, 0xc
pop edi
pop ebp
ret
mov al, byte [ebp + 0x14]
push ebx
test al, al
mov byte [ebp + 4], 1
jne 0x41395e
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 4
push ecx
call fcn.0041fd7b
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41395e
mov edi, dword [ebp + 0x10]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 1
mov eax, ecx
mov esi, edi
mov edi, ebx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..bak
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push ebx
call fcn.0041fd70
add esp, 4
pop esi
mov ecx, ebp
call fcn.004139d0
mov ecx, dword [ebp + 0x10]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
pop ebx
jne 0x4139a6
mov edx, dword [ebp + 0x10]
mov byte [ebp + 5], 1
push edx
push str.Error_opening_log_file__s_n
push 0
push ebp
mov byte [ebp + 4], 0
call fcn.00402c70
add esp, 0x10
mov al, byte [ebp + 0x14]
test al, al
je 0x4139c0
mov eax, dword [ebp + 0xc]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop edi
pop ebp
ret
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
pop edi
pop ebp
ret
Function at 0x4139f0
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 fcn.004204ca
mov edx, dword [esi + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteConsoleA]
lea ecx, [esi + 0x18]
add esp, 4
cmp eax, edx
je 0x413a82
push ecx
mov dword [ecx], eax
call fcn.00421a49
mov ebx, eax
mov al, byte [esi + 5]
add esp, 4
test al, al
je 0x413a31
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, byte [esi + 6]
test al, al
je 0x413a58
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 0x413a82
mov edx, dword [esi + 0xc]
test edx, edx
je 0x413a82
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
push eax
lea ecx, [esp + 0x1c]
push 0x400
push ecx
call fcn.004219f9
mov al, byte [esi + 5]
add esp, 0x10
test al, al
je 0x413ab6
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, byte [esi + 6]
test al, al
je 0x413ae3
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 0x413b13
mov esi, dword [esi + 0xc]
test esi, esi
je 0x413b13
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 0x413f70
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 0x413fb2
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
push ecx
push str.Host_name_unavailable
push edx
call fcn.00421ba0
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 0x413fe9
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
push ecx
push str.IP_address_unavailable
push edx
call fcn.00421ba0
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 0x4140bd
push esi
push edi
mov dword [esp + 0x10], 0
xor esi, esi
cmp word [ebx + 0xa], si
jle 0x41405f
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 0x4356d0
push edx
call fcn.00420449
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.00421a70
movsx edx, word [ebx + 0xa]
add esp, 0x18
inc esi
cmp esi, edx
jl 0x414012
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 0x4140a3
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 0x4356cc
push ebp
call fcn.00421a70
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 0x41400a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret

Function at 0x415ad0
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 0x415b11
mov eax, dword [esp + 0x18]
pop esi
add esp, 8
ret 0xc
cmp dword [esp + 4], esi
je 0x415b22
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 0x415b32
mov eax, dword [esp + 0x14]
pop esi
add esp, 8
ret 0xc
Function at 0x415b40
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 0x415b90
cmp dword [esp], 8
jg 0x415b90
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 0x415ba0
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 0x415be8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8
cmp dword [esp + 0x10], esi
je 0x415bfa
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8
mov edx, dword [esp + 0x14]
push edx
call fcn.0041fd7b
mov esi, eax
add esp, 4
test esi, esi
jne 0x415c17
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 0x415c41
push esi
call fcn.0041fd70
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 0x415c5d
push esi
call fcn.0041fd70
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 0x416400
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 0x416950
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x42a149
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
lea ebx, [esi + 4]
mov dword [esp + 0x14], esi
mov dword [ebx + 4], ebp
mov dword [ebx], 0x42be0c
mov al, byte [esp + 0x13]
push 0xc
mov dword [esp + 0x2c], ebp
mov byte [esi + 0x7c], al
call fcn.0041fd7b
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], ebp
mov cl, byte [esp + 0x17]
push 0xc
mov byte [esp + 0x30], 1
mov byte [esi + 0x88], cl
call fcn.0041fd7b
mov dword [eax], eax
mov dword [eax + 4], eax
add esp, 8
mov dword [esi + 0x8c], eax
mov dword [esi + 0x90], ebp
lea ecx, [esi + 0x298]
mov byte [esp + 0x28], 2
call sub.othread2.dll_public:_void___thiscall_omni_mutex::constructor_void_
lea ecx, [esi + 0x2b0]
mov byte [esp + 0x28], 3
call sub.othread2.dll_public:_void___thiscall_omni_mutex::constructor_void_
mov dl, byte [esp + 0x13]
push 0xc
mov byte [esp + 0x2c], 4
mov byte [esi + 0x2cc], dl
call fcn.0041fd7b
mov dword [eax], eax
mov dword [eax + 4], eax
add esp, 4
mov dword [esi + 0x2d0], eax
mov dword [esi + 0x2d4], ebp
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncPasswd.h_:_PASSWD_:_FromClear_called_n
mov edi, 1
push 9
push 0x43b3b0
mov byte [esp + 0x34], 5
mov dword [esi], 0x42bcbc
mov dword [esi + 0xc], ebp
mov dword [esi + 0x10], ebp
mov dword [esi + 0x14], ebp
mov dword [esi + 0x18], ebp
mov dword [esi + 0x1c], ebp
mov dword [esi + 0x74], ebp
mov dword [esi + 0x20], 0x170c
mov dword [esi + 0x24], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x3c], ebp
mov dword [esi + 0x78], ebp
call fcn.00402c70
lea eax, [esp + 0x24]
push eax
push 0x43bc50
call fcn.00404440
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [esi + 0x28], ecx
add esp, 0x14
mov dword [esi + 0x2c], edx
mov dword [esi + 0x50], 2
mov dword [esi + 0x54], 0xa
mov dword [esi + 0x60], ebp
mov dword [esi + 0x68], edi
mov dword [esi + 0x70], edi
mov dword [esi + 0x40], edi
lea edi, [esi + 0x94]
mov ecx, 0x80
xor eax, eax
mov dword [esi + 0x64], ebp
mov dword [esi + 0x6c], ebp
mov dword [esi + 0x38], ebp
mov dword [esi + 0x34], ebp
mov dword [esi + 0x48], ebp
mov dword [esi + 0x4c], ebp
mov dword [esi + 0x44], ebp
push esi
rep stosd dword es:[edi], eax
mov eax, dword [ebx]
mov ecx, ebx
mov word [esi + 0x294], bp
call dword [eax + 0xc]
push 0x24
call fcn.0041fd7b
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebp
mov byte [esp + 0x28], 6
je 0x416af7
lea ecx, [esi + 0x298]
push ecx
mov ecx, eax
call sub.othread2.dll_public:_void___thiscall_omni_condition::constructor_class_omni_mutex__
mov dword [esi + 0x2c8], eax
jmp 0x416afd
mov dword [esi + 0x2c8], ebp
mov ecx, dword [esp + 0x20]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x4193e0
Capabilities:
Get session user name

Disassembly:
push ecx
mov eax, dword [0x43c08c]
push ebx
push esi
cmp eax, 2
push edi
jne 0x4194c6
call fcn.00419bb0
test eax, eax
je 0x4194c1
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
test eax, eax
je 0x419552
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 0x41946f
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov edi, 0x43bc50
or ecx, 0xffffffff
xor eax, eax
mov dword [0x43c098], 0
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
not ecx
dec ecx
cmp ecx, eax
jae 0x419552
mov edi, 0x43bc50
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 0x419525
mov eax, dword [0x43c098]
test eax, eax
jne 0x4194c1
mov edi, 0x43bc50
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 0x419552
mov edi, 0x43bc50
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 [0x43c08c]
test eax, eax
jbe 0x419552
cmp eax, 2
ja 0x419552
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 0x419531
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x4dd
jne 0x41953b
mov edi, 0x43bc50
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, esi
jae 0x419552
mov edi, 0x43bc50
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.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncservice.cpp_:_getusername_error__d_n
push 0
push 0x43b3b0
call fcn.00402c70
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x41a6f0
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 [0x43c09c], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
mov eax, dword [0x43c09c]
push eax
push str.winvnc
push str._s_error:__d
lea ecx, [esp + 0x18]
push 0x100
push ecx
call fcn.00421d4a
mov eax, dword [esp + 0x124]
add esp, 0x14
lea edx, [esp + 0xc]
mov dword [esp + 8], eax
test esi, esi
mov dword [esp + 4], edx
je 0x41a773
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 0x41ab50
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 0x41ab7a
mov dword [esi], 0
mov eax, esi
pop esi
add esp, 0x190
ret
mov cx, word [esp + 4]
mov eax, esi
mov word [0x43c0b0], cx
mov dword [esi], 0xffffffff
pop esi
add esp, 0x190
ret

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

Disassembly:
push ecx
push esi
mov esi, ecx
mov dword [esp + 4], 1
mov eax, dword [esi + 4]
test eax, eax
jl 0x41ac08
call fcn.0041ac40
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [esi + 4], eax
pop esi
test eax, eax
jge 0x41ac20
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 1
push 6
push eax
call dword [sym.imp.WSOCK32.dll_setsockopt]
neg eax
sbb eax, eax
neg eax
dec eax
pop ecx
ret

Function at 0x41ad30
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 0x41ad48
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 0x41ad97
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x41ad3e
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
test eax, eax
jne 0x41ad91
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 0x41adf0
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov eax, dword [ecx + 4]
push edi
test eax, eax
mov dword [esp + 4], 1
jge 0x41ae06
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 0x41ae1c
xor eax, eax
pop edi
pop ecx
ret
push esi
push 8
call fcn.0041fd7b
add esp, 4
test eax, eax
je 0x41ae3d
mov ecx, eax
call fcn.0041abb0
mov esi, eax
test esi, esi
je 0x41ae3f
mov dword [esi + 4], edi
jmp 0x41ae4f
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 0x41aeb0
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 0x41aee3
mov eax, str._unavailable_
add esp, 0x14
ret

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

Function at 0x41af20
Capabilities:
Set socket configuration

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