joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4023d0
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
lea edi, [ebx + 0x44]
mov ecx, 8
mov esi, ebp
push str.expand_32_byte_k
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20]
lea edi, [ebx + 0x64]
mov eax, esi
mov ecx, edi
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov eax, dword [eax + 8]
mov dword [ecx + 8], eax
call fcn.00402500
push 0x8c6044
mov dword [ebx + 0x74], eax
call fcn.00402500
push 0x8c6048
mov dword [ebx + 0x78], eax
call fcn.00402500
push 0x8c604c
mov dword [ebx + 0x7c], eax
call fcn.00402500
push ebp
mov dword [ebx + 0x80], eax
call fcn.00402500
lea ecx, [ebp + 4]
mov dword [ebx + 0x84], eax
push ecx
call fcn.00402500
lea edx, [ebp + 8]
mov dword [ebx + 0x88], eax
push edx
call fcn.00402500
mov dword [ebx + 0x8c], eax
lea eax, [ebp + 0xc]
push eax
call fcn.00402500
lea ecx, [ebp + 0x10]
mov dword [ebx + 0x90], eax
push ecx
call fcn.00402500
lea edx, [ebp + 0x14]
mov dword [ebx + 0x94], eax
push edx
call fcn.00402500
mov dword [ebx + 0x98], eax
lea eax, [ebp + 0x18]
push eax
call fcn.00402500
add ebp, 0x1c
mov dword [ebx + 0x9c], eax
push ebp
call fcn.00402500
push esi
mov dword [ebx + 0xa0], eax
mov dword [ebx + 0xa4], 0
call fcn.00402500
lea ecx, [esi + 4]
mov dword [ebx + 0xa8], eax
push ecx
call fcn.00402500
lea edx, [esi + 8]
mov dword [ebx + 0xac], eax
push edx
call fcn.00402500
mov dword [ebx + 0xb0], eax
mov eax, dword [esi]
mov dword [edi], eax
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov edx, dword [esi + 8]
add esp, 0x3c
mov dword [edi + 8], edx
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x831a20
Capabilities:
Parse pe header

Disassembly:
mov ecx, dword [esp + 4]
cmp word [ecx], 0x5a4d
jne 0x831a3c
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x831a3c
mov eax, dword [eax + 0x28]
ret
xor eax, eax
ret
Function at 0x832970
Capabilities:
Get file size

Disassembly:
sub esp, 0x214
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x1e]
mov word [esp + 0x1c], bp
mov dword [esp + 0x10], ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x228]
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.00841c69
lea edx, [esp + 0x24]
push 0x8d58a0
push edx
call fcn.00841c3f
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0x10
xor edi, edi
push ebp
push 0x80
push 3
push ebp
push 1
lea eax, [esp + 0x30]
push 0xa0000000
push eax
call dword [0x8d7930]
mov esi, eax
cmp esi, 0xffffffff
jne 0x8329fe
push 0xbb8
call ebx
inc edi
cmp edi, 0x3c
jl 0x8329c0
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [esp + 0x14], ebp
push edi
mov dword [esp + 0x1c], edi
call fcn.00841608
add esp, 4
lea ecx, [esp + 0x14]
mov ebx, eax
push ebp
push ecx
push edi
push ebx
push esi
call dword [0x8d7924]
test eax, eax
je 0x832a9c
mov edx, dword [esp + 0x14]
or edi, 0xffffffff
xor eax, eax
cmp edx, 0x100
jbe 0x832a98
mov cl, byte [ebx]
cmp cl, 0x4d
jne 0x832a53
cmp byte [ebx + 1], 0x5a
jne 0x832a53
mov ebp, 1
xor edi, edi
cmp cl, 0xd0
jne 0x832a6a
cmp byte [ebx + 1], 0xcf
jne 0x832a6a
cmp byte [ebx + 2], 0x11
jne 0x832a6a
cmp byte [ebx + 3], 0xe0
je 0x832a98
test edi, edi
jne 0x832a84
push edx
push ebx
call fcn.00831a20
add esp, 8
xor edx, edx
cmp eax, 0x1000
sete dl
mov eax, edx
test ebp, ebp
je 0x832a98
test eax, eax
je 0x832a98
test edi, edi
jne 0x832a98
mov dword [esp + 0x10], 1
mov edi, dword [esp + 0x18]
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
rep stosb byte es:[edi], al
call fcn.008415c0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret
Function at 0x838370
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
mov dword [eax + 0x18], ecx
mov dword [eax + 0x14], ecx
ret
Function at 0x846ef9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x8c9290
cmp edx, dword [eax]
je 0x846f1b
add eax, 8
inc ecx
cmp eax, 0x8c9320
jl 0x846f0c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x8c9290]
jne 0x847049
mov eax, dword [0x8d7130]
cmp eax, 1
je 0x847023
test eax, eax
jne 0x846f4c
cmp dword [0x8c89b4], 1
je 0x847023
cmp edx, 0xfc
je 0x847049
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x846f83
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.008443f0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.008444e0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x846fc6
lea eax, [ebp - 0x1a4]
push eax
call fcn.008444e0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x8c2d10
push edi
call fcn.008428c0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.008443f0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00844400
lea eax, [ebp - 0xa0]
push 0x8c2cf0
push eax
call fcn.00844400
push dword [esi + 0x8c9294]
lea eax, [ebp - 0xa0]
push eax
call fcn.00844400
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00848b1d
add esp, 0x2c
pop edi
jmp 0x847049
lea eax, [ebp + 8]
lea esi, [esi + 0x8c9294]
push 0
push eax
push dword [esi]
call fcn.008444e0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x84ea10
Capabilities:
Initialize winsock library

