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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x3c0a8
call fcn.00438a40
mov eax, dword [0x44a00c]
xor eax, esp
mov dword [esp + 0x3c0a4], eax
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x28], ecx
mov eax, dword [esi + 8]
add eax, 8
mov dword [esp + 0xc], edi
cmp byte [ecx + 0x34], 0
mov dword [esp + 0x24], eax
mov eax, dword [eax + 0x10]
mov dword [esp + 0x10], eax
je 0x40a8c0
lea eax, [ecx + 0x18]
push eax
mov eax, dword [ecx + 0x20]
call eax
jmp 0x40a8c7
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x38]
test eax, eax
je 0x40aff4
cmp dword [eax], 1
jne 0x40ad97
mov ecx, dword [esp + 0x10]
cmp ecx, dword [edi + 0x44]
je 0x40ab60
cmp ecx, 0xffffffff
je 0x40ab60
cmp cl, 0xe0
jb 0x40a8ff
cmp cl, 0xef
jbe 0x40ab60
cmp ecx, dword [edi + 0x3c]
je 0x40aff4
mov edx, dword [eax + 0x44]
test edx, edx
je 0x40aff4
mov eax, dword [eax + 0x40]
test eax, eax
jle 0x40aff4
push 0x409c80
push 0xc
push eax
push edx
lea eax, [esp + 0x44]
mov dword [esp + 0x44], ecx
push eax
mov dword [esp + 0x50], 0
call fcn.00424d2a
add esp, 0x14
test eax, eax
je 0x40aff4
mov edi, dword [eax + 8]
mov dword [esp + 0x18], edi
test edi, edi
je 0x40aff4
cmp edi, dword [esp + 0xc]
je 0x40aff4
cmp byte [edi + 0x64], 0
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x58]
mov dword [esp + 0x1c], eax
je 0x40aac7
cmp dword [edi + 0x68], 0
je 0x40aac7
cmp word [edi + 0x6c], 0
je 0x40aac7
test eax, eax
js 0x40aac7
push 0
call fcn.004230b2
mov ecx, eax
add esp, 4
sub ecx, dword [edi + 0x70]
sbb edx, dword [edi + 0x74]
mov eax, edx
cdq
xor eax, edx
xor ecx, edx
sub ecx, edx
sbb eax, edx
test eax, eax
jg 0x40aac7
jl 0x40a9c3
cmp ecx, 0xf
jae 0x40aac7
mov eax, 2
xorps xmm0, xmm0
movaps xmmword [esp + 0x70], xmm0
mov word [esp + 0x70], ax
mov ax, word [edi + 0x6c]
mov word [esp + 0x72], ax
mov eax, dword [edi + 0x68]
xor edi, edi
mov dword [esp + 0x74], eax
mov eax, dword [esi + 4]
sub eax, 8
mov dword [esp + 0xc], eax
test eax, eax
jle 0x40aff4
nop dword [eax]
mov eax, dword [esi + 8]
add eax, 8
add eax, edi
mov dword [esp + 0x10], eax
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
movzx eax, cx
add edi, eax
mov dword [esp + 0x14], ecx
cmp edi, dword [esp + 0xc]
jg 0x40aff4
test cx, cx
je 0x40aff4
mov eax, dword [str.VLAN]
xorps xmm0, xmm0
movq qword [esp + 0xa8], xmm0
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x18]
mov word [esp + 0xb0], 0
mov word [esp + 0xac], 1
push dword [eax + 0x60]
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0xae], eax
movzx eax, cx
push eax
push dword [esp + 0x14]
lea eax, [esp + 0xba]
push eax
call fcn.00438ba0
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x7c]
add esp, 0xc
push 0x10
push eax
push 0
movzx eax, cx
add eax, 0xa
push eax
lea eax, [esp + 0xb8]
push eax
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_sendto]
cmp edi, dword [esp + 0xc]
jl 0x40aa00
jmp 0x40aff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp dword [edi + 0x5c], 0x12c
lea eax, [edi + 0x5c]
mov dword [esp + 0x10], eax
jg 0x40ab43
mov edi, dword [esi + 8]
xorps xmm0, xmm0
mov dword [esp + 0x48], 1
mov dword [esp + 0x4c], esi
movq qword [edi], xmm0
mov word [edi], 0x103
mov eax, dword [esi + 4]
sub eax, 8
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [edi + 4], eax
mov edi, dword [esp + 0x18]
mov ecx, dword [edi]
test ecx, ecx
je 0x40ab3c
push 0x10
lea eax, [esp + 0x44]
push eax
push dword [esi + 4]
push dword [esi + 8]
push ecx
mov ecx, dword [ecx + 0x58]
call fcn.00416110
test eax, eax
js 0x40ab3c
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x40aff4
mov ecx, dword [edi]
call fcn.00416940
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40aff4
push esi
call fcn.00424799
add esp, 4
jmp 0x40aff4
mov eax, dword [eax + 0x34]
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
cmp ecx, eax
je 0x40aff4
mov edi, dword [ecx + 0x10]
mov dword [esp + 0x20], edi
cmp edi, dword [esp + 0xc]
je 0x40ad75
cmp byte [edi + 0x64], 0
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x58]
mov dword [esp + 0x24], eax
je 0x40ace8
cmp dword [edi + 0x68], 0
je 0x40ace8
cmp word [edi + 0x6c], 0
je 0x40ace8
test eax, eax
js 0x40ace8
push 0
call fcn.004230b2
mov ecx, eax
add esp, 4
sub ecx, dword [edi + 0x70]
sbb edx, dword [edi + 0x74]
mov eax, edx
cdq
xor eax, edx
xor ecx, edx
sub ecx, edx
sbb eax, edx
test eax, eax
jg 0x40ace8
jl 0x40abe4
cmp ecx, 0xf
jae 0x40ace8
mov eax, 2
xorps xmm0, xmm0
movaps xmmword [esp + 0x80], xmm0
mov word [esp + 0x80], ax
mov ax, word [edi + 0x6c]
mov word [esp + 0x82], ax
mov eax, dword [edi + 0x68]
xor edi, edi
mov dword [esp + 0x84], eax
mov eax, dword [esi + 4]
sub eax, 8
mov dword [esp + 0x14], eax
test eax, eax
jle 0x40ad75
mov eax, dword [esi + 8]
add eax, 8
add eax, edi
mov dword [esp + 0x10], eax
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov ecx, eax
add edi, ecx
mov dword [esp + 0x18], ecx
cmp edi, dword [esp + 0x14]
jg 0x40ad75
test ax, ax
je 0x40ad75
mov eax, dword [str.VLAN]
xorps xmm0, xmm0
movq qword [esp + 0x140a8], xmm0
mov dword [esp + 0x140a8], eax
mov eax, dword [esp + 0x20]
mov word [esp + 0x140b0], 0
mov word [esp + 0x140ac], 1
push dword [eax + 0x60]
call dword [sym.imp.WS2_32.dll_htonl]
push dword [esp + 0x18]
mov dword [esp + 0x140b2], eax
lea eax, [esp + 0x140b6]
push dword [esp + 0x14]
push eax
call fcn.00438ba0
add esp, 0xc
lea eax, [esp + 0x80]
push 0x10
push eax
mov eax, dword [esp + 0x20]
push 0
add eax, 0xa
push eax
lea eax, [esp + 0x140b8]
push eax
push dword [esp + 0x38]
call dword [sym.imp.WS2_32.dll_sendto]
cmp edi, dword [esp + 0x14]
jl 0x40ac26
jmp 0x40ad75
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp dword [edi + 0x5c], 0x12c
lea eax, [edi + 0x5c]
mov dword [esp + 0x24], eax
jg 0x40ad61
mov edi, dword [esi + 8]
xorps xmm0, xmm0
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], esi
movq qword [edi], xmm0
mov word [edi], 0x103
mov eax, dword [esi + 4]
sub eax, 8
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [edi + 4], eax
mov edi, dword [esp + 0x20]
mov ecx, dword [edi]
test ecx, ecx
je 0x40ad5a
push 0x10
lea eax, [esp + 0x54]
push eax
push dword [esi + 4]
push dword [esi + 8]
push ecx
mov ecx, dword [ecx + 0x58]
call fcn.00416110
test eax, eax
js 0x40ad5a
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x40ad75
mov ecx, dword [edi]
call fcn.00416940
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40ad75
push esi
call fcn.00424799
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.00405340
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 0x38]
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [eax + 0x34]
jne 0x40ab71
jmp 0x40aff4
cmp dword [eax + 0x40], 0
mov dword [esp + 0x18], 0
jle 0x40aff4
mov edx, dword [esp + 0xc]
xor edi, edi
mov dword [esp + 0x10], edi
mov ecx, dword [eax + 0x44]
add ecx, edi
mov edi, dword [ecx + 8]
mov dword [esp + 0x14], edi
cmp edx, edi
je 0x40afd4
mov edi, dword [esp + 0x24]
mov eax, dword [ecx + 4]
and eax, dword [edi + 0x10]
mov edi, dword [esp + 0x14]
cmp eax, dword [ecx]
jne 0x40afd4
cmp byte [edi + 0x64], 0
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x58]
mov dword [esp + 0x2c], eax
je 0x40af43
cmp dword [edi + 0x68], 0
je 0x40af43
cmp word [edi + 0x6c], 0
je 0x40af43
test eax, eax
js 0x40af43
push 0
call fcn.004230b2
mov ecx, eax
add esp, 4
sub ecx, dword [edi + 0x70]
sbb edx, dword [edi + 0x74]
mov eax, edx
cdq
xor eax, edx
xor ecx, edx
sub ecx, edx
sbb eax, edx
test eax, eax
jg 0x40af43
jl 0x40ae3f
cmp ecx, 0xf
jae 0x40af43
mov eax, 2
xorps xmm0, xmm0
movaps xmmword [esp + 0x90], xmm0
mov word [esp + 0x90], ax
mov ax, word [edi + 0x6c]
mov word [esp + 0x92], ax
mov eax, dword [edi + 0x68]
xor edi, edi
mov dword [esp + 0x94], eax
mov eax, dword [esi + 4]
sub eax, 8
mov dword [esp + 0x20], eax
test eax, eax
jle 0x40afd0
mov eax, dword [esi + 8]
add eax, 8
add eax, edi
mov dword [esp + 0x30], eax
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov ecx, eax
add edi, ecx
mov dword [esp + 0x1c], ecx
cmp edi, dword [esp + 0x20]
jg 0x40afd0
test ax, ax
je 0x40afd0
mov eax, dword [str.VLAN]
xorps xmm0, xmm0
movq qword [esp + 0x280a8], xmm0
mov dword [esp + 0x280a8], eax
mov eax, dword [esp + 0x14]
mov word [esp + 0x280b0], 0
mov word [esp + 0x280ac], 1
push dword [eax + 0x60]
call dword [sym.imp.WS2_32.dll_htonl]
push dword [esp + 0x1c]
mov dword [esp + 0x280b2], eax
lea eax, [esp + 0x280b6]
push dword [esp + 0x34]
push eax
call fcn.00438ba0
add esp, 0xc
lea eax, [esp + 0x90]
push 0x10
push eax
mov eax, dword [esp + 0x24]
push 0
add eax, 0xa
push eax
lea eax, [esp + 0x280b8]
push eax
push dword [esp + 0x40]
call dword [sym.imp.WS2_32.dll_sendto]
cmp edi, dword [esp + 0x20]
jl 0x40ae81
jmp 0x40afd0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp dword [edi + 0x5c], 0x12c
lea eax, [edi + 0x5c]
mov dword [esp + 0x2c], eax
jg 0x40afbc
mov edi, dword [esi + 8]
xorps xmm0, xmm0
mov dword [esp + 0x68], 1
mov dword [esp + 0x6c], esi
movq qword [edi], xmm0
mov word [edi], 0x103
mov eax, dword [esi + 4]
sub eax, 8
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [edi + 4], eax
mov edi, dword [esp + 0x14]
mov ecx, dword [edi]
test ecx, ecx
je 0x40afb5
push 0x10
lea eax, [esp + 0x64]
push eax
push dword [esi + 4]
push dword [esi + 8]
push ecx
mov ecx, dword [ecx + 0x58]
call fcn.00416110
test eax, eax
js 0x40afb5
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x40afd0
mov ecx, dword [edi]
call fcn.00416940
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40afd0
push esi
call fcn.00424799
add esp, 4
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
mov eax, dword [edx + 0x38]
inc ecx
mov edi, dword [esp + 0x10]
add edi, 0xc
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], edi
cmp ecx, dword [eax + 0x40]
jl 0x40adb3
mov ecx, dword [esp + 0x28]
cmp byte [ecx + 0x34], 0
je 0x40b01d
lea eax, [ecx + 0x18]
push eax
mov eax, dword [ecx + 0x28]
call eax
pop edi
pop esi
mov ecx, dword [esp + 0x3c0a4]
xor ecx, esp
call fcn.0041be62
mov esp, ebp
pop ebp
ret 0xc
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x3c0ac]
pop edi
pop esi
xor ecx, esp
call fcn.0041be62
mov esp, ebp
pop ebp
ret 0xc