Function at 0x40d4b0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4346de
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
push ebx
push esi
mov esi, ecx
mov eax, dword [esi]
push edi
call dword [eax + 0x28]
test al, al
jne 0x40d6c0
mov di, word [ebp + 8]
test di, di
jbe 0x40d6c0
cmp dword [esi + 0xc0a], 0xffffffff
mov ebx, dword [ebp + 0x14]
jne 0x40d52f
mov ecx, dword [ebp + 0xc]
push ebx
push 1
push ecx
mov ecx, 0x44c1c1
call fcn.00415300
cmp eax, 0xffffffff
mov dword [esi + 0xc0a], eax
je 0x40d6c0
push eax
mov ecx, 0x44c1c1
call fcn.00415630
test ax, ax
je 0x40d52f
mov dword [ebp + 0xc], eax
cmp word [esi + 7], 0
jne 0x40d602
cmp word [esi + 9], di
jbe 0x40d544
mov word [esi + 9], di
mov word [esi + 7], di
movzx edi, di
mov edx, edi
imul edx, edx, 0xc69
add edx, 4
push edx
call fcn.00424827
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
mov dword [esp + 0xbc], 0
je 0x40d591
push 0x403e40
push 0x403de0
push edi
lea ebx, [eax + 4]
push 0xc69
push ebx
mov dword [eax], edi
call fcn.00425188
mov eax, ebx
jmp 0x40d593
xor eax, eax
xor ebx, ebx
cmp word [esi + 7], bx
mov dword [esp + 0xbc], 0xffffffff
mov dword [esi + 0x334], eax
jbe 0x40d5f4
xor edi, edi
mov edi, edi
mov eax, dword [esi + 0x334]
mov byte [edi + eax], 0
fld qword [esi + 0xc1e]
movzx ecx, word [esi + 0xc28]
movzx edx, word [esi + 0xc26]
mov eax, dword [esi + 0x334]
push ecx
push edx
sub esp, 8
lea ecx, [eax + edi + 0xd]
fstp qword [esp]
call fcn.0040dba0
movzx ecx, word [esi + 7]
inc ebx
add edi, 0xc69
cmp ebx, ecx
jb 0x40d5b0
lea ecx, [esi + 0x338]
call fcn.00415790
mov ebx, dword [ebp + 0x14]
mov al, byte [esi + 4]
test al, al
je 0x40d701
mov edx, dword [ebp + 0x10]
xor eax, eax
mov ecx, 0x100
lea edi, [esi + 0x3d1]
rep stosd dword es:[edi], eax
xor edi, edi
mov ecx, esi
mov dword [esi + 0x7e5], edi
mov dword [esi + 0x7e1], edi
mov dword [esi + 0x7dd], edi
mov dword [esi + 0x7d9], edi
mov byte [esi + 0x35c], 0
mov byte [esi + 4], 0
mov dword [esi + 0xc06], edx
call fcn.00406040
lea eax, [esp + 0x10]
push eax
mov ecx, 0x44c1c1
call fcn.004155b0
cmp ebx, edi
mov cx, word [ebp + 0xc]
mov word [esi + 0x231], cx
je 0x40d677
cmp byte [ebx], 0
je 0x40d677
push ebx
jmp 0x40d67c
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [esi + 0x22d], eax
mov al, byte [esi + 5]
test al, al
jne 0x40d701
lea eax, [esp + 0xc]
push eax
push edi
push esi
push 0x40d410
push 0x200000
push edi
mov dword [esp + 0x24], edi
call fcn.00426056
add esp, 0x18
cmp eax, edi
mov dword [esi + 0x369], eax
jne 0x40d6d9
mov edx, dword [esi]
push edi
push edi
mov ecx, esi
call dword [edx + 0x24]
xor al, al
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esi + 5]
test al, al
mov dword [esi + 0x369], edi
jne 0x40d701
lea ecx, [ecx]
push 0xa
call fcn.0040d850
mov al, byte [esi + 5]
add esp, 4
test al, al
je 0x40d6f0
mov eax, dword [esi + 0x3b1]
xor edi, edi
test eax, eax
jbe 0x40d72a
lea ecx, [ecx]
mov eax, dword [esi + 0x3ad]
mov ecx, dword [eax + edi*4]
mov edx, dword [ecx]
push esi
call dword [edx + 8]
mov eax, dword [esi + 0x3b1]
inc edi
cmp edi, eax
jb 0x40d710
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10