joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401d30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
test ecx, ecx
je 0x401d58
push esi
mov esi, 1
mov edx, 0x10
sub esi, ecx
xor byte [ecx], 0x54
lea eax, [esi + ecx]
lea ecx, [ecx + 1]
sub edx, 1
jne 0x401d45
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x401e60
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x186a0
mov dword [ebp - 8], 0
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x401e9b
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042996d
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 8]
push eax
push 0x40
push 0x186a0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0042996d
mov esp, ebp
pop ebp
ret

Function at 0x402530
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call fcn.00402500
nop
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call fcn.00402500
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], 0
jmp 0x402566
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 4
jge 0x402585
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4]
push ecx
call fcn.00402500
nop
mov edx, dword [ebp - 8]
mov dword [ebp + edx*4 - 0x18], eax
jmp 0x40255d
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0
jmp 0x40259e
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x10
jge 0x4025f6
mov ecx, dword [ebp - 0x1c]
sub ecx, 0x61c88647
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x20]
shl edx, 4
add edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x1c]
xor edx, eax
mov ecx, dword [ebp - 0x20]
shr ecx, 5
add ecx, dword [ebp - 0x14]
xor edx, ecx
add edx, dword [ebp - 4]
mov dword [ebp - 4], edx
mov edx, dword [ebp - 4]
shl edx, 4
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x1c]
xor edx, eax
mov ecx, dword [ebp - 4]
shr ecx, 5
add ecx, dword [ebp - 0xc]
xor edx, ecx
add edx, dword [ebp - 0x20]
mov dword [ebp - 0x20], edx
jmp 0x402595
mov edx, dword [ebp - 4]
push edx
call fcn.00402500
nop
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [ebp - 0x20]
push edx
call fcn.00402500
nop
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 4], eax
mov esp, ebp
pop ebp
ret
Function at 0x4057d0
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_ntohl]
push esi
mov esi, edx
push edi
push dword [esi]
call ebx
push dword [esi + 4]
mov edi, eax
call ebx
mov ebx, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x14]
sub ebx, eax
nop dword [eax]
lea eax, [ebx + esi*4]
push dword [ebp + eax - 0x14]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp + esi*4 - 0x14], eax
inc esi
cmp esi, 4
jl 0x405800
mov ebx, dword [ebp - 4]
mov edx, 0xe3779b90
mov esi, 0x10
mov ecx, edi
mov eax, edi
shr ecx, 5
add ecx, dword [ebp - 8]
shl eax, 4
add eax, dword [ebp - 0xc]
xor ecx, eax
lea eax, [edx + edi]
xor ecx, eax
sub ebx, ecx
mov ecx, ebx
mov eax, ebx
shr ecx, 5
add ecx, dword [ebp - 0x10]
shl eax, 4
add eax, dword [ebp - 0x14]
xor ecx, eax
lea eax, [edx + ebx]
xor ecx, eax
lea edx, [edx + 0x61c88647]
sub edi, ecx
sub esi, 1
jne 0x405824
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push edi
call esi
mov edi, dword [ebp + 0xc]
push ebx
mov dword [edi], eax
call esi
mov dword [edi + 4], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x409950
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x4a2b0c], 0
push esi
push edi
mov esi, ecx
je 0x40997c
cmp byte [esi + 0x4b0], 7
jne 0x40997c
push ecx
call fcn.0040b0c0
push ebx
push 4
lea eax, [ebp - 8]
mov dword [ebp - 0x14], 0x6500
push eax
push ecx
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], 0
push eax
mov ecx, esi
mov word [ebp - 0xc], 0x400
mov dword [ebp - 8], 0
call fcn.00408a20
mov ebx, dword [esi + 0x402]
mov eax, dword [sym.imp.WS2_32.dll_setsockopt]
test ebx, ebx
je 0x4099f5
mov edi, dword [ebx]
cmp edi, 0xffffffff
je 0x4099ef
push 4
lea ecx, [ebp - 8]
mov dword [ebp - 8], 1
push ecx
push 0x80
push 0xffff
push edi
call eax
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebx], 0xffffffff
mov edi, dword [esi + 0x406]
test edi, edi
je 0x409a40
mov ebx, dword [edi]
cmp ebx, 0xffffffff
je 0x409a30
push 4
lea ecx, [ebp - 8]
mov dword [ebp - 8], 1
push ecx
push 0x80
push 0xffff
push ebx
call eax
push 2
push ebx
call dword [sym.imp.WS2_32.dll_shutdown]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
mov dword [esi + 0x406], 0
mov eax, dword [esi + 0x45c]
pop ebx
test eax, eax
je 0x409a5c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x45c], 0
mov eax, dword [0x4a2a38]
test eax, eax
je 0x409a6b
dec eax
mov dword [0x4a2a38], eax
xor eax, eax
mov dword [esi + 0x402], 0
mov dword [esi + 0x3e6], 0
mov byte [esi + 0x4d4], 0
mov dword [esi + 0x3fa], 0
mov dword [esi + 0x3fe], 0
mov word [esi + 0x4c8], ax
mov byte [esi + 0x4be], al
cmp dword [ebp + 8], eax
je 0x409ae8
mov eax, dword [esi + 0x6ae]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test eax, eax
je 0x409ace
push eax
call edi
add esp, 4
mov dword [esi + 0x6ae], 0
mov eax, dword [esi + 0x6b6]
test eax, eax
je 0x409ae8
push eax
call edi
add esp, 4
mov dword [esi + 0x6b6], 0
mov ecx, dword [esi + 0x6aa]
call dword [sym.imp.mfc140u.dll_CByteArray::FreeExtra]
mov ecx, dword [esi + 0x6aa]
push 0xffffffffffffffff
push 0
call dword [sym.imp.mfc140u.dll_CByteArray::SetSize]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0042996d
mov esp, ebp
pop ebp
ret 4
Function at 0x40a940
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [ebp + 0xc]
xorps xmm0, xmm0
mov byte [ebp - 0x18], 0
mov edi, ecx
mov word [ebp - 7], 0
movups xmmword [ebp - 0x17], xmm0
mov byte [ebp - 5], 0
call dword [sym.imp.WS2_32.dll_htonl]
lea edx, [ebp - 0x18]
mov ecx, eax
call fcn.0040a390
mov ebx, dword [edi + 0x402]
mov dword [edi + 0x406], ebx
mov byte [edi + 0x4d4], 0
test ebx, ebx
je 0x40a9cf
mov esi, dword [ebx]
cmp esi, 0xffffffff
je 0x40a9c9
push 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 1
push eax
push 0x80
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0xffffffff
push 0x10
call dword [sym.imp.mfc140u.dll_operator_2]
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x40a9f1
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi], 0xffffffff
jmp 0x40a9f3
xor esi, esi
push 5
push 0
push 0
push 0
push 0
push 0
push ecx
push dword [ebp + 0x10]
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.0040d060
test eax, eax
je 0x40aa29
test esi, esi
je 0x40aa27
push 0x10
push esi
mov dword [esi], 0xffffffff
call fcn.00429de8
add esp, 8
xor esi, esi
push 0x32
mov dword [edi + 0x402], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [edi + 0x402], 0
je 0x40aa4d
push dword [ebp + 0x1c]
mov ecx, edi
push dword [ebp + 0x18]
call fcn.0040a850
push dword [ebp + 0x14]
mov ecx, edi
call fcn.0040a410
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042996d
mov esp, ebp
pop ebp
ret 0x18
Function at 0x40c750
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, edx
mov eax, 0x55555556
imul ebx
push edi
mov edi, edx
mov dword [ebp - 0xc], ebx
shr edi, 0x1f
add edi, edx
mov dword [ebp - 8], edi
lea edx, [edi + 1]
mov dword [ebp - 4], edx
test edx, edx
jle 0x40c8bb
mov eax, dword [ebp + 8]
lea edx, [ecx + 2]
mov ebx, dword [ebp - 4]
mov edi, 0x2f
push esi
lea esi, [eax + 2]
nop
mov cl, byte [edx - 2]
shr cl, 2
cmp cl, 0x19
ja 0x40c7a0
add cl, 0x41
jmp 0x40c7ce
lea eax, [ecx - 0x1a]
cmp al, 0x19
ja 0x40c7ac
add cl, 0x47
jmp 0x40c7ce
lea eax, [ecx - 0x34]
cmp al, 9
ja 0x40c7b8
sub cl, 4
jmp 0x40c7ce
cmp cl, 0x3e
jne 0x40c7c1
mov cl, 0x2b
jmp 0x40c7ce
cmp cl, 0x3f
mov eax, 0x3d
cmove eax, edi
mov cl, al
mov byte [esi - 2], cl
mov cl, byte [edx - 2]
mov al, byte [edx - 1]
and cl, 3
shl cl, 4
shr al, 4
add cl, al
cmp cl, 0x19
ja 0x40c7ec
add cl, 0x41
jmp 0x40c81a
lea eax, [ecx - 0x1a]
cmp al, 0x19
ja 0x40c7f8
add cl, 0x47
jmp 0x40c81a
lea eax, [ecx - 0x34]
cmp al, 9
ja 0x40c804
sub cl, 4
jmp 0x40c81a
cmp cl, 0x3e
jne 0x40c80d
mov cl, 0x2b
jmp 0x40c81a
cmp cl, 0x3f
mov eax, 0x3d
cmove eax, edi
mov cl, al
mov byte [esi - 1], cl
mov al, byte [edx - 1]
mov cl, byte [edx]
and al, 0xf
shl al, 2
shr cl, 6
add al, cl
cmp al, 0x19
ja 0x40c834
add al, 0x41
jmp 0x40c860
lea ecx, [eax - 0x1a]
cmp cl, 0x19
ja 0x40c840
add al, 0x47
jmp 0x40c860
lea ecx, [eax - 0x34]
cmp cl, 9
ja 0x40c84c
sub al, 4
jmp 0x40c860
cmp al, 0x3e
jne 0x40c854
mov al, 0x2b
jmp 0x40c860
cmp al, 0x3f
mov ecx, 0x3d
cmove ecx, edi
mov al, cl
mov byte [esi], al
mov cl, byte [edx]
and cl, 0x3f
cmp cl, 0x19
ja 0x40c871
add cl, 0x41
jmp 0x40c89f
lea eax, [ecx - 0x1a]
cmp al, 0x19
ja 0x40c87d
add cl, 0x47
jmp 0x40c89f
lea eax, [ecx - 0x34]
cmp al, 9
ja 0x40c889
sub cl, 4
jmp 0x40c89f
cmp cl, 0x3e
jne 0x40c892
mov cl, 0x2b
jmp 0x40c89f
cmp cl, 0x3f
mov eax, 0x3d
cmove eax, edi
mov cl, al
mov byte [esi + 1], cl
add edx, 3
add esi, 4
sub ebx, 1
jne 0x40c790
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
pop esi
lea eax, [edi + edi*2]
sub ebx, eax
cmp ebx, 1
jne 0x40c8d1
mov eax, dword [ebp + 8]
mov word [eax + edi*4 + 2], 0x3d3d
jmp 0x40c8de
cmp ebx, 2
jne 0x40c8e0
mov eax, dword [ebp + 8]
mov byte [eax + edi*4 + 3], 0x3d
mov edi, edx
mov ecx, dword [ebp + 8]
lea eax, [edi*4]
pop edi
pop ebx
mov byte [eax + ecx], 0
mov esp, ebp
pop ebp
ret
Function at 0x40cb80
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
call fcn.0040c900
test eax, eax
je 0x40cbb6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call ebx
mov ecx, edi
call fcn.0040c900
test eax, eax
jne 0x40cba7
push 4
push edi
push 0x700b
push 0xffff
push dword [esi + 0x1c]
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 1
push eax
push 0x98000004
push dword [esi + 0x1c]
mov dword [ebp - 0x18], 0x7530
mov dword [ebp - 0x14], 0x1388
call dword [sym.imp.WS2_32.dll_WSAIoctl]
lea ebx, [edi + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [edi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [edi + 4]
push 0
push 0
push 1
push dword [esi + 0x1c]
push edi
call dword [0x4a2a10]
cmp byte [ebp + 8], 0
je 0x40cc9a
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
call eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
dec dword [edi + 4]
push ebx
call eax
push dword [edi + 4]
push 0
push 0
push 3
push dword [esi + 0x1c]
push edi
call dword [0x4a2a10]
mov edi, dword [esi + 0x1c]
cmp edi, 0xffffffff
je 0x40cd5b
push 4
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 1
push eax
push 0x80
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40cd5b
mov dword [esi + 0x18], 2
cmp dword [edi + 0x20], 0
je 0x40ccdf
push dword [esi + 0x20]
call dword [sym.imp.mfc140u.dll_operator_1]
add esp, 4
mov dword [esi + 0x30], 0
push 4
call dword [sym.imp.mfc140u.dll_operator]
mov dword [esi + 0x20], eax
add esp, 4
add eax, dword [esi + 0x30]
mov dword [ebp - 0x20], eax
mov eax, 4
sub eax, dword [esi + 0x30]
mov dword [esi + 0x2c], 4
jmp 0x40ccea
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x20], eax
mov eax, dword [0x4a1720]
push 0
push esi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x10], 0
push eax
push 1
lea eax, [ebp - 0x24]
mov dword [ebp - 8], 0
push eax
push dword [esi + 0x1c]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x40cd80
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
je 0x40cd80
cmp eax, 0x3e5
je 0x40cd80
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
call eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
dec dword [edi + 4]
push ebx
call eax
push dword [edi + 4]
push 0
push 0
push 3
push dword [esi + 0x1c]
push edi
call dword [0x4a2a10]
mov ecx, dword [esi + 0x1c]
call fcn.0040e010
push dword [esi + 0x20]
mov dword [esi + 0x1c], 0xffffffff
call dword [sym.imp.mfc140u.dll_operator_1]
add esp, 4
mov dword [esi + 0x20], 0
push 0x34
push esi
call fcn.00429de8
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042996d
mov esp, ebp
pop ebp
ret 8
Function at 0x40cfc0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
push dword [esi + 0x20]
mov edi, dword [esi + 0x1c]
call dword [sym.imp.mfc140u.dll_operator_1]
push 0x34
push esi
mov dword [esi + 0x20], 0
call fcn.00429de8
add esp, 0xc
cmp byte [ebp + 8], 0
je 0x40d040
cmp edi, 0xffffffff
je 0x40d02f
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x80
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebx + 4]
push 0
push 0
push 5
push edi
push ebx
call dword [0x4a2a10]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042996d
mov esp, ebp
pop ebp
ret 8
Function at 0x40d560
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push 0
push 0
mov edi, ecx
push 0x7010
push 0xffff
push dword [edi]
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
push 0
push 1
push dword [edi]
push edi
call dword [0x4a2a08]
cmp byte [ebp + 8], 0
je 0x40d5a1
push dword [ebp + 0xc]
push ecx
mov ecx, edi
call fcn.0040d7f0
pop edi
pop ebp
ret 8
push esi
mov esi, dword [ebp + 0xc]
push dword [esi + 0x1c]
call dword [sym.imp.mfc140u.dll_operator_1]
add esp, 4
cmp dword [edi + 4], 0
je 0x40d5c8
push 4
call dword [sym.imp.mfc140u.dll_operator]
mov dword [esi + 0x28], 4
jmp 0x40d5da
push 0xffff
call dword [sym.imp.mfc140u.dll_operator]
mov dword [esi + 0x28], 0xffff
add esp, 4
mov dword [esi + 0x1c], eax
mov ecx, edi
mov dword [esi + 0x18], 2
mov dword [esi + 0x2c], 0
push esi
call fcn.0040d750
cmp eax, 1
jne 0x40d604
push esi
push ecx
mov ecx, edi
call fcn.0040d7f0
pop esi
pop edi
pop ebp
ret 8

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
mov esi, dword [ebp + 8]
push 0
push esi
mov dword [ebp - 0xc], 0
mov eax, dword [esi + 0x1c]
add eax, dword [esi + 0x2c]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x2c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [esi + 0x24]
mov dword [esi + 0x14], ecx
push eax
push 1
lea eax, [ebp - 0x14]
mov dword [esi + 0x18], 2
push eax
push dword [ecx]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x40d7ce
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
je 0x40d7ce
cmp eax, 0x3e5
je 0x40d7ce
mov eax, 1
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042996d
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 8]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0042996d
mov esp, ebp
pop ebp
ret 4

