joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001b8c0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
push 0
push 0
push 1
push 0
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0x1001b8a0
push 0
push 0
call fcn.100728fd
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 0x18
mov dword [ebp - 4], eax
push 0
push dword [ebp - 8]
call esi
cmp eax, 0x102
jne 0x1001b950
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
nop dword [eax]
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x28]
push eax
call edi
test eax, eax
je 0x1001b942
lea eax, [ebp - 0x28]
push eax
call ebx
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push dword [ebp - 8]
call esi
cmp eax, 0x102
je 0x1001b920
push dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x1001b9b0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1604
call fcn.1001f860
mov eax, dword [0x100ab06c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0x44
lea eax, [ebp - 0x1600]
xor bl, bl
push 0
push eax
call fcn.10060f70
add esp, 0xc
lea eax, [ebp - 0x210]
xorps xmm0, xmm0
movups xmmword [ebp - 0x15b4], xmm0
push 0x208
push 0
push eax
call fcn.10060f70
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea ecx, [ebp - 0x1598]
call fcn.1001bc00
mov eax, ecx
mov dword [ebp - 0x15a0], 0x20
push 0x989680
lea ecx, [ebp - 0x15a4]
mov dword [ebp - 0x15a4], eax
mov dword [ebp - 0x159c], 0xffffffff
call fcn.1001bc50
push eax
push str.c:WindowsSystem32_d.exe
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.1001b860
add esp, 0x10
lea eax, [ebp - 0x15b4]
push eax
lea eax, [ebp - 0x1600]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x210]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1001baab
push dword [ebp - 0x15b0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x15b4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001ecda
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.1001ecda
mov esp, ebp
pop ebp
ret
Function at 0x1001bac0
Capabilities:
Get hostname
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x410
mov eax, dword [0x100ab06c]
xor eax, esp
mov dword [esp + 0x40c], eax
push esi
push edi
call fcn.1001b8c0
call fcn.1001b9b0
test al, al
je 0x1001bb00
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.1001ecda
mov esp, ebp
pop ebp
ret
push 0x400
lea eax, [esp + 0x14]
push 0
push eax
call fcn.10060f70
add esp, 0xc
mov dword [esp + 0xc], 0x400
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov edi, dword [esp + 0xc]
xor ecx, ecx
xor edx, edx
test edi, edi
je 0x1001bb71
nop dword [eax + eax]
movsx eax, byte [esp + edx + 0x10]
imul eax, eax, 0xd
shl ecx, 4
add ecx, eax
mov esi, ecx
and esi, 0xf0000000
je 0x1001bb60
mov eax, esi
shr eax, 0x18
xor eax, esi
xor ecx, eax
inc edx
cmp edx, edi
jb 0x1001bb40
cmp ecx, 0x1d52f71
je 0x1001baea
mov esi, dword [sym.imp.KERNEL32.dll_GetComputerNameExA]
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x400
push eax
push 0
call esi
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
call fcn.1001b970
cmp eax, 0xe0decd8
je 0x1001baea
call fcn.1001b9b0
test al, al
jne 0x1001baea
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x400
push eax
lea eax, [esp + 0x14]
push eax
push 2
call esi
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
call fcn.1001b970
cmp eax, 0xe0decd8
je 0x1001baea
call fcn.1001b9b0
mov ecx, dword [esp + 0x414]
test al, al
pop edi
setne al
pop esi
xor ecx, esp
call fcn.1001ecda
mov esp, ebp
pop ebp
ret

Function at 0x1001bc00
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push esi
push edi
mov dword [ecx + 0x1384], 0xffffffff
lea edi, [ecx + 8]
mov dword [ecx + 4], edx
mov esi, 1
nop dword [eax]
mov eax, edx
lea edi, [edi + 4]
shr eax, 0x1e
xor eax, edx
imul edx, eax, 0x6c078965
add edx, esi
inc esi
mov dword [edi - 4], edx
cmp esi, 0x270
jl 0x1001bc20
pop edi
mov dword [ecx], 0x270
mov eax, ecx
pop esi
pop ebp
ret 0xc

Function at 0x1001bd40
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push esi
lea eax, [ecx + 8]
mov esi, 0x270
nop dword [eax]
mov edx, dword [eax - 4]
lea eax, [eax + 4]
xor edx, dword [eax - 4]
and edx, 0x7fffffff
xor edx, dword [eax - 8]
mov ecx, edx
and cl, 1
movzx ecx, cl
neg ecx
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [eax + 0x62c]
xor ecx, edx
mov dword [eax + 0x9b8], ecx
sub esi, 1
jne 0x1001bd50
pop esi
ret
Function at 0x1001bd90
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebx
mov ebx, ecx
mov ecx, 0xe3
push esi
push edi
lea edi, [ebx + 0x9c4]
mov edx, dword [edi + 4]
lea edi, [edi + 4]
xor edx, dword [edi - 4]
and edx, 0x7fffffff
xor edx, dword [edi - 4]
mov eax, edx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr edx, 1
and eax, 0x9908b0df
xor eax, dword [edi + 0x630]
xor eax, edx
mov dword [edi - 0x9c4], eax
sub ecx, 1
jne 0x1001bda0
lea esi, [ebx + 0xd50]
mov edi, 0x18c
mov ecx, dword [esi + 4]
lea esi, [esi + 4]
xor ecx, dword [esi - 4]
and ecx, 0x7fffffff
xor ecx, dword [esi - 4]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [esi - 0xd50]
xor eax, ecx
mov dword [esi - 0x9c4], eax
sub edi, 1
jne 0x1001bde2
mov ecx, dword [ebx + 0x1380]
xor ecx, dword [ebx + 4]
and ecx, 0x7fffffff
xor ecx, dword [ebx + 0x1380]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [ebx + 0x634]
xor eax, ecx
mov dword [ebx + 0x9c0], eax
mov dword [ebx], edi
pop edi
pop esi
pop ebx
ret
Function at 0x1001bff0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x100ab06c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push 0
push 0
sub esp, 8
mov dword [ebp - 0x38], esi
mov edx, esp
mov dword [edx], edi
test edi, edi
jne 0x1001c01f
xor ecx, ecx
jmp 0x1001c03c
cmp byte [edi], 0
jne 0x1001c028
xor ecx, ecx
jmp 0x1001c03c
mov ecx, edi
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001c030
sub ecx, esi
mov esi, dword [ebp - 0x38]
lea eax, [ebp - 0x1c]
mov dword [edx + 4], ecx
push eax
call fcn.10016190
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x1001c053
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebp - 0x1c]
mov ebx, eax
call fcn.1000a380
test ebx, ebx
jne 0x1001c07d
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001ecda
mov esp, ebp
pop ebp
ret 8
test esi, esi
je 0x1001c129
xor ecx, ecx
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1001f05c
add esp, 4
mov esi, eax
push ebx
push esi
sub esp, 8
mov edx, esp
mov dword [edx], edi
test edi, edi
je 0x1001c0c9
cmp byte [edi], 0
jne 0x1001c0b8
xor edi, edi
jmp 0x1001c0c9
lea ecx, [edi + 1]
nop dword [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x1001c0c0
sub edi, ecx
lea eax, [ebp - 0x1c]
mov dword [edx + 4], edi
push eax
call fcn.10016190
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x1001c0e0
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebp - 0x1c]
call fcn.1000a380
push esi
lea ecx, [ebp - 0x1c]
call fcn.1000a410
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x34]
call fcn.10016090
mov ecx, dword [ebp - 0x38]
push eax
call fcn.1000a680
lea ecx, [ebp - 0x34]
call fcn.1000a640
lea ecx, [ebp - 0x1c]
call fcn.1000a380
test esi, esi
je 0x1001c129
push esi
call fcn.1001f057
add esp, 4
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1001ecda
mov esp, ebp
pop ebp
ret 8

