joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10038986
Capabilities:
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1008037a
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push edi
mov eax, dword [0x100b02c0]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x10038b8e
cmp esi, ebx
je 0x10038b8e
cmp dword [esi + 0x10], ebx
je 0x10038b8e
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
je 0x10038b8e
lea ecx, [esp + 0x24]
push ecx
push eax
mov byte [esp + 0x1b], bl
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp dword [esp + 0x24], ebx
jne 0x10038b7e
cmp edi, ebx
je 0x10038b7e
cmp edi, dword [esi + 0xc]
ja 0x10038b7e
push edi
call fcn.1005fb39
pop ecx
mov dword [esp + 0x14], eax
cmp eax, ebx
je 0x10038b7e
push ebx
lea ecx, [esp + 0x20]
push ecx
push edi
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10038b6e
lea eax, [esp + 0x18]
push eax
movzx eax, byte [esi + 8]
push ebx
push eax
push dword [esi + 4]
mov eax, dword [esp + 0x2c]
push dword [esi]
push dword [esp + 0x28]
call fcn.10007faa
add esp, 0x18
test al, al
je 0x10038b6e
mov eax, dword [esp + 0x18]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1005fb39
mov edi, eax
pop ecx
mov dword [esp + 0x28], edi
cmp edi, ebx
je 0x10038b6e
lea eax, [esp + 0x18]
push eax
movzx eax, byte [esi + 8]
push edi
push eax
push dword [esi + 4]
mov eax, dword [esp + 0x2c]
push dword [esi]
push dword [esp + 0x28]
call fcn.10007faa
push dword [esp + 0x2c]
call fcn.10060146
add esp, 0x1c
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], 1
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x80], ebx
mov eax, dword [esi + 0x10]
lea ecx, [esp + 0x2c]
call fcn.1003dde8
lea eax, [esp + 0x4c]
push eax
call fcn.1003e481
push edi
lea eax, [esp + 0x30]
push eax
lea edi, [esp + 0x54]
mov byte [esp + 0x88], 1
call fcn.1003de8d
push dword [esp + 0x28]
test eax, eax
setne byte [esp + 0x17]
call fcn.10060146
pop ecx
cmp dword [esp + 0x60], ebx
je 0x10038b42
push dword [esp + 0x60]
call fcn.1006004e
pop ecx
push dword [esp + 0x5c]
call fcn.10060146
push dword [esp + 0x5c]
mov dword [esp + 0x64], ebx
call fcn.10060146
pop ecx
pop ecx
mov dword [esp + 0x58], ebx
cmp dword [esp + 0x30], ebx
je 0x10038b7e
push dword [esp + 0x30]
call fcn.1006004e
pop ecx
cmp dword [esp + 0x14], ebx
je 0x10038b7e
push dword [esp + 0x14]
call fcn.10060146
pop ecx
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
jmp 0x10038b90
xor al, al
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003a294
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x87c
mov eax, dword [0x100b02c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x878], eax
mov esi, 0x104
lea eax, [ebp - 0x210]
xor ecx, ecx
push esi
push eax
mov dword [ebp - 0x87c], edi
mov word [ebp - 0x210], cx
call fcn.10060a93
add esp, 0xc
mov ebx, 0x100a0670
push ebx
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.10060a93
add esp, 0xc
push edi
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.10060a93
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
add esp, 0xc
lea eax, [ebp - 0x870]
push eax
lea eax, [ebp - 0x210]
push eax
call edi
cmp eax, 0xffffffff
je 0x1003a32b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
jmp 0x1003a461
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
je 0x1003a33c
cmp eax, dword [ebp + 0x14]
je 0x1003a45f
push dword [ebp - 0x878]
xor eax, eax
mov word [ebp - 0x620], ax
lea eax, [ebp - 0x620]
push esi
push eax
call fcn.10060a93
add esp, 0xc
push 0x100a43ac
lea eax, [ebp - 0x620]
push esi
push eax
call fcn.10060a93
add esp, 0xc
lea eax, [ebp - 0x870]
push eax
lea eax, [ebp - 0x620]
push eax
call edi
mov dword [ebp - 0x874], eax
cmp eax, 0xffffffff
je 0x1003a45f
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
lea eax, [ebp - 0x844]
push 0x100a43b4
push eax
call fcn.1006136f
pop ecx
pop ecx
test eax, eax
je 0x1003a43c
lea eax, [ebp - 0x844]
push 0x100a43b8
push eax
call fcn.1006136f
pop ecx
pop ecx
test eax, eax
je 0x1003a43c
mov eax, dword [ebp - 0x870]
shr eax, 4
test al, 1
je 0x1003a43c
push dword [ebp - 0x878]
xor eax, eax
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.10060a93
add esp, 0xc
push ebx
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.10060a93
add esp, 0xc
lea eax, [ebp - 0x844]
push eax
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.10060a93
mov eax, dword [ebp + 0x14]
add esp, 0xc
inc eax
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x418]
push dword [ebp - 0x87c]
push eax
call fcn.1003a294
add esp, 0x10
test al, al
jne 0x1003a470
lea eax, [ebp - 0x870]
push eax
push dword [ebp - 0x874]
call edi
test eax, eax
jne 0x1003a395
push dword [ebp - 0x874]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005fc2b
leave
ret
push dword [ebp - 0x874]
jmp 0x1003a31e
Function at 0x1003b42d
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x884
mov eax, dword [0x100b02c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x880], eax
mov esi, 0x104
lea eax, [ebp - 0x210]
xor ecx, ecx
push esi
push eax
mov dword [ebp - 0x884], edi
mov word [ebp - 0x210], cx
call fcn.10060a93
add esp, 0xc
mov ebx, 0x100a0670
push ebx
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.10060a93
add esp, 0xc
push edi
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.10060a93
fldz
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
fstp qword [ebp - 0x878]
add esp, 0xc
lea eax, [ebp - 0x870]
push eax
lea eax, [ebp - 0x210]
push eax
call edi
mov dword [ebp - 0x87c], eax
cmp eax, 0xffffffff
je 0x1003b540
lea eax, [ebp - 0x844]
push 0x100a43b4
push eax
call fcn.1006136f
pop ecx
pop ecx
test eax, eax
je 0x1003b51d
lea eax, [ebp - 0x844]
push 0x100a43b8
push eax
call fcn.1006136f
pop ecx
pop ecx
test eax, eax
je 0x1003b51d
mov eax, dword [ebp - 0x870]
shr eax, 4
test al, 1
je 0x1003b505
cmp byte [ebp + 0x1c], 0
jmp 0x1003b509
cmp byte [ebp + 0x18], 0
je 0x1003b51d
fld qword [ebp - 0x878]
fadd qword [0x100a5258]
fstp qword [ebp - 0x878]
lea eax, [ebp - 0x870]
push eax
push dword [ebp - 0x87c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1003b4c4
push dword [ebp - 0x87c]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
je 0x1003b551
cmp eax, dword [ebp + 0x14]
je 0x1003b676
push dword [ebp - 0x880]
xor eax, eax
mov word [ebp - 0x620], ax
lea eax, [ebp - 0x620]
push esi
push eax
call fcn.10060a93
add esp, 0xc
push 0x100a43ac
lea eax, [ebp - 0x620]
push esi
push eax
call fcn.10060a93
add esp, 0xc
lea eax, [ebp - 0x870]
push eax
lea eax, [ebp - 0x620]
push eax
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x1003b676
lea eax, [ebp - 0x844]
push 0x100a43b4
push eax
call fcn.1006136f
pop ecx
pop ecx
test eax, eax
je 0x1003b659
lea eax, [ebp - 0x844]
push 0x100a43b8
push eax
call fcn.1006136f
pop ecx
pop ecx
test eax, eax
je 0x1003b659
mov eax, dword [ebp - 0x870]
shr eax, 4
test al, 1
je 0x1003b659
push dword [ebp - 0x880]
xor eax, eax
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.10060a93
add esp, 0xc
push ebx
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.10060a93
add esp, 0xc
lea eax, [ebp - 0x844]
push eax
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.10060a93
mov eax, dword [ebp + 0x14]
add esp, 0xc
push dword [ebp + 0x1c]
inc eax
push dword [ebp + 0x18]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x418]
push dword [ebp - 0x884]
push eax
call fcn.1003b42d
fadd qword [ebp - 0x878]
add esp, 0x18
fstp qword [ebp - 0x878]
lea eax, [ebp - 0x870]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1003b5a0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
fld qword [ebp - 0x878]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005fc2b
leave
ret
Function at 0x1003fe25
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
or esi, 0xffffffff
cmp byte [eax + 0x420], 0
je 0x1003fe88
cmp byte [eax + 0x422], 0
je 0x1003fe5c
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [eax + 0x41c]
mov eax, dword [ebp + 0xc]
call fcn.10030631
add esp, 0x10
mov esi, eax
jmp 0x1003fe88
push dword [ebp + 0xc]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0
push dword [ebp + 8]
push dword [eax + 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1003fe7e
xor esi, esi
jmp 0x1003fe88
cmp eax, 0xea
jne 0x1003fe88
push 0xfffffffffffffffe
pop esi
mov eax, esi
pop esi
pop ebp
ret 0x10

Function at 0x1003fe8f
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
cmp byte [ecx + 0x420], 0
push esi
push edi
je 0x1003ff00
cmp byte [ecx + 0x422], 0
mov edx, dword [eax]
mov eax, edx
lea edi, [eax + 2]
jne 0x1003feda
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x1003fead
sub eax, edi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push edx
push 1
push 0
push dword [ebp + 8]
push dword [ecx + 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1003ff00
jmp 0x1003ff03
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x1003feda
push edx
push dword [ebp + 8]
sub eax, edi
push dword [ecx + 0x41c]
sar eax, 1
lea eax, [eax + eax + 2]
call fcn.100305b1
add esp, 0xc
jmp 0x1003ff03
or eax, 0xffffffff
pop edi
pop esi
pop ebp
ret 4

Function at 0x100416ab
Capabilities:
Access firewall settings via inetfwmgr

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
xor esi, esi
push esi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jge 0x100416d0
push 2
pop eax
pop esi
leave
ret 4
lea eax, [ebp - 8]
push eax
push 0x100a50d8
push 1
push esi
push 0x100a50c8
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x100416c8
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
lea edx, [ebp - 0xc]
push edx
push eax
call dword [ecx + 0x1c]
test eax, eax
jge 0x10041707
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x100416c8
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
lea edx, [ebp - 0x10]
push edx
push eax
call dword [ecx + 0x1c]
test eax, eax
jge 0x10041723
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x100416fc
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
lea edx, [ebp - 4]
push edx
push eax
call dword [ecx + 0x20]
test eax, eax
jge 0x10041759
push 2
pop esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, esi
jmp 0x100416cb
cmp word [ebp - 4], si
mov ecx, dword [ebp + 8]
setne al
mov byte [ecx], al
jmp 0x10041737
Function at 0x10042f21
Capabilities:
Hash data with md5

Disassembly:
and dword [eax + 0x10], 0
and dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret

Function at 0x1004503e
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x100b02c0]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x10045082
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x1004507c
shr eax, 8
cmp al, 2
jne 0x1004507c
xor eax, eax
jmp 0x10045085
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005fc2b
leave
ret

Function at 0x1004ba26
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x48
push 1
mov ebx, eax
mov edi, ecx
call dword [0x100b0010]
mov esi, eax
xor eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], 0xc
mov dword [edi + 0x334], esi
cmp esi, eax
je 0x1004bad8
mov dword [edi + 0x32c], eax
mov dword [edi + 0x330], eax
mov dword [edi + 0x328], eax
mov dword [edi + 0x324], ebx
or dword [esi + 4], 0xffffffff
push ebx
push dword [ebp + 8]
mov dword [esi], eax
lea eax, [esi + 0x10]
call fcn.1004b8db
pop ecx
pop ecx
test eax, eax
je 0x1004bad8
lea ebx, [edi + 0x320]
push dword [ebx]
call fcn.1004567c
push dword [ebp + 8]
call dword [0x100b000c]
pop ecx
pop ecx
mov dword [ebx], eax
test eax, eax
je 0x1004bad8
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x1004bad8
lea eax, [esi + 0x10]
push eax
push 0x1004b953
call fcn.10058c33
pop ecx
pop ecx
mov dword [esi], eax
test eax, eax
jne 0x1004baf2
call fcn.10065b53
mov eax, dword [eax]
mov dword [ebp - 4], eax
add edi, 0x320
push edi
call fcn.1004b9d1
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1004baf5
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1004c3b7
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x1004c3e7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
pop ebp
ret
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor eax, eax
pop ebp
ret