Function at 0x40d7f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
push dword [esi + 0x1c]
call dword [sym.imp.mfc140u.dll_operator_1]
push 0x30
push esi
mov dword [esi + 0x1c], 0
call fcn.00429de8
add esp, 0xc
push 0
push 0
push 3
push dword [edi]
push edi
call dword [0x4a2a08]
mov esi, dword [edi]
cmp esi, 0xffffffff
je 0x40d866
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x80
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov dword [edi], 0xffffffff
xor ecx, ebp
pop edi
pop esi
call fcn.0042996d
mov esp, ebp
pop ebp
ret 8
Function at 0x40d880
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
mov edi, dword [esi]
cmp edi, 0xffffffff
je 0x40d8c9
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x80
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
mov dword [esi], 0xffffffff
xor ecx, ebp
pop esi
call fcn.0042996d
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], esi
push edi
mov edi, ecx
cmp esi, 0x3e80000
jbe 0x40d92c
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042996d
mov esp, ebp
pop ebp
ret 0x14
push ebx
push 0x30
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call dword [sym.imp.mfc140u.dll_operator_2]
push 0x30
mov ebx, eax
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x18], 4
cmp dword [edi + 4], 0
je 0x40d995
add esi, 4
push esi
call dword [sym.imp.mfc140u.dll_operator]
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x28], esi
mov dword [ebp - 8], eax
mov ecx, dword [ebx + 0x28]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov eax, dword [ebp - 8]
push ecx
push dword [ebp - 0x10]
add eax, 4
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0x10
jmp 0x40d9a7
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x28], esi
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0xc], eax
push 0
push ebx
push 0
lea eax, [ebx + 0x24]
push eax
push 1
lea eax, [ebp - 0xc]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
je 0x40d9f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40d9f2
push 0x30
push ebx
call fcn.00429de8
add esp, 8
mov eax, 1
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042996d
mov esp, ebp
pop ebp
ret 0x14
xor esi, esi
cmp dword [edi + 8], 1
jne 0x40da23
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x7d0
jg 0x40da15
push 1
call ebx
cmp dword [edi + 8], 1
je 0x40da00
jmp 0x40da23
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov ecx, dword [ebp - 4]
xor eax, eax
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0042996d
mov esp, ebp
pop ebp
ret 0x14
Function at 0x40da40
Capabilities:
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x4a1014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, ecx
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40da7d
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042996d
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp + 0xc]
push edi
mov eax, dword [eax]
mov edx, dword [eax]
mov eax, ecx
shr eax, 8
mov byte [ebp - 0x402], al
mov eax, edx
shr eax, 8
mov byte [ebp - 0x3ff], al
mov eax, edx
shr eax, 0x10
mov byte [ebp - 0x3fe], al
lea eax, [ebp - 0x3fc]
mov byte [ebp - 0x400], dl
shr edx, 0x18
push eax
mov word [ebp - 0x404], 0x104
mov byte [ebp - 0x401], cl
mov byte [ebp - 0x3fd], dl
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
add eax, 9
push eax
lea eax, [ebp - 0x404]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x40da68
push 0x50
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x400
lea eax, [ebp - 0x404]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40da68
cmp byte [ebp - 0x404], 0
jne 0x40da68
mov ecx, dword [ebp - 4]
xor eax, eax
cmp byte [ebp - 0x403], 0x5a
pop edi
sete al
xor ecx, ebp
dec eax
pop esi
call fcn.0042996d
mov esp, ebp
pop ebp
ret 0x10