Disassembly:
mov al, byte [esp + 4]
sub esp, 0x190
test al, 2
je 0x84ea61
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x84ea3e
mov eax, 2
add esp, 0x190
ret
mov ax, word [esp]
cmp al, 2
jne 0x84ea4f
xor ecx, ecx
mov cl, ah
cmp cl, al
je 0x84ea61
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
add esp, 0x190
ret
call fcn.008614a0
test eax, eax
jne 0x84eabd
push str.iphlpapi.dll
call fcn.0084ec70
add esp, 4
mov dword [0x8d7558], eax
test eax, eax
je 0x84ea95
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x84ea95
mov dword [0x8d755c], eax
push 3
push 2
push 0
push 6
call fcn.0084eb10
add esp, 0x10
neg eax
sbb eax, eax
push 0x8d8ce0
neg eax
mov dword [0x8d8ce8], eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
add esp, 0x190
ret
Function at 0x84ec70
Capabilities:
Get common file path

Disassembly:
push ecx
push edi
push str.kernel32
mov dword [esp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x84ec8e
pop edi
pop ecx
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebp
push esi
push str.LoadLibraryExA
push edi
call ebx
mov esi, dword [esp + 0x18]
push 0x8c9a24
push esi
mov ebp, eax
call fcn.008478b0
add esp, 8
test eax, eax
je 0x84ecdd
test ebp, ebp
je 0x84eccc
push 8
push 0
push esi
call ebp
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
test ebp, ebp
je 0x84ed01
push str.AddDllDirectory
push edi
call ebx
test eax, eax
je 0x84ed01
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
test edx, edx
mov dword [esp + 0x18], edx
je 0x84edad
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + edx + 1]
push eax
call dword [0x8c9930]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x84eda3
mov ecx, dword [esp + 0x18]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x84eda3
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov dx, word [0x8c9a10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
mov word [ecx + ebx], dx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
or ecx, 0xffffffff
add edx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test ebp, ebp
rep movsb byte es:[edi], byte [esi]
je 0x84ed98
push 8
push 0
push ebx
call ebp
jmp 0x84ed9f
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x10], eax
push ebx
call dword [0x8c9934]
add esp, 4
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
pop ecx
ret
Function at 0x857b40
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x100
push ebx
push ebp
push esi
mov esi, dword [esp + 0x110]
push edi
push eax
mov edi, dword [esi + eax*4 + 0x408]
push esi
call fcn.00857c00
mov eax, dword [esp + 0x128]
mov ecx, dword [esp + 0x124]
add esp, 8
push 0
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x124]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x857be5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x857bb6
pop edi
pop esi
mov dword [ebx], 0x51
pop ebp
xor eax, eax
pop ebx
add esp, 0x100
ret
lea edx, [esp + 0x10]
push 0x100
push edx
push ebp
call fcn.00883e60
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.00857930
mov ecx, dword [esi]
add esp, 0x18
mov dword [ecx + 0xdc4], ebp
mov dword [ebx], 0x37
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100
ret

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

