joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bc51
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.00420e10
mov eax, dword [0x443620]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.0040df55
movzx eax, word [eax]
cmp eax, 0x2e
je 0x40bc8c
cmp eax, 0x20
je 0x40bc8c
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40bcbf
push esi
call fcn.0040ba3b
test al, al
jne 0x40bcd2
push 0x800
lea eax, [ebp - 0x1004]
push eax
push esi
call fcn.0040d787
test al, al
je 0x40bcd2
push 0
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40bcd2
cmp byte [ebp + 0xc], 0
je 0x40bcce
push dword [ebp + 0x10]
push esi
call fcn.0040c055
xor eax, eax
jmp 0x40bcea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
push 2
pop eax
cmp ecx, eax
je 0x40bcea
xor eax, eax
cmp ecx, 3
sete al
inc eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00420983
leave
ret 0xc

Function at 0x40be1a
Capabilities:
Move file

Disassembly:
mov eax, 0x2004
call fcn.00420e10
mov eax, dword [0x443620]
xor eax, esp
mov dword [esp + 0x2000], eax
push ebx
push esi
mov esi, dword [esp + 0x2014]
push edi
mov edi, dword [esp + 0x2014]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
setne bl
test eax, eax
jne 0x40be96
push ebp
mov ebp, 0x800
lea eax, [esp + 0x1010]
push ebp
push eax
push edi
call fcn.0040d787
test al, al
je 0x40be95
push ebp
lea eax, [esp + 0x14]
push eax
push esi
call fcn.0040d787
test al, al
je 0x40be95
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1014]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
setne bl
pop ebp
mov ecx, dword [esp + 0x200c]
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00420983
add esp, 0x2004
ret 8

