joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10012d10
Capabilities:
Get file size

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x10012d1e
or eax, 0xffffffff
pop esi
ret
push esi
call fcn.10016f90
add esp, 4
test eax, eax
jne 0x10012d30
or eax, 0xffffffff
pop esi
ret
mov ecx, dword [esi]
or eax, 0xffffffff
cmp ecx, 1
je 0x10012d4e
cmp ecx, 3
je 0x10012d4e
cmp ecx, 2
jne 0x10012d5d
mov ecx, dword [esi + 4]
call fcn.100167e0
pop esi
ret
mov esi, dword [esi + 4]
lea eax, [esp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop esi
ret

Function at 0x10012d60
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x10012d75
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push edi
call fcn.10016f90
add esp, 4
test eax, eax
jne 0x10012d88
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov esi, dword [esp + 0x28]
test esi, esi
jg 0x10012d98
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov eax, dword [edi]
xor ebx, ebx
cmp eax, 1
jne 0x10012df1
mov edi, dword [edi + 4]
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ebp, eax
lea eax, [esp + 0x1c]
push ebx
push eax
push esi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10012dd3
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x1c]
push ecx
push ebp
call fcn.100167f0
push ebp
mov ebx, eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp eax, 2
jne 0x10012e3c
mov edi, dword [edi + 4]
lea edx, [esi + 8]
push edx
call fcn.1000fce0
mov ebx, eax
add esp, 4
lea ecx, [ebx + 8]
mov dword [ebx], 1
mov dword [ebx + 4], esi
mov eax, dword [edi]
push esi
push ecx
mov ecx, edi
call dword [eax + 0x20]
test eax, eax
jne 0x10012e31
push ebx
call fcn.1000fda0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
mov dword [ebx + 4], eax
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret
cmp eax, 3
jne 0x10012eb8
mov ebx, dword [edi + 4]
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ebp, eax
push 1
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x1c]
push 0
push edx
push esi
push ebp
push ebx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10012e85
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov edx, dword [edi + 0x130]
mov eax, dword [esp + 0x1c]
lea ecx, [edi + 0xc]
add edi, 0x2c
push ecx
push edx
push edi
mov esi, eax
push eax
mov eax, dword [esp + 0x20]
push ebp
push eax
call fcn.100160a0
push esi
push ebp
call fcn.100167f0
push ebp
mov ebx, eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x24
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret
Function at 0x10012ee0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x114
mov eax, dword [esp + 0x11c]
push ebp
push esi
push edi
push eax
call fcn.10016fc0
mov edi, dword [esp + 0x138]
xor esi, esi
push edi
mov ebp, eax
mov dword [esp + 0x18], esi
call fcn.10015a40
add esp, 8
test ebp, ebp
je 0x10012fc6
test eax, eax
je 0x10012fc6
inc eax
push ebx
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
or ecx, 0xffffffff
xor eax, eax
push 0x5c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.MSVCRT.dll_strrchr
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10012f5a
mov byte [esi], 0
inc esi
lea eax, [esp + 0x10]
push eax
push ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x10012fae
lea ecx, [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push edx
push eax
push 0
push esi
push ecx
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x10012f9b
cmp eax, 0xea
jne 0x10012fa3
mov dword [esp + 0x14], 1
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x18]
add esp, 4
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x114
ret
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 0x114
ret
Function at 0x10012fe0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x1c]
push ebp
push esi
push edi
push eax
call fcn.10016fc0
mov edi, dword [esp + 0x38]
xor esi, esi
push edi
mov ebp, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], esi
call fcn.10015a40
add esp, 8
cmp ebp, esi
je 0x100130bf
cmp eax, esi
je 0x100130bf
inc eax
push ebx
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
or ecx, 0xffffffff
xor eax, eax
push 0x5c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.MSVCRT.dll_strrchr
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10013055
mov byte [esi], 0
inc esi
lea eax, [esp + 0x18]
push eax
push ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x100130ad
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push edx
push eax
push 0
mov edi, 4
push esi
push ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100130a2
cmp dword [esp + 0x14], edi
jne 0x100130a2
mov dword [esp + 0x1c], 1
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
pop ebx
jne 0x100130cb
mov eax, dword [esp + 0x48]
test eax, eax
mov eax, dword [esp + 0x40]
jne 0x100130cf
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
add esp, 0x14
ret
Function at 0x10013410
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1010
call fcn.10022de0
mov eax, dword [esp + 0x1014]
push ebx
push ebp
mov ebp, dword [esp + 0x1020]
push esi
push edi
xor edi, edi
push 1
push edi
push edi
push eax
mov dword [ebp], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x10013512
jmp 0x1001344f
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x1024]
xor esi, esi
lea ecx, [esp + 0x18]
push esi
push ecx
lea edx, [esp + 0x28]
push 0x1000
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001352f
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], esi
cmp eax, esi
jle 0x1001349b
mov cl, byte [esp + esi + 0x20]
test cl, cl
je 0x10013492
inc esi
cmp esi, eax
jl 0x10013483
jmp 0x1001349b
inc esi
mov dword [esp + 0x14], 1
mov eax, dword [ebp]
mov ebx, edi
add edi, esi
test eax, eax
mov dword [esp + 0x1c], edi
je 0x100134b7
inc edi
push edi
push eax
call fcn.1000fd30
add esp, 8
jmp 0x100134c1
inc edi
push edi
call fcn.1000fc90
add esp, 4
mov edi, eax
lea ecx, [esp + 0x20]
add edi, ebx
push esi
push ecx
push edi
mov dword [ebp], eax
call sub.MSVCRT.dll_strncpy
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
mov byte [edi + esi], 0
jne 0x10013548
cmp dword [esp + 0x18], 0x1000
jb 0x1001357b
mov edx, dword [esp + 0x1024]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x1001344b
mov eax, dword [esp + 0x102c]
pop edi
pop esi
pop ebp
mov dword [eax], 0
mov eax, 1
pop ebx
add esp, 0x1010
ret
mov ecx, dword [esp + 0x102c]
pop edi
mov eax, 1
mov dword [ecx], esi
pop esi
pop ebp
pop ebx
add esp, 0x1010
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1024]
push 0
add esi, edx
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x102c]
pop edi
pop esi
pop ebp
mov dword [ecx], 1
xor eax, eax
pop ebx
add esp, 0x1010
ret
mov edx, dword [esp + 0x102c]
pop edi
pop esi
pop ebp
mov dword [edx], 1
mov eax, 1
pop ebx
add esp, 0x1010
ret

