joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4065c0
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp ecx, 0xff
ja 0x40667f
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
mov dword [ebp - 4], edx
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4065e0
sub eax, dword [ebp - 4]
shl ecx, 4
mov edx, dword [ecx + 0x425248]
mov dword [esi + 0x34], edx
mov edx, dword [ecx + 0x42524c]
mov dword [esi + 0x38], edx
mov edx, dword [ecx + 0x425250]
mov dword [esi + 0x3c], edx
mov ecx, dword [ecx + 0x425254]
mov edx, dword [ebp + 8]
mov dword [esi + 0x40], ecx
push edx
mov ecx, esi
call fcn.00406710
mov ecx, esi
call fcn.00406840
mov eax, dword [esi + 0x8c]
mov ecx, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
mov dword [edi], eax
mov eax, dword [esi + 0x98]
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
mov dword [edi + 0xc], eax
mov byte [esi + 0x9c], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x34], 0x67452301
mov dword [esi + 0x38], 0xefcdab89
mov dword [esi + 0x3c], 0x98badcfe
mov dword [esi + 0x40], 0x10325476
mov al, 1
mov esp, ebp
pop ebp
ret 4
xor al, al
mov esp, ebp
pop ebp
ret 4

Function at 0x407790
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, eax
push str.AllowableIpList.txt
lea ebx, [esi + 0xc]
push 0x100
push ebx
call fcn.0040d68b
add esp, 0xc
push 0
push 0x20
push 3
push 0
push 1
push bind
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4077eb
push ebx
push str.__s__Could_not_open_file
add esi, 0x218
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x40780e
push eax
call fcn.0040d963
add esp, 4
mov dword [esi + 4], 0
mov eax, dword [esi + 8]
push eax
call fcn.0040cd9e
add esp, 4
mov dword [esi + 4], eax
test eax, eax
jne 0x407847
push ebx
push str.__s__Could_not_alloc_file_buffer
add esi, 0x218
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 8]
push 0
lea ecx, [ebp - 4]
push ecx
push edx
push eax
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40786c
push ebx
push str.__s__Could_not_read_file
jmp 0x407827
mov eax, dword [esi + 4]
cmp byte [eax], 0xef
jne 0x407898
cmp byte [eax + 1], 0xbb
jne 0x407898
cmp byte [eax + 2], 0xbf
jne 0x407898
mov ecx, dword [esi + 8]
sub ecx, 3
push ecx
lea edx, [eax + 3]
push edx
push eax
call fcn.0040d1f0
add esp, 0xc
add dword [esi + 8], 0xfffffffd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
pop edi
mov dword [esi + 0x214], eax
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407dd0
Capabilities:
Get common file path
Get disk information
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x42a5f0]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, ecx
jmp 0x407df8
jmp 0x407e0a
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x407e31
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x10c]
push ecx
push 0
push 0
lea edx, [ebp - 0x108]
push edx
mov byte [ebp - 0x105], 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
je 0x407e20
push ebx
push esi
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x10c]
mov edx, dword [ebp - 0x11c]
movzx esi, word [ebp - 0x130]
movzx ebx, word [ebp - 0x10e]
mov ecx, eax
imul ecx, eax
shl edx, 0x10
or edx, eax
shr eax, 2
imul edx, edx, 0x14ce1989
shl esi, 0xe
or esi, eax
mov eax, dword [ebp - 0x110]
and eax, 0xf5fb
shl ebx, 0x10
or eax, ebx
xor eax, 0x15ca2020
push eax
push esi
push edx
sub ecx, 0x13b06451
push ecx
push 0x12ba1074
push 0x64
push 0x42c370
mov ecx, edi
call fcn.00408960
push eax
add edi, 8
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
jmp 0x407eef
jmp 0x407f06
mov ecx, dword [ebp - 4]
pop esi
pop ebx
xor ecx, ebp
mov al, 1
pop edi
call fcn.0040cf87
mov esp, ebp
pop ebp
ret

Function at 0x407f20
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x42a5f0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov esi, ecx
jmp 0x407f46
jmp 0x407f58
cmp dword [esi + 4], 0xffffffff
je 0x407f72
xor al, al
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret 8
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x407f5e
mov ecx, dword [ebp + 0xc]
mov eax, 2
push ecx
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebp + 8]
push edi
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x407fd1
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x407fd1
movsx edx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
push edx
push ecx
lea edx, [ebp - 0x10]
push edx
call fcn.0040ea30
add esp, 0xc
mov ecx, dword [esi + 4]
push 0x10
lea eax, [ebp - 0x14]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x407ff7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x407f5e
jmp 0x408009
jmp 0x408020
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov al, 1
pop esi
call fcn.0040cf87
mov esp, ebp
pop ebp
ret 8
Function at 0x408040
Capabilities:
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x42a5f0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
jmp 0x408068
jmp 0x40807a
call fcn.00407dd0
test al, al
jne 0x408096
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
movzx edx, word [0x431ab0]
push eax
lea ecx, [esi + 8]
push ecx
push edx
push 0x90
push 0x42c298
mov ecx, esi
call fcn.00408960
push eax
lea edx, [ebp - 0x108]
call fcn.00408a90
add esp, 0x10
push str.Content_type:_application_x_www_form_urlencoded
push 0x48
push 0x42c328
mov ecx, esi
call fcn.00408960
push eax
push str._HTTP_1.1_r_nHost:__s_r_n_s_r_n_r_n
lea edx, [ebp - 0x20c]
call fcn.00408a90
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x108]
push 0x104
push ecx
call fcn.0040df1f
lea eax, [ebp - 0x108]
add esp, 0x18
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408110
sub eax, edx
push 0
push eax
mov eax, dword [esi + 4]
lea edx, [ebp - 0x108]
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x408143
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x408083
jmp 0x408155
jmp 0x40816c
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov al, 1
pop esi
call fcn.0040cf87
mov esp, ebp
pop ebp
ret 4
Function at 0x408510
Capabilities:
Terminate process

Disassembly:
push esi
push edi
push 0x2d
push 0
push 0x431c00
call fcn.0040eda0
add esp, 0xc
push 0x10
xor eax, eax
push 0x18
push 0x42c3d4
mov ecx, 0x431bf8
mov dword [0x431c2d], eax
mov dword [0x431c31], eax
mov dword [0x431c35], eax
call fcn.00408960
push eax
push 0x8c
push 0x42c3f0
mov ecx, 0x431bf8
call fcn.00408960
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0
call edi
push eax
call esi
jmp dword [pe_dos_header]

Function at 0x408580
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
jmp 0x40859e
jmp 0x4085b0
jmp 0x4085c2
push 0x10000000
pop dword [0x4fb6f4]
jmp 0x4085db
cmp dword [0x4fb6f4], 0x10000000
je 0x40864d
xor eax, eax
mov dword [0x4251e4], eax
mov dword [0x4251e8], eax
mov dword [0x4251ec], eax
mov dword [str.Rwu__], eax
mov dword [0x4251f4], eax
mov dword [0x4251f8], eax
mov dword [0x4251fc], eax
mov dword [0x425200], eax
mov dword [0x425204], eax
mov dword [0x425208], eax
mov dword [str.p_H:], eax
mov dword [0x425210], eax
mov dword [0x425214], eax
mov dword [0x425218], eax
mov dword [0x42521c], eax
mov dword [0x425220], eax
mov dword [0x425224], eax
mov dword [str.r_], eax
mov dword [0x42522c], eax
mov dword [0x425230], eax
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
push 0xc
lea eax, [ebp - 0x28]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleInformation]
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x24]
lea edx, [ebp - 0x10]
add ebx, eax
push edx
mov dword [ebp - 0x14], ebx
call fcn.00408800
test al, al
je 0x408746
mov edi, dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push eax
mov eax, edi
call fcn.004088b0
test al, al
je 0x408746
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea ecx, [ebp - 4]
push ecx
push 0x40
push 0x10
push edi
call ebx
mov ecx, 0x4251f4
mov eax, edi
sub ecx, edi
mov esi, 0x10
mov dl, byte [ecx + eax]
xor dl, 0x9f
mov byte [eax], dl
inc eax
dec esi
jne 0x4086c5
mov ecx, dword [ebp - 4]
lea eax, [ebp - 4]
push eax
push ecx
push 0x10
push edi
call ebx
mov esi, dword [ebp - 0x18]
lea edx, [ebp - 0xc]
push edx
push 0x40
push 0x10
push esi
call ebx
mov ecx, 0x425204
mov eax, esi
sub ecx, esi
mov dword [ebp - 8], 0x10
lea esp, [esp]
mov dl, byte [ecx + eax]
xor dl, 0x9f
mov byte [eax], dl
inc eax
dec dword [ebp - 8]
jne 0x408700
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0xc]
push eax
push ecx
push 0x10
push esi
call ebx
mov ecx, dword [ebp - 0x1c]
mov edx, esi
sub edx, edi
sub edx, 0x10
push edx
add edi, 0x10
push edi
call fcn.00408780
mov ebx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x10]
call fcn.00408800
test al, al
jne 0x408690
jmp 0x408758
jmp 0x40876f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x408780
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
jmp 0x408799
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 4]
push eax
push 0x40
push edi
push esi
call ebx
xor eax, eax
test edi, edi
jle 0x4087cf
mov ecx, eax
and ecx, 0xf
mov dl, byte [ecx + 0x4251e4]
xor dl, byte [eax + esi]
inc eax
add dl, 0x51
mov byte [eax + esi - 1], dl
cmp eax, edi
jl 0x4087b5
mov ecx, dword [ebp - 4]
lea eax, [ebp - 4]
push eax
push ecx
push edi
push esi
call ebx
jmp 0x4087ed
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x408960
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
jmp 0x408975
push 0x104
push 0
push 0x4fb4e8
call fcn.0040eda0
mov ecx, dword [ebp + 0xc]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x4089b2
push esi
mov esi, dword [ebp + 8]
jmp 0x4089a0
mov dl, byte [esi + eax*4]
xor dl, 0x80
mov byte [eax + 0x4fb4e8], dl
inc eax
cmp eax, ecx
jl 0x4089a0
pop esi
jmp 0x4089c4
mov eax, 0x4fb4e8
pop ebp
ret 8

