Function at 0x415240
Capabilities:
Create tcp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ca73e
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x4f600c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], 0
mov byte [ebp - 0x64], 0
movups xmm1, xmmword [edi + 0x40]
mov eax, dword [edi + 0x58]
movq xmm0, qword [edi + 0x50]
movups xmmword [ebp - 0x4c], xmm1
mov dword [ebp - 0x34], eax
movq qword [ebp - 0x3c], xmm0
mov dword [ebp - 4], 0
movaps xmm0, xmm1
mov eax, dword [ebx + 0x69c]
mov dword [ebp - 0x6c], eax
pextrw eax, xmm1, 1
psrldq xmm0, 4
mov byte [ebp - 0x65], 0
movd dword [ebp - 0x74], xmm0
movzx eax, ax
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x4c]
push eax
push edi
mov dword [edi + 0x10], 1
call fcn.00416350
test al, al
je 0x4152f5
push str.127.0.0.1
mov dword [edi + 0x10], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x6c], eax
jmp 0x4153b6
lea eax, [ebp - 0x65]
push eax
lea eax, [ebp - 0x4c]
push eax
push ecx
mov ecx, ebx
call fcn.00416660
test al, al
je 0x415325
xor eax, eax
cmp byte [ebp - 0x65], al
setne al
add eax, 3
mov dword [edi + 0x10], eax
mov eax, dword [ebx + 0x69c]
mov dword [ebp - 0x6c], eax
jmp 0x4153b6
cmp dword [edi + 0xc], 2
jne 0x415392
push dword [ebp - 0x70]
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push dword [ebp - 0x74]
lea ecx, [ebx + 0x758]
movq qword [ebp - 0x20], xmm0
push eax
call fcn.004472d0
cmp dword [ebp - 0x20], 0
sete al
xor al, 1
je 0x415366
lea eax, [ebp - 0x20]
mov dword [edi + 0x10], 0
push eax
lea ecx, [edi + 0x78]
call fcn.00412820
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x415392
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x415392
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x415392
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [ebp - 0x66]
mov byte [ebp - 0x66], 0
push eax
push dword [ebp - 0x70]
lea ecx, [ebx + 0x758]
push dword [ebp - 0x74]
call fcn.00435d70
test al, al
je 0x4153b6
mov dword [edi + 0x10], 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x70], esi
cmp esi, 0xffffffff
je 0x415594
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp - 0x6c]
push 4
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 0x1f
push 0
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x41558d
mov dword [ebp - 0x6c], esi
test esi, esi
je 0x415594
mov eax, dword [edi + 0x10]
cmp eax, 1
je 0x415413
cmp eax, 4
jne 0x4154f0
cmp byte [ebx + 0xcd8], 0
mov eax, dword [ebx + 0x9d8]
mov dword [ebp - 0x80], eax
movzx eax, word [ebx + 0x9d6]
mov dword [ebp - 0x74], eax
je 0x415493
cmp dword [edi + 0xc], 2
jne 0x415493
cmp dword [edi + 0x10], 1
jne 0x415493
movzx eax, word [edi + 0x42]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
lea ecx, [ebx + 0xcdc]
push eax
push dword [edi + 0x44]
call fcn.00424e60
mov dword [ebp - 0x18], eax
test eax, eax
je 0x415493
mov dword [ebp - 0x78], 0
call fcn.0044e850
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0x74]
lea eax, [ebp - 0x4c]
push dword [ebp - 0x18]
push eax
push esi
push dword [edi + 0xc]
push ecx
mov ecx, ebx
call fcn.004155c0
mov esi, eax
call fcn.0044e850
test esi, esi
je 0x4154c4
mov esi, dword [ebp - 0x70]
mov dword [ebp - 0x7c], 0
call fcn.0044e850
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x74]
lea eax, [ebp - 0x4c]
push dword [ebp - 0x80]
push eax
push esi
push dword [edi + 0xc]
push ecx
mov ecx, ebx
call fcn.004155c0
mov esi, eax
call fcn.0044e850
test esi, esi
jne 0x4154ca
mov byte [edi + 8], 1
jmp 0x415510
push dword [ebp - 0x70]
mov byte [edi + 8], 0
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebx + 0x69c]
call fcn.0044b530
add esp, 4
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x415594
call fcn.0044e850
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x6c]
push eax
sub esp, 8
call fcn.00415ab0
mov bl, al
call fcn.0044e850
test bl, bl
je 0x415586
mov esi, dword [ebp - 0x6c]
lea eax, [ebp - 0x24]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
push eax
push 0x1002
push 0xffff
push esi
mov dword [ebp - 0x24], 0x1400000
mov dword [ebp - 0x28], 0x1400000
call edi
push 4
lea eax, [ebp - 0x28]
push eax
push 0x1001
push 0xffff
push esi
call edi
mov edi, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x2c]
push eax
push 0x8004667e
push esi
mov dword [ebp - 0x2c], 1
call edi
test eax, eax
js 0x415589
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 1
push eax
push 0x8004667e
push esi
call edi
cmp eax, 0xffffffff
je 0x415589
mov eax, esi
jmp 0x415596
mov esi, dword [ebp - 0x6c]
test esi, esi
je 0x415594
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00467552
mov esp, ebp
pop ebp
ret 4