joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401300
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebx + 0x3c]
push esi
push edi
mov edi, dword [eax + ebx + 0x50]
push 0x40
push 0x3000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x40132b
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push edi
push 0
push esi
call fcn.00409840
push esi
push ebx
call fcn.00401210
add esp, 0x14
test eax, eax
je 0x401323
call fcn.00401180
test eax, eax
je 0x401323
push esi
call section..text
add esp, 4
test eax, eax
je 0x401323
lea ecx, [ebp - 4]
push ecx
push 0x40
push edi
push esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x401323
mov edx, dword [esi + 0x3c]
pop edi
mov dword [edx + esi + 0x34], esi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x401380
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [esi + 0x3c]
mov eax, dword [eax + esi + 0x78]
mov ecx, dword [eax + esi + 0x24]
add eax, esi
add ecx, esi
push ebx
mov ebx, dword [eax + 0x20]
mov dword [ebp - 8], ecx
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0x18]
push edi
add ecx, esi
xor edx, edx
add ebx, esi
xor edi, edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], eax
test eax, eax
je 0x4013ed
mov eax, dword [ebx + edi*4]
add eax, esi
push str.shell
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4013d8
inc edi
cmp edi, dword [ebp - 4]
jb 0x4013b5
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + edi*2]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
pop edi
add eax, esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4021f0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
mov eax, dword [0x420854]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
push 2
mov dword [ebp - 0x24c], str.VBoxService.exe
mov dword [ebp - 0x248], str.VBoxTray.exe
mov dword [ebp - 0x244], str.vmware.exe
mov dword [ebp - 0x240], str.vmtoolsd.exe
mov dword [ebp - 0x238], 0x128
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
lea ecx, [ebp - 0x238]
push ecx
push eax
mov dword [ebp - 0x23c], eax
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4022fb
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x103
lea edx, [ebp - 0x10f]
push 0
push edx
mov byte [ebp - 0x110], 0
call fcn.00409840
add esp, 0xc
push 0
push 0
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x214]
push ecx
push 0
push 0
call edi
xor esi, esi
mov ecx, dword [ebp + esi*4 - 0x24c]
lea eax, [ebp - 0x110]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4022d0
test dl, dl
je 0x4022cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4022d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4022b0
xor eax, eax
jmp 0x4022d5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40230d
inc esi
cmp esi, 4
jl 0x4022a1
mov eax, dword [ebp - 0x23c]
lea edx, [ebp - 0x238]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
jne 0x402263
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040661c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, 1
pop esi
call fcn.0040661c
mov esp, ebp
pop ebp
ret

Function at 0x402390
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
push 4
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
cmp ebx, edi
jne 0x4023b3
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0x10000
push 0x40
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0x10000
push esi
push 3
push 0x30
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
test eax, eax
jne 0x4023f7
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 4], edi
jbe 0x402459
add esi, 4
nop
mov eax, dword [esi]
push str.VMware_Tools
push eax
call fcn.00407830
add esp, 8
test eax, eax
jne 0x402469
mov eax, dword [esi]
push 0x41d508
push eax
call fcn.00407830
add esp, 8
test eax, eax
jne 0x402469
mov eax, dword [esi]
push str.Virtual_Machine
push eax
call fcn.00407830
add esp, 8
test eax, eax
jne 0x402469
mov eax, dword [esi]
push str.VirtualBox_Guest
push eax
call fcn.00407830
add esp, 8
test eax, eax
jne 0x402469
inc edi
add esi, 0x24
cmp edi, dword [ebp - 4]
jb 0x402400
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
pop edi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402480
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419008
mov eax, dword fs:[0]
push eax
sub esp, 0x164
mov eax, dword [0x420854]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
xor ebx, ebx
call fcn.00406cdd
add esp, 4
push 0x104
mov esi, eax
push esi
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov eax, esi
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4024e2
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x2c]
call fcn.00403980
push 2
mov eax, 0x41d54c
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], ebx
call fcn.00403860
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x402513
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x170]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40254b
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov edi, edi
lea edx, [ebp - 0x170]
push edx
push esi
inc ebx
call edi
test eax, eax
jne 0x402530
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp ebx, 0x1e
jge 0x402564
cmp dword [ebp - 0x18], 0x10
jb 0x40255d
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00406611
add esp, 4
mov eax, 1
jmp 0x402578
cmp dword [ebp - 0x18], 0x10
jb 0x402576
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00406611
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040661c
mov esp, ebp
pop ebp
ret
Function at 0x402d40
Capabilities:
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov dword [ebp + 8], 0xff
rdtsc
xchg ebx, eax
rdtsc
sub eax, ebx
cmp eax, dword [ebp + 8]
jg 0x402d5b
xor eax, eax
jmp 0x402d60
mov eax, 1
pop ebx
pop ebp
ret

