joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000fa55
Capabilities:
Contain obfuscated stackstrings

Disassembly:
inc ebx
clc
and byte [ebp - 0x354], 0
and byte [ebp - 0x353], 0
mov byte [ebp - 0x352], 0xda
and byte [ebp - 0x351], 0
mov byte [ebp - 0x350], 0x62
mov byte [ebp - 0x34f], 0x40
mov byte [ebp - 0x34e], 0x51
mov byte [ebp - 0x34d], 0x75
mov byte [ebp - 0x34c], 0x57
mov byte [ebp - 0x34b], 0x4a
mov byte [ebp - 0x34a], 0x46
mov byte [ebp - 0x349], 0x40
mov byte [ebp - 0x348], 0x56
mov byte [ebp - 0x347], 0x56
mov byte [ebp - 0x346], 0x6d
mov byte [ebp - 0x345], 0x40
mov byte [ebp - 0x344], 0x44
mov byte [ebp - 0x343], 0x55
mov byte [ebp - 0x342], 0x25
lea eax, [ebp - 0x354]
push eax
call fcn.1000f255
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.1000f20a
add esp, 0xc
mov dword [ebp - 0x68c], eax
call dword [ebp - 0x68c]
mov dword [ebp - 0x674], eax
mov dword [ebp - 0x384], 4
and byte [ebp - 0x334], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x333]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x670], 4
and byte [ebp - 0x3c4], 0
and byte [ebp - 0x3c3], 0
mov byte [ebp - 0x3c2], 0x99
and byte [ebp - 0x3c1], 0
mov byte [ebp - 0x3c0], 0x21
mov byte [ebp - 0x3bf], 3
mov byte [ebp - 0x3be], 0x12
mov byte [ebp - 0x3bd], 0x2b
mov byte [ebp - 0x3bc], 9
mov byte [ebp - 0x3bb], 2
mov byte [ebp - 0x3ba], 0x13
mov byte [ebp - 0x3b9], 0xa
mov byte [ebp - 0x3b8], 3
mov byte [ebp - 0x3b7], 0x20
mov byte [ebp - 0x3b6], 0xf
mov byte [ebp - 0x3b5], 0xa
mov byte [ebp - 0x3b4], 3
mov byte [ebp - 0x3b3], 0x28
mov byte [ebp - 0x3b2], 7
mov byte [ebp - 0x3b1], 0xb
mov byte [ebp - 0x3b0], 3
mov byte [ebp - 0x3af], 0x27
mov byte [ebp - 0x3ae], 0x66
lea eax, [ebp - 0x3c4]
push eax
call fcn.1000f255
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.1000f20a
add esp, 0xc
mov dword [ebp - 0x538], eax
and byte [ebp - 0x3ec], 0
and byte [ebp - 0x3eb], 0
mov byte [ebp - 0x3ea], 0x11
and byte [ebp - 0x3e9], 0
mov byte [ebp - 0x3e8], 0xa9
mov byte [ebp - 0x3e7], 0x8b
mov byte [ebp - 0x3e6], 0x9a
mov byte [ebp - 0x3e5], 0xa3
mov byte [ebp - 0x3e4], 0x81
mov byte [ebp - 0x3e3], 0x8a
mov byte [ebp - 0x3e2], 0x9b
mov byte [ebp - 0x3e1], 0x82
mov byte [ebp - 0x3e0], 0x8b
mov byte [ebp - 0x3df], 0xa6
mov byte [ebp - 0x3de], 0x8f
mov byte [ebp - 0x3dd], 0x80
mov byte [ebp - 0x3dc], 0x8a
mov byte [ebp - 0x3db], 0x82
invalid
invalid
invalid
Function at 0x10011fb0
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov byte [ebp - 9], 0
lea eax, [ebp - 8]
push eax
push 0x10016c30
push 1
push 0
push 0x10016d00
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jl 0x1001208b
push str.rootWMI
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp - 0x10], eax
push 0x1001aec0
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [eax + 0xc]
call edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 4], 0
jl 0x1001207d
lea ecx, [ebp - 0x14]
push ecx
push 0x100151cc
mov edx, dword [0x1001aec0]
mov eax, dword [edx]
mov ecx, dword [0x1001aec0]
push ecx
mov edx, dword [eax]
call edx
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jl 0x1001207d
push 0
push 0
push 3
push 4
push 0
push 0
push 0xa
mov eax, dword [0x1001aec0]
push eax
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jl 0x1001206f
mov byte [ebp - 9], 1
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [edx + 8]
call ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [eax + 8]
call edx
mov al, byte [ebp - 9]
mov esp, ebp
pop ebp
ret

Function at 0x100120a0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x10019030]
xor eax, ebp
mov dword [ebp - 4], eax
push str._ACPIWMI__Notify_Arrive
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [str.EventID]
mov dword [ebp - 0x40], eax
mov ecx, dword [0x10016e6c]
mov dword [ebp - 0x3c], ecx
mov edx, dword [0x10016e70]
mov dword [ebp - 0x38], edx
mov eax, dword [0x10016e74]
mov dword [ebp - 0x34], eax
push 0x2c
push 0
lea ecx, [ebp - 0x30]
push ecx
call fcn.100064c0
add esp, 0xc
push 0
push 0
lea edx, [ebp - 0x50]
push edx
push 0
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [edx]
push ecx
mov eax, dword [edx + 0x10]
call eax
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x1001212c
mov ecx, dword [ebp - 0x48]
mov dword [0x1001aed0], ecx
mov edx, dword [0x1001aecc]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100021ac
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10012170
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10014140
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x10019030]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.ASUS_WMI_ACPI_INTERFACES
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
jne 0x100121af
xor al, al
jmp 0x100122f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x100121c3
mov al, 1
jmp 0x100122f9
lea eax, [ebp - 0x10]
push eax
push 0x10016c80
push 4
push 0
push 0x10016d20
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x18], eax
push 0x264
call fcn.10003f64
add esp, 4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x10012201
mov ecx, dword [ebp - 0x24]
call fcn.10002110
mov dword [ebp - 0x30], eax
jmp 0x10012208
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
mov dword [0x1001aeb0], edx
mov eax, dword [0x1001aeb0]
mov ecx, dword [eax]
mov edx, dword [0x1001aeb0]
push edx
mov eax, dword [ecx + 4]
call eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [0x1001aeb0]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ecx + 0xc]
call eax
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x14]
push ecx
push 0x10016c40
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [eax]
call edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
mov dword [0x1001aecc], eax
push str.SELECT__FROM_ASWMIEvent
lea ecx, [ebp - 0x28]
call fcn.10001ea0
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 4], 0
push 0x10016f9c
lea ecx, [ebp - 0x2c]
call fcn.10001ea0
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
push eax
push 0
push 0x80
mov ecx, dword [ebp - 0x38]
call fcn.10001f60
push eax
mov ecx, dword [ebp - 0x40]
call fcn.10001f60
push eax
mov ecx, dword [0x1001aec0]
push ecx
mov edx, dword [0x1001aec0]
mov eax, dword [edx]
mov ecx, dword [eax + 0x5c]
call ecx
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.10001f40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10001f40
cmp dword [ebp - 0x18], 0
jl 0x100122f7
mov al, 1
jmp 0x100122f9
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x10012f00
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0xc], 0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.10012640
add esp, 0x10
mov byte [ebp - 0xd], al
movzx ecx, byte [ebp - 0xd]
test ecx, ecx
je 0x10012f3c
cmp dword [ebp - 4], 1
je 0x10012f40
cmp dword [ebp - 4], 2
je 0x10012f40
xor al, al
jmp 0x10012fa2
mov edx, dword [ebp - 8]
push edx
call fcn.10002721
add esp, 4
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov byte [ecx], 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0xd], al
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.10001210
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.10003e3b
add esp, 4
mov al, byte [ebp - 0xd]
mov esp, ebp
pop ebp
ret
Function at 0x401664
Capabilities:
Encode data using xor
Encrypt data using blowfish

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
xor eax, eax
mov ecx, dword [esi]
mov edx, dword [eax + 0x41f030]
mov dword [eax + ecx], edx
add eax, 4
cmp eax, 0x48
jl 0x401673
xor eax, eax
mov ecx, 0x100
mov edx, dword [esi + 4]
mov ebx, dword [eax + 0x41f078]
mov dword [eax + edx], ebx
add eax, 4
dec ecx
jne 0x40168d
cmp eax, 0x1000
jl 0x401688
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], edi
mov eax, edi
cdq
idiv ebx
inc edi
mov al, byte [edx + ecx]
mov byte [ebp + 0xf], al
mov eax, edi
cdq
idiv ebx
inc edi
mov al, byte [edx + ecx]
mov byte [ebp + 0xe], al
mov eax, edi
cdq
idiv ebx
inc edi
mov al, byte [edx + ecx]
mov byte [ebp + 0xd], al
mov eax, edi
cdq
idiv ebx
inc edi
mov al, byte [edx + ecx]
mov edx, dword [ebp - 4]
add dword [ebp - 4], 4
mov byte [ebp + 0xc], al
mov eax, dword [esi]
add eax, edx
mov edx, dword [ebp + 0xc]
xor dword [eax], edx
cmp dword [ebp - 4], 0x48
jl 0x4016af
xor edi, edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
lea eax, [ebp - 0xc]
mov ecx, esi
push eax
lea eax, [ebp - 8]
push eax
call fcn.0040104e
mov eax, dword [esi]
mov ecx, dword [ebp - 8]
mov dword [edi + eax], ecx
mov eax, dword [esi]
mov ecx, dword [ebp - 0xc]
mov dword [edi + eax + 4], ecx
add edi, 8
cmp edi, 0x48
jl 0x4016fd
push 4
pop edi
mov ebx, 0x80
lea eax, [ebp - 0xc]
mov ecx, esi
push eax
lea eax, [ebp - 8]
push eax
call fcn.0040104e
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 8]
mov dword [edi + eax - 4], ecx
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0xc]
mov dword [edi + eax], ecx
add edi, 8
dec ebx
jne 0x40172d
cmp edi, 0x1004
jl 0x401728
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x404819
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov al, byte [0x422120]
push ebx
push esi
push edi
mov ebx, ecx
push 0x40
mov byte [ebp - 0x110], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x10f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x214]
mov esi, 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x110]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 4
jb 0x404880
lea eax, [ebp - 0x110]
push str.Media
push eax
call fcn.00417450
pop ecx
pop ecx
and dword [ebp - 8], 0
and dword [ebp - 4], 0
lea eax, [ebp - 0x110]
lea ecx, [ebp - 0xc]
push eax
push 0x4209b4
push 0x4209a4
push 0x433
mov dword [ebp - 0xc], ebx
call fcn.0040bb2c
mov esi, eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404bb8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, ecx
push dword [ebp + 8]
xor ebx, ebx
call fcn.004176d0
mov edi, eax
mov eax, dword [esi]
pop ecx
cmp dword [eax + 0x64], ebx
je 0x404c22
add eax, 0x68
cmp byte [eax], bl
je 0x404c22
push ebx
push 0x80
push 4
push ebx
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x404c1e
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 4]
push ebx
push eax
push edi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x404c25
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x407477
Capabilities:
Set socket configuration

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
mov esi, ecx
je 0x4074d2
mov eax, dword [esi + 0x24]
lea ebx, [esi + 0x24]
mov ecx, ebx
call dword [eax + 4]
mov edi, eax
add eax, 0xffffffd0
neg edi
sbb edi, edi
and edi, eax
je 0x4074d2
mov eax, dword [esp + 0x10]
cmp dword [edi + 0x44], eax
jne 0x4074b0
mov ecx, edi
call fcn.004129a2
cmp eax, 1
jne 0x407512
mov eax, dword [ebx]
mov ecx, edi
add edi, 0x30
neg ecx
sbb ecx, ecx
and ecx, edi
push ecx
mov ecx, ebx
call dword [eax + 8]
mov ecx, eax
add eax, 0xffffffd0
neg ecx
sbb ecx, ecx
and ecx, eax
mov edi, ecx
jne 0x40749b
push 0x8304
call fcn.00416ff4
xor ebx, ebx
pop ecx
cmp eax, ebx
je 0x40751e
push dword [esp + 0x14]
lea ecx, [esi + 0x60]
push dword [esp + 0x14]
push dword [esi + 0x90]
push dword [esi + 0x98]
push ecx
mov ecx, eax
push dword [esi + 0x94]
push dword [esi + 0x8c]
call fcn.0040fbc2
mov edi, eax
jmp 0x407520
push 1
push edi
mov ecx, esi
call fcn.004088fa
jmp 0x40758c
xor edi, edi
cmp edi, ebx
jne 0x407528
xor eax, eax
jmp 0x40758f
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x24]
lea edx, [edi + 0x30]
push edx
call dword [eax]
mov eax, dword [edi]
push ebx
mov ecx, edi
call dword [eax + 0xe4]
mov eax, dword [edi]
push 0xa
mov ecx, edi
call dword [eax + 4]
push 1
push edi
mov ecx, esi
call fcn.0040980a
cmp dword [esi + 0x6c], ebx
jne 0x40758c
mov eax, dword [esi + 0x98]
cmp dword [eax + 0x390], ebx
jne 0x40758c
mov ax, word [esi + 0xa0]
push 1
push eax
call dword [sym.imp.WSOCK32.dll_htons]
movzx eax, ax
push eax
push str.127.0.0.1
call dword [sym.imp.WSOCK32.dll_inet_addr]
push eax
mov ecx, esi
call fcn.0040827d
push 1
pop eax
pop edi
pop esi
pop ebx
ret 8
Function at 0x40c4c3
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x40c4ec
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x40c4ee
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x40c4ec
mov eax, dword [eax + 0xc]
pop esi
mov eax, dword [eax]
mov eax, dword [eax]
ret
xor eax, eax
pop esi
ret