Function at 0x409850
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x42a5f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x42d164]
push ebx
push esi
push edi
push 0x6a
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0x431bb8
mov esi, eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x431bd8]
push 0x431bb8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
movzx ecx, byte [0x431c37]
mov edx, dword [ecx*4 + 0x4251d0]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push edx
push edi
lea eax, [ebp - 0x104]
push str.UserCount:__d__d
push eax
call ebx
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
add esp, 0x10
lea ecx, [ebp - 0x104]
push ecx
push 0
push 0x401
push esi
call edi
push 0x4fb490
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4fb4b8]
push 0x4fb490
mov dword [ebp - 0x108], edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x108]
push eax
lea ecx, [ebp - 0x104]
push str.QueueSize:__d
push ecx
call ebx
add esp, 0xc
lea edx, [ebp - 0x104]
push edx
push 1
push 0x401
push esi
call edi
mov ecx, 0x431bf8
call fcn.004089d0
push eax
lea eax, [ebp - 0x104]
push eax
call ebx
add esp, 8
lea ecx, [ebp - 0x104]
push ecx
push 2
push 0x401
push esi
call edi
push 0
push 3
push 0x401
push esi
call edi
push 5
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040cf87
mov esp, ebp
pop ebp
ret
Function at 0x409f00
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [esi + 0x74]
sub esp, 8
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
xor edi, edi
cmp eax, edi
je 0x409f28
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0x74]
push eax
call ebx
mov dword [esi + 0x74], edi
mov eax, dword [esi + 0x70]
cmp eax, edi
je 0x409f35
push eax
call ebx
mov dword [esi + 0x70], edi
lea ecx, [esi + 0x38]
call fcn.004092b0
lea edi, [esi + 0x14]
mov dword [ebp - 4], 8
mov eax, dword [edi]
test eax, eax
je 0x409f61
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [edi]
push ecx
call ebx
mov dword [edi], 0
add edi, 4
dec dword [ebp - 4]
jne 0x409f47
mov eax, dword [esi + 0x10]
test eax, eax
je 0x409f86
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [esi + 0x10]
push edx
call ebx
mov dword [esi + 0x10], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x409f97
push eax
call ebx
mov dword [esi + 8], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x409fad
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409fc0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x42a5f0]
xor eax, ebp
mov dword [ebp - 4], eax
push 1
push 0
push 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov dword [0x4fb454], eax
cmp eax, 0xffffffff
jne 0x40a012
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__WSASocket___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret
mov eax, 2
push 0
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htonl]
movzx ecx, word [0x4fb45c]
push ecx
mov dword [ebp - 0x10], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [ebp - 0x14]
mov word [ebp - 0x12], ax
mov eax, dword [0x4fb454]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40a075
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__bind___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x4fb454]
push 5
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40a0af
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__listen___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov al, 1
call fcn.0040cf87
mov esp, ebp
pop ebp
ret
Function at 0x40a0c0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push esi
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a0ee
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__socket___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
pop esi
ret
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [0x4fb458], eax
test eax, eax
jne 0x40a125
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateIoCompletionPort___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
pop esi
ret
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, 1
pop esi
ret

Function at 0x40a130
Capabilities:
Create thread

Disassembly:
push 0
push 0
push 0x4fb450
push 0x40aa00
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4fb460], eax
test eax, eax
jne 0x40a16a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateThread___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
ret
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x40a190
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__SetThreadPriority___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
ret
mov al, 1
ret