Function at 0x100135a0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x18]
push 4
push ecx
push edi
mov dword [esi], 0
call ebx
test eax, eax
je 0x1001362c
cmp dword [esp + 0x14], 4
jb 0x1001362c
mov edx, dword [esp + 0x10]
add edx, 8
push edx
call fcn.1000fc90
mov edx, dword [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esi], eax
push 0
push ecx
add eax, 8
push edx
push eax
push edi
call ebx
test eax, eax
je 0x1001361b
mov esi, dword [esi]
mov dword [esi], 1
mov eax, dword [esp + 0x14]
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esp + 0x10]
jne 0x1001362c
pop edi
pop esi
xor eax, eax
pop ebx
ret
mov edx, dword [esi]
push edx
call fcn.1000fda0
add esp, 4
mov dword [esi], 0
pop edi
pop esi
mov eax, 1
pop ebx
ret
Function at 0x10013a10
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
mov esi, dword [esp + 0x1c]
push edi
push 1
mov dword [esi], 0
mov edi, dword [ebx + 4]
push 0
push 0
push edi
call ebp
mov dword [esp + 0x10], eax
lea eax, [esp + 0x20]
push 0
push eax
lea ecx, [esp + 0x24]
push 4
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10013b20
mov edx, dword [ebx + 0x130]
lea eax, [ebx + 0xc]
lea ecx, [ebx + 0x2c]
push eax
push edx
mov dword [esp + 0x1c], ecx
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push 4
push eax
push ecx
call fcn.100160a0
mov eax, dword [esp + 0x38]
add esp, 0x18
cmp eax, 4
jb 0x10013b20
mov edx, dword [esp + 0x1c]
add edx, 8
push edx
call fcn.1000fc90
add esp, 4
mov dword [esi], eax
push 1
push 0
push 0
push edi
call ebp
mov edx, dword [esi]
mov ecx, dword [esp + 0x1c]
mov ebp, eax
lea eax, [esp + 0x20]
push 0
push eax
add edx, 8
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10013b0f
mov eax, dword [esi]
mov dword [eax], 1
mov ecx, dword [esp + 0x20]
mov dword [eax + 4], ecx
mov edx, dword [ebx + 0x130]
mov ecx, dword [esp + 0x20]
lea eax, [ebx + 0xc]
push eax
mov eax, dword [esp + 0x18]
push edx
mov edx, dword [esi]
push eax
add edx, 8
push ecx
push edx
push ebp
call fcn.100160a0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
add esp, 0x18
cmp eax, ecx
jne 0x10013b20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov ecx, dword [esi]
push ecx
call fcn.1000fda0
add esp, 4
mov dword [esi], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
Function at 0x10014480
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x10
push edi
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x10014496
mov eax, 1
pop edi
add esp, 0x10
ret
push edi
call fcn.10016f90
add esp, 4
test eax, eax
jne 0x100144ad
mov eax, 1
pop edi
add esp, 0x10
ret
mov eax, dword [edi]
push ebx
push ebp
mov ebp, 1
cmp eax, ebp
push esi
mov dword [esp + 0x10], ebp
je 0x10014551
cmp eax, 3
je 0x10014551
cmp eax, 2
jne 0x100145f8
mov esi, dword [edi + 4]
mov ecx, esi
call fcn.100167e0
mov ebx, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
mov edi, eax
cmp edi, ebx
jae 0x100145f8
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], 0
test eax, eax
je 0x100145f8
mov eax, dword [esp + 0x34]
test eax, eax
je 0x100145f8
mov edx, dword [esi]
lea eax, [esp + 0x28]
push ebp
push eax
mov ecx, esi
call dword [edx + 0x20]
mov edx, dword [esi]
push 0
push edi
mov ecx, esi
mov ebx, eax
call dword [edx + 0x18]
test ebx, ebx
je 0x100145f8
mov al, byte [esp + 0x28]
test al, al
je 0x10014543
cmp al, 0x1a
jne 0x100145f8
mov dword [esp + 0x10], ebp
mov eax, ebp
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x10
ret
mov esi, dword [edi + 4]
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push esi
mov dword [esp + 0x24], eax
call ebp
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100145f8
cmp ebx, dword [esp + 0x14]
jae 0x100145f8
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], 0
test eax, eax
je 0x100145f8
mov eax, dword [esp + 0x34]
test eax, eax
je 0x100145f8
lea ecx, [esp + 0x1c]
push 0
push ecx
lea edx, [esp + 0x30]
push 1
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push ebx
push esi
mov dword [esp + 0x24], eax
call ebp
cmp dword [edi], 3
jne 0x100145dc
mov ecx, dword [edi + 0x130]
lea eax, [edi + 0xc]
push eax
add edi, 0x2c
push ecx
push edi
lea edx, [esp + 0x34]
push 1
push edx
push ebx
call fcn.100160a0
add esp, 0x18
mov eax, dword [esp + 0x14]
test eax, eax
je 0x100145f8
mov al, byte [esp + 0x28]
test al, al
je 0x100145f0
cmp al, 0x1a
jne 0x100145f8
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x10
ret
Function at 0x10015b20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, edx
push esi
push edi
mov esi, ebp
xor edi, edi
and esi, 3
mov eax, ecx
jle 0x10015b41
mov dl, byte [eax]
inc eax
cmp dl, bl
je 0x10015b9b
inc edi
cmp edi, esi
jl 0x10015b35
mov edi, ebx
and edi, 0xff
mov esi, edi
shl esi, 8
or esi, edi
shl esi, 8
or esi, edi
shl esi, 8
or esi, edi
lea edi, [ecx + ebp]
cmp eax, edi
jae 0x10015bd0
mov edx, dword [eax]
xor edx, esi
lea ebp, [edx - 0x1010101]
not edx
and ebp, edx
test ebp, 0x80808080
je 0x10015b8a
cmp byte [eax], bl
je 0x10015ba5
cmp byte [eax + 1], bl
je 0x10015bae
cmp byte [eax + 2], bl
je 0x10015bb8
cmp byte [eax + 3], bl
je 0x10015bc4
add eax, 4
cmp eax, edi
jb 0x10015b61
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
dec eax
pop ebx
ret 4
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
inc eax
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
add eax, 2
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
add eax, 3
pop ebx
ret 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 4