Disassembly:
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
lea esi, [eax + 0x43]
shl esi, 4
add esi, ebx
push edi
mov ebp, dword [ebx + eax*4 + 0x408]
mov edi, dword [esi + 4]
mov ecx, dword [esi + 8]
sub edi, ecx
mov ecx, dword [ebx + 0x5a8]
test byte [ecx + 0x40], 3
je 0x857cba
cmp dword [ebx + eax*4 + 0x420], 0x857d00
jne 0x857cba
cmp dword [esi], 0
je 0x857c49
test edi, edi
je 0x857cba
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.00880790
add esp, 0x14
cmp eax, 0xffffffff
je 0x857cba
test al, 1
je 0x857cba
cmp dword [esi], 0
jne 0x857c8c
mov edx, dword [ebx]
mov eax, dword [edx + 0x930]
shl eax, 1
push eax
mov dword [esi + 4], eax
call dword [0x8c9930]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
xor eax, eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov eax, dword [esi]
test eax, eax
je 0x857cb3
mov ebx, dword [esi + 8]
push 0
add eax, ebx
push edi
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x857cba
mov ecx, dword [esi + 8]
pop edi
add ecx, eax
mov dword [esi + 8], ecx
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 4], 0
pop edi
pop esi
pop ebp
pop ebx
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x8581a3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x2733
mov edx, dword [esp + 0x10]
sete cl
mov eax, ecx
mov dword [edx], 0
neg eax
sbb eax, eax
and eax, 0x19
add eax, 0x38
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret
Function at 0x8593f0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, 0x1505
lea ebx, [esi + eax]
cmp esi, ebx
jae 0x859425
mov al, byte [esi]
inc esi
push eax
call fcn.0085e340
mov edx, edi
add esp, 4
movsx ecx, al
shl edx, 5
add edx, edi
xor ecx, edx
cmp esi, ebx
mov edi, ecx
jb 0x859407
mov eax, edi
pop edi
pop esi
and eax, 0xff
pop ebx
ret

Function at 0x85c430
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
push ebp
push esi
mov eax, dword [ebx + 0x2f8]
push edi
cmp eax, 3
jne 0x85c600
mov eax, dword [ebx + 0x518]
test eax, eax
jne 0x85c600
mov eax, dword [ebx + 0x580]
test eax, eax
jne 0x85c600
mov esi, dword [esp + 0x220]
mov ebp, dword [ebx]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x98]
push eax
mov edi, 0x80
push ecx
push esi
mov dword [esp + 0x1c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x85c4cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea edx, [esp + 0x118]
mov esi, eax
push 0x100
push edx
push esi
call fcn.00883e60
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebp
call fcn.00857930
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov dword [esp + 0x14], edi
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x85c528
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea edx, [esp + 0x118]
mov esi, eax
push 0x100
push edx
push esi
call fcn.00883e60
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebp
call fcn.00857930
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov ecx, dword [esp + 0x10]
lea eax, [ebx + 0x3a0]
lea esi, [ebx + 0x372]
push eax
push esi
lea edx, [esp + 0xa0]
push ecx
push edx
call fcn.0085c3c0
add esp, 0x10
test eax, eax
jne 0x85c58e
lea eax, [esp + 0x118]
push 0x100
push eax
call fcn.00845148
mov ecx, dword [eax]
push ecx
call fcn.00883e60
add esp, 0xc
push eax
call fcn.00845148
mov edx, dword [eax]
push edx
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00857930
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
lea edi, [ebx + 0x2c4]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x14]
lea eax, [ebx + 0x3d4]
lea ecx, [ebx + 0x3a4]
push eax
push ecx
lea eax, [esp + 0x20]
push edx
push eax
movsw word es:[edi], word [esi]
call fcn.0085c3c0
add esp, 0x10
test eax, eax
jne 0x85c600
lea ecx, [esp + 0x118]
push 0x100
push ecx
call fcn.00845148
mov edx, dword [eax]
push edx
call fcn.00883e60
add esp, 0xc
push eax
call fcn.00845148
mov eax, dword [eax]
push eax
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00857930
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
push ebx
call fcn.0085c340
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x85cd10
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
mov eax, dword [0x8d7640]
push esi
test eax, eax
mov dword [esp + 8], 0x4020
mov dword [esp + 4], 0
mov dword [esp + 0xc], 4
jne 0x85cd63
push 3
push 2
push eax
push 6
call fcn.0084eb10
add esp, 0x10
test eax, eax
je 0x85cd57
mov dword [0x8d7640], 2
pop esi
add esp, 0xc
ret
mov dword [0x8d7640], 1
jmp 0x85cd68
cmp eax, 2
je 0x85cdaf
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
lea ecx, [esp + 4]
push eax
push ecx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x85cd97
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, eax
jg 0x85cdaf
lea eax, [esp + 8]
push 4
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x85d0f0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
xor eax, eax
push edi
mov ecx, dword [esi + 0xbcc]
mov edi, dword [esp + 0x1c]
test ecx, ecx
lea ecx, [esp + 0x18]
push 4
push ecx
push 8
setne al
push 0xffff
push edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x85d13c
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00857870
add esp, 0xc
pop edi
pop esi
add esp, 0xc
ret
mov edx, dword [esi + 0xae0]
mov dword [esp + 8], 1
push edx
call fcn.0085bfc0
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0xae4]
push eax
call fcn.0085bfc0
add esp, 8
lea eax, [eax + eax*4]
lea ecx, [esp + 0x1c]
lea edx, [esp + 8]
push 0
push 0
lea eax, [eax + eax*4]
push ecx
push 0
push 0
lea eax, [eax + eax*4]
push 0xc
push edx
push 0x98000004
shl eax, 3
push edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x85d1c1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00857870
add esp, 0x10
pop edi
pop esi
add esp, 0xc
ret
Function at 0x85d600
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x104
mov eax, dword [esp + 0x108]
mov edx, dword [esp + 0x10c]
push esi
lea ecx, [esp + 4]
mov esi, dword [eax]
push 4
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x85d65a
lea eax, [esp + 8]
push 0x100
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00883e60
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00857870
add esp, 0x18
pop esi
add esp, 0x104
ret

