Function at 0x100133a0
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1024bc57
push eax
mov dword fs:[0], esp
sub esp, 0xe8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x104]
push edi
push esi
xor ebp, ebp
xor edi, edi
call fcn.100130e0
test eax, eax
je 0x10013941
mov dword [esp + 0x10], 0xffffffff
lea ecx, [esp + 0x10]
mov dword [esp + 0x100], ebp
call fcn.1005e240
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x40]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x4c], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x10013914
mov eax, dword [0x102e2df8]
mov edx, dword [esp + 0x10]
push 0x10
push 0x2b66
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
je 0x1001395e
xor eax, eax
mov ecx, dword [0x102f7658]
mov ebx, dword [esi + 0x1c]
mov dword [esp + 0x24], eax
mov di, word [esi + 0x22]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], eax
mov ax, word [esi + 0x24]
test ecx, ecx
mov dword [esp + 0x20], ebp
mov word [esp + 0x30], ax
je 0x1001348a
and eax, 0xffff
push eax
push str.CRemapThread::ConnectSvr__ServerType:_d_
push str.RemapThread
push 1
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x14
cmp word [esi + 0x24], 5
jne 0x10013674
lea ecx, [esp + 0x54]
call fcn.1002cdd0
xor ecx, ecx
mov byte [esp + 0x100], 1
mov cx, word [esi + 0x26]
push ecx
lea ecx, [esp + 0x58]
call fcn.1002cee0
xor eax, eax
lea edx, [esp + 0x14]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x5c]
call fcn.1002d640
test eax, eax
je 0x10013604
mov ebx, dword [esp + 0x10c]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100135e9
cmp word [esp + 0x14], 0
je 0x100135e9
push 1
push 0x102e2e60
lea ecx, [esp + 0x3c]
call fcn.10091800
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x100], 2
push ecx
mov ecx, 0x102e2e80
call fcn.10014810
mov dword [eax], ebx
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x18]
call fcn.1005e290
cmp eax, 0xffffffff
jne 0x10013621
call ebp
cmp eax, 0x2733
je 0x10013621
mov eax, dword [0x102f7658]
test eax, eax
je 0x1001357c
mov esi, dword [esp + 0x10]
call ebp
push eax
push esi
push str.CRemapThread::ConnectSvr:_connect_called_failed__SOKCET__d___errno__d_
push str.RemapThread
push 1
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
mov ecx, dword [0x102e2e80]
test ecx, ecx
je 0x100135d8
mov esi, dword [esp + 0x10]
xor edx, edx
mov eax, esi
shr eax, 4
div dword [0x102e2e84]
mov eax, dword [ecx + edx*4]
test eax, eax
lea ecx, [ecx + edx*4]
je 0x100135d8
cmp dword [eax + 8], esi
je 0x100135b0
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x100135a1
jmp 0x100135d8
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [0x102e2e8c]
mov dword [eax], ecx
mov dword [0x102e2e8c], eax
mov eax, dword [0x102e2e88]
dec eax
mov dword [0x102e2e88], eax
jne 0x100135d8
mov ecx, 0x102e2e80
call fcn.100148f0
lea ecx, [esp + 0x34]
mov byte [esp + 0x100], 1
call fcn.10091860
lea edx, [esp + 0x14]
lea eax, [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x5c]
call fcn.1002d640
test eax, eax
jne 0x100134e8
call fcn.1002e110
lea ecx, [esp + 0x54]
mov byte [esp + 0x100], 0
call fcn.1002ce70
xor eax, eax
jmp 0x10013943
lea ecx, [esp + 0x34]
mov byte [esp + 0x100], 1
call fcn.10091860
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
and edi, 0xffff
and eax, 0xffff
lea ecx, [esp + 0x54]
mov ebp, 1
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov byte [esp + 0x100], 0
call fcn.1002ce70
jmp 0x1001379c
xor ecx, ecx
lea edx, [esp + 0x44]
mov dword [esp + 0x48], ecx
push edx
mov dword [esp + 0x50], ecx
push edi
mov dword [esp + 0x58], ecx
push ebx
mov ecx, 0x102e2e98
mov dword [esp + 0x50], 0
call fcn.10016110
test eax, eax
je 0x100136dc
mov eax, dword [esp + 0x44]
cmp eax, 0xffffffff
je 0x100136dc
mov ecx, edi
mov dword [esp + 0x28], ebx
and ecx, 0xffff
mov ebp, 1
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x4c]
cmp ecx, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x100136cc
mov edi, ecx
mov edx, edi
mov dword [esp + 0x20], eax
and edx, 0xffff
mov dword [esp + 0x24], edx
push 1
push 0x102e2e60
lea ecx, [esp + 0x3c]
call fcn.10091800
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push eax
mov ecx, 0x102e2e80
mov byte [esp + 0x108], 3
mov esi, eax
call fcn.10014950
test eax, eax
jne 0x1001375a
mov eax, dword [0x102e2e80]
test eax, eax
jne 0x1001372a
mov edx, dword [0x102e2e84]
push 1
push edx
mov ecx, 0x102e2e80
call fcn.10014a50
mov ecx, 0x102e2e80
call fcn.10014ac0
mov ecx, dword [esp + 0x14]
mov dword [eax + 8], esi
mov dword [eax + 4], ecx
mov edx, dword [0x102e2e80]
mov ecx, dword [esp + 0x14]
mov edx, dword [edx + ecx*4]
mov dword [eax], edx
mov ecx, dword [0x102e2e80]
mov edx, dword [esp + 0x14]
mov dword [ecx + edx*4], eax
mov ebx, dword [esp + 0x10c]
push edi
mov dword [eax + 0xc], ebx
mov eax, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x18]
call fcn.1005e290
cmp eax, 0xffffffff
jne 0x1001378b
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
jne 0x10013979
lea ecx, [esp + 0x34]
mov byte [esp + 0x100], 0
call fcn.10091860
mov eax, dword [0x102f7658]
test eax, eax
je 0x100137c4
mov ecx, dword [esp + 0x10]
push ebx
push ecx
push str.CRemapThread::ConnectSvr:_Add_socket_to_g_mapSocketPair__SOCKET1__d___SOCKET2__d__n
push str.RemapThread
push 1
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
test ebp, ebp
je 0x10013906
push 1
push 0x102e2e40
lea ecx, [esp + 0x3c]
call fcn.10091800
mov ecx, dword [esp + 0x10]
mov ebp, dword [0x102e2e2c]
mov eax, ecx
xor edx, edx
shr eax, 4
div ebp
mov eax, dword [0x102e2e28]
mov byte [esp + 0x100], 4
test eax, eax
mov ebx, ecx
mov esi, edx
je 0x10013822
mov eax, dword [eax + esi*4]
test eax, eax
je 0x10013854
cmp dword [eax + 8], ecx
je 0x10013818
mov eax, dword [eax]
test eax, eax
jne 0x1001380b
jmp 0x10013854
test eax, eax
jne 0x100138e7
jmp 0x10013854
lea edi, [ebp*4]
push edi
call fcn.1023d8fc
mov edx, eax
mov ecx, edi
mov dword [0x102e2e28], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [0x102e2e2c], ebp
mov eax, dword [0x102e2e34]
test eax, eax
jne 0x100138a0
mov eax, dword [0x102e2e3c]
push 0x20
push eax
push 0x102e2e38
call fcn.10090950
mov edx, dword [0x102e2e3c]
mov ecx, edx
shl ecx, 5
lea ecx, [ecx + eax - 0x18]
lea eax, [edx - 1]
test eax, eax
jl 0x1001390d
lea edx, [eax + 1]
mov eax, dword [0x102e2e34]
mov dword [ecx], eax
mov eax, ecx
sub ecx, 0x20
dec edx
jne 0x10013891
mov dword [0x102e2e34], eax
mov ecx, dword [0x102e2e30]
mov edx, dword [eax]
inc ecx
mov dword [0x102e2e34], edx
mov dword [0x102e2e30], ecx
xor ecx, ecx
mov dword [eax + 8], 0
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
mov edx, dword [0x102e2e28]
mov ecx, dword [edx + esi*4]
mov dword [eax], ecx
mov edx, dword [0x102e2e28]
mov dword [edx + esi*4], eax
lea edi, [eax + 0xc]
mov ecx, 5
lea esi, [esp + 0x20]
mov byte [esp + 0x100], 0
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x34]
call fcn.10091860
mov eax, 1
jmp 0x10013943
mov eax, dword [0x102e2e34]
jmp 0x100138a0
cmp dword [0x102f7658], ebp
je 0x10013941
mov esi, dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str.CRemapThread::ConnectSvr:_ioctlsocket_called_failed__SOKCET__d___errno__d__n
push str.RemapThread
push 1
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
mov eax, edi
mov ecx, dword [esp + 0xf8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xf4
ret 8
cmp dword [0x102f7658], ebp
je 0x10013941
mov esi, dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str.CRemapThread::ConnectSvr:_WSAAsyncSelect_called_failed__SOKCET__d___errno__d_
jmp 0x1001392d
mov eax, dword [0x102f7658]
test eax, eax
je 0x100139a3
mov esi, dword [esp + 0x10]
call edi
push eax
push esi
push str.CRemapThread::ConnectSvr:_connect_called_failed__SOKCET__d___errno__d_
push str.RemapThread
push 1
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
mov ecx, dword [0x102e2e80]
test ecx, ecx
je 0x100139ff
mov esi, dword [esp + 0x10]
xor edx, edx
mov eax, esi
shr eax, 4
div dword [0x102e2e84]
mov eax, dword [ecx + edx*4]
test eax, eax
lea ecx, [ecx + edx*4]
je 0x100139ff
cmp dword [eax + 8], esi
je 0x100139d7
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x100139c8
jmp 0x100139ff
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [0x102e2e8c]
mov dword [eax], ecx
mov dword [0x102e2e8c], eax
mov eax, dword [0x102e2e88]
dec eax
mov dword [0x102e2e88], eax
jne 0x100139ff
mov ecx, 0x102e2e80
call fcn.100148f0
lea ecx, [esp + 0x34]
mov byte [esp + 0x100], 0
call fcn.10091860
xor eax, eax
jmp 0x10013943