Function at 0x10016010
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x10016066
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x1001604d
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x1001aa30
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 1
call sub.WS2_32.dll_WSAStartup
add esp, 0x190
ret

Function at 0x1001ac50
Capabilities:
Create tcp socket

Disassembly:
sub esp, 0x10
push esi
push edi
call fcn.1001aa70
mov edi, eax
call fcn.1001b800
push 6
push 1
push 2
mov dword [edi + 8], eax
call sub.WS2_32.dll_socket
mov ecx, dword [esp + 0x1c]
mov esi, eax
xor eax, eax
mov dword [edi], esi
mov dword [esp + 8], eax
push ecx
mov dword [esp + 0x10], eax
mov word [esp + 0xc], 2
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
call sub.WS2_32.dll_htons
lea edx, [esp + 8]
push 0x10
push edx
push esi
mov word [esp + 0x16], ax
call sub.WS2_32.dll_bind
test eax, eax
jge 0x1001acbe
push esi
call sub.WS2_32.dll_closesocket
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret
push 1
push esi
call sub.WS2_32.dll_listen
test eax, eax
jge 0x1001acd8
push esi
call sub.WS2_32.dll_closesocket
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, edi
pop edi
pop esi
add esp, 0x10
ret
Function at 0x1001ad10
Capabilities:
Get socket status

