joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402480
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x40c018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
mov edi, dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, ecx
push esi
push 0
push 0
push 0x258
push 0x258
push 0
push bind
push 0xa0000
push 0x40fdd0
push 0x40fd68
push 0
mov dword [0x40fdcc], esi
call edi
mov dword [0x40fd64], eax
test eax, eax
jne 0x4024e4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040715e
mov esp, ebp
pop ebp
ret
push 0
push esi
push 0x6a
push eax
push 0
push 0
push 0
push 0
push 0x50000000
push 0
push str.msctls_statusbar32
push 0
call edi
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
mov esi, eax
push 0
push esi
call edi
lea eax, [ebp - 0x10]
push eax
push 3
push 0x404
push esi
mov dword [ebp - 0x10], 0x6e
mov dword [ebp - 0xc], 0xe6
mov dword [ebp - 8], 0xffffffff
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp + 8]
mov edx, dword [0x40fd64]
push ecx
push edx
call edi
mov eax, dword [0x40fd64]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, 1
pop esi
call fcn.0040715e
mov esp, ebp
pop ebp
ret

Function at 0x403550
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x40c018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x40c818]
push ebx
push esi
push edi
test eax, eax
js 0x403659
cmp eax, 3
jge 0x403659
mov esi, eax
imul esi, esi, 0x214
push ecx
add esi, 0x40c1dc
inc eax
lea edi, [esi + 4]
push 0x100
mov dword [0x40c818], eax
push edi
mov dword [esi], 1
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
cmp dword [esi], 0
je 0x403659
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0xe]
movzx ecx, word [ebp - 0x12]
movzx edx, word [ebp - 0x14]
push eax
push ecx
push edx
push edi
lea ebx, [esi + 0x110]
push str.._s_04d__02d__02d.txt
push ebx
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
mov dword [esi + 0x10c], edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x403634
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040715e
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x403659
mov ecx, dword [esi + 0x210]
push ecx
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040715e
mov esp, ebp
pop ebp
ret
Function at 0x403670
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x40c018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
test eax, eax
js 0x403867
cmp eax, dword [ecx + 0x640]
jge 0x403867
imul eax, eax, 0x214
cmp dword [eax + ecx + 4], 0
lea esi, [eax + ecx + 4]
je 0x403867
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x812]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
cmp ecx, dword [esi + 0x104]
jne 0x4036f6
movzx edx, word [ebp - 0x816]
cmp edx, dword [esi + 0x108]
jne 0x4036f6
movzx eax, word [ebp - 0x818]
cmp eax, dword [esi + 0x10c]
je 0x4037b3
mov ecx, dword [esi + 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebp - 0x812]
movzx ecx, word [ebp - 0x816]
movzx edx, word [ebp - 0x818]
push eax
push ecx
push edx
mov dword [esi + 0x10c], edx
lea edx, [esi + 4]
push edx
lea edi, [esi + 0x110]
push str.._s_04d__02d__02d.txt
push edi
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
call ebx
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x40377d
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040715e
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4037b3
mov eax, dword [esi + 0x210]
push eax
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040715e
mov esp, ebp
pop ebp
ret
push 0x3ff
lea ecx, [ebp - 0x807]
push 0
push ecx
mov byte [ebp - 0x808], 0
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
push edx
push eax
lea ecx, [ebp - 0x808]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll_vsprintf_s]
push 0x3ff
lea edx, [ebp - 0x407]
push 0
push edx
mov byte [ebp - 0x408], 0
call sub.MSVCR100.dll_memset
movzx ecx, word [ebp - 0x80c]
movzx edx, word [ebp - 0x80e]
lea eax, [ebp - 0x808]
push eax
movzx eax, word [ebp - 0x810]
push ecx
push edx
push eax
lea ecx, [ebp - 0x408]
push str._02d:_02d:_02d__s_r_n
push ecx
call ebx
lea eax, [ebp - 0x408]
add esp, 0x40
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403840
mov ecx, dword [esi + 0x210]
sub eax, edx
push 0
lea edx, [ebp - 0x81c]
push edx
push eax
lea eax, [ebp - 0x408]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040715e
mov esp, ebp
pop ebp
ret
Function at 0x4038d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push eax
mov esi, ecx
lea ebx, [esi + 0xc]
push 0x100
push ebx
call dword [sym.imp.MSVCR100.dll_strcpy_s]
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 0x403928
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 0x40394c
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [esi + 4], 0
mov ecx, dword [esi + 8]
push ecx
call fcn.00407153
add esp, 4
mov dword [esi + 4], eax
test eax, eax
jne 0x403985
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 ecx, dword [esi + 8]
push 0
lea edx, [ebp - 4]
push edx
push ecx
push eax
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4039aa
push ebx
push str.__s__Could_not_read_file
jmp 0x403965
mov eax, dword [esi + 4]
cmp byte [eax], 0xef
jne 0x4039c6
cmp byte [eax + 1], 0xbb
jne 0x4039c6
cmp byte [eax + 2], 0xbf
jne 0x4039c6
push ebx
push str.__s__The_file_is_codified_in_UTF_8_BOM_and_cannot_be_read._Change_it_to_UTF_8_and_try_again
jmp 0x403965
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 0x4044f0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x40c018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x40c824]
push ebx
push esi
push edi
push 0x6a
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0x64
mov esi, eax
call fcn.00406f80
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push eax
lea ecx, [ebp - 0x104]
push str.UserCount:__d__d
push ecx
call ebx
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
add esp, 0x10
lea edx, [ebp - 0x104]
push edx
push 0
push 0x401
push esi
call edi
mov eax, dword [0x411298]
mov ecx, dword [0x411294]
push eax
push ecx
lea edx, [ebp - 0x104]
push str.ServerCount:__d__d
push edx
call ebx
add esp, 0x10
lea eax, [ebp - 0x104]
push eax
push 1
push 0x401
push esi
call edi
push 0x4112f8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x411320]
push 0x4112f8
mov dword [ebp - 0x108], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x108]
push 0x800
push edx
lea eax, [ebp - 0x104]
push str.QueueSize:__d__d
push eax
call ebx
add esp, 0x10
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.0040715e
mov esp, ebp
pop ebp
ret

Function at 0x404b10
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp byte [0x41129c], bl
je 0x404b4d
call edi
sub eax, dword [0x4112a0]
cmp eax, 0x2710
jbe 0x404b4d
push str._SocketUDP__JoinServer_disconnected
push 1
mov byte [0x41129c], bl
mov dword [0x4112a0], ebx
call fcn.00406e20
add esp, 8
mov eax, dword [0x4112ac]
mov esi, dword [eax]
cmp esi, eax
je 0x404be0
lea esp, [esp]
cmp dword [esi + 0x48], ebx
je 0x404b9e
call edi
sub eax, dword [esi + 0x4c]
cmp eax, 0x2710
jbe 0x404b9e
movzx eax, word [esi + 0x10]
movzx ecx, word [esi + 0x42]
push eax
push ecx
lea edx, [esi + 0x32]
push edx
lea eax, [esi + 0x12]
push eax
push str._SocketUDP__GameServer_disconnected___s____s:_d___d_
push 1
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
call fcn.00406e20
add esp, 0x18
dec dword [0x411294]
cmp byte [esi + 0x59], bl
jne 0x404bd8
mov eax, dword [esi + 8]
cmp byte [eax + 0x59], bl
jne 0x404bbf
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x59], bl
jne 0x404bd8
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x59], bl
je 0x404bb4
jmp 0x404bd8
mov eax, dword [esi + 4]
cmp byte [eax + 0x59], bl
jne 0x404bd6
cmp esi, dword [eax + 8]
jne 0x404bd6
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x59], bl
je 0x404bc7
mov esi, eax
cmp esi, dword [0x4112ac]
jne 0x404b60
pop edi
pop esi
pop ebx
ret
Function at 0x4059a0
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 0x4059c8
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 0x4059d5
push eax
call ebx
mov dword [esi + 0x70], edi
lea ecx, [esi + 0x38]
call fcn.00403f60
lea edi, [esi + 0x14]
mov dword [ebp - 4], 8
mov eax, dword [edi]
test eax, eax
je 0x405a01
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 0x4059e7
mov eax, dword [esi + 0x10]
test eax, eax
je 0x405a26
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 0x405a37
push eax
call ebx
mov dword [esi + 8], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x405a4d
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 0x405a60
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x40c018]
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 [0x4112bc], eax
cmp eax, 0xffffffff
jne 0x405ab2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__WSASocket___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040715e
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 [0x4112c4]
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 [0x4112bc]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x405b15
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__bind___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040715e
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x4112bc]
push 5
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x405b4f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__listen___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040715e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov al, 1
call fcn.0040715e
mov esp, ebp
pop ebp
ret
Function at 0x405b60
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 0x405b8e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__socket___failed_with_error:__d
push 1
call fcn.00406e20
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 [0x4112c0], eax
test eax, eax
jne 0x405bc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateIoCompletionPort___failed_with_error:__d
push 1
call fcn.00406e20
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 0x405bd0
Capabilities:
Create thread