Function at 0x4030e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
xor edx, edx
xor ecx, ecx
test edi, edi
je 0x403110
push ebx
push esi
mov esi, dword [ebp + 8]
mov al, byte [edx + 0x41d618]
xor byte [ecx + esi], al
lea eax, [edx + 1]
xor edx, edx
mov ebx, 0x18
inc ecx
div ebx
cmp ecx, edi
jb 0x4030f4
pop esi
pop ebx
pop edi
pop ebp
ret 8

Function at 0x40661c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x420854]
jne 0x406626
repz ret
jmp fcn.0040bad5

Function at 0x4078b6
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x4078dd
call fcn.004092a6
mov dword [eax], esi
call fcn.00409293
push 0x16
pop esi
mov dword [eax], esi
call fcn.0040c8db
mov eax, esi
jmp 0x407932
test dword [ebp + 0xc], 0xfffffff9
jne 0x4078c3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40790a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004092b9
pop ecx
call fcn.00409293
mov eax, dword [eax]
jmp 0x407932
test al, 0x10
jne 0x407930
test al, 1
je 0x407930
test byte [ebp + 0xc], 2
je 0x407930
call fcn.004092a6
mov dword [eax], 5
call fcn.00409293
mov dword [eax], 0xd
jmp 0x407901
xor eax, eax
pop esi
pop ebp
ret
Function at 0x4142eb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x420854]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0040c142
and dword [ebp - 0x14], 0
cmp dword [0x422b94], 0
mov dword [ebp - 0x18], eax
jne 0x41439e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x414446
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x414446
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x422b94], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x422b98], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x422b9c], eax
call edi
push eax
call esi
mov dword [0x422ba4], eax
test eax, eax
je 0x41439e
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x422ba0], eax
mov eax, dword [0x422ba0]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x4143f7
cmp dword [0x422ba4], ecx
je 0x4143f7
push eax
call esi
push dword [0x422ba4]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x4143f7
test ebx, ebx
je 0x4143f7
call edi
test eax, eax
je 0x4143ee
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4143ee
test byte [ebp - 8], 1
jne 0x4143f7
or dword [ebp + 0x10], 0x200000
jmp 0x41442a
mov eax, dword [0x422b98]
cmp eax, dword [ebp - 0x18]
je 0x41442a
push eax
call esi
test eax, eax
je 0x41442a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41442a
mov eax, dword [0x422b9c]
cmp eax, dword [ebp - 0x18]
je 0x41442a
push eax
call esi
test eax, eax
je 0x41442a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x422b94]
call esi
test eax, eax
je 0x414446
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x414448
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040661c
leave
ret
Function at 0x401f10
Capabilities:
Get disk information
Inspect load icon resource
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x148
push ebx
push esi
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [esp + 0xc]
call fcn.00401000
lea ecx, [esp + 0x50]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push edx
call fcn.004012b0
test eax, eax
je 0x402021
lea eax, [esp + 0x50]
push 0x404030
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x402084
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x10]
call fcn.00401290
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
sub eax, 8
push 0
push eax
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 8
push edx
call ebx
mov eax, dword [esp + 0x2c]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x48]
push 0x38
push ecx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x50]
add esp, 0x3c
test eax, eax
mov eax, dword [esp + 0x10]
push edx
push eax
jne 0x401ffe
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401800
jmp 0x402084
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401a90
jmp 0x402084
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 1
xor ebx, ebx
test edi, esi
je 0x40206a
mov dl, bl
lea ecx, [esp + 0x10]
add dl, 0x41
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x40412c
lea ecx, [esp + 0x14]
call fcn.004020e2
lea ecx, [esp + 0xc]
mov eax, dword [esp + 0x10]
push eax
push 0
call fcn.00401cf0
add esi, esi
inc ebx
cmp ebx, 0x1a
jl 0x402039
lea ecx, [esp + 0xc]
call fcn.00401040
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
call fcn.00401030
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x148
ret 0x10

