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

Disassembly:
sub esp, 0xd8
mov eax, dword [0x68f500]
xor eax, esp
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0xe0]
push ebp
mov ebp, dword [esp + 0xe0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xf0]
push edi
xor edi, edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x20], ebp
lea eax, [esp + 0x8c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
mov byte [esp + 0xb], 0
test ebp, ebp
je 0x54159e
cmp dword [ebp], 0xbab1e
jne 0x54159e
cmp byte [ebp + 0x117], 0
je 0x540fc9
lea eax, [edi + 8]
pop edi
pop ebp
mov ecx, dword [esp + 0xd4]
xor ecx, esp
call fcn.005ab3d6
add esp, 0xd8
ret
push ebx
mov ebx, dword [esp + 0xf4]
test ebx, ebx
jns 0x540ff2
pop ebx
pop edi
mov eax, 0xa
pop ebp
mov ecx, dword [esp + 0xd4]
xor ecx, esp
call fcn.005ab3d6
add esp, 0xd8
ret
push esi
mov esi, dword [ebp + 4]
xorps xmm0, xmm0
movups xmmword [esp + 0x48], xmm0
movups xmmword [esp + 0x58], xmm0
test esi, esi
je 0x541024
lea eax, [esp + 0x48]
push eax
push esi
call fcn.0053f950
add edi, dword [esp + 0x64]
add esp, 8
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x541007
mov dword [esp + 0x3c], edi
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.00540e50
mov eax, dword [esp + 0x1c]
add esp, 8
test eax, eax
js 0x541046
cmp eax, ebx
cmovl ebx, eax
mov dword [esp + 0xf8], ebx
mov esi, dword [esp + 0xf4]
cmp byte [esp + 0x104], 0
lea eax, [edi + esi]
lea ecx, [eax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x54109f
lea eax, [ecx*8]
push eax
call dword [0x68f068]
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jne 0x54109a
mov eax, 3
pop esi
pop ebx
pop edi
pop ebp
mov ecx, dword [esp + 0xd4]
xor ecx, esp
call fcn.005ab3d6
add esp, 0xd8
ret
mov byte [esp + 0x13], 1
mov eax, dword [sym.imp.WS2_32.dll_WSAEventSelect]
xor ebx, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], eax
test edi, edi
je 0x5411a8
mov eax, dword [ebp + 4]
mov dword [esp + 0x18], eax
test eax, eax
je 0x5411a8
lea ecx, [esp + 0x48]
push ecx
push eax
call fcn.0053f950
xor edi, edi
add esp, 8
cmp dword [esp + 0x5c], edi
jbe 0x54118e
mov eax, dword [esp + 0x20]
lea eax, [eax + ebx*8]
mov esi, eax
inc ebx
add eax, 8
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], eax
xor ebx, ebx
mov eax, dword [esp + edi*4 + 0x48]
mov dword [esi], eax
xor eax, eax
mov word [esi + 4], ax
test byte [esp + edi + 0x60], 1
je 0x541115
lea ebx, [eax + 0x29]
mov eax, 0x300
mov word [esi + 4], ax
test byte [esp + edi + 0x60], 2
je 0x541164
mov ebp, dword [esp + edi*4 + 0x48]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x18], 4
push eax
push 0x1008
push 0xffff
push ebp
or ebx, 0x32
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x54115b
cmp dword [esp + 0x1c], 1
jne 0x54115b
push eax
push eax
push eax
push ebp
call dword [sym.imp.WS2_32.dll_send]
or word [esi + 4], 0x10
mov ebp, dword [esp + 0x28]
push ebx
push dword [ebp + 0x108]
push dword [esp + edi*4 + 0x50]
call dword [esp + 0x38]
test eax, eax
jne 0x5413a3
mov eax, dword [esp + 0x34]
inc edi
mov ebx, dword [esp + 0x30]
cmp edi, dword [esp + 0x5c]
jb 0x5410e6
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x5410c5
mov esi, dword [esp + 0xf4]
mov dword [esp + 0x18], 0
test esi, esi
je 0x5412ae
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x38]
add edi, 4
add esi, 4
lea edi, [edi + ebx*8]
nop dword [eax]
movzx edx, word [esi]
mov al, dl
and al, 1
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 0x29
mov ebx, ecx
or ebx, 4
test dl, 2
cmove ebx, ecx
test dl, 4
je 0x541236
mov eax, dword [esi - 4]
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x2c], eax
push ecx
push 0x1008
push 0xffff
push eax
or ebx, 0x32
mov dword [esp + 0x28], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x541236
cmp dword [esp + 0x1c], 1
jne 0x541236
push eax
push eax
push eax
push dword [esp + 0x34]
call dword [sym.imp.WS2_32.dll_send]
push ebx
push dword [ebp + 0x108]
push dword [esi - 4]
call dword [esp + 0x38]
test eax, eax
jne 0x5413a3
mov eax, dword [esi - 4]
mov dword [edi - 4], eax
xor eax, eax
mov word [edi], ax
test byte [esi], 1
je 0x541264
mov eax, 0x300
mov word [edi], ax
test byte [esi], 2
movzx ecx, ax
je 0x541277
or eax, 0x400
mov word [edi], ax
movzx ecx, ax
test byte [esi], 4
je 0x541282
or ecx, 0x10
mov word [edi], cx
mov eax, dword [esp + 0x18]
add edi, 8
mov ebx, dword [esp + 0x30]
inc eax
inc ebx
mov dword [esp + 0x18], eax
add esi, 8
mov dword [esp + 0x30], ebx
cmp eax, dword [esp + 0xf4]
jb 0x5411d0
mov esi, dword [esp + 0xf4]
test ebx, ebx
jne 0x5413c1
cmp byte [esp + 0x104], bl
je 0x541513
mov ebx, dword [esp + 0x20]
xor edi, edi
push 0
push dword [esp + 0xfc]
lea eax, [ebp + 0x108]
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov edx, dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], edx
test esi, esi
je 0x541483
mov ecx, dword [esp + 0x3c]
lea ecx, [ecx*8 + 6]
add ecx, ebx
mov dword [esp + 0x1c], ecx
nop dword [eax]
movsx ebx, word [ecx]
xor esi, esi
mov ecx, dword [esp + 0x38]
shl eax, 3
mov dword [esp + 0x44], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x68], esi
mov eax, dword [eax + ecx]
lea ecx, [esp + 0x68]
push ecx
push esi
push eax
mov dword [esp + 0x40], eax
call edx
test eax, eax
jne 0x5413f6
mov ecx, dword [esp + 0x68]
mov eax, esi
test cl, 0x29
mov ebx, ecx
setne al
movzx edx, ax
mov eax, edx
or eax, 4
test bl, 0x32
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
test bl, 4
movzx ecx, ax
mov eax, edx
cmove ecx, eax
cmp dword [esp + 0x40], 0
movzx eax, cx
mov esi, eax
je 0x5413f2
test edi, edi
jne 0x5413f2
test ebx, ebx
je 0x5413f2
inc dword [esp + 0x24]
push edi
push dword [ebp + 0x108]
push dword [esp + 0x3c]
call dword [esp + 0x38]
movzx eax, si
jmp 0x541451
cmp byte [esp + 0x13], 0
je 0x5413b7
push dword [esp + 0x20]
call dword [0x68f06c]
add esp, 4
mov eax, 4
jmp 0x541081
push 0
push 0
push ebx
mov ebx, dword [esp + 0x2c]
push ebx
call fcn.00573ed0
mov edi, eax
add esp, 0x10
test edi, edi
jns 0x5413e3
mov eax, 0xc
jmp 0x541081
jle 0x5412c9
mov dword [esp + 0x24], edi
jmp 0x5412e3
mov ebx, dword [esp + 0x18]
push 0
push dword [ebp + 0x108]
push dword [esp + 0x3c]
call dword [esp + 0x38]
test edi, edi
jne 0x54140f
movzx eax, si
jmp 0x541451
mov eax, esi
or eax, 1
test ebx, 0x300
movzx ecx, ax
movzx eax, si
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 4
test bl, 0x10
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
test dword [esp + 0x18], 0x400
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx eax, cx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x38]
mov word [ecx + edx + 6], ax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
inc eax
mov edx, dword [esp + 0x14]
add ecx, 8
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], ecx
cmp eax, dword [esp + 0xf4]
jb 0x541310
cmp dword [esp + 0x3c], 0
je 0x541503
mov ebx, dword [ebp + 4]
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x541503
lea eax, [esp + 0x48]
push eax
push ebx
call fcn.0053f950
xor esi, esi
add esp, 8
cmp dword [esp + 0x5c], esi
jbe 0x5414f8
mov ebx, dword [esp + 0x14]
nop
lea eax, [esp + 0x68]
mov dword [esp + 0x68], 0
push eax
push 0
push dword [esp + esi*4 + 0x50]
call ebx
test eax, eax
jne 0x5414dd
cmp dword [esp + 0x40], eax
je 0x5414dd
test edi, edi
jne 0x5414dd
cmp dword [esp + 0x68], edi
je 0x5414dd
inc dword [esp + 0x24]
push 0
push dword [ebp + 0x108]
push dword [esp + esi*4 + 0x50]
call dword [esp + 0x38]
inc esi
cmp esi, dword [esp + 0x5c]
jb 0x5414b0
mov ebx, dword [esp + 0x1c]
mov ebx, dword [ebx + 0x10]
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x541495
push dword [ebp + 0x108]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov ebx, dword [esp + 0x30]
cmp byte [esp + 0x13], 0
je 0x541527
push dword [esp + 0x20]
call dword [0x68f06c]
add esp, 4
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x541535
mov eax, dword [esp + 0x24]
mov dword [ecx], eax
cmp byte [esp + 0x100], 0
je 0x541597
test ebx, ebx
jne 0x541597
cmp byte [esp + 0x104], bl
jne 0x541597
cmp dword [ebp], 0xbab1e
mov dword [esp + 0x14], ebx
jne 0x541597
cmp byte [ebp + 0x117], bl
jne 0x541597
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.00540e50
add esp, 8
test eax, eax
jne 0x541597
mov eax, dword [esp + 0x14]
test eax, eax
je 0x541597
mov ecx, dword [esp + 0xf8]
cmp eax, ecx
jg 0x54158a
test eax, eax
jns 0x54158c
mov eax, ecx
cdq
push edx
push eax
call fcn.00574380
add esp, 8
xor eax, eax
jmp 0x541081
mov ecx, dword [esp + 0xdc]
mov eax, 1
pop edi
pop ebp
xor ecx, esp
call fcn.005ab3d6
add esp, 0xd8
ret