Disassembly:
sub esp, 0x120
mov ecx, dword [esp + 0x128]
push esi
push edi
mov edi, dword [esp + 0x12c]
test ecx, ecx
mov esi, dword [edi]
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], esi
jne 0x1001ad42
push ecx
push ecx
lea eax, [esp + 0x2c]
push ecx
push eax
jmp 0x1001ad96
cmp ecx, 0xffffffff
jne 0x1001ad59
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
jmp 0x1001ad88
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 8], edx
mov ecx, 0x3e8
cdq
idiv ecx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 0xc], edx
lea eax, [esp + 8]
lea ecx, [esp + 0x24]
push eax
push 0
push 0
push ecx
inc esi
push esi
call sub.WS2_32.dll_select
test eax, eax
jge 0x1001adad
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x120
ret
mov eax, dword [edi]
lea edx, [esp + 0x24]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001ae02
push 8
mov dword [esp + 0x14], 0x10
call sub.MSVCRT.dll_malloc
mov esi, eax
add esp, 4
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
mov dword [esi + 4], 0
mov eax, dword [edi]
push ecx
push edx
push eax
call sub.WS2_32.dll_accept
push esi
push edi
mov dword [esi], eax
call fcn.1001aab0
add esp, 8
mov eax, esi
pop edi
pop esi
add esp, 0x120
ret
pop edi
xor eax, eax
pop esi
add esp, 0x120
ret

