Function at 0x41fa50
Capabilities:
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c19dd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x501040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x70], edi
mov esi, dword [ebx + 8]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0xf
movq xmm0, qword [esi + 0x50]
movups xmm1, xmmword [esi + 0x40]
mov eax, dword [esi + 0x58]
movq qword [ebp - 0x34], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0x5c], xmm0
mov dword [ebp - 0x2c], eax
movups xmmword [ebp - 0x44], xmm1
mov byte [ebp - 0x5c], 0
mov dword [ebp - 4], 0
movaps xmm0, xmm1
mov eax, dword [edi + 0x6b4]
mov dword [ebp - 0x68], eax
movd eax, xmm1
psrldq xmm0, 4
mov byte [ebp - 0x5d], 0
shr eax, 0x10
push eax
movd dword [ebp - 0x64], xmm0
mov dword [ebp - 0x6c], eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
cmp eax, 0x50
je 0x41fb0f
mov ecx, 0x1bb
cmp ax, cx
je 0x41fb0f
xor cl, cl
jmp 0x41fb11
mov cl, 1
mov eax, dword [esi + 0x14c]
mov dword [esi + 0x10], 0
cmp eax, 3
je 0x41fd08
cmp eax, 2
je 0x41fe30
test eax, eax
jne 0x41fb40
cmp byte [edi + 0x860], al
jne 0x41fe30
cmp eax, 1
jne 0x41fd08
test cl, cl
jne 0x41fb6c
push ecx
push dword [ebp - 0x6c]
lea ecx, [edi + 0x774]
push dword [ebp - 0x64]
call fcn.00444ed0
test al, al
jne 0x41fd08
jmp 0x41fd01
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00420f80
test al, al
jne 0x41fe48
lea eax, [ebp - 0x5d]
push eax
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00421250
test al, al
je 0x41fba7
xor eax, eax
cmp byte [ebp - 0x5d], al
setne al
add eax, 3
mov dword [esi + 0x10], eax
jmp 0x41fd08
push ecx
push dword [ebp - 0x6c]
lea ecx, [edi + 0x774]
push dword [ebp - 0x64]
call fcn.00444ed0
test al, al
jne 0x41fd08
cmp dword [esi + 0xc], 2
mov byte [ebp - 0x5d], al
jne 0x41fc6e
push dword [ebp - 0x6c]
lea eax, [ebp - 0x1c]
xorps xmm0, xmm0
push dword [ebp - 0x64]
lea ecx, [edi + 0x774]
movlpd qword [ebp - 0x1c], xmm0
push eax
call fcn.00452b10
mov edx, dword [ebp - 0x1c]
or eax, 0xffffffff
mov ecx, dword [ebp - 0x18]
test edx, edx
je 0x41fc42
mov byte [ebp - 0x5d], 1
mov dword [esi + 0x10], 0
test ecx, ecx
je 0x41fc0b
lock inc dword [ecx + 4]
mov dword [esi + 0x78], edx
mov edx, dword [esi + 0x7c]
mov dword [ebp - 0x6c], edx
mov dword [esi + 0x7c], ecx
test edx, edx
je 0x41fc42
lock xadd dword [edx + 4], eax
jne 0x41fc3f
mov eax, dword [edx]
mov ecx, edx
call dword [eax]
mov ecx, dword [ebp - 0x6c]
or edx, 0xffffffff
mov eax, edx
lock xadd dword [ecx + 8], eax
jne 0x41fc3c
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
or eax, 0xffffffff
test ecx, ecx
je 0x41fc64
lock xadd dword [ecx + 4], eax
jne 0x41fc64
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x18]
or edx, 0xffffffff
lock xadd dword [ecx + 8], edx
dec edx
jne 0x41fc64
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x5d], 0
jne 0x41fd08
mov ecx, dword [edi + 0x824]
mov edx, ecx
mov eax, dword [ecx + 4]
mov cl, byte [eax + 0xd]
mov byte [ebp - 0x5d], cl
test cl, cl
jne 0x41fc8f
mov ecx, eax
mov edx, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x41fc85
cmp byte [edx + 0xd], 0
jne 0x41fc9b
cmp dword [edx + 0x10], 0
jbe 0x41fd01
cmp byte [ebp - 0x5d], 0
mov edx, dword [edi + 0x824]
mov ecx, edx
jne 0x41fcca
mov edx, dword [edi + 0x850]
nop
cmp dword [eax + 0x10], edx
jae 0x41fcba
mov eax, dword [eax + 8]
jmp 0x41fcbe
mov ecx, eax
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x41fcb0
mov edx, dword [edi + 0x824]
cmp byte [ecx + 0xd], 0
jne 0x41fcee
mov eax, dword [edi + 0x850]
cmp eax, dword [ecx + 0x10]
jb 0x41fcee
cmp ecx, edx
je 0x41fcee
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x41fd01
cmp eax, dword [edi + 0x854]
je 0x41fd01
push ecx
push dword [ebp - 0x64]
lea ecx, [edi + 0x774]
call fcn.00445400
test al, al
je 0x41fd08
mov dword [esi + 0x10], 1
cmp dword [esi + 0x10], 0
jne 0x41fd3d
cmp dword [esi + 0x14c], 0
jne 0x41fd3d
cmp dword [edi + 0x770], 3
jne 0x41fd3d
push ecx
push dword [ebp - 0x42]
lea ecx, [edi + 0x774]
push dword [ebp - 0x40]
call fcn.00444ed0
test al, al
jne 0x41fd3d
mov dword [esi + 0x10], 1
push dword [ebp - 0x68]
call fcn.004571b0
mov edi, eax
add esp, 4
mov dword [ebp - 0x64], edi
test edi, edi
je 0x41ff5a
mov eax, dword [esi + 0x10]
cmp eax, 1
je 0x41fd66
cmp eax, 4
jne 0x41feb6
mov eax, dword [ebp - 0x70]
mov ecx, dword [eax + 0xccc]
cmp byte [eax + 0xfc8], 0
mov edi, dword [ebp - 0x64]
mov dword [ebp - 0x74], ecx
movzx ecx, word [eax + 0xcca]
mov dword [ebp - 0x6c], ecx
je 0x41fdf1
cmp dword [esi + 0xc], 2
jne 0x41fdf1
cmp dword [esi + 0x10], 1
jne 0x41fdf1
movzx eax, word [esi + 0x42]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp - 0x70]
movzx eax, ax
add ecx, 0xfcc
push eax
push dword [esi + 0x44]
call fcn.0042fa20
mov dword [ebp - 0x64], eax
test eax, eax
je 0x41fdf1
mov dword [ebp - 0x68], 0
call fcn.0045a070
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x6c]
lea eax, [ebp - 0x44]
push dword [ebp - 0x64]
push eax
push edi
push dword [esi + 0xc]
push ecx
mov ecx, dword [ebp - 0x70]
call fcn.0041ff80
mov dword [ebp - 0x68], eax
call fcn.0045a070
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x41fe27
mov dword [ebp - 0x68], 0
call fcn.0045a070
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x6c]
lea eax, [ebp - 0x44]
push dword [ebp - 0x74]
push eax
push edi
push dword [esi + 0xc]
push ecx
mov ecx, dword [ebp - 0x70]
call fcn.0041ff80
mov dword [ebp - 0x68], eax
call fcn.0045a070
mov eax, dword [ebp - 0x68]
test eax, eax
jne 0x41fe8d
mov byte [esi + 8], 1
jmp 0x41fedc
test cl, cl
je 0x41fd08
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00420f80
test al, al
je 0x41fe62
push str.127.0.0.1
mov dword [esi + 0x10], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x68], eax
jmp 0x41fd08
lea eax, [ebp - 0x5d]
push eax
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00421250
test al, al
je 0x41fcee
xor eax, eax
cmp byte [ebp - 0x5d], al
setne al
add eax, 3
mov dword [esi + 0x10], eax
jmp 0x41fd08
push edi
mov byte [esi + 8], 0
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x70]
push dword [eax + 0x6b4]
call fcn.004571b0
mov edi, eax
add esp, 4
mov dword [ebp - 0x64], edi
test edi, edi
je 0x41ff5a
call fcn.0045a070
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x64]
push eax
sub esp, 8
call fcn.004203e0
mov byte [ebp - 0x5d], al
call fcn.0045a070
cmp byte [ebp - 0x5d], 0
mov edi, dword [ebp - 0x64]
je 0x41ff4f
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0x20]
push 4
push eax
push 0x1002
push 0xffff
push edi
mov dword [ebp - 0x20], 0x1400000
mov dword [ebp - 0x24], 0x1400000
call esi
push 4
lea eax, [ebp - 0x24]
push eax
push 0x1001
push 0xffff
push edi
call esi
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x28]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x28], 1
call esi
test eax, eax
js 0x41ff4f
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 0x8004667e
push edi
call esi
cmp eax, 0xffffffff
je 0x41ff4f
mov eax, edi
jmp 0x41ff5c
test edi, edi
je 0x41ff5a
push edi
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
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4