Function at 0x433005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43300c
nop
pop eax
nop
nop
nop
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x433030
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x401200
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov ecx, dword [ebp + 8]
push ebx
xor al, al
push esi
push edi
mov byte [esp + 0x13], al
test ecx, ecx
je 0x40131b
cmp dword [ecx], 0x756470
jne 0x40131b
cmp dword [ebp + 0xc], 0
je 0x40131b
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x40131b
lea edi, [esi + 4]
push edi
call fcn.0040aa70
mov ebx, eax
mov eax, dword [ebp + 0xc]
push esi
push eax
lea ecx, [ebx + 4]
push ecx
mov dword [esp + 0x24], ebx
mov dword [ebx], esi
call sub.ntdll.dll_memcpy
xor eax, eax
mov dword [esp + 0x2a], eax
mov dword [esp + 0x2e], eax
mov dword [esp + 0x32], eax
mov word [esp + 0x36], ax
mov eax, dword [ebp + 0x18]
add esp, 0x10
mov edx, 2
push eax
mov word [esp + 0x1c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp + 0x14]
mov word [esp + 0x1a], ax
mov dword [esp + 0x1c], ecx
test edi, edi
je 0x4012f1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push 0x10
lea edx, [esp + 0x1c]
push edx
push 0
push edi
push ebx
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
mov esi, eax
cmp esi, 0xffffffff
je 0x4012e9
mov edx, dword [ebp + 8]
push esi
add edx, 0x1c
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
sub edi, esi
add ebx, esi
test edi, edi
jne 0x401297
mov ebx, dword [esp + 0x14]
push ebx
mov byte [esp + 0x17], 1
call fcn.0040ac80
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x40130a
mov ebx, dword [esp + 0x14]
push ebx
mov byte [esp + 0x17], 1
call fcn.0040ac80
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x14]
push ebx
call fcn.0040ac80
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4013b0
Capabilities:
Create tcp socket
Create thread
Create udp socket

Disassembly:
sub esp, 0x10
push esi
push 0x24
call fcn.0040a860
add esp, 4
push 0
push 0
mov esi, eax
push 1
push 0
mov dword [esi], 0x756470
mov dword [esi + 4], 1
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x11
push 2
push 2
mov dword [esi + 0x10], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x4013fd
push esi
call fcn.00401330
add esp, 4
xor esi, esi
test esi, esi
je 0x401462
xor eax, eax
mov dword [esp + 6], eax
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov word [esp + 0x12], ax
mov eax, 2
push 0x10
lea ecx, [esp + 8]
mov word [esp + 8], ax
mov edx, dword [esi + 8]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x401444
push esi
call fcn.00401330
add esp, 4
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, dword [esp + 0x18]
push 0
push 0
push esi
push 0x401100
push 0
push 0
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x14], eax
mov eax, esi
pop esi
add esp, 0x10
ret
Function at 0x401470
Capabilities:
Create tcp socket
Create thread
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x10
push edi
mov edi, dword [esp + 0x1c]
xor eax, eax
test di, di
je 0x401576
push ebx
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x401575
push esi
push 0x24
call fcn.0040a860
add esp, 4
push 0
push 0
mov esi, eax
push 1
push 0
mov dword [esi], 0x756470
mov dword [esi + 4], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x11
push 2
push 2
mov dword [esi + 0x10], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x4014da
push esi
call fcn.00401330
add esp, 4
xor esi, esi
test esi, esi
je 0x401572
xor eax, eax
mov dword [esp + 0xe], eax
mov dword [esp + 0x12], eax
mov dword [esp + 0x16], eax
mov word [esp + 0x1a], ax
mov eax, dword [esp + 0x20]
mov ecx, 2
push edi
mov dword [esp + 0x14], eax
mov word [esp + 0x10], cx
call dword [sym.imp.WS2_32.dll_htons]
push 1
lea edx, [esp + 0x28]
push edx
push 4
mov word [esp + 0x1a], ax
mov byte [esp + 0x30], 1
mov eax, dword [esi + 8]
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [esi + 8]
push 0x10
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x401558
push esi
call fcn.00401330
add esp, 4
pop esi
pop ebx
xor eax, eax
pop edi
add esp, 0x10
ret
push 0
push 0
push esi
push 0x401100
push 0
push 0
mov dword [esi + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x14], eax
mov eax, esi
pop esi
pop ebx
pop edi
add esp, 0x10
ret

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