Function at 0x1001ae10
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x10c
mov ecx, dword [esp + 0x118]
push esi
mov esi, dword [esp + 0x114]
mov dword [esp + 0xc], 1
test ecx, ecx
mov dword [esp + 0x10], esi
jne 0x1001ae43
push ecx
push ecx
push ecx
lea eax, [esp + 0x18]
lea ecx, [esi + 1]
push eax
push ecx
jmp 0x1001ae9b
cmp ecx, 0xffffffff
jne 0x1001ae5a
mov dword [esp + 4], 0
mov dword [esp + 8], 0
jmp 0x1001ae89
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 4], edx
mov ecx, 0x3e8
cdq
idiv ecx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 8], edx
lea eax, [esp + 4]
lea ecx, [esp + 0xc]
push eax
push 0
push 0
lea edx, [esi + 1]
push ecx
push edx
call sub.WS2_32.dll_select
test eax, eax
jge 0x1001aeaf
or eax, 0xffffffff
pop esi
add esp, 0x10c
ret
lea eax, [esp + 0xc]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001aee7
mov ecx, dword [esp + 0x118]
mov edx, dword [esp + 0x120]
push 0
push ecx
push edx
push esi
call sub.WS2_32.dll_recv
test eax, eax
jg 0x1001aeec
mov eax, 0xfffffffc
pop esi
add esp, 0x10c
ret
mov eax, 0xfffffffd
pop esi
add esp, 0x10c
ret
Function at 0x1001af00
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
sub esp, 0x10c
mov ecx, dword [esp + 0x114]
push esi
mov esi, dword [esp + 0x114]
mov dword [esp + 0xc], 1
test ecx, ecx
mov dword [esp + 0x10], esi
jne 0x1001af33
push ecx
lea eax, [esp + 0x10]
push ecx
push eax
push ecx
lea ecx, [esi + 1]
push ecx
jmp 0x1001af8b
cmp ecx, 0xffffffff
jne 0x1001af4a
mov dword [esp + 4], 0
mov dword [esp + 8], 0
jmp 0x1001af79
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 4], edx
mov ecx, 0x3e8
cdq
idiv ecx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 8], edx
lea eax, [esp + 4]
lea ecx, [esp + 0xc]
push eax
push 0
push ecx
lea edx, [esi + 1]
push 0
push edx
call sub.WS2_32.dll_select
test eax, eax
jge 0x1001af9f
or eax, 0xffffffff
pop esi
add esp, 0x10c
ret
lea eax, [esp + 0xc]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001afce
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x120]
push 0
push ecx
push edx
push esi
call sub.WS2_32.dll_send
pop esi
add esp, 0x10c
ret
mov eax, 0xfffffffd
pop esi
add esp, 0x10c
ret

Function at 0x1001b0c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
sub esp, 0x10
push esi
call fcn.1001b800
push 6
push 1
push 2
mov dword [0x1003ac50], eax
call sub.WS2_32.dll_socket
mov ecx, dword [esp + 0x18]
mov esi, eax
xor eax, eax
push ecx
mov dword [esp + 8], eax
mov word [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call sub.WS2_32.dll_inet_addr
mov edx, dword [esp + 0x1c]
mov dword [esp + 8], eax
push edx
call sub.WS2_32.dll_htons
mov word [esp + 6], ax
lea eax, [esp + 4]
push 0x10
push eax
push esi
call sub.WS2_32.dll_connect
test eax, eax
jge 0x1001b12f
push esi
call sub.WS2_32.dll_closesocket
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x1001b340
Capabilities:
Create udp socket

Disassembly:
sub esp, 0x10
push esi
call fcn.1001b800
push 0
push 2
push 2
mov dword [0x1003ac54], eax
call sub.WS2_32.dll_socket
mov esi, eax
xor eax, eax
mov dword [esp + 4], eax
mov word [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
push eax
mov dword [esp + 0x14], eax
call sub.WS2_32.dll_htonl
mov ecx, dword [esp + 0x18]
mov dword [esp + 8], eax
push ecx
call sub.WS2_32.dll_htons
lea edx, [esp + 4]
push 0x10
push edx
push esi
mov word [esp + 0x12], ax
call sub.WS2_32.dll_bind
test eax, eax
jge 0x1001b3ab
push esi
call sub.WS2_32.dll_closesocket
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, esi
pop esi
add esp, 0x10
ret