Function at 0x40c522
Capabilities:
Get hostname
Get session user name
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
push ebx
push esi
mov esi, ecx
push edi
and dword [esi + 8], 0
call fcn.0040c0b5
mov edi, dword [ebp + 8]
push dword [ebp + 0xc]
or dword [esi + 4], 0xffffffff
or dword [esi], 0xffffffff
and dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov dword [esi + 0x84], edi
call dword [sym.imp.WSOCK32.dll_htons]
movzx eax, ax
mov dword [esi + 0x88], eax
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [esi + 0x10], eax
test eax, eax
setne cl
push ecx
mov ecx, esi
call fcn.0040c62b
test eax, eax
je 0x40c61d
push 0x32
lea ecx, [ebp - 4]
pop ebx
lea eax, [esi + 0x52]
push ecx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x40c5a6
push eax
push str.GetComputerName__
call fcn.0040bdfb
pop ecx
pop ecx
jmp 0x40c61d
test edi, edi
jne 0x40c5f1
lea eax, [ebp - 0x404]
push 0x400
push eax
call dword [sym.imp.WSOCK32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x40c5d3
lea eax, [esi + 0x52]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.00417440
pop ecx
pop ecx
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x40c5f1
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esi + 0x84], eax
lea eax, [ebp - 4]
lea edi, [esi + 0x20]
push eax
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp eax, 1
je 0x40c616
push ebx
push 0x42122c
push edi
call fcn.0040b2aa
add esp, 0xc
mov dword [esi + 8], 1
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40c62b
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
push ebx
push esi
lea eax, [ebp - 0x1ac]
push edi
push eax
mov esi, ecx
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
push 0
je 0x40c662
push str.WSAStart__
call fcn.0040be54
pop ecx
pop ecx
jmp 0x40c858
mov edi, dword [sym.imp.WSOCK32.dll_socket]
push 2
pop ebx
push ebx
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40c67f
push 0
push 0x421330
jmp 0x40c656
push 1
pop eax
cmp dword [ebp + 8], eax
jne 0x40c85f
push 0
push eax
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x40c6a2
push 0
push 0x421304
jmp 0x40c656
push 0x10
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.00417010
mov eax, dword [esi + 0x84]
mov edi, dword [sym.imp.WSOCK32.dll_bind]
mov dword [ebp - 0x18], eax
mov ax, word [esi + 0x88]
add esp, 0xc
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x1c]
mov word [ebp - 0x1c], bx
push 0x10
push eax
push dword [esi]
call edi
test eax, eax
je 0x40c6ea
push 0
push str.bind__
jmp 0x40c656
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [esi + 4]
call edi
test eax, eax
je 0x40c714
push dword [esi + 4]
call dword [sym.imp.WSOCK32.dll_closesocket]
or dword [esi + 4], 0xffffffff
push 0
push 0x4212dc
call fcn.0040be54
pop ecx
pop ecx
mov edi, dword [sym.imp.WSOCK32.dll_ioctlsocket]
lea eax, [ebp - 4]
mov ebx, 0x8004667e
push eax
push ebx
mov dword [ebp - 4], 1
push dword [esi]
call edi
test eax, eax
je 0x40c73f
push 0
push str.ioctlsocket_nonblock_
jmp 0x40c656
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40c75f
lea ecx, [ebp - 4]
push ecx
push ebx
push eax
call edi
test eax, eax
je 0x40c75f
push 0
push str.ioctlsocket_tcp_nonblock_
jmp 0x40c656
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea eax, [ebp - 4]
push 4
push eax
mov ebx, 0xffff
push 0x20
push ebx
mov dword [ebp - 4], 1
push dword [esi]
call edi
test eax, eax
je 0x40c78e
push 0
push str.setsockopt_broadcast_
jmp 0x40c656
lea eax, [ebp - 0xc]
push 4
push eax
push 0x1001
push ebx
mov dword [ebp - 0xc], 0x10000
push dword [esi]
mov dword [ebp - 8], 0x8000
call edi
test eax, eax
je 0x40c7d2
lea eax, [ebp - 8]
push 4
push eax
push 0x1001
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40c7d2
push 0
push str.setsockopt_sendbuf_
call fcn.0040be54
pop ecx
pop ecx
lea eax, [ebp - 0xc]
push 4
push eax
push 0x1002
push ebx
mov dword [ebp - 0xc], 0x10000
push dword [esi]
mov dword [ebp - 8], 0x8000
call edi
test eax, eax
je 0x40c816
lea eax, [ebp - 8]
push 4
push eax
push 0x1002
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40c816
push 0
push str.setsockopt_recvbuf_
call fcn.0040be54
pop ecx
pop ecx
mov eax, dword [esi + 4]
mov dword [ebp - 4], 1
cmp eax, 0xffffffff
je 0x40c843
lea ecx, [ebp - 4]
push 4
push ecx
push 4
push ebx
push eax
call edi
test eax, eax
je 0x40c843
push 0
push str.setsockopt_tcp_reuseaddr_
call fcn.0040be54
pop ecx
pop ecx
mov esi, dword [esi + 4]
cmp esi, 0xffffffff
je 0x40c85c
push 5
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x40c85c
xor eax, eax
jmp 0x40c85f
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40ea71
Capabilities:
Create thread
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x508
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x421c]
mov ecx, str._x:_x:
cmp dword [eax + 8], edi
jne 0x40ea95
mov ecx, str._x:_x:_x:
mov eax, dword [eax + 4]
push ebx
push edi
push dword [eax + 8]
lea eax, [ebp - 0x108]
push dword [esi + 0xb0]
push ecx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esi + 0x421c]
add esp, 0x14
mov eax, dword [eax]
push edi
push edi
mov dword [eax + 0x18], 1
mov eax, dword [esi + 0x421c]
mov ecx, dword [esi + 0x38]
mov eax, dword [eax + 8]
mov edx, dword [ecx + 0xc]
neg eax
sbb eax, eax
lea ebx, [edx + 1]
and eax, 2
mov dword [ecx + 0xc], ebx
lea ebx, [ebp - 0x108]
add eax, 0x60
push ebx
push eax
lea eax, [ebp - 0x508]
push edx
push eax
call fcn.0040c9f1
mov eax, dword [esi + 0x421c]
mov ecx, dword [esi + 0x38]
push dword [eax]
push dword [esi + 0x20]
call fcn.0040cfb3
lea eax, [ebp - 0x508]
push edi
push eax
call fcn.004176d0
pop ecx
push eax
lea eax, [ebp - 0x508]
push eax
mov eax, dword [esi + 0x421c]
mov eax, dword [eax]
push dword [eax + 8]
call dword [sym.imp.WSOCK32.dll_send]
mov ebx, eax
lea eax, [ebp - 0x508]
push eax
call fcn.004176d0
pop ecx
cmp ebx, eax
pop ebx
jl 0x40ec3f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x421c]
mov ecx, dword [ecx]
mov dword [ecx + 0x20], eax
mov eax, dword [esi + 0x421c]
mov eax, dword [eax]
mov ecx, dword [eax + 0x20]
mov dword [eax + 0x1c], ecx
mov eax, dword [esi + 0x421c]
cmp dword [eax + 0x70], edi
jne 0x40eb7d
mov ecx, dword [eax]
mov ecx, dword [ecx + 0x1c]
mov dword [eax + 0x70], ecx
mov eax, dword [esi + 0x421c]
cmp dword [eax + 8], edi
jne 0x40eb93
push dword [eax + 4]
lea ecx, [eax + 0x10]
call fcn.0040ec4b
mov eax, dword [esi + 0x418c]
push dword [eax + 0x318]
call fcn.00416ff4
pop ecx
mov ecx, dword [esi + 0x421c]
mov dword [ecx + 0x50], eax
mov eax, dword [esi + 0x421c]
cmp dword [eax + 8], edi
jne 0x40ec14
mov ecx, dword [eax + 0x28]
or ecx, dword [eax + 0x2c]
jne 0x40ec14
mov ecx, esi
call fcn.0040f306
test eax, eax
je 0x40ebe4
push 1
mov ecx, esi
call fcn.0040edc9
mov eax, dword [esi + 0x421c]
mov dword [eax + 0x7c], 8
jmp 0x40ebf1
mov eax, dword [esi + 0x421c]
mov dword [eax + 0x7c], 9
mov ecx, dword [esi + 0x421c]
mov eax, dword [esi]
push 0x20
mov ecx, dword [ecx]
push dword [ecx + 8]
mov ecx, esi
push 0x483
call dword [eax + 0xa0]
push 1
pop eax
pop edi
pop esi
leave
ret
or dword [eax + 0x58], 0xffffffff
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40eca7
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 0x421c]
mov dword [ecx + 0x58], eax
mov eax, dword [esi + 0x421c]
cmp dword [eax + 0x58], edi
jne 0x40ec0d
push edi
mov ecx, esi
call fcn.0040f8ec
xor eax, eax
jmp 0x40ec10