joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401f50
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x438883
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [esp + 0x34]
push esi
push eax
lea ecx, [esp + 0xc]
mov dword [esp + 8], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [esp + 0x3c]
push ecx
mov ecx, eax
mov dword [esp + 0x30], 1
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov esi, dword [esp + 0x34]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 8]
mov dword [esp + 4], 1
mov byte [esp + 0x2c], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, dword [esp + 0x24]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret

Function at 0x401fd0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x438883
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [esp + 0x34]
push esi
push eax
lea ecx, [esp + 0xc]
mov dword [esp + 8], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, dword [esp + 0x3c]
push ecx
mov ecx, eax
mov dword [esp + 0x30], 1
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
mov esi, dword [esp + 0x34]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 8]
mov dword [esp + 4], 1
mov byte [esp + 0x2c], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, dword [esp + 0x24]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x402050
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x438883
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [esp + 0x34]
push esi
push eax
lea ecx, [esp + 0xc]
mov dword [esp + 8], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, dword [esp + 0x3c]
push ecx
mov ecx, eax
mov dword [esp + 0x30], 1
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_]
mov esi, dword [esp + 0x34]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 8]
mov dword [esp + 4], 1
mov byte [esp + 0x2c], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, dword [esp + 0x24]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret

Function at 0x402230
Capabilities:
Create thread

Disassembly:
sub esp, 0x18
push esi
mov esi, ecx
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
lea ecx, [esi + 0x64]
call fcn.00431280
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x20], esp
push str.NetMgr::Stop
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [esi + 0x84]
call fcn.00410540
lea ecx, [esp + 8]
mov byte [esi + 4], 1
call fcn.00430dd0
lea ecx, [esp + 4]
push ecx
push 0
push 0
push fcn.00401610
push 0
push 0
mov dword [esp + 0x1c], 0
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x4022a3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 8]
call fcn.00431210
pop esi
add esp, 0x18
ret

Function at 0x4022c0
Capabilities:
Create thread

