Function at 0x40a9c0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x32c
mov dword [0x438050], 0
push ebx
push esi
mov esi, dword [esp + 0x338]
push edi
push ebp
cmp esi, 0xffffffff
jne 0x40aa1b
lea eax, [esp + 0x3c]
push 0x100
push eax
mov ecx, dword [0x438580]
push 0x3767
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x3c]
push ecx
push str.___s
call fcn.0040cf50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x32c
ret
cmp dword [0x42f7e0], 0
jne 0x40af5d
cmp dword [0x43147c], 0
jne 0x40af5d
mov dword [0x42fcd0], 1
cmp dword [0x42f7fc], 0
mov edi, dword [esp + 0x348]
je 0x40aa8c
push edi
call fcn.0041f100
mov byte [str.IANS], 0x41
add esp, 4
test eax, eax
jne 0x40aa6a
mov byte [str.IANS], 0x49
mov bl, byte [str.IANS]
push 0
push 0x1fa4
mov eax, dword [0x42f7d0]
push 0x111
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push eax
call ebp
jmp 0x40aa93
mov bl, byte [esp + 0x34c]
cmp bl, byte [0x42f7c4]
je 0x40aac8
cmp bl, 0x4c
jne 0x40aab0
push str.TYPE_L_8
push esi
call fcn.00415e20
add esp, 8
jmp 0x40aac2
movsx eax, bl
push eax
push str.TYPE__c
push esi
call fcn.00415e20
add esp, 0xc
mov byte [0x42f7c4], bl
cmp dword [0x42f810], 1
mov ebp, dword [esp + 0x344]
jne 0x40aae2
cmp byte [ebp + 3], 0x52
jne 0x40aae2
mov byte [ebp + 3], 0x55
cmp dword [0x438020], 0
je 0x40aca4
mov eax, dword [0x42f864]
push eax
call fcn.00416630
add esp, 4
mov dword [0x42f868], eax
cmp eax, 0xffffffff
je 0x40aca4
lea eax, [esp + 0x10]
push 4
push eax
mov ecx, dword [0x42f868]
mov dword [esp + 0x18], 0x4000
push 0x1001
push 0xffff
push ecx
call sub.WSOCK32.dll_setsockopt
push ebp
push esi
call fcn.00415f60
mov dword [esp + 0x144], eax
add esp, 8
cmp eax, 5
jne 0x40ab76
cmp dword [0x438050], 0x1f4
jne 0x40ab76
cmp byte [ebp + 3], 0x55
jne 0x40ab76
cmp dword [0x42f810], 1
jne 0x40ab76
mov byte [ebp + 3], 0x52
push ebp
push esi
call fcn.00415f60
mov dword [esp + 0x144], eax
add esp, 8
cmp dword [esp + 0x13c], 1
jne 0x40ac79
sub bl, 0x49
mov ecx, dword [0x42f868]
cmp bl, 1
sbb eax, eax
neg eax
push eax
push edi
push ecx
call fcn.00409ed0
add esp, 0xc
mov eax, dword [0x42f868]
push eax
call fcn.00416080
add esp, 4
mov dword [0x42f868], eax
cmp eax, 0xffffffff
je 0x40abc5
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f868], eax
push esi
call fcn.0040b610
add esp, 4
mov ebx, eax
cmp ebx, 2
jne 0x40ac6c
test byte [0x43802c], 2
je 0x40ac6c
cmp dword [0x431350], 0
je 0x40ac6c
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0042b900
add esp, 8
cmp eax, 0xffffffff
je 0x40ac6c
cmp dword [0x42f330], 0
jne 0x40ac6c
lea eax, [esp + 0x34]
push eax
call fcn.00420990
add esp, 4
mov edx, dword [eax + 0x14]
add dx, 0x76c
mov ecx, dword [eax]
push edi
mov ebp, dword [eax + 4]
push ecx
mov edi, dword [eax + 8]
push ebp
mov ecx, dword [eax + 0xc]
push edi
mov eax, dword [eax + 0x10]
push ecx
inc eax
movzx ecx, dx
lea edx, [esp + 0x150]
push eax
push ecx
push str.MDTM__u_02u_02u_02u_02u_02u__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x160]
add esp, 0x24
push ecx
push esi
call fcn.00415f60
add esp, 8
cmp eax, 2
je 0x40ac6c
and dword [0x43802c], 0xfffffffd
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x32c
ret
cmp dword [esp + 0x13c], 5
jne 0x40ab9f
mov eax, dword [0x42f868]
push eax
call sub.WSOCK32.dll_closesocket
mov eax, dword [esp + 0x13c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x32c
ret
push esi
call fcn.004167f0
add esp, 4
mov dword [0x42f86c], eax
cmp eax, 0xffffffff
je 0x40af31
lea eax, [esp + 0x10]
push 4
push eax
mov ecx, dword [0x42f868]
mov dword [esp + 0x18], 0x4000
push 0x1001
push 0xffff
push ecx
call sub.WSOCK32.dll_setsockopt
push ebp
push esi
call fcn.00415f60
add esp, 8
cmp eax, 5
jne 0x40ad18
cmp dword [0x438050], 0x1f4
jne 0x40ad18
cmp byte [ebp + 3], 0x55
jne 0x40ad18
cmp dword [0x42f810], 1
jne 0x40ad18
mov byte [ebp + 3], 0x52
push ebp
push esi
call fcn.00415f60
add esp, 8
cmp eax, 1
jne 0x40af05
push 0x14
mov eax, dword [0x437824]
push eax
call fcn.00410bd0
lea eax, [esp + 0x1c]
mov ecx, dword [0x42f86c]
mov dword [esp + 0x1c], 0x10
add esp, 8
push eax
push 0x437830
push ecx
call sub.WSOCK32.dll_accept
push 0x14
mov ecx, dword [0x437824]
push ecx
mov ebp, dword [sym.imp.USER32.dll_KillTimer]
mov dword [0x42f868], eax
call ebp
cmp dword [0x42f868], 0xffffffff
jne 0x40adbf
lea eax, [esp + 0x3c]
push 0x100
push eax
mov ecx, dword [0x438580]
push 0x36b3
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
call sub.WSOCK32.dll_WSAGetLastError
lea ecx, [esp + 0x3c]
push eax
push ecx
call fcn.0041a860
add esp, 8
mov eax, dword [0x42f86c]
xor ebx, ebx
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f86c], eax
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x32c
ret
mov eax, dword [0x42f86c]
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f86c], eax
mov ax, word [0x437832]
push eax
call sub.WSOCK32.dll_ntohs
movzx eax, ax
push eax
mov ecx, dword [0x437834]
push ecx
call sub.WSOCK32.dll_inet_ntoa
push eax
mov ecx, dword [0x42f868]
push ecx
sub bl, 0x49
push str.__u__accept_from__s_port__u
call fcn.0040cf50
add esp, 0x10
mov ecx, dword [0x42f868]
cmp bl, 1
sbb eax, eax
neg eax
push eax
push edi
push ecx
call fcn.00409ed0
add esp, 0xc
mov ecx, dword [0x42f868]
push ecx
call fcn.00416080
add esp, 4
mov dword [0x42f868], eax
cmp eax, 0xffffffff
je 0x40ae45
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f868], eax
push esi
call fcn.0040b610
add esp, 4
mov ebx, eax
cmp ebx, 2
jne 0x40af50
test byte [0x43802c], 2
je 0x40af50
cmp dword [0x431350], 0
je 0x40af50
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0042b900
add esp, 8
cmp eax, 0xffffffff
je 0x40af50
cmp dword [0x42f330], 0
jne 0x40af50
lea eax, [esp + 0x34]
push eax
call fcn.00420990
add esp, 4
mov edx, dword [eax + 0x14]
add dx, 0x76c
mov ecx, dword [eax]
push edi
mov ebp, dword [eax + 4]
push ecx
mov edi, dword [eax + 8]
push ebp
mov ecx, dword [eax + 0xc]
push edi
mov eax, dword [eax + 0x10]
push ecx
inc eax
movzx ecx, dx
lea edx, [esp + 0x150]
push eax
push ecx
push str.MDTM__u_02u_02u_02u_02u_02u__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x160]
add esp, 0x24
push ecx
push esi
call fcn.00415f60
add esp, 8
cmp eax, 2
je 0x40af50
mov eax, ebx
pop ebp
and dword [0x43802c], 0xfffffffd
pop edi
pop esi
pop ebx
add esp, 0x32c
ret
mov eax, dword [0x42f86c]
xor ebx, ebx
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f86c], eax
push 0x10
call fcn.0040bb30
add esp, 4
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x32c
ret
mov eax, dword [0x42f86c]
xor ebx, ebx
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f86c], eax
push 0x10
call fcn.0040bb30
add esp, 4
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x32c
ret
lea eax, [esp + 0x3c]
push 0x100
push eax
mov ecx, dword [0x438580]
push 0x36c0
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x3c]
push ecx
push str.___s
call fcn.0040cf50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x32c
ret