Function at 0x40c055
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.00420e10
mov eax, dword [0x443620]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
test eax, eax
jne 0x40c0af
push 0x800
lea eax, [ebp - 0x1004]
push eax
push esi
call fcn.0040d787
test al, al
je 0x40c0af
push dword [ebp + 0xc]
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
mov ecx, dword [ebp - 4]
mov al, bl
pop esi
xor ecx, ebp
pop ebx
call fcn.00420983
leave
ret 8
Function at 0x405128
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x40d160
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call sub.MFC42.DLL_CString::CString_1
lea eax, [esi + 0x6c]
push str.HLMonitor.Log
lea ecx, [esp + 0xc]
push eax
push ecx
mov dword [esp + 0x20], 0
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 8]
mov byte [esp + 0x18], 1
call fcn.0040b67e
lea ecx, [esp + 8]
mov byte [esp + 0x14], 0
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 4]
mov edx, dword [esi + 0x7c]
add esi, 0x7c
push 0
push 0x3021
push eax
mov ecx, esi
call dword [edx + 0x28]
test eax, eax
jne 0x4051aa
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
mov edx, dword [esi]
push 2
push 0
mov ecx, esi
call dword [edx + 0x30]
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0xc]
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x405860
Capabilities:
Log keystrokes
Terminate process

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40d220
push eax
mov dword fs:[0], esp
sub esp, 0x30
lea eax, [esp]
push ebx
push esi
mov esi, dword [esp + 0x50]
push edi
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebx, eax
mov al, byte [esp + 0x58]
test al, al
je 0x4058be
mov ecx, dword [esp + 0xc]
push ecx
push 0
push 0x411
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4059a4
push ebp
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
xor ebp, ebp
lea ecx, [esp + 0x18]
mov dword [esp + 0x48], ebp
call sub.MFC42.DLL_CString::CString_1
push 0x4114e8
lea ecx, [esp + 0x18]
mov dword [esp + 0x4c], 1
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
call fcn.0040b68a
lea edx, [esp + 0x14]
push edx
push 0x405ea0
push esi
call dword [sym.imp.USER32.dll_EnumChildWindows]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push esi
call dword [sym.imp.USER32.dll_BringWindowToTop]
push esi
call dword [sym.imp.USER32.dll_SetActiveWindow]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
mov eax, dword [esp + 0x20]
cmp eax, ebp
je 0x405949
push 1
push ebx
push esi
call dword [sym.imp.USER32.dll_AttachThreadInput]
test eax, eax
je 0x405949
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_SetFocus]
mov ebp, 1
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x24]
push 0x1c
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], 1
push ecx
push 1
mov word [esp + 0x34], 0xd
call sub.USER32.dll_SendInput
test ebp, ebp
pop ebp
je 0x405982
push 0
push ebx
push esi
call dword [sym.imp.USER32.dll_AttachThreadInput]
lea ecx, [esp + 0x14]
mov dword [esp + 0x44], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x44], 0xffffffff
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x54]
call sub.MFC42.DLL_CString::CString_1
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x44], 3
mov eax, dword [edi + 0x78]
lea edx, [esi + esi*8]
mov ecx, dword [eax + edx*8]
lea edx, [esp + 0x54]
push ecx
push 0x4114d8
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x60]
add esp, 0xc
mov ecx, edi
push eax
push 1
call fcn.00406bd0
mov ecx, dword [esp + 0x54]
push ecx
push 0x4114c8
push esi
mov ecx, edi
call fcn.00406d00
lea ecx, [esp + 0x54]
mov dword [esp + 0x44], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x3c
ret
Function at 0x405c90
Capabilities:
Get graphical window text

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40d29c
push eax
mov dword fs:[0], esp
sub esp, 0x110
lea eax, [esp + 0x10]
push ebx
push ebp
mov ebp, dword [esp + 0x128]
push esi
push edi
push 0xff
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
jle 0x405e31
mov edi, dword [esp + 0x134]
lea ecx, [esp + 0x10]
push edi
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov dword [esp + 0x128], ebx
cmp dword [ecx - 8], ebx
je 0x405e1d
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
push 0x7c
lea ecx, [esp + 0x14]
mov byte [esp + 0x12c], 1
call sub.MFC42.DLL_CString::Find_1
mov esi, eax
cmp esi, ebx
jle 0x405d88
lea edx, [esp + 0x18]
push esi
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x12c], 2
call fcn.0040b67e
lea ecx, [esp + 0x18]
mov byte [esp + 0x128], 1
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
mov eax, dword [eax - 8]
sub eax, esi
dec eax
push eax
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x12c], 3
call fcn.0040b67e
lea ecx, [esp + 0x1c]
mov byte [esp + 0x128], 1
call sub.MFC42.DLL_CString::CString
jmp 0x405d9f
lea edx, [esp + 0x10]
lea ecx, [esp + 0x14]
push edx
call fcn.0040b67e
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Empty
mov esi, dword [esp + 0x14]
cmp dword [esi - 8], ebx
je 0x405e00
cmp dword [edi + 8], ebx
je 0x405dcf
lea eax, [esp + 0x20]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x405e4c
mov eax, dword [edi + 8]
mov esi, dword [esp + 0x14]
cmp eax, ebx
jne 0x405e00
lea eax, [esp + 0x20]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x405df7
cmp cl, bl
je 0x405df3
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x405df7
add eax, 2
add esi, 2
cmp cl, bl
jne 0x405dd3
xor eax, eax
jmp 0x405dfc
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x405e56
lea ecx, [esp + 0x14]
mov byte [esp + 0x128], bl
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebx
jne 0x405cf6
lea ecx, [esp + 0x10]
mov dword [esp + 0x128], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x120]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x11c
ret
lea ecx, [esp + 0x14]
mov dword [edi + 0xc], ebp
push ecx
jmp 0x405e5e
lea edx, [esp + 0x14]
mov dword [edi + 0xc], ebp
push edx
lea ecx, [edi + 4]
call fcn.0040b67e
lea ecx, [esp + 0x14]
mov byte [esp + 0x128], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x128], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
jmp 0x405e33
Function at 0x4072ab
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x40d4d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10c
push esi
mov esi, ecx
push edi
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::CString_1
lea eax, [esi + 0x6c]
push str.HLMonitor.ini
lea ecx, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x128], 0
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x120], 1
call fcn.0040b67e
lea ecx, [esp + 0xc]
mov byte [esp + 0x11c], 0
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edx
lea eax, [esp + 0x14]
push 0x104
push eax
push 0x411c28
push str.Server
push str.SMTP
call edi
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esi + 0xa4]
call fcn.0040b68a
mov edx, dword [esp + 8]
push edx
push 0x19
push str.Port
push str.SMTP
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [esi + 0xa8], eax
mov eax, dword [esp + 8]
push eax
lea ecx, [esp + 0x14]
push 0x104
push ecx
push 0x411c28
push str.From
push str.SMTP
call edi
lea edx, [esp + 0x10]
lea ecx, [esi + 0xac]
push edx
call fcn.0040b68a
lea ecx, [esp + 8]
mov dword [esp + 0x11c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x114]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x118
ret
Function at 0x407440
Capabilities:
Get session user name
Get user security identifier

Disassembly:
mov eax, 0x12a4
call fcn.0040b920
mov eax, dword [esp + 0x12a8]
push ebx
push esi
mov esi, ecx
mov ecx, dword [esp + 0x12b4]
xor ebx, ebx
cmp ecx, ebx
push edi
mov dword [esi + 4], eax
je 0x407468
mov eax, ecx
mov dword [esi + 8], eax
lea eax, [esp + 0x1c]
mov edi, 1
push eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], 0xf01ff
mov dword [esi + 0x4c], 0x10
mov dword [esi + 0x50], 2
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x68], ebx
mov dword [esi], vtable.CNTService.0
mov dword [esp + 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov edx, dword [esp + 0x2c]
xor ecx, ecx
cmp edx, 2
sete cl
mov dword [esi + 0x40], ecx
mov dword [0x411c2c], edi
mov dword [0x411c30], esi
mov eax, dword [esi + 0x40]
cmp eax, ebx
mov dword [esi + 0x18], 0x10
mov dword [esi + 0x28], ebx
je 0x4075b9
mov eax, 0xff
mov ecx, 0x40
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
xor eax, eax
lea edi, [esp + 0xb0]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x1b0]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x2b0]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x10]
lea eax, [esp + 0xb0]
push edx
push eax
mov dword [esp + 0x1c], 0x1000
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea ecx, [esp + 0x18]
lea edx, [esp + 0xc]
push ecx
lea eax, [esp + 0x1b4]
push edx
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x2bc]
push ecx
lea eax, [esp + 0xc0]
push edx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x4075b9
lea ecx, [esp + 0x2b0]
push ecx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x4075b9
lea edx, [esp + 0x2b0]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
push edi
call sub.MFC42.DLL_operatornew
add esp, 4
lea ecx, [esp + 0x2b0]
mov dword [esi + 0x3c], eax
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CopySid]
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x12a4
ret 8
Function at 0x407787
Capabilities:
Create service
Persist via run registry key
Set registry value

Disassembly:
sub esp, 0x508
push ebx
push esi
mov esi, ecx
call fcn.00408720
lea eax, [esp + 0x110]
push 0x3ff
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4077d8
lea ecx, [esp + 0x10]
push 0x100
push ecx
mov ecx, esi
call fcn.004082a0
mov edx, dword [esi + 8]
push eax
push edx
push str.Unable_to_install__s____s_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
xor eax, eax
pop esi
pop ebx
add esp, 0x508
ret
mov eax, dword [esi + 0x40]
push ebp
cmp eax, ebx
push edi
mov dword [esp + 0x10], ebx
jne 0x407853
mov ecx, dword [str.SoftwareMicrosoftWindowsCurrentVersionRunServices]
lea eax, [esp + 0x14]
push eax
push ecx
push reloc.WS2_32.dll_bind
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x407936
lea edi, [esp + 0x118]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esi + 4]
lea edx, [esp + 0x118]
not ecx
push ecx
mov ecx, dword [esp + 0x18]
push edx
push 2
push ebx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov dword [esp + 0xc], 1
mov eax, dword [esp + 0xc]
pop ebp
pop esi
pop ebx
add esp, 0x508
ret
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, ebx
je 0x407945
mov ecx, dword [esi + 0x4c]
cmp ecx, 1
je 0x407877
cmp ecx, 2
jne 0x407883
mov eax, dword [esi + 0x50]
cmp eax, ebx
je 0x407887
cmp eax, 1
je 0x407887
xor eax, eax
jmp 0x40788a
lea eax, [esi + 0x5c]
mov edx, dword [esi + 0x68]
push edx
mov edx, dword [esi + 0x64]
push edx
mov edx, dword [esi + 0x60]
push edx
push eax
mov eax, dword [esi + 0x58]
lea edx, [esp + 0x128]
push eax
mov eax, dword [esi + 0x54]
push edx
mov edx, dword [esi + 0x50]
push eax
mov eax, dword [esi + 0x48]
push edx
mov edx, dword [esi + 4]
push ecx
mov ecx, dword [esi + 8]
push eax
push ecx
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov edi, eax
cmp edi, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x4078ea
mov eax, dword [esi + 8]
push eax
push str._s_installed._n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push edi
call ebx
mov dword [esp + 0x10], 1
jmp 0x40790a
lea ecx, [esp + 0x18]
push 0x100
push ecx
mov ecx, esi
call fcn.004082a0
push eax
push str.CreateService_failed____s_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push ebp
call ebx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407936
mov eax, dword [esi]
lea ecx, [esp + 0x118]
push 7
push ecx
mov ecx, esi
call dword [eax + 0x30]
mov edx, dword [esi]
push 0xffffffffffffffff
push 4
push str.Service_installed
mov ecx, esi
call dword [edx + 0x38]
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x508
ret
lea edx, [esp + 0x18]
push 0x100
push edx
mov ecx, esi
call fcn.004082a0
push eax
push str.OpenSCManager_failed____s_n
call dword [sym.imp.MSVCRT.dll_printf]
mov eax, dword [esp + 0x18]
add esp, 8
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x508
ret
Function at 0x408930
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
mov eax, dword [esp + 8]
push esi
push 1
push 0
push 0
push 0
push eax
mov esi, ecx
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x408986
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 8]
push ecx
push edx
mov ecx, esi
call fcn.00408990
test eax, eax
je 0x40896e
mov eax, 1
pop esi
ret 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
xor eax, eax
pop esi
ret 0xc

Function at 0x408cd0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
xor eax, eax
push esi
mov esi, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp + 8], eax
push edi
mov dword [esp + 0x10], eax
mov edi, ecx
push esi
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x408d1a
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x408d45
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0x24]
mov word [esp + 0xa], ax
push edx
lea eax, [esp + 0xc]
push 0x10
push eax
mov ecx, edi
call fcn.00408d60
pop edi
pop esi
add esp, 0x10
ret 0xc
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 0xc
Function at 0x408d60
Capabilities:
Connect socket

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebx, eax
test ebx, ebx
jne 0x408d9b
mov ecx, dword [esi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret 0xc
mov edx, dword [esi + 4]
mov ebp, dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0x10
push ebx
push edx
call ebp
cmp eax, 0xffffffff
jne 0x408dcb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret 0xc
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
mov eax, dword [esi + 4]
push edi
push 0
push 0
push 0
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSAConnect]
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp edi, 0xffffffff
jne 0x408e46
cmp eax, 0x2733
jne 0x408e46
mov edx, dword [esp + 0x50]
mov ecx, dword [esi + 0xc]
push 1
push edx
lea eax, [esp + 0x18]
push 0
push eax
push 2
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ecx
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
test eax, eax
je 0x408e25
or edi, edi
jmp 0x408e46
mov edx, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push ebx
push edx
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
jne 0x408e3e
or edi, eax
jmp 0x408e46
mov edi, dword [esp + 0x2c]
neg edi
sbb edi, edi
mov eax, dword [esi + 4]
push 0
push ebx
push eax
call ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
test edi, edi
pop edi
pop esi
pop ebp
pop ebx
sete al
add esp, 0x34
ret 0xc

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

Disassembly:
sub esp, 0x10
xor edx, edx
xor eax, eax
mov dword [esp + 8], edx
mov ecx, dword [ecx + 4]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x14]
push eax
mov dword [esp + 4], eax
mov dword [esp + 8], eax
push eax
mov dword [esp + 0x14], edx
lea eax, [esp + 0xc]
lea edx, [esp + 8]
push eax
push edx
lea eax, [esp + 0x18]
push 1
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
jne 0x408f62
mov eax, dword [esp]
add esp, 0x10
ret 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
neg eax
add esp, 0x10
ret 8

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

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x14]
xor eax, eax
mov ecx, dword [ecx + 4]
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 4], edx
push 0
push 0
lea edx, [esp + 8]
mov dword [esp + 0x10], eax
push 0
push edx
lea eax, [esp + 0x14]
push 1
push eax
push ecx
mov dword [esp + 0x1c], 0
call dword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
jne 0x40915f
mov eax, dword [esp]
add esp, 0xc
ret 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
neg eax
add esp, 0xc
ret 8
Function at 0x409370
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
mov ebp, dword [esp + 0x60]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x64]
push ecx
mov dword [esp + 0x1c], ecx
push ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x20], eax
push ebp
push ecx
lea eax, [esp + 0x20]
push edx
mov edx, dword [esi + 4]
push eax
lea ecx, [esp + 0x2c]
push 1
push ecx
push edx
mov dword [esp + 0x34], 0
call dword [sym.imp.WS2_32.dll_WSASendTo]
test eax, eax
je 0x40948c
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4094a4
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 4]
push 2
push eax
push ecx
call ebx
cmp eax, 0xffffffff
je 0x4094f5
mov edx, dword [esi + 0x10]
mov ecx, dword [esp + 0x68]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x1c], edx
push 1
push ecx
lea edx, [esp + 0x24]
push 0
push edx
push 2
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov edi, eax
test edi, edi
jne 0x4094bb
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 4]
lea eax, [esp + 0x24]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x4094e9
mov eax, dword [esp + 0x2c]
push edi
test eax, eax
jne 0x4094eb
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 4]
push eax
push ecx
call ebx
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x64]
push edi
push edi
push ebp
push edx
lea ecx, [esp + 0x20]
push eax
mov eax, dword [esi + 4]
push ecx
lea edx, [esp + 0x2c]
push 1
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSASendTo]
test eax, eax
jne 0x4093da
mov ecx, dword [esi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 0x18
mov edx, dword [esi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x40
ret 0x18
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 4]
push 0
push ecx
push edx
call ebx
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
cmp edi, 0x102
pop edi
pop esi
sete al
pop ebp
add eax, 0xfffffffd
pop ebx
add esp, 0x40
ret 0x18
push 0
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 4]
push ecx
push edx
call ebx
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x40
ret 0x18