Disassembly:
push 0
push 0
push 0x4112b8
push 0x4065b0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4112c8], eax
test eax, eax
jne 0x405c0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateThread___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
ret
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x405c30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__SetThreadPriority___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
ret
mov al, 1
ret

Function at 0x405c40
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 0x405c5d
mov eax, 8
push ebx
push esi
push edi
xor edi, edi
mov dword [0x4112ec], eax
test eax, eax
je 0x405ca9
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, 0x4112cc
push 0
push 0
push 0x4112b8
push 0x406750
push 0
push 0
call ebx
mov dword [esi], eax
test eax, eax
je 0x405cb2
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x405cd1
inc edi
add esi, 4
cmp edi, dword [0x4112ec]
jb 0x405c76
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.00406e20
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.00406e20
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405cf0
Capabilities:
Create thread

Disassembly:
push 0
push 0x800
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [0x411328], eax
test eax, eax
jne 0x405d23
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateSemaphore___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
ret
push 0
push 0
push 0x4112b8
push 0x406850
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x41132c], eax
test eax, eax
jne 0x405d5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateThread___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
ret
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x405d83
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__SetThreadPriority___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
xor al, al
ret
mov al, 1
ret
Function at 0x406010
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0x411334
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp + 8]
test esi, esi
js 0x406033
xor eax, eax
cmp esi, 0x64
setl al
test eax, eax
jne 0x406047
push 0x411334
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 8
push ebx
mov ebx, esi
imul ebx, ebx, 0x34
add ebx, 0x40fe40
mov eax, dword [ebx + 4]
test eax, eax
js 0x40618f
xor ecx, ecx
cmp eax, 0x64
setl cl
mov eax, ecx
test eax, eax
je 0x40618f
cmp dword [ebx + 8], 0
je 0x40618f
cmp dword [ebx + 0x1c], 0xffffffff
je 0x40618f
cmp edi, 0x800
jle 0x4060b2
push edi
push esi
push str._SocketTCP__Max_msg_size__Type:_1_Index:__d_Size:__d_
push 1
call fcn.00406e20
add esp, 0x10
push 0x411334
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebx
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebx + 0x24]
cmp dword [esi + 0x20], 0
jle 0x406117
mov eax, dword [esi + 0x1028]
lea ecx, [eax + edi]
cmp ecx, 0x800
jle 0x4060e7
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.00406e20
add esp, 0x10
mov eax, esi
jmp 0x406185
mov edx, dword [ebp + 0xc]
push edi
push edx
lea eax, [eax + esi + 0x828]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
add dword [esi + 0x1028], edi
push 0x411334
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebx
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 0xc]
push edi
lea eax, [esi + 0x24]
push ecx
push eax
call sub.MSVCR100.dll_memcpy
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], edi
mov dword [esi + 0x1c], 1
mov dword [esi + 0x20], edi
mov dword [esi + 0x824], ecx
push eax
mov eax, dword [ebx + 0x1c]
push eax
mov dword [ebp - 4], ecx
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x406102
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x406102
call esi
push eax
push str._SocketTCP__WSASend___failed_with_error:__d
push 1
call fcn.00406e20
mov eax, dword [ebp + 8]
add esp, 0xc
mov ecx, 0x4112b8
call fcn.004061b0
push 0x411334
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebx
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x406290
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
add ebx, 0x7c
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test edi, edi
js 0x406384
xor eax, eax
cmp edi, 0x64
setl al
test eax, eax
je 0x406384
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
test eax, eax
je 0x40637d
add dword [esi + 0x824], eax
lea eax, [esi + 0x24]
push eax
push edi
push ecx
call fcn.00405d90
test al, al
jne 0x406308
mov edx, edi
imul edx, edx, 0x34
add edx, 0x40fe4c
push edx
push edi
push str._DataRecv__MainBuffer_Error__Index:__d_IpAddress:__s_
push 2
mov ecx, 0x40c1d8
call fcn.00403670
add esp, 0x10
jmp 0x40637a
mov eax, dword [esi + 0x824]
lea ecx, [eax + esi + 0x24]
mov edx, 0x800
sub edx, eax
xor eax, eax
push eax
mov dword [esi + 0x1c], eax
push esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
mov dword [esi + 0x18], ecx
mov eax, edi
lea ecx, [esi + 0x14]
imul eax, eax, 0x34
mov dword [ecx], edx
lea edx, [esp + 0x18]
push edx
push 1
push ecx
mov ecx, dword [eax + 0x40fe5c]
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x406384
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x406384
call esi
push eax
push str._SocketTCP__WSARecv___failed_with_error:__d
push 2
mov ecx, 0x40c1d8
call fcn.00403670
add esp, 0xc
mov ecx, dword [ebp + 8]
mov eax, edi
call fcn.004061b0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4063a0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
mov edi, dword [ebp + 8]
lea esi, [edi + 0x7c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0xc]
test eax, eax
js 0x4063d9
xor ecx, ecx
cmp eax, 0x64
setl cl
test ecx, ecx
je 0x4063d9
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x4063e8
mov ecx, edi
call fcn.004061b0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
add dword [ebx + 0x824], ecx
mov ecx, dword [ebx + 0x824]
mov edi, eax
mov eax, dword [ebx + 0x20]
imul edi, edi, 0x34
add edi, 0x40fe40
mov dword [ebp + 0x10], edi
cmp ecx, eax
jl 0x4064cf
mov eax, dword [ebx + 0x1028]
test eax, eax
jg 0x40642d
push esi
mov dword [ebx + 0x20], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 0x800
jle 0x406499
lea eax, [ebx + 0x828]
lea edx, [ebx + 0x24]
mov esi, eax
mov edi, edx
mov ecx, 0x200
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x1028]
add ecx, 0xfffff800
push ecx
lea ecx, [ebx + 0x1028]
push ecx
lea esi, [ebx + 0x14]
push eax
mov dword [ebx + 0x18], edx
mov dword [esi], 0x800
mov dword [ebx + 0x1c], 1
mov dword [ebx + 0x20], 0x800
mov dword [ebx + 0x824], 0
call dword [sym.imp.MSVCR100.dll_memmove]
mov edi, dword [ebp + 0x10]
add esp, 0xc
add dword [ebx + 0x1028], 0xfffff800
jmp 0x4064e4
push eax
lea eax, [ebx + 0x828]
push eax
lea esi, [ebx + 0x24]
push esi
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebx + 0x1028]
add esp, 0xc
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x824], 0
mov dword [ebx + 0x1028], 0
jmp 0x4064d8
lea edx, [ecx + ebx + 0x24]
mov dword [ebx + 0x18], edx
sub eax, ecx
lea esi, [ebx + 0x14]
mov dword [ebx + 0x1c], 1
mov dword [esi], eax
mov ecx, dword [edi + 0x1c]
push 0
push ebx
push 0
lea eax, [ebp - 8]
push eax
push 1
push esi
push ecx
mov dword [ebp - 8], 0
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x406544
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x406544
call esi
push eax
push str._SocketTCP__WSASend___failed_with_error:__d
push 1
call fcn.00406e20
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
add esp, 0xc
call fcn.004061b0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc