joyce8/EMBER2024-capa huggingface dataset:
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 0x40c2f0
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 0x40c304
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov eax, ecx
ret

Function at 0x40c360
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 0x40c3f1
test esi, esi
jne 0x40c3ec
mov ecx, 0x41c654
test eax, eax
mov eax, str.down
jne 0x40c39c
mov eax, 0x41c654
push ecx
push eax
push edi
push 0x41c5e4
push 9
push 0x41ee48
call fcn.00401950
neg esi
sbb esi, esi
and esi, 0xfffffffe
add esi, 2
push esi
push ebx
call fcn.0040c330
add esp, 0x20
push edi
call ebp
test ah, 0x80
mov eax, str.down
jne 0x40c3d6
mov eax, 0x41c654
push eax
push edi
push 0x41c588
push 9
push 0x41ee48
call fcn.00401950
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
ret
test esi, esi
je 0x40c3ec
mov ecx, str.down
jmp 0x40c38e
Function at 0x40c920
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4143c6
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.0040d530
xor ebx, ebx
lea ecx, [esi + 0x64]
mov dword [esp + 0x4c], ebx
call fcn.0040ee90
mov ebp, dword [esp + 0x54]
lea eax, [esi + 0xc8]
push 0x101
push eax
mov byte [esp + 0x54], 1
mov dword [esi], ebp
call fcn.00411aa0
mov ecx, dword [0x41fb18]
add esp, 8
mov dword [esp + 0x14], 0x30
mov dword [esp + 0x18], ebx
push 0x7f00
push ebx
mov dword [esp + 0x24], 0x40ceb0
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 [0x41fb18]
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 0x40ca37
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x40cab8
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.0040d560
test eax, eax
jne 0x40ca75
push ebx
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x40cab8
mov eax, dword [0x41fb18]
mov edi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x66
push eax
call edi
mov dword [esi + 0x1cc], eax
mov ecx, dword [0x41fb18]
push 0x86
push ecx
call edi
mov dword [esi + 0x1d0], eax
mov edx, dword [0x41fb18]
push 0x68
push edx
call dword [sym.imp.USER32.dll_LoadMenuA]
mov ecx, esi
mov dword [esi + 0x6c], eax
call fcn.0040cb50
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 0x40cbc0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x10c
lea eax, [esp + 0xc]
push ebx
push ebp
push pe_nt_image_headers32
push eax
call dword [sym.imp.WSOCK32.dll_gethostname]
test eax, eax
je 0x40cc03
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 0x40cc3b
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 0x40cd12
push esi
push edi
mov dword [esp + 0x10], 0
xor esi, esi
cmp word [ebx + 0xa], si
jle 0x40ccb3
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 0x41c818
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 0x40cc64
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 0x40ccf8
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 0x41c814
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 0x40cc5c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret

Function at 0x40e280
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 0x40e2c1
mov eax, dword [esp + 0x18]
pop esi
add esp, 8
ret 0xc
cmp dword [esp + 4], esi
je 0x40e2d2
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 0x40e2e2
mov eax, dword [esp + 0x14]
pop esi
add esp, 8
ret 0xc
Function at 0x40e2f0
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 0x40e340
cmp dword [esp], 8
jg 0x40e340
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 0x40e350
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 0x40e398
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8
cmp dword [esp + 0x10], esi
je 0x40e3aa
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 0x40e3c7
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 0x40e3f1
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 0x40e40d
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 0x40eb40
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 0x40f0e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4144cb
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 0x41ced4
push 9
push 0x41ee48
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 0x41f6b8
call fcn.004034d0
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 0x40f26e
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 0x411aa0
Capabilities:
Get session user name