Function at 0x10026594
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x100265fb
push esi
call fcn.10026877
pop ecx
test al, al
jne 0x100265fb
push ebx
push edi
lea eax, [ebp + 8]
push eax
push esi
call fcn.10026816
pop ecx
mov esi, eax
mov ebx, 0x1505
pop ecx
mov ecx, dword [ebp + 8]
xor eax, eax
and dword [ebp + 8], 0
add ecx, esi
mov edi, ecx
sub edi, esi
cmp esi, ecx
cmova edi, eax
test edi, edi
je 0x100265f4
mov al, byte [esi]
push eax
call fcn.10031b3a
imul ebx, ebx, 0x21
pop ecx
movsx ecx, al
mov eax, dword [ebp + 8]
xor ebx, ecx
inc esi
inc eax
mov dword [ebp + 8], eax
cmp eax, edi
jb 0x100265d7
pop edi
movzx eax, bl
pop ebx
jmp 0x100265fd
xor eax, eax
pop esi
pop ebp
ret
Function at 0x1002732e
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x1002734f
cmp dword [esi + 0x8c], 0
je 0x1002734f
push 2
push 3
push esi
call fcn.100325f6
add esp, 0xc
push dword [ebp + 0xc]
call fcn.10032a05
pop ecx
test esi, esi
je 0x1002736f
cmp dword [esi + 0x8c], 0
je 0x1002736f
push 3
push esi
call fcn.10032631
pop ecx
pop ecx
pop esi
pop ebp
ret
Function at 0x1002f565
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp dword [esi + 0x608], edi
je 0x1002f5a4
push 1
push esi
call fcn.10022f77
push dword [esi + 0x59c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [esi + 0x608]
push 0
push esi
mov edi, eax
call fcn.10022f77
add esp, 0x24
jmp 0x1002f5da
mov eax, dword [ebp + 0xc]
cmp eax, 2
ja 0x1002f5da
push dword [esi + 0x598]
imul eax, eax, 3
push 1
push 2
add eax, 0x1008e03c
push eax
call fcn.100688bb
push dword [esi + 0x598]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.100688bb
add esp, 0x20
mov eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x1002f9aa
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x100ab06c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, dword [ebx + eax*4 + 0x1a8]
push eax
push ebx
mov dword [ebp - 0x88], ecx
call fcn.1002fe5e
pop ecx
pop ecx
push 0
push dword [ebp + 0x14]
push edi
push esi
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
mov eax, dword [ebp - 0x88]
and dword [eax], 0
cmp esi, 0xffffffff
jne 0x1002fa55
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0x2733
jne 0x1002fa1f
mov eax, dword [ebp - 0x88]
xor esi, esi
mov dword [eax], 0x51
jmp 0x1002fa55
push 0x80
lea eax, [ebp - 0x84]
push eax
push edi
call fcn.10053277
push eax
push str.Send_failure:__s
push dword [ebx]
call fcn.1002f5e0
mov eax, dword [ebx]
add esp, 0x18
mov dword [eax + 0xcac], edi
mov eax, dword [ebp - 0x88]
mov dword [eax], 0x37
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1001ecda
mov esp, ebp
pop ebp
ret
Function at 0x1002fe5e
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
add edi, edi
mov eax, dword [esi + 0x2a8]
mov edx, dword [esi + ecx*4 + 0x1a8]
mov dword [ebp + 8], edx
mov ebx, dword [esi + edi*8 + 0x1d0]
sub ebx, dword [esi + edi*8 + 0x1d4]
test byte [eax + 0x40], 3
je 0x1002ff46
cmp dword [esi + ecx*4 + 0x1bc], 0x1002f8e5
jne 0x1002ff46
xor eax, eax
cmp dword [esi + edi*8 + 0x1cc], eax
je 0x1002feba
test ebx, ebx
je 0x1002ff46
push eax
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call fcn.1002f185
add esp, 0x14
cmp eax, 0xffffffff
je 0x1002ff46
test al, 1
je 0x1002ff46
xor ecx, ecx
cmp dword [esi + edi*8 + 0x1cc], ecx
jne 0x1002ff21
mov eax, dword [esi]
mov eax, dword [eax + 0x8e4]
add eax, eax
push eax
mov dword [esi + edi*8 + 0x1d0], eax
call dword [0x100ab090]
mov ebx, dword [esi + edi*8 + 0x1d0]
pop ecx
xor ecx, ecx
mov dword [esi + edi*8 + 0x1cc], eax
mov dword [esi + edi*8 + 0x1d4], ecx
mov dword [esi + edi*8 + 0x1d8], ecx
test eax, eax
jne 0x1002ff21
mov dword [esi + edi*8 + 0x1d0], ecx
jmp 0x1002ff46
mov eax, dword [esi + edi*8 + 0x1cc]
add eax, dword [esi + edi*8 + 0x1d4]
push ecx
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x1002ff46
add dword [esi + edi*8 + 0x1d4], eax
pop edi
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test byte [eax + 0x1f8], 1
je 0x10030028
push eax
call fcn.1002985e
pop ecx
test eax, eax
jne 0x10030044
xor al, al
pop ebp
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x10030024
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
jmp 0x10030020
mov al, 1
pop ebp
ret

Function at 0x10030725
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
mov eax, dword [0x100ad340]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 0xc], 4
push esi
push 2
pop esi
test eax, eax
jne 0x1003076c
push 3
push esi
push eax
push 6
call fcn.10031889
add esp, 0x10
test al, al
je 0x10030764
mov dword [0x100ad340], esi
jmp 0x100307ac
xor eax, eax
inc eax
mov dword [0x100ad340], eax
cmp eax, esi
je 0x100307ac
push ebx
lea eax, [ebp - 0xc]
mov esi, 0x1001
push eax
lea eax, [ebp - 4]
mov ebx, 0xffff
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1003079a
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x100307ab
push 4
lea eax, [ebp - 8]
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10030980
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
mov eax, dword [0x100ab06c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
cmp dword [ebx + 0x90], 2
mov edi, dword [ebx]
mov dword [ebp - 0x18c], edi
je 0x10030b19
test dword [ebx + 0x284], 0x8000002
push esi
jne 0x10030b11
lea eax, [ebp - 0x188]
mov esi, 0x80
push eax
lea eax, [ebp - 0x184]
mov dword [ebp - 0x188], esi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x10030a07
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.10053277
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
jmp 0x10030a5b
push esi
lea eax, [ebp - 0x104]
mov dword [ebp - 0x188], esi
push 0
push eax
call fcn.10060f70
add esp, 0xc
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10030a61
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.10053277
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
jmp 0x10030b07
lea eax, [ebx + 0x138]
push eax
lea esi, [ebx + 0x10a]
lea eax, [ebp - 0x184]
push esi
push eax
call fcn.10030f6c
add esp, 0xc
test al, al
jne 0x10030aad
call fcn.1006898c
mov esi, eax
call fcn.1006898c
mov edi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push dword [esi]
call fcn.10053277
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x10030b01
push 0xb
pop ecx
lea edi, [ebx + 0x5c]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x16c]
push eax
lea eax, [ebx + 0x13c]
push eax
lea eax, [ebp - 0x104]
movsw word es:[edi], word [esi]
push eax
call fcn.10030f6c
add esp, 0xc
test al, al
jne 0x10030b11
call fcn.1006898c
mov esi, eax
call fcn.1006898c
mov edi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push dword [esi]
call fcn.10053277
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x18c]
call fcn.1002f5e0
add esp, 0x1c
jmp 0x10030b18
push ebx
call fcn.100306b2
pop ecx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.1001ecda
mov esp, ebp
pop ebp
ret
Function at 0x100312df
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x100ab06c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 4
mov eax, dword [esi + 0xa90]
shr eax, 0xd
and eax, 1
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1003132f
push dword [ebp + 0xc]
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.1002f6b6
add esp, 0xc
jmp 0x100313a0
push dword [esi + 0xa50]
mov dword [ebp - 0x10], 1
call fcn.10031547
push dword [esi + 0xa54]
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.10031547
pop ecx
pop ecx
imul eax, eax, 0x3e8
xor ecx, ecx
push ecx
push ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push ecx
push ecx
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x100313a0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 0xc]
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.1002f6b6
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1001ecda
mov esp, ebp
pop ebp
ret

Function at 0x100313af
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x100ab06c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
push esi
push 4
inc ecx
mov esi, dword [eax]
lea eax, [ebp - 0x88]
push eax
push ecx
push 6
push dword [ebp + 0xc]
mov dword [ebp - 0x88], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x10031413
push 0x80
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10053277
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.1002f6b6
add esp, 0x18
jmp 0x10031420
push str.TCP_NODELAY_set_n
push esi
call fcn.1002f6b6
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1001ecda
mov esp, ebp
pop ebp
ret

Function at 0x1003153e
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.100766f0
Function at 0x10031752
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push str.kernel32
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 4], eax
test eax, eax
je 0x10031884
push ebx
push edi
push 0x1008e46c
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [ebp + 8]
mov ebx, eax
push 0x1008e47c
push edi
mov dword [ebp - 8], ebx
call fcn.100724d4
pop ecx
pop ecx
test eax, eax
je 0x100317a8
test ebx, ebx
je 0x1003179f
push 8
jmp 0x100317c3
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
jmp 0x100317c7
test ebx, ebx
je 0x100317ce
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x100317ce
push 0x800
push esi
push edi
call ebx
mov esi, eax
jmp 0x10031880
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x10031880
mov ecx, edi
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x100317e8
sub ecx, ebx
sar ecx, 1
lea eax, [ecx + edx]
lea eax, [eax*2 + 2]
push eax
call dword [0x100ab090]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10031878
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10031878
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x10031822
sub ecx, edx
sar ecx, 1
mov dword [ebx + ecx*2], 0x5c
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x1003183d
sub ecx, edx
sar ecx, 1
lea ecx, [ebx + ecx*2]
sub ecx, edi
movzx eax, word [edi]
mov word [ecx + edi], ax
lea edi, [edi + 2]
test ax, ax
jne 0x10031851
mov eax, dword [ebp - 8]
test eax, eax
je 0x1003186f
push 8
push esi
push ebx
call eax
jmp 0x10031876
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
push ebx
call dword [0x100ab094]
pop ecx
pop edi
mov eax, esi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x100319bc
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x100ab06c]
xor eax, ebp
mov dword [ebp - 4], eax
test byte [ebp + 8], 2
je 0x10031a09
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x100319f0
push 2
pop eax
jmp 0x10031a42
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x10031a01
shr eax, 8
cmp al, 2
je 0x10031a09
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x100319eb
call fcn.100546e5
test eax, eax
jne 0x10031a42
push 3
push 2
push eax
push 6
call fcn.10031889
add esp, 0x10
test al, al
je 0x10031a39
push 0x100aed80
mov byte [0x100aed7c], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
jmp 0x10031a40
mov byte [0x100aed7c], 0
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001ecda
mov esp, ebp
pop ebp
ret