Disassembly:
sub esp, 0x14
push ebx
push esi
push edi
push 0x15e
call sub.MSVCR71.dll_void____cdecl_operator_new_unsigned_int_
mov esi, dword [esp + 0x28]
mov ebx, eax
mov ecx, 0x57
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
add esp, 4
lea ecx, [esp + 0xc]
movsw word es:[edi], word [esi]
call fcn.00430dd0
lea eax, [esp + 0x24]
push eax
push 0
push ebx
push 0x4015e0
push 0
push 0
mov dword [esp + 0x3c], 0
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
test eax, eax
pop edi
pop esi
pop ebx
je 0x40231d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp]
call fcn.00431210
add esp, 0x14
ret 4
Function at 0x402e80
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push 0xffffffffffffffff
push 0x438992
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
mov eax, dword [0x44e7a0]
push ebx
mov dword [esp + 0x3c], eax
xor bl, bl
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x402fc7
push edi
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x402fc3
mov eax, dword [str.KwMusic]
push ebp
push esi
push 2
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ecx, dword [esp + 0x5c]
push ecx
lea ecx, [esp + 0x14]
mov esi, eax
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push str.__start
push eax
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x60], 0
call fcn.00401fd0
add esp, 0xc
lea ecx, [esp + 0x10]
mov byte [esp + 0x54], 2
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
test esi, esi
mov eax, dword [esp + 0x44]
jne 0x402f5a
cmp eax, 0x10
mov eax, dword [esp + 0x30]
jae 0x402f2d
lea eax, [esp + 0x30]
push 0
push 0
push 0
push 0
push 0
push eax
mov eax, dword [str.KwMusic]
push 0
push 2
push 0x110
push 0xf01ff
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
xor bl, bl
jmp 0x402f83
cmp eax, 0x10
mov eax, dword [esp + 0x30]
mov bl, 1
jae 0x402f69
lea eax, [esp + 0x30]
push 0
push 0
push 0
push 0
push 0
push 0
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test esi, esi
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x402f90
push esi
call ebp
push edi
call ebp
lea ecx, [esp + 0x2c]
mov dword [esp + 0x54], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
pop esi
mov al, bl
pop ebp
pop edi
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x3c]
pop ebx
call fcn.00437d67
add esp, 0x48
ret
mov al, bl
jmp 0x402fa9
mov al, bl
jmp 0x402faa
Function at 0x4041c0
Capabilities:
Create thread

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x438baa
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push esi
push 0x200
call sub.MSVCR71.dll_void____cdecl_operator_new___unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
je 0x4042cd
push edi
xor eax, eax
mov ecx, 0x80
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x64]
push eax
push 0x1ff
push esi
call dword [sym.imp.MSVCR71.dll__snprintf]
add esp, 0xc
lea ecx, [esp + 8]
call fcn.00430dd0
lea ecx, [esp + 0x64]
push ecx
push 0
push esi
push 0x404000
push 0
push 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x7c], 0
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
test eax, eax
pop edi
je 0x404251
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4042bc
push str.P2PClient
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [str.KTLog.txt]
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x5c], 1
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push str.NetMgr::checkNetwork__Create_checkNetworkProc_failed
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x20]
push 0
push ecx
mov byte [esp + 0x68], 2
call dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x58], 1
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x34]
mov byte [esp + 0x58], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push esi
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [esp + 4]
mov dword [esp + 0x58], 0xffffffff
call fcn.00431210
mov ecx, dword [esp + 0x50]
pop esi
mov dword fs:[0], ecx
add esp, 0x58
ret 4
Function at 0x405680
Capabilities:
Delete service
Query service status
Stop service
Terminate process

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10
cmp eax, 1
jne 0x40569c
call fcn.004050d0
call fcn.00401a10
xor eax, eax
add esp, 0x10
ret
push ebx
push ebp
mov edx, 1
cmp eax, edx
push esi
push edi
jle 0x405757
mov ebx, dword [esp + 0x28]
mov eax, dword [ebx + edx*4]
mov edi, str._install
mov esi, eax
mov ecx, 9
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x405793
mov edi, str._remove
mov esi, eax
mov ecx, 8
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x4057a8
mov edi, str._run
mov esi, eax
mov ecx, 5
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x40584a
mov edi, 0x43d5a0
mov esi, eax
mov ecx, 1
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x40584a
mov edi, str._stop
mov esi, eax
mov ecx, 6
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x405820
mov edi, str._start
mov esi, eax
mov ecx, 7
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x40582f
mov esi, eax
mov edi, str._help
mov ecx, 6
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x405789
mov eax, dword [esp + 0x24]
inc edx
cmp edx, eax
jl 0x4056b1
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x405789
lea ecx, [esp + 0x10]
push ecx
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], 0x401b30
mov dword [esp + 0x14], str.KwMusic
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
pop edi
pop esi
pop ebp
pop ebx
xor eax, eax
add esp, 0x10
ret
mov ecx, dword [ebx]
push ecx
call fcn.00402e80
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor eax, eax
add esp, 0x10
ret
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x405789
push 1
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebx
je 0x405789
mov edx, dword [str.KwMusic]
push 0xf01ff
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x405813
push 0x4507d0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [0x4507d4], 4
jne 0x405809
push 0x4507d0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call ebx
push edi
call ebx
pop edi
pop esi
pop ebp
pop ebx
xor eax, eax
add esp, 0x10
ret
call fcn.00401a70
pop edi
pop esi
pop ebp
pop ebx
xor eax, eax
add esp, 0x10
ret
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x405789
lea eax, [esp + 0x10]
push eax
jmp 0x405769
call fcn.004050d0
call fcn.00401a10
push 0
call dword [sym.imp.MSVCR71.dll_exit]
int3
Function at 0x406010
Capabilities:
Access peb ldr_data
Check for peb ntglobalflag flag
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x438d66
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esi], 0x43db7c
push edi
xor edi, edi
mov dword [esp + 0x10], esi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov ebx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esi + 0x18]
push eax
mov dword [esp + 0x20], edi
call ebx
lea ebp, [esi + 0x30]
mov ecx, ebp
mov byte [esp + 0x1c], 1
call fcn.00405c60
mov dword [ebp + 4], eax
lea eax, [esi + 0x3c]
push eax
mov dword [ebp + 8], edi
call ebx
push edi
push bind
push edi
push edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
mov dword [esi + 0x68], edi
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
lea ecx, [esi + 0x70]
push ecx
mov dword [esi + 0x6c], eax
call ebx
lea edx, [esi + 0x9c]
push edx
mov dword [esi + 0x8c], edi
mov dword [esi + 0x90], edi
mov dword [esi + 0x94], edi
mov dword [esi + 0x98], edi
call ebx
mov dword [esi + 0xb4], edi
mov dword [esi + 0xc4], edi
xor eax, eax
lea ecx, [esi + 0xc8]
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov ecx, dword [esp + 0x14]
mov dword [esi + 0xd8], edi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x408090
Capabilities:
Create thread