Function at 0x1004c508
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [esi + 0x16c]
test ecx, ecx
je 0x1004c52a
push dword [esi + 0xfc]
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
push esi
call ecx
add esp, 0x14
pop ebp
ret
test eax, eax
jl 0x1004c561
cmp eax, 2
jg 0x1004c561
push dword [esi + 0xf8]
imul eax, eax, 3
push 1
add eax, 0x100872e0
push 2
push eax
call fcn.1006498d
push dword [esi + 0xf8]
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1006498d
add esp, 0x20
xor eax, eax
pop ebp
ret
Function at 0x1004c716
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + eax*4 + 0xc8]
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov esi, dword [ebp + 0x18]
and dword [esi], 0
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1004c779
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1004c75c
xor ebx, ebx
mov dword [esi], 0x51
jmp 0x1004c779
push eax
push edi
call fcn.10058acf
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.1004c687
add esp, 0x14
mov dword [esi], 0x37
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret
Function at 0x1004d964
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x100b02c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x134], 0
mov ebx, dword [esi]
mov dword [ebp - 0x10c], esi
jne 0x1004da84
push edi
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
mov edi, 0x80
mov dword [ebp - 0x108], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x1004d9d3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.10058acf
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
jmp 0x1004da7a
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x108], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1004da0c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.10058acf
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x1004da7a
lea edi, [ebx + 0x86cc]
lea ecx, [ebx + 0x869c]
lea esi, [ebp - 0x84]
call fcn.1004d92b
test eax, eax
jne 0x1004da44
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x10c]
call fcn.10058acf
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x1004da7a
lea edi, [ebx + 0x8700]
lea ecx, [ebx + 0x86d0]
lea esi, [ebp - 0x104]
call fcn.1004d92b
test eax, eax
jne 0x1004da83
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x10c]
call fcn.10058acf
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1004c687
add esp, 0x18
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.1005fc2b
leave
ret

