joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10023b50
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
push 0x220
push eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x224]
push eax
call sub.MSVCRT.dll_memset
mov ebx, dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
add esp, 0xc
push edi
push 8
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x10023be8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x18
jne 0x10023c4b
call dword [sym.imp.KERNEL32.dll_SwitchToThread]
push edi
push 8
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x10023c4b
mov edi, dword [ebp - 4]
mov dword [ebp - 4], 0
test esi, esi
je 0x10023bdf
lea ecx, [ebp - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x10023bdf
test byte [ebp - 4], 2
jne 0x10023bdf
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x228]
push ecx
push esi
mov dword [ebp - 0x228], 0x224
call dword [sym.imp.KERNEL32.dll_Module32First]
test eax, eax
je 0x10023bb5
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIA]
mov ebx, dword [sym.imp.KERNEL32.dll_Module32Next]
push str.kernel
lea edx, [ebp - 0x208]
push edx
call edi
test eax, eax
je 0x10023c2e
push str..dll
push eax
call edi
test eax, eax
jne 0x10023c41
lea eax, [ebp - 0x228]
push eax
push esi
call ebx
test eax, eax
jne 0x10023c10
jmp 0x10023bb5
mov edi, 1
jmp 0x10023bb8
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10023c60
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push ebx
push esi
push edi
mov edi, dword [0x10057c18]
xor esi, esi
push 0x124
lea eax, [ebp - 0x12c]
push esi
push eax
mov dword [ebp - 0x130], esi
call sub.MSVCRT.dll_memset
add esp, 0xc
push esi
push 2
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10023cab
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x130]
push ecx
push esi
mov dword [ebp - 0x130], 0x128
call dword [sym.imp.KERNEL32.dll_Process32First]
mov ebx, dword [sym.imp.KERNEL32.dll_Process32Next]
lea esp, [esp]
cmp dword [ebp - 0x128], edi
je 0x10023d19
lea edx, [ebp - 0x130]
push edx
push esi
call ebx
test eax, eax
jne 0x10023cd0
mov edi, dword [ebp - 4]
mov dword [ebp - 4], 0
test esi, esi
je 0x10023d10
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x10023d10
test byte [ebp - 4], 2
jne 0x10023d10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 1
jmp 0x10023ce9
Function at 0x10023e40
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push ebx
push esi
push edi
mov ecx, 9
mov esi, str.1234567890QWERTYUIOPASDFGHJKLZXCVBNM
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
push 0x104
lea eax, [ebp - 0x134]
push eax
movsb byte es:[edi], byte [esi]
mov dword [ebp - 4], 0xffaaff
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
lea eax, [ebp - 0x134]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10023e80
push 0
push 0
push 0
push 0
mov byte [ebp - 0x131], cl
lea ecx, [ebp - 4]
push ecx
push 0
sub eax, edx
push 0
lea edx, [ebp - 0x134]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov edi, dword [ebp - 4]
xor edi, esi
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
lea eax, [edx + edx*2]
mov ecx, edi
sub ecx, eax
mov dword [ebp - 4], edi
je 0x10023ecd
not edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x30]
xor ebx, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10023ed5
sub eax, edx
mov dword [ebp - 8], eax
mov esi, 0x10058000
jmp 0x10023eeb
mov edi, dword [ebp - 4]
xor edx, edx
mov eax, ebx
div dword [ebp - 8]
mov ecx, 0x10043718
movsx eax, byte [ebp + edx - 0x30]
imul eax, ebx
xor eax, edi
test bl, 1
jne 0x10023f0b
mov ecx, 0x10048a70
push eax
push ecx
push 0x104
push esi
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea edi, [esi - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10023f20
mov dx, word [0x10048a74]
add esi, 0x104
inc ebx
mov word [edi], dx
cmp esi, 0x10059d74
jl 0x10023ee8
xor ebx, ebx
mov edi, 0x10059d78
xor edx, edx
mov eax, ebx
div dword [ebp - 8]
mov ecx, 0x10043718
movsx eax, byte [ebp + edx - 0x30]
imul eax, ebx
xor eax, dword [ebp - 4]
xor eax, 0xffeeffaa
test bl, 1
jne 0x10023f6e
mov ecx, 0x10048a70
push eax
push ecx
push 0x104
push edi
call dword [sym.imp.MSVCRT.dll__snprintf]
add edi, 0x104
add esp, 0x10
inc ebx
cmp edi, 0x1005b1c8
jl 0x10023f48
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10026b60
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test ecx, ecx
jne 0x10026b70
xor eax, eax
pop ebp
ret 4
push esi
not eax
cmp edx, 8
jb 0x10026c3f
mov esi, edx
shr esi, 3
push edi
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
movzx edi, byte [ecx + 2]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
movzx edi, byte [ecx + 3]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
movzx edi, byte [ecx + 4]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
movzx edi, byte [ecx + 5]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
movzx edi, byte [ecx + 6]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
movzx edi, byte [ecx + 7]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x10045d70]
add ecx, 8
sub edx, 8
dec esi
jne 0x10026b82
pop edi
test edx, edx
je 0x10026c5c
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x10045d70]
inc ecx
dec edx
jne 0x10026c43
not eax
pop esi
pop ebp
ret 4
Function at 0x10026e90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
mov edi, ecx
cmp dword [edi + 0x18], 0
je 0x10026f64
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x20]
push ebx
push esi
mov esi, dword [ebp + 0xc]
add eax, esi
cmp eax, ecx
jb 0x10026f42
lea ebx, [ecx + ecx]
cmp ebx, eax
jbe 0x10026ec4
mov dword [ebp - 4], ebx
jmp 0x10026ec9
mov dword [ebp - 4], eax
mov ebx, eax
push 0
push ebx
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
je 0x10026eff
push ebx
push 0
push 0
push 0xf001f
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
jne 0x10026f0d
call fcn.10023e00
pop esi
pop ebx
mov eax, 0x300
pop edi
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [edi + 0x20]
mov edx, dword [edi + 0x18]
push ecx
push edx
push ebx
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi + 0x18]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [edi + 4]
call fcn.10023e00
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [ebp + 0xc]
mov dword [edi + 0x20], ecx
mov dword [edi + 0x18], ebx
mov dword [edi + 4], edx
mov ecx, dword [edi + 0x1c]
mov eax, dword [ebp + 8]
add ecx, dword [edi + 0x18]
push esi
push eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [edi + 0x1c], esi
mov eax, esi
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
test eax, eax
je 0x10026f90
mov ecx, dword [ebp + 0xc]
push 0
lea edx, [ebp - 4]
push edx
mov edx, dword [ebp + 8]
push ecx
push edx
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
pop edi
mov esp, ebp
pop ebp
ret 8
mov dword [edi + 0xc], 0x1000000
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 8

Function at 0x100272b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [esi + 0x58]
push ebx
mov ebx, dword [ebp + 8]
push edi
test ecx, ecx
je 0x100272fc
mov eax, dword [esi + 0x60]
mov edi, dword [esi + 0x5c]
cmp eax, edi
jae 0x1002733b
sub edi, eax
cmp edi, edx
jbe 0x100272d1
mov edi, edx
push edi
add eax, ecx
push eax
push ebx
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 0x4c]
add dword [esi + 0x60], edi
add dword [esi + 0x48], edi
add esp, 0xc
push eax
mov edx, edi
mov ecx, ebx
call fcn.10026b60
mov dword [esi + 0x4c], eax
mov eax, edi
pop edi
pop ebx
pop ebp
ret 4
mov eax, dword [esi + 0x50]
test eax, eax
je 0x10027334
push 0
lea ecx, [ebp + 8]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002733b
mov edx, dword [esi + 0x4c]
mov edi, dword [ebp + 8]
add dword [esi + 0x48], edi
push edx
mov edx, edi
mov ecx, ebx
call fcn.10026b60
mov dword [esi + 0x4c], eax
mov eax, edi
pop edi
pop ebx
pop ebp
ret 4
mov dword [esi + 0xc], 0x1000000
pop edi
xor eax, eax
pop ebx
pop ebp
ret 4
Function at 0x10027ce0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov edx, dword [ebp + 0x10]
sub esp, 0x35c
push ebx
push esi
xor esi, esi
push edi
mov edi, dword [ebp + 0xc]
cmp edx, esi
je 0x10027d01
mov dword [esp + 0x10], edx
jmp 0x10027d0b
lea eax, [edi + 0x800]
mov dword [esp + 0x10], eax
cmp edi, esi
je 0x10027d23
mov eax, edi
lea ebx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10027d14
sub eax, ebx
mov dword [esp + 0x18], eax
jmp 0x10027d27
mov dword [esp + 0x18], esi
cmp edx, esi
je 0x10027d3f
mov eax, edx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10027d30
sub eax, edx
mov dword [esp + 0x14], eax
jmp 0x10027d43
mov dword [esp + 0x14], esi
cmp edi, esi
je 0x10027ef2
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10027d50
sub eax, edx
add eax, 0x104
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, esi
je 0x10027ef2
push edi
push str._s
push 0x104
push ebx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea ecx, [esp + 0x20]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
push ebx
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x10027eeb
mov ebx, dword [ebp + 8]
cmp byte [esp + 0x4c], 0x2e
je 0x10027ed7
mov ecx, dword [ebp + 0x10]
mov eax, str._s_s
test ecx, ecx
jne 0x10027dc6
mov eax, 0x10044040
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x4c]
push edx
push ecx
push eax
mov eax, dword [esp + 0x1c]
push eax
call esi
lea ecx, [esp + 0x5c]
push ecx
push edi
push str._s_s
push edi
call esi
add esp, 0x20
test byte [esp + 0x20], 0x10
je 0x10027e56
test ebx, ebx
jne 0x10027e11
mov eax, dword [esp + 0x10]
push eax
push edi
push ebx
mov dword [0x10059d74], 0x10000
call fcn.10027ce0
jmp 0x10027ebf
cmp dword [ebx], 2
je 0x10027e31
mov eax, dword [esp + 0x10]
push eax
push edi
push ebx
mov dword [0x10059d74], 0x80000
call fcn.10027ce0
jmp 0x10027ebf
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 4]
push 4
push 0
push edx
push eax
call fcn.10027530
mov dword [0x10059d74], eax
mov eax, dword [esp + 0x10]
push eax
push edi
push ebx
call fcn.10027ce0
jmp 0x10027ebf
test ebx, ebx
jne 0x10027e66
mov dword [0x10059d74], 0x10000
jmp 0x10027ebf
cmp dword [ebx], 2
je 0x10027e77
mov dword [0x10059d74], 0x80000
jmp 0x10027ebf
mov esi, dword [ebx + 4]
push 0x208
lea ecx, [esp + 0x164]
push 0
push ecx
call sub.MSVCRT.dll_memset
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0x104
push edx
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 2
push edi
lea ecx, [esp + 0x168]
push ecx
push esi
call fcn.10027530
mov dword [0x10059d74], eax
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x1c]
mov byte [edx + edi], 0
mov byte [eax + ecx], 0
lea edx, [esp + 0x20]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x10027daa
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10028320
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push 0x350
mov dword [ebp - 4], 0xff
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
jne 0x1002834d
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push edi
xor al, al
mov edi, esi
mov ecx, 0x350
rep stosb byte es:[edi], al
mov eax, 1
cmp dword [0x1005b1c8], ebx
jne 0x1002836b
mov dword [0x1005b1c8], eax
mov edi, dword [ebp + 8]
mov dword [esi + 0x2c4], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x10]
add eax, eax
or ecx, 0xffffffff
add eax, eax
add eax, eax
push ebx
mov byte [esi + 0x174], bl
mov dword [esi + 0x2d4], ebx
mov dword [esi + 0x2d8], ebx
mov dword [esi + 0x178], 0x170c
mov dword [esi + 0x28c], ebx
mov byte [esi + 0x294], bl
mov dword [esi + 0x290], ecx
mov byte [esi + 0x14b], bl
mov dword [esi + 0x15c], ecx
mov dword [esi + 0x29c], ecx
mov byte [esi + 0x2a4], bl
mov dword [esi + 0x298], ebx
mov dword [esi + 0x2a0], ebx
mov dword [esi + 0x184], ebx
mov dword [esi + 0x17c], ecx
mov word [esi + 0x2d0], bx
mov byte [esi + 0x2d2], bl
mov dword [esi + 0x2c0], ebx
mov dword [esi + 8], edi
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x2bc], 0x100281d0
mov byte [esi + 0x32c], cl
mov dword [esi + 0x330], ebx
call dword [sym.imp.WS2_32.dll_htonl]
lea ecx, [ebp - 4]
push ecx
lea edx, [esi + 0x4c]
push edx
mov dword [esi + 0x334], eax
mov dword [esi + 0x2cc], 5
mov dword [esi + 0x2c8], 0x32
mov byte [esi + 0x33c], bl
mov dword [esi + 0x344], 3
mov dword [esi + 0x348], 8
mov byte [esi + 0x34c], bl
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
imul edi, dword [ebp + 0x10]
mov eax, esi
mov dword [esi + 0xc], edi
call fcn.10028290
pop edi
mov dword [esi + 0x2e4], ebx
mov dword [esi + 0x2e0], ebx
mov dword [esi + 0x2dc], ebx
mov dword [esi + 0x2e8], ebx
mov byte [esi + 0x2ec], bl
mov dword [esi + 0x324], ebx
mov dword [esi + 0x328], ebx
mov dword [esi + 0x2d4], ebx
mov dword [esi + 0x2f0], 0x1004c0ac
mov dword [esi + 0x2f8], 0x10028100
mov dword [esi + 0x2fc], 0x10028270
mov dword [esi + 0x300], 0x10028110
mov dword [esi + 0x304], 0x10028100
mov dword [esi + 0x308], 0x100281b0
mov dword [esi + 0x30c], 0x10031c50
mov dword [esi + 0x320], 0x10028280
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1002bbd0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
mov eax, dword [eax + 0x340]
push esi
push edi
test eax, eax
jne 0x1002bbf0
mov eax, str.unknown
push str.LibVNCServer_0.9.7
push eax
lea ecx, [ebp - 0x214]
push str._s___s_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x214]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002bc14
mov ecx, dword [ebx + 0x75c4]
sub eax, edx
lea edx, [ecx + eax + 0xd]
cmp edx, 0x7530
jbe 0x1002bc5e
push ecx
lea eax, [ebx + 0x94]
push eax
mov eax, ebx
call fcn.1002f3c0
test eax, eax
jns 0x1002bc54
mov esi, ebx
call fcn.1002f0f0
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [ebx + 0x75c4], 0
mov al, byte [0x1004c05d]
movsx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 0x302fefc
xor edx, edx
add ecx, 0xfffe0003
test al, al
lea eax, [ebp - 0x214]
mov dword [ebp - 0x10], edx
mov dword [ebp - 8], ecx
lea edx, [eax + 1]
je 0x1002bcb1
jmp 0x1002bc90
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002bc90
sub eax, edx
lea edx, [eax + 1]
shr edx, 8
inc eax
and edx, 0xff
shl eax, 8
xor edx, eax
mov word [ebp - 0xc], dx
jmp 0x1002bcbf
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002bcb1
sub eax, edx
inc eax
mov word [ebp - 0xc], ax
mov ecx, dword [ebx + 0x75c4]
xor eax, eax
lea edi, [ecx + ebx + 0x94]
mov word [ebp - 0xa], ax
lea esi, [ebp - 0x10]
mov ecx, 0xc
rep movsb byte es:[edi], byte [esi]
add dword [ebx + 0x75c4], 0xc
mov edx, dword [ebx + 0x75c4]
lea eax, [ebp - 0x214]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002bcf2
sub eax, esi
lea ecx, [eax + 1]
lea edi, [edx + ebx + 0x94]
lea esi, [ebp - 0x214]
lea eax, [ebp - 0x214]
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002bd16
sub eax, edx
inc eax
add dword [ebx + 0x75c4], eax
mov eax, dword [ebx + 0x75c4]
push eax
lea edx, [ebx + 0x94]
push edx
mov eax, ebx
call fcn.1002f3c0
test eax, eax
js 0x1002bc42
pop edi
pop esi
mov dword [ebx + 0x75c4], 0
or al, 0xff
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x1002c140
Capabilities:
Get socket status
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
mov esi, eax
mov eax, dword [esi]
xor edi, edi
mov dword [ebp - 8], edi
cmp byte [eax + 0x34c], 0xff
mov dword [ebp - 0x14], 0x2400
jne 0x1002c358
mov eax, dword [eax + 0x318]
cmp eax, edi
je 0x1002c17f
push esi
call eax
cmp eax, 0xffffffff
jne 0x1002c358
cmp dword [esi + 0x7624], 0xffffffff
je 0x1002c358
mov ecx, 1
cmp dword [esi + 0x7638], ecx
jne 0x1002c358
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x128], ecx
lea ecx, [ebp - 0x1c]
push ecx
push edi
lea edx, [ebp - 0x128]
push edx
mov dword [ebp - 0x124], eax
push edi
inc eax
push eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x1002c358
mov edi, dword [sym.imp.MSVCRT.dll_malloc]
push 0x2000
call edi
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x1002c202
push 0x2400
call edi
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x1002c20b
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0xc], 0
mov ecx, dword [esi + 0x7624]
push 0
lea eax, [ebp - 8]
push eax
push 0x2000
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002c2c4
mov eax, dword [ebp - 8]
cmp eax, 0xffffffff
je 0x1002c2cb
test eax, eax
je 0x1002c2ea
cmp dword [esi + 0x7628], 0
jne 0x1002c267
push ebx
push 0
mov edi, eax
push esi
xor eax, eax
mov cl, 5
call fcn.1002bd60
movsx edx, al
mov dword [ebp - 4], edx
jmp 0x1002c2b0
push eax
push ebx
lea eax, [ebp - 0x14]
mov ecx, edi
call fcn.1003efd0
mov ecx, dword [ebp - 8]
test eax, eax
jne 0x1002c29b
mov eax, dword [ebp - 0x14]
cmp eax, ecx
jae 0x1002c29b
push edi
push 0
mov edi, eax
push esi
mov eax, 1
mov cl, 5
call fcn.1002bd60
movsx eax, al
mov dword [ebp - 4], eax
jmp 0x1002c2b0
push ebx
push 0
mov edi, ecx
push esi
xor eax, eax
mov cl, 5
call fcn.1002bd60
movsx ecx, al
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, 0x20
jge 0x1002c339
mov edi, dword [ebp - 0x10]
jmp 0x1002c212
mov dword [ebp - 8], 0xffffffff
push 0
push 0
push esi
xor edi, edi
xor eax, eax
mov cl, 7
call fcn.1002bd60
mov edx, dword [esi + 0x7624]
movsx ecx, al
mov dword [ebp - 4], ecx
push edx
jmp 0x1002c307
push 0
push 0
push esi
xor edi, edi
xor eax, eax
mov cl, 6
call fcn.1002bd60
movsx edx, al
mov eax, dword [esi + 0x7624]
mov dword [ebp - 4], edx
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
push ebx
mov dword [esi + 0x7624], 0xffffffff
mov dword [esi + 0x7638], eax
mov dword [esi + 0x7634], eax
call dword [sym.imp.MSVCRT.dll_free]
mov al, byte [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push eax
call esi
add esp, 4
push ebx
call esi
mov al, byte [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or al, 0xff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1002e5d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
mov edi, dword [esi + 0x2a0]
xor ebx, ebx
cmp edi, ebx
je 0x1002e6bf
cmp byte [edi + 0x29], bl
jne 0x1002e6bf
mov ecx, dword [esi + 0x29c]
push ebx
push 0x14
lea eax, [ebp - 0x14]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebx
jle 0x1002e615
movzx ecx, byte [ebp - 0x14]
sub ecx, 4
je 0x1002e677
dec ecx
je 0x1002e621
pop edi
mov byte [esi + 0x2a4], bl
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 6
jne 0x1002e615
cmp byte [0x1004c05d], bl
je 0x1002e657
movzx eax, word [ebp - 0x10]
movzx edx, word [ebp - 0x12]
mov ecx, eax
and ecx, 0xff
shr eax, 8
shl ecx, 8
or ecx, eax
mov eax, edx
and eax, 0xff
shl eax, 8
shr edx, 8
or eax, edx
jmp 0x1002e65f
movzx ecx, word [ebp - 0x10]
movzx eax, word [ebp - 0x12]
mov edx, dword [edi]
push edi
push ecx
mov ecx, dword [edx + 0x300]
push eax
movzx eax, byte [ebp - 0x13]
push eax
call ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 8
jne 0x1002e615
cmp byte [0x1004c05d], bl
je 0x1002e6ac
mov ecx, dword [ebp - 0x10]
mov eax, ecx
mov edx, ecx
shr edx, 0x10
and eax, 0xff0000
or eax, edx
mov edx, ecx
and edx, 0xff00
shl ecx, 0x10
or edx, ecx
shr eax, 8
shl edx, 8
or eax, edx
jmp 0x1002e6af
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
mov edx, dword [ebp - 0x13]
push edi
push eax
mov eax, dword [ecx + 0x2f8]
push edx
call eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1002e6d0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [esi + 0x28c], 0
push ebx
mov ebx, dword [esi + 0x334]
push edi
jne 0x1002e8b2
cmp byte [esi + 0x14b], 0xff
mov edi, 1
mov dword [esi + 0x28c], edi
jne 0x1002e71f
lea eax, [esi + 0x14c]
push eax
mov eax, dword [esi + 0x160]
mov edi, esi
call fcn.1002f1e0
mov dword [esi + 0x15c], eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x290]
cmp eax, 0xffffffff
je 0x1002e773
push 4
lea ecx, [ebp - 4]
push ecx
push edi
push 6
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1002e8b2
mov edx, dword [esi + 0x290]
mov dword [esi + 0x188], 0
mov dword [esi + 0x18c], edx
mov eax, dword [esi + 0x290]
add dword [esi + 0x188], edi
mov dword [esi + 0x184], eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x174], 0
je 0x1002e7b5
push ebx
push 0x170c
call fcn.1002f4a0
mov dword [esi + 0x17c], eax
mov dword [esi + 0x178], 0x170c
mov dword [esi + 0x188], 0
mov dword [esi + 0x18c], eax
mov ecx, dword [esi + 0x17c]
mov dword [esi + 0x184], ecx
jmp 0x1002e7e8
mov eax, dword [esi + 0x178]
test eax, eax
jle 0x1002e7ee
push ebx
push eax
call fcn.1002f4a0
mov dword [esi + 0x17c], eax
mov dword [esi + 0x188], 0
mov dword [esi + 0x18c], eax
mov edx, dword [esi + 0x17c]
mov dword [esi + 0x184], edx
add dword [esi + 0x188], edi
mov edx, dword [esi + 0x298]
test edx, edx
je 0x1002e8b2
mov dword [ebp - 4], edi
xor al, al
lea edi, [ebp - 0x14]
mov ecx, 0x10
rep stosb byte es:[edi], al
mov eax, 2
push edx
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 2
push 2
mov word [ebp - 0x12], ax
mov dword [ebp - 0x10], ebx
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
test edi, edi
js 0x1002e85d
push 4
lea ecx, [ebp - 4]
push ecx
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1002e85d
push 0x10
lea edx, [ebp - 0x14]
push edx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x1002e860
or edi, 0xffffffff
mov edx, dword [esi + 0x188]
xor eax, eax
mov dword [esi + 0x29c], edi
test edx, edx
je 0x1002e884
lea ecx, [esi + 0x18c]
cmp dword [ecx], edi
je 0x1002e884
inc eax
add ecx, 4
cmp eax, edx
jb 0x1002e878
cmp eax, edx
jne 0x1002e89a
cmp edx, 0x40
jae 0x1002e89a
mov dword [esi + eax*4 + 0x18c], edi
inc dword [esi + 0x188]
mov eax, dword [esi + 0x29c]
mov ecx, dword [esi + 0x184]
cmp eax, ecx
jg 0x1002e8ac
mov eax, ecx
mov dword [esi + 0x184], eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret