Function at 0x409760
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54d70f
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x5a2740]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x54], ebx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x98], eax
xor eax, eax
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x8c], eax
cmp dword [ebx + 0xc98], eax
jle 0x409b0a
test eax, eax
js 0x409fa0
cmp eax, dword [ebx + 0xc84]
jge 0x409fa0
lea ecx, [eax*4]
mov eax, dword [ebx + 0xc80]
mov esi, dword [eax + ecx]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
lea edx, [esi - 4]
mov ecx, eax
jl 0x409800
cmp ecx, dword [esi - 0x10]
jne 0x409800
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x409839
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x409faf
mov ecx, dword [esi - 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esi - 0xc]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ecx*2 + 2]
push esi
push eax
lea eax, [edi + 0x10]
push eax
call fcn.005258c7
add esp, 0x10
lea esi, [edi + 0x10]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 4], 0
cmp dword [esi - 0xc], 0
jle 0x409f2e
push 0x20
push esi
call fcn.00527264
mov edi, eax
add esp, 8
test edi, edi
je 0x409f2e
sub edi, esi
sar edi, 1
cmp edi, 1
jl 0x409f2e
push edi
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00402d90
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
call fcn.0040a020
mov byte [ebp - 4], 2
mov edi, dword [ebp - 0x7c]
cmp dword [edi - 0xc], 0
jg 0x4098a5
or ebx, 0xffffffff
jmp 0x4098bf
push 0x28
push edi
call fcn.00527264
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4098bb
or ebx, 0xffffffff
jmp 0x4098bf
sub ebx, edi
sar ebx, 1
push 0x57f358
lea ecx, [ebp - 0x64]
call fcn.00402f80
mov byte [ebp - 4], 3
cmp ebx, 1
jge 0x409913
cmp dword [edi - 0xc], 0
jl 0x409b28
push 0x57f35c
push edi
call fcn.00525d44
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x409b28
sub ebx, edi
sar ebx, 1
cmp ebx, 1
jl 0x409b28
push 1
push 0x57f360
lea ecx, [ebp - 0x64]
call fcn.00402770
lea eax, [ebx - 1]
push eax
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x7c]
call fcn.00402d90
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 4
call fcn.0040a020
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x84]
test eax, eax
je 0x409f58
cmp dword [ebx - 0xc], 0
jl 0x409f58
push eax
push ebx
call fcn.00525d44
add esp, 8
test eax, eax
je 0x409f58
sub eax, ebx
sar eax, 1
js 0x409f58
push eax
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x84]
call fcn.00402d90
mov byte [ebp - 4], 6
mov esi, dword [ebp - 0x6c]
cmp dword [esi - 0xc], 0
jl 0x409a0a
push 0x57f364
push esi
call fcn.00525d44
add esp, 8
test eax, eax
je 0x409a0a
sub eax, esi
sar eax, 1
js 0x409a0a
add eax, 0xa
push eax
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040a020
push eax
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 7
call fcn.004026a0
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x94]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4099f1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x98]
push 1
push esi
call fcn.0040e5c0
test eax, eax
jne 0x409baf
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x88]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409a2e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
mov byte [ebp - 4], 4
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409a4c
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
mov byte [ebp - 4], 3
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409a6a
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x64]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409a8b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x70]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409aac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edi + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409aca
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x5c]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409aee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x8c]
inc eax
mov dword [ebp - 0x8c], eax
cmp eax, dword [ebx + 0xc98]
jl 0x4097b6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005255c5
mov esp, ebp
pop ebp
ret 8
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x64]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409b49
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x70]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409b6a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edi + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409b88
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409aee
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
jmp 0x409aeb
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x8c]
cmp edx, dword [eax + 0xc98]
jge 0x409fa0
mov eax, dword [eax + 0xc94]
lea ecx, [edx*4]
mov eax, dword [eax + ecx]
sub eax, 0x10
push eax
call fcn.00402630
mov dword [ebp - 0x9c], eax
add eax, 0x10
add esp, 4
mov dword [ebp - 0xa0], eax
push 0
push 0
push 0x40
lea ecx, [ebp - 0x50]
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
push eax
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x58]
xor edx, edx
mov ecx, dword [eax + 8]
mov edi, ecx
mov dword [ebp - 0x90], edi
test edi, edi
mov edi, dword [ebp - 0x88]
mov dword [ebp - 0x60], edx
jle 0x409e0d
nop
test edx, edx
js 0x409fa0
cmp edx, ecx
jge 0x409fa0
mov eax, dword [eax + 4]
lea ecx, [edx*4]
mov dword [ebp - 0x68], ecx
mov eax, dword [eax + ecx]
mov eax, dword [eax + 4]
test eax, eax
je 0x409c87
cmp dword [esi - 0xc], 0
jl 0x409c87
push eax
push esi
call fcn.00525d44
add esp, 8
test eax, eax
je 0x409c81
sub eax, esi
sar eax, 1
je 0x409cf0
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x58]
cmp edx, dword [eax + 8]
jge 0x409fa0
mov eax, dword [eax + 4]
add eax, ecx
mov dword [ebp - 0x78], eax
mov eax, dword [eax]
xor ecx, ecx
mov eax, dword [eax + 0x18]
test eax, eax
setne cl
test ecx, ecx
je 0x409fa5
mov ecx, edi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x409cd7
test dx, dx
je 0x409cd3
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x409cd7
add ecx, 4
add eax, 4
test dx, dx
jne 0x409cb1
xor eax, eax
jmp 0x409cdc
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
je 0x409cf0
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x80]
mov eax, dword [eax]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x60]
mov ecx, dword [eax + 8]
cmp edx, ecx
jge 0x409fa0
mov eax, dword [eax + 4]
add eax, dword [ebp - 0x68]
mov ebx, dword [ebp - 0x80]
mov eax, dword [eax]
cmp ebx, dword [eax + 0x10]
mov ebx, dword [ebp - 0x84]
mov eax, dword [ebp - 0x58]
je 0x409d2f
inc edx
mov dword [ebp - 0x60], edx
cmp edx, dword [ebp - 0x90]
jl 0x409c40
jmp 0x409e0d
cmp edx, dword [eax + 8]
jge 0x409fa0
mov eax, dword [eax + 4]
lea ecx, [edx*4]
mov dword [ebp - 0x68], ecx
mov eax, dword [eax + ecx]
add eax, 4
mov dword [ebp - 0x78], eax
test esi, esi
jne 0x409d56
xor ecx, ecx
jmp 0x409d72
mov ecx, esi
lea edx, [ecx + 2]
jmp 0x409d60
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409d60
mov eax, dword [ebp - 0x78]
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, eax
call fcn.00402770
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x60]
cmp eax, dword [edx + 8]
jge 0x409fa0
mov eax, dword [edx + 4]
add eax, dword [ebp - 0x68]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x5c]
add ecx, 0x14
mov edx, eax
mov dword [ebp - 0x74], ecx
lea ecx, [edx + 2]
mov dword [ebp - 0x78], ecx
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x409da3
sub edx, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x74]
sar edx, 1
push edx
push eax
call fcn.00402770
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x60]
cmp eax, dword [ecx + 8]
jge 0x409fa0
mov eax, dword [ecx + 4]
add eax, dword [ebp - 0x68]
mov eax, dword [eax]
add eax, 0x18
mov dword [ebp - 0x74], eax
test edi, edi
jne 0x409de2
xor ecx, ecx
jmp 0x409df9
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409de7
mov eax, dword [ebp - 0x74]
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, eax
call fcn.00402770
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x60]
jg 0x409e4a
push 0x1c
call fcn.0040ff5b
mov ecx, eax
add esp, 4
mov dword [ebp - 0x74], ecx
mov byte [ebp - 4], 9
test ecx, ecx
je 0x409e36
mov eax, dword [ebp - 0x5c]
push edi
push eax
push dword [ebp - 0x80]
push 0
push esi
call fcn.00407bb0
jmp 0x409e38
xor eax, eax
push eax
mov eax, dword [ebp - 0x58]
mov byte [ebp - 4], 8
push dword [eax + 8]
mov ecx, eax
call fcn.0050d8ba
mov edx, dword [ebp - 0x9c]
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409e6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409e89
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409ea7
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 3
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409ec5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x64]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409ee6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x70]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409f07
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x7c]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409f28
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x54]
mov esi, dword [ebp - 0x5c]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409af1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x409af1
add ebx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409f76
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x6c]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409b28
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x409b28
call fcn.0041201f
push 0x80004005
call fcn.004017c0
call fcn.004016c0
int3