Function at 0x40a1a0
Capabilities:
Create thread
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x10]
cmp eax, 8
jbe 0x40a1bd
mov eax, 8
push ebx
push esi
push edi
xor edi, edi
mov dword [0x4fb484], eax
test eax, eax
je 0x40a209
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, 0x4fb464
push 0
push 0
push 0x4fb450
push 0x40ab50
push 0
push 0
call ebx
mov dword [esi], eax
test eax, eax
je 0x40a212
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x40a231
inc edi
add esi, 4
cmp edi, dword [0x4fb484]
jb 0x40a1d6
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateThread___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__SetThreadPriority___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a250
Capabilities:
Create thread

Disassembly:
push 0
push 0x800
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [0x4fb4c0], eax
test eax, eax
jne 0x40a283
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateSemaphore___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
ret
push 0
push 0
push 0x4fb450
push 0x40ac50
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4fb4c4], eax
test eax, eax
jne 0x40a2bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateThread___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
ret
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x40a2e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__SetThreadPriority___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
xor al, al
ret
mov al, 1
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
push 0x4fb4cc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp + 8]
test esi, esi
js 0x40a57b
xor eax, eax
cmp esi, 0x14
setl al
test eax, eax
je 0x40a57b
mov edi, esi
imul edi, edi, 0x70
add edi, 0x4fab90
mov eax, dword [edi + 4]
test eax, eax
js 0x40a57b
xor ecx, ecx
cmp eax, 0x14
setl cl
mov eax, ecx
test eax, eax
je 0x40a57b
cmp dword [edi + 8], 0
je 0x40a57b
cmp dword [edi + 0x1c], 0xffffffff
je 0x40a57b
cmp ebx, 0x2000
jle 0x40a590
push ebx
push esi
push str._SocketTCP__Max_msg_size__Type:_1__Index:__d__Size:__d_
push 1
call fcn.0040b1b0
add esp, 0x10
push 0x4fb4cc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov esi, dword [edi + 0x24]
cmp dword [esi + 0x20], 0
jle 0x40a60f
mov eax, dword [esi + 0x12028]
lea ecx, [eax + ebx]
cmp ecx, 0x10000
jle 0x40a5df
mov esi, dword [ebp + 8]
push ecx
push esi
push str._SocketTCP__Max_msg_size__Type:_2__Index:__d__Size:__d_
push 1
call fcn.0040b1b0
add esp, 0x10
mov eax, esi
mov ecx, 0x4fb450
call fcn.0040a670
push 0x4fb4cc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp + 0xc]
push ebx
push edx
lea eax, [eax + esi + 0x2028]
push eax
call fcn.0040ea30
add esp, 0xc
add dword [esi + 0x12028], ebx
push 0x4fb4cc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 0xc]
push ebx
lea eax, [esi + 0x24]
push ecx
push eax
call fcn.0040ea30
add esp, 0xc
xor ecx, ecx
push ecx
push esi
push ecx
lea edx, [ebp - 4]
push edx
lea eax, [esi + 0x24]
mov dword [esi + 0x18], eax
lea eax, [esi + 0x14]
push 1
mov dword [eax], ebx
mov dword [esi + 0x1c], 1
mov dword [esi + 0x20], ebx
mov dword [esi + 0x2024], ecx
push eax
mov eax, dword [edi + 0x1c]
push eax
mov dword [ebp - 4], ecx
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x40a5fa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40a5fa
mov eax, dword [ebp + 8]
jmp 0x40a5c0
Function at 0x40a710
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
mov edi, dword [ebp + 8]
add edi, 0x7c
push edi
mov esi, eax
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test ebx, ebx
js 0x40a74b
xor eax, eax
cmp ebx, 0x14
setl al
test eax, eax
je 0x40a74b
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x40a75a
mov ecx, dword [ebp + 8]
mov eax, ebx
call fcn.0040a670
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
add dword [esi + 0x2024], eax
mov eax, dword [ebp + 8]
push ebx
lea edi, [esi + 0x24]
push eax
call fcn.0040a2f0
test al, al
jne 0x40a78d
mov ecx, dword [ebp + 8]
mov eax, ebx
call fcn.0040a670
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x2024]
lea edx, [eax + esi + 0x24]
mov dword [esi + 0x18], edx
mov edx, 0x2000
sub edx, eax
xor eax, eax
push eax
mov dword [esi + 0x1c], eax
push esi
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
mov eax, ebx
lea ecx, [esi + 0x14]
imul eax, eax, 0x70
mov dword [ecx], edx
lea edx, [ebp - 0xc]
push edx
push 1
push ecx
mov ecx, dword [eax + 0x4fabac]
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x40a812
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x40a812
call esi
push eax
push str._SocketTCP__WSARecv___failed_with_error:__d
push 1
call fcn.0040b1b0
mov ecx, dword [ebp + 8]
add esp, 0xc
mov eax, ebx
call fcn.0040a670
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8