Function at 0x4adf80
Capabilities:
Set socket configuration
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x6019e4]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
xor eax, eax
mov dword [esp + 0x18], edx
xor ebx, ebx
mov dword [esp + 0xc], eax
push edi
xor edi, edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc], edi
mov esi, ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
test edx, edx
jne 0x4ae0fb
lea ecx, [esp + 0xc]
call fcn.004ae8f0
mov dword [esp + 0x18], eax
cmp eax, dword [esi + 0x6c]
jne 0x4ae036
mov edi, dword [esp + 0xc]
test edi, edi
jne 0x4adfe2
cmp dword [esi + 0x68], ebx
jmp 0x4ae034
mov ecx, dword [esi + 0x68]
test ecx, ecx
je 0x4ae036
mov edx, eax
shl edx, 4
sub edx, 4
jb 0x4ae004
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x4ae009
add edi, 4
add ecx, 4
sub edx, 4
jae 0x4adff3
cmp edx, 0xfffffffc
je 0x4ae03b
mov al, byte [edi]
cmp al, byte [ecx]
jne 0x4ae036
cmp edx, 0xfffffffd
je 0x4ae03b
mov al, byte [edi + 1]
cmp al, byte [ecx + 1]
jne 0x4ae036
cmp edx, 0xfffffffe
je 0x4ae03b
mov al, byte [edi + 2]
cmp al, byte [ecx + 2]
jne 0x4ae036
cmp edx, 0xffffffff
je 0x4ae03b
mov al, byte [edi + 3]
cmp al, byte [ecx + 3]
je 0x4ae03b
mov ebx, 1
cmp dword [esi + 0x1c], 0
je 0x4ae0c9
lea ecx, [esp + 0x10]
call fcn.004aea70
mov edx, eax
mov dword [esp + 0x14], edx
cmp edx, dword [esi + 0x74]
jne 0x4ae0fb
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4ae0c3
mov ecx, dword [esi + 0x70]
test ecx, ecx
je 0x4ae0fb
lea edi, [edx*4]
mov edx, eax
sub edi, 4
jb 0x4ae091
nop
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x4ae096
add edx, 4
add ecx, 4
sub edi, 4
jae 0x4ae080
cmp edi, 0xfffffffc
je 0x4ae0c9
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x4ae0fb
cmp edi, 0xfffffffd
je 0x4ae0c9
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x4ae0fb
cmp edi, 0xfffffffe
je 0x4ae0c9
mov al, byte [edx + 2]
cmp al, byte [ecx + 2]
jne 0x4ae0fb
cmp edi, 0xffffffff
je 0x4ae0c9
mov al, byte [edx + 3]
cmp al, byte [ecx + 3]
jmp 0x4ae0c7
cmp dword [esi + 0x70], 0
jne 0x4ae0fb
test ebx, ebx
jne 0x4ae0fb
mov ecx, dword [esp + 0xc]
push ecx
call fcn.0058c812
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call fcn.0058c812
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x68]
test eax, eax
je 0x4ae112
push eax
call fcn.0058c812
add esp, 4
mov dword [esi + 0x68], 0
mov eax, dword [esi + 0x70]
test eax, eax
je 0x4ae129
push eax
call fcn.0058c812
add esp, 4
mov dword [esi + 0x70], 0
cmp dword [esi + 0x20], 0
je 0x4ae170
xor edi, edi
cmp dword [esi + 0x6c], edi
jle 0x4ae15e
mov eax, dword [esi + 0x20]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x4ae158
mov ecx, dword [esi + 0xc]
cmp dword [ecx], 0
jne 0x4ae158
push eax
push 0
mov edx, fcn.004af320
call fcn.004af160
add esp, 8
inc edi
cmp edi, dword [esi + 0x6c]
jl 0x4ae136
push dword [esi + 0x20]
call fcn.0058c812
add esp, 4
mov dword [esi + 0x20], 0
cmp dword [esp + 0x1c], 0
jne 0x4ae0e7
movzx eax, word [esi + 0x34]
mov ebx, dword [sym.imp.WS2_32.dll_htons]
push eax
call ebx
movzx eax, word [esi + 0x34]
push eax
call ebx
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4ae2fe
cmp word [esi + 0x3c], 0
je 0x4ae2f5
mov eax, dword [esp + 0x18]
mov dword [esi + 0x6c], eax
mov dword [esi + 0x68], ecx
test eax, eax
jle 0x4ae2fe
shl eax, 2
push eax
call fcn.0058db11
add esp, 4
mov dword [esi + 0x20], eax
test eax, eax
je 0x4ae39d
xor ebx, ebx
cmp dword [esi + 0x6c], ebx
jle 0x4ae2fe
xor edi, edi
nop dword [eax]
movzx eax, word [esi + 0x34]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esi + 0x68]
xor edx, edx
push esi
push 0
push 0x4adef0
mov word [edi + ecx + 2], ax
mov eax, dword [esi + 0x68]
mov ecx, dword [esi + 0xc]
add eax, edi
push 1
push eax
call fcn.004acca0
mov ecx, dword [esi + 0x20]
add esp, 0x14
mov dword [ecx + ebx*4], eax
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + ebx*4]
test ecx, ecx
je 0x4ae2e6
mov eax, dword [esi + 0x68]
lea edx, [esi + 0x3c]
add eax, edi
push eax
call fcn.004acea0
mov ecx, dword [esi + 0x68]
add esp, 4
add ecx, edi
mov edx, 0x1c
mov eax, 0x10
cmp word [ecx], 0x17
cmove eax, edx
push eax
mov eax, dword [esi + 0x20]
push ecx
mov ecx, dword [eax + ebx*4]
add ecx, 0x54
call fcn.00401000
mov eax, dword [esi + 0x20]
add esp, 8
mov eax, dword [eax + ebx*4]
push 4
mov ecx, dword [eax + 0x2c]
lea eax, [esi + 0x2c]
push eax
push 0xa
push 0
push ecx
mov dword [esp + 0x20], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4ae42a
push 4
lea eax, [esi + 0x30]
push eax
push 0xb
push 0
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4ae403
push 4
lea eax, [esi + 0x30]
push eax
push 0xb
push 0
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
test eax, eax
jne 0x4ae3de
mov eax, dword [esi + 0x68]
xor ecx, ecx
push ecx
mov word [edi + eax + 2], cx
lea eax, [esp + 0x28]
push eax
push ecx
push ecx
push 4
lea eax, [esp + 0x3c]
push eax
push 0x9800000c
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
inc ebx
add edi, 0x10
cmp ebx, dword [esi + 0x6c]
jl 0x4ae1e0
jmp 0x4ae2fe
push ecx
call fcn.0058c812
add esp, 4
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test edx, edx
je 0x4ae379
test eax, eax
je 0x4ae386
cmp word [esi + 0x4c], 0
je 0x4ae379
cmp dword [esi + 0x1c], 0
je 0x4ae379
xor ecx, ecx
mov dword [esi + 0x74], edx
mov dword [esi + 0x70], eax
mov dword [esp + 0x14], ecx
test edx, edx
jle 0x4ae386
lea edx, [esi + 0x54]
nop
mov eax, dword [esi + 0x70]
push 0x10
push edx
mov edx, 0x10
mov edi, dword [eax + ecx*4]
lea ecx, [esp + 0x30]
mov eax, dword [esi + 0x1c]
mov ebx, dword [eax + 0x2c]
call fcn.004acb20
add esp, 8
mov dword [esp + 0x38], edi
lea eax, [esp + 0x28]
push 0x14
push eax
push 0xc
push 0x29
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esp + 0x14]
lea edx, [esi + 0x54]
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, dword [esi + 0x74]
jl 0x4ae330
jmp 0x4ae386
test eax, eax
je 0x4ae386
push eax
call fcn.0058c812
add esp, 4
mov ecx, dword [esp + 0x3c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x9c
mov edx, 0x623ca4
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0x9c
push 0x623cc8
push 0x623cec
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xab
mov edx, 0x623d58
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0xfd
call fcn.005885bd
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xaa
mov edx, 0x623d34
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0xfd
call fcn.005885bd
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xa9
mov edx, 0x623d10
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0xfd
call fcn.005885bd
int3