Disassembly:
sub esp, 0x18
lea ecx, [esp + 4]
call fcn.00430dd0
lea eax, [esp]
push eax
push 0
lea ecx, [esp + 0xc]
push ecx
push 0x408070
push 0
push 0
mov dword [esp + 0x18], 0
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x4080cc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 4]
call fcn.00431210
add esp, 0x18
ret
Function at 0x40add0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x439466
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push esi
mov esi, ecx
push edi
mov dword [esp + 8], esi
mov dword [esi], 0x43e38c
push 0x43d5a0
lea ecx, [esp + 0x10]
mov dword [esp + 0x34], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push 0
lea eax, [esp + 0x10]
push eax
mov ecx, esi
mov byte [esp + 0x38], 5
call fcn.0040abd0
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, esi
call fcn.00409aa0
mov ecx, dword [esi + 0xd8]
test ecx, ecx
je 0x40ae46
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [esi + 0xdc]
test ecx, ecx
je 0x40ae56
mov eax, dword [ecx]
push 1
call dword [eax]
lea ecx, [esi + 0xf4]
mov byte [esp + 0x30], 3
call fcn.00431210
lea ecx, [esi + 0xe0]
mov byte [esp + 0x30], 2
call fcn.00431210
mov ecx, dword [esi + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
mov edx, dword [esi + 0x20]
push edx
call edi
add esi, 8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [esp + 0x28]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x40d210
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x108
push esi
push edi
push 0x11
push 2
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40d27c
push 0x7f
lea eax, [esp + 0xc]
push str.Can_t_open_socket
push eax
call dword [sym.imp.MSVCR71.dll_strncpy]
xor eax, eax
add esp, 0xc
mov byte [esp + 0x87], al
mov dword [esp + 0x88], eax
mov ecx, 0x21
lea esi, [esp + 8]
lea edi, [esp + 0x8c]
rep movsd dword es:[edi], dword [esi]
push 0x447350
lea ecx, [esp + 0x90]
push ecx
call sub.MSVCR71.dll__CxxThrowException
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40d290
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
sub esp, 0x120
mov eax, dword [0x44e7a0]
mov edx, dword [esp + 0x134]
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x12c]
mov dword [esp + 0x10c], eax
mov eax, dword [esp + 0x138]
push esi
mov esi, ecx
mov ecx, dword [esp + 0x134]
mov dword [esp + 0x11c], eax
mov eax, dword [esi + 4]
test eax, eax
mov dword [esp + 0x114], ecx
mov dword [esp + 0x118], edx
jbe 0x40d338
push edi
xor edx, edx
mov edi, 0x3e8
div edi
mov ecx, dword [esi]
mov dword [esp + 0x14], ecx
inc ecx
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], edx
lea edx, [esp + 8]
push edx
push 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push eax
push 0
push ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
pop edi
jg 0x40d338
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x11c]
call fcn.00437d67
add esp, 0x120
ret 0x18
mov edx, dword [esp + 0x12c]
mov eax, dword [esp + 0x128]
push 0x10
lea ecx, [esp + 0x114]
push ecx
mov ecx, dword [esi]
push 0
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
mov ecx, dword [esp + 0x120]
pop esi
call fcn.00437d67
add esp, 0x120
ret 0x18

