Function at 0x41fa40
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 0x4c181d
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 0x41faff
mov ecx, 0x1bb
cmp ax, cx
je 0x41faff
xor cl, cl
jmp 0x41fb01
mov cl, 1
mov eax, dword [esi + 0x14c]
mov dword [esi + 0x10], 0
cmp eax, 3
je 0x41fcf8
cmp eax, 2
je 0x41fe20
test eax, eax
jne 0x41fb30
cmp byte [edi + 0x860], al
jne 0x41fe20
cmp eax, 1
jne 0x41fcf8
test cl, cl
jne 0x41fb5c
push ecx
push dword [ebp - 0x6c]
lea ecx, [edi + 0x774]
push dword [ebp - 0x64]
call fcn.00444e60
test al, al
jne 0x41fcf8
jmp 0x41fcf1
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00420f80
test al, al
jne 0x41fe38
lea eax, [ebp - 0x5d]
push eax
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00421250
test al, al
je 0x41fb97
xor eax, eax
cmp byte [ebp - 0x5d], al
setne al
add eax, 3
mov dword [esi + 0x10], eax
jmp 0x41fcf8
push ecx
push dword [ebp - 0x6c]
lea ecx, [edi + 0x774]
push dword [ebp - 0x64]
call fcn.00444e60
test al, al
jne 0x41fcf8
cmp dword [esi + 0xc], 2
mov byte [ebp - 0x5d], al
jne 0x41fc5e
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.00452ad0
mov edx, dword [ebp - 0x1c]
or eax, 0xffffffff
mov ecx, dword [ebp - 0x18]
test edx, edx
je 0x41fc32
mov byte [ebp - 0x5d], 1
mov dword [esi + 0x10], 0
test ecx, ecx
je 0x41fbfb
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 0x41fc32
lock xadd dword [edx + 4], eax
jne 0x41fc2f
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 0x41fc2c
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
or eax, 0xffffffff
test ecx, ecx
je 0x41fc54
lock xadd dword [ecx + 4], eax
jne 0x41fc54
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x18]
or edx, 0xffffffff
lock xadd dword [ecx + 8], edx
dec edx
jne 0x41fc54
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x5d], 0
jne 0x41fcf8
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 0x41fc7f
mov ecx, eax
mov edx, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x41fc75
cmp byte [edx + 0xd], 0
jne 0x41fc8b
cmp dword [edx + 0x10], 0
jbe 0x41fcf1
cmp byte [ebp - 0x5d], 0
mov edx, dword [edi + 0x824]
mov ecx, edx
jne 0x41fcba
mov edx, dword [edi + 0x850]
nop
cmp dword [eax + 0x10], edx
jae 0x41fcaa
mov eax, dword [eax + 8]
jmp 0x41fcae
mov ecx, eax
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x41fca0
mov edx, dword [edi + 0x824]
cmp byte [ecx + 0xd], 0
jne 0x41fcde
mov eax, dword [edi + 0x850]
cmp eax, dword [ecx + 0x10]
jb 0x41fcde
cmp ecx, edx
je 0x41fcde
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x41fcf1
cmp eax, dword [edi + 0x854]
je 0x41fcf1
push ecx
push dword [ebp - 0x64]
lea ecx, [edi + 0x774]
call fcn.00445390
test al, al
je 0x41fcf8
mov dword [esi + 0x10], 1
cmp dword [esi + 0x10], 0
jne 0x41fd2d
cmp dword [esi + 0x14c], 0
jne 0x41fd2d
cmp dword [edi + 0x770], 3
jne 0x41fd2d
push ecx
push dword [ebp - 0x42]
lea ecx, [edi + 0x774]
push dword [ebp - 0x40]
call fcn.00444e60
test al, al
jne 0x41fd2d
mov dword [esi + 0x10], 1
push dword [ebp - 0x68]
call fcn.00457170
mov edi, eax
add esp, 4
mov dword [ebp - 0x64], edi
test edi, edi
je 0x41ff4a
mov eax, dword [esi + 0x10]
cmp eax, 1
je 0x41fd56
cmp eax, 4
jne 0x41fea6
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 0x41fde1
cmp dword [esi + 0xc], 2
jne 0x41fde1
cmp dword [esi + 0x10], 1
jne 0x41fde1
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.0042fa10
mov dword [ebp - 0x64], eax
test eax, eax
je 0x41fde1
mov dword [ebp - 0x68], 0
call fcn.00459f00
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.00459f00
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x41fe17
mov dword [ebp - 0x68], 0
call fcn.00459f00
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.00459f00
mov eax, dword [ebp - 0x68]
test eax, eax
jne 0x41fe7d
mov byte [esi + 8], 1
jmp 0x41fecc
test cl, cl
je 0x41fcf8
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00420f80
test al, al
je 0x41fe52
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 0x41fcf8
lea eax, [ebp - 0x5d]
push eax
lea eax, [ebp - 0x44]
push eax
push ecx
mov ecx, edi
call fcn.00421250
test al, al
je 0x41fcde
xor eax, eax
cmp byte [ebp - 0x5d], al
setne al
add eax, 3
mov dword [esi + 0x10], eax
jmp 0x41fcf8
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.00457170
mov edi, eax
add esp, 4
mov dword [ebp - 0x64], edi
test edi, edi
je 0x41ff4a
call fcn.00459f00
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.00459f00
cmp byte [ebp - 0x5d], 0
mov edi, dword [ebp - 0x64]
je 0x41ff3f
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 0x41ff3f
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 0x8004667e
push edi
call esi
cmp eax, 0xffffffff
je 0x41ff3f
mov eax, edi
jmp 0x41ff4c
test edi, edi
je 0x41ff4a
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.0047299a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4