Function at 0x40b7b0
Capabilities:
Set socket configuration

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
xor ebp, ebp
push edi
mov eax, dword [esi + 0x2024]
mov edi, dword [esp + 0x20]
cmp eax, 1
je 0x40b7ef
cmp eax, ebp
je 0x40b7ef
cmp dword [esp + 0x24], ebp
je 0x40b7d7
cmp edi, ebp
jne 0x40b7ef
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
push eax
push esi
push ecx
call fcn.0040b650
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 6
ja case.default.0x40b7f8
jmp dword [eax*4 + 0x40bb54]
mov eax, dword [esi + 0x201c]
lea edx, [esi + 0x2678]
push 4
push edx
push 0x700b
push 0xffff
push eax
call dword [0x47978c]
cmp eax, 0xffffffff
jne 0x40b862
cmp dword [esi + 0x201c], ebp
je case.default.0x40b7f8
mov edi, dword [esp + 0x14]
push str.SO_UPDATE_ACCEPT_CONTEXT_failed_to_update_accept_socket
push 3
push 0x4cc
mov ecx, dword [edi + 0x24]
push ecx
call dword [0x4795f0]
mov edx, dword [esi + 0x201c]
push edx
call dword [0x479798]
mov dword [esi + 0x201c], ebp
jmp 0x40b9d4
mov ebx, dword [esp + 0x14]
mov ecx, ebx
call fcn.0040cc10
mov edi, eax
cmp edi, ebp
jne 0x40b8db
push 8
push 8
call dword [0x479420]
push eax
call dword [0x479424]
mov edi, eax
cmp edi, ebp
jne 0x40b8db
cmp dword [esi + 0x201c], ebp
je case.default.0x40b7f8
mov eax, dword [ebx + 0x24]
push str.HeapAlloc___for_lpNewperHandlecontext_failed:10031
push 3
push 0x4cc
push eax
call dword [0x4795f0]
mov ecx, dword [esi + 0x201c]
push ecx
call dword [0x479798]
push ebp
push esi
mov ecx, ebx
mov dword [esi + 0x201c], ebp
mov dword [esi + 0x2698], ebp
call fcn.0040ca50
push esi
mov ecx, ebx
call fcn.0040ced0
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [esi + 0x201c]
mov dword [edi + 4], ebp
mov dword [edi], edx
mov ecx, dword [esi + 0x201c]
mov dword [esi + 0x268c], edi
mov eax, dword [ebx + 0x28]
push ebp
push edi
push eax
push ecx
call dword [0x4793f4]
test eax, eax
jne 0x40b930
mov edx, dword [ebx + 0x24]
push str.CreateIoCompletionPort___failed:_error_is_10023
push 3
push 0x4cc
push edx
call dword [0x4795f0]
push ebp
push edi
push esi
mov ecx, ebx
call fcn.0040cf20
push esi
mov ecx, ebx
call fcn.0040ced0
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esi + 0x2658]
mov dword [esi + 0x2670], ebp
push eax
call dword [0x4793f8]
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [esp + 0x14]
mov edx, dword [esi + 0x201c]
push 4
lea ecx, [edi + 0x2c]
push ecx
push 0x700b
push 0xffff
push edx
call dword [0x47978c]
cmp eax, 0xffffffff
jne 0x40b98d
mov eax, dword [edi + 0x24]
push str.SO_UPDATE_ACCEPT_CONTEXT_failed_to_update_accept_socket:_error_is_10033
push 3
push 0x4cc
push eax
call dword [0x4795f0]
mov ecx, dword [esi + 0x201c]
push ecx
jmp 0x40b9ce
mov ecx, edi
call fcn.0040cc10
mov ebx, eax
cmp ebx, ebp
jne 0x40b9f0
push 8
push 8
call dword [0x479420]
push eax
call dword [0x479424]
mov ebx, eax
cmp ebx, ebp
jne 0x40b9f0
mov edx, dword [edi + 0x24]
push str.HeapAlloc___for_lpNewperHandlecontext_failed:_error_is_10034
push 3
push 0x4cc
push edx
call dword [0x4795f0]
mov eax, dword [esi + 0x201c]
push eax
call dword [0x479798]
push ebp
push esi
mov ecx, edi
mov dword [esi + 0x2698], ebp
call fcn.0040ca50
push esi
mov ecx, edi
call fcn.0040ced0
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esi + 0x201c]
mov dword [ebx + 4], ebp
mov dword [ebx], ecx
mov eax, dword [esi + 0x201c]
mov dword [esi + 0x268c], ebx
mov edx, dword [edi + 0x28]
push ebp
push ebx
push edx
push eax
call dword [0x4793f4]
test eax, eax
jne 0x40ba45
mov ecx, dword [edi + 0x24]
push str.CreateIoCompletionPort___failed:_error_is_10024
push 3
push 0x4cc
push ecx
call dword [0x4795f0]
push ebp
push ebx
push esi
mov ecx, edi
call fcn.0040cf20
push esi
mov ecx, edi
call fcn.0040ced0
pop edi
pop esi
pop ebp
pop ebx
ret
lea ebp, [edi + 0x48]
push ebp
call dword [0x4793cc]
push esi
mov ecx, edi
call fcn.0040c3f0
push ebp
call dword [0x4793d0]
mov edx, dword [edi]
push 0x12c
push esi
mov ecx, edi
call dword [edx]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 4]
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
mov edi, dword [esp + 0x18]
push esi
mov ecx, edi
call fcn.0040ccd0
mov edx, dword [edi]
push 0x64
push esi
mov ecx, edi
call dword [edx]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi]
push ecx
push esi
mov ecx, edi
call dword [eax + 4]
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
mov edi, dword [esp + 0x18]
push esi
mov ecx, edi
call fcn.0040cd00
mov edx, dword [edi]
push 0xc8
push esi
mov ecx, edi
call dword [edx]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi]
push ecx
push esi
mov ecx, edi
call dword [eax + 4]
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
mov edi, dword [esp + 0x18]
push esi
mov ecx, edi
call fcn.0040cd00
mov edx, dword [edi]
push 0x190
push esi
mov ecx, edi
call dword [edx]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi]
push ecx
push esi
mov ecx, edi
call dword [eax + 4]
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
mov edi, dword [esp + 0x18]
push esi
mov ecx, edi
call fcn.0040cd00
mov edx, dword [edi]
push 0x258
push esi
mov ecx, edi
call dword [edx]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi]
push ecx
push esi
mov ecx, edi
call dword [eax + 4]
pop edi
pop esi
pop ebp
pop ebx
ret
mov ebx, dword [esp + 0x14]
push edi
push esi
mov ecx, ebx
call fcn.0040ccd0
mov dword [esi + 0x2014], edi
mov edx, dword [ebx]
push 0x2bc
push esi
mov ecx, ebx
call dword [edx]
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebx]
push ecx
push esi
mov ecx, ebx
call dword [eax + 4]
pop edi
pop esi
pop ebp
pop ebx
ret