Disassembly:
push ecx
mov eax, dword [0x41faf0]
push ebx
push esi
cmp eax, 2
push edi
jne 0x411b86
call fcn.004120d0
test eax, eax
je 0x411b81
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
test eax, eax
je 0x411c12
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 0x411b2f
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov edi, 0x41f6b8
or ecx, 0xffffffff
xor eax, eax
mov dword [0x41fafc], 0
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
not ecx
dec ecx
cmp ecx, eax
jae 0x411c12
mov edi, 0x41f6b8
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 0x411be5
mov eax, dword [0x41fafc]
test eax, eax
jne 0x411b81
mov edi, 0x41f6b8
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 0x411c12
mov edi, 0x41f6b8
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 [0x41faf0]
test eax, eax
jbe 0x411c12
cmp eax, 2
ja 0x411c12
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 0x411bf1
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x4dd
jne 0x411bfb
mov edi, 0x41f6b8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, esi
jae 0x411c12
mov edi, 0x41f6b8
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 0x41dcf0
push 0
push 0x41ee48
call fcn.00401950
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x4122d0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41faf0]
sub esp, 0x10
dec eax
mov dword [0x41fb08], 1
push esi
push edi
je 0x412332
dec eax
jne 0x412378
lea eax, [esp + 8]
mov dword [esp + 8], str.winvnc
push eax
mov dword [esp + 0x10], 0x412380
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
test eax, eax
jne 0x412378
push str.StartServiceCtrlDispatcher_failed.
call fcn.00412ac0
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 0x412378
push str.RegisterServiceProcess
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x412378
push 1
push 0
call esi
call fcn.00413900
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]
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret
Function at 0x412ac0
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 [0x41fb00], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
mov eax, dword [0x41fb00]
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 0x412b3f
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 [0x41fb14], 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 [0x41fb14]
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
Function at 0x4010c3
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push dword [ebp + 8]
mov esi, eax
mov eax, dword [ebp + 0x18]
and dword [esi], 0
mov byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x40113b
cmp word [ebx + 8], 2
jne 0x401118
cmp word [ebx + 0xa], 4
jne 0x401118
mov edi, dword [ebx + 0xc]
jmp 0x401112
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00401060
test eax, eax
mov dword [esi], eax
je 0x401136
lea esi, [eax + 0x1c]
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x4010f6
mov esi, dword [ebp + 0x18]
push 0x400
push dword [ebx]
push esi
call fcn.0040ce00
add esp, 0xc
mov byte [esi + 0x400], 0
xor eax, eax
jmp 0x401161
push 8
pop eax
jmp 0x401161
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x401161
dec ecx
je 0x40115c
dec ecx
je 0x401155
dec ecx
jmp 0x401161
mov eax, 0x2afb
jmp 0x401161
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x14

Function at 0x40170f
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1b0]
sub esp, 0x230
cmp dword [0x424118], 0
mov eax, dword [0x4220b8]
mov dword [ebp + 0x1ac], eax
mov dword [ebp - 0x80], str.getaddrinfo
mov dword [ebp - 0x7c], 0x4012ea
mov dword [ebp - 0x78], str.getnameinfo
mov dword [ebp - 0x74], 0x401564
mov dword [ebp - 0x70], str.freeaddrinfo
mov dword [ebp - 0x6c], fcn.004012b1
jne 0x401864
push 0x104
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40185a
push ebx
push esi
push edi
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push eax
call fcn.0040cc90
lea eax, [ebp + 0xa0]
push str.ws2_32
push eax
call fcn.0040cca0
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x10
lea eax, [ebp + 0xa0]
push eax
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4017d1
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x4017cd
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
jne 0x40181d
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push eax
call fcn.0040cc90
lea eax, [ebp + 0xa0]
push str.wship6
push eax
call fcn.0040cca0
add esp, 0x10
lea eax, [ebp + 0xa0]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x401857
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x401819
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x401857
xor ebx, ebx
push dword [ebp + ebx*8 - 0x80]
push esi
call edi
test eax, eax
mov dword [ebp + ebx*8 - 0x7c], eax
je 0x401836
inc ebx
cmp ebx, 3
jl 0x40181f
jmp 0x40183f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x401857
xor eax, eax
mov ecx, dword [ebp + eax - 0x7c]
mov dword [eax + 0x422d20], ecx
add eax, 8
cmp eax, 0x18
jl 0x401845
pop edi
pop esi
pop ebx
mov dword [0x424118], 1
movzx eax, word [ebp + 0x1b8]
mov ecx, dword [ebp + 0x1ac]
mov eax, dword [eax*8 + 0x422d20]
call fcn.0040f65e
add ebp, 0x1b0
leave
ret 4