Function at 0x1004da92
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x308]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x1004dad7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.10058acf
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.1004c61d
add esp, 0x14
jmp 0x1004dae4
push str.TCP_NODELAY_set_n
push esi
call fcn.1004c61d
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x1004df61
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x518]
push esi
cmp eax, 0xffffffff
je 0x1004dfbf
mov ecx, dword [ecx + 0x50c]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x1004dfbf
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax]
test ecx, ecx
je 0x1004df8e
mov dword [ecx], eax
mov ecx, dword [eax + 0xc8]
mov esi, dword [ebp + 0xc]
mov dword [esi], ecx
cmp dword [eax + 0xe0], 0
jne 0x1004dfba
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push dword [eax + 0xc8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x1004dfc5
or dword [esi], 0xffffffff
jmp 0x1004dfc5
mov eax, dword [ebp + 0xc]
or dword [eax], 0xffffffff
xor eax, eax
pop esi
pop ebp
ret
Function at 0x10055035
Capabilities:
Check for time delay via gettickcount
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
xor edx, edx
push edi
xor edi, edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], edx
cmp esi, 0xffffffff
jne 0x10055068
cmp ebx, esi
jne 0x10055068
push dword [ebp + 0x10]
call fcn.1005500d
pop ecx
jmp 0x10055205
cmp dword [ebp + 0x10], edx
jle 0x1005507d
mov edi, dword [ebp + 0x10]
call fcn.1004bdc2
mov dword [ebp - 4], edx
mov dword [ebp - 8], eax
xor edx, edx
xor eax, eax
or ecx, 0xffffffff
inc eax
mov dword [ebp - 0x114], edx
mov dword [ebp - 0x218], edx
cmp esi, ecx
je 0x100550ad
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x110], esi
mov dword [ebp - 0x114], eax
mov ecx, esi
mov dword [ebp - 0x31c], edx
cmp ebx, 0xffffffff
je 0x10055104
mov dword [ebp - 0x31c], eax
xor eax, eax
mov dword [ebp - 0x318], ebx
cmp dword [ebp - 0x114], edx
jbe 0x100550e0
cmp dword [ebp + eax*4 - 0x110], ebx
je 0x100550e0
inc eax
cmp eax, dword [ebp - 0x114]
jb 0x100550ce
cmp eax, dword [ebp - 0x114]
jne 0x100550fe
cmp dword [ebp - 0x114], 0x40
jae 0x100550fe
mov dword [ebp + eax*4 - 0x110], ebx
inc dword [ebp - 0x114]
cmp ebx, ecx
jbe 0x10055104
mov ecx, ebx
cmp dword [ebp + 0x10], edx
jge 0x1005510d
xor ebx, ebx
jmp 0x10055110
lea ebx, [ebp - 0x10]
lea esi, [ecx + 1]
xor eax, eax
cmp dword [ebp + 0x10], eax
jle 0x1005512f
mov eax, edi
cdq
mov ecx, 0x3e8
idiv ecx
imul edx, edx, 0x3e8
mov dword [ebp - 0xc], edx
jmp 0x10055134
jne 0x10055137
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x218]
push eax
push esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x10055190
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1005516a
cmp eax, 0x2714
jne 0x10055194
cmp dword [ebp + 0x10], 0
jle 0x10055113
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.1004bdc2
push edx
push eax
call fcn.1004bdd8
mov edi, dword [ebp + 0x10]
sub edi, eax
add esp, 0x10
test edi, edi
jg 0x10055113
jmp 0x10055194
test eax, eax
jge 0x10055199
or eax, 0xffffffff
jmp 0x10055205
jne 0x1005519f
xor eax, eax
jmp 0x10055205
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
je 0x100551d1
lea eax, [ebp - 0x218]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100551bb
inc esi
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100551d1
or esi, 4
cmp dword [ebp + 0xc], 0xffffffff
je 0x10055203
lea eax, [ebp - 0x31c]
push eax
push dword [ebp + 0xc]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100551ed
or esi, 2
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 0xc]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10055203
or esi, 4
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret