Function at 0x511c80
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
cmp dword [esi + 0xcda8], 0
jne 0x511cb1
push dword [esi + 0xb8]
push str.Freeing_session_resource
push 2
push esi
call fcn.0040ce50
add esp, 0x10
mov dword [esi + 0xcda8], 2
cmp dword [esi + 0xcda8], 2
jne 0x511cf9
lea edi, [esi + 0x130]
push edi
call fcn.00522590
add esp, 4
test eax, eax
je 0x511cef
nop dword [eax]
push eax
call fcn.00515230
add esp, 4
cmp eax, 0xffffffdb
je 0x5121aa
push edi
call fcn.00522590
add esp, 4
test eax, eax
jne 0x511cd0
mov dword [esi + 0xcda8], 3
cmp dword [esi + 0xcda8], 3
jne 0x511d3e
lea edi, [esi + 0x13c]
push edi
call fcn.00522590
add esp, 4
test eax, eax
je 0x511d34
push eax
call fcn.00515090
add esp, 4
cmp eax, 0xffffffdb
je 0x5121aa
push edi
call fcn.00522590
add esp, 4
test eax, eax
jne 0x511d15
mov dword [esi + 0xcda8], 4
test byte [esi + 0x34], 2
je 0x511e29
mov eax, dword [esi + 0x58]
test eax, eax
je 0x511d60
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x511d60
lea eax, [esi + 0x5c]
push eax
push esi
call ecx
add esp, 8
mov eax, dword [esi + 0xfc]
test eax, eax
je 0x511d7e
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x511d7e
lea eax, [esi + 0x100]
push eax
push esi
call ecx
add esp, 8
mov eax, dword [esi + 0x110]
test eax, eax
je 0x511d9e
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x511d9e
lea eax, [esi + 0x114]
push eax
push 1
push esi
call ecx
add esp, 0xc
mov eax, dword [esi + 0x104]
test eax, eax
je 0x511dbc
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x511dbc
lea eax, [esi + 0x10c]
push eax
push esi
call ecx
add esp, 8
mov eax, dword [esi + 0xc4]
test eax, eax
je 0x511dda
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x511dda
lea eax, [esi + 0xc8]
push eax
push esi
call ecx
add esp, 8
mov eax, dword [esi + 0xd8]
test eax, eax
je 0x511dfa
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x511dfa
lea eax, [esi + 0xdc]
push eax
push 0
push esi
call ecx
add esp, 0xc
mov eax, dword [esi + 0xcc]
test eax, eax
je 0x511e18
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x511e18
lea eax, [esi + 0xd4]
push eax
push esi
call ecx
add esp, 8
mov eax, dword [esi + 0x48]
test eax, eax
je 0x511e29
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xb8]
test eax, eax
je 0x511e3d
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xf0]
test eax, eax
je 0x511e51
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x511e62
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0x30]
test eax, eax
je 0x511e73
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xf4]
test eax, eax
je 0x511e87
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0x118]
test eax, eax
je 0x511e9b
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0x11c]
test eax, eax
je 0x511eaf
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0x120]
test eax, eax
je 0x511ec3
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0x124]
test eax, eax
je 0x511ed7
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xbc]
test eax, eax
je 0x511eeb
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xe0]
test eax, eax
je 0x511eff
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xe4]
test eax, eax
je 0x511f13
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xe8]
test eax, eax
je 0x511f27
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xec]
test eax, eax
je 0x511f3b
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcb5c]
test eax, eax
je 0x511f4f
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcb68]
test eax, eax
je 0x511f63
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xced0]
test eax, eax
je 0x511f77
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcee4]
test eax, eax
je 0x511f8b
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcef0]
test eax, eax
je 0x511f9f
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf0c]
test eax, eax
je 0x511fb3
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf14]
test eax, eax
je 0x511fc7
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf04]
test eax, eax
je 0x511fdb
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf2c]
test eax, eax
je 0x511fef
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf34]
test eax, eax
je 0x512003
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf3c]
test eax, eax
je 0x512017
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf5c]
test eax, eax
je 0x51202b
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf64]
test eax, eax
je 0x51203f
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcf78]
test eax, eax
je 0x512053
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcfac]
test eax, eax
je 0x512067
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcfb4]
test eax, eax
je 0x51207b
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcfc4]
test eax, eax
je 0x51208f
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcfd8]
test eax, eax
je 0x5120a3
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xcffc]
test eax, eax
je 0x5120b7
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xd0f0]
test eax, eax
je 0x5120cb
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xd214]
test eax, eax
je 0x5120df
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xd0d4]
test eax, eax
je 0x5120f3
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
cmp dword [esi + 0x417c], 0
je 0x51210b
mov eax, dword [esi + 0xc]
push esi
push dword [esi + 0x4180]
call eax
add esp, 8
push ebx
lea ebx, [esi + 0x128]
push ebx
call fcn.00522590
mov edi, eax
add esp, 4
test edi, edi
je 0x512146
push edi
call fcn.005225d0
mov eax, dword [esi + 0xc]
push esi
push dword [edi + 0xc]
call eax
mov eax, dword [esi + 0xc]
push esi
push edi
call eax
push ebx
call fcn.00522590
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x512121
cmp dword [esi + 0x150], 0
pop ebx
je 0x51216c
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push 0x8004667e
push dword [esi + 0x144]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esi + 0x60]
test eax, eax
je 0x51217d
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0x154]
test eax, eax
je 0x51219a
test byte [esi + 0x15c], 1
je 0x51219a
push esi
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 8
mov eax, dword [esi + 0xc]
push esi
push esi
call eax
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
ret
pop edi
mov eax, 0xffffffdb
pop esi
pop ebp
ret