Function at 0x40d380
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x124
mov eax, dword [0x44e7a0]
push esi
mov esi, ecx
mov dword [esp + 0x124], eax
mov eax, dword [esi + 4]
test eax, eax
mov dword [esp + 4], 0x10
jbe 0x40d3f8
push edi
xor edx, edx
mov edi, 0x3e8
div edi
mov ecx, dword [esi]
mov dword [esp + 0x18], ecx
inc ecx
mov dword [esp + 0x14], 1
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push 0
mov dword [esp + 0x18], edx
push 0
lea edx, [esp + 0x20]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
pop edi
jg 0x40d3f8
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x120]
call fcn.00437d67
add esp, 0x124
ret 0xc
mov edx, dword [esp + 0x130]
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 0x130]
lea ecx, [esp + 0x118]
push ecx
mov ecx, dword [esi]
push 0
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
mov ecx, dword [esp + 0x114]
mov edx, dword [esp + 0x134]
mov dword [edx], ecx
mov ecx, dword [esp + 0x118]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x11c]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x120]
mov dword [edx + 0xc], ecx
mov ecx, dword [esp + 0x124]
pop esi
call fcn.00437d67
add esp, 0x124
ret 0xc
Function at 0x40d470
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x110
push esi
push edi
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0xc]
push eax
push 0x1002
mov esi, ecx
mov ecx, dword [esi]
push 0xffff
push ecx
mov dword [esp + 0x1c], 0x10000
call edi
mov eax, dword [esi]
push 4
lea edx, [esp + 0xc]
push edx
push 0x1001
push 0xffff
push eax
call edi
mov dl, byte [ebp + 8]
mov eax, dword [esi]
xor ecx, ecx
test dl, dl
sete cl
lea edx, [esp + 0xc]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x18], ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x40d52c
push 0x7f
lea ecx, [esp + 0x14]
push str.Can_t_set_blocking
push ecx
call dword [sym.imp.MSVCR71.dll_strncpy]
add esp, 0xc
push 0x447350
lea edx, [esp + 0x98]
mov byte [esp + 0x93], 0
mov dword [esp + 0x94], 0
mov ecx, 0x21
lea esi, [esp + 0x14]
lea edi, [esp + 0x98]
push edx
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR71.dll__CxxThrowException
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x40d580
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2a0
mov eax, dword [0x44e7a0]
push esi
mov dword [esp + 0x2a0], eax
push edi
lea eax, [esp + 0x110]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40d5fa
push 0x7f
lea ecx, [esp + 0xc]
push str.Fail_to_init_winsock_dll
push ecx
call dword [sym.imp.MSVCR71.dll_strncpy]
add esp, 0xc
xor eax, eax
push 0x447350
lea edx, [esp + 0x90]
mov byte [esp + 0x8b], al
mov dword [esp + 0x8c], eax
mov ecx, 0x21
lea esi, [esp + 0xc]
lea edi, [esp + 0x90]
push edx
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR71.dll__CxxThrowException
mov ecx, dword [esp + 0x2a4]
call fcn.00437d67
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40d610
Capabilities:
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x1c
mov eax, dword [0x44e7a0]
push esi
mov esi, ecx
mov dword [esp + 0x1c], eax
cmp dword [esi], 0xffffffff
je 0x40d6e4
push ebx
push ebp
push edi
lea ebp, [esi + 0x260]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x3c]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
xor bl, bl
test eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 4
jl 0x40d68b
mov edx, dword [esi]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
push 4
push 0
push edx
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
je 0x40d68b
mov ecx, dword [esi]
push 4
lea eax, [esp + 0x40]
push eax
push 4
push 0
push ecx
call edi
cmp eax, 0xffffffff
je 0x40d68b
mov bl, 1
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0x18], eax
mov eax, dword [edx + 8]
push 0x10
mov dword [esp + 0x20], ecx
mov ecx, dword [edx + 0xc]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esi]
push 0
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x3c]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test bl, bl
je 0x40d6da
mov ecx, dword [esi]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push 0
push ecx
call edi
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
pop esi
call fcn.00437d67
add esp, 0x1c
ret 0x10