Function at 0x459940
Capabilities:
Create thread
Set socket configuration
Terminate thread

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
cmp dword [esi + 0x24c], ebp
jne 0x459b39
mov eax, dword [esi]
call dword [eax + 0x18]
mov edi, 1
mov ecx, esi
mov dword [esi + 0x24c], edi
mov dword [esi + 0x70], ebp
call fcn.00458e50
cmp dword [esi + 0x1c], ebp
jne 0x45998c
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [esi + 0x84], ecx
mov dword [esi + 0x88], edx
jmp 0x4599a4
mov ecx, dword [esi + 0x1a4]
lea eax, [esi + 0x17c]
mov dword [esi + 0x84], eax
mov dword [esi + 0x88], ecx
mov edx, dword [esp + 0x34]
mov ebx, dword [esi + 0x64]
lea eax, [esp + 0x14]
mov dword [esi + 0x64], edx
push eax
push ebp
push esi
push 0x459ba0
push ebp
push ebp
mov dword [esi + 0x80], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebp
mov dword [esi + 0x68], eax
je 0x459b22
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x80]
cmp eax, edi
jne 0x459a06
mov ecx, dword [esi + 0x250]
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004596f0
test eax, eax
je 0x459a78
cmp dword [esi + 0x80], edi
je 0x4599e7
mov ecx, dword [esi + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x80]
mov dword [esi + 0x68], ebp
cmp eax, 2
jne 0x459b22
cmp word [0x4dd23a], 0x200
mov edi, dword [esi + 0x6c]
jb 0x459a5f
lea ecx, [esp + 0x34]
push 4
push ecx
push 0x80
push 0xffff
push edi
mov word [esp + 0x48], 1
mov word [esp + 0x4a], 5
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x459a5f
call sub.WSOCK32.dll_WSAGetLastError
push 0x3f
push edi
mov ecx, esi
call sub.MFC42.DLL_CAsyncSocket::Attach
test eax, eax
jne 0x459a95
push edi
call sub.WSOCK32.dll_closesocket
jmp 0x459b22
mov eax, dword [esi + 0x68]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esi + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x68], ebp
jmp 0x459b22
cmp dword [esi + 0x1c], ebp
je 0x459b45
cmp dword [esi + 0x1a8], 4
jne 0x459af8
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push ecx
push edx
mov ecx, esi
call fcn.00458fa0
test eax, eax
jne 0x459b45
mov ecx, esi
call fcn.004595e0
test eax, eax
jne 0x459ad5
mov dword [esi + 0x8c], 0x27da
mov ecx, dword [esi + 0x8c]
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0x38]
mov dword [esi + 0x64], ebx
mov dword [esi + 0x24c], ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 0xc
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push edx
push eax
mov ecx, esi
call fcn.004590c0
test eax, eax
jne 0x459b45
mov ecx, esi
call fcn.004595e0
test eax, eax
jne 0x459b22
mov dword [esi + 0x8c], 0x27da
mov eax, dword [esi + 0x8c]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x38]
mov dword [esi + 0x64], ebx
mov dword [esi + 0x24c], ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 0xc
cmp dword [esi + 0x294], ebp
je 0x459b7d
mov ecx, dword [esp + 0x30]
mov edx, dword [esi + 0x298]
mov eax, dword [esi]
mov dword [esp + 0x20], ecx
push ebp
lea ecx, [esp + 0x1c]
push ebp
push ecx
mov ecx, esi
mov dword [esp + 0x24], 0x663
mov dword [esp + 0x28], 8
mov dword [esp + 0x30], edx
call dword [eax + 0x54]
mov dword [esi + 0x64], ebx
mov dword [esi + 0x24c], ebp
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret 0xc