Disassembly:
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_WSASend]
push ebp
mov ebp, dword [esp + 0xc]
mov ecx, dword [ebp + 0x260]
push edi
push 0
push esi
push 0
lea eax, [esp + 0x1c]
push eax
push 1
lea edi, [esi + 0x1c]
push edi
push ecx
mov dword [esp + 0x2c], 0
call ebx
test eax, eax
je 0x401b50
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x401b50
cmp eax, 0x2733
jne 0x401b56
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0x260]
push 0
push esi
push 0
lea edx, [esp + 0x1c]
push edx
push 1
push edi
push eax
mov dword [esp + 0x2c], 0
call ebx
test eax, eax
jne 0x401b12
pop edi
pop ebp
mov al, 1
pop ebx
ret
pop edi
pop ebp
xor al, al
pop ebx
ret
Function at 0x401d60
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x1c
cmp dword [esp + 0x20], 0
push esi
push edi
mov esi, eax
mov edi, ecx
jne 0x401ef2
test ebx, ebx
je 0x401ef2
call fcn.0040df70
push eax
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esi + 0x18]
sub eax, 0
je 0x401e4e
sub eax, 1
jne 0x401f49
cmp byte [edi + 0x275], al
je 0x401dbc
add edi, 0x21c
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
add esp, 0x1c
ret
lea ecx, [edi + 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov edx, dword [edi + 0x27c]
push ebx
add edx, 0x44
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, dword [edi + 0x264]
mov ecx, dword [edi + 0x268]
mov edx, dword [edi + 0x26c]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x270]
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x278]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x27c]
lea eax, [esp + 8]
lea edx, [edi + 8]
push eax
mov dword [esp + 0x20], edx
push ecx
mov ecx, 3
mov edx, edi
mov dword [esp + 0x28], ebx
call fcn.00401740
add esp, 8
mov eax, edi
call fcn.00401cf0
test al, al
jne 0x401f49
mov byte [edi + 0x275], 1
pop edi
pop esi
add esp, 0x1c
ret
cmp byte [edi + 0x275], 0
je 0x401e67
add esi, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
add esp, 0x1c
ret
add dword [esi + 0x28], ebx
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x24]
jae 0x401e87
add dword [esi + 0x20], ebx
sub dword [esi + 0x1c], ebx
push edi
call fcn.00401ae0
add esp, 4
pop edi
pop esi
add esp, 0x1c
ret
lea edx, [esi + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, dword [edi + 0x268]
mov edx, dword [edi + 0x26c]
mov eax, dword [edi + 0x264]
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x278]
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0x30]
mov dword [esp + 0x18], ecx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x270]
mov dword [esp + 0x1c], edx
mov edx, dword [edi + 0x27c]
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x28]
push edx
mov ecx, 2
mov edx, edi
mov dword [esp + 0x28], eax
call fcn.00401740
add esp, 8
pop edi
pop esi
add esp, 0x1c
ret
add esi, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 4
lea edx, [esp + 0x2c]
push edx
mov eax, 1
push 0x80
mov word [esp + 0x34], ax
mov eax, dword [edi + 0x260]
push 0xffff
xor ecx, ecx
push eax
mov byte [edi + 0x275], 1
mov word [esp + 0x3e], cx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [edi + 0x260]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x260], 0xffffffff
pop edi
pop esi
add esp, 0x1c
ret
Function at 0x402020
Capabilities:
Create tcp socket
Create udp socket
Get system information on windows
Set socket configuration

Disassembly:
sub esp, 0x38
push esi
push 0x4c
call fcn.0040a860
mov esi, eax
add esp, 4
test esi, esi
je 0x4021aa
lea eax, [esp + 0x18]
push eax
mov dword [esi], 0x494f4350
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 0x2c]
lea eax, [esi + 0x20]
lea edx, [ecx + ecx]
push eax
mov dword [esi + 4], edx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0x10], eax
test eax, eax
je 0x40219f
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esi + 8], eax
test eax, eax
je 0x40219f
call fcn.0040dc00
mov dword [esi + 0xc], eax
test eax, eax
je 0x40219f
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov dword [esi + 0x14], eax
cmp eax, 0xffffffff
je 0x40219f
push 1
lea ecx, [esp + 0xb]
push ecx
push 4
push 0xffff
push eax
mov byte [esp + 0x1b], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esp + 0x44]
xor eax, eax
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov dword [esp + 0x12], eax
mov word [esp + 0x16], ax
mov eax, dword [esp + 0x40]
mov edx, 2
push ecx
mov word [esp + 0xc], dx
mov dword [esp + 0x10], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [esp + 0xc]
mov word [esp + 0xe], ax
mov eax, dword [esi + 0x14]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x40219f
mov ecx, dword [esi + 0x14]
push accept
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x40219f
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [esi + 0x18], eax
test eax, eax
je 0x40219f
mov edx, dword [esi + 0x14]
push 8
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x40219f
push edi
xor edi, edi
cmp dword [esi + 4], edi
jbe 0x40217f
mov eax, dword [esi + 0xc]
push 0
push 0
push esi
push 0x401f50
push 0
push eax
call fcn.0040dc30
inc edi
add esp, 0x18
cmp edi, dword [esi + 4]
jb 0x402161
mov ecx, dword [esi + 0xc]
push 0
push 0
push esi
push 0x401920
push 0
push ecx
call fcn.0040dc30
add esp, 0x18
pop edi
mov eax, esi
pop esi
add esp, 0x38
ret
push esi
call fcn.00401600
add esp, 4
xor eax, eax
pop esi
add esp, 0x38
ret