Function at 0x85e950
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push 0
push 0
push eax
push ecx
push 0
push 0
call fcn.008912e7
add esp, 0x18
test eax, eax
je 0x85e973
cmp eax, 0xffffffff
jne 0x85e975
xor eax, eax
ret
Function at 0x85fe50
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, dword [sym.imp.WS2_32.dll_socket]
push edi
push 6
push 1
push 2
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x1c], 1
call esi
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x85fe86
pop edi
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x30
ret
xor eax, eax
push 0x7f000001
mov dword [esp + 0x1c], eax
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x50]
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push 0xffff
push ebp
mov dword [esp + 0x30], eax
mov word [esp + 0x2e], 0
mov dword [ebx + 4], 0xffffffff
mov dword [ebx], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x85ffc0
lea edx, [esp + 0x18]
push 0x10
push edx
push ebp
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x85ffc0
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x85ffc0
push 1
push ebp
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x85ffc0
push 0
push 1
push 2
call esi
cmp eax, 0xffffffff
mov dword [ebx], eax
je 0x85ffc0
lea edx, [esp + 0x18]
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x85ffc0
push 0
push 0
push ebp
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
mov dword [ebx + 4], eax
je 0x85ffc0
push ebx
push 0x8cae2c
lea eax, [esp + 0x30]
push 0xc
push eax
call fcn.008612b0
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
mov edx, dword [ebx]
push eax
not ecx
dec ecx
mov esi, ecx
lea ecx, [esp + 0x2c]
push esi
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x85ffc0
mov ecx, dword [ebx + 4]
push 0
lea eax, [esp + 0x38]
push 0xc
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jne 0x85ffc0
mov ecx, esi
lea edi, [esp + 0x34]
lea esi, [esp + 0x28]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x85ffdf
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
push ebp
call esi
mov eax, dword [ebx]
push eax
call esi
mov ecx, dword [ebx + 4]
push ecx
call esi
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x30
ret
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
Function at 0x864980
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x20]
push esi
mov esi, dword [esp + 0x28]
mov ecx, esi
push edi
mov edx, ecx
xor eax, eax
mov edi, ebp
push 0xf0000040
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x14], 0
and ecx, 3
mov dword [esp + 0x10], 0
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x14]
push eax
push 0
push 0
push ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 4
mov dword [esp + 0x40], esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x864a75
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x864a55
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
push 0
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x864a55
mov ecx, dword [esp + 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
lea edx, [esp + 0x18]
push 0
lea eax, [esp + 0x18]
push edx
push eax
push 4
push ecx
call edi
test eax, eax
je 0x864a55
cmp esi, dword [esp + 0x14]
jb 0x864a55
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x2c]
push 0
push edx
push ebp
push 2
push eax
call edi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x864a64
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x864a75
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebp
add esp, 0x10
ret

Function at 0x866290
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
push esi
mov esi, 1
push edi
xor ebp, ebp
push esi
push ebp
call dword [0x8c9938]
mov edi, eax
add esp, 8
test edi, edi
je 0x8662e4
mov eax, dword [esp + 0x14]
push esi
push edi
push eax
mov ebp, edi
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x8662fc
cmp esi, ebx
je 0x8662fc
cmp esi, 0x8000
ja 0x8662fc
cmp esi, ebx
jb 0x8662f5
push esi
push edi
call dword [0x8c9938]
mov edi, eax
add esp, 8
test edi, edi
jne 0x8662ac
push ebp
call dword [0x8c9934]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call dword [0x8c9934]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x870bf0
Capabilities:
Send data
Send data on socket

Disassembly:
mov al, byte [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
lea ecx, [esp + 0x14]
mov edx, dword [esi + 0x408]
mov edi, dword [esi]
push 3
push ecx
push edx
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], al
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x870c3d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.00857930
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
push eax
push ebx
push str.SENT
push ecx
call fcn.00870c60
add esp, 0x10
pop edi
pop esi
pop ebx
ret